1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

create homogeneous affine matrix when constructing from 4x3 cv::Mat

This commit is contained in:
André Mewes
2017-04-13 14:39:10 +02:00
parent 160f26192c
commit 34d7b96bfc
+5 -3
View File
@@ -203,11 +203,13 @@ cv::Affine3<T>::Affine3(const cv::Mat& data, const Vec3& t)
{
rotation(data(Rect(0, 0, 3, 3)));
translation(data(Rect(3, 0, 1, 3)));
return;
}
else
{
rotation(data);
translation(t);
}
rotation(data);
translation(t);
matrix.val[12] = matrix.val[13] = matrix.val[14] = 0;
matrix.val[15] = 1;
}