nareshmlx/opencv-pr huggingface dataset:
**File:** modules/imgproc/src/lsd.cpp
**Change Type:** modified
**Context:** PR #10024: Clearing data into the detect method of the class cv::LineSegmentDete… - close #10023 ### Clearing data into the detect method of the class...
**Review Line:** 435

**Code Changes:**
```diff
     if(w_needed) Mat(w).copyTo(_width);
     if(p_needed) Mat(p).copyTo(_prec);
     if(n_needed) Mat(n).copyTo(_nfa);
+
+    // Clear used structures
+    list.clear();
 }
 
 void LineSegmentDetectorImpl::flsd(std::vector<Vec4f>& lines,
```

Review comment:
`ll_angle` fills it as a row/column ordered list of all image points(actually almost all) and link it in special order, however the list head and tail pointers are local variables and are discarded as soon as list is constructed and the link order isn't used anywhere also. `flsd` function use the list as an array to iterate over all stored points in a straight way and doesn't consider list ordering. So actually it just iterates over all image points.
**File:** modules/core/perf/opencl/perf_arithm.cpp
**Change Type:** modified
**Context:** PR #9753: core: remove raw SSE2/NEON implementation from matmul.cpp - **Merge with extra**: opencv/opencv_extra#400 ### This pullrequest changes * use...

**Code Changes:**
```diff
@@ -1062,6 +1062,34 @@ OCL_PERF_TEST_P(ScaleAddFixture, ScaleAdd,
     SANITY_CHECK(dst, 1e-6);
 }
 
+///////////// Transform ////////////////////////
+
+typedef Size_MatType TransformFixture;
+
+OCL_PERF_TEST_P(TransformFixture, Transform,
+                ::testing::Combine(OCL_TEST_SIZES,
```

Review comment:
Probably this check should be changed too.
**File:** modules/core/perf/perf_mat.cpp
**Change Type:** modified
**Context:** PR #9753: core: remove raw SSE2/NEON implementation from matmul.cpp - **Merge with extra**: opencv/opencv_extra#400 ### This pullrequest changes * use...

**Code Changes:**
```diff
@@ -96,3 +96,31 @@ PERF_TEST_P(Size_MatType, Mat_Clone_Roi,
 
     SANITY_CHECK(destination, 1);
 }
+
+///////////// Transform ////////////////////////
+
+PERF_TEST_P(Size_MatType, Mat_Transform,
+            testing::Combine(testing::Values(TYPICAL_MAT_SIZES),
+                             testing::Values(CV_8UC3, CV_8SC3, CV_16UC3, CV_16SC3, CV_32SC3, CV_32FC3, CV_64FC3))
```

Review comment:
Why do we need this?
**File:** modules/core/perf/perf_mat.cpp
**Change Type:** modified
**Context:** PR #9753: core: remove raw SSE2/NEON implementation from matmul.cpp - **Merge with extra**: opencv/opencv_extra#400 ### This pullrequest changes * use...

**Code Changes:**
```diff
@@ -96,3 +96,31 @@ PERF_TEST_P(Size_MatType, Mat_Clone_Roi,
 
     SANITY_CHECK(destination, 1);
 }
+
+///////////// Transform ////////////////////////
+
+PERF_TEST_P(Size_MatType, Mat_Transform,
+            testing::Combine(testing::Values(TYPICAL_MAT_SIZES),
+                             testing::Values(CV_8UC3, CV_8SC3, CV_16UC3, CV_16SC3, CV_32SC3, CV_32FC3, CV_64FC3))
```

Review comment:
On some situation, the sanity check was raising error. It seems that the final result was larger than the maximum of ```int``` The RNG was filling all 32bits of the input, so in some cases, the transform ends in following process, ````0x8fffffff * 1 + 0x8fffffff * 1 + 1```` which is clearly larger than the maximum of int. If there's a way to restrict the range of the input matrix, that would be great, but this was the best way I know. Does this make sense ?
**File:** modules/core/src/matmul.cpp
**Change Type:** modified
**Context:** PR #9753: core: remove raw SSE2/NEON implementation from matmul.cpp - **Merge with extra**: opencv/opencv_extra#400 ### This pullrequest changes * use...

**Code Changes:**
```diff
@@ -1699,41 +1699,53 @@ transform_( const T* src, T* dst, const WT* m, int len, int scn, int dcn )
     }
 }
 
-#if CV_SSE2
-
+#if CV_SIMD128
 static inline void
-load3x3Matrix( const float* m, __m128& m0, __m128& m1, __m128& m2, __m128& m3 )
+load3x3Matrix(const float* m, v_float32x4& m0, v_float32x4& m1, v_float32x4& m2, v_float32x4& m3)
```

Review comment:
There is no 0,0,0,0 values - it is [out of buffer reading](http://pullrequest.opencv.org/buildbot/builders/precommit_macosx/builds/13135/steps/perf_core/logs/stdio). We currently don't have `v_load_low` (similar to `v_store_low`) intrinsic to use it here (see #10083). Something like this should work somehow: ``` // load 4 pixels v_uint16x8 v0_16 = v_load(src + x); // b0 g0 r0 b1 g1 r1 b2 g2 v_uint16x8 v2_16 = v_load(src + x + cWidth * 3 - 8); // g1 r1 b2 g2 r2 b3 g3 r3 // expand to 4 vectors v_uint32x4 v0_32, v1_32, v2_32, v3_32, dummy_32; v_expand(v_rotate_right<3>(v0_16), v1_32, dummy_32); // b1 g1 r1 v_expand(v_rotate_right<5>(v2_16), v3_32, dummy_32); // b3 g3 r3 v_expand(v_rotate_right<2>(v2_16), v2_32, dummy_32); // b2 g2 r2 v_expand(v0_16, v0_32, dummy_32); // b0 g0 r0 ``` BTW, Did you try to use this function? ``` void v_load_deinterleave(const ushort* ptr, v_uint16x8& a, v_uint16x8& b, v_uint16x8& c) ``` (but it loads 8 pixels instead of 4)
**File:** modules/core/src/matmul.cpp
**Change Type:** modified
**Context:** PR #9753: core: remove raw SSE2/NEON implementation from matmul.cpp - **Merge with extra**: opencv/opencv_extra#400 ### This pullrequest changes * use...
**Review Line:** 1819

**Code Changes:**
```diff
 static void
 transform_16u( const ushort* src, ushort* dst, const float* m, int len, int scn, int dcn )
 {
-#if CV_SSE2
-    if( USE_SSE2 && scn == 3 && dcn == 3 )
+#if CV_SIMD128 && !defined(__aarch64__)
+    if( hasSIMD128() && scn == 3 && dcn == 3 )
     {
-        __m128 m0, m1, m2, m3;
-        __m128i delta = _mm_setr_epi16(0,-32768,-32768,-32768,-32768,-32768,-32768,0);
+        const int nChannels = 3;
```

Review comment:
Yes I disabled on ```__aarch64__``` for performance reason. Auto optimization of compiler matched well for 16U on 64bit ARM An example of measurement from ```Mat_Transform::Size_MatType::(1920x1080, 16UC3)``` on several ```__aarch64__``` platform. The column "after" stands for universal intrinsic and "before" stands for pure C++ code with compiler optimization. The x-factor had similar value on every size. platform|before|after|x-factor ----|----|----|---- Jetson-TX1|64.104 ms|117.306 ms|0.55 Jetson-TX2|47.393 ms|102.986 ms|0.46 ODROID-C2|145.647 ms|176.398 ms|0.83
**File:** modules/core/include/opencv2/core/utils/filesystem.hpp
**Change Type:** added
**Context:** PR #10018: OCL: add cache for OpenCL compiled programs - Default cache locations is under: - Linux: `/home/<user>/.cache/opencv/` (in general) - Windo...

**Code Changes:**
```diff
@@ -0,0 +1,38 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_UTILS_FILESYSTEM_HPP
+#define OPENCV_UTILS_FILESYSTEM_HPP
+
+namespace cv { namespace utils { namespace fs {
+
```

Review comment:
it's wrong grammar. I suggest `doesExist()`, `isValidPath()`, `pathExist()`, `isFileOrDirectory()` etc.
**File:** modules/core/include/opencv2/core/ocl.hpp
**Change Type:** modified
**Context:** PR #10018: OCL: add cache for OpenCL compiled programs - Default cache locations is under: - Linux: `/home/<user>/.cache/opencv/` (in general) - Windo...
**Review Line:** 265

**Code Changes:**
```diff
@@ -261,6 +261,8 @@ class CV_EXPORTS Context
     void setUseSVM(bool enabled);
 
     struct Impl;
+    inline Impl* getImpl() const { return (Impl*)p; }
+//protected:
     Impl* p;
 };
 
```

Review comment:
why `Impl* p` is not protected anymore if we have getImpl()?
**File:** modules/core/include/opencv2/core/utils/filesystem.hpp
**Change Type:** added
**Context:** PR #10018: OCL: add cache for OpenCL compiled programs - Default cache locations is under: - Linux: `/home/<user>/.cache/opencv/` (in general) - Windo...

**Code Changes:**
```diff
@@ -0,0 +1,38 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_UTILS_FILESYSTEM_HPP
+#define OPENCV_UTILS_FILESYSTEM_HPP
+
+namespace cv { namespace utils { namespace fs {
+
```

Review comment:
should we use getOCLCacheDirectory or getOpenCLCacheDirectory name? I think, using `OpenCV` word in OpenCV function name is unnecessary
**File:** modules/core/include/opencv2/core/utils/filesystem.private.hpp
**Change Type:** added
**Context:** PR #10018: OCL: add cache for OpenCL compiled programs - Default cache locations is under: - Linux: `/home/<user>/.cache/opencv/` (in general) - Windo...

**Code Changes:**
```diff
@@ -0,0 +1,64 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_UTILS_FILESYSTEM_PRIVATE_HPP
+#define OPENCV_UTILS_FILESYSTEM_PRIVATE_HPP
+
+// TODO Move to CMake?
+#ifndef OPENCV_HAVE_FILESYSTEM_SUPPORT
```

Review comment:
We are trying to use mixed case names for methods everywhere in OpenCV. Can we do it here as well?
**File:** modules/core/include/opencv2/core/utils/filesystem.hpp
**Change Type:** added
**Context:** PR #10018: OCL: add cache for OpenCL compiled programs - Default cache locations is under: - Linux: `/home/<user>/.cache/opencv/` (in general) - Windo...

**Code Changes:**
```diff
@@ -0,0 +1,38 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_UTILS_FILESYSTEM_HPP
+#define OPENCV_UTILS_FILESYSTEM_HPP
+
+namespace cv { namespace utils { namespace fs {
+
```

Review comment:
Changed to `exists()`: http://en.cppreference.com/w/cpp/filesystem/exists
**File:** modules/core/include/opencv2/core/ocl.hpp
**Change Type:** modified
**Context:** PR #10018: OCL: add cache for OpenCL compiled programs - Default cache locations is under: - Linux: `/home/<user>/.cache/opencv/` (in general) - Windo...
**Review Line:** 265

**Code Changes:**
```diff
@@ -261,6 +261,8 @@ class CV_EXPORTS Context
     void setUseSVM(bool enabled);
 
     struct Impl;
+    inline Impl* getImpl() const { return (Impl*)p; }
+//protected:
     Impl* p;
 };
 
```

Review comment:
Because "p" is not protected initially. It is "TODO" mark for future releases. Accurate testing of libva / directx / opengl integrations is required before apply this.
**File:** modules/core/include/opencv2/core/utils/filesystem.private.hpp
**Change Type:** added
**Context:** PR #10018: OCL: add cache for OpenCL compiled programs - Default cache locations is under: - Linux: `/home/<user>/.cache/opencv/` (in general) - Windo...

**Code Changes:**
```diff
@@ -0,0 +1,64 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#ifndef OPENCV_UTILS_FILESYSTEM_PRIVATE_HPP
+#define OPENCV_UTILS_FILESYSTEM_PRIVATE_HPP
+
+// TODO Move to CMake?
+#ifndef OPENCV_HAVE_FILESYSTEM_SUPPORT
```

Review comment:
This is not OpenCV specific name. Also this is not a part of external public API (not available on some platforms). Renamed to `lock_shared()` (typo is here) which is used in: - [C++14](http://en.cppreference.com/w/cpp/thread/shared_lock/lock) - [Boost](http://www.boost.org/doc/libs/1_51_0/doc/html/thread/synchronization.html#thread.synchronization.mutex_concepts.shared_lockable.lock_shared)
**File:** modules/java/generator/gen_java.py
**Change Type:** modified
**Context:** PR #9698: Support @deprecated tag in java wrappers -  resolves #9699 ### This pullrequest changes gen_java.py  Deprecated interfaces in C/C++ code sha...

**Code Changes:**
```diff
@@ -91,8 +91,8 @@ def libVersionBlock():
 
 $imports
 
-// C++: class $name
-//javadoc: $name
+$docs
+$annotation
 public class $jname extends $base {
 
```

Review comment:
It is better to create additional `annotation` field instead of putting it to the `docstring`.
**File:** modules/core/perf/opencl/perf_gemm.cpp
**Change Type:** modified
**Context:** PR #3161: OCL: performance test for ocl_gemm - check_regression=OCL_Gemm_ test_filter=OCL_Gemm_ test_modules=core build_examples=OFF Merge with extra:...
**Review Line:** 63

**Code Changes:**
```diff
 
 OCL_PERF_TEST_P(GemmFixture, Gemm, ::testing::Combine(
-                    ::testing::Values(Size(1000, 1000), Size(1500, 1500)),
-            Values((int)cv::GEMM_3_T, (int)cv::GEMM_3_T | (int)cv::GEMM_2_T,
-                   (int)cv::GEMM_1_T, (int)cv::GEMM_1_T | (int)cv::GEMM_2_T)))
+                    ::testing::Values(Size(640, 640), Size(1280, 1280)),
+                    FlagType::all(), testing::Values(CV_32FC1, CV_32FC2)))
 {
     GemmParams params = GetParam();
     const Size srcSize = get<0>(params);
     const int flags = get<1>(params);
```

Review comment:
these are quite strange numbers for matrix multiplication; what was the problem with 1000x1000 and 1500x1500?
**File:** modules/core/perf/opencl/perf_gemm.cpp
**Change Type:** modified
**Context:** PR #3161: OCL: performance test for ocl_gemm - check_regression=OCL_Gemm_ test_filter=OCL_Gemm_ test_modules=core build_examples=OFF Merge with extra:...
**Review Line:** 63

**Code Changes:**
```diff
 
 OCL_PERF_TEST_P(GemmFixture, Gemm, ::testing::Combine(
-                    ::testing::Values(Size(1000, 1000), Size(1500, 1500)),
-            Values((int)cv::GEMM_3_T, (int)cv::GEMM_3_T | (int)cv::GEMM_2_T,
-                   (int)cv::GEMM_1_T, (int)cv::GEMM_1_T | (int)cv::GEMM_2_T)))
+                    ::testing::Values(Size(640, 640), Size(1280, 1280)),
+                    FlagType::all(), testing::Values(CV_32FC1, CV_32FC2)))
 {
     GemmParams params = GetParam();
     const Size srcSize = get<0>(params);
     const int flags = get<1>(params);
```

Review comment:
We need these dimensions for customer report.
**File:** modules/core/src/matmul.cpp
**Change Type:** modified
**Context:** PR #3159: OCL: optimization for ocl_gemm - Added OpenCL kernel for gemm optimization: - local buffer - use vectors Performance report: http://ocl.itse...

**Code Changes:**
```diff
@@ -693,7 +693,7 @@ static void GEMMStore_64fc( const Complexd* c_data, size_t c_step,
 
 #ifdef HAVE_CLAMDBLAS
 
-static bool ocl_gemm( InputArray matA, InputArray matB, double alpha,
+static bool ocl_gemm_amdblas( InputArray matA, InputArray matB, double alpha,
                       InputArray matC, double beta, OutputArray matD, int flags )
 {
     int type = matA.type(), esz = CV_ELEM_SIZE(type);
@@ -775,6 +775,84 @@ static bool ocl_gemm( InputArray matA, InputArray matB, double alpha,
```

Review comment:
I think double brackets are unnecessary.
**File:** modules/core/src/matmul.cpp
**Change Type:** modified
**Context:** PR #3159: OCL: optimization for ocl_gemm - Added OpenCL kernel for gemm optimization: - local buffer - use vectors Performance report: http://ocl.itse...

**Code Changes:**
```diff
@@ -693,7 +693,7 @@ static void GEMMStore_64fc( const Complexd* c_data, size_t c_step,
 
 #ifdef HAVE_CLAMDBLAS
 
-static bool ocl_gemm( InputArray matA, InputArray matB, double alpha,
+static bool ocl_gemm_amdblas( InputArray matA, InputArray matB, double alpha,
                       InputArray matC, double beta, OutputArray matD, int flags )
 {
     int type = matA.type(), esz = CV_ELEM_SIZE(type);
@@ -775,6 +775,84 @@ static bool ocl_gemm( InputArray matA, InputArray matB, double alpha,
```

Review comment:
`matB.type() == type` was checked already.
**File:** modules/core/src/matmul.cpp
**Change Type:** modified
**Context:** PR #3159: OCL: optimization for ocl_gemm - Added OpenCL kernel for gemm optimization: - local buffer - use vectors Performance report: http://ocl.itse...

**Code Changes:**
```diff
@@ -693,7 +693,7 @@ static void GEMMStore_64fc( const Complexd* c_data, size_t c_step,
 
 #ifdef HAVE_CLAMDBLAS
 
-static bool ocl_gemm( InputArray matA, InputArray matB, double alpha,
+static bool ocl_gemm_amdblas( InputArray matA, InputArray matB, double alpha,
                       InputArray matC, double beta, OutputArray matD, int flags )
 {
     int type = matA.type(), esz = CV_ELEM_SIZE(type);
@@ -775,6 +775,84 @@ static bool ocl_gemm( InputArray matA, InputArray matB, double alpha,
```

Review comment:
Is it really good idea initialize `D`? we don't use this values from `D` in ocl kernel with disabled `HAVE_C` option.
**File:** modules/core/src/matmul.cpp
**Change Type:** modified
**Context:** PR #3159: OCL: optimization for ocl_gemm - Added OpenCL kernel for gemm optimization: - local buffer - use vectors Performance report: http://ocl.itse...
**Review Line:** 818

**Code Changes:**
```diff
+    matD.create(sizeD, type);
+
+    UMat A = matA.getUMat(), B = matB.getUMat(), D = matD.getUMat();
+
+    if (atrans)
+        A = A.t();
+
+    if (btrans)
+        B = B.t();
+
+    if (haveC)
```

Review comment:
Do you tried to move transpose operation into gemm kernel?
**File:** modules/core/src/opencl/gemm.cl
**Change Type:** added
**Context:** PR #3159: OCL: optimization for ocl_gemm - Added OpenCL kernel for gemm optimization: - local buffer - use vectors Performance report: http://ocl.itse...

**Code Changes:**
```diff
@@ -0,0 +1,112 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+// Copyright (C) 2014, Itseez, Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+
+#ifdef DOUBLE_SUPPORT
+#ifdef cl_amd_fp64
```

Review comment:
Do we need `i` parameter in this macros?
**File:** modules/core/src/opencl/gemm.cl
**Change Type:** added
**Context:** PR #3159: OCL: optimization for ocl_gemm - Added OpenCL kernel for gemm optimization: - local buffer - use vectors Performance report: http://ocl.itse...

**Code Changes:**
```diff
@@ -0,0 +1,112 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+// Copyright (C) 2014, Itseez, Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+
+#ifdef DOUBLE_SUPPORT
+#ifdef cl_amd_fp64
```

Review comment:
``` #if NO_MULT int ie = min(LOCAL_SIZE, n - p * LOCAL_SIZE); #else int ie = LOCAL_SIZE; #endif for (int i = 0; i < ie; i++) ... ``` or ``` #if NO_MULT int ie = min(LOCAL_SIZE, n - p * LOCAL_SIZE); for (int i = 0; i < ie; i++) #else for (int i = 0; i < LOCAL_SIZE; i++) #endif ``` will be simplest.
**File:** modules/core/src/matmul.cpp
**Change Type:** modified
**Context:** PR #3159: OCL: optimization for ocl_gemm - Added OpenCL kernel for gemm optimization: - local buffer - use vectors Performance report: http://ocl.itse...
**Review Line:** 818

**Code Changes:**
```diff
+    matD.create(sizeD, type);
+
+    UMat A = matA.getUMat(), B = matB.getUMat(), D = matD.getUMat();
+
+    if (atrans)
+        A = A.t();
+
+    if (btrans)
+        B = B.t();
+
+    if (haveC)
```

Review comment:
Yes, I tried moving transpose operation into kernel. But it didn't increase performance. Transpose takes much less time than gemm.
**File:** modules/core/src/opencl/gemm.cl
**Change Type:** added
**Context:** PR #3159: OCL: optimization for ocl_gemm - Added OpenCL kernel for gemm optimization: - local buffer - use vectors Performance report: http://ocl.itse...

**Code Changes:**
```diff
@@ -0,0 +1,112 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+// Copyright (C) 2014, Itseez, Inc., all rights reserved.
+// Third party copyrights are property of their respective owners.
+
+#ifdef DOUBLE_SUPPORT
+#ifdef cl_amd_fp64
```

Review comment:
First argument `i` must be removed.
**File:** modules/imgproc/include/opencv2/imgproc.hpp
**Change Type:** modified
**Context:** PR #9871: Error in the documentation for cv::getRectSubPix. #9788 - The function name is corrected to GetRectSubPix since, it uses the notation of src...

**Code Changes:**
```diff
@@ -2470,13 +2470,12 @@ CV_EXPORTS_W Mat getAffineTransform( InputArray src, InputArray dst );
 
 The function getRectSubPix extracts pixels from src:
 
-\f[dst(x, y) = src(x +  \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y +  \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\f]
+\f[patch(x, y) = src(x +  \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y +  \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\f]
 
 where the values of the pixels at non-integer coordinates are retrieved using bilinear
-interpolation. Every channel of multi-channel images is processed independently. While the center of
-the rectangle must be inside the image, parts of the rectangle may be outside. In this case, the
```

Review comment:
Why did you change the function name here?
**File:** modules/imgproc/include/opencv2/imgproc.hpp
**Change Type:** modified
**Context:** PR #9871: Error in the documentation for cv::getRectSubPix. #9788 - The function name is corrected to GetRectSubPix since, it uses the notation of src...

**Code Changes:**
```diff
@@ -2470,13 +2470,12 @@ CV_EXPORTS_W Mat getAffineTransform( InputArray src, InputArray dst );
 
 The function getRectSubPix extracts pixels from src:
 
-\f[dst(x, y) = src(x +  \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y +  \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\f]
+\f[patch(x, y) = src(x +  \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y +  \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\f]
 
 where the values of the pixels at non-integer coordinates are retrieved using bilinear
-interpolation. Every channel of multi-channel images is processed independently. While the center of
-the rectangle must be inside the image, parts of the rectangle may be outside. In this case, the
```

Review comment:
Looking in the documentation ( https://docs.opencv.org/2.4/modules/imgproc/doc/geometric_transformations.html?highlight=getrectsubpix ), we have `Python: cv2.getRectSubPix(image, patchSize, center[, patch[, patchType]])` and `Python: cv.GetRectSubPix(src, dst, center) → None` Since `cv.GetRectSubPix` uses *src, dst and center*, its better to change the function name to GetRectSubPix to avoid any confusion.
**File:** modules/imgproc/include/opencv2/imgproc.hpp
**Change Type:** modified
**Context:** PR #9871: Error in the documentation for cv::getRectSubPix. #9788 - The function name is corrected to GetRectSubPix since, it uses the notation of src...

**Code Changes:**
```diff
@@ -2470,13 +2470,12 @@ CV_EXPORTS_W Mat getAffineTransform( InputArray src, InputArray dst );
 
 The function getRectSubPix extracts pixels from src:
 
-\f[dst(x, y) = src(x +  \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y +  \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\f]
+\f[patch(x, y) = src(x +  \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y +  \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)\f]
 
 where the values of the pixels at non-integer coordinates are retrieved using bilinear
-interpolation. Every channel of multi-channel images is processed independently. While the center of
-the rectangle must be inside the image, parts of the rectangle may be outside. In this case, the
```

Review comment:
The latest OpenCV binding for Python is wrapped in the namespace `cv2`. You should consider `cv2` first in your new project.