diff --git a/modules/aruco/samples/calibrate_camera.cpp b/modules/aruco/samples/calibrate_camera.cpp index 2fd231052..ff0ce70c0 100644 --- a/modules/aruco/samples/calibrate_camera.cpp +++ b/modules/aruco/samples/calibrate_camera.cpp @@ -1,3 +1,7 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html + #include #include #include @@ -116,10 +120,7 @@ int main(int argc, char *argv[]) { } // Create board object - Ptr gridboard = new aruco::GridBoard( - Size(markersX, markersY), markerLength, markerSeparation, dictionary - ); - Ptr board = gridboard.staticCast(); + aruco::GridBoard gridboard(Size(markersX, markersY), markerLength, markerSeparation, dictionary); // Collected frames for calibration vector>> allMarkerCorners; @@ -141,7 +142,7 @@ int main(int argc, char *argv[]) { // Refind strategy to detect more markers if(refindStrategy) { detector.refineDetectedMarkers( - image, *board, markerCorners, markerIds, rejectedMarkers + image, gridboard, markerCorners, markerIds, rejectedMarkers ); } @@ -194,7 +195,7 @@ int main(int argc, char *argv[]) { for(size_t frame = 0; frame < nFrames; frame++) { Mat currentImgPoints, currentObjPoints; - board->matchImagePoints( + gridboard.matchImagePoints( allMarkerCorners[frame], allMarkerIds[frame], currentObjPoints, currentImgPoints ); diff --git a/modules/aruco/samples/calibrate_camera_charuco.cpp b/modules/aruco/samples/calibrate_camera_charuco.cpp index 109cfa711..d0ca3286a 100644 --- a/modules/aruco/samples/calibrate_camera_charuco.cpp +++ b/modules/aruco/samples/calibrate_camera_charuco.cpp @@ -1,3 +1,7 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html + #include #include #include