From 3f417f1ec36bfb021bf1c6bc89a4450f08a3087c Mon Sep 17 00:00:00 2001 From: Vsevolod Glumov Date: Fri, 14 Dec 2012 10:49:51 +0400 Subject: [PATCH] Fixes for issues #2570, #2492, #2559, #2489, #2592. --- .../bounding_rects_circles/bounding_rects_circles.rst | 2 +- doc/user_guide/ug_mat.rst | 8 +++++--- modules/imgproc/doc/miscellaneous_transformations.rst | 2 +- .../doc/structural_analysis_and_shape_descriptors.rst | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.rst b/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.rst index 90baaaff95..d073a1b925 100644 --- a/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.rst +++ b/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.rst @@ -85,7 +85,7 @@ This tutorial code's is shown lines below. You can also download it from `here < for( int i = 0; i < contours.size(); i++ ) { approxPolyDP( Mat(contours[i]), contours_poly[i], 3, true ); boundRect[i] = boundingRect( Mat(contours_poly[i]) ); - minEnclosingCircle( contours_poly[i], center[i], radius[i] ); + minEnclosingCircle( (Mat)contours_poly[i], center[i], radius[i] ); } diff --git a/doc/user_guide/ug_mat.rst b/doc/user_guide/ug_mat.rst index f4a75eada5..f6474fac11 100644 --- a/doc/user_guide/ug_mat.rst +++ b/doc/user_guide/ug_mat.rst @@ -71,7 +71,9 @@ There are functions in OpenCV, especially from calib3d module, such as ``project //... fill the array Mat pointsMat = Mat(points); -One can access a point in this matrix using the same method \texttt{Mat::at}: :: +One can access a point in this matrix using the same method ``Mat::at`` : + +:: Point2f point = pointsMat.at(i, 0); @@ -109,7 +111,7 @@ Selecting a region of interest: :: Rect r(10, 10, 100, 100); Mat smallImg = img(r); -A convertion from \texttt{Mat} to C API data structures: :: +A convertion from ``Mat`` to C API data structures: :: Mat img = imread("image.jpg"); IplImage img1 = img; @@ -150,7 +152,7 @@ A call to ``waitKey()`` starts a message passing cycle that waits for a key stro double minVal, maxVal; minMaxLoc(sobelx, &minVal, &maxVal); //find minimum and maximum intensities Mat draw; - sobelx.convertTo(draw, CV_8U, 255.0/(maxVal - minVal), -minVal); + sobelx.convertTo(draw, CV_8U, 255.0/(maxVal - minVal), -minVal * 255.0/(maxVal - minVal)); namedWindow("image", CV_WINDOW_AUTOSIZE); imshow("image", draw); diff --git a/modules/imgproc/doc/miscellaneous_transformations.rst b/modules/imgproc/doc/miscellaneous_transformations.rst index 9b0ee6d0ab..6d91d8956c 100644 --- a/modules/imgproc/doc/miscellaneous_transformations.rst +++ b/modules/imgproc/doc/miscellaneous_transformations.rst @@ -661,7 +661,7 @@ Applies a fixed-level threshold to each array element. :param dst: output array of the same size and type as ``src``. - :param thresh: treshold value. + :param thresh: threshold value. :param maxval: maximum value to use with the ``THRESH_BINARY`` and ``THRESH_BINARY_INV`` thresholding types. diff --git a/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst b/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst index d89e652fd8..99d02c2b36 100644 --- a/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst +++ b/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst @@ -137,7 +137,7 @@ Finds contours in a binary image. :param contours: Detected contours. Each contour is stored as a vector of points. - :param hierarchy: Optional output vector containing information about the image topology. It has as many elements as the number of contours. For each contour ``contours[i]`` , the elements ``hierarchy[i][0]`` , ``hiearchy[i][1]`` , ``hiearchy[i][2]`` , and ``hiearchy[i][3]`` are set to 0-based indices in ``contours`` of the next and previous contours at the same hierarchical level: the first child contour and the parent contour, respectively. If for a contour ``i`` there are no next, previous, parent, or nested contours, the corresponding elements of ``hierarchy[i]`` will be negative. + :param hierarchy: Optional output vector, containing information about the image topology. It has as many elements as the number of contours. For each i-th contour ``contours[i]`` , the elements ``hierarchy[i][0]`` , ``hiearchy[i][1]`` , ``hiearchy[i][2]`` , and ``hiearchy[i][3]`` are set to 0-based indices in ``contours`` of the next and previous contours at the same hierarchical level, the first child contour and the parent contour, respectively. If for the contour ``i`` there are no next, previous, parent, or nested contours, the corresponding elements of ``hierarchy[i]`` will be negative. :param mode: Contour retrieval mode (if you use Python see also a note below).