From 44a2b109b77a71a5461d11e8fa430e371b5b7f34 Mon Sep 17 00:00:00 2001 From: alex77git Date: Mon, 20 May 2013 02:24:09 +0200 Subject: [PATCH 1/5] Bug #2967, basic_structures.rst, fix 2 typos --- modules/core/doc/basic_structures.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/doc/basic_structures.rst b/modules/core/doc/basic_structures.rst index ca9f5e21a2..91a61821ab 100644 --- a/modules/core/doc/basic_structures.rst +++ b/modules/core/doc/basic_structures.rst @@ -1682,7 +1682,7 @@ Returns the type of a matrix element. .. ocv:function:: int Mat::type() const -The method returns a matrix element type. This is an identifier compatible with the ``CvMat`` type system, like ``CV_16SC3`` or 16-bit signed 3-channel array, and so on. +The method returns a matrix element type. This is an identifier compatible with the ``CvMat`` type system, like ``CV_16SC3`` for 16-bit signed 3-channel array, and so on. Mat::depth @@ -1691,7 +1691,7 @@ Returns the depth of a matrix element. .. ocv:function:: int Mat::depth() const -The method returns the identifier of the matrix element depth (the type of each individual channel). For example, for a 16-bit signed 3-channel array, the method returns ``CV_16S`` . A complete list of matrix types contains the following values: +The method returns the identifier of the matrix element depth (the type of each individual channel). For example, for a 16-bit signed element array, the method returns ``CV_16S`` . A complete list of matrix types contains the following values: * ``CV_8U`` - 8-bit unsigned integers ( ``0..255`` ) From 6e7b1ef252bfede93e2805922f3d5d215645affc Mon Sep 17 00:00:00 2001 From: alex77git Date: Mon, 20 May 2013 02:26:58 +0200 Subject: [PATCH 2/5] Bug #2967, void DescriptorMatcher::radiusMatch() // description unclear, only file: common_interfaces_of_descriptor_matchers.rst --- .../features2d/doc/common_interfaces_of_descriptor_matchers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst index 8596ae43db..d7e5eb4c29 100644 --- a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst +++ b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst @@ -217,7 +217,7 @@ For each query descriptor, finds the training descriptors not farther than the s :param compactResult: Parameter used when the mask (or masks) is not empty. If ``compactResult`` is false, the ``matches`` vector has the same size as ``queryDescriptors`` rows. If ``compactResult`` is true, the ``matches`` vector does not contain matches for fully masked-out query descriptors. - :param maxDistance: Threshold for the distance between matched descriptors. + :param maxDistance: Threshold for the distance between matched descriptors. Distance means here metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured in Pixels)! For each query descriptor, the methods find such training descriptors that the distance between the query descriptor and the training descriptor is equal or smaller than ``maxDistance``. Found matches are returned in the distance increasing order. From bc59428b3a363967d9097d1559a9a7601fd5a179 Mon Sep 17 00:00:00 2001 From: alex77git Date: Mon, 20 May 2013 02:28:40 +0200 Subject: [PATCH 3/5] Bug #2966, insert CV_Assert(size.width>0 && size.height>0); in imshow() --- modules/highgui/src/window.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp index 6d29534643..6801bd8a4b 100644 --- a/modules/highgui/src/window.cpp +++ b/modules/highgui/src/window.cpp @@ -256,12 +256,17 @@ namespace void cv::imshow( const string& winname, InputArray _img ) { + const Size size = _img.size(); #ifndef HAVE_OPENGL - Mat img = _img.getMat(); - CvMat c_img = img; - cvShowImage(winname.c_str(), &c_img); + CV_Assert(size.width>0 && size.height>0); + { + Mat img = _img.getMat(); + CvMat c_img = img; + cvShowImage(winname.c_str(), &c_img); + } #else const double useGl = getWindowProperty(winname, WND_PROP_OPENGL); + CV_Assert(size.width>0 && size.height>0); if (useGl <= 0) { @@ -275,7 +280,6 @@ void cv::imshow( const string& winname, InputArray _img ) if (autoSize > 0) { - Size size = _img.size(); resizeWindow(winname, size.width, size.height); } From c8abaea368fbfb5a2437ed899f8088fb798f6ba6 Mon Sep 17 00:00:00 2001 From: alex77git Date: Mon, 20 May 2013 12:06:25 +0200 Subject: [PATCH 4/5] (tab to space) 2x --- modules/highgui/src/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp index 6801bd8a4b..1e47bf6ee3 100644 --- a/modules/highgui/src/window.cpp +++ b/modules/highgui/src/window.cpp @@ -259,11 +259,11 @@ void cv::imshow( const string& winname, InputArray _img ) const Size size = _img.size(); #ifndef HAVE_OPENGL CV_Assert(size.width>0 && size.height>0); - { + { Mat img = _img.getMat(); CvMat c_img = img; cvShowImage(winname.c_str(), &c_img); - } + } #else const double useGl = getWindowProperty(winname, WND_PROP_OPENGL); CV_Assert(size.width>0 && size.height>0); From 445860d61902c5fa563beaf1eda25731fbecfadb Mon Sep 17 00:00:00 2001 From: alex77git Date: Mon, 20 May 2013 13:19:36 +0200 Subject: [PATCH 5/5] (typo) --- modules/core/doc/basic_structures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/doc/basic_structures.rst b/modules/core/doc/basic_structures.rst index 91a61821ab..acfbb911d2 100644 --- a/modules/core/doc/basic_structures.rst +++ b/modules/core/doc/basic_structures.rst @@ -1682,7 +1682,7 @@ Returns the type of a matrix element. .. ocv:function:: int Mat::type() const -The method returns a matrix element type. This is an identifier compatible with the ``CvMat`` type system, like ``CV_16SC3`` for 16-bit signed 3-channel array, and so on. +The method returns a matrix element type. This is an identifier compatible with the ``CvMat`` type system, like ``CV_16SC3`` or 16-bit signed 3-channel array, and so on. Mat::depth