|
|
|
@ -98,14 +98,23 @@ public: |
|
|
|
|
typedef _Tp channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = 2, |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) }; |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Depth< Complex<_Tp> > { enum { value = Depth<_Tp>::value }; }; |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Type< Complex<_Tp> > { enum { value = CV_MAKETYPE(Depth<_Tp>::value, 2) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////// Point_ ////////////////////////////////
|
|
|
|
@ -190,15 +199,23 @@ public: |
|
|
|
|
typedef _Tp channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = 2, |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) |
|
|
|
|
fmt = traits::SafeFmt<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Depth< Point_<_Tp> > { enum { value = Depth<_Tp>::value }; }; |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Type< Point_<_Tp> > { enum { value = CV_MAKETYPE(Depth<_Tp>::value, 2) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////// Point3_ ////////////////////////////////
|
|
|
|
@ -261,16 +278,23 @@ public: |
|
|
|
|
typedef _Tp channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = 3, |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) |
|
|
|
|
fmt = traits::SafeFmt<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Depth< Point3_<_Tp> > { enum { value = Depth<_Tp>::value }; }; |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Type< Point3_<_Tp> > { enum { value = CV_MAKETYPE(Depth<_Tp>::value, 3) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
//////////////////////////////// Size_ ////////////////////////////////
|
|
|
|
|
|
|
|
|
@ -324,16 +348,23 @@ public: |
|
|
|
|
typedef _Tp channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = 2, |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Depth< Size_<_Tp> > { enum { value = Depth<_Tp>::value }; }; |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Type< Size_<_Tp> > { enum { value = CV_MAKETYPE(Depth<_Tp>::value, 2) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
//////////////////////////////// Rect_ ////////////////////////////////
|
|
|
|
|
|
|
|
|
@ -427,16 +458,23 @@ public: |
|
|
|
|
typedef _Tp channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = 4, |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) |
|
|
|
|
fmt = traits::SafeFmt<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Depth< Rect_<_Tp> > { enum { value = Depth<_Tp>::value }; }; |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Type< Rect_<_Tp> > { enum { value = CV_MAKETYPE(Depth<_Tp>::value, 4) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
///////////////////////////// RotatedRect /////////////////////////////
|
|
|
|
|
|
|
|
|
@ -505,15 +543,23 @@ public: |
|
|
|
|
typedef float channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = (int)sizeof(value_type)/sizeof(channel_type), // 5
|
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) |
|
|
|
|
fmt = traits::SafeFmt<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<> |
|
|
|
|
struct Depth< RotatedRect > { enum { value = Depth<float>::value }; }; |
|
|
|
|
template<> |
|
|
|
|
struct Type< RotatedRect > { enum { value = CV_MAKETYPE(Depth<float>::value, (int)sizeof(RotatedRect)/sizeof(float)) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////// Range /////////////////////////////////
|
|
|
|
@ -561,15 +607,23 @@ public: |
|
|
|
|
typedef int channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = 2, |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) |
|
|
|
|
fmt = traits::SafeFmt<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<> |
|
|
|
|
struct Depth< Range > { enum { value = Depth<int>::value }; }; |
|
|
|
|
template<> |
|
|
|
|
struct Type< Range > { enum { value = CV_MAKETYPE(Depth<int>::value, 2) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////// Scalar_ ///////////////////////////////
|
|
|
|
@ -617,15 +671,23 @@ public: |
|
|
|
|
typedef _Tp channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = 4, |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) |
|
|
|
|
fmt = traits::SafeFmt<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Depth< Scalar_<_Tp> > { enum { value = Depth<_Tp>::value }; }; |
|
|
|
|
template<typename _Tp> |
|
|
|
|
struct Type< Scalar_<_Tp> > { enum { value = CV_MAKETYPE(Depth<_Tp>::value, 4) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////// KeyPoint ////////////////////////////////
|
|
|
|
@ -712,6 +774,7 @@ public: |
|
|
|
|
CV_PROP_RW int class_id; //!< object class (if the keypoints need to be clustered by an object they belong to)
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
template<> class DataType<KeyPoint> |
|
|
|
|
{ |
|
|
|
|
public: |
|
|
|
@ -728,7 +791,7 @@ public: |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////// DMatch /////////////////////////////////
|
|
|
|
@ -755,6 +818,7 @@ public: |
|
|
|
|
bool operator<(const DMatch &m) const; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
template<> class DataType<DMatch> |
|
|
|
|
{ |
|
|
|
|
public: |
|
|
|
@ -771,7 +835,7 @@ public: |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////// TermCriteria //////////////////////////////
|
|
|
|
@ -885,15 +949,24 @@ public: |
|
|
|
|
typedef double channel_type; |
|
|
|
|
|
|
|
|
|
enum { generic_type = 0, |
|
|
|
|
depth = DataType<channel_type>::depth, |
|
|
|
|
channels = (int)(sizeof(value_type)/sizeof(channel_type)), // 24
|
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8), |
|
|
|
|
type = CV_MAKETYPE(depth, channels) |
|
|
|
|
fmt = DataType<channel_type>::fmt + ((channels - 1) << 8) |
|
|
|
|
#ifdef OPENCV_TRAITS_ENABLE_DEPRECATED |
|
|
|
|
,depth = DataType<channel_type>::depth |
|
|
|
|
,type = CV_MAKETYPE(depth, channels) |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef Vec<channel_type, channels> vec_type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
namespace traits { |
|
|
|
|
template<> |
|
|
|
|
struct Depth< Moments > { enum { value = Depth<double>::value }; }; |
|
|
|
|
template<> |
|
|
|
|
struct Type< Moments > { enum { value = CV_MAKETYPE(Depth<double>::value, (int)(sizeof(Moments)/sizeof(double))) }; }; |
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
//! @} imgproc_shape
|
|
|
|
|
|
|
|
|
|
//! @cond IGNORED
|
|
|
|
|