nareshmlx/opencv-pr huggingface dataset:
**File:** modules/gapi/src/api/gmat.cpp
**Change Type:** modified
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 167

**Code Changes:**
```diff
+    } else {
+        os << "C" << desc.chan;
+        if (desc.planar) os << "p";
+        os << " ";
+        os << desc.size.width << "x" << desc.size.height;
+    }
 
     return os;
 }
```

Review comment:
Won't it break our serialization? Is there a `>>` operator?
**File:** modules/gapi/src/backends/ov/bindings_ov.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 29

**Code Changes:**
```diff
+cv::util::any cv::gapi::ov::PyParams::params() const {
+    return m_priv->params();
+}
+
+cv::gapi::ov::PyParams&
+cv::gapi::ov::PyParams::cfgPluginConfig(
+        const std::map<std::string, std::string> &config) {
+    m_priv->cfgPluginConfig(config);
+    return *this;
+}
+
```

Review comment:
Why don't we have both general params and generic ones?
**File:** modules/gapi/src/backends/ov/util.hpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 29

**Code Changes:**
```diff
+namespace util {
+
+// NB: These functions are EXPORTed to make them accessible by the
+// test suite only.
+GAPI_EXPORTS std::vector<int> to_ocv(const ::ov::Shape &shape);
+GAPI_EXPORTS int to_ocv(const ::ov::element::Type &type);
+
+}}}}
+
+#endif // HAVE_INF_ENGINE
+
```

Review comment:
I suggest implementing those in `utils.cpp` or hiding if it's not being used outside
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 95

**Code Changes:**
```diff
+static int toCV(const ov::element::Type &type) {
+    switch (type) {
+        case ov::element::u8:  return CV_8U;
+        case ov::element::f32: return CV_32F;
+        case ov::element::i32: return CV_32S;
+        case ov::element::i64: return CV_32S;
+        case ov::element::f16: return CV_16F;
+        default: GAPI_Error("OV Backend: Unsupported data type");
+    }
+    return -1;
+}
```

Review comment:
Done where?
**File:** modules/gapi/src/backends/common/gbackend.hpp
**Change Type:** modified
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 227

**Code Changes:**
```diff
@@ -227,6 +227,12 @@ inline void convertInt64ToInt32(const int64_t* src, int* dst, size_t size)
                    [](int64_t el) { return static_cast<int>(el); });
 }
 
+inline void convertInt32ToInt64(const int* src, int64_t* dst, size_t size)
+{
+    std::transform(src, src + size, dst,
```

Review comment:
Suggesting `int32_t` here2, just in case
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend

**Code Changes:**
```diff
@@ -0,0 +1,1001 @@
+// 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.
+//
+// Copyright (C) 2023 Intel Corporation
+
+#include "precomp.hpp"
+
+// needs to be included regardless if IE is present or not
```

Review comment:
I'd remove it from here
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend

**Code Changes:**
```diff
@@ -0,0 +1,1001 @@
+// 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.
+//
+// Copyright (C) 2023 Intel Corporation
+
+#include "precomp.hpp"
+
+// needs to be included regardless if IE is present or not
```

Review comment:
I'd remove it for now
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 454

**Code Changes:**
```diff
+        m_request.start_async();
+    } catch (...) {
+        m_request.set_callback([](std::exception_ptr){});
+        m_notify();
+        throw;
+    }
+}
+
+void AsyncInferExecutor::callback(IInferExecutor::Task task,
+                                  ::ov::InferRequest   request,
+                                  std::exception_ptr   eptr) noexcept {
```

Review comment:
Do we notify in the end?
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 512

**Code Changes:**
```diff
+    }
+}
+
+IInferExecutor::Ptr cv::gimpl::ov::RequestPool::getIdleRequest() {
+    size_t id = 0u;
+    m_idle_ids.pop(id);
+    return m_requests[id];
+}
+
+// NB: Not thread-safe.
+void cv::gimpl::ov::RequestPool::waitAll() {
```

Review comment:
Where do we set those to `0`?
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 602

**Code Changes:**
```diff
+static bool isImage(const cv::GMatDesc &desc,
+                    const ::ov::Shape  &model_shape) {
+    return (model_shape.size() == 4u)                      &&
+           (!desc.isND())  /* dims == 2 */                 &&
+           (desc.chan == 1 || desc.chan == 3)              &&
+           (desc.size.height != 1 && desc.size.width != 1) &&
+           (desc.depth == CV_8U);
+}
+
+struct Infer: public cv::detail::KernelTag {
+    using API = cv::GInferBase;
```

Review comment:
Btw do you remember if we might have any non-1 dims in some of our cases which are still tensors? (e.g. 2, 3, other small numbers which are definitely are not images)
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 599

**Code Changes:**
```diff
+    return cv::util::make_optional(std::move(it->second));
+}
+
+static bool isImage(const cv::GMatDesc &desc,
+                    const ::ov::Shape  &model_shape) {
+    return (model_shape.size() == 4u)                      &&
+           (!desc.isND())  /* dims == 2 */                 &&
+           (desc.chan == 1 || desc.chan == 3)              &&
+           (desc.size.height != 1 && desc.size.width != 1) &&
+           (desc.depth == CV_8U);
+}
```

Review comment:
Could it be 3? Let's say if users/opencv doesn't provide N somehow?
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend

**Code Changes:**
```diff
@@ -0,0 +1,1001 @@
+// 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.
+//
+// Copyright (C) 2023 Intel Corporation
+
+#include "precomp.hpp"
+
+// needs to be included regardless if IE is present or not
```

Review comment:
You can combine those 2 `if`s
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend

**Code Changes:**
```diff
@@ -0,0 +1,1001 @@
+// 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.
+//
+// Copyright (C) 2023 Intel Corporation
+
+#include "precomp.hpp"
+
+// needs to be included regardless if IE is present or not
```

Review comment:
Please document that in our doc and/or code
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend

**Code Changes:**
```diff
@@ -0,0 +1,1001 @@
+// 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.
+//
+// Copyright (C) 2023 Intel Corporation
+
+#include "precomp.hpp"
+
+// needs to be included regardless if IE is present or not
```

Review comment:
Could you please add some debug messages here other that throws? I mean what we assume in which case
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend

**Code Changes:**
```diff
@@ -0,0 +1,1001 @@
+// 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.
+//
+// Copyright (C) 2023 Intel Corporation
+
+#include "precomp.hpp"
+
+// needs to be included regardless if IE is present or not
```

Review comment:
Here = part with image/tensor logic. Messages = at least comments you put here
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 95

**Code Changes:**
```diff
+static int toCV(const ov::element::Type &type) {
+    switch (type) {
+        case ov::element::u8:  return CV_8U;
+        case ov::element::f32: return CV_32F;
+        case ov::element::i32: return CV_32S;
+        case ov::element::i64: return CV_32S;
+        case ov::element::f16: return CV_16F;
+        default: GAPI_Error("OV Backend: Unsupported data type");
+    }
+    return -1;
+}
```

Review comment:
below, `copyToOV` and `copyFromOV`
**File:** modules/gapi/src/api/gmat.cpp
**Change Type:** modified
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 167

**Code Changes:**
```diff
+    } else {
+        os << "C" << desc.chan;
+        if (desc.planar) os << "p";
+        os << " ";
+        os << desc.size.width << "x" << desc.size.height;
+    }
 
     return os;
 }
```

Review comment:
No, see: https://github.com/opencv/opencv/blob/4.x/modules/gapi/src/backends/common/serialization.cpp#L616-L621
**File:** modules/gapi/src/backends/ov/bindings_ov.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 29

**Code Changes:**
```diff
+cv::util::any cv::gapi::ov::PyParams::params() const {
+    return m_priv->params();
+}
+
+cv::gapi::ov::PyParams&
+cv::gapi::ov::PyParams::cfgPluginConfig(
+        const std::map<std::string, std::string> &config) {
+    m_priv->cfgPluginConfig(config);
+    return *this;
+}
+
```

Review comment:
What stands for `general`? In `C++` we have templated params and their specialization for `generic` case. For python there is only `generic` params are relevant.
**File:** modules/gapi/src/backends/ov/util.hpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 29

**Code Changes:**
```diff
+namespace util {
+
+// NB: These functions are EXPORTed to make them accessible by the
+// test suite only.
+GAPI_EXPORTS std::vector<int> to_ocv(const ::ov::Shape &shape);
+GAPI_EXPORTS int to_ocv(const ::ov::element::Type &type);
+
+}}}}
+
+#endif // HAVE_INF_ENGINE
+
```

Review comment:
It's only for our tests. Is there any difference in terms of where implementation should be placed? `govbackend.cpp` our `sources` that are not exposed to user.
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend

**Code Changes:**
```diff
@@ -0,0 +1,1001 @@
+// 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.
+//
+// Copyright (C) 2023 Intel Corporation
+
+#include "precomp.hpp"
+
+// needs to be included regardless if IE is present or not
```

Review comment:
Yes, make sense
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 454

**Code Changes:**
```diff
+        m_request.start_async();
+    } catch (...) {
+        m_request.set_callback([](std::exception_ptr){});
+        m_notify();
+        throw;
+    }
+}
+
+void AsyncInferExecutor::callback(IInferExecutor::Task task,
+                                  ::ov::InferRequest   request,
+                                  std::exception_ptr   eptr) noexcept {
```

Review comment:
Usually we notify in the `callback` but here execution failed earlier
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 512

**Code Changes:**
```diff
+    }
+}
+
+IInferExecutor::Ptr cv::gimpl::ov::RequestPool::getIdleRequest() {
+    size_t id = 0u;
+    m_idle_ids.pop(id);
+    return m_requests[id];
+}
+
+// NB: Not thread-safe.
+void cv::gimpl::ov::RequestPool::waitAll() {
```

Review comment:
`setup()` fills `m_idle_ids`
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 602

**Code Changes:**
```diff
+static bool isImage(const cv::GMatDesc &desc,
+                    const ::ov::Shape  &model_shape) {
+    return (model_shape.size() == 4u)                      &&
+           (!desc.isND())  /* dims == 2 */                 &&
+           (desc.chan == 1 || desc.chan == 3)              &&
+           (desc.size.height != 1 && desc.size.width != 1) &&
+           (desc.depth == CV_8U);
+}
+
+struct Infer: public cv::detail::KernelTag {
+    using API = cv::GInferBase;
```

Review comment:
We can have `Mat({15, 14}, CV_8UC1)` but in this case model apparently will have `2D` dimensions for that input so that it would be `TENSOR` for us
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 602

**Code Changes:**
```diff
+static bool isImage(const cv::GMatDesc &desc,
+                    const ::ov::Shape  &model_shape) {
+    return (model_shape.size() == 4u)                      &&
+           (!desc.isND())  /* dims == 2 */                 &&
+           (desc.chan == 1 || desc.chan == 3)              &&
+           (desc.size.height != 1 && desc.size.width != 1) &&
+           (desc.depth == CV_8U);
+}
+
+struct Infer: public cv::detail::KernelTag {
+    using API = cv::GInferBase;
```

Review comment:
The point here is that `2D` mats may work with `4D` model shape only in case of `IMAGE`. For `TENSOR` number of dims must match model shape size. (good point for comment)
**File:** modules/gapi/src/backends/ov/govbackend.cpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 599

**Code Changes:**
```diff
+    return cv::util::make_optional(std::move(it->second));
+}
+
+static bool isImage(const cv::GMatDesc &desc,
+                    const ::ov::Shape  &model_shape) {
+    return (model_shape.size() == 4u)                      &&
+           (!desc.isND())  /* dims == 2 */                 &&
+           (desc.chan == 1 || desc.chan == 3)              &&
+           (desc.size.height != 1 && desc.size.width != 1) &&
+           (desc.depth == CV_8U);
+}
```

Review comment:
User doesn't provide anything. `model_shape` comes from `IR` / `ov::Model` and in all cases for real `image` models have `4D` layout in `OpenVINO`.
**File:** modules/gapi/CMakeLists.txt
**Change Type:** modified
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 160

**Code Changes:**
```diff
@@ -156,6 +156,10 @@ set(gapi_srcs
     src/backends/ie/giebackend.cpp
     src/backends/ie/giebackend/giewrapper.cpp
 
+    # OV Backend. FIXME: should be included by CMake
+    # if and only if OV support is enabled
+    src/backends/ov/govbackend.cpp
+
     # ONNX backend
     src/backends/onnx/gonnxbackend.cpp
 
```

Review comment:
This comment is relevant for `IE` and for `OV` nothing changed. We still include this header regardless `OpenVINO` exists or not.
**File:** modules/gapi/misc/python/test/test_gapi_infer_ov.py
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 89

**Code Changes:**
```diff
+
+        def test_age_gender_infer_image(self):
+            skip_if_openvino_not_available()
+
+            root_path  = '/omz_intel_models/intel/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013'
+            model_path = self.find_file(root_path + '.xml',   [os.environ.get('OPENCV_DNN_TEST_DATA_PATH')])
+            bin_path   = self.find_file(root_path + '.bin',   [os.environ.get('OPENCV_DNN_TEST_DATA_PATH')])
+            device_id  = 'CPU'
+
+            img_path = self.find_file('cv/face/david2.jpg', [os.environ.get('OPENCV_TEST_DATA_PATH')])
+            img = cv.imread(img_path)
```

Review comment:
We're using a couple of them for `ONNX` backend tests.
**File:** modules/gapi/include/opencv2/gapi/infer/ov.hpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 522

**Code Changes:**
```diff
+                , 0u
+                , 0u) {
+    }
+
+    /** @see ov::Params::cfgPluginConfig. */
+    Params& cfgPluginConfig(const detail::ParamDesc::PluginConfigT &config) {
+        m_desc.config = config;
+        return *this;
+    }
+
+    /** @see ov::Params::cfgInputTensorLayout. */
```

Review comment:
But don't do it now to expedite merge, just leave a TODO.
**File:** modules/gapi/src/api/gmat.cpp
**Change Type:** modified
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 167

**Code Changes:**
```diff
+    } else {
+        os << "C" << desc.chan;
+        if (desc.planar) os << "p";
+        os << " ";
+        os << desc.size.width << "x" << desc.size.height;
+    }
 
     return os;
 }
```

Review comment:
No, as S11N is not using i/ostream as LHS operand for <<.
**File:** modules/gapi/misc/python/test/test_gapi_infer_ov.py
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 221

**Code Changes:**
```diff
+            gapi_age, gapi_gender = comp.apply(planar_img)
+
+            # Check
+            self.assertEqual(0.0, cv.norm(ov_gender, gapi_gender, cv.NORM_INF))
+            self.assertEqual(0.0, cv.norm(ov_age, gapi_age, cv.NORM_INF))
+
+
+except unittest.SkipTest as e:
+
+    message = str(e)
+
```

Review comment:
Well, there is not much `invalid` cases. The validation is only happens for `Image` case where the layout is being validated to be `NHWC` for other case there should be check that `mat` dims matches to `tensor` dims I added `TODO` for that
**File:** modules/gapi/include/opencv2/gapi/infer/ov.hpp
**Change Type:** added
**Context:** PR #23595: [G-API] Implement OpenVINO 2.0 backend
**Review Line:** 212

**Code Changes:**
```diff
+
+    /** @brief Specifies tensor layout for an input layer.
+
+    The function is used to set tensor layout for an input layer.
+
+    @param layout Tensor layout ("NCHW", "NWHC", etc)
+    will be applied to all input layers.
+    @return reference to this parameter structure.
+    */
+    Params<Net>& cfgInputTensorLayout(std::string layout) {
+        detail::getModelToSetAttrOrThrow(m_desc.kind, "input tensor layout")
```

Review comment:
Already fixed `assert` in backend but still don't see sense to not "??HW" here since it's `OpenVINO` detail.
**File:** modules/core/src/norm.cpp
**Change Type:** modified
**Context:** PR #23691: Import and export np.float16 in Python
**Review Line:** 1248

**Code Changes:**
```diff
     {
-        if (depth == CV_64F || depth == CV_16F)
+        if (depth == CV_64F)
             return result.d;
-        else if (depth == CV_32F)
+        else if (depth == CV_32F || depth == CV_16F)
             return result.f;
         else
             return result.u;
```

Review comment:
Why? See https://github.com/opencv/opencv/blob/cf0ba039c3cfcd2aabdcd060a1ca4fc79515975d/modules/core/src/norm.cpp#L1227
**File:** modules/core/src/norm.cpp
**Change Type:** modified
**Context:** PR #23691: Import and export np.float16 in Python
**Review Line:** 776

**Code Changes:**
```diff
     {
-        if(depth == CV_64F || depth == CV_16F)
+        if(depth == CV_64F)
             return result.d;
-        else if (depth == CV_32F)
+        else if (depth == CV_32F || depth == CV_16F)
             return result.f;
         else
             return result.i;
@@ -1224,7 +1224,7 @@ double norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask
                 int bsz = std::min(total - j, blockSize);
```

Review comment:
Why? See https://github.com/opencv/opencv/blob/cf0ba039c3cfcd2aabdcd060a1ca4fc79515975d/modules/core/src/norm.cpp#L756
**File:** modules/core/src/norm.cpp
**Change Type:** modified
**Context:** PR #23691: Import and export np.float16 in Python
**Review Line:** 1248

**Code Changes:**
```diff
     {
-        if (depth == CV_64F || depth == CV_16F)
+        if (depth == CV_64F)
             return result.d;
-        else if (depth == CV_32F)
+        else if (depth == CV_32F || depth == CV_16F)
             return result.f;
         else
             return result.u;
```

Review comment:
Seems like it works because `result` is `union`: ```cpp union { double d; float f; int i; unsigned u; } result; ```
**File:** modules/core/src/norm.cpp
**Change Type:** modified
**Context:** PR #23691: Import and export np.float16 in Python
**Review Line:** 1248

**Code Changes:**
```diff
     {
-        if (depth == CV_64F || depth == CV_16F)
+        if (depth == CV_64F)
             return result.d;
-        else if (depth == CV_32F)
+        else if (depth == CV_32F || depth == CV_16F)
             return result.f;
         else
             return result.u;
```

Review comment:
I got the idea. The function is called incorrectly. Instead of ``` func((uchar*)data0, ptrs[1], (uchar*)&result.d, bsz, cn); ``` it should be ``` func((uchar*)data0, ptrs[1], (uchar*)&result.f, bsz, cn); ``` The actual functions in table expect float, but not double. Please fix it here and in the case bellow.
**File:** modules/objdetect/include/opencv2/objdetect.hpp
**Change Type:** modified
**Context:** PR #23264: Add detect qr with aruco

**Code Changes:**
```diff
@@ -45,6 +45,7 @@
 #define OPENCV_OBJDETECT_HPP
 
 #include "opencv2/core.hpp"
+#include "opencv2/objdetect/aruco_detector.hpp"
 
 /**
 @defgroup objdetect Object Detection
@@ -763,28 +764,15 @@ class CV_EXPORTS_W QRCodeEncoder {
 
```

Review comment:
Do you plan to add new parameters to the algorithm? If not, the struct is redundant. Simple constructor parameter is enough.
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #23264: Add detect qr with aruco

**Code Changes:**
```diff
@@ -949,34 +949,99 @@ vector<Point2f> QRDetect::getQuadrilateral(vector<Point2f> angle_list)
     return result_angle_list;
 }
 
+struct QRCodeDetectorBase::Impl {
+    virtual ~Impl() {}
+    virtual bool detect(InputArray img, OutputArray points) const = 0;
+    virtual std::string decode(InputArray img, InputArray points, OutputArray straight_qrcode) const = 0;
+    virtual std::string detectAndDecode(InputArray img, OutputArray points, OutputArray straight_qrcode) const = 0;
+    virtual bool detectMulti(InputArray img, OutputArray points) const = 0;
```

Review comment:
Please remove dead code.
**File:** modules/objdetect/include/opencv2/objdetect.hpp
**Change Type:** modified
**Context:** PR #23264: Add detect qr with aruco

**Code Changes:**
```diff
@@ -45,6 +45,7 @@
 #define OPENCV_OBJDETECT_HPP
 
 #include "opencv2/core.hpp"
+#include "opencv2/objdetect/aruco_detector.hpp"
 
 /**
 @defgroup objdetect Object Detection
@@ -763,28 +764,15 @@ class CV_EXPORTS_W QRCodeEncoder {
 
```

Review comment:
Please add documentation for constants.