From 3fa4c8f091b1279c6219c4415dc406d7339907ad Mon Sep 17 00:00:00 2001 From: Ilya Lysenkov Date: Tue, 21 Jun 2011 15:24:43 +0000 Subject: [PATCH] Copied some comments from wiki to the main documentation --- .../calib3d_camera_calibration_and_3d_reconstruction.rst | 2 ++ doc/opencv1/c/core_operations_on_arrays.rst | 2 +- .../doc/camera_calibration_and_3d_reconstruction.rst | 8 +++----- .../features2d/doc/feature_detection_and_description.rst | 2 +- .../highgui/doc/reading_and_writing_images_and_video.rst | 1 + modules/highgui/doc/user_interface.rst | 4 ++-- modules/imgproc/doc/feature_detection.rst | 3 ++- modules/imgproc/doc/filtering.rst | 8 ++++++++ modules/imgproc/doc/geometric_transformations.rst | 3 ++- modules/imgproc/doc/miscellaneous_transformations.rst | 3 +++ 10 files changed, 25 insertions(+), 11 deletions(-) diff --git a/doc/opencv1/c/calib3d_camera_calibration_and_3d_reconstruction.rst b/doc/opencv1/c/calib3d_camera_calibration_and_3d_reconstruction.rst index 9e941ba158..28f88bd291 100644 --- a/doc/opencv1/c/calib3d_camera_calibration_and_3d_reconstruction.rst +++ b/doc/opencv1/c/calib3d_camera_calibration_and_3d_reconstruction.rst @@ -1781,6 +1781,8 @@ Difference norm between two projections is the maximal distance between correspo ``criteria.epsilon`` serves to stop the algorithm if the difference is small. +An example of using ``cvPOSIT`` and ``cvCreatePOSITObject`` is available at http://opencv.willowgarage.com/wiki/Posit + .. index:: ProjectPoints2 diff --git a/doc/opencv1/c/core_operations_on_arrays.rst b/doc/opencv1/c/core_operations_on_arrays.rst index 0eced51a6a..ebfb335769 100644 --- a/doc/opencv1/c/core_operations_on_arrays.rst +++ b/doc/opencv1/c/core_operations_on_arrays.rst @@ -7234,7 +7234,7 @@ mSet .. cfunction:: void cvmSet(CvMat* mat, int row, int col, double value) - Returns a specific element of a single-channel floating-point matrix. + Sets a specific element of a single-channel floating-point matrix. diff --git a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst index 61af0014ee..2da61be4d3 100644 --- a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst +++ b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst @@ -413,10 +413,8 @@ value if all of the corners are found and they are placed in a certain order (row by row, left to right in every row). Otherwise, if the function fails to find all the corners or reorder them, it returns 0. For example, a regular chessboard has 8 x 8 squares and 7 x 7 internal corners, that is, points where the black -squares touch each other. The detected coordinates are approximate, -and to determine their position more accurately, you may use -the function -:ref:`cornerSubPix`. +squares touch each other. The detected coordinates are approximate so the function calls :ref:`cornerSubPix` internally to determine their position more accurately. +You also may use the function :ref:`cornerSubPix` with different parameters if returned coordinates are not accurate enough. Sample usage of detecting and drawing chessboard corners: :: @@ -628,7 +626,7 @@ findHomography .. math:: - \| \texttt{dstPoints} _i - \texttt{convertPointsHomogeneous} ( \texttt{H} \texttt{srcPoints} _i) \| > \texttt{ransacReprojThreshold} + \| \texttt{dstPoints} _i - \texttt{convertPointsHomogeneous} ( \texttt{H} * \texttt{srcPoints} _i) \| > \texttt{ransacReprojThreshold} then the point :math:`i` is considered an outlier. If ``srcPoints`` and ``dstPoints`` are measured in pixels, it usually makes sense to set this parameter somewhere in the range of 1 to 10. diff --git a/modules/features2d/doc/feature_detection_and_description.rst b/modules/features2d/doc/feature_detection_and_description.rst index b76072a38b..2f84894c50 100644 --- a/modules/features2d/doc/feature_detection_and_description.rst +++ b/modules/features2d/doc/feature_detection_and_description.rst @@ -46,7 +46,7 @@ Maximally stable extremal region extractor. :: }; The class encapsulates all the parameters of the MSER extraction algorithm (see -http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions). +http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions). Also see http://opencv.willowgarage.com/wiki/documentation/cpp/features2d/MSER for usefull comments and parameters description. .. index:: StarDetector diff --git a/modules/highgui/doc/reading_and_writing_images_and_video.rst b/modules/highgui/doc/reading_and_writing_images_and_video.rst index 1fe3d2e3db..390ecbb468 100644 --- a/modules/highgui/doc/reading_and_writing_images_and_video.rst +++ b/modules/highgui/doc/reading_and_writing_images_and_video.rst @@ -366,5 +366,6 @@ Video writer class :: ... }; +For more detailed description see http://opencv.willowgarage.com/wiki/documentation/cpp/highgui/VideoWriter .. diff --git a/modules/highgui/doc/user_interface.rst b/modules/highgui/doc/user_interface.rst index 745fdaa3dd..257226a5b0 100644 --- a/modules/highgui/doc/user_interface.rst +++ b/modules/highgui/doc/user_interface.rst @@ -124,7 +124,7 @@ Qt-specific details: :: - namedWindow( ``myWindow'', ``CV_WINDOW_NORMAL`` textbar ``CV_GUI_NORMAL`` ); + namedWindow( "myWindow", CV_WINDOW_NORMAL | CV_GUI_NORMAL ); .. @@ -194,7 +194,7 @@ waitKey :param delay: Delay in milliseconds. 0 is the special value that means "forever". The function ``waitKey`` waits for a key event infinitely (when -:math:`\texttt{delay}\leq 0` ) or for ``delay`` milliseconds, when it is positive. It returns the code of the pressed key or -1 if no key was pressed before the specified time had elapsed. +:math:`\texttt{delay}\leq 0` ) or for ``delay`` milliseconds, when it is positive. Since the OS has a minimum time between switching threads, the function will not wait exactly ``delay`` ms, it will wait at least ``delay`` ms, depending on what else is running on your computer at that time. It returns the code of the pressed key or -1 if no key was pressed before the specified time had elapsed. **Notes:** diff --git a/modules/imgproc/doc/feature_detection.rst b/modules/imgproc/doc/feature_detection.rst index d20ba5592f..c010b5e601 100644 --- a/modules/imgproc/doc/feature_detection.rst +++ b/modules/imgproc/doc/feature_detection.rst @@ -336,7 +336,8 @@ HoughLines :param stn: For the multi-scale Hough transform, it is a divisor for the distance resolution ``theta`` . The function implements the standard or standard multi-scale Hough transform algorithm for line detection. See -:ocv:func:`HoughLinesP` for the code example. +:ocv:func:`HoughLinesP` for the code example. Also see http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm for a good explanation of Hough transform. + .. index:: HoughLinesP diff --git a/modules/imgproc/doc/filtering.rst b/modules/imgproc/doc/filtering.rst index 5b1cfe45da..1b839170c2 100644 --- a/modules/imgproc/doc/filtering.rst +++ b/modules/imgproc/doc/filtering.rst @@ -388,6 +388,14 @@ bilateralFilter The function applies bilateral filtering to the input image, as described in http://www.dai.ed.ac.uk/CVonline/LOCAL\_COPIES/MANDUCHI1/Bilateral\_Filtering.html +``bilateralFilter`` can do a very good job of reducing unwanted noise while keep edges fairly sharp. However it is very slow compared to most filters. + +*Sigma values*: For simplicity, you can set the 2 sigma values to be the same. If they are small (< 10) then the filter will not have much effect, whereas if they are large (> 150) then they will have a very strong effect, making the image look "cartoonish". + +*Filter size*: Large filters (d > 5) are very slow, so it is recommended to use d=5 for real-time applications, and perhaps d=9 for offline applications that need heavy noise filtering. + +This filter doesn't work inplace. + .. index:: blur diff --git a/modules/imgproc/doc/geometric_transformations.rst b/modules/imgproc/doc/geometric_transformations.rst index 1c7bec890f..65587ccf77 100644 --- a/modules/imgproc/doc/geometric_transformations.rst +++ b/modules/imgproc/doc/geometric_transformations.rst @@ -195,7 +195,7 @@ The function calculates the following matrix: .. math:: - \begin{bmatrix} \alpha & \beta & (1- \alpha ) \cdot \texttt{center.x} - \beta \cdot \texttt{center.y} \\ - \beta & \alpha & \beta \cdot \texttt{center.x} - (1- \alpha ) \cdot \texttt{center.y} \end{bmatrix} + \begin{bmatrix} \alpha & \beta & (1- \alpha ) \cdot \texttt{center.x} - \beta \cdot \texttt{center.y} \\ - \beta & \alpha & \beta \cdot \texttt{center.x} + (1- \alpha ) \cdot \texttt{center.y} \end{bmatrix} where @@ -339,6 +339,7 @@ If you want to decimate the image by factor of 2 in each direction, you can call // specify fx and fy and let the function compute the destination image size. resize(src, dst, Size(), 0.5, 0.5, interpolation); +To shrink an image, it will generally look best with CV_INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with CV_INTER_CUBIC (slow) or CV_INTER_LINEAR (faster but still looks OK). See Also: :ocv:func:`warpAffine`, diff --git a/modules/imgproc/doc/miscellaneous_transformations.rst b/modules/imgproc/doc/miscellaneous_transformations.rst index 0bceaee48a..520ff2dadf 100644 --- a/modules/imgproc/doc/miscellaneous_transformations.rst +++ b/modules/imgproc/doc/miscellaneous_transformations.rst @@ -84,6 +84,7 @@ cvtColor The function converts an input image from one color space to another. In case of transformation to-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). +Note that the default color format in OpenCV is often referred to as RGB but it is actually BGR (the bytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue component, the second byte will be Green and the third byte will be Red. The fourth, fifth and sixth bytes would then be the 2nd pixel (Blue then Green then Red) and so on. The conventional ranges for R, G, and B channel values are: @@ -103,6 +104,8 @@ But in case of a non-linear transformation, an input RGB image should be normali img *= 1./255; cvtColor(img, img, CV_BGR2Luv); +If you use ``cvtColor`` with 8-bit images then conversion will have lost some information. For many applications this will not be noticeable but it is recommended to use 32-bit images in applications that need the full range of colors or that convert an image before an operation and then convert back. + The function can do the following transformations: *