Skip to content

Commit 34d7b96

Browse files
committed
create homogeneous affine matrix when constructing from 4x3 cv::Mat
1 parent 160f261 commit 34d7b96

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/core/include/opencv2/core/affine.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,13 @@ cv::Affine3<T>::Affine3(const cv::Mat& data, const Vec3& t)
203203
{
204204
rotation(data(Rect(0, 0, 3, 3)));
205205
translation(data(Rect(3, 0, 1, 3)));
206-
return;
206+
}
207+
else
208+
{
209+
rotation(data);
210+
translation(t);
207211
}
208212

209-
rotation(data);
210-
translation(t);
211213
matrix.val[12] = matrix.val[13] = matrix.val[14] = 0;
212214
matrix.val[15] = 1;
213215
}

0 commit comments

Comments
 (0)