nareshmlx/opencv-pr huggingface dataset:
**File:** modules/highgui/src/window_QT.cpp
**Change Type:** modified
**Context:** PR #6787: Implemented mouse wheel callback support for Linux - The changes made possible to make custom handler on mouse wheel events in QT and GTK fo...
**Review Line:** 2637

**Code Changes:**
```diff
+    int delta = evnt->delta();
+    int cv_event = -1;
+    int flags = ((delta & 0xffff)<<16) | ((evnt->orientation() == Qt::Vertical) ? CV_EVENT_MOUSEWHEEL : CV_EVENT_MOUSEHWHEEL);
+    QPoint pt = evnt->pos();
+
+    icvmouseHandler(evnt, mouse_wheel, cv_event, flags);
+    icvmouseProcessing(QPoingF(pt), cv_event, flags);
+
+    scaleView(delta / 240.0, pt);
     viewport()->update();
+
```

Review comment:
PR on the way. Ilya, please, look for https://github.com/opencv/opencv/pull/6966
**File:** modules/imgproc/src/canny.cpp
**Change Type:** modified
**Context:** PR #6878: Canny custom gradient

**Code Changes:**
```diff
@@ -43,6 +43,10 @@
 #include "precomp.hpp"
 #include "opencl_kernels_imgproc.hpp"
 
+#ifdef _MSC_VER
+#pragma warning( disable: 4127 ) // conditional expression is constant
+#endif
+
 
 #if defined (HAVE_IPP) && (IPP_VERSION_X100 >= 700)
```

Review comment:
why not `bool`?
**File:** modules/imgproc/src/canny.cpp
**Change Type:** modified
**Context:** PR #6878: Canny custom gradient

**Code Changes:**
```diff
@@ -43,6 +43,10 @@
 #include "precomp.hpp"
 #include "opencl_kernels_imgproc.hpp"
 
+#ifdef _MSC_VER
+#pragma warning( disable: 4127 ) // conditional expression is constant
+#endif
+
 
 #if defined (HAVE_IPP) && (IPP_VERSION_X100 >= 700)
```

Review comment:
do we need casting here?
**File:** modules/imgproc/src/canny.cpp
**Change Type:** modified
**Context:** PR #6878: Canny custom gradient
**Review Line:** 66

**Code Changes:**
```diff
+
+
 #ifdef HAVE_IPP
-static bool ippCanny(const Mat& _src, Mat& _dst, float low,  float high)
+template <bool useCustomDeriv>
+static bool ippCanny(const Mat& _src, const Mat& dx_, const Mat& dy_, Mat& _dst, float low, float high)
 {
 #if USE_IPP_CANNY
     int size = 0, size1 = 0;
     IppiSize roi = { _src.cols, _src.rows };
 
```

Review comment:
we can add an internal assert that either `_src` or both `dx_` and `dy_` must be empty (just to check the developers itself in future)
**File:** modules/imgproc/src/canny.cpp
**Change Type:** modified
**Context:** PR #6878: Canny custom gradient

**Code Changes:**
```diff
@@ -43,6 +43,10 @@
 #include "precomp.hpp"
 #include "opencl_kernels_imgproc.hpp"
 
+#ifdef _MSC_VER
+#pragma warning( disable: 4127 ) // conditional expression is constant
+#endif
+
 
 #if defined (HAVE_IPP) && (IPP_VERSION_X100 >= 700)
```

Review comment:
we can check only `_dx.dims() == 2`. For `_dy` the condition will be checked at the line 747
**File:** modules/core/src/umatrix.cpp
**Change Type:** added
**Context:** PR #1663: the first draft of transparent API and UMat implementation - if all the tests pass; I think, the PR could be merged in

**Code Changes:**
```diff
@@ -0,0 +1,644 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+//  By downloading, copying, installing or using the software you agree to this license.
+//  If you do not agree to this license, do not download, install,
+//  copy or use the software.
+//
+//
```

Review comment:
hdr.data = u->data;
**File:** modules/core/src/umatrix.cpp
**Change Type:** added
**Context:** PR #1663: the first draft of transparent API and UMat implementation - if all the tests pass; I think, the PR could be merged in

**Code Changes:**
```diff
@@ -0,0 +1,644 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+//  By downloading, copying, installing or using the software you agree to this license.
+//  If you do not agree to this license, do not download, install,
+//  copy or use the software.
+//
+//
```

Review comment:
<pre>UMat u = m.getUMat(ACCESS_WRITE); void* h = u.handle(ACCESS_WRITE);</pre> will cause an error
**File:** modules/core/src/ocl.cpp
**Change Type:** added
**Context:** PR #1663: the first draft of transparent API and UMat implementation - if all the tests pass; I think, the PR could be merged in
**Review Line:** 1733

**Code Changes:**
```diff
+        };
+
+        cl_uint i, nd0 = 0, nd = 0;
+        int dtype = dtype0 & 15;
+        clGetDeviceIDs( pl, dtype, 0, 0, &nd0 );
+        if(retval < 0)
+            return;
+        AutoBuffer<void*> dlistbuf(nd0*2+1);
+        cl_device_id* dlist = (cl_device_id*)(void**)dlistbuf;
+        cl_device_id* dlist_new = dlist + nd0;
+        clGetDeviceIDs(	pl, dtype, nd0, dlist, &nd0 );
```

Review comment:
this condition is always `false`.
**File:** cmake/OpenCVDetectPython.cmake
**Change Type:** modified
**Context:** PR #1663: the first draft of transparent API and UMat implementation - if all the tests pass; I think, the PR could be merged in
**Review Line:** 15

**Code Changes:**
```diff
@@ -12,7 +12,10 @@ if(WIN32 AND NOT PYTHON_EXECUTABLE)
     )
   endforeach()
 endif()
+find_host_package(PythonInterp 2.7)
+if(NOT PYTHONINTERP_FOUND)
 find_host_package(PythonInterp "${MIN_VER_PYTHON}")
+endif()
 
 unset(HAVE_SPHINX CACHE)
```

Review comment:
What's this for?
**File:** cmake/OpenCVDetectPython.cmake
**Change Type:** modified
**Context:** PR #1663: the first draft of transparent API and UMat implementation - if all the tests pass; I think, the PR could be merged in
**Review Line:** 15

**Code Changes:**
```diff
@@ -12,7 +12,10 @@ if(WIN32 AND NOT PYTHON_EXECUTABLE)
     )
   endforeach()
 endif()
+find_host_package(PythonInterp 2.7)
+if(NOT PYTHONINTERP_FOUND)
 find_host_package(PythonInterp "${MIN_VER_PYTHON}")
+endif()
 
 unset(HAVE_SPHINX CACHE)
```

Review comment:
Roman, without this change cmake on mac osx (10.8, 10.9) is unable to detect Python 2.7, so Python bindings, Java bindings, Matlab bindings can not be built. I think, this bug has been introduced quite recently, about month ago or so.
**File:** cmake/OpenCVDetectPython.cmake
**Change Type:** modified
**Context:** PR #1663: the first draft of transparent API and UMat implementation - if all the tests pass; I think, the PR could be merged in
**Review Line:** 15

**Code Changes:**
```diff
@@ -12,7 +12,10 @@ if(WIN32 AND NOT PYTHON_EXECUTABLE)
     )
   endforeach()
 endif()
+find_host_package(PythonInterp 2.7)
+if(NOT PYTHONINTERP_FOUND)
 find_host_package(PythonInterp "${MIN_VER_PYTHON}")
+endif()
 
 unset(HAVE_SPHINX CACHE)
```

Review comment:
Hmm... I'll investigate that.
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -923,11 +923,11 @@ endif(DEFINED WITH_INTELPERC)
 status("")
 status("  Other third-party libraries:")
 
-if((WITH_IPP OR WITH_ICV) AND HAVE_IPP)
+if(WITH_IPP AND HAVE_IPP)
   status("    Use IPP:" "${IPP_VERSION_STR} [${IPP_VERSION_MAJOR}.${IPP_VERSION_MINOR}.${IPP_VERSION_BUILD}]")
   status("         at:" "${IPP_ROOT_DIR}")
 else()
-  status("    Use IPP:"   (WITH_IPP OR WITH_ICV) AND NOT HAVE_IPP THEN "IPP not found" ELSE NO)
```

Review comment:
This option will not be visible until the user sets WITH_GTK and reruns CMake; that's rather counterintuitive. I suggest you make the options independent (if the user selects WITH_GTK3, the script looks for 3, if it selects WITH_GTK, the script looks for 2), and make one override the other (you can decide for yourself which one :wink:).
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -923,11 +923,11 @@ endif(DEFINED WITH_INTELPERC)
 status("")
 status("  Other third-party libraries:")
 
-if((WITH_IPP OR WITH_ICV) AND HAVE_IPP)
+if(WITH_IPP AND HAVE_IPP)
   status("    Use IPP:" "${IPP_VERSION_STR} [${IPP_VERSION_MAJOR}.${IPP_VERSION_MINOR}.${IPP_VERSION_BUILD}]")
   status("         at:" "${IPP_ROOT_DIR}")
 else()
-  status("    Use IPP:"   (WITH_IPP OR WITH_ICV) AND NOT HAVE_IPP THEN "IPP not found" ELSE NO)
```

Review comment:
You can't have options depend on each other. Well, I mean you can, but then the dependent option won't be visible in the GUI until the user reruns the configuration step, and I think that's bad design. (You can see that the `WITH_GSTREAMER_1_X` option is unconstrained.) The rest of your plan I'm okay with, although I think if GTK+ 3.x is not found, it should try 2.x as a fallback, even if ``WITH_GTK_2_X` is off (again, GStreamer support does that).
**File:** cmake/OpenCVFindLibsGUI.cmake
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -84,7 +84,7 @@ endif(WITH_OPENGL)
 if(APPLE)
   if(WITH_CARBON)
     set(HAVE_CARBON YES)
-  elseif(NOT IOS)
+  elseif(NOT IOS AND CMAKE_COMPILER_IS_CLANGCXX)
     set(HAVE_COCOA YES)
   endif()
 endif()
```

Review comment:
`FATAL_ERROR` is a bit too much, don't you think?
**File:** cmake/OpenCVFindLibsGUI.cmake
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -84,7 +84,7 @@ endif(WITH_OPENGL)
 if(APPLE)
   if(WITH_CARBON)
     set(HAVE_CARBON YES)
-  elseif(NOT IOS)
+  elseif(NOT IOS AND CMAKE_COMPILER_IS_CLANGCXX)
     set(HAVE_COCOA YES)
   endif()
 endif()
```

Review comment:
If Gtk2 support is selected and the minimum version is not met compilation will fail. For this reason I used FATAL_ERROR to halt the configuration with a clear error message so that time is not wasted debugging code when earlier intervention can save time and effort. I guess the alternate approach is to simply print an error message and disable Gtk support. Personally I do not like this approach as I have found it misleading and annoying on other projects.
**File:** cmake/OpenCVFindLibsGUI.cmake
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -84,7 +84,7 @@ endif(WITH_OPENGL)
 if(APPLE)
   if(WITH_CARBON)
     set(HAVE_CARBON YES)
-  elseif(NOT IOS)
+  elseif(NOT IOS AND CMAKE_COMPILER_IS_CLANGCXX)
     set(HAVE_COCOA YES)
   endif()
 endif()
```

Review comment:
What about `SEND_ERROR`, though? It doesn't halt configuration, so that the user can check if his other options had the desired effect, but skips generation, so that you can't actually build once it occurs.
**File:** cmake/OpenCVFindLibsGUI.cmake
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -84,7 +84,7 @@ endif(WITH_OPENGL)
 if(APPLE)
   if(WITH_CARBON)
     set(HAVE_CARBON YES)
-  elseif(NOT IOS)
+  elseif(NOT IOS AND CMAKE_COMPILER_IS_CLANGCXX)
     set(HAVE_COCOA YES)
   endif()
 endif()
```

Review comment:
I have just been experimenting with SEND_ERROR, and am willing to commit this. My preference is to have the config process to stop at the point the dependency is not met such that a developer does not have to search config logs/messages to find out just why the config did not work (but I take your point about being able to check other config options). This approach is also identical to that used for gthread inclusion a few lines down. If SEND_ERROR is used for bad gtk dependency, perhaps we should make this the same for gthread? (for a consistent approach). So to summarise, I'm happy to change this approach if you think this would be preferred by users, but I think we should make this approach consistent with gthread at the same time.
**File:** cmake/OpenCVFindLibsGUI.cmake
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -84,7 +84,7 @@ endif(WITH_OPENGL)
 if(APPLE)
   if(WITH_CARBON)
     set(HAVE_CARBON YES)
-  elseif(NOT IOS)
+  elseif(NOT IOS AND CMAKE_COMPILER_IS_CLANGCXX)
     set(HAVE_COCOA YES)
   endif()
 endif()
```

Review comment:
You know, after mulling this over, I say... never mind! `FATAL_ERROR` is fine. I do have another comment, though - please remove the space after the command name, and in the messages use consistent spelling and capitalization for the name of the library, which I think is "GTK+" :wink:.
**File:** cmake/OpenCVFindLibsGUI.cmake
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -84,7 +84,7 @@ endif(WITH_OPENGL)
 if(APPLE)
   if(WITH_CARBON)
     set(HAVE_CARBON YES)
-  elseif(NOT IOS)
+  elseif(NOT IOS AND CMAKE_COMPILER_IS_CLANGCXX)
     set(HAVE_COCOA YES)
   endif()
 endif()
```

Review comment:
No problem I will change Gtk to GTK (typing habit from coding with Gtkmm). Do you think I should clear HAVE_GTK if version conditions are not met or do you think this would be excessive as the configuration would stop anyway?
**File:** cmake/OpenCVFindLibsGUI.cmake
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -84,7 +84,7 @@ endif(WITH_OPENGL)
 if(APPLE)
   if(WITH_CARBON)
     set(HAVE_CARBON YES)
-  elseif(NOT IOS)
+  elseif(NOT IOS AND CMAKE_COMPILER_IS_CLANGCXX)
     set(HAVE_COCOA YES)
   endif()
 endif()
```

Review comment:
Can't say I really care in this case. :smiley:
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #1552: These changes introduce Gtk3 support into the highgui module. - A new option WITH_GTK3 has been added to the cmake configure system to enabl...

**Code Changes:**
```diff
@@ -923,11 +923,11 @@ endif(DEFINED WITH_INTELPERC)
 status("")
 status("  Other third-party libraries:")
 
-if((WITH_IPP OR WITH_ICV) AND HAVE_IPP)
+if(WITH_IPP AND HAVE_IPP)
   status("    Use IPP:" "${IPP_VERSION_STR} [${IPP_VERSION_MAJOR}.${IPP_VERSION_MINOR}.${IPP_VERSION_BUILD}]")
   status("         at:" "${IPP_ROOT_DIR}")
 else()
-  status("    Use IPP:"   (WITH_IPP OR WITH_ICV) AND NOT HAVE_IPP THEN "IPP not found" ELSE NO)
```

Review comment:
What's this doing here? It looks completely unrelated.
**File:** modules/imgproc/src/floodfill.cpp
**Change Type:** modified
**Context:** PR #1535: Android NDK r9 support

**Code Changes:**
```diff
@@ -41,6 +41,10 @@
 
 #include "precomp.hpp"
 
+#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
 typedef struct CvFFillSegment
 {
```

Review comment:
Shouldn't check the minor version without checking the major.
**File:** modules/imgproc/src/floodfill.cpp
**Change Type:** modified
**Context:** PR #1535: Android NDK r9 support

**Code Changes:**
```diff
@@ -41,6 +41,10 @@
 
 #include "precomp.hpp"
 
+#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
 typedef struct CvFFillSegment
 {
```

Review comment:
Can this be more localized, or is the warning all over the file?
**File:** modules/imgproc/src/floodfill.cpp
**Change Type:** modified
**Context:** PR #1535: Android NDK r9 support

**Code Changes:**
```diff
@@ -41,6 +41,10 @@
 
 #include "precomp.hpp"
 
+#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
 typedef struct CvFFillSegment
 {
```

Review comment:
This warning appears in several places in file. Actually warnings appear in some inline functions implemented in core module, so local pragmas for separate functions does not solve the problem.
**File:** 3rdparty/libwebp/CMakeLists.txt
**Change Type:** modified
**Context:** PR #1536: Android NDK r9 support.
**Review Line:** 43

**Code Changes:**
```diff
@@ -40,7 +40,7 @@ if(UNIX)
   endif()
 endif()
 
-ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable -Wshadow)
+ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable -Wshadow -Wmaybe-uninitialized)
 ocv_warnings_disable(CMAKE_C_FLAGS /wd4244 /wd4267) # vs2005
 
 set_target_properties(${WEBP_LIBRARY}
```

Review comment:
IMHO, you should delete all changes except this one, and wait for them to bubble up from 2.4. If can't wait, well, tell me and I'll merge it now.
**File:** modules/highgui/src/window_gtk.cpp
**Change Type:** modified
**Context:** PR #1512: Replace obsolete Gtk symbols in highgui - This update replaces depreciated Gtk1.x symbols with Gtk2.x symbols in preparation for adding Gtk3...
**Review Line:** 1228

**Code Changes:**
```diff
         GtkWidget* hscale_label = gtk_label_new( trackbar_name );
         GtkWidget* hscale = gtk_hscale_new_with_range( 0, count, 1 );
-        gtk_range_set_update_policy( GTK_RANGE(hscale), GTK_UPDATE_CONTINUOUS );
         gtk_scale_set_digits( GTK_SCALE(hscale), 0 );
         //gtk_scale_set_value_pos( hscale, GTK_POS_TOP );
         gtk_scale_set_draw_value( GTK_SCALE(hscale), TRUE );
@@ -1256,8 +1253,8 @@ icvCreateTrackbar( const char* trackbar_name, const char* window_name,
     trackbar->notify = on_notify;
     trackbar->notify2 = on_notify2;
     trackbar->userdata = userdata;
-    gtk_signal_connect( GTK_OBJECT(trackbar->widget), "value-changed",
```

Review comment:
Why do you remove the policy setting. Is it a default value?
**File:** modules/highgui/src/window_gtk.cpp
**Change Type:** modified
**Context:** PR #1512: Replace obsolete Gtk symbols in highgui - This update replaces depreciated Gtk1.x symbols with Gtk2.x symbols in preparation for adding Gtk3...

**Code Changes:**
```diff
@@ -47,6 +47,7 @@
 
 #include "gtk/gtk.h"
 #include "gdk/gdkkeysyms.h"
+#include <gdk-pixbuf/gdk-pixbuf.h>
 #include <stdio.h>
 
 #ifdef HAVE_OPENGL
@@ -88,14 +89,14 @@ GtkWidget*     cvImageWidgetNew      (int flags);
 void           cvImageWidgetSetImage(CvImageWidget * widget, const CvArr *arr);
```

Review comment:
I think you should use `TRUE` instead of `true` here.
**File:** modules/highgui/src/window_gtk.cpp
**Change Type:** modified
**Context:** PR #1512: Replace obsolete Gtk symbols in highgui - This update replaces depreciated Gtk1.x symbols with Gtk2.x symbols in preparation for adding Gtk3...
**Review Line:** 1228

**Code Changes:**
```diff
         GtkWidget* hscale_label = gtk_label_new( trackbar_name );
         GtkWidget* hscale = gtk_hscale_new_with_range( 0, count, 1 );
-        gtk_range_set_update_policy( GTK_RANGE(hscale), GTK_UPDATE_CONTINUOUS );
         gtk_scale_set_digits( GTK_SCALE(hscale), 0 );
         //gtk_scale_set_value_pos( hscale, GTK_POS_TOP );
         gtk_scale_set_draw_value( GTK_SCALE(hscale), TRUE );
@@ -1256,8 +1253,8 @@ icvCreateTrackbar( const char* trackbar_name, const char* window_name,
     trackbar->notify = on_notify;
     trackbar->notify2 = on_notify2;
     trackbar->userdata = userdata;
-    gtk_signal_connect( GTK_OBJECT(trackbar->widget), "value-changed",
```

Review comment:
gtk_range_set_update_policy has been depreciated since Gtk 2.24. There is no replacement and update continuous is the default behaviour. any other behaviour must be hand coded.
**File:** modules/highgui/src/window_gtk.cpp
**Change Type:** modified
**Context:** PR #1512: Replace obsolete Gtk symbols in highgui - This update replaces depreciated Gtk1.x symbols with Gtk2.x symbols in preparation for adding Gtk3...

**Code Changes:**
```diff
@@ -47,6 +47,7 @@
 
 #include "gtk/gtk.h"
 #include "gdk/gdkkeysyms.h"
+#include <gdk-pixbuf/gdk-pixbuf.h>
 #include <stdio.h>
 
 #ifdef HAVE_OPENGL
@@ -88,14 +89,14 @@ GtkWidget*     cvImageWidgetNew      (int flags);
 void           cvImageWidgetSetImage(CvImageWidget * widget, const CvArr *arr);
```

Review comment:
Your probably right, although this makes no difference on my system, I cannot predict the behaviour of alternative compilers, or platforms. I have therefore changed this in line with your suggestion.
**File:** modules/objdetect/doc/erfilter.rst
**Change Type:** added
**Context:** PR #1484: added rst documentation for the Class-specific Extremal Regions for Scene Text Detection

**Code Changes:**
```diff
@@ -0,0 +1,209 @@
+Scene Text Detection
+====================
+
+.. highlight:: cpp
+
+Class-specific Extremal Regions for Scene Text Detection
+--------------------------------------------------------
+
+The scene text detection algorithm described below has been initially proposed by Lukás Neumann & Jiri Matas [Neumann12]. The main idea behind Class-specific Extremal Regions is similar to the MSER in that suitable Extremal Regions (ERs) are selected from the whole component tree of the image. However, this technique differs from MSER in that selection of suitable ERs is done by a sequential classifier trained for character detection, i.e. dropping the stability requirement of MSERs and selecting class-specific (not necessarily stable) regions.
```

Review comment:
Please fix typo: increasing
**File:** modules/objdetect/doc/erfilter.rst
**Change Type:** added
**Context:** PR #1484: added rst documentation for the Class-specific Extremal Regions for Scene Text Detection

**Code Changes:**
```diff
@@ -0,0 +1,209 @@
+Scene Text Detection
+====================
+
+.. highlight:: cpp
+
+Class-specific Extremal Regions for Scene Text Detection
+--------------------------------------------------------
+
+The scene text detection algorithm described below has been initially proposed by Lukás Neumann & Jiri Matas [Neumann12]. The main idea behind Class-specific Extremal Regions is similar to the MSER in that suitable Extremal Regions (ERs) are selected from the whole component tree of the image. However, this technique differs from MSER in that selection of suitable ERs is done by a sequential classifier trained for character detection, i.e. dropping the stability requirement of MSERs and selecting class-specific (not necessarily stable) regions.
```

Review comment:
Fix typo: differentianted -> differentiated.
**File:** modules/nonfree/src/sift.cpp
**Change Type:** modified
**Context:** PR #1495: Bugfix 3282 - Fix mentioned in bug #3282: clip radius of sift descriptor to diagonal of image to overcome a autobuffer error.

**Code Changes:**
```diff
@@ -543,6 +543,8 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc
     float exp_scale = -1.f/(d * d * 0.5f);
     float hist_width = SIFT_DESCR_SCL_FCTR * scl;
     int radius = cvRound(hist_width * 1.4142135623730951f * (d + 1) * 0.5f);
+    // Clip the radius to the diagonal of the image to avoid autobuffer too large exception
+    radius = std::min(radius, (int) sqrt((double) img.cols*img.cols + img.rows*img.rows));
     cos_t /= hist_width;
     sin_t /= hist_width;
 
```

Review comment:
It could be shorter: ``` radius = std::min(radius, sqrt(img.cols*img.cols + img.rows*img.rows)); ```
**File:** modules/nonfree/src/sift.cpp
**Change Type:** modified
**Context:** PR #1495: Bugfix 3282 - Fix mentioned in bug #3282: clip radius of sift descriptor to diagonal of image to overcome a autobuffer error.

**Code Changes:**
```diff
@@ -543,6 +543,8 @@ static void calcSIFTDescriptor( const Mat& img, Point2f ptf, float ori, float sc
     float exp_scale = -1.f/(d * d * 0.5f);
     float hist_width = SIFT_DESCR_SCL_FCTR * scl;
     int radius = cvRound(hist_width * 1.4142135623730951f * (d + 1) * 0.5f);
+    // Clip the radius to the diagonal of the image to avoid autobuffer too large exception
+    radius = std::min(radius, (int) sqrt((double) img.cols*img.cols + img.rows*img.rows));
     cos_t /= hist_width;
     sin_t /= hist_width;
 
```

Review comment:
Will apply the change :)