From a594f01a3edcc548ea1582b98fbf1dd68ec3813b Mon Sep 17 00:00:00 2001 From: Maria Dimashova Date: Mon, 18 Oct 2010 11:06:44 +0000 Subject: [PATCH] fixed cast of Mat to vector (leads to compile error now) --- modules/core/include/opencv2/core/core.hpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/core/include/opencv2/core/core.hpp b/modules/core/include/opencv2/core/core.hpp index b96910030..1d27cef04 100644 --- a/modules/core/include/opencv2/core/core.hpp +++ b/modules/core/include/opencv2/core/core.hpp @@ -390,6 +390,7 @@ template class CV_EXPORTS DataDepth { public: enum { value = -1, f template<> class DataDepth { public: enum { value = CV_8U, fmt=(int)'u' }; }; template<> class DataDepth { public: enum { value = CV_8U, fmt=(int)'u' }; }; template<> class DataDepth { public: enum { value = CV_8S, fmt=(int)'c' }; }; +template<> class DataDepth { public: enum { value = CV_8S, fmt=(int)'c' }; }; template<> class DataDepth { public: enum { value = CV_16U, fmt=(int)'w' }; }; template<> class DataDepth { public: enum { value = CV_16S, fmt=(int)'s' }; }; template<> class DataDepth { public: enum { value = CV_32S, fmt=(int)'i' }; }; @@ -969,9 +970,6 @@ public: typedef value_type work_type; typedef value_type channel_type; typedef value_type vec_type; - enum { depth = DataDepth::value, channels = 1, - fmt=DataDepth::fmt, - type = CV_MAKETYPE(depth, channels) }; }; template<> class DataType @@ -1010,6 +1008,18 @@ public: type = CV_MAKETYPE(depth, channels) }; }; +template<> class DataType +{ +public: + typedef schar value_type; + typedef int work_type; + typedef value_type channel_type; + typedef value_type vec_type; + enum { depth = DataDepth::value, channels = 1, + fmt=DataDepth::fmt, + type = CV_MAKETYPE(depth, channels) }; +}; + template<> class DataType { public: