Skip to content

Commit a81a014

Browse files
Alexander PanovAleksandrPanov
Alexander Panov
authored andcommitted
Merge pull request #3174 from AleksandrPanov:fix_gridboard_objPoints
Fix objPoints order in GridBoard and CharucoBoard * fix gridBoard * fix charucoBoard * add rightBottomBorder * add test_aruco_utils and code refactoring/fix tests * fix axes and add charuco dict * add axes test, remove drawAxis(), update tutorial (cherry picked from commit 56d492c)
1 parent 1d0115a commit a81a014

27 files changed

+287
-358
lines changed

modules/aruco/include/opencv2/aruco.hpp

+16-26
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,9 @@ CV_EXPORTS_W void detectMarkers(InputArray image, const Ptr<Dictionary> &diction
272272
* The marker corrdinate system is centered on the middle of the marker, with the Z axis
273273
* perpendicular to the marker plane.
274274
* The coordinates of the four corners of the marker in its own coordinate system are:
275-
* (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0),
276-
* (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0)
275+
* (0, 0, 0), (markerLength, 0, 0),
276+
* (markerLength, markerLength, 0), (0, markerLength, 0)
277+
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
277278
*/
278279
CV_EXPORTS_W void estimatePoseSingleMarkers(InputArrayOfArrays corners, float markerLength,
279280
InputArray cameraMatrix, InputArray distCoeffs,
@@ -316,7 +317,14 @@ class CV_EXPORTS_W Board {
316317
CV_WRAP void setIds(InputArray ids);
317318

318319
/// array of object points of all the marker corners in the board
319-
/// each marker include its 4 corners in CCW order. For M markers, the size is Mx4.
320+
/// each marker include its 4 corners in this order:
321+
///- objPoints[i][0] - left-top point of i-th marker
322+
///- objPoints[i][1] - right-top point of i-th marker
323+
///- objPoints[i][2] - right-bottom point of i-th marker
324+
///- objPoints[i][3] - left-bottom point of i-th marker
325+
///
326+
/// Markers are placed in a certain order - row by row, left to right in every row.
327+
/// For M markers, the size is Mx4.
320328
CV_PROP std::vector< std::vector< Point3f > > objPoints;
321329

322330
/// the dictionary of markers employed for this board
@@ -325,6 +333,9 @@ class CV_EXPORTS_W Board {
325333
/// vector of the identifiers of the markers in the board (same size than objPoints)
326334
/// The identifiers refers to the board dictionary
327335
CV_PROP_RW std::vector< int > ids;
336+
337+
/// coordinate of the bottom right corner of the board, is set when calling the function create()
338+
CV_PROP Point3f rightBottomBorder;
328339
};
329340

330341

@@ -424,6 +435,7 @@ class CV_EXPORTS_W GridBoard : public Board {
424435
* Input markers that are not included in the board layout are ignored.
425436
* The function returns the number of markers from the input employed for the board pose estimation.
426437
* Note that returning a 0 means the pose has not been estimated.
438+
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
427439
*/
428440
CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, const Ptr<Board> &board,
429441
InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec,
@@ -488,36 +500,14 @@ CV_EXPORTS_W void refineDetectedMarkers(
488500
* Given an array of detected marker corners and its corresponding ids, this functions draws
489501
* the markers in the image. The marker borders are painted and the markers identifiers if provided.
490502
* Useful for debugging purposes.
503+
*
491504
*/
492505
CV_EXPORTS_W void drawDetectedMarkers(InputOutputArray image, InputArrayOfArrays corners,
493506
InputArray ids = noArray(),
494507
Scalar borderColor = Scalar(0, 255, 0));
495508

496509

497510

498-
/**
499-
* @brief Draw coordinate system axis from pose estimation
500-
*
501-
* @param image input/output image. It must have 1 or 3 channels. The number of channels is not
502-
* altered.
503-
* @param cameraMatrix input 3x3 floating-point camera matrix
504-
* \f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$
505-
* @param distCoeffs vector of distortion coefficients
506-
* \f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\f$ of 4, 5, 8 or 12 elements
507-
* @param rvec rotation vector of the coordinate system that will be drawn. (@sa Rodrigues).
508-
* @param tvec translation vector of the coordinate system that will be drawn.
509-
* @param length length of the painted axis in the same unit than tvec (usually in meters)
510-
*
511-
* Given the pose estimation of a marker or board, this function draws the axis of the world
512-
* coordinate system, i.e. the system centered on the marker/board. Useful for debugging purposes.
513-
*
514-
* @deprecated use cv::drawFrameAxes
515-
*/
516-
CV_EXPORTS_W void drawAxis(InputOutputArray image, InputArray cameraMatrix, InputArray distCoeffs,
517-
InputArray rvec, InputArray tvec, float length);
518-
519-
520-
521511
/**
522512
* @brief Draw a canonical marker image
523513
*

modules/aruco/include/opencv2/aruco/charuco.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ CV_EXPORTS_W int interpolateCornersCharuco(InputArrayOfArrays markerCorners, Inp
181181
* This function estimates a Charuco board pose from some detected corners.
182182
* The function checks if the input corners are enough and valid to perform pose estimation.
183183
* If pose estimation is valid, returns true, else returns false.
184+
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
184185
*/
185186
CV_EXPORTS_W bool estimatePoseCharucoBoard(InputArray charucoCorners, InputArray charucoIds,
186187
const Ptr<CharucoBoard> &board, InputArray cameraMatrix,
@@ -275,6 +276,7 @@ CV_EXPORTS_W double calibrateCameraCharuco(
275276
* diamond.
276277
* @param cameraMatrix Optional camera calibration matrix.
277278
* @param distCoeffs Optional camera distortion coefficients.
279+
* @param dictionary dictionary of markers indicating the type of markers.
278280
*
279281
* This function detects Diamond markers from the previous detected ArUco markers. The diamonds
280282
* are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
@@ -285,7 +287,8 @@ CV_EXPORTS_W void detectCharucoDiamond(InputArray image, InputArrayOfArrays mark
285287
InputArray markerIds, float squareMarkerLengthRate,
286288
OutputArrayOfArrays diamondCorners, OutputArray diamondIds,
287289
InputArray cameraMatrix = noArray(),
288-
InputArray distCoeffs = noArray());
290+
InputArray distCoeffs = noArray(),
291+
Ptr<Dictionary> dictionary = getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME(0)));
289292

290293

291294

modules/aruco/samples/calibrate_camera.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) {
101101
if(parser.get<bool>("zt")) calibrationFlags |= CALIB_ZERO_TANGENT_DIST;
102102
if(parser.get<bool>("pc")) calibrationFlags |= CALIB_FIX_PRINCIPAL_POINT;
103103

104-
Ptr<aruco::DetectorParameters> detectorParams;
104+
Ptr<aruco::DetectorParameters> detectorParams = aruco::DetectorParameters::create();
105105
if(parser.has("dp")) {
106106
FileStorage fs(parser.get<string>("dp"), FileStorage::READ);
107107
bool readOk = aruco::DetectorParameters::readDetectorParameters(fs.root(), detectorParams);

modules/aruco/samples/calibrate_camera_charuco.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int main(int argc, char *argv[]) {
102102
if(parser.get<bool>("zt")) calibrationFlags |= CALIB_ZERO_TANGENT_DIST;
103103
if(parser.get<bool>("pc")) calibrationFlags |= CALIB_FIX_PRINCIPAL_POINT;
104104

105-
Ptr<aruco::DetectorParameters> detectorParams;
105+
Ptr<aruco::DetectorParameters> detectorParams = aruco::DetectorParameters::create();
106106
if(parser.has("dp")) {
107107
FileStorage fs(parser.get<string>("dp"), FileStorage::READ);
108108
bool readOk = aruco::DetectorParameters::readDetectorParameters(fs.root(), detectorParams);

modules/aruco/samples/detect_board.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ int main(int argc, char *argv[]) {
9797
}
9898
}
9999

100-
Ptr<aruco::DetectorParameters> detectorParams;
100+
Ptr<aruco::DetectorParameters> detectorParams = aruco::DetectorParameters::create();
101101
if(parser.has("dp")) {
102102
FileStorage fs(parser.get<string>("dp"), FileStorage::READ);
103103
bool readOk = aruco::DetectorParameters::readDetectorParameters(fs.root(), detectorParams);
@@ -199,7 +199,7 @@ int main(int argc, char *argv[]) {
199199
aruco::drawDetectedMarkers(imageCopy, rejected, noArray(), Scalar(100, 0, 255));
200200

201201
if(markersOfBoardDetected > 0)
202-
aruco::drawAxis(imageCopy, camMatrix, distCoeffs, rvec, tvec, axisLength);
202+
cv::drawFrameAxes(imageCopy, camMatrix, distCoeffs, rvec, tvec, axisLength);
203203

204204
imshow("out", imageCopy);
205205
char key = (char)waitKey(waitTime);

modules/aruco/samples/detect_board_charuco.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int main(int argc, char *argv[]) {
9999
}
100100
}
101101

102-
Ptr<aruco::DetectorParameters> detectorParams;
102+
Ptr<aruco::DetectorParameters> detectorParams = aruco::DetectorParameters::create();
103103
if(parser.has("dp")) {
104104
FileStorage fs(parser.get<string>("dp"), FileStorage::READ);
105105
bool readOk = aruco::DetectorParameters::readDetectorParameters(fs.root(), detectorParams);
@@ -213,7 +213,7 @@ int main(int argc, char *argv[]) {
213213
}
214214

215215
if(validPose)
216-
aruco::drawAxis(imageCopy, camMatrix, distCoeffs, rvec, tvec, axisLength);
216+
cv::drawFrameAxes(imageCopy, camMatrix, distCoeffs, rvec, tvec, axisLength);
217217

218218
imshow("out", imageCopy);
219219
char key = (char)waitKey(waitTime);

modules/aruco/samples/detect_diamonds.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int main(int argc, char *argv[]) {
8787
bool autoScale = parser.has("as");
8888
float autoScaleFactor = autoScale ? parser.get<float>("as") : 1.f;
8989

90-
Ptr<aruco::DetectorParameters> detectorParams;
90+
Ptr<aruco::DetectorParameters> detectorParams = aruco::DetectorParameters::create();
9191
if(parser.has("dp")) {
9292
FileStorage fs(parser.get<string>("dp"), FileStorage::READ);
9393
bool readOk = aruco::DetectorParameters::readDetectorParameters(fs.root(), detectorParams);
@@ -219,8 +219,8 @@ int main(int argc, char *argv[]) {
219219

220220
if(estimatePose) {
221221
for(unsigned int i = 0; i < diamondIds.size(); i++)
222-
aruco::drawAxis(imageCopy, camMatrix, distCoeffs, rvecs[i], tvecs[i],
223-
squareLength * 0.5f);
222+
cv::drawFrameAxes(imageCopy, camMatrix, distCoeffs, rvecs[i], tvecs[i],
223+
squareLength * 1.1f);
224224
}
225225
}
226226

modules/aruco/samples/detect_markers.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int main(int argc, char *argv[]) {
8080
bool estimatePose = parser.has("c");
8181
float markerLength = parser.get<float>("l");
8282

83-
Ptr<aruco::DetectorParameters> detectorParams;
83+
Ptr<aruco::DetectorParameters> detectorParams = aruco::DetectorParameters::create();
8484
if(parser.has("dp")) {
8585
FileStorage fs(parser.get<string>("dp"), FileStorage::READ);
8686
bool readOk = aruco::DetectorParameters::readDetectorParameters(fs.root(), detectorParams);
@@ -179,8 +179,7 @@ int main(int argc, char *argv[]) {
179179

180180
if(estimatePose) {
181181
for(unsigned int i = 0; i < ids.size(); i++)
182-
aruco::drawAxis(imageCopy, camMatrix, distCoeffs, rvecs[i], tvecs[i],
183-
markerLength * 0.5f);
182+
cv::drawFrameAxes(imageCopy, camMatrix, distCoeffs, rvecs[i], tvecs[i], markerLength * 1.5f, 2);
184183
}
185184
}
186185

modules/aruco/samples/tutorial_charuco_create_detect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static inline void detectCharucoBoardWithCalibrationPose()
7272
//! [pose]
7373
// if charuco pose is valid
7474
if (valid)
75-
cv::aruco::drawAxis(imageCopy, cameraMatrix, distCoeffs, rvec, tvec, 0.1f);
75+
cv::drawFrameAxes(imageCopy, cameraMatrix, distCoeffs, rvec, tvec, 0.1f);
7676
}
7777
}
7878
cv::imshow("out", imageCopy);

modules/aruco/src/aruco.cpp

+19-23
Original file line numberDiff line numberDiff line change
@@ -785,11 +785,11 @@ static void _getSingleMarkerObjectPoints(float markerLength, OutputArray _objPoi
785785

786786
_objPoints.create(4, 1, CV_32FC3);
787787
Mat objPoints = _objPoints.getMat();
788-
// set coordinate system in the middle of the marker, with Z pointing out
789-
objPoints.ptr< Vec3f >(0)[0] = Vec3f(-markerLength / 2.f, markerLength / 2.f, 0);
790-
objPoints.ptr< Vec3f >(0)[1] = Vec3f(markerLength / 2.f, markerLength / 2.f, 0);
791-
objPoints.ptr< Vec3f >(0)[2] = Vec3f(markerLength / 2.f, -markerLength / 2.f, 0);
792-
objPoints.ptr< Vec3f >(0)[3] = Vec3f(-markerLength / 2.f, -markerLength / 2.f, 0);
788+
// set coordinate system in the top-left corner of the marker, with Z pointing out
789+
objPoints.ptr< Vec3f >(0)[0] = Vec3f(0.f, 0.f, 0);
790+
objPoints.ptr< Vec3f >(0)[1] = Vec3f(markerLength, 0.f, 0);
791+
objPoints.ptr< Vec3f >(0)[2] = Vec3f(markerLength, markerLength, 0);
792+
objPoints.ptr< Vec3f >(0)[3] = Vec3f(0.f, markerLength, 0);
793793
}
794794

795795
/**
@@ -1594,6 +1594,7 @@ Ptr<Board> Board::create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &di
15941594
CV_Assert(objPoints.type() == CV_32FC3 || objPoints.type() == CV_32FC1);
15951595

15961596
std::vector< std::vector< Point3f > > obj_points_vector;
1597+
Point3f rightBottomBorder = Point3f(0.f, 0.f, 0.f);
15971598
for (unsigned int i = 0; i < objPoints.total(); i++) {
15981599
std::vector<Point3f> corners;
15991600
Mat corners_mat = objPoints.getMat(i);
@@ -1603,7 +1604,11 @@ Ptr<Board> Board::create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &di
16031604
CV_Assert(corners_mat.total() == 4);
16041605

16051606
for (int j = 0; j < 4; j++) {
1606-
corners.push_back(corners_mat.at<Point3f>(j));
1607+
const Point3f& corner = corners_mat.at<Point3f>(j);
1608+
corners.push_back(corner);
1609+
rightBottomBorder.x = std::max(rightBottomBorder.x, corner.x);
1610+
rightBottomBorder.y = std::max(rightBottomBorder.y, corner.y);
1611+
rightBottomBorder.z = std::max(rightBottomBorder.z, corner.z);
16071612
}
16081613
obj_points_vector.push_back(corners);
16091614
}
@@ -1612,6 +1617,7 @@ Ptr<Board> Board::create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &di
16121617
ids.copyTo(res->ids);
16131618
res->objPoints = obj_points_vector;
16141619
res->dictionary = cv::makePtr<Dictionary>(dictionary);
1620+
res->rightBottomBorder = rightBottomBorder;
16151621
return res;
16161622
}
16171623

@@ -1647,20 +1653,19 @@ Ptr<GridBoard> GridBoard::create(int markersX, int markersY, float markerLength,
16471653
}
16481654

16491655
// calculate Board objPoints
1650-
float maxY = (float)markersY * markerLength + (markersY - 1) * markerSeparation;
16511656
for(int y = 0; y < markersY; y++) {
16521657
for(int x = 0; x < markersX; x++) {
1653-
vector< Point3f > corners;
1654-
corners.resize(4);
1658+
vector<Point3f> corners(4);
16551659
corners[0] = Point3f(x * (markerLength + markerSeparation),
1656-
maxY - y * (markerLength + markerSeparation), 0);
1660+
y * (markerLength + markerSeparation), 0);
16571661
corners[1] = corners[0] + Point3f(markerLength, 0, 0);
1658-
corners[2] = corners[0] + Point3f(markerLength, -markerLength, 0);
1659-
corners[3] = corners[0] + Point3f(0, -markerLength, 0);
1662+
corners[2] = corners[0] + Point3f(markerLength, markerLength, 0);
1663+
corners[3] = corners[0] + Point3f(0, markerLength, 0);
16601664
res->objPoints.push_back(corners);
16611665
}
16621666
}
1663-
1667+
res->rightBottomBorder = Point3f(markersX * markerLength + markerSeparation * (markersX - 1),
1668+
markersY * markerLength + markerSeparation * (markersY - 1), 0.f);
16641669
return res;
16651670
}
16661671

@@ -1712,15 +1717,6 @@ void drawDetectedMarkers(InputOutputArray _image, InputArrayOfArrays _corners,
17121717
}
17131718

17141719

1715-
1716-
/**
1717-
*/
1718-
void drawAxis(InputOutputArray _image, InputArray _cameraMatrix, InputArray _distCoeffs, InputArray _rvec,
1719-
InputArray _tvec, float length)
1720-
{
1721-
drawFrameAxes(_image, _cameraMatrix, _distCoeffs, _rvec, _tvec, length, 3);
1722-
}
1723-
17241720
/**
17251721
*/
17261722
void drawMarker(const Ptr<Dictionary> &dictionary, int id, int sidePixels, OutputArray _img, int borderBits) {
@@ -1785,7 +1781,7 @@ void _drawPlanarBoardImpl(Board *_board, Size outSize, OutputArray _img, int mar
17851781
// move top left to 0, 0
17861782
pf -= Point2f(minX, minY);
17871783
pf.x = pf.x / sizeX * float(out.cols);
1788-
pf.y = (1.0f - pf.y / sizeY) * float(out.rows);
1784+
pf.y = pf.y / sizeY * float(out.rows);
17891785
outCorners[j] = pf;
17901786
}
17911787

modules/aruco/src/charuco.cpp

+14-16
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ the use of this software, even if advised of the possibility of such damage.
4141
#include <opencv2/core.hpp>
4242
#include <opencv2/imgproc.hpp>
4343

44-
4544
namespace cv {
4645
namespace aruco {
4746

@@ -106,7 +105,7 @@ void CharucoBoard::draw(Size outSize, OutputArray _img, int marginSize, int bord
106105

107106
double startX, startY;
108107
startX = squareSizePixels * double(x);
109-
startY = double(chessboardZoneImg.rows) - squareSizePixels * double(y + 1);
108+
startY = squareSizePixels * double(y);
110109

111110
Mat squareZone = chessboardZoneImg.rowRange(int(startY), int(startY + squareSizePixels))
112111
.colRange(int(startX), int(startX + squareSizePixels));
@@ -135,18 +134,17 @@ Ptr<CharucoBoard> CharucoBoard::create(int squaresX, int squaresY, float squareL
135134
float diffSquareMarkerLength = (squareLength - markerLength) / 2;
136135

137136
// calculate Board objPoints
138-
for(int y = squaresY - 1; y >= 0; y--) {
137+
for(int y = 0; y < squaresY; y++) {
139138
for(int x = 0; x < squaresX; x++) {
140139

141140
if(y % 2 == x % 2) continue; // black corner, no marker here
142141

143-
vector< Point3f > corners;
144-
corners.resize(4);
142+
vector<Point3f> corners(4);
145143
corners[0] = Point3f(x * squareLength + diffSquareMarkerLength,
146-
y * squareLength + diffSquareMarkerLength + markerLength, 0);
144+
y * squareLength + diffSquareMarkerLength, 0);
147145
corners[1] = corners[0] + Point3f(markerLength, 0, 0);
148-
corners[2] = corners[0] + Point3f(markerLength, -markerLength, 0);
149-
corners[3] = corners[0] + Point3f(0, -markerLength, 0);
146+
corners[2] = corners[0] + Point3f(markerLength, markerLength, 0);
147+
corners[3] = corners[0] + Point3f(0, markerLength, 0);
150148
res->objPoints.push_back(corners);
151149
// first ids in dictionary
152150
int nextId = (int)res->ids.size();
@@ -164,7 +162,8 @@ Ptr<CharucoBoard> CharucoBoard::create(int squaresX, int squaresY, float squareL
164162
res->chessboardCorners.push_back(corner);
165163
}
166164
}
167-
165+
res->rightBottomBorder = Point3f(squaresX * squareLength,
166+
squaresY * squareLength, 0.f);
168167
res->_getNearestMarkerCorners();
169168

170169
return res;
@@ -701,15 +700,14 @@ double calibrateCameraCharuco(InputArrayOfArrays _charucoCorners, InputArrayOfAr
701700
void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
702701
InputArray _markerIds, float squareMarkerLengthRate,
703702
OutputArrayOfArrays _diamondCorners, OutputArray _diamondIds,
704-
InputArray _cameraMatrix, InputArray _distCoeffs) {
703+
InputArray _cameraMatrix, InputArray _distCoeffs, Ptr<Dictionary> dictionary) {
705704

706705
CV_Assert(_markerIds.total() > 0 && _markerIds.total() == _markerCorners.total());
707706

708707
const float minRepDistanceRate = 1.302455f;
709708

710709
// create Charuco board layout for diamond (3x3 layout)
711-
Ptr<Dictionary> dict = getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME(0));
712-
Ptr<CharucoBoard> _charucoDiamondLayout = CharucoBoard::create(3, 3, squareMarkerLengthRate, 1., dict);
710+
Ptr<CharucoBoard> _charucoDiamondLayout = CharucoBoard::create(3, 3, squareMarkerLengthRate, 1., dictionary);
713711

714712

715713
vector< vector< Point2f > > diamondCorners;
@@ -801,10 +799,10 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
801799
// reorder corners
802800
vector< Point2f > currentMarkerCornersReorder;
803801
currentMarkerCornersReorder.resize(4);
804-
currentMarkerCornersReorder[0] = currentMarkerCorners[2];
805-
currentMarkerCornersReorder[1] = currentMarkerCorners[3];
806-
currentMarkerCornersReorder[2] = currentMarkerCorners[1];
807-
currentMarkerCornersReorder[3] = currentMarkerCorners[0];
802+
currentMarkerCornersReorder[0] = currentMarkerCorners[0];
803+
currentMarkerCornersReorder[1] = currentMarkerCorners[1];
804+
currentMarkerCornersReorder[2] = currentMarkerCorners[3];
805+
currentMarkerCornersReorder[3] = currentMarkerCorners[2];
808806

809807
diamondCorners.push_back(currentMarkerCornersReorder);
810808
diamondIds.push_back(markerId);

0 commit comments

Comments
 (0)