OpenCV 筆記 1.2 Type表 (double= CV_64F)

參考: https://stackoverflow.com/questions/15245262/opencv-mat-element-types-and-their-sizes

 

表如下 double 對到 CV_64F /  CV_64F C3

TtypeGrayRGBTtype
<bool>CV_8UCV_8UC3'u'
<uchar>CV_8UCV_8UC3'u'
<schar>CV_8SCV_8SC3'c'
<char>CV_8SCV_8SC3'c'
<ushort>CV_16UCV_16UC3'w'
<short>CV_16SCV_16SC3's'
<int>CV_32SCV_32SC3'i'
<unsigned>CV_32SCV_32SC3'i'
<float>CV_32FCV_32FC3'f'
<double>CV_64FCV_64FC3'd'

 

template<> class DataDepth<bool> { public: enum { value = CV_8U, fmt=(int)'u' }; };
template<> class DataDepth<uchar> { public: enum { value = CV_8U, fmt=(int)'u' }; };
template<> class DataDepth<schar> { public: enum { value = CV_8S, fmt=(int)'c' }; };
template<> class DataDepth<char> { public: enum { value = CV_8S, fmt=(int)'c' }; };
template<> class DataDepth<ushort> { public: enum { value = CV_16U, fmt=(int)'w' }; };
template<> class DataDepth<short> { public: enum { value = CV_16S, fmt=(int)'s' }; };
template<> class DataDepth<int> { public: enum { value = CV_32S, fmt=(int)'i' }; };

template<> class DataDepth<unsigned> { public: enum { value = CV_32S, fmt=(int)'i' }; };
template<> class DataDepth<float> { public: enum { value = CV_32F, fmt=(int)'f' }; };
template<> class DataDepth<double> { public: enum { value = CV_64F, fmt=(int)'d' }; };
template<typename _Tp> class DataDepth<_Tp*> { public: enum { value = CV_USRTYPE1, fmt=(int)'r' }; }