Skip to content

Commit 68e19d5

Browse files
committed
Merge pull request #970 from sovrasov:aruco_board_create_dbg_fix
2 parents ca7953a + 820af3a commit 68e19d5

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

modules/aruco/src/aruco.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,14 +1277,11 @@ Ptr<Board> Board::create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &di
12771277
for (unsigned int i = 0; i < objPoints.total(); i++) {
12781278
std::vector<Point3f> corners;
12791279
Mat corners_mat = objPoints.getMat(i);
1280-
if(objPoints.type() == CV_32FC1)
1281-
{
1282-
CV_Assert(corners_mat.total() == 12);
1283-
}
1284-
else
1285-
{
1286-
CV_Assert(corners_mat.total() == 4);
1287-
}
1280+
1281+
if(corners_mat.type() == CV_32FC1)
1282+
corners_mat = corners_mat.reshape(3);
1283+
CV_Assert(corners_mat.total() == 4);
1284+
12881285
for (int j = 0; j < 4; j++) {
12891286
corners.push_back(corners_mat.at<Point3f>(j));
12901287
}

0 commit comments

Comments
 (0)