Skip to content

Commit 70e6391

Browse files
elmewosovrasov
authored andcommitted
create homogeneous affine matrix when constructing from 4x3 cv::Mat
1 parent 0457361 commit 70e6391

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
@@ -213,11 +213,13 @@ cv::Affine3<T>::Affine3(const cv::Mat& data, const Vec3& t)
213213
{
214214
rotation(data(Rect(0, 0, 3, 3)));
215215
translation(data(Rect(3, 0, 1, 3)));
216-
return;
216+
}
217+
else
218+
{
219+
rotation(data);
220+
translation(t);
217221
}
218222

219-
rotation(data);
220-
translation(t);
221223
matrix.val[12] = matrix.val[13] = matrix.val[14] = 0;
222224
matrix.val[15] = 1;
223225
}

0 commit comments

Comments
 (0)