Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. template<class T> struct type2cv {};
  2. template<> struct type2cv<uint8_t> { static const int value = CV_8U; };
  3. template<> struct type2cv<int8_t> { static const int value = CV_8S; };
  4. template<> struct type2cv<uint16_t> { static const int value = CV_16U; };
  5. template<> struct type2cv<int16_t> { static const int value = CV_16S; };
  6. template<> struct type2cv<int32_t> { static const int value = CV_32S; };
  7. template<> struct type2cv<float> { static const int value = CV_32F; };
  8. template<> struct type2cv<double> { static const int value = CV_64F; };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement