From 960fd51cf0b0e8d9ccdaf4e8f56fcdc127e18f05 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Fri, 12 Aug 2011 15:19:10 +0000 Subject: [PATCH] another attempt to fix #1299 --- modules/core/include/opencv2/core/operations.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp index ee37b706d..c6b5e9c63 100644 --- a/modules/core/include/opencv2/core/operations.hpp +++ b/modules/core/include/opencv2/core/operations.hpp @@ -625,21 +625,24 @@ Matx<_Tp, m, n> operator * (const Matx<_Tp, m, l>& a, const Matx<_Tp, l, n>& b) template static inline Point_<_Tp> operator * (const Matx<_Tp, 2, 2>& a, const Point_<_Tp>& b) { - return Point_<_Tp>(a*Vec<_Tp,2>(b.x,b.y)); + Matx<_Tp, 2, 1> tmp = a*Vec<_Tp,2>(b.x, b.y); + return Point_<_Tp>(tmp.val[0], tmp.val[1]); } template static inline Point3_<_Tp> operator * (const Matx<_Tp, 3, 3>& a, const Point3_<_Tp>& b) { - return Point3_<_Tp>(a*Vec<_Tp,3>(b.x,b.y,b.z)); + Matx<_Tp, 3, 1> tmp = a*Vec<_Tp,3>(b.x, b.y, b.z); + return Point3_<_Tp>(tmp.val[0], tmp.val[1], tmp.val[2]); } template static inline Point3_<_Tp> operator * (const Matx<_Tp, 3, 3>& a, const Point_<_Tp>& b) { - return Point3_<_Tp>(a*Vec<_Tp,3>(b.x, b.y, 1)); + Matx<_Tp, 3, 1> tmp = a*Vec<_Tp,3>(b.x, b.y, 1); + return Point3_<_Tp>(tmp.val[0], tmp.val[1], tmp.val[2]); }