1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-18 17:24:28 +08:00

Board refactoring.

This commit is contained in:
Alexander Smorkalov
2022-12-27 19:53:33 +03:00
parent e2ba6ca3f6
commit 49bdf7b03a
9 changed files with 19 additions and 26 deletions

View File

@@ -154,8 +154,7 @@ int main(int argc, char *argv[]) {
}
// create board object
Ptr<aruco::GridBoard> gridboard =
aruco::GridBoard::create(markersX, markersY, markerLength, markerSeparation, dictionary);
Ptr<aruco::GridBoard> gridboard = new aruco::GridBoard(Size(markersX, markersY), markerLength, markerSeparation, dictionary);
Ptr<aruco::Board> board = gridboard.staticCast<aruco::Board>();
// collected frames for calibration
@@ -176,7 +175,7 @@ int main(int argc, char *argv[]) {
detector.detectMarkers(image, corners, ids, rejected);
// refind strategy to detect more markers
if(refindStrategy) detector.refineDetectedMarkers(image, board, corners, ids, rejected);
if(refindStrategy) detector.refineDetectedMarkers(image, *board, corners, ids, rejected);
// draw results
image.copyTo(imageCopy);