nareshmlx/opencv-pr huggingface dataset:
**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:
The issue #24127 uses `CharucoBoard` and ChArUco board call `matchImagePoints` for charuco corners, but to refine ArUco markers we need to call `matchImagePoints` for ArUco corners. The method `matchImagePoints` implemented in Pimpl and we need to create `Board` object. `refineDetectedMarkers` must always call `matchImagePoints` from the base class `Board`.
**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:
It should be added to the implementation as comment.
**File:** modules/dnn/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24218: Added CMake configuration OPENCV_DNN_BACKEND_DEFAULT
**Review Line:** 230

**Code Changes:**
```diff
@@ -227,6 +227,9 @@ if(TARGET ocv.3rdparty.openvino AND OPENCV_DNN_OPENVINO)
   endif()
 endif()
 
+set(OPENCV_DNN_BACKEND_DEFAULT "DNN_BACKEND_OPENCV" CACHE STRING "Default backend used by the DNN module")
+ocv_append_source_file_compile_definitions("${CMAKE_CURRENT_LIST_DIR}/src/dnn_params.cpp" "OPENCV_DNN_BACKEND_DEFAULT=${OPENCV_DNN_BACKEND_DEFAULT}")
+
 
 ocv_install_used_external_targets(${libs} ${dnn_runtime_libs})
 
```

Review comment:
BTW, It makes sense to dump this value to CMake status too (to show through `cv::getBuildInformation()`)
**File:** modules/dnn/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24218: Added CMake configuration OPENCV_DNN_BACKEND_DEFAULT
**Review Line:** 230

**Code Changes:**
```diff
@@ -227,6 +227,9 @@ if(TARGET ocv.3rdparty.openvino AND OPENCV_DNN_OPENVINO)
   endif()
 endif()
 
+set(OPENCV_DNN_BACKEND_DEFAULT "DNN_BACKEND_OPENCV" CACHE STRING "Default backend used by the DNN module")
+ocv_append_source_file_compile_definitions("${CMAKE_CURRENT_LIST_DIR}/src/dnn_params.cpp" "OPENCV_DNN_BACKEND_DEFAULT=${OPENCV_DNN_BACKEND_DEFAULT}")
+
 
 ocv_install_used_external_targets(${libs} ${dnn_runtime_libs})
 
```

Review comment:
As far as we know, `cv::getBuildInformation()` prints the content of the `version_string.inc` file. What's the correct way to add further content to it? Is there a predefined CMake macro for this? Thereafter, we will fix this, too 👍
**File:** modules/dnn/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24218: Added CMake configuration OPENCV_DNN_BACKEND_DEFAULT
**Review Line:** 230

**Code Changes:**
```diff
@@ -227,6 +227,9 @@ if(TARGET ocv.3rdparty.openvino AND OPENCV_DNN_OPENVINO)
   endif()
 endif()
 
+set(OPENCV_DNN_BACKEND_DEFAULT "DNN_BACKEND_OPENCV" CACHE STRING "Default backend used by the DNN module")
+ocv_append_source_file_compile_definitions("${CMAKE_CURRENT_LIST_DIR}/src/dnn_params.cpp" "OPENCV_DNN_BACKEND_DEFAULT=${OPENCV_DNN_BACKEND_DEFAULT}")
+
 
 ocv_install_used_external_targets(${libs} ${dnn_runtime_libs})
 
```

Review comment:
Yes, there is a `status` macro: https://github.com/opencv/opencv/blob/114c23e41108a68a6dce5ec9ab8a900bccc47637/cmake/OpenCVUtils.cmake#L987-L993
**File:** modules/dnn/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24218: Added CMake configuration OPENCV_DNN_BACKEND_DEFAULT
**Review Line:** 230

**Code Changes:**
```diff
@@ -227,6 +227,9 @@ if(TARGET ocv.3rdparty.openvino AND OPENCV_DNN_OPENVINO)
   endif()
 endif()
 
+set(OPENCV_DNN_BACKEND_DEFAULT "DNN_BACKEND_OPENCV" CACHE STRING "Default backend used by the DNN module")
+ocv_append_source_file_compile_definitions("${CMAKE_CURRENT_LIST_DIR}/src/dnn_params.cpp" "OPENCV_DNN_BACKEND_DEFAULT=${OPENCV_DNN_BACKEND_DEFAULT}")
+
 
 ocv_install_used_external_targets(${libs} ${dnn_runtime_libs})
 
```

Review comment:
There is no section for _dnn_ module yet, so I believe it can be added at the end of "Other libraries" section: https://github.com/opencv/opencv/blob/114c23e41108a68a6dce5ec9ab8a900bccc47637/CMakeLists.txt#L1768-L1774 Alternatively you can use `CUSTOM_STATUS` mechanism to add line to status directly from `dnn/CMakeLists.txt`: https://github.com/opencv/opencv/blob/114c23e41108a68a6dce5ec9ab8a900bccc47637/CMakeLists.txt#L1683-L1689
**File:** modules/videoio/src/cap_mjpeg_encoder.cpp
**Change Type:** modified
**Context:** PR #24209: Fixed bug with the last 4 bytes in MJPEG encoder - resolves #19634 resolves #24171 Enabled parallel processing, that was temporary disabled...
**Review Line:** 271

**Code Changes:**
```diff
@@ -268,7 +268,7 @@ class mjpeg_buffer_keeper
             m_buffer_list[0].finish();
 
             m_data_len = m_buffer_list[0].get_len();
-            m_last_bit_len = m_buffer_list[0].get_bits_free() ? 32 - m_buffer_list[0].get_bits_free() : 0;
+            m_last_bit_len = 32 - m_buffer_list[0].get_bits_free();
 
             return m_buffer_list[0].get_data();
         }
@@ -331,9 +331,14 @@ class mjpeg_buffer_keeper
         }
```

Review comment:
see https://github.com/opencv/opencv/blob/b3c896370cb6b61f9a45a1fa4dc2483a50d3097d/modules/videoio/src/cap_mjpeg_encoder.cpp#L192
**File:** modules/videoio/src/cap_mjpeg_encoder.cpp
**Change Type:** modified
**Context:** PR #24209: Fixed bug with the last 4 bytes in MJPEG encoder - resolves #19634 resolves #24171 Enabled parallel processing, that was temporary disabled...
**Review Line:** 1170

**Code Changes:**
```diff
@@ -268,7 +268,7 @@ class mjpeg_buffer_keeper
             m_buffer_list[0].finish();
 
             m_data_len = m_buffer_list[0].get_len();
-            m_last_bit_len = m_buffer_list[0].get_bits_free() ? 32 - m_buffer_list[0].get_bits_free() : 0;
+            m_last_bit_len = 32 - m_buffer_list[0].get_bits_free();
 
             return m_buffer_list[0].get_data();
         }
@@ -331,9 +331,14 @@ class mjpeg_buffer_keeper
         }
 
         //bits == 0 means that last element shouldn't be used.
-        m_output_buffer[m_data_len++] = currval;
-
```

Review comment:
let's remove the guard as it's not needed.
**File:** modules/videoio/src/cap_mjpeg_encoder.cpp
**Change Type:** modified
**Context:** PR #24209: Fixed bug with the last 4 bytes in MJPEG encoder - resolves #19634 resolves #24171 Enabled parallel processing, that was temporary disabled...
**Review Line:** 271

**Code Changes:**
```diff
@@ -268,7 +268,7 @@ class mjpeg_buffer_keeper
             m_buffer_list[0].finish();
 
             m_data_len = m_buffer_list[0].get_len();
-            m_last_bit_len = m_buffer_list[0].get_bits_free() ? 32 - m_buffer_list[0].get_bits_free() : 0;
+            m_last_bit_len = 32 - m_buffer_list[0].get_bits_free();
 
             return m_buffer_list[0].get_data();
         }
@@ -331,9 +331,14 @@ class mjpeg_buffer_keeper
         }
```

Review comment:
if you call mjpeg_buffer::finish() than mjpeg_buffer::get_len() returns the number of occupied integers and mjpeg_buffer::get_bits_free() returns the number of free bits in the last integer (from 0 to 31)
**File:** modules/videoio/src/cap_mjpeg_encoder.cpp
**Change Type:** modified
**Context:** PR #24209: Fixed bug with the last 4 bytes in MJPEG encoder - resolves #19634 resolves #24171 Enabled parallel processing, that was temporary disabled...
**Review Line:** 334

**Code Changes:**
```diff
 
         //bits == 0 means that last element shouldn't be used.
-        m_output_buffer[m_data_len++] = currval;
-
-        m_last_bit_len = -bits;
+        if (bits != 0) {
+            m_output_buffer[m_data_len++] = currval;
+            m_last_bit_len = -bits;
+        }
+        else
+        {
```

Review comment:
If bits != 0 than currval contains some useful bits. We need to increase m_data_len and add the bits to the last item of m_output_buffer. If bits == 0 than currval doesn't contain useful bits
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #24216: Minor optimization of two lines intersection
**Review Line:** 77

**Code Changes:**
```diff
-                              ((a1.x * a2.y  -  a1.y * a2.x) * (b1.y - b2.y) -
-                               (b1.x * b2.y  -  b1.y * b2.x) * (a1.y - a2.y)) /
-                               divisor
-                              );
-    return result_square_angle;
+    const float u = ((b2.x - a2.x) * (b1.y - b2.y) + (b1.x - b2.x) * (a2.y - b2.y)) / divisor;
+    return a2 + u * (a1 - a2);
 }
 
 //      / | b
```

Review comment:
Please add original formulae as comment or some description how the solution with `u` was synthetized. It's not obvious for the code readers.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
`estimateBoardPose` is more logical.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
`estimatePoseSingleMarker` without s as it's the only one.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
The function should stay in contrib as soon as there is Board::draw method in the new api.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
We should not have `_` + uppercase letter in identifiers of public headers. See #7288 for details.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
M.b `getRightBottomCorner`?
**File:** modules/objdetect/include/opencv2/objdetect/aruco_dictionary.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,151 @@
+// 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
+#ifndef OPENCV_OBJDETECT_DICTIONARY_HPP
+#define OPENCV_OBJDETECT_DICTIONARY_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
why such an alias "custom_dictionary" is used? And the same question is about "custom_dictionary_from" below
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
Underscore prefixes are not allowed in public headers. Issue: [#7288](https://github.com/opencv/opencv/issues/7288)
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
It makes sense to avoid adding of unnecessary includes (which are dependencies).
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
missing empty line between functions
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository
**Review Line:** 68

**Code Changes:**
```diff
+    CV_WRAP const std::vector<std::vector<Point3f> >& getObjPoints() const;
+
+    /** @brief vector of the identifiers of the markers in the board (should be the same size as objPoints)
+     * @return vector of the identifiers of the markers
+     */
+    CV_WRAP const std::vector<int>& getIds() const;
+
+    /** @brief get coordinate of the bottom right corner of the board, is set when calling the function create()
+     */
+    CV_WRAP const Point3f& getRightBottomCorner() const;
+
```

Review comment:
Why it is not OutputArray? (see `.setIds()`)
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
Could `.setDictionary()` call break instance? (make it inconsistent due to missing `.setIds()` call) P.S. We don't need API which allows to "shoot legs".
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
the similar note about consistency.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
It is a public API. We should not have these internals exposed (no idea how `CV_PROP` even works here).
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
We have `.create()` static method below. Why do we really need public default ctor here? How it could be used?
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
malformed docs - brief section should be single sentence only.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
The same note about exposing of internals. API should not allow to make instance inconsistent (in uncontrolled way). This approach is approved for `...Parameters` classes only. P.S. There was the same note about another class previously...
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
Documentation is broken. Main repository should not refer on opencv_contrib resources. (check CI instructions update)
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
PatternPositionType
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
reduce calib3d from aruco_board.hpp
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** added
**Context:** PR #22368: move aruco from contrib to objdetect in main repository

**Code Changes:**
```diff
@@ -0,0 +1,234 @@
+// 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
+#ifndef OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+#define OPENCV_OBJDETECT_ARUCO_BOARD_HPP
+
+#include <opencv2/core.hpp>
+
+namespace cv {
```

Review comment:
now fields are protected added getters