nareshmlx/opencv-pr huggingface dataset:
**File:** modules/ml/include/opencv2/ml.hpp
**Change Type:** modified
**Context:** PR #8004: RTrees: Add wrapper for RTrees_load method to enable loading trained … - …RTrees  resolves http://answers.opencv.org/question/122375/how-to-...
**Review Line:** 1179

**Code Changes:**
```diff
+     *
+     * Use RTree::save to serialize and store an RTree to disk.
+     * Load the RTree from this file again, by calling this function with the path to the file.
+     * Optionally specify the node for the file containing the classifier
+     *
+     * @param filepath path to serialized RTree
+     * @param nodeName name of node containing the classifier
+     */
+    CV_WRAP static Ptr<RTrees> load(const String& filepath , const String& nodeName = String());
 };
 
```

Review comment:
The second parameter should be described here too.
**File:** modules/core/include/opencv2/core/hal/intrin_cpp.hpp
**Change Type:** modified
**Context:** PR #7863: use universal intrinsic in normHamming - speed up the normHamming using universal intrinsic - current implementation only uses AVX2 and NEON...

**Code Changes:**
```diff
@@ -149,7 +149,7 @@ Element-wise binary and unary operations.
 
 Most of these operations return only one value.
 
-- Reduce: @ref v_reduce_min, @ref v_reduce_max, @ref v_reduce_sum
+- Reduce: @ref v_reduce_min, @ref v_reduce_max, @ref v_reduce_sum, @ref v_popcount
 - Mask: @ref v_signmask, @ref v_check_all, @ref v_check_any, @ref v_select
 
 ### Other math
@@ -574,6 +574,49 @@ OPENCV_HAL_IMPL_REDUCE_MINMAX_FUNC(v_reduce_min, std::min)
```

Review comment:
add "const" What is about the performance of "int" type vs "unsigned char"? Also it is probably better to move out this table from the template.
**File:** modules/core/src/stat.cpp
**Change Type:** modified
**Context:** PR #7863: use universal intrinsic in normHamming - speed up the normHamming using universal intrinsic - current implementation only uses AVX2 and NEON...

**Code Changes:**
```diff
@@ -44,6 +44,7 @@
 #include "precomp.hpp"
 #include <climits>
 #include <limits>
+#include "opencv2/core/hal/intrin.hpp"
 
 #include "opencl_kernels_core.hpp"
 
@@ -4238,22 +4239,8 @@ int normHamming(const uchar* a, int n)
 {
```

Review comment:
My suggestion is to use `#ifdef CV_POPCNT_U64` to preserve consistency.
**File:** modules/core/include/opencv2/core/hal/intrin_cpp.hpp
**Change Type:** modified
**Context:** PR #7863: use universal intrinsic in normHamming - speed up the normHamming using universal intrinsic - current implementation only uses AVX2 and NEON...

**Code Changes:**
```diff
@@ -149,7 +149,7 @@ Element-wise binary and unary operations.
 
 Most of these operations return only one value.
 
-- Reduce: @ref v_reduce_min, @ref v_reduce_max, @ref v_reduce_sum
+- Reduce: @ref v_reduce_min, @ref v_reduce_max, @ref v_reduce_sum, @ref v_popcount
 - Mask: @ref v_signmask, @ref v_check_all, @ref v_check_any, @ref v_select
 
 ### Other math
@@ -574,6 +574,49 @@ OPENCV_HAL_IMPL_REDUCE_MINMAX_FUNC(v_reduce_min, std::min)
```

Review comment:
> measure the performance of v_popcount from intrin_cpp.hpp Performance of fallback non-optimized version is not critical.
**File:** modules/imgproc/src/drawing.cpp
**Change Type:** modified
**Context:** PR #7161: Fix for incorrect line drawing beyond 32768 row or column - resolves #5473 resolves #4555 ### This pullrequest changes Fix line drawing impl...

**Code Changes:**
```diff
@@ -53,42 +53,53 @@ struct PolyEdge
     //PolyEdge(int _y0, int _y1, int _x, int _dx) : y0(_y0), y1(_y1), x(_x), dx(_dx) {}
 
     int y0, y1;
-    int x, dx;
+    int64 x, dx;
     PolyEdge *next;
 };
 
 static void
```

Review comment:
Why are separate decrement statements and references used?
**File:** modules/imgproc/src/matchcontours.cpp
**Change Type:** modified
**Context:** PR #7966: Issue 4235 - Add check for all zero moments. If one of the shapes is empty, the ma…tch would return zero distance between the shapes even wh...
**Review Line:** 67

**Code Changes:**
```diff
@@ -62,6 +63,11 @@ double cv::matchShapes(InputArray contour1, InputArray contour2, int method, dou
             double ama = fabs( ma[i] );
             double amb = fabs( mb[i] );
 
+            if (ama > 0)
+                anyA = true;
+            if (amb > 0)
+                anyB = true;
+
             if( ma[i] > 0 )
                 sma = 1;
```

Review comment:
it would be more elegant to write `anyA = ama > 0;`
**File:** modules/imgproc/src/matchcontours.cpp
**Change Type:** modified
**Context:** PR #7966: Issue 4235 - Add check for all zero moments. If one of the shapes is empty, the ma…tch would return zero distance between the shapes even wh...
**Review Line:** 67

**Code Changes:**
```diff
@@ -62,6 +63,11 @@ double cv::matchShapes(InputArray contour1, InputArray contour2, int method, dou
             double ama = fabs( ma[i] );
             double amb = fabs( mb[i] );
 
+            if (ama > 0)
+                anyA = true;
+            if (amb > 0)
+                anyB = true;
+
             if( ma[i] > 0 )
                 sma = 1;
```

Review comment:
No, that's not the same. That can set anyA from true to false, which we don't want. `anyA |= ama >0` would work, but then you have to depend on people remember what |= does, and noticing the |, which a quick skim would probably miss.
**File:** modules/core/include/opencv2/core.hpp
**Change Type:** modified
**Context:** PR #7539: Add 90 degree rotation methods. - Adds a method for fast 90 degree rotations. It is a common task, but there is no method for it. It can be ...
**Review Line:** 1041

**Code Changes:**
```diff
+@param dst output array of the same type as src.  The size is the same with ROTATE_180,
+and the rows and cols are switched for ROTATE_90 and ROTATE_270.
+@param rotateCode an enum to specify how to rotate the array; see the enum RotateFlags
+@sa transpose , repeat , completeSymm, flip, RotateFlags
+*/
+CV_EXPORTS_W void rotate(InputArray src, OutputArray dst, int rotateCode);
+
 /** @brief Fills the output array with repeated copies of the input array.
 
 The function cv::repeat duplicates the input array one or more times along each of the two axes:
```

Review comment:
can we replace rotateCode with angle and simple check that it's divisible by 90? (and also allow negative values?)
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #7539: Add 90 degree rotation methods. - Adds a method for fast 90 degree rotations. It is a common task, but there is no method for it. It can be ...

**Code Changes:**
```diff
@@ -826,6 +826,54 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
         flipHoriz( dst.ptr(), dst.step, dst.ptr(), dst.step, dst.size(), esz );
 }
 
+#ifdef HAVE_OPENCL
+
+static bool ocl_rotate(InputArray _src, OutputArray _dst, int rotateMode)
+{
+    switch (rotateMode)
+    {
```

Review comment:
this implementation is inefficient, it allocates a temporary array for transposed image. More efficiently would be to write it as: <pre> transpose(_src, _dst); flip(_dst, _dst, 1); </pre>
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #7539: Add 90 degree rotation methods. - Adds a method for fast 90 degree rotations. It is a common task, but there is no method for it. It can be ...

**Code Changes:**
```diff
@@ -826,6 +826,54 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
         flipHoriz( dst.ptr(), dst.step, dst.ptr(), dst.step, dst.size(), esz );
 }
 
+#ifdef HAVE_OPENCL
+
+static bool ocl_rotate(InputArray _src, OutputArray _dst, int rotateMode)
+{
+    switch (rotateMode)
+    {
```

Review comment:
same issue with efficiency
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #7539: Add 90 degree rotation methods. - Adds a method for fast 90 degree rotations. It is a common task, but there is no method for it. It can be ...

**Code Changes:**
```diff
@@ -826,6 +826,54 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
         flipHoriz( dst.ptr(), dst.step, dst.ptr(), dst.step, dst.size(), esz );
 }
 
+#ifdef HAVE_OPENCL
+
+static bool ocl_rotate(InputArray _src, OutputArray _dst, int rotateMode)
+{
+    switch (rotateMode)
+    {
```

Review comment:
This doesn't work with pre-allocated dst.
**File:** modules/core/src/copy.cpp
**Change Type:** modified
**Context:** PR #7539: Add 90 degree rotation methods. - Adds a method for fast 90 degree rotations. It is a common task, but there is no method for it. It can be ...

**Code Changes:**
```diff
@@ -826,6 +826,54 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
         flipHoriz( dst.ptr(), dst.step, dst.ptr(), dst.step, dst.size(), esz );
 }
 
+#ifdef HAVE_OPENCL
+
+static bool ocl_rotate(InputArray _src, OutputArray _dst, int rotateMode)
+{
+    switch (rotateMode)
+    {
```

Review comment:
why not use transpose() function?
**File:** apps/traincascade/cascadeclassifier.cpp
**Change Type:** modified
**Context:** PR #7887: [traincascade] add type_id to the old save format - ### This pullrequest changes This PR adds the `type_id` of `opencv-haar-classifier` to t...

**Code Changes:**
```diff
@@ -412,6 +412,7 @@ bool CvCascadeClassifier::readStages( const FileNode &node)
 }
 
 // For old Haar Classifier file saving
+#define ICV_HAAR_TYPE_ID              "opencv-haar-classifier"
 #define ICV_HAAR_SIZE_NAME            "size"
 #define ICV_HAAR_STAGES_NAME          "stages"
 #define ICV_HAAR_TREES_NAME             "trees"
@@ -434,11 +435,12 @@ void CvCascadeClassifier::save( const string filename, bool baseFormat )
     if ( !fs.isOpened() )
```

Review comment:
It was my understanding that the `:` character was required but I just tried with my test program and it isn't. It does affect the output though - one line vs two lines. ```cpp #include <opencv2/core/core.hpp> using namespace cv; int main() { std::string filename = "cascade.xml"; FileStorage fs( filename, FileStorage::WRITE ); fs << FileStorage::getDefaultObjectName(filename) << "{opencv-haar-classifier"; fs << "}"; } ``` ```xml <?xml version="1.0"?> <opencv_storage> <cascade type_id="opencv-haar-classifier"> </cascade> </opencv_storage> ```
**File:** apps/traincascade/cascadeclassifier.cpp
**Change Type:** modified
**Context:** PR #7887: [traincascade] add type_id to the old save format - ### This pullrequest changes This PR adds the `type_id` of `opencv-haar-classifier` to t...

**Code Changes:**
```diff
@@ -412,6 +412,7 @@ bool CvCascadeClassifier::readStages( const FileNode &node)
 }
 
 // For old Haar Classifier file saving
+#define ICV_HAAR_TYPE_ID              "opencv-haar-classifier"
 #define ICV_HAAR_SIZE_NAME            "size"
 #define ICV_HAAR_STAGES_NAME          "stages"
 #define ICV_HAAR_TREES_NAME             "trees"
@@ -434,11 +435,12 @@ void CvCascadeClassifier::save( const string filename, bool baseFormat )
     if ( !fs.isOpened() )
```

Review comment:
I checked it one more time. `fs << "{:" << ICV_HAAR_TYPE_ID;` is probably not what you want. You'd want something like `fs << "{:" ICV_HAAR_TYPE_ID;` to make sure that `"{:opencv-haar-classifier"` is streamed to fs and parsed as a single "token"
**File:** apps/traincascade/cascadeclassifier.cpp
**Change Type:** modified
**Context:** PR #7887: [traincascade] add type_id to the old save format - ### This pullrequest changes This PR adds the `type_id` of `opencv-haar-classifier` to t...

**Code Changes:**
```diff
@@ -412,6 +412,7 @@ bool CvCascadeClassifier::readStages( const FileNode &node)
 }
 
 // For old Haar Classifier file saving
+#define ICV_HAAR_TYPE_ID              "opencv-haar-classifier"
 #define ICV_HAAR_SIZE_NAME            "size"
 #define ICV_HAAR_STAGES_NAME          "stages"
 #define ICV_HAAR_TREES_NAME             "trees"
@@ -434,11 +435,12 @@ void CvCascadeClassifier::save( const string filename, bool baseFormat )
     if ( !fs.isOpened() )
```

Review comment:
That makes sense I was wondering about that as well since one of my earlier tests did't work as expected but then they all started to. I can make the change.
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7454: OpenVX based implementation for integral image HAL API. - ### This pullrequest changes Added OpenVX based implementation of cv_hal_integral

**Code Changes:**
```diff
@@ -100,6 +100,24 @@ struct VX_Traits<short>
     };
 };
 
+template <>
+struct VX_Traits<uint>
+{
+    enum {
+        ImgType = VX_DF_IMAGE_U32,
+        DataType = VX_TYPE_UINT32
```

Review comment:
`uint` is probably less standard than `unsigned`, isn't it? Also, it's quite strange that the requested type is `CV_32S`, but the actual type is `uint`. Shall we change it it `int`?
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7454: OpenVX based implementation for integral image HAL API. - ### This pullrequest changes Added OpenVX based implementation of cv_hal_integral

**Code Changes:**
```diff
@@ -100,6 +100,24 @@ struct VX_Traits<short>
     };
 };
 
+template <>
+struct VX_Traits<uint>
+{
+    enum {
+        ImgType = VX_DF_IMAGE_U32,
+        DataType = VX_TYPE_UINT32
```

Review comment:
Since OpenVX support both U32 and S32 types IMO wrappers should handle `int` and `unsigned` data as different OpenVX image types for a generic case. But for integral image OpenVX support only 8U->32U processing, while opencv doesn't use 32U type, so I've casted type here to retain more generic wrapper.
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7454: OpenVX based implementation for integral image HAL API. - ### This pullrequest changes Added OpenVX based implementation of cv_hal_integral
**Review Line:** 1046

**Code Changes:**
```diff
+    if (depth != CV_8U || sdepth != CV_32S || c != NULL || d != NULL || cn != 1)
+        return CV_HAL_ERROR_NOT_IMPLEMENTED;
+
+    try
+    {
+        vxContext * ctx = vxContext::getContext();
+        vxImage ia(*ctx, a, astep, w, h);
+        vxImage ib(*ctx, (unsigned int *)(b+bstep+sizeof(unsigned int)), bstep, w, h);
+        vxErr::check(vxuIntegralImage(ctx->ctx, ia.img, ib.img));
+        memset(b, 0, (w+1)*sizeof(unsigned int));
+        b += bstep;
```

Review comment:
Yes, I think we can make it return `vxContext &`. I will prepare pull request after this one is merged (and #7367 with #7369).
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7454: OpenVX based implementation for integral image HAL API. - ### This pullrequest changes Added OpenVX based implementation of cv_hal_integral

**Code Changes:**
```diff
@@ -100,6 +100,24 @@ struct VX_Traits<short>
     };
 };
 
+template <>
+struct VX_Traits<uint>
+{
+    enum {
+        ImgType = VX_DF_IMAGE_U32,
+        DataType = VX_TYPE_UINT32
```

Review comment:
replaced uint with unsigned int
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7454: OpenVX based implementation for integral image HAL API. - ### This pullrequest changes Added OpenVX based implementation of cv_hal_integral
**Review Line:** 1046

**Code Changes:**
```diff
+    if (depth != CV_8U || sdepth != CV_32S || c != NULL || d != NULL || cn != 1)
+        return CV_HAL_ERROR_NOT_IMPLEMENTED;
+
+    try
+    {
+        vxContext * ctx = vxContext::getContext();
+        vxImage ia(*ctx, a, astep, w, h);
+        vxImage ib(*ctx, (unsigned int *)(b+bstep+sizeof(unsigned int)), bstep, w, h);
+        vxErr::check(vxuIntegralImage(ctx->ctx, ia.img, ib.img));
+        memset(b, 0, (w+1)*sizeof(unsigned int));
+        b += bstep;
```

Review comment:
I've prepared #7802 that change HAL to use ivx wrappers instead
**File:** 3rdparty/openvx/include/ivx.hpp
**Change Type:** modified
**Context:** PR #7598: Added OpenVX based processing to LUT - ### This pullrequest changes Implemented LUT image processing via OpenVX TableLookup immediate mode c...
**Review Line:** 2411

**Code Changes:**
```diff
+        IVX_CHECK_STATUS(vxAccessLUT(ref, &data, VX_READ_ONLY));
+        IVX_CHECK_STATUS(vxCommitLUT(ref, data));
+#endif
+    }
+
+    void copyFrom(const void* data)
+    {
+        if (!data) throw WrapperError(std::string(__func__) + "(): input pointer is 0");
+#ifdef VX_VERSION_1_1
+        IVX_CHECK_STATUS(vxCopyLUT(ref, const_cast<void*>(data), VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST));
+#else
```

Review comment:
how about `copyTo` and `copyFrom` overloads with `std::vector` instead of `void*`?
**File:** 3rdparty/openvx/include/ivx.hpp
**Change Type:** modified
**Context:** PR #7598: Added OpenVX based processing to LUT - ### This pullrequest changes Implemented LUT image processing via OpenVX TableLookup immediate mode c...

**Code Changes:**
```diff
@@ -322,6 +322,15 @@ template <> struct RefTypeTraits <vx_matrix>
     static vx_status release(vxType& ref) { return vxReleaseMatrix(&ref); }
 };
 
+class LUT;
+template <> struct RefTypeTraits <vx_lut>
+{
+    typedef vx_lut vxType;
+    typedef LUT wrapperType;
+    static const vx_enum vxTypeEnum = VX_TYPE_LUT;
```

Review comment:
I see no much value in this method...
**File:** 3rdparty/openvx/include/ivx.hpp
**Change Type:** modified
**Context:** PR #7598: Added OpenVX based processing to LUT - ### This pullrequest changes Implemented LUT image processing via OpenVX TableLookup immediate mode c...

**Code Changes:**
```diff
@@ -322,6 +322,15 @@ template <> struct RefTypeTraits <vx_matrix>
     static vx_status release(vxType& ref) { return vxReleaseMatrix(&ref); }
 };
 
+class LUT;
+template <> struct RefTypeTraits <vx_lut>
+{
+    typedef vx_lut vxType;
+    typedef LUT wrapperType;
+    static const vx_enum vxTypeEnum = VX_TYPE_LUT;
```

Review comment:
I suggest making allocation of an empty Mat only and shape checking for non-empty.
**File:** 3rdparty/openvx/include/ivx.hpp
**Change Type:** modified
**Context:** PR #7598: Added OpenVX based processing to LUT - ### This pullrequest changes Implemented LUT image processing via OpenVX TableLookup immediate mode c...

**Code Changes:**
```diff
@@ -322,6 +322,15 @@ template <> struct RefTypeTraits <vx_matrix>
     static vx_status release(vxType& ref) { return vxReleaseMatrix(&ref); }
 };
 
+class LUT;
+template <> struct RefTypeTraits <vx_lut>
+{
+    typedef vx_lut vxType;
+    typedef LUT wrapperType;
+    static const vx_enum vxTypeEnum = VX_TYPE_LUT;
```

Review comment:
IMHO it's not hard to implement these particular checks
**File:** modules/core/src/convert.cpp
**Change Type:** modified
**Context:** PR #7598: Added OpenVX based processing to LUT - ### This pullrequest changes Implemented LUT image processing via OpenVX TableLookup immediate mode c...
**Review Line:** 5388

**Code Changes:**
```diff
+    try
+    {
+        ivx::Context ctx = ivx::Context::create();
+
+        ivx::Image
+            ia = ivx::Image::createFromHandle(ctx, VX_DF_IMAGE_U8,
+                ivx::Image::createAddressing(src.cols, src.rows, 1, (vx_int32)(src.step)), src.data),
+            ib = ivx::Image::createFromHandle(ctx, VX_DF_IMAGE_U8,
+                ivx::Image::createAddressing(dst.cols, dst.rows, 1, (vx_int32)(dst.step)), dst.data);
+
+        ivx::LUT lut = ivx::LUT::create(ctx);
```

Review comment:
consider the shorter code: ```cpp ia = ivx::Image::createFromHandle( ctx, ivx::Image::matTypeToFormat(src.type()), ivx::Image::createAddressing(src), src.data ); ``` And I'm actually thinking about adding `ivx::Image::createFromHandle(context, mat);` to ivx.hpp, but this require saving that Mat reference inside the created Image...
**File:** modules/core/src/convert.cpp
**Change Type:** modified
**Context:** PR #7598: Added OpenVX based processing to LUT - ### This pullrequest changes Implemented LUT image processing via OpenVX TableLookup immediate mode c...
**Review Line:** 5406

**Code Changes:**
```diff
+    }
+    catch (ivx::WrapperError & e)
+    {
+        CV_Error(CV_StsInternal, e.what());
+        return false;
+    }
+
+    return true;
+}
+#endif
+
```

Review comment:
Looks like we need a base class `ivx::Error` to prevent duplicated code for both types of ivx exceptions...
**File:** modules/core/src/convert.cpp
**Change Type:** modified
**Context:** PR #7598: Added OpenVX based processing to LUT - ### This pullrequest changes Implemented LUT image processing via OpenVX TableLookup immediate mode c...
**Review Line:** 5406

**Code Changes:**
```diff
+    }
+    catch (ivx::WrapperError & e)
+    {
+        CV_Error(CV_StsInternal, e.what());
+        return false;
+    }
+
+    return true;
+}
+#endif
+
```

Review comment:
`ivx::Error` looks useful but I think such refactoring could be postponed to the moment when most of kernel wrappers be merged
**File:** modules/core/src/convert.cpp
**Change Type:** modified
**Context:** PR #7598: Added OpenVX based processing to LUT - ### This pullrequest changes Implemented LUT image processing via OpenVX TableLookup immediate mode c...
**Review Line:** 5406

**Code Changes:**
```diff
+    }
+    catch (ivx::WrapperError & e)
+    {
+        CV_Error(CV_StsInternal, e.what());
+        return false;
+    }
+
+    return true;
+}
+#endif
+
```

Review comment:
`ivx::Error` looks useful, but I think it would be better to refactor it later
**File:** 3rdparty/openvx/include/ivx.hpp
**Change Type:** modified
**Context:** PR #7677: Added OpenVX based processing to minMaxLoc - ### This pullrequest changes Implemented minMaxInd evaluation via OpenVX minMaxLoc immediate mo...
**Review Line:** 1738

**Code Changes:**
```diff
+        vx_size v;
+        query(VX_ARRAY_NUMITEMS, v);
+        return v;
+    }
+
+    void copyRangeTo(size_t start, size_t end, void* data)
+    {
+        if (!data) throw WrapperError(std::string(__func__) + "(): output pointer is 0");
+#ifdef VX_VERSION_1_1
+        IVX_CHECK_STATUS(vxCopyArrayRange(ref, start, end, itemSize(), data, VX_READ_ONLY, VX_MEMORY_TYPE_HOST));
+#else
```

Review comment:
I suggest adding overloads for `std::vector` as well
**File:** 3rdparty/openvx/include/ivx.hpp
**Change Type:** modified
**Context:** PR #7677: Added OpenVX based processing to minMaxLoc - ### This pullrequest changes Implemented minMaxInd evaluation via OpenVX minMaxLoc immediate mo...

**Code Changes:**
```diff
@@ -1693,6 +1693,160 @@ class Array : public RefWrapper<vx_array>
     /// vxCreateVirtualArray() wrapper
     static Array createVirtual(vx_graph g, vx_enum type, vx_size capacity)
     { return Array(vxCreateVirtualArray(g, type, capacity)); }
+
+#ifndef VX_VERSION_1_1
+    static const vx_enum
+        VX_MEMORY_TYPE_HOST = VX_IMPORT_TYPE_HOST,
+        VX_ARRAY_ITEMTYPE   = VX_ARRAY_ATTRIBUTE_ITEMTYPE,
+        VX_ARRAY_NUMITEMS   = VX_ARRAY_ATTRIBUTE_NUMITEMS,
```

Review comment:
I see no much value in this method
**File:** 3rdparty/openvx/include/ivx.hpp
**Change Type:** modified
**Context:** PR #7677: Added OpenVX based processing to minMaxLoc - ### This pullrequest changes Implemented minMaxInd evaluation via OpenVX minMaxLoc immediate mo...

**Code Changes:**
```diff
@@ -1693,6 +1693,160 @@ class Array : public RefWrapper<vx_array>
     /// vxCreateVirtualArray() wrapper
     static Array createVirtual(vx_graph g, vx_enum type, vx_size capacity)
     { return Array(vxCreateVirtualArray(g, type, capacity)); }
+
+#ifndef VX_VERSION_1_1
+    static const vx_enum
+        VX_MEMORY_TYPE_HOST = VX_IMPORT_TYPE_HOST,
+        VX_ARRAY_ITEMTYPE   = VX_ARRAY_ATTRIBUTE_ITEMTYPE,
+        VX_ARRAY_NUMITEMS   = VX_ARRAY_ATTRIBUTE_NUMITEMS,
```

Review comment:
I suggest allocate an empty Mat only and check the shape for non-empty
**File:** 3rdparty/openvx/include/ivx.hpp
**Change Type:** modified
**Context:** PR #7677: Added OpenVX based processing to minMaxLoc - ### This pullrequest changes Implemented minMaxInd evaluation via OpenVX minMaxLoc immediate mo...

**Code Changes:**
```diff
@@ -1693,6 +1693,160 @@ class Array : public RefWrapper<vx_array>
     /// vxCreateVirtualArray() wrapper
     static Array createVirtual(vx_graph g, vx_enum type, vx_size capacity)
     { return Array(vxCreateVirtualArray(g, type, capacity)); }
+
+#ifndef VX_VERSION_1_1
+    static const vx_enum
+        VX_MEMORY_TYPE_HOST = VX_IMPORT_TYPE_HOST,
+        VX_ARRAY_ITEMTYPE   = VX_ARRAY_ATTRIBUTE_ITEMTYPE,
+        VX_ARRAY_NUMITEMS   = VX_ARRAY_ATTRIBUTE_NUMITEMS,
```

Review comment:
please implement