nareshmlx/opencv-pr huggingface dataset:
**File:** modules/python/common.cmake
**Change Type:** added
**Context:** PR #3047: Build both Python 2 and Python 3 bindings - This replaces #2912 and potentially #3040 by @vpisarev. I have once again updated my branch with...

**Code Changes:**
```diff
@@ -0,0 +1,139 @@
+# This file is included from a subdirectory
+set(PYTHON_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../")
+
+set(candidate_deps "")
+foreach(mp ${OPENCV_MODULES_PATH} ${OPENCV_EXTRA_MODULES_PATH})
+    file(GLOB names "${mp}/*")
+    foreach(m IN LISTS names)
+        if(IS_DIRECTORY ${m})
+            get_filename_component(m ${m} NAME)
```

Review comment:
That would work. I think a better solution would be to run the test suite with PYTHONPATH set to the library subdirectory. That way, it would be trivial to run the test suite on Python 3 as well. It looks like a few trivial changes to Python test.py can make it compatible with Python 2 and 3. I have searched and searched to no avail trying to find the rule that runs the Python tests so that I can update it. I found the actual test script in modules/python/test/, but cannot find the test rules that invoke it. Is this something built into Buildbot that needs to be updated?
**File:** modules/python/common.cmake
**Change Type:** added
**Context:** PR #3047: Build both Python 2 and Python 3 bindings - This replaces #2912 and potentially #3040 by @vpisarev. I have once again updated my branch with...

**Code Changes:**
```diff
@@ -0,0 +1,139 @@
+# This file is included from a subdirectory
+set(PYTHON_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../")
+
+set(candidate_deps "")
+foreach(mp ${OPENCV_MODULES_PATH} ${OPENCV_EXTRA_MODULES_PATH})
+    file(GLOB names "${mp}/*")
+    foreach(m IN LISTS names)
+        if(IS_DIRECTORY ${m})
+            get_filename_component(m ${m} NAME)
```

Review comment:
yes, this is why I suggest to change the build script instead of changing buildbot rules. it's not a single instance of buildbot, there are also other versions for internal branches. I would prefer that cv2.so stays where it's now
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()
**Review Line:** 2574

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
 #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
     typedef IppStatus (CV_STDCALL* ippiSetFunc)(const void*, void *, int, IppiSize);
     typedef IppStatus (CV_STDCALL* ippiWarpPerspectiveBackFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [3][3], int);
     typedef IppStatus (CV_STDCALL* ippiWarpAffineBackFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [2][3], int);
-    typedef IppStatus (CV_STDCALL* ippiResizeSqrPixelFunc)(const void*, IppiSize, int, IppiRect, void*, int, IppiRect, double, double, double, double, int, Ipp8u *);
```

Review comment:
I suspect it's incorrect rebase
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()
**Review Line:** 2459

**Code Changes:**
```diff
@@ -2366,14 +2456,14 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
         if( sx < ksize2-1 )
         {
             xmin = dx+1;
-            if( sx < 0 )
+            if( sx < 0 && (interpolation != INTER_CUBIC && interpolation != INTER_LANCZOS4))
                 fx = 0, sx = 0;
         }
 
         if( sx + ksize2 >= ssize.width )
         {
```

Review comment:
How can you explain these changes?
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()
**Review Line:** 2459

**Code Changes:**
```diff
@@ -2366,14 +2456,14 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
         if( sx < ksize2-1 )
         {
             xmin = dx+1;
-            if( sx < 0 )
+            if( sx < 0 && (interpolation != INTER_CUBIC && interpolation != INTER_LANCZOS4))
                 fx = 0, sx = 0;
         }
 
         if( sx + ksize2 >= ssize.width )
         {
```

Review comment:
Fixed inaccuracy in border's replication for cubic interpolation. Source code shifts src pixel's index, where dst pixel displayed, and then function HresizeCubic::operator() again shifts index.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
misunderstanding. I mean that `func` can be initialized as `0` (for e.g. if `type == CV_64FC17`), so you should check whether `func` is `0` or not. But what's regarding returned value - I don't know.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
Do you mean check if( func!=0 && func( .. ) <0) ?
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
yes, I would see this check exactly after `func` initialization to avoid possible overhead: ``` func = ... : 0; if (func == 0) { *ok = false, return; } ```
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
`(IPP_VERSION_MAJOR == 7 && IPP_VERSION_MINOR >= 1) || IPP_VERSION_MAJOR > 7` mean that for ippiResize we can use IPP 7.1 and more, but can't use 7.0. `IPP_VERSION_MAJOR > 7` mean onli 8.0 and 8.0.1
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
itemSize should be 8 here, right?
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
it's not very good style to have multiple switch statements. Can we have a single switch on the datatype and interpolation, where you will put all the relevant code?
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()
**Review Line:** 2667

**Code Changes:**
```diff
@@ -2574,7 +2664,7 @@ struct RemapVec_8u
         int cn = _src.channels(), x = 0, sstep = (int)_src.step;
 
         if( (cn != 1 && cn != 3 && cn != 4) || !checkHardwareSupport(CV_CPU_SSE2) ||
-                sstep > 0x8000 )
+            sstep > 0x8000 )
             return 0;
 
         const uchar *S0 = _src.data, *S1 = _src.data + _src.step;
```

Review comment:
what's the change here? a single space?
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
`IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701`
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()
**Review Line:** 2667

**Code Changes:**
```diff
@@ -2574,7 +2664,7 @@ struct RemapVec_8u
         int cn = _src.channels(), x = 0, sstep = (int)_src.step;
 
         if( (cn != 1 && cn != 3 && cn != 4) || !checkHardwareSupport(CV_CPU_SSE2) ||
-                sstep > 0x8000 )
+            sstep > 0x8000 )
             return 0;
 
         const uchar *S0 = _src.data, *S1 = _src.data + _src.step;
```

Review comment:
First, there was a change, but it was decided to cancel
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
the macros names (CHECK_FUNCTION, CHECK_STATUS) look very common, there is risk that someone will define them and the code will not compile. It would be safe to put <pre> #undef CHECK_FUNC #undef CHECK_STATUS </pre> before those definitions
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
why the "if" on the interpolation mode is not put inside the macro? It would help to retain just one switch below instead of the two
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()
**Review Line:** 1943

**Code Changes:**
```diff
+          case CV_64FC4: SET_IPP_RESIZE_LINEAR_FUNC_64_PTR(64f,C4); break;
+          default: { *ok = false; return;} break;
+          }
+      }
+
+      ~IPPresizeInvoker()
+      {
       }
 
       virtual void operator() (const Range& range) const
       {
```

Review comment:
I think, the destructor should be virtual
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
since we are chaining this code anyway, can you replace CV_IMIN with std::min?
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
Let's write itemSize = src.elemSize1(); instead of setting itemSize explicitly inside the switch.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
I would initialize pointers to those functions in the IPPInvoker constructor, so that the operator () does not have this switch anymore.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()
**Review Line:** 1943

**Code Changes:**
```diff
+          case CV_64FC4: SET_IPP_RESIZE_LINEAR_FUNC_64_PTR(64f,C4); break;
+          default: { *ok = false; return;} break;
+          }
+      }
+
+      ~IPPresizeInvoker()
+      {
       }
 
       virtual void operator() (const Range& range) const
       {
```

Review comment:
`ParallelLoopBody` already has virtual destructor, so `virtual` for `~IPPresizeInvoker` is just for clarity
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #2381: Added IPP function for resize()

**Code Changes:**
```diff
@@ -55,12 +55,16 @@ static IppStatus sts = ippInit();
 
 namespace cv
 {
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701)
+    typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*);
+    typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
+#endif
 
```

Review comment:
why is this extra check? You already set func in the constructor. If you want extra protection against programmer errors, use CV_Assert() instead.
**File:** modules/cudaoptflow/CMakeLists.txt
**Change Type:** modified
**Context:** PR #3018: Fix Module opencv_cudaoptflow disabled (Bug #3788) - Removed opencv_legacy dependency from cudaoptflow
**Review Line:** 9

**Code Changes:**
```diff
@@ -6,4 +6,4 @@ set(the_description "CUDA-accelerated Optical Flow")
 
 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wmissing-declarations)
 
-ocv_define_module(cudaoptflow opencv_video opencv_legacy opencv_cudaarithm opencv_cudawarping opencv_cudaimgproc OPTIONAL opencv_cudalegacy)
+ocv_define_module(cudaoptflow opencv_video opencv_cudaarithm opencv_cudawarping opencv_cudaimgproc OPTIONAL opencv_cudalegacy)
```

Review comment:
Shouldn't the optional parameter be removed here also?
**File:** modules/imgproc/perf/perf_pyramids.cpp
**Change Type:** modified
**Context:** PR #2627: IPP: pyramids - Merge with extra: Itseez/opencv_extra#171 check_regression=_pyrUp_:_pyrDown_:_buildPyramid_

**Code Changes:**
```diff
@@ -8,12 +8,14 @@ using std::tr1::get;
 
 PERF_TEST_P(Size_MatType, pyrDown, testing::Combine(
                 testing::Values(sz1080p, sz720p, szVGA, szQVGA, szODD),
-                testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_16SC1, CV_16SC3, CV_16SC4)
+                testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_16SC1, CV_16SC3, CV_16SC4, CV_32FC1, CV_32FC3, CV_32FC4)
                 )
             )
 {
     Size sz = get<0>(GetParam());
```

Review comment:
`eps == 1` with `ERROR_RELATIVE` means 100% discrepancy. I am not sure that we need `ERROR_RELATIVE` for integer types.
**File:** modules/imgproc/perf/perf_pyramids.cpp
**Change Type:** modified
**Context:** PR #2627: IPP: pyramids - Merge with extra: Itseez/opencv_extra#171 check_regression=_pyrUp_:_pyrDown_:_buildPyramid_

**Code Changes:**
```diff
@@ -8,12 +8,14 @@ using std::tr1::get;
 
 PERF_TEST_P(Size_MatType, pyrDown, testing::Combine(
                 testing::Values(sz1080p, sz720p, szVGA, szQVGA, szODD),
-                testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_16SC1, CV_16SC3, CV_16SC4)
+                testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_16SC1, CV_16SC3, CV_16SC4, CV_32FC1, CV_32FC3, CV_32FC4)
                 )
             )
 {
     Size sz = get<0>(GetParam());
```

Review comment:
My fault. Fixed.
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #2320: LICENSE and README files installation rules added.

**Code Changes:**
```diff
@@ -592,6 +592,28 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX AND NOT ANDROID)
           DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
 endif()
 
+if(NOT OPENCV_README_FILE)
+  if(ANDROID)
+    set(OPENCV_README_FILE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/README.android)
+  endif()
+endif()
+
```

Review comment:
These are the defaults, so why bother?
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #2320: LICENSE and README files installation rules added.

**Code Changes:**
```diff
@@ -592,6 +592,28 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX AND NOT ANDROID)
           DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
 endif()
 
+if(NOT OPENCV_README_FILE)
+  if(ANDROID)
+    set(OPENCV_README_FILE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/README.android)
+  endif()
+endif()
+
```

Review comment:
"sense" misspelled.
**File:** modules/imgproc/src/templmatch.cpp
**Change Type:** modified
**Context:** PR #2617: Fixed ipp_crossCorr - Imgproc_Filter2D.accuracy had bad accuracy

**Code Changes:**
```diff
@@ -423,11 +423,6 @@ void crossCorr( const Mat& img, const Mat& _templ, Mat& corr,
                 Size corrsize, int ctype,
                 Point anchor, double delta, int borderType )
 {
-#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
-    if (ipp_crossCorr(img, _templ, corr))
-        return;
-#endif
-
     const double blockScale = 4.5;
```

Review comment:
the code inside `ifdef` is equal to `if (!ipp_crossCorr(img, templ, result))`
**File:** modules/imgproc/src/deriv.cpp
**Change Type:** modified
**Context:** PR #2618: Change Scharr filter to new ipp functions - build_examples=OFF Scharr: test_filter=_char_ check_regression=_char_

**Code Changes:**
```diff
@@ -185,11 +185,141 @@ cv::Ptr<cv::FilterEngine> cv::createDerivFilter(int srcType, int dstType,
 
 #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
 
+#define IPP_RETURN_ERROR    {setIppErrorStatus(); return false;}
+
 namespace cv
 {
+#if (IPP_VERSION_X100 >= 801)
+static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
```

Review comment:
please, use `ippiGetBorderType` from `modules/core/include/opencv2/core/private.hpp`
**File:** modules/imgproc/src/deriv.cpp
**Change Type:** modified
**Context:** PR #2618: Change Scharr filter to new ipp functions - build_examples=OFF Scharr: test_filter=_char_ check_regression=_char_

**Code Changes:**
```diff
@@ -185,11 +185,141 @@ cv::Ptr<cv::FilterEngine> cv::createDerivFilter(int srcType, int dstType,
 
 #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
 
+#define IPP_RETURN_ERROR    {setIppErrorStatus(); return false;}
+
 namespace cv
 {
+#if (IPP_VERSION_X100 >= 801)
+static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
```

Review comment:
`FLT_EPSILON`?
**File:** modules/imgproc/src/deriv.cpp
**Change Type:** modified
**Context:** PR #2618: Change Scharr filter to new ipp functions - build_examples=OFF Scharr: test_filter=_char_ check_regression=_char_

**Code Changes:**
```diff
@@ -185,11 +185,141 @@ cv::Ptr<cv::FilterEngine> cv::createDerivFilter(int srcType, int dstType,
 
 #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
 
+#define IPP_RETURN_ERROR    {setIppErrorStatus(); return false;}
+
 namespace cv
 {
+#if (IPP_VERSION_X100 >= 801)
+static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
```

Review comment:
doesn't `Scharr` support `BORDER_CONSTANT`? I expect the condition like `if (ippiBorderType < 0) return false;`
**File:** modules/imgproc/src/deriv.cpp
**Change Type:** modified
**Context:** PR #2618: Change Scharr filter to new ipp functions - build_examples=OFF Scharr: test_filter=_char_ check_regression=_char_

**Code Changes:**
```diff
@@ -185,11 +185,141 @@ cv::Ptr<cv::FilterEngine> cv::createDerivFilter(int srcType, int dstType,
 
 #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
 
+#define IPP_RETURN_ERROR    {setIppErrorStatus(); return false;}
+
 namespace cv
 {
+#if (IPP_VERSION_X100 >= 801)
+static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
```

Review comment:
do you mean `borderType` instead of `IppiBorderType`?