nareshmlx/opencv-pr huggingface dataset:
**File:** modules/core/include/opencv2/core/ocl.hpp
**Change Type:** modified
**Context:** PR #2565: TAPI: stitching - Replacement for #2472. check_regression=OCL_stitch_:OCL_Warp_:OCL_Remap_ test_modules=core,features2d,stitching build_exam...
**Review Line:** 601

**Code Changes:**
```diff
@@ -598,6 +598,8 @@ CV_EXPORTS int predictOptimalVectorWidth(InputArray src1, InputArray src2 = noAr
                                          InputArray src4 = noArray(), InputArray src5 = noArray(), InputArray src6 = noArray(),
                                          InputArray src7 = noArray(), InputArray src8 = noArray(), InputArray src9 = noArray());
 
+CV_EXPORTS void buildOptionsAddMatrixDescription(String& buildOptions, const String& name, InputArray _m);
+
 class CV_EXPORTS Image2D
 {
 public:
```

Review comment:
I think this function should be removed, because it's better and more understandable to define all options directly. I'm sure this functions won't be used once again
**File:** modules/stitching/doc/matching.rst
**Change Type:** modified
**Context:** PR #2565: TAPI: stitching - Replacement for #2472. check_regression=OCL_stitch_:OCL_Warp_:OCL_Remap_ test_modules=core,features2d,stitching build_exam...
**Review Line:** 174

**Code Changes:**
```diff
@@ -171,7 +171,7 @@ Performs images matching.
 
     :param matches_info: Found matches
 
-.. ocv:function:: void detail::FeaturesMatcher::operator ()( const std::vector<ImageFeatures> & features, std::vector<MatchesInfo> & pairwise_matches, const Mat & mask=Mat() )
+.. ocv:function:: void detail::FeaturesMatcher::operator ()( const std::vector<ImageFeatures> & features, std::vector<MatchesInfo> & pairwise_matches, const UMat & mask=UMat() )
 
     :param features: Features of the source images
 
```

Review comment:
I think we should use `InputArray` anywhere instead of `UMat` in function's interfaces
**File:** modules/stitching/src/opencl/multibandblend.cl
**Change Type:** added
**Context:** PR #2565: TAPI: stitching - Replacement for #2472. check_regression=OCL_stitch_:OCL_Warp_:OCL_Remap_ test_modules=core,features2d,stitching build_exam...
**Review Line:** 204

**Code Changes:**
```diff
+#define __CONVERT(dstType) __CONVERT_ROUND(dstType,)
+#define __CONVERT_rte(dstType) __CONVERT_ROUND(dstType,_rte)
+#define __CONVERT_sat(dstType) __CONVERT_ROUND(dstType,_sat)
+#define __CONVERT_sat_rte(dstType) __CONVERT_ROUND(dstType,_sat_rte)
+#define CONVERT(srcType, dstType) REF(__CONVERT_MODE(srcType,dstType))(dstType)
+#define CONVERT_TO(dstType) __CONVERT_ROUND(dstType,)
+
+// OpenCV depths
+#define CV_8U   0
+#define CV_8S   1
+#define CV_16U  2
```

Review comment:
it's terrible. Sorry, but I cannot accept it. What prevents you from usage of classic `ocl::typeToStr`, `ocl::convertTypeStr?`
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds

**Code Changes:**
```diff
@@ -214,6 +214,8 @@ OCV_OPTION(ENABLE_SSSE3               "Enable SSSE3 instructions"
 OCV_OPTION(ENABLE_SSE41               "Enable SSE4.1 instructions"                               OFF  IF ((CV_ICC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
 OCV_OPTION(ENABLE_SSE42               "Enable SSE4.2 instructions"                               OFF  IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
 OCV_OPTION(ENABLE_AVX                 "Enable AVX instructions"                                  OFF  IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
+OCV_OPTION(ENABLE_NEON                "Enable NEON instructions"                                 OFF  IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
+OCV_OPTION(ENABLE_VFPV3               "Enable VFPv3-D32 instructions"                            OFF  IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
 OCV_OPTION(ENABLE_NOISY_WARNINGS      "Show all warnings even if they are too noisy"             OFF )
 OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors"                                 OFF )
 OCV_OPTION(ENABLE_WINRT_MODE          "Build with Windows Runtime support"                       OFF  IF WIN32 )
@@ -240,6 +242,15 @@ include(cmake/OpenCVVersion.cmake)
```

Review comment:
The second condition looks fishy to me. If the ABI is "armeabi-v7a with NEON", then NEON is already enabled through the toolchain file. So IMO, the second condition should actually be negated, since if it's true, the option won't do anything.
**File:** cmake/OpenCVCompilerOptions.cmake
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds

**Code Changes:**
```diff
@@ -130,6 +130,12 @@ if(CMAKE_COMPILER_IS_GNUCXX)
   if(ENABLE_SSE2)
     add_extra_compiler_option(-msse2)
   endif()
+  if (ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=neon")
+  endif()
+  if (ENABLE_VFPV3 AND NOT ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=vfpv3")
+  endif()
```

Review comment:
Since this option can't be set if neither `X86` nor `X86_64`, I think this change is pointless. Ditto for the `ARM` test below.
**File:** cmake/OpenCVCompilerOptions.cmake
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds

**Code Changes:**
```diff
@@ -130,6 +130,12 @@ if(CMAKE_COMPILER_IS_GNUCXX)
   if(ENABLE_SSE2)
     add_extra_compiler_option(-msse2)
   endif()
+  if (ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=neon")
+  endif()
+  if (ENABLE_VFPV3 AND NOT ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=vfpv3")
+  endif()
```

Review comment:
I'd prefer if there was an error when the user would specify the two of them together.
**File:** cmake/OpenCVCompilerOptions.cmake
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds

**Code Changes:**
```diff
@@ -130,6 +130,12 @@ if(CMAKE_COMPILER_IS_GNUCXX)
   if(ENABLE_SSE2)
     add_extra_compiler_option(-msse2)
   endif()
+  if (ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=neon")
+  endif()
+  if (ENABLE_VFPV3 AND NOT ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=vfpv3")
+  endif()
```

Review comment:
Actually, this options are not mutually exclusive. If NEON instruction set is present, then VFPv3 is present too. So, such condition is added to select wider instruction set if it is possible.
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds

**Code Changes:**
```diff
@@ -214,6 +214,8 @@ OCV_OPTION(ENABLE_SSSE3               "Enable SSSE3 instructions"
 OCV_OPTION(ENABLE_SSE41               "Enable SSE4.1 instructions"                               OFF  IF ((CV_ICC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
 OCV_OPTION(ENABLE_SSE42               "Enable SSE4.2 instructions"                               OFF  IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
 OCV_OPTION(ENABLE_AVX                 "Enable AVX instructions"                                  OFF  IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
+OCV_OPTION(ENABLE_NEON                "Enable NEON instructions"                                 OFF  IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
+OCV_OPTION(ENABLE_VFPV3               "Enable VFPv3-D32 instructions"                            OFF  IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
 OCV_OPTION(ENABLE_NOISY_WARNINGS      "Show all warnings even if they are too noisy"             OFF )
 OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors"                                 OFF )
 OCV_OPTION(ENABLE_WINRT_MODE          "Build with Windows Runtime support"                       OFF  IF WIN32 )
@@ -240,6 +242,15 @@ include(cmake/OpenCVVersion.cmake)
```

Review comment:
You should probably clarify that this means VFPv3-D32.
**File:** cmake/OpenCVCompilerOptions.cmake
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds
**Review Line:** 138

**Code Changes:**
```diff
+  if (ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=neon")
+  endif()
+  if (ENABLE_VFPV3 AND NOT ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=vfpv3")
+  endif()
 
   # SSE3 and further should be disabled under MingW because it generates compiler errors
   if(NOT MINGW)
```

Review comment:
If `ENABLE_XXX` was set by the ABI, this will add the option twice.
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds

**Code Changes:**
```diff
@@ -214,6 +214,8 @@ OCV_OPTION(ENABLE_SSSE3               "Enable SSSE3 instructions"
 OCV_OPTION(ENABLE_SSE41               "Enable SSE4.1 instructions"                               OFF  IF ((CV_ICC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
 OCV_OPTION(ENABLE_SSE42               "Enable SSE4.2 instructions"                               OFF  IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
 OCV_OPTION(ENABLE_AVX                 "Enable AVX instructions"                                  OFF  IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
+OCV_OPTION(ENABLE_NEON                "Enable NEON instructions"                                 OFF  IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
+OCV_OPTION(ENABLE_VFPV3               "Enable VFPv3-D32 instructions"                            OFF  IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
 OCV_OPTION(ENABLE_NOISY_WARNINGS      "Show all warnings even if they are too noisy"             OFF )
 OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors"                                 OFF )
 OCV_OPTION(ENABLE_WINRT_MODE          "Build with Windows Runtime support"                       OFF  IF WIN32 )
@@ -240,6 +242,15 @@ include(cmake/OpenCVVersion.cmake)
```

Review comment:
If you're going to use `MATCHES` anyway, why not `MATCHES "NEON"`?
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds

**Code Changes:**
```diff
@@ -214,6 +214,8 @@ OCV_OPTION(ENABLE_SSSE3               "Enable SSSE3 instructions"
 OCV_OPTION(ENABLE_SSE41               "Enable SSE4.1 instructions"                               OFF  IF ((CV_ICC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
 OCV_OPTION(ENABLE_SSE42               "Enable SSE4.2 instructions"                               OFF  IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
 OCV_OPTION(ENABLE_AVX                 "Enable AVX instructions"                                  OFF  IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
+OCV_OPTION(ENABLE_NEON                "Enable NEON instructions"                                 OFF  IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
+OCV_OPTION(ENABLE_VFPV3               "Enable VFPv3-D32 instructions"                            OFF  IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
 OCV_OPTION(ENABLE_NOISY_WARNINGS      "Show all warnings even if they are too noisy"             OFF )
 OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors"                                 OFF )
 OCV_OPTION(ENABLE_WINRT_MODE          "Build with Windows Runtime support"                       OFF  IF WIN32 )
@@ -240,6 +242,15 @@ include(cmake/OpenCVVersion.cmake)
```

Review comment:
armeabi-v7a with NEON is the only variant with NEON. But I think it is good idea.
**File:** cmake/OpenCVCompilerOptions.cmake
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds
**Review Line:** 138

**Code Changes:**
```diff
+  if (ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=neon")
+  endif()
+  if (ENABLE_VFPV3 AND NOT ENABLE_NEON)
+    add_extra_compiler_option("-mfpu=vfpv3")
+  endif()
 
   # SSE3 and further should be disabled under MingW because it generates compiler errors
   if(NOT MINGW)
```

Review comment:
Android toolchain adds -mfpu=neon for some cases, but not set ENABLE_XXX flags. I prefer to force ENABLE_XXX flag anyway to prevent some geisenbugs in future because of cmake flags inconsistency.
**File:** platforms/linux/arm-gnueabi.toolchain.cmake
**Change Type:** modified
**Context:** PR #1966: NEON instruction set control unified for regular and cross-compiler builds

**Code Changes:**
```diff
@@ -28,14 +28,11 @@ set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-s
 set(CMAKE_EXE_LINKER_FLAGS    "-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now ${CMAKE_EXE_LINKER_FLAGS}")
 
 if(USE_NEON)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon")
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon")
+  message(WARNING "You use obsolete variable USE_NEON to enable NEON instruction set. Use -DENABLE_NEON=ON instead." )
+  set(ENABLE_NEON TRUE)
 elseif(USE_VFPV3)
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=vfpv3")
```

Review comment:
I don't think you tested this branch. How do I know? There's no closing parenthesis. :smiley: Also, extraneous space before `WARNING`.
**File:** modules/androidcamera/camera_wrapper/camera_wrapper.cpp
**Change Type:** modified
**Context:** PR #2501: Native camera fix for some deivices with Qualcomm SoC like Samsung Galaxy S4. - The patch replaces normal object construction with placement...

**Code Changes:**
```diff
@@ -61,6 +61,12 @@
 
 using namespace android;
 
+// non-public camera related classes are not binary compatible
+// objects of these classes have different sizeof on different platforms
+// additional memory tail to all system objects to overcome sizeof issue
+#define MAGIC_TAIL 4096
+
+
```

Review comment:
`objects of these classes have`
**File:** modules/androidcamera/camera_wrapper/camera_wrapper.cpp
**Change Type:** modified
**Context:** PR #2501: Native camera fix for some deivices with Qualcomm SoC like Samsung Galaxy S4. - The patch replaces normal object construction with placement...

**Code Changes:**
```diff
@@ -61,6 +61,12 @@
 
 using namespace android;
 
+// non-public camera related classes are not binary compatible
+// objects of these classes have different sizeof on different platforms
+// additional memory tail to all system objects to overcome sizeof issue
+#define MAGIC_TAIL 4096
+
+
```

Review comment:
This indentation was good before, no?
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -460,10 +460,63 @@ void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, in
     Mat src = _src.getMat();
     _dst.create( src.size(), CV_32FC1 );
     Mat dst = _dst.getMat();
+
+#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_MAJOR >= 8)
+    typedef IppStatus (CV_STDCALL * ippiMinEigenValGetBufferSize)(IppiSize, int, int, int*);
+    typedef IppStatus (CV_STDCALL * ippiMinEigenVal)(const void*, int, Ipp32f*, int, IppiSize, IppiKernelType, int, int, Ipp8u*);
+    IppiKernelType kerType;
+    int kerSize = ksize;
```

Review comment:
http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch5/functn_MulC.html?
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -460,10 +460,63 @@ void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, in
     Mat src = _src.getMat();
     _dst.create( src.size(), CV_32FC1 );
     Mat dst = _dst.getMat();
+
+#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_MAJOR >= 8)
+    typedef IppStatus (CV_STDCALL * ippiMinEigenValGetBufferSize)(IppiSize, int, int, int*);
+    typedef IppStatus (CV_STDCALL * ippiMinEigenVal)(const void*, int, Ipp32f*, int, IppiSize, IppiKernelType, int, int, Ipp8u*);
+    IppiKernelType kerType;
+    int kerSize = ksize;
```

Review comment:
if you want understand whether `src` is ROI or not, use `src.isSubmatrix()?`
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -460,10 +460,63 @@ void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, in
     Mat src = _src.getMat();
     _dst.create( src.size(), CV_32FC1 );
     Mat dst = _dst.getMat();
+
+#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_MAJOR >= 8)
+    typedef IppStatus (CV_STDCALL * ippiMinEigenValGetBufferSize)(IppiSize, int, int, int*);
+    typedef IppStatus (CV_STDCALL * ippiMinEigenVal)(const void*, int, Ipp32f*, int, IppiSize, IppiKernelType, int, int, Ipp8u*);
+    IppiKernelType kerType;
+    int kerSize = ksize;
```

Review comment:
Unfortunately, in-place function is deprecated. Perhaps using similar function and additional memory will be faster. I'll check it later.
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -460,10 +460,63 @@ void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, in
     Mat src = _src.getMat();
     _dst.create( src.size(), CV_32FC1 );
     Mat dst = _dst.getMat();
+
+#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_MAJOR >= 8)
+    typedef IppStatus (CV_STDCALL * ippiMinEigenValGetBufferSize)(IppiSize, int, int, int*);
+    typedef IppStatus (CV_STDCALL * ippiMinEigenVal)(const void*, int, Ipp32f*, int, IppiSize, IppiKernelType, int, int, Ipp8u*);
+    IppiKernelType kerType;
+    int kerSize = ksize;
```

Review comment:
> in-place function is deprecated you can use non-inplace with src = dst
**File:** modules/imgproc/perf/perf_corners.cpp
**Change Type:** added
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -0,0 +1,92 @@
+#include "perf_precomp.hpp"
+
+using namespace std;
+using namespace cv;
+using namespace perf;
+using std::tr1::make_tuple;
+using std::tr1::get;
+
+CV_ENUM(BorderType, BORDER_REPLICATE, BORDER_CONSTANT, BORDER_REFLECT, BORDER_REFLECT_101)
```

Review comment:
I expect `ERROR_RELATIVE` here and in other places below.
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -460,10 +460,63 @@ void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, in
     Mat src = _src.getMat();
     _dst.create( src.size(), CV_32FC1 );
     Mat dst = _dst.getMat();
+
+#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_MAJOR >= 8)
+    typedef IppStatus (CV_STDCALL * ippiMinEigenValGetBufferSize)(IppiSize, int, int, int*);
+    typedef IppStatus (CV_STDCALL * ippiMinEigenVal)(const void*, int, Ipp32f*, int, IppiSize, IppiKernelType, int, int, Ipp8u*);
+    IppiKernelType kerType;
+    int kerSize = ksize;
```

Review comment:
what if `borderType = BORDER_REPLICATE | BORDER_ISOLATED`? And what about `BORDER_CONSTANT`, `BORDER_WRAP`, etc?
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -460,10 +460,63 @@ void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, in
     Mat src = _src.getMat();
     _dst.create( src.size(), CV_32FC1 );
     Mat dst = _dst.getMat();
+
+#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_MAJOR >= 8)
+    typedef IppStatus (CV_STDCALL * ippiMinEigenValGetBufferSize)(IppiSize, int, int, int*);
+    typedef IppStatus (CV_STDCALL * ippiMinEigenVal)(const void*, int, Ipp32f*, int, IppiSize, IppiKernelType, int, int, Ipp8u*);
+    IppiKernelType kerType;
+    int kerSize = ksize;
```

Review comment:
`dstRoi == srcRoi`
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*
**Review Line:** 495

**Code Changes:**
```diff
+            norm_coef = 1.f / 255.f;
+        } else if (src.type() == CV_32FC1)
+        {
+            getBufferSizeFunc = (ippiMinEigenValGetBufferSize) ippiMinEigenValGetBufferSize_32f_C1R;
+            minEigenValFunc = (ippiMinEigenVal) ippiMinEigenVal_32f_C1R;
+            norm_coef = 255.f;
+        }
+
+        if (getBufferSizeFunc && minEigenValFunc)
+        {
+            int bufferSize;
```

Review comment:
`OpenCV` defines `scale` as: ``` float scale = (float)(1 << ((aperture_size > 0 ? aperture_size : 3) - 1)) * block_size; if (aperture_size < 0) scale *= 2.0f; if (depth == CV_8U) scale *= 255.0f; scale = 1.0f / scale; ```
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -460,10 +460,63 @@ void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, in
     Mat src = _src.getMat();
     _dst.create( src.size(), CV_32FC1 );
     Mat dst = _dst.getMat();
+
+#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_MAJOR >= 8)
+    typedef IppStatus (CV_STDCALL * ippiMinEigenValGetBufferSize)(IppiSize, int, int, int*);
+    typedef IppStatus (CV_STDCALL * ippiMinEigenVal)(const void*, int, Ipp32f*, int, IppiSize, IppiKernelType, int, int, Ipp8u*);
+    IppiKernelType kerType;
+    int kerSize = ksize;
```

Review comment:
I meant that if `borderType` is `BORDER_REPLICATE | BORDER_ISOLATED` and `!src.isSubmatrix()` then your condition is `false`, but should be `true`, because `BORDER_ISOLATED` is useless in this case. The correct condition is: ``` bool isolated = (borderType & BORDER_ISOLATED) != 0; int borderTypeNI = borderType & ~BORDER_ISOLATED; if (borderTypeNI == BORDER_REPLICATE && (!src.isSubmatrix() || isolated)) ```
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*

**Code Changes:**
```diff
@@ -460,10 +460,63 @@ void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, in
     Mat src = _src.getMat();
     _dst.create( src.size(), CV_32FC1 );
     Mat dst = _dst.getMat();
+
+#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_MAJOR >= 8)
+    typedef IppStatus (CV_STDCALL * ippiMinEigenValGetBufferSize)(IppiSize, int, int, int*);
+    typedef IppStatus (CV_STDCALL * ippiMinEigenVal)(const void*, int, Ipp32f*, int, IppiSize, IppiKernelType, int, int, Ipp8u*);
+    IppiKernelType kerType;
+    int kerSize = ksize;
```

Review comment:
I got it. Sorry, I haven't updated PR yet.
**File:** modules/imgproc/src/corner.cpp
**Change Type:** modified
**Context:** PR #2605: IPP: cornerMinEigenVal - Merge with extra: Itseez/opencv_extra#167 check_regression=_Img_MinEigenVal*
**Review Line:** 495

**Code Changes:**
```diff
+            norm_coef = 1.f / 255.f;
+        } else if (src.type() == CV_32FC1)
+        {
+            getBufferSizeFunc = (ippiMinEigenValGetBufferSize) ippiMinEigenValGetBufferSize_32f_C1R;
+            minEigenValFunc = (ippiMinEigenVal) ippiMinEigenVal_32f_C1R;
+            norm_coef = 255.f;
+        }
+
+        if (getBufferSizeFunc && minEigenValFunc)
+        {
+            int bufferSize;
```

Review comment:
`scale` is different from `norm_coef`. I think that `scale` is calculated and used within IPP function. `norm_coef` does not depend on `aperture_size` or `block_size`. It's necessary to normalize result depending on source type.