enable Matx as Mat elements (bug #1705).

This commit is contained in:
Vadim Pisarevsky
2012-10-11 15:02:48 +04:00
parent e435674a90
commit 7ee6040192
2 changed files with 36 additions and 0 deletions

View File

@@ -1107,6 +1107,18 @@ public:
type = CV_MAKETYPE(depth, channels) };
};
template<typename _Tp, int m, int n> class DataType<Matx<_Tp, m, n> >
{
public:
typedef Matx<_Tp, m, n> value_type;
typedef Matx<typename DataType<_Tp>::work_type, m, n> work_type;
typedef _Tp channel_type;
typedef value_type vec_type;
enum { generic_type = 0, depth = DataDepth<channel_type>::value, channels = m*n,
fmt = ((channels-1)<<8) + DataDepth<channel_type>::fmt,
type = CV_MAKETYPE(depth, channels) };
};
template<typename _Tp, int cn> class DataType<Vec<_Tp, cn> >
{
public: