mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
the first round of cleaning up the RST docs
This commit is contained in:
@@ -5,15 +5,16 @@ Feature Detection
|
||||
|
||||
.. index:: Canny
|
||||
|
||||
cv::Canny
|
||||
Canny
|
||||
---------
|
||||
.. cfunction:: void Canny( const Mat\& image, Mat\& edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false )
|
||||
.. c:function:: void Canny( const Mat& image, Mat& edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false )
|
||||
|
||||
Finds edges in an image using Canny algorithm.
|
||||
|
||||
:param image: Single-channel 8-bit input image
|
||||
|
||||
:param edges: The output edge map. It will have the same size and the same type as ``image``
|
||||
|
||||
:param threshold1: The first threshold for the hysteresis procedure
|
||||
|
||||
:param threshold2: The second threshold for the hysteresis procedure
|
||||
@@ -27,20 +28,22 @@ http://en.wikipedia.org/wiki/Canny_edge_detector
|
||||
|
||||
.. index:: cornerEigenValsAndVecs
|
||||
|
||||
cv::cornerEigenValsAndVecs
|
||||
cornerEigenValsAndVecs
|
||||
--------------------------
|
||||
.. cfunction:: void cornerEigenValsAndVecs( const Mat\& src, Mat\& dst, int blockSize, int apertureSize, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void cornerEigenValsAndVecs( const Mat& src, Mat& dst, int blockSize, int apertureSize, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Calculates eigenvalues and eigenvectors of image blocks for corner detection.
|
||||
|
||||
:param src: Input single-channel 8-bit or floating-point image
|
||||
|
||||
:param dst: Image to store the results. It will have the same size as ``src`` and the type ``CV_32FC(6)``
|
||||
|
||||
:param blockSize: Neighborhood size (see discussion)
|
||||
|
||||
:param apertureSize: Aperture parameter for the :func:`Sobel` operator
|
||||
|
||||
:param boderType: Pixel extrapolation method; see :func:`borderInterpolate`
|
||||
|
||||
For every pixel
|
||||
:math:`p` , the function ``cornerEigenValsAndVecs`` considers a ``blockSize`` :math:`\times` ``blockSize`` neigborhood
|
||||
:math:`S(p)` . It calculates the covariation matrix of derivatives over the neighborhood as:
|
||||
@@ -56,28 +59,28 @@ After that it finds eigenvectors and eigenvalues of
|
||||
:math:`M` and stores them into destination image in the form
|
||||
:math:`(\lambda_1, \lambda_2, x_1, y_1, x_2, y_2)` where
|
||||
|
||||
* :math:`\lambda_1, \lambda_2` are the eigenvalues of
|
||||
:math:`M` ; not sorted
|
||||
* :math:`\lambda_1, \lambda_2` are the eigenvalues of :math:`M`; not sorted
|
||||
|
||||
* :math:`x_1, y_1` are the eigenvectors corresponding to :math:`\lambda_1`
|
||||
|
||||
* :math:`x_2, y_2` are the eigenvectors corresponding to :math:`\lambda_2`
|
||||
|
||||
* :math:`x_1, y_1` are the eigenvectors corresponding to
|
||||
:math:`\lambda_1`
|
||||
* :math:`x_2, y_2` are the eigenvectors corresponding to
|
||||
:math:`\lambda_2`
|
||||
The output of the function can be used for robust edge or corner detection.
|
||||
|
||||
See also:
|
||||
:func:`cornerMinEigenVal`,:func:`cornerHarris`,:func:`preCornerDetect`
|
||||
.. index:: cornerHarris
|
||||
|
||||
cv::cornerHarris
|
||||
cornerHarris
|
||||
----------------
|
||||
.. cfunction:: void cornerHarris( const Mat\& src, Mat\& dst, int blockSize, int apertureSize, double k, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void cornerHarris( const Mat& src, Mat& dst, int blockSize, int apertureSize, double k, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Harris edge detector.
|
||||
|
||||
:param src: Input single-channel 8-bit or floating-point image
|
||||
|
||||
:param dst: Image to store the Harris detector responses; will have type ``CV_32FC1`` and the same size as ``src``
|
||||
|
||||
:param blockSize: Neighborhood size (see the discussion of :func:`cornerEigenValsAndVecs` )
|
||||
|
||||
:param apertureSize: Aperture parameter for the :func:`Sobel` operator
|
||||
@@ -85,6 +88,7 @@ cv::cornerHarris
|
||||
:param k: Harris detector free parameter. See the formula below
|
||||
|
||||
:param boderType: Pixel extrapolation method; see :func:`borderInterpolate`
|
||||
|
||||
The function runs the Harris edge detector on the image. Similarly to
|
||||
:func:`cornerMinEigenVal` and
|
||||
:func:`cornerEigenValsAndVecs` , for each pixel
|
||||
@@ -101,20 +105,22 @@ Corners in the image can be found as the local maxima of this response map.
|
||||
|
||||
.. index:: cornerMinEigenVal
|
||||
|
||||
cv::cornerMinEigenVal
|
||||
cornerMinEigenVal
|
||||
---------------------
|
||||
.. cfunction:: void cornerMinEigenVal( const Mat\& src, Mat\& dst, int blockSize, int apertureSize=3, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void cornerMinEigenVal( const Mat& src, Mat& dst, int blockSize, int apertureSize=3, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Calculates the minimal eigenvalue of gradient matrices for corner detection.
|
||||
|
||||
:param src: Input single-channel 8-bit or floating-point image
|
||||
|
||||
:param dst: Image to store the minimal eigenvalues; will have type ``CV_32FC1`` and the same size as ``src``
|
||||
|
||||
:param blockSize: Neighborhood size (see the discussion of :func:`cornerEigenValsAndVecs` )
|
||||
|
||||
:param apertureSize: Aperture parameter for the :func:`Sobel` operator
|
||||
|
||||
:param boderType: Pixel extrapolation method; see :func:`borderInterpolate`
|
||||
|
||||
The function is similar to
|
||||
:func:`cornerEigenValsAndVecs` but it calculates and stores only the minimal eigenvalue of the covariation matrix of derivatives, i.e.
|
||||
:math:`\min(\lambda_1, \lambda_2)` in terms of the formulae in
|
||||
@@ -122,9 +128,9 @@ The function is similar to
|
||||
|
||||
.. index:: cornerSubPix
|
||||
|
||||
cv::cornerSubPix
|
||||
cornerSubPix
|
||||
----------------
|
||||
.. cfunction:: void cornerSubPix( const Mat\& image, vector<Point2f>\& corners, Size winSize, Size zeroZone, TermCriteria criteria )
|
||||
.. c:function:: void cornerSubPix( const Mat& image, vector<Point2f>& corners, Size winSize, Size zeroZone, TermCriteria criteria )
|
||||
|
||||
Refines the corner locations.
|
||||
|
||||
@@ -178,9 +184,9 @@ The algorithm sets the center of the neighborhood window at this new center
|
||||
|
||||
.. index:: goodFeaturesToTrack
|
||||
|
||||
cv::goodFeaturesToTrack
|
||||
goodFeaturesToTrack
|
||||
-----------------------
|
||||
.. cfunction:: void goodFeaturesToTrack( const Mat\& image, vector<Point2f>\& corners, int maxCorners, double qualityLevel, double minDistance, const Mat\& mask=Mat(), int blockSize=3, bool useHarrisDetector=false, double k=0.04 )
|
||||
.. c:function:: void goodFeaturesToTrack( const Mat& image, vector<Point2f>& corners, int maxCorners, double qualityLevel, double minDistance, const Mat& mask=Mat(), int blockSize=3, bool useHarrisDetector=false, double k=0.04 )
|
||||
|
||||
Determines strong corners on an image.
|
||||
|
||||
@@ -197,18 +203,18 @@ cv::goodFeaturesToTrack
|
||||
:param mask: The optional region of interest. If the image is not empty (then it needs to have the type ``CV_8UC1`` and the same size as ``image`` ), it will specify the region in which the corners are detected
|
||||
|
||||
:param blockSize: Size of the averaging block for computing derivative covariation matrix over each pixel neighborhood, see :func:`cornerEigenValsAndVecs`
|
||||
|
||||
:param useHarrisDetector: Indicates, whether to use operator or :func:`cornerMinEigenVal`
|
||||
|
||||
:param k: Free parameter of Harris detector
|
||||
|
||||
The function finds the most prominent corners in the image or in the specified image region, as described
|
||||
in
|
||||
Shi94
|
||||
:
|
||||
The function finds the most prominent corners in the image or in the specified image region, as described in Shi94:
|
||||
|
||||
#.
|
||||
the function first calculates the corner quality measure at every source image pixel using the
|
||||
:func:`cornerMinEigenVal` or
|
||||
:func:`cornerHarris`
|
||||
|
||||
#.
|
||||
then it performs non-maxima suppression (the local maxima in
|
||||
:math:`3\times 3` neighborhood
|
||||
@@ -226,23 +232,25 @@ Shi94
|
||||
:math:`pt_j` if there is a stronger corner
|
||||
:math:`pt_i` (
|
||||
:math:`i < j` ) such that the distance between them is less than ``minDistance``
|
||||
|
||||
The function can be used to initialize a point-based tracker of an object.
|
||||
|
||||
Note that the if the function is called with different values ``A`` and ``B`` of the parameter ``qualityLevel`` , and ``A`` > {B}, the vector of returned corners with ``qualityLevel=A`` will be the prefix of the output vector with ``qualityLevel=B`` .
|
||||
|
||||
See also:
|
||||
:func:`cornerMinEigenVal`,:func:`cornerHarris`,:func:`calcOpticalFlowPyrLK`,:func:`estimateRigidMotion`,:func:`PlanarObjectDetector`,:func:`OneWayDescriptor`
|
||||
See also: :func:`cornerMinEigenVal`, :func:`cornerHarris`, :func:`calcOpticalFlowPyrLK`, :func:`estimateRigidMotion`, :func:`PlanarObjectDetector`, :func:`OneWayDescriptor`
|
||||
|
||||
.. index:: HoughCircles
|
||||
|
||||
cv::HoughCircles
|
||||
HoughCircles
|
||||
----------------
|
||||
.. cfunction:: void HoughCircles( Mat\& image, vector<Vec3f>\& circles, int method, double dp, double minDist, double param1=100, double param2=100, int minRadius=0, int maxRadius=0 )
|
||||
.. c:function:: void HoughCircles( Mat& image, vector<Vec3f>& circles, int method, double dp, double minDist, double param1=100, double param2=100, int minRadius=0, int maxRadius=0 )
|
||||
|
||||
Finds circles in a grayscale image using a Hough transform.
|
||||
|
||||
:param image: The 8-bit, single-channel, grayscale input image
|
||||
|
||||
:param circles: The output vector of found circles. Each vector is encoded as 3-element floating-point vector :math:`(x, y, radius)`
|
||||
|
||||
:param method: Currently, the only implemented method is ``CV_HOUGH_GRADIENT`` , which is basically *21HT* , described in Yuen90 .
|
||||
|
||||
:param dp: The inverse ratio of the accumulator resolution to the image resolution. For example, if ``dp=1`` , the accumulator will have the same resolution as the input image, if ``dp=2`` - accumulator will have half as big width and height, etc
|
||||
@@ -289,7 +297,6 @@ The function finds circles in a grayscale image using some modification of Hough
|
||||
imshow( "circles", img );
|
||||
return 0;
|
||||
}
|
||||
..
|
||||
|
||||
Note that usually the function detects the circles' centers well, however it may fail to find the correct radii. You can assist the function by specifying the radius range ( ``minRadius`` and ``maxRadius`` ) if you know it, or you may ignore the returned radius, use only the center and find the correct radius using some additional procedure.
|
||||
|
||||
@@ -297,9 +304,9 @@ See also:
|
||||
:func:`fitEllipse`,:func:`minEnclosingCircle`
|
||||
.. index:: HoughLines
|
||||
|
||||
cv::HoughLines
|
||||
HoughLines
|
||||
--------------
|
||||
.. cfunction:: void HoughLines( Mat\& image, vector<Vec2f>\& lines, double rho, double theta, int threshold, double srn=0, double stn=0 )
|
||||
.. c:function:: void HoughLines( Mat& image, vector<Vec2f>& lines, double rho, double theta, int threshold, double srn=0, double stn=0 )
|
||||
|
||||
Finds lines in a binary image using standard Hough transform.
|
||||
|
||||
@@ -316,14 +323,15 @@ cv::HoughLines
|
||||
:param srn: For the multi-scale Hough transform it is the divisor for the distance resolution ``rho`` . The coarse accumulator distance resolution will be ``rho`` and the accurate accumulator resolution will be ``rho/srn`` . If both ``srn=0`` and ``stn=0`` then the classical Hough transform is used, otherwise both these parameters should be positive.
|
||||
|
||||
:param stn: For the multi-scale Hough transform it is the divisor for the distance resolution ``theta``
|
||||
|
||||
The function implements standard or standard multi-scale Hough transform algorithm for line detection. See
|
||||
:func:`HoughLinesP` for the code example.
|
||||
|
||||
.. index:: HoughLinesP
|
||||
|
||||
cv::HoughLinesP
|
||||
HoughLinesP
|
||||
---------------
|
||||
.. cfunction:: void HoughLinesP( Mat\& image, vector<Vec4i>\& lines, double rho, double theta, int threshold, double minLineLength=0, double maxLineGap=0 )
|
||||
.. c:function:: void HoughLinesP( Mat& image, vector<Vec4i>& lines, double rho, double theta, int threshold, double minLineLength=0, double maxLineGap=0 )
|
||||
|
||||
Finds lines segments in a binary image using probabilistic Hough transform.
|
||||
|
||||
@@ -397,7 +405,6 @@ Matas00
|
||||
waitKey(0);
|
||||
return 0;
|
||||
}
|
||||
..
|
||||
|
||||
This is the sample picture the function parameters have been tuned for:
|
||||
|
||||
@@ -409,17 +416,20 @@ And this is the output of the above program in the case of probabilistic Hough t
|
||||
|
||||
.. index:: preCornerDetect
|
||||
|
||||
cv::preCornerDetect
|
||||
preCornerDetect
|
||||
-------------------
|
||||
.. cfunction:: void preCornerDetect( const Mat\& src, Mat\& dst, int apertureSize, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void preCornerDetect( const Mat& src, Mat& dst, int apertureSize, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Calculates the feature map for corner detection
|
||||
|
||||
:param src: The source single-channel 8-bit of floating-point image
|
||||
|
||||
:param dst: The output image; will have type ``CV_32F`` and the same size as ``src``
|
||||
|
||||
:param apertureSize: Aperture size of :func:`Sobel`
|
||||
|
||||
:param borderType: The pixel extrapolation method; see :func:`borderInterpolate`
|
||||
|
||||
The function calculates the complex spatial derivative-based function of the source image
|
||||
|
||||
.. math::
|
||||
@@ -438,5 +448,5 @@ The corners can be found as local maximums of the functions, as shown below: ::
|
||||
// dilation with 3x3 rectangular structuring element
|
||||
dilate(corners, dilated_corners, Mat(), 1);
|
||||
Mat corner_mask = corners == dilated_corners;
|
||||
..
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ OpenCV let the user to specify the extrapolation method; see the function :func
|
||||
|
||||
BaseColumnFilter
|
||||
----------------
|
||||
.. ctype:: BaseColumnFilter
|
||||
.. c:type:: BaseColumnFilter
|
||||
|
||||
Base class for filters with single-column kernels ::
|
||||
|
||||
@@ -43,7 +43,7 @@ Base class for filters with single-column kernels ::
|
||||
int anchor; // position of the anchor point,
|
||||
// normally not used during the processing
|
||||
};
|
||||
..
|
||||
|
||||
|
||||
The class ``BaseColumnFilter`` is the base class for filtering data using single-column kernels. The filtering does not have to be a linear operation. In general, it could be written as following:
|
||||
|
||||
@@ -64,7 +64,7 @@ See also:
|
||||
|
||||
BaseFilter
|
||||
----------
|
||||
.. ctype:: BaseFilter
|
||||
.. c:type:: BaseFilter
|
||||
|
||||
Base class for 2D image filters ::
|
||||
|
||||
@@ -88,7 +88,7 @@ Base class for 2D image filters ::
|
||||
Size ksize;
|
||||
Point anchor;
|
||||
};
|
||||
..
|
||||
|
||||
|
||||
The class ``BaseFilter`` is the base class for filtering data using 2D kernels. The filtering does not have to be a linear operation. In general, it could be written as following:
|
||||
|
||||
@@ -111,7 +111,7 @@ See also:
|
||||
|
||||
BaseRowFilter
|
||||
-------------
|
||||
.. ctype:: BaseRowFilter
|
||||
.. c:type:: BaseRowFilter
|
||||
|
||||
Base class for filters with single-row kernels ::
|
||||
|
||||
@@ -129,7 +129,7 @@ Base class for filters with single-row kernels ::
|
||||
int width, int cn) = 0;
|
||||
int ksize, anchor;
|
||||
};
|
||||
..
|
||||
|
||||
|
||||
The class ``BaseRowFilter`` is the base class for filtering data using single-row kernels. The filtering does not have to be a linear operation. In general, it could be written as following:
|
||||
|
||||
@@ -150,7 +150,7 @@ See also:
|
||||
|
||||
FilterEngine
|
||||
------------
|
||||
.. ctype:: FilterEngine
|
||||
.. c:type:: FilterEngine
|
||||
|
||||
Generic image filtering class ::
|
||||
|
||||
@@ -166,7 +166,7 @@ Generic image filtering class ::
|
||||
// _rowBorderType and _columnBorderType determine how the image
|
||||
// will be extrapolated beyond the image boundaries.
|
||||
// _borderValue is only used when _rowBorderType and/or _columnBorderType
|
||||
// == cv::BORDER_CONSTANT
|
||||
// == BORDER_CONSTANT
|
||||
FilterEngine(const Ptr<BaseFilter>& _filter2D,
|
||||
const Ptr<BaseRowFilter>& _rowFilter,
|
||||
const Ptr<BaseColumnFilter>& _columnFilter,
|
||||
@@ -217,7 +217,7 @@ Generic image filtering class ::
|
||||
Ptr<BaseRowFilter> rowFilter;
|
||||
Ptr<BaseColumnFilter> columnFilter;
|
||||
};
|
||||
..
|
||||
|
||||
|
||||
The class ``FilterEngine`` can be used to apply an arbitrary filtering operation to an image.
|
||||
It contains all the necessary intermediate buffers, it computes extrapolated values
|
||||
@@ -278,7 +278,7 @@ This class makes it easier (though, maybe not very easy yet) to combine filterin
|
||||
}
|
||||
}
|
||||
}
|
||||
..
|
||||
|
||||
|
||||
If you do not need that much control of the filtering process, you can simply use the ``FilterEngine::apply`` method. Here is how the method is actually implemented: ::
|
||||
|
||||
@@ -310,7 +310,7 @@ If you do not need that much control of the filtering process, you can simply us
|
||||
dst.data + dstOfs.y*dst.step +
|
||||
dstOfs.x*dst.elemSize(), (int)dst.step );
|
||||
}
|
||||
..
|
||||
|
||||
|
||||
Unlike the earlier versions of OpenCV, now the filtering operations fully support the notion of image ROI, that is, pixels outside of the ROI but inside the image can be used in the filtering operations. For example, you can take a ROI of a single pixel and filter it - that will be a filter response at that particular pixel (however, it's possible to emulate the old behavior by passing ``isolated=false`` to ``FilterEngine::start`` or ``FilterEngine::apply`` ). You can pass the ROI explicitly to ``FilterEngine::apply`` , or construct a new matrix headers: ::
|
||||
|
||||
@@ -334,7 +334,7 @@ Unlike the earlier versions of OpenCV, now the filtering operations fully suppor
|
||||
Sobel(pix_roi, dst2, dst2.type(), 1, 0, 3, 1, 0, BORDER_REFLECT_101);
|
||||
|
||||
printf("method1 =
|
||||
..
|
||||
|
||||
|
||||
Note on the data types. As it was mentioned in
|
||||
:func:`BaseFilter` description, the specific filters can process data of any type, despite that ``Base*Filter::operator()`` only takes ``uchar`` pointers and no information about the actual types. To make it all work, the following rules are used:
|
||||
@@ -351,9 +351,9 @@ See also:
|
||||
:func:`BaseColumnFilter`,:func:`BaseFilter`,:func:`BaseRowFilter`,:func:`createBoxFilter`,:func:`createDerivFilter`,:func:`createGaussianFilter`,:func:`createLinearFilter`,:func:`createMorphologyFilter`,:func:`createSeparableLinearFilter`
|
||||
.. index:: bilateralFilter
|
||||
|
||||
cv::bilateralFilter
|
||||
bilateralFilter
|
||||
-------------------
|
||||
.. cfunction:: void bilateralFilter( const Mat\& src, Mat\& dst, int d, double sigmaColor, double sigmaSpace, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void bilateralFilter( const Mat\& src, Mat\& dst, int d, double sigmaColor, double sigmaSpace, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Applies bilateral filter to the image
|
||||
|
||||
@@ -369,9 +369,9 @@ http://www.dai.ed.ac.uk/CVonline/LOCAL\_COPIES/MANDUCHI1/Bilateral\_Filtering.ht
|
||||
|
||||
.. index:: blur
|
||||
|
||||
cv::blur
|
||||
blur
|
||||
--------
|
||||
.. cfunction:: void blur( const Mat\& src, Mat\& dst, Size ksize, Point anchor=Point(-1,-1), int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void blur( const Mat\& src, Mat\& dst, Size ksize, Point anchor=Point(-1,-1), int borderType=BORDER_DEFAULT )
|
||||
|
||||
Smoothes image using normalized box filter
|
||||
|
||||
@@ -397,9 +397,9 @@ See also:
|
||||
|
||||
.. index:: borderInterpolate
|
||||
|
||||
cv::borderInterpolate
|
||||
borderInterpolate
|
||||
---------------------
|
||||
.. cfunction:: int borderInterpolate( int p, int len, int borderType )
|
||||
.. c:function:: int borderInterpolate( int p, int len, int borderType )
|
||||
|
||||
Computes source location of extrapolated pixel
|
||||
|
||||
@@ -411,7 +411,7 @@ The function computes and returns the coordinate of the donor pixel, correspondi
|
||||
|
||||
float val = img.at<float>(borderInterpolate(100, img.rows, BORDER_REFLECT_101),
|
||||
borderInterpolate(-5, img.cols, BORDER_WRAP));
|
||||
..
|
||||
|
||||
|
||||
Normally, the function is not called directly; it is used inside
|
||||
:func:`FilterEngine` and
|
||||
@@ -421,9 +421,9 @@ See also:
|
||||
:func:`FilterEngine`,:func:`copyMakeBorder`
|
||||
.. index:: boxFilter
|
||||
|
||||
cv::boxFilter
|
||||
boxFilter
|
||||
-------------
|
||||
.. cfunction:: void boxFilter( const Mat\& src, Mat\& dst, int ddepth, Size ksize, Point anchor=Point(-1,-1), bool normalize=true, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void boxFilter( const Mat\& src, Mat\& dst, int ddepth, Size ksize, Point anchor=Point(-1,-1), bool normalize=true, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Smoothes image using box filter
|
||||
|
||||
@@ -459,9 +459,9 @@ See also:
|
||||
|
||||
.. index:: buildPyramid
|
||||
|
||||
cv::buildPyramid
|
||||
buildPyramid
|
||||
----------------
|
||||
.. cfunction:: void buildPyramid( const Mat\& src, vector<Mat>\& dst, int maxlevel )
|
||||
.. c:function:: void buildPyramid( const Mat\& src, vector<Mat>\& dst, int maxlevel )
|
||||
|
||||
Constructs Gaussian pyramid for an image
|
||||
|
||||
@@ -477,9 +477,9 @@ The function constructs a vector of images and builds the gaussian pyramid by re
|
||||
|
||||
.. index:: copyMakeBorder
|
||||
|
||||
cv::copyMakeBorder
|
||||
copyMakeBorder
|
||||
------------------
|
||||
.. cfunction:: void copyMakeBorder( const Mat\& src, Mat\& dst, int top, int bottom, int left, int right, int borderType, const Scalar\& value=Scalar() )
|
||||
.. c:function:: void copyMakeBorder( const Mat\& src, Mat\& dst, int top, int bottom, int left, int right, int borderType, const Scalar\& value=Scalar() )
|
||||
|
||||
Forms a border around the image
|
||||
|
||||
@@ -508,19 +508,19 @@ The function supports the mode when ``src`` is already in the middle of ``dst``
|
||||
border, border, BORDER_REPLICATE);
|
||||
// now do some custom filtering ...
|
||||
...
|
||||
..
|
||||
|
||||
|
||||
See also:
|
||||
:func:`borderInterpolate`
|
||||
.. index:: createBoxFilter
|
||||
|
||||
cv::createBoxFilter
|
||||
createBoxFilter
|
||||
-------------------
|
||||
.. cfunction:: Ptr<FilterEngine> createBoxFilter( int srcType, int dstType, Size ksize, Point anchor=Point(-1,-1), bool normalize=true, int borderType=BORDER_DEFAULT)
|
||||
.. c:function:: Ptr<FilterEngine> createBoxFilter( int srcType, int dstType, Size ksize, Point anchor=Point(-1,-1), bool normalize=true, int borderType=BORDER_DEFAULT)
|
||||
|
||||
.. cfunction:: Ptr<BaseRowFilter> getRowSumFilter(int srcType, int sumType, int ksize, int anchor=-1)
|
||||
.. c:function:: Ptr<BaseRowFilter> getRowSumFilter(int srcType, int sumType, int ksize, int anchor=-1)
|
||||
|
||||
.. cfunction:: Ptr<BaseColumnFilter> getColumnSumFilter(int sumType, int dstType, int ksize, int anchor=-1, double scale=1)
|
||||
.. c:function:: Ptr<BaseColumnFilter> getColumnSumFilter(int sumType, int dstType, int ksize, int anchor=-1, double scale=1)
|
||||
|
||||
Returns box filter engine
|
||||
|
||||
@@ -549,9 +549,9 @@ See also:
|
||||
|
||||
.. index:: createDerivFilter
|
||||
|
||||
cv::createDerivFilter
|
||||
createDerivFilter
|
||||
---------------------
|
||||
.. cfunction:: Ptr<FilterEngine> createDerivFilter( int srcType, int dstType, int dx, int dy, int ksize, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: Ptr<FilterEngine> createDerivFilter( int srcType, int dstType, int dx, int dy, int ksize, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Returns engine for computing image derivatives
|
||||
|
||||
@@ -576,9 +576,9 @@ See also:
|
||||
|
||||
.. index:: createGaussianFilter
|
||||
|
||||
cv::createGaussianFilter
|
||||
createGaussianFilter
|
||||
------------------------
|
||||
.. cfunction:: Ptr<FilterEngine> createGaussianFilter( int type, Size ksize, double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT)
|
||||
.. c:function:: Ptr<FilterEngine> createGaussianFilter( int type, Size ksize, double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT)
|
||||
|
||||
Returns engine for smoothing images with a Gaussian filter
|
||||
|
||||
@@ -599,11 +599,11 @@ See also:
|
||||
|
||||
.. index:: createLinearFilter
|
||||
|
||||
cv::createLinearFilter
|
||||
createLinearFilter
|
||||
----------------------
|
||||
.. cfunction:: Ptr<FilterEngine> createLinearFilter(int srcType, int dstType, const Mat\& kernel, Point _anchor=Point(-1,-1), double delta=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, const Scalar\& borderValue=Scalar())
|
||||
.. c:function:: Ptr<FilterEngine> createLinearFilter(int srcType, int dstType, const Mat\& kernel, Point _anchor=Point(-1,-1), double delta=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, const Scalar\& borderValue=Scalar())
|
||||
|
||||
.. cfunction:: Ptr<BaseFilter> getLinearFilter(int srcType, int dstType, const Mat\& kernel, Point anchor=Point(-1,-1), double delta=0, int bits=0)
|
||||
.. c:function:: Ptr<BaseFilter> getLinearFilter(int srcType, int dstType, const Mat\& kernel, Point anchor=Point(-1,-1), double delta=0, int bits=0)
|
||||
|
||||
Creates non-separable linear filter engine
|
||||
|
||||
@@ -629,17 +629,17 @@ See also:
|
||||
:func:`createSeparableLinearFilter`,:func:`FilterEngine`,:func:`filter2D`
|
||||
.. index:: createMorphologyFilter
|
||||
|
||||
cv::createMorphologyFilter
|
||||
createMorphologyFilter
|
||||
--------------------------
|
||||
.. cfunction:: Ptr<FilterEngine> createMorphologyFilter(int op, int type, const Mat\& element, Point anchor=Point(-1,-1), int rowBorderType=BORDER_CONSTANT, int columnBorderType=-1, const Scalar\& borderValue=morphologyDefaultBorderValue())
|
||||
.. c:function:: Ptr<FilterEngine> createMorphologyFilter(int op, int type, const Mat\& element, Point anchor=Point(-1,-1), int rowBorderType=BORDER_CONSTANT, int columnBorderType=-1, const Scalar\& borderValue=morphologyDefaultBorderValue())
|
||||
|
||||
.. cfunction:: Ptr<BaseFilter> getMorphologyFilter(int op, int type, const Mat\& element, Point anchor=Point(-1,-1))
|
||||
.. c:function:: Ptr<BaseFilter> getMorphologyFilter(int op, int type, const Mat\& element, Point anchor=Point(-1,-1))
|
||||
|
||||
.. cfunction:: Ptr<BaseRowFilter> getMorphologyRowFilter(int op, int type, int esize, int anchor=-1)
|
||||
.. c:function:: Ptr<BaseRowFilter> getMorphologyRowFilter(int op, int type, int esize, int anchor=-1)
|
||||
|
||||
.. cfunction:: Ptr<BaseColumnFilter> getMorphologyColumnFilter(int op, int type, int esize, int anchor=-1)
|
||||
.. c:function:: Ptr<BaseColumnFilter> getMorphologyColumnFilter(int op, int type, int esize, int anchor=-1)
|
||||
|
||||
.. cfunction:: static inline Scalar morphologyDefaultBorderValue(){ return Scalar::all(DBL_MAX) }
|
||||
.. c:function:: static inline Scalar morphologyDefaultBorderValue(){ return Scalar::all(DBL_MAX) }
|
||||
|
||||
Creates engine for non-separable morphological operations
|
||||
|
||||
@@ -665,13 +665,13 @@ See also:
|
||||
:func:`erode`,:func:`dilate`,:func:`morphologyEx`,:func:`FilterEngine`
|
||||
.. index:: createSeparableLinearFilter
|
||||
|
||||
cv::createSeparableLinearFilter
|
||||
createSeparableLinearFilter
|
||||
-------------------------------
|
||||
.. cfunction:: Ptr<FilterEngine> createSeparableLinearFilter(int srcType, int dstType, const Mat\& rowKernel, const Mat\& columnKernel, Point anchor=Point(-1,-1), double delta=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, const Scalar\& borderValue=Scalar())
|
||||
.. c:function:: Ptr<FilterEngine> createSeparableLinearFilter(int srcType, int dstType, const Mat\& rowKernel, const Mat\& columnKernel, Point anchor=Point(-1,-1), double delta=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, const Scalar\& borderValue=Scalar())
|
||||
|
||||
.. cfunction:: Ptr<BaseColumnFilter> getLinearColumnFilter(int bufType, int dstType, const Mat\& columnKernel, int anchor, int symmetryType, double delta=0, int bits=0)
|
||||
.. c:function:: Ptr<BaseColumnFilter> getLinearColumnFilter(int bufType, int dstType, const Mat\& columnKernel, int anchor, int symmetryType, double delta=0, int bits=0)
|
||||
|
||||
.. cfunction:: Ptr<BaseRowFilter> getLinearRowFilter(int srcType, int bufType, const Mat\& rowKernel, int anchor, int symmetryType)
|
||||
.. c:function:: Ptr<BaseRowFilter> getLinearRowFilter(int srcType, int bufType, const Mat\& rowKernel, int anchor, int symmetryType)
|
||||
|
||||
Creates engine for separable linear filter
|
||||
|
||||
@@ -705,9 +705,9 @@ See also:
|
||||
:func:`sepFilter2D`,:func:`createLinearFilter`,:func:`FilterEngine`,:func:`getKernelType`
|
||||
.. index:: dilate
|
||||
|
||||
cv::dilate
|
||||
dilate
|
||||
----------
|
||||
.. cfunction:: void dilate( const Mat\& src, Mat\& dst, const Mat\& element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar\& borderValue=morphologyDefaultBorderValue() )
|
||||
.. c:function:: void dilate( const Mat\& src, Mat\& dst, const Mat\& element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar\& borderValue=morphologyDefaultBorderValue() )
|
||||
|
||||
Dilates an image by using a specific structuring element.
|
||||
|
||||
@@ -734,9 +734,9 @@ See also:
|
||||
:func:`erode`,:func:`morphologyEx`,:func:`createMorphologyFilter`
|
||||
.. index:: erode
|
||||
|
||||
cv::erode
|
||||
erode
|
||||
---------
|
||||
.. cfunction:: void erode( const Mat\& src, Mat\& dst, const Mat\& element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar\& borderValue=morphologyDefaultBorderValue() )
|
||||
.. c:function:: void erode( const Mat\& src, Mat\& dst, const Mat\& element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar\& borderValue=morphologyDefaultBorderValue() )
|
||||
|
||||
Erodes an image by using a specific structuring element.
|
||||
|
||||
@@ -763,9 +763,9 @@ See also:
|
||||
:func:`dilate`,:func:`morphologyEx`,:func:`createMorphologyFilter`
|
||||
.. index:: filter2D
|
||||
|
||||
cv::filter2D
|
||||
filter2D
|
||||
------------
|
||||
.. cfunction:: void filter2D( const Mat\& src, Mat\& dst, int ddepth, const Mat\& kernel, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void filter2D( const Mat\& src, Mat\& dst, int ddepth, const Mat\& kernel, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Convolves an image with the kernel
|
||||
|
||||
@@ -799,9 +799,9 @@ See also:
|
||||
:func:`sepFilter2D`,:func:`createLinearFilter`,:func:`dft`,:func:`matchTemplate`
|
||||
.. index:: GaussianBlur
|
||||
|
||||
cv::GaussianBlur
|
||||
GaussianBlur
|
||||
----------------
|
||||
.. cfunction:: void GaussianBlur( const Mat\& src, Mat\& dst, Size ksize, double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void GaussianBlur( const Mat\& src, Mat\& dst, Size ksize, double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Smoothes image using a Gaussian filter
|
||||
|
||||
@@ -817,9 +817,9 @@ See also:
|
||||
:func:`sepFilter2D`,:func:`filter2D`,:func:`blur`,:func:`boxFilter`,:func:`bilateralFilter`,:func:`medianBlur`
|
||||
.. index:: getDerivKernels
|
||||
|
||||
cv::getDerivKernels
|
||||
getDerivKernels
|
||||
-------------------
|
||||
.. cfunction:: void getDerivKernels( Mat\& kx, Mat\& ky, int dx, int dy, int ksize, bool normalize=false, int ktype=CV_32F )
|
||||
.. c:function:: void getDerivKernels( Mat\& kx, Mat\& ky, int dx, int dy, int ksize, bool normalize=false, int ktype=CV_32F )
|
||||
|
||||
Returns filter coefficients for computing spatial image derivatives
|
||||
|
||||
@@ -843,9 +843,9 @@ The function computes and returns the filter coefficients for spatial image deri
|
||||
|
||||
.. index:: getGaussianKernel
|
||||
|
||||
cv::getGaussianKernel
|
||||
getGaussianKernel
|
||||
---------------------
|
||||
.. cfunction:: Mat getGaussianKernel( int ksize, double sigma, int ktype=CV_64F )
|
||||
.. c:function:: Mat getGaussianKernel( int ksize, double sigma, int ktype=CV_64F )
|
||||
|
||||
Returns Gaussian filter coefficients
|
||||
|
||||
@@ -873,9 +873,9 @@ See also:
|
||||
|
||||
.. index:: getKernelType
|
||||
|
||||
cv::getKernelType
|
||||
getKernelType
|
||||
-----------------
|
||||
.. cfunction:: int getKernelType(const Mat\& kernel, Point anchor)
|
||||
.. c:function:: int getKernelType(const Mat\& kernel, Point anchor)
|
||||
|
||||
Returns the kernel type
|
||||
|
||||
@@ -895,9 +895,9 @@ The function analyzes the kernel coefficients and returns the corresponding kern
|
||||
* **KERNEL_INTEGER** Al the kernel coefficients are integer numbers. This flag can be combined with ``KERNEL_SYMMETRICAL`` or ``KERNEL_ASYMMETRICAL``
|
||||
.. index:: getStructuringElement
|
||||
|
||||
cv::getStructuringElement
|
||||
getStructuringElement
|
||||
-------------------------
|
||||
.. cfunction:: Mat getStructuringElement(int shape, Size esize, Point anchor=Point(-1,-1))
|
||||
.. c:function:: Mat getStructuringElement(int shape, Size esize, Point anchor=Point(-1,-1))
|
||||
|
||||
Returns the structuring element of the specified size and shape for morphological operations
|
||||
|
||||
@@ -927,9 +927,9 @@ The function constructs and returns the structuring element that can be then pas
|
||||
|
||||
.. index:: medianBlur
|
||||
|
||||
cv::medianBlur
|
||||
medianBlur
|
||||
--------------
|
||||
.. cfunction:: void medianBlur( const Mat\& src, Mat\& dst, int ksize )
|
||||
.. c:function:: void medianBlur( const Mat\& src, Mat\& dst, int ksize )
|
||||
|
||||
Smoothes image using median filter
|
||||
|
||||
@@ -944,9 +944,9 @@ See also:
|
||||
:func:`bilateralFilter`,:func:`blur`,:func:`boxFilter`,:func:`GaussianBlur`
|
||||
.. index:: morphologyEx
|
||||
|
||||
cv::morphologyEx
|
||||
morphologyEx
|
||||
----------------
|
||||
.. cfunction:: void morphologyEx( const Mat\& src, Mat\& dst, int op, const Mat\& element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar\& borderValue=morphologyDefaultBorderValue() )
|
||||
.. c:function:: void morphologyEx( const Mat\& src, Mat\& dst, int op, const Mat\& element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar\& borderValue=morphologyDefaultBorderValue() )
|
||||
|
||||
Performs advanced morphological transformations
|
||||
|
||||
@@ -1009,9 +1009,9 @@ See also:
|
||||
:func:`dilate`,:func:`erode`,:func:`createMorphologyFilter`
|
||||
.. index:: Laplacian
|
||||
|
||||
cv::Laplacian
|
||||
Laplacian
|
||||
-------------
|
||||
.. cfunction:: void Laplacian( const Mat\& src, Mat\& dst, int ddepth, int ksize=1, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void Laplacian( const Mat\& src, Mat\& dst, int ddepth, int ksize=1, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Calculates the Laplacian of an image
|
||||
|
||||
@@ -1043,9 +1043,9 @@ See also:
|
||||
:func:`Sobel`,:func:`Scharr`
|
||||
.. index:: pyrDown
|
||||
|
||||
cv::pyrDown
|
||||
pyrDown
|
||||
-----------
|
||||
.. cfunction:: void pyrDown( const Mat\& src, Mat\& dst, const Size\& dstsize=Size())
|
||||
.. c:function:: void pyrDown( const Mat\& src, Mat\& dst, const Size\& dstsize=Size())
|
||||
|
||||
Smoothes an image and downsamples it.
|
||||
|
||||
@@ -1069,9 +1069,9 @@ and then downsamples the image by rejecting even rows and columns.
|
||||
|
||||
.. index:: pyrUp
|
||||
|
||||
cv::pyrUp
|
||||
pyrUp
|
||||
---------
|
||||
.. cfunction:: void pyrUp( const Mat\& src, Mat\& dst, const Size\& dstsize=Size())
|
||||
.. c:function:: void pyrUp( const Mat\& src, Mat\& dst, const Size\& dstsize=Size())
|
||||
|
||||
Upsamples an image and then smoothes it
|
||||
|
||||
@@ -1090,9 +1090,9 @@ The function performs the upsampling step of the Gaussian pyramid construction (
|
||||
|
||||
.. index:: sepFilter2D
|
||||
|
||||
cv::sepFilter2D
|
||||
sepFilter2D
|
||||
---------------
|
||||
.. cfunction:: void sepFilter2D( const Mat\& src, Mat\& dst, int ddepth, const Mat\& rowKernel, const Mat\& columnKernel, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void sepFilter2D( const Mat\& src, Mat\& dst, int ddepth, const Mat\& rowKernel, const Mat\& columnKernel, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Applies separable linear filter to an image
|
||||
|
||||
@@ -1117,9 +1117,9 @@ See also:
|
||||
|
||||
.. index:: Sobel
|
||||
|
||||
cv::Sobel
|
||||
Sobel
|
||||
---------
|
||||
.. cfunction:: void Sobel( const Mat\& src, Mat\& dst, int ddepth, int xorder, int yorder, int ksize=3, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void Sobel( const Mat\& src, Mat\& dst, int ddepth, int xorder, int yorder, int ksize=3, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Calculates the first, second, third or mixed image derivatives using an extended Sobel operator
|
||||
|
||||
@@ -1183,9 +1183,9 @@ See also:
|
||||
:func:`Scharr`,:func:`Lapacian`,:func:`sepFilter2D`,:func:`filter2D`,:func:`GaussianBlur`
|
||||
.. index:: Scharr
|
||||
|
||||
cv::Scharr
|
||||
Scharr
|
||||
----------
|
||||
.. cfunction:: void Scharr( const Mat\& src, Mat\& dst, int ddepth, int xorder, int yorder, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )
|
||||
.. c:function:: void Scharr( const Mat\& src, Mat\& dst, int ddepth, int xorder, int yorder, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )
|
||||
|
||||
Calculates the first x- or y- image derivative using Scharr operator
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ The actual implementations of the geometrical transformations, from the most gen
|
||||
|
||||
.. index:: convertMaps
|
||||
|
||||
cv::convertMaps
|
||||
convertMaps
|
||||
---------------
|
||||
.. cfunction:: void convertMaps( const Mat\& map1, const Mat\& map2, Mat\& dstmap1, Mat\& dstmap2, int dstmap1type, bool nninterpolation=false )
|
||||
.. c:function:: void convertMaps( const Mat\& map1, const Mat\& map2, Mat\& dstmap1, Mat\& dstmap2, int dstmap1type, bool nninterpolation=false )
|
||||
|
||||
Converts image transformation maps from one representation to another
|
||||
|
||||
@@ -68,9 +68,9 @@ See also:
|
||||
:func:`remap`,:func:`undisort`,:func:`initUndistortRectifyMap`
|
||||
.. index:: getAffineTransform
|
||||
|
||||
cv::getAffineTransform
|
||||
getAffineTransform
|
||||
----------------------
|
||||
.. cfunction:: Mat getAffineTransform( const Point2f src[], const Point2f dst[] )
|
||||
.. c:function:: Mat getAffineTransform( const Point2f src[], const Point2f dst[] )
|
||||
|
||||
Calculates the affine transform from 3 pairs of the corresponding points
|
||||
|
||||
@@ -97,9 +97,9 @@ See also:
|
||||
:func:`warpAffine`,:func:`transform`
|
||||
.. index:: getPerspectiveTransform
|
||||
|
||||
cv::getPerspectiveTransform
|
||||
getPerspectiveTransform
|
||||
---------------------------
|
||||
.. cfunction:: Mat getPerspectiveTransform( const Point2f src[], const Point2f dst[] )
|
||||
.. c:function:: Mat getPerspectiveTransform( const Point2f src[], const Point2f dst[] )
|
||||
|
||||
Calculates the perspective transform from 4 pairs of the corresponding points
|
||||
|
||||
@@ -126,9 +126,9 @@ See also:
|
||||
:func:`findHomography`,:func:`warpPerspective`,:func:`perspectiveTransform`
|
||||
.. index:: getRectSubPix
|
||||
|
||||
cv::getRectSubPix
|
||||
getRectSubPix
|
||||
-----------------
|
||||
.. cfunction:: void getRectSubPix( const Mat\& image, Size patchSize, Point2f center, Mat\& dst, int patchType=-1 )
|
||||
.. c:function:: void getRectSubPix( const Mat\& image, Size patchSize, Point2f center, Mat\& dst, int patchType=-1 )
|
||||
|
||||
Retrieves the pixel rectangle from an image with sub-pixel accuracy
|
||||
|
||||
@@ -158,9 +158,9 @@ See also:
|
||||
:func:`warpAffine`,:func:`warpPerspective`
|
||||
.. index:: getRotationMatrix2D
|
||||
|
||||
cv::getRotationMatrix2D
|
||||
getRotationMatrix2D
|
||||
-----------------------
|
||||
.. cfunction:: Mat getRotationMatrix2D( Point2f center, double angle, double scale )
|
||||
.. c:function:: Mat getRotationMatrix2D( Point2f center, double angle, double scale )
|
||||
|
||||
Calculates the affine matrix of 2d rotation.
|
||||
|
||||
@@ -188,9 +188,9 @@ See also:
|
||||
:func:`getAffineTransform`,:func:`warpAffine`,:func:`transform`
|
||||
.. index:: invertAffineTransform
|
||||
|
||||
cv::invertAffineTransform
|
||||
invertAffineTransform
|
||||
-------------------------
|
||||
.. cfunction:: void invertAffineTransform(const Mat\& M, Mat\& iM)
|
||||
.. c:function:: void invertAffineTransform(const Mat\& M, Mat\& iM)
|
||||
|
||||
Inverts an affine transformation
|
||||
|
||||
@@ -210,9 +210,9 @@ The result will also be a
|
||||
|
||||
.. index:: remap
|
||||
|
||||
cv::remap
|
||||
remap
|
||||
---------
|
||||
.. cfunction:: void remap( const Mat\& src, Mat\& dst, const Mat\& map1, const Mat\& map2, int interpolation, int borderMode=BORDER_CONSTANT, const Scalar\& borderValue=Scalar())
|
||||
.. c:function:: void remap( const Mat\& src, Mat\& dst, const Mat\& map1, const Mat\& map2, int interpolation, int borderMode=BORDER_CONSTANT, const Scalar\& borderValue=Scalar())
|
||||
|
||||
Applies a generic geometrical transformation to an image.
|
||||
|
||||
@@ -252,9 +252,9 @@ This function can not operate in-place.
|
||||
|
||||
.. index:: resize
|
||||
|
||||
cv::resize
|
||||
resize
|
||||
----------
|
||||
.. cfunction:: void resize( const Mat\& src, Mat\& dst, Size dsize, double fx=0, double fy=0, int interpolation=INTER_LINEAR )
|
||||
.. c:function:: void resize( const Mat\& src, Mat\& dst, Size dsize, double fx=0, double fy=0, int interpolation=INTER_LINEAR )
|
||||
|
||||
Resizes an image
|
||||
|
||||
@@ -300,28 +300,29 @@ Note that the initial ``dst`` type or size are not taken into account. Instead t
|
||||
|
||||
// explicitly specify dsize=dst.size(); fx and fy will be computed from that.
|
||||
resize(src, dst, dst.size(), 0, 0, interpolation);
|
||||
..
|
||||
|
||||
|
||||
If you want to decimate the image by factor of 2 in each direction, you can call the function this way: ::
|
||||
|
||||
// specify fx and fy and let the function to compute the destination image size.
|
||||
resize(src, dst, Size(), 0.5, 0.5, interpolation);
|
||||
..
|
||||
|
||||
|
||||
See also:
|
||||
:func:`warpAffine`,:func:`warpPerspective`,:func:`remap` .
|
||||
|
||||
.. index:: warpAffine
|
||||
|
||||
cv::warpAffine
|
||||
warpAffine
|
||||
--------------
|
||||
.. cfunction:: void warpAffine( const Mat\& src, Mat\& dst, const Mat\& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar\& borderValue=Scalar())
|
||||
.. c:function:: void warpAffine( const Mat\& src, Mat\& dst, const Mat\& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar\& borderValue=Scalar())
|
||||
|
||||
Applies an affine transformation to an image.
|
||||
|
||||
:param src: Source image
|
||||
|
||||
:param dst: Destination image; will have size ``dsize`` and the same type as ``src``
|
||||
|
||||
:param M: :math:`2\times 3` transformation matrix
|
||||
|
||||
:param dsize: Size of the destination image
|
||||
@@ -346,9 +347,9 @@ See also:
|
||||
:func:`warpPerspective`,:func:`resize`,:func:`remap`,:func:`getRectSubPix`,:func:`transform`
|
||||
.. index:: warpPerspective
|
||||
|
||||
cv::warpPerspective
|
||||
warpPerspective
|
||||
-------------------
|
||||
.. cfunction:: void warpPerspective( const Mat\& src, Mat\& dst, const Mat\& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar\& borderValue=Scalar())
|
||||
.. c:function:: void warpPerspective( const Mat\& src, Mat\& dst, const Mat\& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar\& borderValue=Scalar())
|
||||
|
||||
Applies a perspective transformation to an image.
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ Histograms
|
||||
|
||||
.. index:: calcHist
|
||||
|
||||
cv::calcHist
|
||||
calcHist
|
||||
------------
|
||||
.. cfunction:: void calcHist( const Mat* arrays, int narrays, const int* channels, const Mat\& mask, MatND\& hist, int dims, const int* histSize, const float** ranges, bool uniform=true, bool accumulate=false )
|
||||
.. c:function:: void calcHist( const Mat* arrays, int narrays, const int* channels, const Mat\& mask, MatND\& hist, int dims, const int* histSize, const float** ranges, bool uniform=true, bool accumulate=false )
|
||||
|
||||
.. cfunction:: void calcHist( const Mat* arrays, int narrays, const int* channels, const Mat\& mask, SparseMat\& hist, int dims, const int* histSize, const float** ranges, bool uniform=true, bool accumulate=false )
|
||||
.. c:function:: void calcHist( const Mat* arrays, int narrays, const int* channels, const Mat\& mask, SparseMat\& hist, int dims, const int* histSize, const float** ranges, bool uniform=true, bool accumulate=false )
|
||||
|
||||
Calculates histogram of a set of arrays
|
||||
|
||||
@@ -93,15 +93,15 @@ input arrays. The sample below shows how to compute 2D Hue-Saturation histogram
|
||||
imshow( "H-S Histogram", histImg );
|
||||
waitKey();
|
||||
}
|
||||
..
|
||||
|
||||
|
||||
.. index:: calcBackProject
|
||||
|
||||
cv::calcBackProject
|
||||
calcBackProject
|
||||
-------------------
|
||||
.. cfunction:: void calcBackProject( const Mat* arrays, int narrays, const int* channels, const MatND\& hist, Mat\& backProject, const float** ranges, double scale=1, bool uniform=true )
|
||||
.. c:function:: void calcBackProject( const Mat* arrays, int narrays, const int* channels, const MatND\& hist, Mat\& backProject, const float** ranges, double scale=1, bool uniform=true )
|
||||
|
||||
.. cfunction:: void calcBackProject( const Mat* arrays, int narrays, const int* channels, const SparseMat\& hist, Mat\& backProject, const float** ranges, double scale=1, bool uniform=true )
|
||||
.. c:function:: void calcBackProject( const Mat* arrays, int narrays, const int* channels, const SparseMat\& hist, Mat\& backProject, const float** ranges, double scale=1, bool uniform=true )
|
||||
|
||||
Calculates the back projection of a histogram.
|
||||
|
||||
@@ -137,11 +137,11 @@ See also:
|
||||
:func:`calcHist`
|
||||
.. index:: compareHist
|
||||
|
||||
cv::compareHist
|
||||
compareHist
|
||||
---------------
|
||||
.. cfunction:: double compareHist( const MatND\& H1, const MatND\& H2, int method )
|
||||
.. c:function:: double compareHist( const MatND\& H1, const MatND\& H2, int method )
|
||||
|
||||
.. cfunction:: double compareHist( const SparseMat\& H1, const SparseMat\& H2, int method )
|
||||
.. c:function:: double compareHist( const SparseMat\& H1, const SparseMat\& H2, int method )
|
||||
|
||||
Compares two histograms
|
||||
|
||||
@@ -201,9 +201,9 @@ While the function works well with 1-, 2-, 3-dimensional dense histograms, it ma
|
||||
|
||||
.. index:: equalizeHist
|
||||
|
||||
cv::equalizeHist
|
||||
equalizeHist
|
||||
----------------
|
||||
.. cfunction:: void equalizeHist( const Mat\& src, Mat\& dst )
|
||||
.. c:function:: void equalizeHist( const Mat\& src, Mat\& dst )
|
||||
|
||||
Equalizes the histogram of a grayscale image.
|
||||
|
||||
|
||||
@@ -5,15 +5,16 @@ Miscellaneous Image Transformations
|
||||
|
||||
.. index:: adaptiveThreshold
|
||||
|
||||
cv::adaptiveThreshold
|
||||
adaptiveThreshold
|
||||
---------------------
|
||||
.. cfunction:: void adaptiveThreshold( const Mat\& src, Mat\& dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C )
|
||||
.. c:function:: void adaptiveThreshold( const Mat& src, Mat& dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C )
|
||||
|
||||
Applies an adaptive threshold to an array.
|
||||
|
||||
:param src: Source 8-bit single-channel image
|
||||
|
||||
:param dst: Destination image; will have the same size and the same type as ``src``
|
||||
|
||||
:param maxValue: The non-zero value assigned to the pixels for which the condition is satisfied. See the discussion
|
||||
|
||||
:param adaptiveMethod: Adaptive thresholding algorithm to use, ``ADAPTIVE_THRESH_MEAN_C`` or ``ADAPTIVE_THRESH_GAUSSIAN_C`` (see the discussion)
|
||||
@@ -59,9 +60,9 @@ See also:
|
||||
:func:`threshold`,:func:`blur`,:func:`GaussianBlur`
|
||||
.. index:: cvtColor
|
||||
|
||||
cv::cvtColor
|
||||
cvtColor
|
||||
------------
|
||||
.. cfunction:: void cvtColor( const Mat\& src, Mat\& dst, int code, int dstCn=0 )
|
||||
.. c:function:: void cvtColor( const Mat& src, Mat& dst, int code, int dstCn=0 )
|
||||
|
||||
Converts image from one color space to another
|
||||
|
||||
@@ -71,6 +72,7 @@ cv::cvtColor
|
||||
:param code: The color space conversion code; see the discussion
|
||||
|
||||
:param dstCn: The number of channels in the destination image; if the parameter is 0, the number of the channels will be derived automatically from ``src`` and the ``code``
|
||||
|
||||
The function converts the input image from one color
|
||||
space to another. In the case of transformation to-from RGB color space the ordering of the channels should be specified explicitly (RGB or BGR).
|
||||
|
||||
@@ -91,7 +93,6 @@ but in the non-linear cases the input RGB image should be normalized to the prop
|
||||
|
||||
img *= 1./255;
|
||||
cvtColor(img, img, CV_BGR2Luv);
|
||||
..
|
||||
|
||||
The function can do the following transformations:
|
||||
|
||||
@@ -178,8 +179,7 @@ The function can do the following transformations:
|
||||
Y, Cr and Cb cover the whole value range.
|
||||
|
||||
*
|
||||
RGB
|
||||
:math:`\leftrightarrow` HSV ( ``CV_BGR2HSV, CV_RGB2HSV, CV_HSV2BGR, CV_HSV2RGB`` )
|
||||
RGB :math:`\leftrightarrow` HSV ( ``CV_BGR2HSV, CV_RGB2HSV, CV_HSV2BGR, CV_HSV2RGB`` )
|
||||
in the case of 8-bit and 16-bit images
|
||||
R, G and B are converted to floating-point format and scaled to fit the 0 to 1 range
|
||||
|
||||
@@ -218,8 +218,7 @@ The function can do the following transformations:
|
||||
H, S, V are left as is
|
||||
|
||||
*
|
||||
RGB
|
||||
:math:`\leftrightarrow` HLS ( ``CV_BGR2HLS, CV_RGB2HLS, CV_HLS2BGR, CV_HLS2RGB`` ).
|
||||
RGB :math:`\leftrightarrow` HLS ( ``CV_BGR2HLS, CV_RGB2HLS, CV_HLS2BGR, CV_HLS2RGB`` ).
|
||||
in the case of 8-bit and 16-bit images
|
||||
R, G and B are converted to floating-point format and scaled to fit the 0 to 1 range.
|
||||
|
||||
@@ -269,8 +268,7 @@ The function can do the following transformations:
|
||||
H, S, V are left as is
|
||||
|
||||
*
|
||||
RGB
|
||||
:math:`\leftrightarrow` CIE L*a*b* ( ``CV_BGR2Lab, CV_RGB2Lab, CV_Lab2BGR, CV_Lab2RGB`` )
|
||||
RGB :math:`\leftrightarrow` CIE L*a*b* ( ``CV_BGR2Lab, CV_RGB2Lab, CV_Lab2BGR, CV_Lab2RGB`` )
|
||||
in the case of 8-bit and 16-bit images
|
||||
R, G and B are converted to floating-point format and scaled to fit the 0 to 1 range
|
||||
|
||||
@@ -326,8 +324,7 @@ The function can do the following transformations:
|
||||
L, a, b are left as is
|
||||
|
||||
*
|
||||
RGB
|
||||
:math:`\leftrightarrow` CIE L*u*v* ( ``CV_BGR2Luv, CV_RGB2Luv, CV_Luv2BGR, CV_Luv2RGB`` )
|
||||
RGB :math:`\leftrightarrow` CIE L*u*v* ( ``CV_BGR2Luv, CV_RGB2Luv, CV_Luv2BGR, CV_Luv2RGB`` )
|
||||
in the case of 8-bit and 16-bit images
|
||||
R, G and B are converted to floating-point format and scaled to fit 0 to 1 range
|
||||
|
||||
@@ -376,8 +373,7 @@ The function can do the following transformations:
|
||||
http://www.poynton.com/ColorFAQ.html
|
||||
|
||||
*
|
||||
Bayer
|
||||
:math:`\rightarrow` RGB ( ``CV_BayerBG2BGR, CV_BayerGB2BGR, CV_BayerRG2BGR, CV_BayerGR2BGR, CV_BayerBG2RGB, CV_BayerGB2RGB, CV_BayerRG2RGB, CV_BayerGR2RGB`` ) The Bayer pattern is widely used in CCD and CMOS cameras. It allows one to get color pictures from a single plane where R,G and B pixels (sensors of a particular component) are interleaved like this:
|
||||
Bayer :math:`\rightarrow` RGB ( ``CV_BayerBG2BGR, CV_BayerGB2BGR, CV_BayerRG2BGR, CV_BayerGR2BGR, CV_BayerBG2RGB, CV_BayerGB2RGB, CV_BayerRG2RGB, CV_BayerGR2RGB`` ) The Bayer pattern is widely used in CCD and CMOS cameras. It allows one to get color pictures from a single plane where R,G and B pixels (sensors of a particular component) are interleaved like this:
|
||||
|
||||
.. math::
|
||||
|
||||
@@ -395,11 +391,11 @@ The function can do the following transformations:
|
||||
|
||||
.. index:: distanceTransform
|
||||
|
||||
cv::distanceTransform
|
||||
distanceTransform
|
||||
---------------------
|
||||
.. cfunction:: void distanceTransform( const Mat\& src, Mat\& dst, int distanceType, int maskSize )
|
||||
.. c:function:: void distanceTransform( const Mat& src, Mat& dst, int distanceType, int maskSize )
|
||||
|
||||
.. cfunction:: void distanceTransform( const Mat\& src, Mat\& dst, Mat\& labels, int distanceType, int maskSize )
|
||||
.. c:function:: void distanceTransform( const Mat& src, Mat& dst, Mat& labels, int distanceType, int maskSize )
|
||||
|
||||
Calculates the distance to the closest zero pixel for each pixel of the source image.
|
||||
|
||||
@@ -438,8 +434,12 @@ gives more accurate results). For ``a``,``b`` and ``c`` OpenCV uses the values s
|
||||
|
||||
.. table::
|
||||
|
||||
============== =================== ====================== ``CV_DIST_C`` :math:`(3\times 3)` a = 1, b = 1 \
|
||||
============== =================== ====================== ``CV_DIST_L1`` :math:`(3\times 3)` a = 1, b = 2 \ ``CV_DIST_L2`` :math:`(3\times 3)` a=0.955, b=1.3693 \ ``CV_DIST_L2`` :math:`(5\times 5)` a=1, b=1.4, c=2.1969 \
|
||||
============== =================== ======================
|
||||
``CV_DIST_C`` :math:`(3\times 3)` a = 1, b = 1 \
|
||||
============== =================== ======================
|
||||
``CV_DIST_L1`` :math:`(3\times 3)` a = 1, b = 2 \
|
||||
``CV_DIST_L2`` :math:`(3\times 3)` a=0.955, b=1.3693 \
|
||||
``CV_DIST_L2`` :math:`(5\times 5)` a=1, b=1.4, c=2.1969 \
|
||||
============== =================== ======================
|
||||
|
||||
Typically, for a fast, coarse distance estimation ``CV_DIST_L2``,a
|
||||
@@ -459,11 +459,11 @@ Currently, this second variant can only use the approximate distance transform a
|
||||
|
||||
.. index:: floodFill
|
||||
|
||||
cv::floodFill
|
||||
floodFill
|
||||
-------------
|
||||
.. cfunction:: int floodFill( Mat\& image, Point seed, Scalar newVal, Rect* rect=0, Scalar loDiff=Scalar(), Scalar upDiff=Scalar(), int flags=4 )
|
||||
.. c:function:: int floodFill( Mat& image, Point seed, Scalar newVal, Rect* rect=0, Scalar loDiff=Scalar(), Scalar upDiff=Scalar(), int flags=4 )
|
||||
|
||||
.. cfunction:: int floodFill( Mat\& image, Mat\& mask, Point seed, Scalar newVal, Rect* rect=0, Scalar loDiff=Scalar(), Scalar upDiff=Scalar(), int flags=4 )
|
||||
.. c:function:: int floodFill( Mat& image, Mat& mask, Point seed, Scalar newVal, Rect* rect=0, Scalar loDiff=Scalar(), Scalar upDiff=Scalar(), int flags=4 )
|
||||
|
||||
Fills a connected component with the given color.
|
||||
|
||||
@@ -544,9 +544,9 @@ See also:
|
||||
:func:`findContours`
|
||||
.. index:: inpaint
|
||||
|
||||
cv::inpaint
|
||||
inpaint
|
||||
-----------
|
||||
.. cfunction:: void inpaint( const Mat\& src, const Mat\& inpaintMask, Mat\& dst, double inpaintRadius, int flags )
|
||||
.. c:function:: void inpaint( const Mat& src, const Mat& inpaintMask, Mat& dst, double inpaintRadius, int flags )
|
||||
|
||||
Inpaints the selected region in the image.
|
||||
|
||||
@@ -555,6 +555,7 @@ cv::inpaint
|
||||
:param inpaintMask: The inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted.
|
||||
|
||||
:param dst: The output image; will have the same size and the same type as ``src``
|
||||
|
||||
:param inpaintRadius: The radius of a circlular neighborhood of each point inpainted that is considered by the algorithm.
|
||||
|
||||
:param flags: The inpainting method, one of the following:
|
||||
@@ -569,13 +570,13 @@ for more details.
|
||||
|
||||
.. index:: integral
|
||||
|
||||
cv::integral
|
||||
integral
|
||||
------------
|
||||
.. cfunction:: void integral( const Mat\& image, Mat\& sum, int sdepth=-1 )
|
||||
.. c:function:: void integral( const Mat& image, Mat& sum, int sdepth=-1 )
|
||||
|
||||
.. cfunction:: void integral( const Mat\& image, Mat\& sum, Mat\& sqsum, int sdepth=-1 )
|
||||
.. c:function:: void integral( const Mat& image, Mat& sum, Mat& sqsum, int sdepth=-1 )
|
||||
|
||||
.. cfunction:: void integral( const Mat\& image, Mat\& sum, Mat\& sqsum, Mat\& tilted, int sdepth=-1 )
|
||||
.. c:function:: void integral( const Mat& image, Mat& sum, Mat& sqsum, Mat& tilted, int sdepth=-1 )
|
||||
|
||||
Calculates the integral of an image.
|
||||
|
||||
@@ -586,8 +587,10 @@ cv::integral
|
||||
:param sqsum: The integral image for squared pixel values, :math:`(W+1)\times (H+1)` , double precision floating-point (64f)
|
||||
|
||||
:param tilted: The integral for the image rotated by 45 degrees, :math:`(W+1)\times (H+1)` , the same data type as ``sum``
|
||||
|
||||
:param sdepth: The desired depth of the integral and the tilted integral images, ``CV_32S`` , ``CV_32F`` or ``CV_64F``
|
||||
The functions ``integral`` calculate one or more integral images for the source image as following:
|
||||
|
||||
The functions calculate one or more integral images for the source image as following:
|
||||
|
||||
.. math::
|
||||
|
||||
@@ -619,15 +622,16 @@ As a practical example, the next figure shows the calculation of the integral of
|
||||
|
||||
.. index:: threshold
|
||||
|
||||
cv::threshold
|
||||
threshold
|
||||
-------------
|
||||
.. cfunction:: double threshold( const Mat\& src, Mat\& dst, double thresh, double maxVal, int thresholdType )
|
||||
.. c:function:: double threshold( const Mat& src, Mat& dst, double thresh, double maxVal, int thresholdType )
|
||||
|
||||
Applies a fixed-level threshold to each array element
|
||||
|
||||
:param src: Source array (single-channel, 8-bit of 32-bit floating point)
|
||||
|
||||
:param dst: Destination array; will have the same size and the same type as ``src``
|
||||
|
||||
:param thresh: Threshold value
|
||||
|
||||
:param maxVal: Maximum value to use with ``THRESH_BINARY`` and ``THRESH_BINARY_INV`` thresholding types
|
||||
@@ -684,15 +688,16 @@ See also:
|
||||
:func:`adaptiveThreshold`,:func:`findContours`,:func:`compare`,:func:`min`,:func:`max`
|
||||
.. index:: watershed
|
||||
|
||||
cv::watershed
|
||||
watershed
|
||||
-------------
|
||||
.. cfunction:: void watershed( const Mat\& image, Mat\& markers )
|
||||
.. c:function:: void watershed( const Mat& image, Mat& markers )
|
||||
|
||||
Does marker-based image segmentation using watershed algrorithm
|
||||
|
||||
:param image: The input 8-bit 3-channel image.
|
||||
|
||||
:param markers: The input/output 32-bit single-channel image (map) of markers. It should have the same size as ``image``
|
||||
|
||||
The function implements one of the variants
|
||||
of watershed, non-parametric marker-based segmentation algorithm,
|
||||
described in
|
||||
@@ -722,9 +727,9 @@ See also:
|
||||
:func:`findContours`
|
||||
.. index:: grabCut
|
||||
|
||||
cv::grabCut
|
||||
grabCut
|
||||
-----------
|
||||
.. cfunction:: void grabCut(const Mat\& image, Mat\& mask, Rect rect, Mat\& bgdModel, Mat\& fgdModel, int iterCount, int mode )
|
||||
.. c:function:: void grabCut(const Mat& image, Mat& mask, Rect rect, Mat& bgdModel, Mat& fgdModel, int iterCount, int mode )
|
||||
|
||||
Runs GrabCut algorithm
|
||||
|
||||
@@ -740,15 +745,16 @@ cv::grabCut
|
||||
* **GC_PR_BGD** Likely a foreground pixel
|
||||
|
||||
:param rect: The ROI containing the segmented object. The pixels outside of the ROI are marked as "certainly a background". The parameter is only used when ``mode==GC_INIT_WITH_RECT``
|
||||
|
||||
:param bgdModel, fgdModel: Temporary arrays used for segmentation. Do not modify them while you are processing the same image
|
||||
|
||||
:param iterCount: The number of iterations the algorithm should do before returning the result. Note that the result can be refined with further calls with the ``mode==GC_INIT_WITH_MASK`` or ``mode==GC_EVAL``
|
||||
|
||||
:param mode: The operation mode
|
||||
|
||||
* **GC_INIT_WITH_RECT** The function initializes the state and the mask using the provided rectangle. After that it runs ``iterCount`` iterations of the algorithm
|
||||
|
||||
* **GC_INIT_WITH_MASK** The function initializes the state using the provided mask. Note that ``GC_INIT_WITH_RECT`` and ``GC_INIT_WITH_MASK`` can be combined, then all the pixels outside of the ROI are automatically initialized with ``GC_BGD``
|
||||
.
|
||||
* **GC_INIT_WITH_MASK** The function initializes the state using the provided mask. Note that ``GC_INIT_WITH_RECT`` and ``GC_INIT_WITH_MASK`` can be combined, then all the pixels outside of the ROI are automatically initialized with ``GC_BGD``.
|
||||
|
||||
* **GC_EVAL** The value means that algorithm should just resume.
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ Motion Analysis and Object Tracking
|
||||
|
||||
.. index:: accumulate
|
||||
|
||||
cv::accumulate
|
||||
accumulate
|
||||
--------------
|
||||
.. cfunction:: void accumulate( const Mat\& src, Mat\& dst, const Mat\& mask=Mat() )
|
||||
.. c:function:: void accumulate( const Mat\& src, Mat\& dst, const Mat\& mask=Mat() )
|
||||
|
||||
Adds image to the accumulator.
|
||||
|
||||
@@ -31,9 +31,9 @@ See also:
|
||||
:func:`accumulateSquare`,:func:`accumulateProduct`,:func:`accumulateWeighted`
|
||||
.. index:: accumulateSquare
|
||||
|
||||
cv::accumulateSquare
|
||||
accumulateSquare
|
||||
--------------------
|
||||
.. cfunction:: void accumulateSquare( const Mat\& src, Mat\& dst, const Mat\& mask=Mat() )
|
||||
.. c:function:: void accumulateSquare( const Mat\& src, Mat\& dst, const Mat\& mask=Mat() )
|
||||
|
||||
Adds the square of the source image to the accumulator.
|
||||
|
||||
@@ -55,9 +55,9 @@ See also:
|
||||
:func:`accumulateSquare`,:func:`accumulateProduct`,:func:`accumulateWeighted`
|
||||
.. index:: accumulateProduct
|
||||
|
||||
cv::accumulateProduct
|
||||
accumulateProduct
|
||||
---------------------
|
||||
.. cfunction:: void accumulateProduct( const Mat\& src1, const Mat\& src2, Mat\& dst, const Mat\& mask=Mat() )
|
||||
.. c:function:: void accumulateProduct( const Mat\& src1, const Mat\& src2, Mat\& dst, const Mat\& mask=Mat() )
|
||||
|
||||
Adds the per-element product of two input images to the accumulator.
|
||||
|
||||
@@ -80,9 +80,9 @@ See also:
|
||||
:func:`accumulate`,:func:`accumulateSquare`,:func:`accumulateWeighted`
|
||||
.. index:: accumulateWeighted
|
||||
|
||||
cv::accumulateWeighted
|
||||
accumulateWeighted
|
||||
----------------------
|
||||
.. cfunction:: void accumulateWeighted( const Mat\& src, Mat\& dst, double alpha, const Mat\& mask=Mat() )
|
||||
.. c:function:: void accumulateWeighted( const Mat\& src, Mat\& dst, double alpha, const Mat\& mask=Mat() )
|
||||
|
||||
Updates the running average.
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ Object Detection
|
||||
|
||||
.. index:: matchTemplate
|
||||
|
||||
cv::matchTemplate
|
||||
matchTemplate
|
||||
-----------------
|
||||
.. cfunction:: void matchTemplate( const Mat\& image, const Mat\& templ, Mat\& result, int method )
|
||||
.. c:function:: void matchTemplate( const Mat\& image, const Mat\& templ, Mat\& result, int method )
|
||||
|
||||
Compares a template against overlapped image regions.
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ Structural Analysis and Shape Descriptors
|
||||
|
||||
.. index:: moments
|
||||
|
||||
cv::moments
|
||||
moments
|
||||
-----------
|
||||
.. cfunction:: Moments moments( const Mat\& array, bool binaryImage=false )
|
||||
.. c:function:: Moments moments( const Mat& array, bool binaryImage=false )
|
||||
|
||||
Calculates all of the moments up to the third order of a polygon or rasterized shape.
|
||||
|
||||
@@ -29,7 +29,6 @@ where the class ``Moments`` is defined as: ::
|
||||
// central normalized moments
|
||||
double nu20, nu11, nu02, nu30, nu21, nu12, nu03;
|
||||
};
|
||||
..
|
||||
|
||||
:param array: A raster image (single-channel, 8-bit or floating-point 2D array) or an array
|
||||
( :math:`1 \times N` or :math:`N \times 1` ) of 2D points ( ``Point`` or ``Point2f`` )
|
||||
@@ -77,9 +76,9 @@ See also:
|
||||
:func:`contourArea`,:func:`arcLength`
|
||||
.. index:: HuMoments
|
||||
|
||||
cv::HuMoments
|
||||
HuMoments
|
||||
-------------
|
||||
.. cfunction:: void HuMoments( const Moments\& moments, double h[7] )
|
||||
.. c:function:: void HuMoments( const Moments& moments, double h[7] )
|
||||
|
||||
Calculates the seven Hu invariants.
|
||||
|
||||
@@ -104,11 +103,11 @@ See also:
|
||||
:func:`matchShapes`
|
||||
.. index:: findContours
|
||||
|
||||
cv::findContours
|
||||
findContours
|
||||
----------------
|
||||
.. cfunction:: void findContours( const Mat\& image, vector<vector<Point> >\& contours, vector<Vec4i>\& hierarchy, int mode, int method, Point offset=Point())
|
||||
.. c:function:: void findContours( const Mat& image, vector<vector<Point> >& contours, vector<Vec4i>& hierarchy, int mode, int method, Point offset=Point())
|
||||
|
||||
.. cfunction:: void findContours( const Mat\& image, vector<vector<Point> >\& contours, int mode, int method, Point offset=Point())
|
||||
.. c:function:: void findContours( const Mat& image, vector<vector<Point> >& contours, int mode, int method, Point offset=Point())
|
||||
|
||||
Finds the contours in a binary image.
|
||||
|
||||
@@ -148,9 +147,9 @@ the source ``image`` is modified by this function.
|
||||
|
||||
.. index:: drawContours
|
||||
|
||||
cv::drawContours
|
||||
drawContours
|
||||
----------------
|
||||
.. cfunction:: void drawContours( Mat\& image, const vector<vector<Point> >\& contours, int contourIdx, const Scalar\& color, int thickness=1, int lineType=8, const vector<Vec4i>\& hierarchy=vector<Vec4i>(), int maxLevel=INT_MAX, Point offset=Point() )
|
||||
.. c:function:: void drawContours( Mat& image, const vector<vector<Point> >& contours, int contourIdx, const Scalar& color, int thickness=1, int lineType=8, const vector<Vec4i>& hierarchy=vector<Vec4i>(), int maxLevel=INT_MAX, Point offset=Point() )
|
||||
|
||||
Draws contours' outlines or filled contours.
|
||||
|
||||
@@ -174,6 +173,7 @@ cv::drawContours
|
||||
the specified contour is drawn. If 1, the function draws the contour(s) and all the nested contours. If 2, the function draws the contours, all the nested contours and all the nested into nested contours etc. This parameter is only taken into account when there is ``hierarchy`` available.
|
||||
|
||||
:param offset: The optional contour shift parameter. Shift all the drawn contours by the specified :math:`\texttt{offset}=(dx,dy)`
|
||||
|
||||
The function draws contour outlines in the image if
|
||||
:math:`\texttt{thickness} \ge 0` or fills the area bounded by the contours if
|
||||
:math:`\texttt{thickness}<0` . Here is the example on how to retrieve connected components from the binary image and label them ::
|
||||
@@ -216,15 +216,14 @@ The function draws contour outlines in the image if
|
||||
imshow( "Components", dst );
|
||||
waitKey(0);
|
||||
}
|
||||
..
|
||||
|
||||
.. index:: approxPolyDP
|
||||
|
||||
cv::approxPolyDP
|
||||
approxPolyDP
|
||||
----------------
|
||||
.. cfunction:: void approxPolyDP( const Mat\& curve, vector<Point>\& approxCurve, double epsilon, bool closed )
|
||||
.. c:function:: void approxPolyDP( const Mat& curve, vector<Point>& approxCurve, double epsilon, bool closed )
|
||||
|
||||
.. cfunction:: void approxPolyDP( const Mat\& curve, vector<Point2f>\& approxCurve, double epsilon, bool closed )
|
||||
.. c:function:: void approxPolyDP( const Mat& curve, vector<Point2f>& approxCurve, double epsilon, bool closed )
|
||||
|
||||
Approximates polygonal curve(s) with the specified precision.
|
||||
|
||||
@@ -241,9 +240,9 @@ http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
|
||||
|
||||
.. index:: arcLength
|
||||
|
||||
cv::arcLength
|
||||
arcLength
|
||||
-------------
|
||||
.. cfunction:: double arcLength( const Mat\& curve, bool closed )
|
||||
.. c:function:: double arcLength( const Mat& curve, bool closed )
|
||||
|
||||
Calculates a contour perimeter or a curve length.
|
||||
|
||||
@@ -255,9 +254,9 @@ The function computes the curve length or the closed contour perimeter.
|
||||
|
||||
.. index:: boundingRect
|
||||
|
||||
cv::boundingRect
|
||||
boundingRect
|
||||
----------------
|
||||
.. cfunction:: Rect boundingRect( const Mat\& points )
|
||||
.. c:function:: Rect boundingRect( const Mat& points )
|
||||
|
||||
Calculates the up-right bounding rectangle of a point set.
|
||||
|
||||
@@ -267,9 +266,9 @@ The function calculates and returns the minimal up-right bounding rectangle for
|
||||
|
||||
.. index:: estimateRigidTransform
|
||||
|
||||
cv::estimateRigidTransform
|
||||
estimateRigidTransform
|
||||
--------------------------
|
||||
.. cfunction:: Mat estimateRigidTransform( const Mat\& srcpt, const Mat\& dstpt, bool fullAffine )
|
||||
.. c:function:: Mat estimateRigidTransform( const Mat& srcpt, const Mat& dstpt, bool fullAffine )
|
||||
|
||||
Computes optimal affine transformation between two 2D point sets
|
||||
|
||||
@@ -301,9 +300,9 @@ See also:
|
||||
:func:`getAffineTransform`,:func:`getPerspectiveTransform`,:func:`findHomography`
|
||||
.. index:: estimateAffine3D
|
||||
|
||||
cv::estimateAffine3D
|
||||
estimateAffine3D
|
||||
--------------------
|
||||
.. cfunction:: int estimateAffine3D(const Mat\& srcpt, const Mat\& dstpt, Mat\& out, vector<uchar>\& outliers, double ransacThreshold = 3.0, double confidence = 0.99)
|
||||
.. c:function:: int estimateAffine3D(const Mat& srcpt, const Mat& dstpt, Mat& out, vector<uchar>& outliers, double ransacThreshold = 3.0, double confidence = 0.99)
|
||||
|
||||
Computes optimal affine transformation between two 3D point sets
|
||||
|
||||
@@ -322,9 +321,9 @@ The function estimates the optimal 3D affine transformation between two 3D point
|
||||
|
||||
.. index:: contourArea
|
||||
|
||||
cv::contourArea
|
||||
contourArea
|
||||
---------------
|
||||
.. cfunction:: double contourArea( const Mat\& contour )
|
||||
.. c:function:: double contourArea( const Mat& contour )
|
||||
|
||||
Calculates the contour area
|
||||
|
||||
@@ -350,17 +349,16 @@ Here is a short example: ::
|
||||
cout << "area0 =" << area0 << endl <<
|
||||
"area1 =" << area1 << endl <<
|
||||
"approx poly vertices" << approx.size() << endl;
|
||||
..
|
||||
|
||||
.. index:: convexHull
|
||||
|
||||
cv::convexHull
|
||||
convexHull
|
||||
--------------
|
||||
.. cfunction:: void convexHull( const Mat\& points, vector<int>\& hull, bool clockwise=false )
|
||||
.. c:function:: void convexHull( const Mat& points, vector<int>& hull, bool clockwise=false )
|
||||
|
||||
.. cfunction:: void convexHull( const Mat\& points, vector<Point>\& hull, bool clockwise=false )
|
||||
.. c:function:: void convexHull( const Mat& points, vector<Point>& hull, bool clockwise=false )
|
||||
|
||||
.. cfunction:: void convexHull( const Mat\& points, vector<Point2f>\& hull, bool clockwise=false )
|
||||
.. c:function:: void convexHull( const Mat& points, vector<Point2f>& hull, bool clockwise=false )
|
||||
|
||||
Finds the convex hull of a point set.
|
||||
|
||||
@@ -380,9 +378,9 @@ that has
|
||||
|
||||
.. index:: fitEllipse
|
||||
|
||||
cv::fitEllipse
|
||||
fitEllipse
|
||||
--------------
|
||||
.. cfunction:: RotatedRect fitEllipse( const Mat\& points )
|
||||
.. c:function:: RotatedRect fitEllipse( const Mat& points )
|
||||
|
||||
Fits an ellipse around a set of 2D points.
|
||||
|
||||
@@ -393,22 +391,20 @@ The function calculates the ellipse that fits best
|
||||
|
||||
.. index:: fitLine
|
||||
|
||||
cv::fitLine
|
||||
fitLine
|
||||
-----------
|
||||
.. cfunction:: void fitLine( const Mat\& points, Vec4f\& line, int distType, double param, double reps, double aeps )
|
||||
.. c:function:: void fitLine( const Mat& points, Vec4f& line, int distType, double param, double reps, double aeps )
|
||||
|
||||
.. cfunction:: void fitLine( const Mat\& points, Vec6f\& line, int distType, double param, double reps, double aeps )
|
||||
.. c:function:: void fitLine( const Mat& points, Vec6f& line, int distType, double param, double reps, double aeps )
|
||||
|
||||
Fits a line to a 2D or 3D point set.
|
||||
|
||||
:param points: The input 2D point set, represented by ``CV_32SC2`` or ``CV_32FC2`` matrix, or by ``vector<Point>`` , ``vector<Point2f>`` , ``vector<Point3i>`` or ``vector<Point3f>`` converted to the matrix by ``Mat(const vector<T>&)`` constructor
|
||||
|
||||
:param line: The output line parameters. In the case of a 2d fitting,
|
||||
it is a vector of 4 floats ``(vx, vy,
|
||||
x0, y0)`` where ``(vx, vy)`` is a normalized vector collinear to the
|
||||
it is a vector of 4 floats ``(vx, vy, x0, y0)`` where ``(vx, vy)`` is a normalized vector collinear to the
|
||||
line and ``(x0, y0)`` is some point on the line. in the case of a
|
||||
3D fitting it is vector of 6 floats ``(vx, vy, vz, x0, y0, z0)`` where ``(vx, vy, vz)`` is a normalized vector collinear to the line
|
||||
and ``(x0, y0, z0)`` is some point on the line
|
||||
3D fitting it is vector of 6 floats ``(vx, vy, vz, x0, y0, z0)`` where ``(vx, vy, vz)`` is a normalized vector collinear to the line and ``(x0, y0, z0)`` is some point on the line
|
||||
|
||||
:param distType: The distance used by the M-estimator (see the discussion)
|
||||
|
||||
@@ -466,9 +462,9 @@ http://en.wikipedia.org/wiki/M-estimator
|
||||
|
||||
.. index:: isContourConvex
|
||||
|
||||
cv::isContourConvex
|
||||
isContourConvex
|
||||
-------------------
|
||||
.. cfunction:: bool isContourConvex( const Mat\& contour )
|
||||
.. c:function:: bool isContourConvex( const Mat& contour )
|
||||
|
||||
Tests contour convexity.
|
||||
|
||||
@@ -478,9 +474,9 @@ The function tests whether the input contour is convex or not. The contour must
|
||||
|
||||
.. index:: minAreaRect
|
||||
|
||||
cv::minAreaRect
|
||||
minAreaRect
|
||||
---------------
|
||||
.. cfunction:: RotatedRect minAreaRect( const Mat\& points )
|
||||
.. c:function:: RotatedRect minAreaRect( const Mat& points )
|
||||
|
||||
Finds the minimum area rotated rectangle enclosing a 2D point set.
|
||||
|
||||
@@ -489,9 +485,9 @@ cv::minAreaRect
|
||||
The function calculates and returns the minimum area bounding rectangle (possibly rotated) for the specified point set. See the OpenCV sample ``minarea.c``
|
||||
.. index:: minEnclosingCircle
|
||||
|
||||
cv::minEnclosingCircle
|
||||
minEnclosingCircle
|
||||
----------------------
|
||||
.. cfunction:: void minEnclosingCircle( const Mat\& points, Point2f\& center, float\& radius )
|
||||
.. c:function:: void minEnclosingCircle( const Mat& points, Point2f& center, float& radius )
|
||||
|
||||
Finds the minimum area circle enclosing a 2D point set.
|
||||
|
||||
@@ -504,9 +500,9 @@ cv::minEnclosingCircle
|
||||
The function finds the minimal enclosing circle of a 2D point set using iterative algorithm. See the OpenCV sample ``minarea.c``
|
||||
.. index:: matchShapes
|
||||
|
||||
cv::matchShapes
|
||||
matchShapes
|
||||
---------------
|
||||
.. cfunction:: double matchShapes( const Mat\& object1, const Mat\& object2, int method, double parameter=0 )
|
||||
.. c:function:: double matchShapes( const Mat& object1, const Mat& object2, int method, double parameter=0 )
|
||||
|
||||
Compares two shapes.
|
||||
|
||||
@@ -554,9 +550,9 @@ and
|
||||
|
||||
.. index:: pointPolygonTest
|
||||
|
||||
cv::pointPolygonTest
|
||||
pointPolygonTest
|
||||
--------------------
|
||||
.. cfunction:: double pointPolygonTest( const Mat\& contour, Point2f pt, bool measureDist )
|
||||
.. c:function:: double pointPolygonTest( const Mat& contour, Point2f pt, bool measureDist )
|
||||
|
||||
Performs point-in-contour test.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user