nareshmlx/opencv-pr huggingface dataset:
**File:** modules/objdetect/src/aruco/charuco_detector.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -507,20 +507,27 @@ void drawDetectedCornersCharuco(InputOutputArray _image, InputArray _charucoCorn
                                 InputArray _charucoIds, Scalar cornerColor) {
     CV_Assert(!_image.getMat().empty() &&
               (_image.getMat().channels() == 1 || _image.getMat().channels() == 3));
-    CV_Assert((_charucoCorners.getMat().total() == _charucoIds.getMat().total()) ||
-              _charucoIds.getMat().total() == 0);
-
-    size_t nCorners = _charucoCorners.getMat().total();
+    CV_Assert((_charucoCorners.total() == _charucoIds.total()) ||
+              _charucoIds.total() == 0);
```

Review comment:
then I will remove the limits from all functions (drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds)
**File:** modules/objdetect/src/aruco/charuco_detector.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -507,20 +507,27 @@ void drawDetectedCornersCharuco(InputOutputArray _image, InputArray _charucoCorn
                                 InputArray _charucoIds, Scalar cornerColor) {
     CV_Assert(!_image.getMat().empty() &&
               (_image.getMat().channels() == 1 || _image.getMat().channels() == 3));
-    CV_Assert((_charucoCorners.getMat().total() == _charucoIds.getMat().total()) ||
-              _charucoIds.getMat().total() == 0);
-
-    size_t nCorners = _charucoCorners.getMat().total();
+    CV_Assert((_charucoCorners.total() == _charucoIds.total()) ||
+              _charucoIds.total() == 0);
```

Review comment:
removed getMat()
**File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -1315,24 +1315,26 @@ void drawDetectedMarkers(InputOutputArray _image, InputArrayOfArrays _corners,
     int nMarkers = (int)_corners.total();
     for(int i = 0; i < nMarkers; i++) {
         Mat currentMarker = _corners.getMat(i);
-        CV_Assert(currentMarker.total() == 4 && currentMarker.type() == CV_32FC2);
+        CV_Assert(currentMarker.total() == 4 && currentMarker.channels() == 2);
+        if (currentMarker.type() != CV_32SC2)
+            currentMarker.convertTo(currentMarker, CV_32SC2);
 
         // draw marker sides
```

Review comment:
It makes sense, to check if the input is already `32SC2`. `convertTo` does not check it.
**File:** modules/objdetect/src/aruco/charuco_detector.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -507,20 +507,27 @@ void drawDetectedCornersCharuco(InputOutputArray _image, InputArray _charucoCorn
                                 InputArray _charucoIds, Scalar cornerColor) {
     CV_Assert(!_image.getMat().empty() &&
               (_image.getMat().channels() == 1 || _image.getMat().channels() == 3));
-    CV_Assert((_charucoCorners.getMat().total() == _charucoIds.getMat().total()) ||
-              _charucoIds.getMat().total() == 0);
-
-    size_t nCorners = _charucoCorners.getMat().total();
+    CV_Assert((_charucoCorners.total() == _charucoIds.total()) ||
+              _charucoIds.total() == 0);
```

Review comment:
The same for type check.
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -689,6 +689,58 @@ TEST(Charuco, testmatchImagePoints)
     }
 }
 
+typedef testing::TestWithParam<int> CharucoDraw;
+INSTANTIATE_TEST_CASE_P(/**/, CharucoDraw, testing::Values(CV_8UC2, CV_8SC2, CV_16UC2, CV_16SC2, CV_32SC2, CV_32FC2, CV_64FC2));
+TEST_P(CharucoDraw, testDrawDetected) {
+    vector<vector<Point>> detected_golds = {{Point(20, 20), Point(80, 20), Point(80, 80), Point2f(20, 80)}};
+    Point center_gold = (detected_golds[0][0] + detected_golds[0][1] + detected_golds[0][2] + detected_golds[0][3]) / 4;
+    int type = GetParam();
```

Review comment:
The same test type `Point2d` and `Point2d`. Should it be `2i` in the second case?
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -689,6 +689,58 @@ TEST(Charuco, testmatchImagePoints)
     }
 }
 
+typedef testing::TestWithParam<int> CharucoDraw;
+INSTANTIATE_TEST_CASE_P(/**/, CharucoDraw, testing::Values(CV_8UC2, CV_8SC2, CV_16UC2, CV_16SC2, CV_32SC2, CV_32FC2, CV_64FC2));
+TEST_P(CharucoDraw, testDrawDetected) {
+    vector<vector<Point>> detected_golds = {{Point(20, 20), Point(80, 20), Point(80, 80), Point2f(20, 80)}};
+    Point center_gold = (detected_golds[0][0] + detected_golds[0][1] + detected_golds[0][2] + detected_golds[0][3]) / 4;
+    int type = GetParam();
```

Review comment:
fixed: `vector<vector<Point2i>> detected_int = {{Point(0, 0), Point(10, 0), Point(10, 10), Point(0, 10)}};`
**File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -1315,24 +1315,26 @@ void drawDetectedMarkers(InputOutputArray _image, InputArrayOfArrays _corners,
     int nMarkers = (int)_corners.total();
     for(int i = 0; i < nMarkers; i++) {
         Mat currentMarker = _corners.getMat(i);
-        CV_Assert(currentMarker.total() == 4 && currentMarker.type() == CV_32FC2);
+        CV_Assert(currentMarker.total() == 4 && currentMarker.channels() == 2);
+        if (currentMarker.type() != CV_32SC2)
+            currentMarker.convertTo(currentMarker, CV_32SC2);
 
         // draw marker sides
```

Review comment:
added check: ``` if (currentMarker.type() != CV_32SC2) currentMarker.convertTo(currentMarker, CV_32SC2); ```
**File:** modules/objdetect/src/aruco/charuco_detector.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -507,20 +507,27 @@ void drawDetectedCornersCharuco(InputOutputArray _image, InputArray _charucoCorn
                                 InputArray _charucoIds, Scalar cornerColor) {
     CV_Assert(!_image.getMat().empty() &&
               (_image.getMat().channels() == 1 || _image.getMat().channels() == 3));
-    CV_Assert((_charucoCorners.getMat().total() == _charucoIds.getMat().total()) ||
-              _charucoIds.getMat().total() == 0);
-
-    size_t nCorners = _charucoCorners.getMat().total();
+    CV_Assert((_charucoCorners.total() == _charucoIds.total()) ||
+              _charucoIds.total() == 0);
```

Review comment:
added check: ``` if (currentMarker.type() != CV_32SC2) currentMarker.convertTo(currentMarker, CV_32SC2); ```
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -689,6 +689,58 @@ TEST(Charuco, testmatchImagePoints)
     }
 }
 
+typedef testing::TestWithParam<int> CharucoDraw;
+INSTANTIATE_TEST_CASE_P(/**/, CharucoDraw, testing::Values(CV_8UC2, CV_8SC2, CV_16UC2, CV_16SC2, CV_32SC2, CV_32FC2, CV_64FC2));
+TEST_P(CharucoDraw, testDrawDetected) {
+    vector<vector<Point>> detected_golds = {{Point(20, 20), Point(80, 20), Point(80, 80), Point2f(20, 80)}};
+    Point center_gold = (detected_golds[0][0] + detected_golds[0][1] + detected_golds[0][2] + detected_golds[0][3]) / 4;
+    int type = GetParam();
```

Review comment:
`drawDetectedCornersCharuco` is called for _float, but checked for _int. Also _double version is initialized, but not used.
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #24247: fix type cast in drawDetectedMarkers, drawDetectedCornersCharuco, drawDetectedDiamonds

**Code Changes:**
```diff
@@ -689,6 +689,58 @@ TEST(Charuco, testmatchImagePoints)
     }
 }
 
+typedef testing::TestWithParam<int> CharucoDraw;
+INSTANTIATE_TEST_CASE_P(/**/, CharucoDraw, testing::Values(CV_8UC2, CV_8SC2, CV_16UC2, CV_16SC2, CV_32SC2, CV_32FC2, CV_64FC2));
+TEST_P(CharucoDraw, testDrawDetected) {
+    vector<vector<Point>> detected_golds = {{Point(20, 20), Point(80, 20), Point(80, 80), Point2f(20, 80)}};
+    Point center_gold = (detected_golds[0][0] + detected_golds[0][1] + detected_golds[0][2] + detected_golds[0][3]) / 4;
+    int type = GetParam();
```

Review comment:
detected_int and detected_float are equal, using int will help to avoid rounding errors the "_double" version will be added
**File:** samples/dnn/js_face_recognition.html
**Change Type:** modified
**Context:** PR #24244: Replaced torch7 by onnx model in js_face_recognition dnn sample - Changed face recognition model in js_face_recognition dnn sample: replace...
**Review Line:** 43

**Code Changes:**
```diff
@@ -40,7 +40,7 @@
 
 //! [Get 128 floating points feature vector]
 function face2vec(face) {
-  var blob = cv.blobFromImage(face, 1.0 / 255, {width: 96, height: 96}, [0, 0, 0, 0], true, false)
+  var blob = cv.blobFromImage(face, 1.0, {width: 112, height: 112}, [0, 0, 0, 0], true, false)
   netRecogn.setInput(blob);
   var vec = netRecogn.forward();
   blob.delete();
@@ -71,15 +71,15 @@
   var utils = new Utils('');
```

Review comment:
see https://github.com/opencv/opencv_zoo/blob/main/models/face_recognition_sface/demo.py#L37 https://github.com/opencv/opencv_zoo/blob/main/models/face_recognition_sface/sface.py#L15 https://github.com/opencv/opencv/blob/4.x/modules/objdetect/src/face_recognize.cpp#L45
**File:** samples/dnn/js_face_recognition.html
**Change Type:** modified
**Context:** PR #24244: Replaced torch7 by onnx model in js_face_recognition dnn sample - Changed face recognition model in js_face_recognition dnn sample: replace...

**Code Changes:**
```diff
@@ -40,7 +40,7 @@
 
 //! [Get 128 floating points feature vector]
 function face2vec(face) {
-  var blob = cv.blobFromImage(face, 1.0 / 255, {width: 96, height: 96}, [0, 0, 0, 0], true, false)
+  var blob = cv.blobFromImage(face, 1.0, {width: 112, height: 112}, [0, 0, 0, 0], true, false)
   netRecogn.setInput(blob);
   var vec = netRecogn.forward();
   blob.delete();
@@ -71,15 +71,15 @@
```

Review comment:
`cv.readNet`
**File:** samples/dnn/js_face_recognition.html
**Change Type:** modified
**Context:** PR #24244: Replaced torch7 by onnx model in js_face_recognition dnn sample - Changed face recognition model in js_face_recognition dnn sample: replace...
**Review Line:** 43

**Code Changes:**
```diff
@@ -40,7 +40,7 @@
 
 //! [Get 128 floating points feature vector]
 function face2vec(face) {
-  var blob = cv.blobFromImage(face, 1.0 / 255, {width: 96, height: 96}, [0, 0, 0, 0], true, false)
+  var blob = cv.blobFromImage(face, 1.0, {width: 112, height: 112}, [0, 0, 0, 0], true, false)
   netRecogn.setInput(blob);
   var vec = netRecogn.forward();
   blob.delete();
@@ -71,15 +71,15 @@
   var utils = new Utils('');
```

Review comment:
It makes sense to add reference to the model and parameters as comment to the code.
**File:** modules/dnn/src/dnn_utils.cpp
**Change Type:** modified
**Context:** PR #24128: Fix bug at blobFromImagesWithParams
**Review Line:** 125

**Code Changes:**
```diff
+        }
+        else
+        {
+            CV_LOG_WARNING(NULL, "Red/blue color swapping requires at least three image channels.");
+        }
     }
 
     for (size_t i = 0; i < images.size(); i++)
@@ -126,34 +141,26 @@ void blobFromImagesWithParams(InputArrayOfArrays images_, OutputArray blob_, con
                           size);
                 images[i] = images[i](crop);
```

Review comment:
I propose to add CV_LOG_WARNING for the else case to highlight the issue.
**File:** modules/dnn/src/dnn_utils.cpp
**Change Type:** modified
**Context:** PR #24128: Fix bug at blobFromImagesWithParams

**Code Changes:**
```diff
@@ -5,6 +5,7 @@
 #include "precomp.hpp"
 
 #include <opencv2/imgproc.hpp>
+#include <opencv2/core/utils/logger.hpp>
 
 
 namespace cv {
@@ -100,13 +101,27 @@ void blobFromImagesWithParams(InputArrayOfArrays images_, OutputArray blob_, con
     images_.getMatVector(images);
```

Review comment:
I propose to revert `param.mean` here. In case if assert user should see function parameter name, but not some internal variable,
**File:** modules/dnn/src/dnn_utils.cpp
**Change Type:** modified
**Context:** PR #24128: Fix bug at blobFromImagesWithParams

**Code Changes:**
```diff
@@ -5,6 +5,7 @@
 #include "precomp.hpp"
 
 #include <opencv2/imgproc.hpp>
+#include <opencv2/core/utils/logger.hpp>
 
 
 namespace cv {
@@ -100,13 +101,27 @@ void blobFromImagesWithParams(InputArrayOfArrays images_, OutputArray blob_, con
     images_.getMatVector(images);
```

Review comment:
We used this for consistency with the `scalefactor` check. If `param.mean` should be used, we should also use `param.scalefactor`, making both checks more explicit. Or what do you think?
**File:** modules/dnn/src/dnn_utils.cpp
**Change Type:** modified
**Context:** PR #24128: Fix bug at blobFromImagesWithParams
**Review Line:** 125

**Code Changes:**
```diff
+        }
+        else
+        {
+            CV_LOG_WARNING(NULL, "Red/blue color swapping requires at least three image channels.");
+        }
     }
 
     for (size_t i = 0; i < images.size(); i++)
@@ -126,34 +141,26 @@ void blobFromImagesWithParams(InputArrayOfArrays images_, OutputArray blob_, con
                           size);
                 images[i] = images[i](crop);
```

Review comment:
What do you think about that? ``` if (param.swapRB) { if (nch > 2) { std::swap(mean[0], mean[2]); std::swap(scalefactor[0], scalefactor[2]); } else { CV_LOG_WARNING(NULL, "Red/blue color swapping requires at least three image channels."); } } ```
**File:** modules/dnn/src/dnn_utils.cpp
**Change Type:** modified
**Context:** PR #24128: Fix bug at blobFromImagesWithParams

**Code Changes:**
```diff
@@ -5,6 +5,7 @@
 #include "precomp.hpp"
 
 #include <opencv2/imgproc.hpp>
+#include <opencv2/core/utils/logger.hpp>
 
 
 namespace cv {
@@ -100,13 +101,27 @@ void blobFromImagesWithParams(InputArrayOfArrays images_, OutputArray blob_, con
     images_.getMatVector(images);
```

Review comment:
you are right, both checks.
**File:** modules/objdetect/test/test_boarddetection.cpp
**Change Type:** modified
**Context:** PR #24228: fix extendDictionary

**Code Changes:**
```diff
@@ -318,4 +318,12 @@ TEST(CV_ArucoGenerateBoard, regression_1226) {
     });
 }
 
+TEST(CV_ArucoDictionary, extendDictionary) {
+    aruco::Dictionary base_dictionary = aruco::getPredefinedDictionary(aruco::DICT_4X4_250);
+    aruco::Dictionary custom_dictionary = aruco::extendDictionary(150, 4, base_dictionary);
+
+    ASSERT_EQ(custom_dictionary.bytesList.rows, 150);
+    ASSERT_EQ(cv::norm(custom_dictionary.bytesList, base_dictionary.bytesList.rowRange(0, 150)), 0.);
```

Review comment:
The assertion does not make sense. It's constant in OpenCV with known size.
**File:** modules/objdetect/test/test_boarddetection.cpp
**Change Type:** modified
**Context:** PR #24228: fix extendDictionary
**Review Line:** 325

**Code Changes:**
```diff
 
+TEST(CV_ArucoDictionary, extendDictionary) {
+    aruco::Dictionary base_dictionary = aruco::getPredefinedDictionary(aruco::DICT_4X4_250);
+    aruco::Dictionary custom_dictionary = aruco::extendDictionary(150, 4, base_dictionary);
+
+    ASSERT_EQ(custom_dictionary.bytesList.rows, 150);
+    ASSERT_EQ(cv::norm(custom_dictionary.bytesList, base_dictionary.bytesList.rowRange(0, 150)), 0.);
+}
+
 }} // namespace
```

Review comment:
It makes sense to check content of the new dictionary, as soon as it's subset of the original object.
**File:** modules/objdetect/test/test_boarddetection.cpp
**Change Type:** modified
**Context:** PR #24228: fix extendDictionary
**Review Line:** 325

**Code Changes:**
```diff
 
+TEST(CV_ArucoDictionary, extendDictionary) {
+    aruco::Dictionary base_dictionary = aruco::getPredefinedDictionary(aruco::DICT_4X4_250);
+    aruco::Dictionary custom_dictionary = aruco::extendDictionary(150, 4, base_dictionary);
+
+    ASSERT_EQ(custom_dictionary.bytesList.rows, 150);
+    ASSERT_EQ(cv::norm(custom_dictionary.bytesList, base_dictionary.bytesList.rowRange(0, 150)), 0.);
+}
+
 }} // namespace
```

Review comment:
added check
**File:** modules/imgproc/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24254: (5.x) Merge 4.x - OpenCV Contrib: [#3559](https://github.com/opencv/opencv_contrib/pull/3559) OpenCV Extra: [#1093](https://github.com/open...
**Review Line:** 15

**Code Changes:**
```diff
@@ -14,10 +14,12 @@ ocv_define_module(imgproc opencv_core WRAP java objc python js)
 
 ocv_module_include_directories(opencv_imgproc ${ZLIB_INCLUDE_DIRS})
 
-ocv_check_environment_variables(OPENCV_IPP_GAUSSIAN_BLUR)
-option(OPENCV_IPP_GAUSSIAN_BLUR "Enable IPP optimizations for GaussianBlur (+8Mb in binary size)" OFF)
-if(OPENCV_IPP_GAUSSIAN_BLUR)
-  ocv_append_source_file_compile_definitions(${CMAKE_CURRENT_SOURCE_DIR}/src/smooth.dispatch.cpp "ENABLE_IPP_GAUSSIAN_BLUR=1")
```

Review comment:
> ocv_module_include_directories Wrong removal here.
**File:** modules/core/src/convert.hpp
**Change Type:** modified
**Context:** PR #24254: (5.x) Merge 4.x - OpenCV Contrib: [#3559](https://github.com/opencv/opencv_contrib/pull/3559) OpenCV Extra: [#1093](https://github.com/open...
**Review Line:** 14

**Code Changes:**
```diff
@@ -11,7 +11,7 @@
 namespace cv
 {
 
-#if CV_SIMD
+#if (CV_SIMD || CV_SIMD_SCALABLE)
 
 static inline void vx_load_as(const uchar* ptr, v_float32& a)
 { a = v_cvt_f32(v_reinterpret_as_s32(vx_load_expand_q(ptr))); }
@@ -78,7 +78,7 @@ static inline void v_store_as(int64_t* ptr, const v_float32& a)
     v_int64 ia_0, ia_1;
```

Review comment:
I've fixed the compilation, but this merge still can not be built because of incompatible code being added in 5.x (uses operators with intrinsics, for example `vx_load_as` in this `#if` block). It means either separate pass with refactoring tool is needed or manual adaptation of the code.
**File:** modules/calib3d/src/usac/essential_solver.cpp
**Change Type:** modified
**Context:** PR #24211: Fix "use after free" issue in `essential_solver.cpp` - The address sanitizer highlighted this issue in our code base. It looks like the cod...
**Review Line:** 243

**Code Changes:**
```diff
             // (5) Compute the left eigenvectors of the action matrix
             Eigen::EigenSolver<Eigen::Matrix<double, 10, 10>> eigensolver(action_mat_eig);
             const Eigen::VectorXcd &eigenvalues = eigensolver.eigenvalues();
-            const auto * const eig_vecs_ = (double *) eigensolver.eigenvectors().real().data();
+            const Eigen::MatrixXcd eigenvectors = eigensolver.eigenvectors();
+            const auto * const eig_vecs_ = (double *) eigenvectors.data();
 #else
             Matx<double, 10, 10> A = constraint_mat.colRange(0, 10),
                              B = constraint_mat.colRange(10, 20), eliminated_mat;
```

Review comment:
I think dropping the `.real()` call is safe because of the code below (line 277): ```cpp const int eig_i = 20 * i + 12; // eigen stores imaginary values too ``` The code appears to expect to have to skip doubles for the imaginary parts of the complex numbers. Admittedly, I couldn't find a test case that exercised this code path to validate correctness.
**File:** modules/calib3d/src/usac/essential_solver.cpp
**Change Type:** modified
**Context:** PR #24211: Fix "use after free" issue in `essential_solver.cpp` - The address sanitizer highlighted this issue in our code base. It looks like the cod...
**Review Line:** 243

**Code Changes:**
```diff
             // (5) Compute the left eigenvectors of the action matrix
             Eigen::EigenSolver<Eigen::Matrix<double, 10, 10>> eigensolver(action_mat_eig);
             const Eigen::VectorXcd &eigenvalues = eigensolver.eigenvalues();
-            const auto * const eig_vecs_ = (double *) eigensolver.eigenvectors().real().data();
+            const Eigen::MatrixXcd eigenvectors = eigensolver.eigenvectors();
+            const auto * const eig_vecs_ = (double *) eigenvectors.data();
 #else
             Matx<double, 10, 10> A = constraint_mat.colRange(0, 10),
                              B = constraint_mat.colRange(10, 20), eliminated_mat;
```

Review comment:
Call this out in the commit/PR message/description so it's obvious that it is intentional to future sleuths?
**File:** modules/calib3d/src/usac/essential_solver.cpp
**Change Type:** modified
**Context:** PR #24211: Fix "use after free" issue in `essential_solver.cpp` - The address sanitizer highlighted this issue in our code base. It looks like the cod...
**Review Line:** 243

**Code Changes:**
```diff
             // (5) Compute the left eigenvectors of the action matrix
             Eigen::EigenSolver<Eigen::Matrix<double, 10, 10>> eigensolver(action_mat_eig);
             const Eigen::VectorXcd &eigenvalues = eigensolver.eigenvalues();
-            const auto * const eig_vecs_ = (double *) eigensolver.eigenvectors().real().data();
+            const Eigen::MatrixXcd eigenvectors = eigensolver.eigenvectors();
+            const auto * const eig_vecs_ = (double *) eigenvectors.data();
 #else
             Matx<double, 10, 10> A = constraint_mat.colRange(0, 10),
                              B = constraint_mat.colRange(10, 20), eliminated_mat;
```

Review comment:
Good idea. Done.
**File:** modules/objdetect/src/aruco/aruco_detector.cpp
**Change Type:** modified
**Context:** PR #24139: fix refineDetectedMarkers
**Review Line:** 1003

**Code Changes:**
```diff
@@ -1000,7 +1000,13 @@ static inline void _projectUndetectedMarkers(const Board &board, InputOutputArra
                                              OutputArray undetectedMarkersIds) {
     Mat rvec, tvec; // first estimate board pose with the current avaible markers
     Mat objPoints, imgPoints; // object and image points for the solvePnP function
-    board.matchImagePoints(detectedCorners, detectedIds, objPoints, imgPoints);
+    // To refine corners of ArUco markers the function refineDetectedMarkers() find an aruco markers pose from 3D-2D point correspondences.
+    // To find 3D-2D point correspondences uses matchImagePoints().
+    // The method matchImagePoints() works with ArUco corners (in Board/GridBoard cases) or with ChArUco corners (in CharucoBoard case).
+    // To refine corners of ArUco markers we need work with ArUco corners only in all boards.
+    // To call matchImagePoints() with ArUco corners for all boards we need to call matchImagePoints() from base class Board.
+    // The method matchImagePoints() implemented in Pimpl and we need to create temp Board object to call the base method.
```

Review comment:
Why does it change the function behaviour?