nareshmlx/opencv-pr huggingface dataset:
**File:** modules/imgproc/src/contours.cpp
**Change Type:** modified
**Context:** PR #7222: Improve findContours using SSE2 instruction to find next contour -  Improve findContours by using SSE2 instruction to find next contour poin...

**Code Changes:**
```diff
@@ -50,6 +50,27 @@
 static const CvPoint icvCodeDeltas[8] =
     { CvPoint(1, 0), CvPoint(1, -1), CvPoint(0, -1), CvPoint(-1, -1), CvPoint(-1, 0), CvPoint(-1, 1), CvPoint(0, 1), CvPoint(1, 1) };
 
+inline unsigned int trailingZeros(unsigned int value) {
+#if defined(_MSC_VER)
+#if (_MSC_VER < 1500)
+    return _BitScanForward(value);
+#else
+    return _tzcnt_u32(value);
```

Review comment:
here you can add parameter bool /\* haveSSE2 */ to avoid conditional compilation when you call this function
**File:** modules/imgproc/src/contours.cpp
**Change Type:** modified
**Context:** PR #7222: Improve findContours using SSE2 instruction to find next contour -  Improve findContours by using SSE2 instruction to find next contour poin...

**Code Changes:**
```diff
@@ -50,6 +50,27 @@
 static const CvPoint icvCodeDeltas[8] =
     { CvPoint(1, 0), CvPoint(1, -1), CvPoint(0, -1), CvPoint(-1, -1), CvPoint(-1, 0), CvPoint(-1, 1), CvPoint(0, 1), CvPoint(1, 1) };
 
+inline unsigned int trailingZeros(unsigned int value) {
+#if defined(_MSC_VER)
+#if (_MSC_VER < 1500)
+    return _BitScanForward(value);
+#else
+    return _tzcnt_u32(value);
```

Review comment:
I think, it makes sense to 1) rename haveSSE2 to haveSIMD, because later on someone might want to add NEON, AVX etc. optimizations 2) add haveSIMD parameter in all configurations; the overhead of passing extra parameter is tiny, comparing to the processing time
**File:** modules/imgproc/src/contours.cpp
**Change Type:** modified
**Context:** PR #7222: Improve findContours using SSE2 instruction to find next contour -  Improve findContours by using SSE2 instruction to find next contour poin...

**Code Changes:**
```diff
@@ -50,6 +50,27 @@
 static const CvPoint icvCodeDeltas[8] =
     { CvPoint(1, 0), CvPoint(1, -1), CvPoint(0, -1), CvPoint(-1, -1), CvPoint(-1, 0), CvPoint(-1, 1), CvPoint(0, 1), CvPoint(1, 1) };
 
+inline unsigned int trailingZeros(unsigned int value) {
+#if defined(_MSC_VER)
+#if (_MSC_VER < 1500)
+    return _BitScanForward(value);
+#else
+    return _tzcnt_u32(value);
```

Review comment:
';' is missed here
**File:** modules/java/generator/gen_java.py
**Change Type:** modified
**Context:** PR #7372: fix for feature2d java wrappers as described in this post: http://ans… - http://answers.opencv.org/question/101675/surfsift-java-wrapper-for...

**Code Changes:**
```diff
@@ -807,6 +807,8 @@ def addImports(self, ctype):
             self.imports.add("java.util.List")
             self.imports.add("java.util.ArrayList")
             self.addImports(ctype.replace('vector_vector', 'vector'))
+        elif ctype.startswith('Feature2D'):
+            self.imports.add("org.opencv.features2d.Feature2D")
         elif ctype.startswith('vector'):
             self.imports.add("org.opencv.core.Mat")
             self.imports.add('java.util.ArrayList')
```

Review comment:
Please, revert this line, same change has been integrated already.
**File:** modules/java/generator/gen_java.py
**Change Type:** modified
**Context:** PR #7372: fix for feature2d java wrappers as described in this post: http://ans… - http://answers.opencv.org/question/101675/surfsift-java-wrapper-for...

**Code Changes:**
```diff
@@ -807,6 +807,8 @@ def addImports(self, ctype):
             self.imports.add("java.util.List")
             self.imports.add("java.util.ArrayList")
             self.addImports(ctype.replace('vector_vector', 'vector'))
+        elif ctype.startswith('Feature2D'):
+            self.imports.add("org.opencv.features2d.Feature2D")
         elif ctype.startswith('vector'):
             self.imports.add("org.opencv.core.Mat")
             self.imports.add('java.util.ArrayList')
```

Review comment:
done. I'm sorry if I've done anything wrong, this is my first commit )) Please kindly check the other change, it is to fix missing import when building wrappers for xfeatures2d. I think complete fix would require proper analysis of dependencies between modules and changing CMakeLists.txt automatically when java is enabled and xfeatures2d/nonfree modules included.
**File:** modules/imgproc/src/lsd.cpp
**Change Type:** modified
**Context:** PR #7311: LSD optimizations - ### This pullrequest changes - Uses the 8-bit image directly instead of converting it to 64-bit floating point first - W...

**Code Changes:**
```diff
@@ -230,12 +230,9 @@ class LineSegmentDetectorImpl : public LineSegmentDetector
 
 private:
     Mat image;
-    Mat_<double> scaled_image;
-    double *scaled_image_data;
+    Mat scaled_image;
     Mat_<double> angles;     // in rads
-    double *angles_data;
     Mat_<double> modgrad;
```

Review comment:
should we also check that image is 8-bit, since we do not convert it to double's?
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7208: OpenVX HAL implementation extension - ### This pullrequest changes Added a few more immediate mode calls to OpenVX HAL API implementation

**Code Changes:**
```diff
@@ -7,6 +7,10 @@
 #include "VX/vxu.h"
 
 #include <string>
+#include <vector>
+
+#include <algorithm>
+#include <opencv2/core/saturate.hpp>
 
 //==================================================================================================
```

Review comment:
There is `VX_CONTEXT_IMMEDIATE_BORDER` attribute, which allows to set border mode for immediate functions. But its usage might lead to problems in multi-threaded environment, since standard says nothing about thread safety for now.
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7208: OpenVX HAL implementation extension - ### This pullrequest changes Added a few more immediate mode calls to OpenVX HAL API implementation

**Code Changes:**
```diff
@@ -7,6 +7,10 @@
 #include "VX/vxu.h"
 
 #include <string>
+#include <vector>
+
+#include <algorithm>
+#include <opencv2/core/saturate.hpp>
 
 //==================================================================================================
```

Review comment:
As far as I remember OpenVX and OpenCV uses different formulas for Warp operations (matrix should be transposed).
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7208: OpenVX HAL implementation extension - ### This pullrequest changes Added a few more immediate mode calls to OpenVX HAL API implementation

**Code Changes:**
```diff
@@ -7,6 +7,10 @@
 #include "VX/vxu.h"
 
 #include <string>
+#include <vector>
+
+#include <algorithm>
+#include <opencv2/core/saturate.hpp>
 
 //==================================================================================================
```

Review comment:
Missing closing paren and const cast, should be: ``` .cpp vxErr::check(vxCopyMatrix(mtx, const_cast<T*>(data), VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST)); ```
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7208: OpenVX HAL implementation extension - ### This pullrequest changes Added a few more immediate mode calls to OpenVX HAL API implementation

**Code Changes:**
```diff
@@ -7,6 +7,10 @@
 #include "VX/vxu.h"
 
 #include <string>
+#include <vector>
+
+#include <algorithm>
+#include <opencv2/core/saturate.hpp>
 
 //==================================================================================================
```

Review comment:
Same as on L196
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7208: OpenVX HAL implementation extension - ### This pullrequest changes Added a few more immediate mode calls to OpenVX HAL API implementation

**Code Changes:**
```diff
@@ -7,6 +7,10 @@
 #include "VX/vxu.h"
 
 #include <string>
+#include <vector>
+
+#include <algorithm>
+#include <opencv2/core/saturate.hpp>
 
 //==================================================================================================
```

Review comment:
GCC does not remove preceding comma in case of empty `__VA_ARGS__`: https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html It should be `##__VA_ARGS__`, but I don't know whether VS supports such syntax.
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7208: OpenVX HAL implementation extension - ### This pullrequest changes Added a few more immediate mode calls to OpenVX HAL API implementation

**Code Changes:**
```diff
@@ -7,6 +7,10 @@
 #include "VX/vxu.h"
 
 #include <string>
+#include <vector>
+
+#include <algorithm>
+#include <opencv2/core/saturate.hpp>
 
 //==================================================================================================
```

Review comment:
Probably we should not return error in such cases, but `CV_HAL_ERROR_NOT_IMPLEMENTED`. Many tests are failing because of this.
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7208: OpenVX HAL implementation extension - ### This pullrequest changes Added a few more immediate mode calls to OpenVX HAL API implementation

**Code Changes:**
```diff
@@ -7,6 +7,10 @@
 #include "VX/vxu.h"
 
 #include <string>
+#include <vector>
+
+#include <algorithm>
+#include <opencv2/core/saturate.hpp>
 
 //==================================================================================================
```

Review comment:
Looks like VS doesn't support `##__VA_ARGS__` since it could remove preceding comma automatically. I think it would be better to make macro non variadic and define mul function separately.
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** modified
**Context:** PR #7208: OpenVX HAL implementation extension - ### This pullrequest changes Added a few more immediate mode calls to OpenVX HAL API implementation
**Review Line:** 408

**Code Changes:**
```diff
+#define CV_HAL_INTER_LINEAR 1
+#define CV_HAL_INTER_CUBIC 2
+#define CV_HAL_INTER_AREA 3
+#define CV_HAL_INTER_LANCZOS4 4
+#define MORPH_ERODE 0
+#define MORPH_DILATE 1
+
+inline int ovx_hal_resize(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, double inv_scale_x, double inv_scale_y, int interpolation)
+{
+    try
+    {
```

Review comment:
This is wrong place to define these constants. They should be defined here only: https://github.com/opencv/opencv/blob/master/modules/imgproc/include/opencv2/imgproc/hal/interface.h
**File:** samples/cpp/peopledetect.cpp
**Change Type:** added
**Context:** PR #6937: Add peopledetect.cpp sample. -  ### This pullrequest adds  the peopledetect.cpp sample that is present in the 2.4 branch but was removed in ...

**Code Changes:**
```diff
@@ -0,0 +1,115 @@
+#include <opencv2/objdetect.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/imgproc.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+
```

Review comment:
Add `static` here or add prototype for this function to avoid compiler warning: > opencv/samples/cpp/peopledetect.cpp:27:6: warning: no previous prototype for function 'detectAndDraw' [-Wmissing-prototypes]
**File:** samples/cpp/peopledetect.cpp
**Change Type:** added
**Context:** PR #6937: Add peopledetect.cpp sample. -  ### This pullrequest adds  the peopledetect.cpp sample that is present in the 2.4 branch but was removed in ...

**Code Changes:**
```diff
@@ -0,0 +1,115 @@
+#include <opencv2/objdetect.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/imgproc.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+
```

Review comment:
Another way is to put the function into unnamed namespace.
**File:** samples/cpp/peopledetect.cpp
**Change Type:** added
**Context:** PR #6937: Add peopledetect.cpp sample. -  ### This pullrequest adds  the peopledetect.cpp sample that is present in the 2.4 branch but was removed in ...

**Code Changes:**
```diff
@@ -0,0 +1,115 @@
+#include <opencv2/objdetect.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/imgproc.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+
```

Review comment:
I fixed the warning.
**File:** samples/cpp/peopledetect.cpp
**Change Type:** added
**Context:** PR #6937: Add peopledetect.cpp sample. -  ### This pullrequest adds  the peopledetect.cpp sample that is present in the 2.4 branch but was removed in ...

**Code Changes:**
```diff
@@ -0,0 +1,115 @@
+#include <opencv2/objdetect.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/imgproc.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+
```

Review comment:
correct, but `static` is more traditional :)
**File:** samples/cpp/peopledetect.cpp
**Change Type:** added
**Context:** PR #6937: Add peopledetect.cpp sample. -  ### This pullrequest adds  the peopledetect.cpp sample that is present in the 2.4 branch but was removed in ...

**Code Changes:**
```diff
@@ -0,0 +1,115 @@
+#include <opencv2/objdetect.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/imgproc.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+
```

Review comment:
it's not true C++ style :)
**File:** modules/imgcodecs/test/test_grfmt.cpp
**Change Type:** modified
**Context:** PR #7064: Implementation of PAM encoder/decoder - **Merge with**: https://github.com/opencv/opencv_extra/pull/306 **Original PR**: https://github.com/...

**Code Changes:**
```diff
@@ -44,6 +44,7 @@
 
 #include <fstream>
 #include <sstream>
+#include <iostream>
 
 using namespace cv;
 using namespace std;
@@ -308,6 +309,7 @@ string ext_from_int(int ext)
 #ifdef HAVE_TIFF
```

Review comment:
"jpg/jpeg" -> "pam"
**File:** modules/imgcodecs/src/grfmt_gdal.cpp
**Change Type:** modified
**Context:** PR #7064: Implementation of PAM encoder/decoder - **Merge with**: https://github.com/opencv/opencv_extra/pull/306 **Original PR**: https://github.com/...
**Review Line:** 562

**Code Changes:**
```diff
@@ -559,7 +559,7 @@ bool GdalDecoder::checkSignature( const String& signature )const{
 
 
     // look for NITF
-    std::string str = signature.c_str();
+    std::string str(signature);
     if( str.substr(0,4).find("NITF") != std::string::npos ){
         return true;
     }
```

Review comment:
This [should](https://github.com/opencv/opencv/blob/28db4a220741b33ba59a30fac6dd8e470f444cf6/modules/core/include/opencv2/core/cvstd.inl.hpp#L115-L119) work fine with null terminated symbols: ``` std::string str(signature); ```
**File:** cmake/FindOpenVX.cmake
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -0,0 +1,20 @@
+ocv_clear_vars(HAVE_OPENVX OPENVX_LIBS)
+
+set(OPENVX_ROOT "" CACHE PATH "OpenVX install directory")
+
+if(OPENVX_ROOT)
+  find_path(OPENVX_INCLUDE_DIR "VX/vx.h" PATHS "${OPENVX_ROOT}/include" DOC "OpenVX include path")
+  find_library(OPENVX_openvx_LIB "openvx" PATHS "${OPENVX_ROOT}/lib")
+  find_library(OPENVX_vxu_LIB "vxu" PATHS "${OPENVX_ROOT}/lib")
+  set(OPENVX_LIBRARIES "${OPENVX_openvx_LIB}" "${OPENVX_vxu_LIB}" CACHE STRING "OpenVX libraries")
```

Review comment:
"openvx-c_model" is implementation "backend" and it is loaded dynamically.
**File:** cmake/FindOpenVX.cmake
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -0,0 +1,20 @@
+ocv_clear_vars(HAVE_OPENVX OPENVX_LIBS)
+
+set(OPENVX_ROOT "" CACHE PATH "OpenVX install directory")
+
+if(OPENVX_ROOT)
+  find_path(OPENVX_INCLUDE_DIR "VX/vx.h" PATHS "${OPENVX_ROOT}/include" DOC "OpenVX include path")
+  find_library(OPENVX_openvx_LIB "openvx" PATHS "${OPENVX_ROOT}/lib")
+  find_library(OPENVX_vxu_LIB "vxu" PATHS "${OPENVX_ROOT}/lib")
+  set(OPENVX_LIBRARIES "${OPENVX_openvx_LIB}" "${OPENVX_vxu_LIB}" CACHE STRING "OpenVX libraries")
```

Review comment:
What is about OPENVX_ROOT (like IPP_ROOT or OPENCV_ROOT) ?
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -190,6 +190,7 @@ OCV_OPTION(WITH_JPEG           "Include JPEG support"                        ON)
 OCV_OPTION(WITH_WEBP           "Include WebP support"                        ON   IF (NOT IOS AND NOT WINRT) )
 OCV_OPTION(WITH_OPENEXR        "Include ILM support via OpenEXR"             ON   IF (NOT IOS AND NOT WINRT) )
 OCV_OPTION(WITH_OPENGL         "Include OpenGL support"                      OFF  IF (NOT ANDROID AND NOT WINRT) )
+OCV_OPTION(WITH_OPENVX         "Include OpenVX support"                      OFF)
 OCV_OPTION(WITH_OPENNI         "Include OpenNI support"                      OFF  IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
 OCV_OPTION(WITH_OPENNI2        "Include OpenNI2 support"                     OFF  IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
 OCV_OPTION(WITH_PNG            "Include PNG support"                         ON)
@@ -615,6 +616,9 @@ endif()
 
```

Review comment:
I believe this block should go a few lines above before carotene (order is important).
**File:** cmake/FindOpenVX.cmake
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -0,0 +1,20 @@
+ocv_clear_vars(HAVE_OPENVX OPENVX_LIBS)
+
+set(OPENVX_ROOT "" CACHE PATH "OpenVX install directory")
+
+if(OPENVX_ROOT)
+  find_path(OPENVX_INCLUDE_DIR "VX/vx.h" PATHS "${OPENVX_ROOT}/include" DOC "OpenVX include path")
+  find_library(OPENVX_openvx_LIB "openvx" PATHS "${OPENVX_ROOT}/lib")
+  find_library(OPENVX_vxu_LIB "vxu" PATHS "${OPENVX_ROOT}/lib")
+  set(OPENVX_LIBRARIES "${OPENVX_openvx_LIB}" "${OPENVX_vxu_LIB}" CACHE STRING "OpenVX libraries")
```

Review comment:
I would make `OPENVX_LIBS` a `CACHE` variable, so user can overwrite it. OpenVX library might have another name, rather than `openvx`.
**File:** 3rdparty/openvx/CMakeLists.txt
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -0,0 +1,17 @@
+add_library(openvx_hal STATIC src/openvx_hal.cpp)
+target_include_directories(openvx_hal PUBLIC
+  ${CMAKE_CURRENT_SOURCE_DIR}/include
+  ${CMAKE_SOURCE_DIR}/modules/core/include
+  ${OPENVX_INCLUDE_DIR})
+target_link_libraries(openvx_hal LINK_PUBLIC ${OPENVX_LIBRARIES})
+set_target_properties(openvx_hal PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
+set_target_properties(openvx_hal PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH})
+if(NOT BUILD_SHARED_LIBS)
```

Review comment:
Is this line required?
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)
**Review Line:** 23

**Code Changes:**
```diff
+#else
+#define PRINT(...)
+#endif
+
+#if __cplusplus >= 201103L
+#include <chrono>
+struct Tick
+{
+    typedef std::chrono::time_point<std::chrono::steady_clock> point_t;
+    point_t start;
+    point_t point;
```

Review comment:
std::chrono::steady_clock requires [C++11](http://en.cppreference.com/w/cpp/chrono/steady_clock), which is not used in OpenCV by default. So this feature should be optional.
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -0,0 +1,196 @@
+#ifndef OPENCV_OPENVX_HAL_HPP_INCLUDED
+#define OPENCV_OPENVX_HAL_HPP_INCLUDED
+
+#include "opencv2/core/hal/interface.h"
+
+#include "VX/vx.h"
+#include "VX/vxu.h"
+
+#include <string>
```

Review comment:
Please use OPENCV prefix: `__OPENCV_OPENVX_HAL_HPP_INCLUDED__`
**File:** 3rdparty/openvx/src/openvx_hal.cpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -0,0 +1,8 @@
+#include "openvx_hal.hpp"
+
+vxContext * vxContext::getContext()
+{
+    // not thread safe
+    static vxContext instance;
+    return &instance;
+}
```

Review comment:
Context creation should go into `openvx_hal_init()`
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)
**Review Line:** 23

**Code Changes:**
```diff
+#else
+#define PRINT(...)
+#endif
+
+#if __cplusplus >= 201103L
+#include <chrono>
+struct Tick
+{
+    typedef std::chrono::time_point<std::chrono::steady_clock> point_t;
+    point_t start;
+    point_t point;
```

Review comment:
agree; if I remember correctly, we have TickMeter class or something like that in OpenCV - let's use it
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)
**Review Line:** 135

**Code Changes:**
```diff
+        vxReleaseContext(&ctx);
+    }
+};
+
+
+struct vxImage
+{
+    vx_image img;
+
+    template <typename T>
+    vxImage(vxContext &ctx, const T *data, size_t step, int w, int h)
```

Review comment:
can we use reference counters and override "=" operator?
**File:** 3rdparty/openvx/src/openvx_hal.cpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -0,0 +1,8 @@
+#include "openvx_hal.hpp"
+
+vxContext * vxContext::getContext()
+{
+    // not thread safe
+    static vxContext instance;
+    return &instance;
+}
```

Review comment:
we need to use C++ vx_image wrapper so that memory management is not needed
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)
**Review Line:** 23

**Code Changes:**
```diff
+#else
+#define PRINT(...)
+#endif
+
+#if __cplusplus >= 201103L
+#include <chrono>
+struct Tick
+{
+    typedef std::chrono::time_point<std::chrono::steady_clock> point_t;
+    point_t start;
+    point_t point;
```

Review comment:
Currently we do not have access to the TickMeter class from the custom HAL library. This (_Tick_) class was used during performance issues investigation, it is not used in actual code.
**File:** 3rdparty/openvx/src/openvx_hal.cpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)

**Code Changes:**
```diff
@@ -0,0 +1,8 @@
+#include "openvx_hal.hpp"
+
+vxContext * vxContext::getContext()
+{
+    // not thread safe
+    static vxContext instance;
+    return &instance;
+}
```

Review comment:
For now we do not have any calls for this function, but use single context instance via the vxContext class.
**File:** 3rdparty/openvx/include/openvx_hal.hpp
**Change Type:** added
**Context:** PR #7093: Initial version of OpenVX HAL - - added cmake support for OpenVX - added initial version of OpenVX HAL (immediate mode)
**Review Line:** 135

**Code Changes:**
```diff
+        vxReleaseContext(&ctx);
+    }
+};
+
+
+struct vxImage
+{
+    vx_image img;
+
+    template <typename T>
+    vxImage(vxContext &ctx, const T *data, size_t step, int w, int h)
```

Review comment:
Currently this class is used only to simplify `vx_image` creation and correct release. I'm not sure whether we need a custom assignment operator at this time?