Merge pull request #970 from sovrasov:aruco_board_create_dbg_fix

pull/972/head
Alexander Alekhin 8 years ago
commit 68e19d5097
  1. 11
      modules/aruco/src/aruco.cpp

@ -1277,14 +1277,11 @@ Ptr<Board> Board::create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &di
for (unsigned int i = 0; i < objPoints.total(); i++) {
std::vector<Point3f> corners;
Mat corners_mat = objPoints.getMat(i);
if(objPoints.type() == CV_32FC1)
{
CV_Assert(corners_mat.total() == 12);
}
else
{
if(corners_mat.type() == CV_32FC1)
corners_mat = corners_mat.reshape(3);
CV_Assert(corners_mat.total() == 4);
}
for (int j = 0; j < 4; j++) {
corners.push_back(corners_mat.at<Point3f>(j));
}

Loading…
Cancel
Save