diff --git a/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp b/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp index 017669975b..fbc864076a 100644 --- a/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp +++ b/modules/objdetect/include/opencv2/objdetect/aruco_detector.hpp @@ -327,11 +327,11 @@ public: * @param ids vector of identifiers of the detected markers. The identifier is of type int * (e.g. std::vector). For N detected markers, the size of ids is also N. * The identifiers have the same order than the markers in the imgPoints array. - * @param rejectedImgPoints contains the imgPoints of those squares whose inner code has not a - * correct codification. Useful for debugging purposes. * @param markersUnc contains the normalized uncertainty [0;1] of the markers' detection, * defined as percentage of incorrect pixel detections, with 0 describing a pixel perfect detection. * The uncertainties are of type float (e.g. std::vector) + * @param rejectedImgPoints contains the imgPoints of those squares whose inner code has not a + * correct codification. Useful for debugging purposes. * * Performs marker detection in the input image. Only markers included in the first specified dictionary * are searched. For each detected marker, it returns the 2D position of its corner in the image @@ -341,8 +341,8 @@ public: * input image with corresponding camera model, if camera parameters are known * @sa undistort, estimatePoseSingleMarkers, estimatePoseBoard */ - CV_WRAP void detectMarkersWithUnc(InputArray image, OutputArrayOfArrays corners, OutputArray ids, - OutputArrayOfArrays rejectedImgPoints = noArray(), OutputArray markersUnc = noArray()) const; + CV_WRAP void detectMarkersWithUnc(InputArray image, OutputArrayOfArrays corners, OutputArray ids, OutputArray markersUnc, + OutputArrayOfArrays rejectedImgPoints = noArray()) const; /** @brief Refine not detected markers based on the already detected and the board layout * diff --git a/modules/objdetect/src/aruco/aruco_detector.cpp b/modules/objdetect/src/aruco/aruco_detector.cpp index 194643e4b4..97ea8dd351 100644 --- a/modules/objdetect/src/aruco/aruco_detector.cpp +++ b/modules/objdetect/src/aruco/aruco_detector.cpp @@ -1174,8 +1174,8 @@ ArucoDetector::ArucoDetector(const vector &_dictionaries, arucoDetectorImpl = makePtr(_dictionaries, _detectorParams, _refineParams); } -void ArucoDetector::detectMarkersWithUnc(InputArray _image, OutputArrayOfArrays _corners, OutputArray _ids, - OutputArrayOfArrays _rejectedImgPoints, OutputArray _markersUnc) const { +void ArucoDetector::detectMarkersWithUnc(InputArray _image, OutputArrayOfArrays _corners, OutputArray _ids, OutputArray _markersUnc, + OutputArrayOfArrays _rejectedImgPoints) const { arucoDetectorImpl->detectMarkers(_image, _corners, _ids, _rejectedImgPoints, noArray(), _markersUnc, DictionaryMode::Single); } diff --git a/modules/objdetect/test/test_arucodetection.cpp b/modules/objdetect/test/test_arucodetection.cpp index 8f21add18b..8542ca9063 100644 --- a/modules/objdetect/test/test_arucodetection.cpp +++ b/modules/objdetect/test/test_arucodetection.cpp @@ -539,7 +539,7 @@ void CV_ArucoDetectionUnc::run(int) { vector> corners, rejected; vector ids; vector markerUnc; - detector.detectMarkersWithUnc(img, corners, ids, rejected, markerUnc); + detector.detectMarkersWithUnc(img, corners, ids, markerUnc, rejected); // Verify that every marker is detected and its uncertainty is within tolerance. for (size_t m = 0; m < groundTruthIds.size(); m++) {