From 7b28f730f42c419bc9d17e394a91e5df4a65a20b Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Tue, 7 Jan 2014 12:32:33 +0400 Subject: [PATCH] traits for Affine3 --- modules/core/include/opencv2/core/affine.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/affine.hpp b/modules/core/include/opencv2/core/affine.hpp index 3f072e7..62720b5 100644 --- a/modules/core/include/opencv2/core/affine.hpp +++ b/modules/core/include/opencv2/core/affine.hpp @@ -134,8 +134,24 @@ namespace cv static cv::Vec3f operator*(const cv::Affine3f& affine, const cv::Vec3f& vector); static cv::Vec3d operator*(const cv::Affine3d& affine, const cv::Vec3d& vector); -} + template class DataType< Affine3<_Tp> > + { + public: + typedef Affine3<_Tp> value_type; + typedef Affine3::work_type> work_type; + typedef _Tp channel_type; + + enum { generic_type = 0, + depth = DataType::depth, + channels = 16, + fmt = DataType::fmt + ((channels - 1) << 8), + type = CV_MAKETYPE(depth, channels) + }; + + typedef Vec vec_type; + }; +} /////////////////////////////////////////////////////////////////////////////////// -- 2.7.4