2011-02-22 21:43:26 +01:00
Structural Analysis and Shape Descriptors
=========================================
2011-04-19 13:41:12 +02:00
.. highlight :: cpp
2011-02-28 22:26:43 +01:00
moments
2011-02-22 21:43:26 +01:00
-----------
2011-06-30 00:06:42 +02:00
Calculates all of the moments up to the third order of a polygon or rasterized shape
2011-06-16 14:48:23 +02:00
.. ocv:function :: Moments moments( InputArray array, bool binaryImage=false )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.moments(array[, binaryImage]) -> retval
.. ocv:cfunction :: void cvMoments( const CvArr* array, CvMoments* moments, int binary=0 )
.. ocv:pyoldfunction :: cv.Moments(array, binary=0) -> moments
: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`` ).
:param binaryImage: If it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only.
:param moments: The output moments
The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The results are returned in a structure `` Moments `` , defined as: ::
2011-05-05 15:31:54 +02:00
2011-02-22 21:43:26 +01:00
class Moments
{
public:
Moments();
Moments(double m00, double m10, double m01, double m20, double m11,
double m02, double m30, double m21, double m12, double m03 );
Moments( const CvMoments& moments );
operator CvMoments() const;
2011-02-26 12:05:10 +01:00
2011-06-30 02:41:41 +02:00
..
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
In case of a raster image, the spatial moments :math: `\texttt{Moments::m}_{ji}` are computed as:
2011-02-22 21:43:26 +01:00
.. math ::
2011-04-30 15:52:25 +02:00
\texttt{m} _{ji}= \sum _{x,y} \left ( \texttt{array} (x,y) \cdot x^j \cdot y^i \right );
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
the central moments
:math: `\texttt{Moments::mu}_{ji}` are computed as:
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
\texttt{mu} _{ji}= \sum _{x,y} \left ( \texttt{array} (x,y) \cdot (x - \bar{x} )^j \cdot (y - \bar{y} )^i \right )
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
where
:math: `(\bar{x}, \bar{y})` is the mass center:
2011-02-22 21:43:26 +01:00
.. math ::
2011-04-30 15:52:25 +02:00
\bar{x} = \frac{\texttt{m}_{10}}{\texttt{m}_{00}} , \; \bar{y} = \frac{\texttt{m}_{01}}{\texttt{m}_{00}};
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
and the normalized central moments
:math: `\texttt{Moments::nu}_{ij}` are computed as:
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
\texttt{nu} _{ji}= \frac{\texttt{mu}_{ji}}{\texttt{m}_{00}^{(i+j)/2+1}} .
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
**Note** :
:math: `\texttt{mu}_{00}=\texttt{m}_{00}` ,
:math: `\texttt{nu}_{00}=1`
:math: `\texttt{nu}_{10}=\texttt{mu}_{10}=\texttt{mu}_{01}=\texttt{mu}_{10}=0` , hence the values are not stored.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
The moments of a contour are defined in the same way but computed using Green's formula
2011-02-26 12:05:10 +01:00
(see
2011-02-22 21:43:26 +01:00
http://en.wikipedia.org/wiki/Green_theorem
2011-04-30 15:52:25 +02:00
). So, due to a limited raster resolution, the moments computed for a contour are slightly different from the moments computed for the same rasterized contour.
2011-06-30 14:06:26 +02:00
.. seealso ::
:ocv:func: `contourArea` ,
:ocv:func: `arcLength`
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
HuMoments
2011-02-22 21:43:26 +01:00
-------------
2011-06-30 00:06:42 +02:00
Calculates the seven Hu invariants.
2011-06-30 14:06:26 +02:00
.. ocv:function :: void HuMoments( const Moments& moments, double* hu )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.HuMoments(m) -> hu
.. ocv:cfunction :: void cvGetHuMoments( const CvMoments* moments, CvHuMoments* hu )
.. ocv:pyoldfunction :: cv.GetHuMoments(moments) -> hu
2011-02-22 21:43:26 +01:00
2011-06-16 14:48:23 +02:00
:param moments: Input moments computed with :ocv:func:`moments` .
2011-06-30 14:06:26 +02:00
:param hu: Output Hu invariants.
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
The function calculates the seven Hu invariants (introduced in [Hu62]_ ; see also
http://en.wikipedia.org/wiki/Image_moment) defined as:
2011-02-22 21:43:26 +01:00
.. math ::
2011-06-30 14:06:26 +02:00
\begin{array}{l} hu[0]= \eta _{20}+ \eta _{02} \\ hu[1]=( \eta _{20}- \eta _{02})^{2}+4 \eta _{11}^{2} \\ hu[2]=( \eta _{30}-3 \eta _{12})^{2}+ (3 \eta _{21}- \eta _{03})^{2} \\ hu[3]=( \eta _{30}+ \eta _{12})^{2}+ ( \eta _{21}+ \eta _{03})^{2} \\ hu[4]=( \eta _{30}-3 \eta _{12})( \eta _{30}+ \eta _{12})[( \eta _{30}+ \eta _{12})^{2}-3( \eta _{21}+ \eta _{03})^{2}]+(3 \eta _{21}- \eta _{03})( \eta _{21}+ \eta _{03})[3( \eta _{30}+ \eta _{12})^{2}-( \eta _{21}+ \eta _{03})^{2}] \\ hu[5]=( \eta _{20}- \eta _{02})[( \eta _{30}+ \eta _{12})^{2}- ( \eta _{21}+ \eta _{03})^{2}]+4 \eta _{11}( \eta _{30}+ \eta _{12})( \eta _{21}+ \eta _{03}) \\ hu[6]=(3 \eta _{21}- \eta _{03})( \eta _{21}+ \eta _{03})[3( \eta _{30}+ \eta _{12})^{2}-( \eta _{21}+ \eta _{03})^{2}]-( \eta _{30}-3 \eta _{12})( \eta _{21}+ \eta _{03})[3( \eta _{30}+ \eta _{12})^{2}-( \eta _{21}+ \eta _{03})^{2}] \\ \end{array}
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
where
2011-04-30 15:52:25 +02:00
:math: `\eta_{ji}` stands for
2011-02-26 12:05:10 +01:00
:math: `\texttt{Moments::nu}_{ji}` .
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
These values are proved to be invariants to the image scale, rotation, and reflection except the seventh one, whose sign is changed by reflection. This invariance is proved with the assumption of infinite image resolution. In case of raster images, the computed Hu invariants for the original and transformed images are a bit different.
2011-02-22 21:43:26 +01:00
2011-06-30 14:06:26 +02:00
.. seealso :: :ocv:func: `matchShapes`
2011-04-30 15:52:25 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
findContours
2011-02-22 21:43:26 +01:00
----------------
2011-06-30 00:06:42 +02:00
Finds contours in a binary image.
2011-06-16 14:48:23 +02:00
.. ocv:function :: void findContours( InputOutputArray image, OutputArrayOfArrays contours, OutputArray hierarchy, int mode, int method, Point offset=Point())
2011-02-26 12:05:10 +01:00
2011-06-16 14:48:23 +02:00
.. ocv:function :: void findContours( InputOutputArray image, OutputArrayOfArrays contours, int mode, int method, Point offset=Point())
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:cfunction :: int cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** firstContour, int headerSize=sizeof(CvContour), int mode=CV_RETR_LIST, int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0, 0) )
.. ocv:pyoldfunction :: cv.FindContours(image, storage, mode=CV_RETR_LIST, method=CV_CHAIN_APPROX_SIMPLE, offset=(0, 0)) -> cvseq
2011-02-22 21:43:26 +01:00
2011-06-16 14:48:23 +02:00
:param image: Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as ``binary`` . You can use :ocv:func:`compare` , :ocv:func:`inRange` , :ocv:func:`threshold` , :ocv:func:`adaptiveThreshold` , :ocv:func:`Canny` , and others to create a binary image out of a grayscale or color one. The function modifies the ``image`` while extracting the contours.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param contours: Detected contours. Each contour is stored as a vector of points.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param hiararchy: 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.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param mode: Contour retrieval mode.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
* **CV_RETR_EXTERNAL** retrieves only the extreme outer contours. It sets `` hierarchy[i][2]=hierarchy[i][3]=-1 `` for all the contours.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
* **CV_RETR_LIST** retrieves all of the contours without establishing any hierarchical relationships.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
* **CV_RETR_CCOMP** retrieves all of the contours and organizes them into a two-level hierarchy. At the top level, there are external boundaries of the components. At the second level, there are boundaries of the holes. If there is another contour inside a hole of a connected component, it is still put at the top level.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
* **CV_RETR_TREE** retrieves all of the contours and reconstructs a full hierarchy of nested contours. This full hierarchy is built and shown in the OpenCV `` contours.c `` demo.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param method: Contour approximation method.
2011-02-22 21:43:26 +01:00
2011-05-05 15:31:54 +02:00
* **CV_CHAIN_APPROX_NONE** stores absolutely all the contour points. That is, any 2 subsequent points `` (x1,y1) `` and `` (x2,y2) `` of the contour will be either horizontal, vertical or diagonal neighbors, that is, `` max(abs(x1-x2),abs(y2-y1))==1 `` .
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
* **CV_CHAIN_APPROX_SIMPLE** compresses horizontal, vertical, and diagonal segments and leaves only their end points. For example, an up-right rectangular contour is encoded with 4 points.
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
* **CV_CHAIN_APPROX_TC89_L1,CV_CHAIN_APPROX_TC89_KCOS** applies one of the flavors of the Teh-Chin chain approximation algorithm. See [TehChin89]_ for details.
2011-02-26 12:05:10 +01:00
2011-04-30 15:52:25 +02:00
:param offset: Optional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
The function retrieves contours from the binary image using the algorithm
2011-06-30 00:06:42 +02:00
[Suzuki85]_ . The contours are a useful tool for shape analysis and object detection and recognition. See `` squares.c `` in the OpenCV sample directory.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
**Note** :
Source `` image `` is modified by this function.
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
drawContours
2011-02-22 21:43:26 +01:00
----------------
2011-06-30 00:06:42 +02:00
Draws contours outlines or filled contours.
2011-06-16 14:48:23 +02:00
.. ocv:function :: void drawContours( InputOutputArray image, InputArrayOfArrays contours, int contourIdx, const Scalar& color, int thickness=1, int lineType=8, InputArray hierarchy=noArray(), int maxLevel=INT_MAX, Point offset=Point() )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.drawContours(image, contours, contourIdx, color[, thickness[, lineType[, hierarchy[, maxLevel[, offset]]]]]) -> None
.. ocv:cfunction :: void cvDrawContours( CvArr *img, CvSeq* contour, CvScalar externalColor, CvScalar holeColor, int maxLevel, int thickness=1, int lineType=8 )
.. ocv:pyoldfunction :: cv.DrawContours(img, contour, externalColor, holeColor, maxLevel, thickness=1, lineType=8, offset=(0, 0))-> None
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param image: Destination image.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param contours: All the input contours. Each contour is stored as a point vector.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param contourIdx: Parameter indicating a contour to draw. If it is negative, all the contours are drawn.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param color: Color of the contours.
2011-06-30 02:41:41 +02:00
2011-04-30 15:52:25 +02:00
:param thickness: Thickness of lines the contours are drawn with. If it is negative (for example, ``thickness=CV_FILLED`` ), the contour interiors are
2011-02-26 12:05:10 +01:00
drawn.
2011-02-22 21:43:26 +01:00
2011-06-16 14:48:23 +02:00
:param lineType: Line connectivity. See :ocv:func:`line` for details.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param hierarchy: Optional information about hierarchy. It is only needed if you want to draw only some of the contours (see ``maxLevel`` ).
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param maxLevel: Maximal level for drawn contours. If it is 0, only
the specified contour is drawn. If it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function draws the contours, all the nested contours, all the nested-to-nested contours, and so on. This parameter is only taken into account when there is `` hierarchy `` available.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param offset: Optional contour shift parameter. Shift all the drawn contours by the specified :math:`\texttt{offset}=(dx,dy)` .
2011-02-28 22:26:43 +01:00
2011-02-26 12:05:10 +01:00
The function draws contour outlines in the image if
:math: `\texttt{thickness} \ge 0` or fills the area bounded by the contours if
2011-04-30 15:52:25 +02:00
:math:`\texttt{thickness}<0` . Here is the example on how to retrieve connected components from the binary image and label them: ::
2011-02-22 21:43:26 +01:00
#include "cv.h"
#include "highgui.h"
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
using namespace cv;
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
int main( int argc, char** argv )
{
Mat src;
2011-04-30 15:52:25 +02:00
// the first command-line parameter must be a filename of the binary
2011-02-22 21:43:26 +01:00
// (black-n-white) image
if( argc != 2 || !(src=imread(argv[1], 0)).data)
return -1;
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
Mat dst = Mat::zeros(src.rows, src.cols, CV_8UC3);
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
src = src > 1;
namedWindow( "Source", 1 );
imshow( "Source", src );
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
vector<vector<Point> > contours;
vector<Vec4i> hierarchy;
2011-02-26 12:05:10 +01:00
findContours( src, contours, hierarchy,
2011-02-22 21:43:26 +01:00
CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE );
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
// iterate through all the top-level contours,
// draw each connected component with its own random color
int idx = 0;
for( ; idx >= 0; idx = hierarchy[idx][0] )
{
Scalar color( rand()&255, rand()&255, rand()&255 );
drawContours( dst, contours, idx, color, CV_FILLED, 8, hierarchy );
}
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
namedWindow( "Components", 1 );
imshow( "Components", dst );
waitKey(0);
}
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
approxPolyDP
2011-02-22 21:43:26 +01:00
----------------
2011-06-30 00:06:42 +02:00
Approximates a polygonal curve(s) with the specified precision.
2011-06-16 14:48:23 +02:00
.. ocv:function :: void approxPolyDP( InputArray curve, OutputArray approxCurve, double epsilon, bool closed )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.approxPolyDP(curve, epsilon, closed[, approxCurve]) -> approxCurve
.. ocv:cfunction :: CvSeq* cvApproxPoly( const void* curve, int headerSize, CvMemStorage* storage, int method, double epsilon, int recursive=0 )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
:param curve: Input vector of 2d point, stored in:
* `` std::vector `` or `` Mat `` (C++ interface)
* `` Nx2 `` numpy array (Python interface).
* `` CvSeq `` or `` ` ` CvMat `` (C interface)
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
:param approxCurve: Result of the approximation. The type should match the type of the input curve. In the case of C interface the approximated curve is stored in the memory storage and pointer to it is returned.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param epsilon: Parameter specifying the approximation accuracy. This is the maximum distance between the original curve and its approximation.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param closed: If true, the approximated curve is closed (its first and last vertices are connected). Otherwise, it is not closed.
2011-06-30 00:06:42 +02:00
:param headerSize: Header size of the approximated curve. Normally, ``sizeof(CvContour)`` is used.
:param storage: Memory storage where the approximated curve will be stored.
:param method: The contour approximation algorithm. Only ``CV_POLY_APPROX_DP`` is supported.
:param recursive: The recursion flag. If it is non-zero and ``curve`` is ``CvSeq*``, the function ``cvApproxPoly`` will approximate all the contours accessible from ``curve`` by ``h_next`` and ``v_next`` links.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
The functions `` approxPolyDP `` approximate a curve or a polygon with another curve/polygon with less vertices, so that the distance between them is less or equal to the specified precision. It uses the Douglas-Peucker algorithm
2011-02-22 21:43:26 +01:00
http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
2011-06-08 00:51:31 +02:00
See http://code.ros.org/svn/opencv/trunk/opencv/samples/cpp/contours.cpp on how to use the function.
2011-06-30 00:06:42 +02:00
ApproxChains
-------------
Approximates Freeman chain(s) with a polygonal curve.
.. ocv:cfunction :: CvSeq* cvApproxChains( CvSeq* chain, CvMemStorage* storage, int method=CV_CHAIN_APPROX_SIMPLE, double parameter=0, int minimalPerimeter=0, int recursive=0 )
.. ocv:pyoldfunction :: cv.ApproxChains(chain, storage, method=CV_CHAIN_APPROX_SIMPLE, parameter=0, minimalPerimeter=0, recursive=0)-> contours
:param chain: Pointer to the approximated Freeman chain that can refer to other chains
:param storage: Storage location for the resulting polylines
2011-06-30 14:06:26 +02:00
:param method: Approximation method (see the description of the function :ocv:cfunc:`FindContours` )
2011-06-30 00:06:42 +02:00
:param parameter: Method parameter (not used now)
:param minimalPerimeter: Approximates only those contours whose perimeters are not less than ``minimal_perimeter`` . Other chains are removed from the resulting structure
:param recursive: Recursion flag. If it is non-zero, the function approximates all chains that can be obtained to from ``chain`` by using the ``h_next`` or ``v_next`` links. Otherwise, the single input chain is approximated.
This is a stand-alone contour approximation routine, not represented in the new interface. When :ocv:cfunc: `FindContours` retrieves contours as Freeman chains, it calls to the function to get approximated contours, represented as polygons.
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
arcLength
2011-02-22 21:43:26 +01:00
-------------
2011-06-30 00:06:42 +02:00
Calculates a contour perimeter or a curve length.
2011-06-16 14:48:23 +02:00
.. ocv:function :: double arcLength( InputArray curve, bool closed )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.arcLength(curve, closed) -> retval
.. ocv:cfunction :: double cvArcLength( const void* curve, CvSlice slice=CV_WHOLE_SEQ, int isClosed=-1 )
.. ocv:pyoldfunction :: cv.ArcLength(curve, slice=CV_WHOLE_SEQ, isClosed=-1)-> double
2011-02-22 21:43:26 +01:00
2011-06-08 00:51:31 +02:00
:param curve: Input vector of 2D points, stored in ``std::vector`` or ``Mat``.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param closed: Flag indicating whether the curve is closed or not.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
The function computes a curve length or a closed contour perimeter.
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
boundingRect
2011-02-22 21:43:26 +01:00
----------------
2011-06-30 00:06:42 +02:00
Calculates the up-right bounding rectangle of a point set.
2011-06-16 14:48:23 +02:00
.. ocv:function :: Rect boundingRect( InputArray points )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.boundingRect(points) -> retval
.. ocv:cfunction :: CvRect cvBoundingRect( CvArr* points, int update=0 )
.. ocv:pyoldfunction :: cv.BoundingRect(points, update=0)-> CvRect
2011-02-22 21:43:26 +01:00
2011-06-08 00:51:31 +02:00
:param points: Input 2D point set, stored in ``std::vector`` or ``Mat``.
2011-02-22 21:43:26 +01:00
The function calculates and returns the minimal up-right bounding rectangle for the specified point set.
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
contourArea
2011-02-22 21:43:26 +01:00
---------------
2011-06-30 00:06:42 +02:00
Calculates a contour area.
2011-06-16 14:48:23 +02:00
.. ocv:function :: double contourArea( InputArray contour, bool oriented=false )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.contourArea(contour[, oriented]) -> retval
.. ocv:cfunction :: double cvContourArea( const CvArr* contour, CvSlice slice=CV_WHOLE_SEQ )
.. ocv:pyoldfunction :: cv.ContourArea(contour, slice=CV_WHOLE_SEQ)-> double
2011-02-22 21:43:26 +01:00
2011-06-08 00:51:31 +02:00
:param contour: Input vector of 2d points (contour vertices), stored in ``std::vector`` or ``Mat``.
2011-06-09 03:16:45 +02:00
:param orientation: Oriented area flag. If it is true, the function returns a signed area value, depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can determine orientation of a contour by taking sign of the area. By default the parameter is ``false``, which means that the absolute value is returned.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
The function computes a contour area. Similarly to
2011-06-16 14:48:23 +02:00
:ocv:func: `moments` , the area is computed using the Green formula. Thus, the returned area and the number of non-zero pixels, if you draw the contour using
:ocv:func: `drawContours` or
:ocv:func: `fillPoly` , can be different.
2011-02-26 12:05:10 +01:00
Here is a short example: ::
2011-02-22 21:43:26 +01:00
vector<Point> contour;
contour.push_back(Point2f(0, 0));
contour.push_back(Point2f(10, 0));
contour.push_back(Point2f(10, 10));
contour.push_back(Point2f(5, 4));
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
double area0 = contourArea(contour);
vector<Point> approx;
approxPolyDP(contour, approx, 5, true);
double area1 = contourArea(approx);
2011-02-26 12:05:10 +01:00
2011-06-08 00:51:31 +02:00
cout << "area0 =" << area0 << endl <<
"area1 =" << area1 << endl <<
"approx poly vertices" << approx.size() << endl;
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
convexHull
2011-02-22 21:43:26 +01:00
--------------
2011-06-30 00:06:42 +02:00
Finds the convex hull of a point set.
2011-06-16 14:48:23 +02:00
.. ocv:function :: void convexHull( InputArray points, OutputArray hull, bool clockwise=false, bool returnPoints=true )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.convexHull(points[, hull[, returnPoints[, clockwise]]]) -> hull
.. ocv:cfunction :: CvSeq* cvConvexHull2( const CvArr* input, void* storage=NULL, int orientation=CV_CLOCKWISE, int returnPoints=0 )
.. ocv:pyoldfunction :: cv.ConvexHull2(points, storage, orientation=CV_CLOCKWISE, returnPoints=0)-> convexHull
2011-02-22 21:43:26 +01:00
2011-06-08 00:51:31 +02:00
:param points: Input 2D point set, stored in ``std::vector`` or ``Mat``.
2011-02-22 21:43:26 +01:00
2011-06-08 00:51:31 +02:00
:param hull: Output convex hull. It is either an integer vector of indices or vector of points. In the first case the ``hull`` elements are 0-based indices of the convex hull points in the original array (since the set of convex hull points is a subset of the original point set). In the second case ``hull`` elements will be the convex hull points themselves.
2011-06-30 00:06:42 +02:00
:param storage: The output memory storage in the old API (``cvConvexHull2`` returns a sequence containing the convex hull points or their indices).
2011-02-22 21:43:26 +01:00
2011-06-08 00:51:31 +02:00
:param clockwise: Orientation flag. If true, the output convex hull will be oriented clockwise. Otherwise, it will be oriented counter-clockwise. The usual screen coordinate system is assumed where the origin is at the top-left corner, x axis is oriented to the right, and y axis is oriented downwards.
2011-06-30 00:06:42 +02:00
:param orientation: Convex hull orientation parameter in the old API, ``CV_CLOCKWISE`` or ``CV_COUNTERCLOCKWISE``.
2011-06-08 00:51:31 +02:00
:param returnPoints: Operation flag. In the case of matrix, when the flag is true, the function will return convex hull points, otherwise it will return indices of the convex hull points. When the output array is ``std::vector``, the flag is ignored, and the output depends on the type of the vector - ``std::vector<int>`` implies ``returnPoints=true``, ``std::vector<Point>`` implies ``returnPoints=false``.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
The functions find the convex hull of a 2D point set using the Sklansky's algorithm
2011-06-30 00:06:42 +02:00
[Sklansky82]_
2011-02-26 12:05:10 +01:00
that has
2011-06-08 00:51:31 +02:00
*O(N logN)* complexity in the current implementation. See the OpenCV sample `` convexhull.cpp `` that demonstrates the usage of different function variants.
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
ConvexityDefects
----------------
Finds the convexity defects of a contour.
.. ocv:cfunction :: CvSeq* cvConvexityDefects( const CvArr* contour, const CvArr* convexhull, CvMemStorage* storage=NULL )
.. ocv:pyoldfunction :: cv.ConvexityDefects(contour, convexhull, storage)-> convexityDefects
:param contour: Input contour
:param convexhull: Convex hull obtained using :ocv:cfunc:`ConvexHull2` that should contain pointers or indices to the contour points, not the hull points themselves (the ``returnPoints`` parameter in :ocv:cfunc:`ConvexHull2` should be 0)
:param storage: Container for the output sequence of convexity defects. If it is NULL, the contour or hull (in that order) storage is used
The function finds all convexity defects of the input contour and returns a sequence of the `` CvConvexityDefect `` structures, where `` CvConvexityDetect `` is defined as: ::
struct CvConvexityDefect
{
CvPoint* start; // point of the contour where the defect begins
CvPoint* end; // point of the contour where the defect ends
CvPoint* depth_point; // the farthest from the convex hull point within the defect
float depth; // distance between the farthest point and the convex hull
};
Here is the picture displaying convexity defects of a hand contour:
.. image :: pics/defects.png
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
fitEllipse
2011-02-22 21:43:26 +01:00
--------------
2011-06-30 00:06:42 +02:00
Fits an ellipse around a set of 2D points.
2011-06-16 14:48:23 +02:00
.. ocv:function :: RotatedRect fitEllipse( InputArray points )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.fitEllipse(points) -> retval
.. ocv:cfunction :: CvBox2D cvFitEllipse2( const CvArr* points )
.. ocv:pyoldfunction :: cv.FitEllipse2(points)-> Box2D
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
:param points: The input 2D point set, stored in:
* `` std::vector<> `` or `` Mat `` (C++ interface).
* `` CvSeq* `` or `` CvMat* `` (C interface)
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
* Nx2 numpy array (Python interface)
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
The function calculates the ellipse that fits (in least-squares sense) a set of 2D points best of all. It returns the rotated rectangle in which the ellipse is inscribed. The algorithm [Fitzgibbon95]_ is used.
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
fitLine
2011-02-22 21:43:26 +01:00
-----------
2011-06-30 00:06:42 +02:00
Fits a line to a 2D or 3D point set.
2011-06-16 14:48:23 +02:00
.. ocv:function :: void fitLine( InputArray points, OutputArray line, int distType, double param, double reps, double aeps )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.fitLine(points, distType, param, reps, aeps) -> line
.. ocv:cfunction :: void cvFitLine( const CvArr* points, int distType, double param, double reps, double aeps, float* line )
.. ocv:pyoldfunction :: cv.FitLine(points, distType, param, reps, aeps) -> line
2011-02-22 21:43:26 +01:00
2011-06-08 00:51:31 +02:00
:param points: Input vector of 2D or 3D points, stored in ``std::vector<>`` or ``Mat``.
2011-02-22 21:43:26 +01:00
2011-06-08 00:51:31 +02:00
:param line: Output line parameters. In case of 2D fitting it should be a vector of 4 elements (like ``Vec4f``) - ``(vx, vy, x0, y0)``, where ``(vx, vy)`` is a normalized vector collinear to the line and ``(x0, y0)`` is a point on the line. In case of 3D fitting, it should be a vector of 6 elements (like ``Vec6f``) - ``(vx, vy, vz, x0, y0, z0)``, where ``(vx, vy, vz)`` is a normalized vector collinear to the line and ``(x0, y0, z0)`` is a point on the line.
2011-02-26 12:05:10 +01:00
2011-04-30 15:52:25 +02:00
:param distType: Distance used by the M-estimator (see the discussion).
2011-02-26 12:05:10 +01:00
2011-04-30 15:52:25 +02:00
:param param: Numerical parameter ( ``C`` ) for some types of distances. If it is 0, an optimal value is chosen.
2011-02-26 12:05:10 +01:00
2011-06-30 14:06:26 +02:00
:param reps: Sufficient accuracy for the radius (distance between the coordinate origin and the line).
:param aeps: Sufficient accuracy for the angle. 0.01 would be a good default value for ``reps`` and ``aeps``.
2011-02-26 12:05:10 +01:00
2011-05-05 15:31:54 +02:00
The function `` fitLine `` fits a line to a 2D or 3D point set by minimizing
2011-02-26 12:05:10 +01:00
:math: `\sum_i \rho(r_i)` where
2011-04-30 15:52:25 +02:00
:math: `r_i` is a distance between the
:math: `i^{th}` point, the line and
2011-02-26 12:05:10 +01:00
:math: `\rho(r)` is a distance function, one of:
2011-02-22 21:43:26 +01:00
* distType=CV\_DIST\_L2
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
\rho (r) = r^2/2 \quad \text{(the simplest and the fastest least-squares method)}
2011-02-22 21:43:26 +01:00
* distType=CV\_DIST\_L1
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
\rho (r) = r
2011-02-22 21:43:26 +01:00
* distType=CV\_DIST\_L12
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
\rho (r) = 2 \cdot ( \sqrt{1 + \frac{r^2}{2}} - 1)
2011-02-22 21:43:26 +01:00
* distType=CV\_DIST\_FAIR
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
\rho \left (r \right ) = C^2 \cdot \left ( \frac{r}{C} - \log{\left(1 + \frac{r}{C}\right)} \right ) \quad \text{where} \quad C=1.3998
2011-02-22 21:43:26 +01:00
* distType=CV\_DIST\_WELSCH
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
\rho \left (r \right ) = \frac{C^2}{2} \cdot \left ( 1 - \exp{\left(-\left(\frac{r}{C}\right)^2\right)} \right ) \quad \text{where} \quad C=2.9846
2011-02-22 21:43:26 +01:00
* distType=CV\_DIST\_HUBER
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
\rho (r) = \fork{r^2/2}{if $r < C$}{C \cdot (r-C/2)}{otherwise} \quad \text{where} \quad C=1.345
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
The algorithm is based on the M-estimator (
http://en.wikipedia.org/wiki/M-estimator
2011-04-30 15:52:25 +02:00
) technique that iteratively fits the line using the weighted least-squares algorithm. After each iteration the weights
:math: `w_i` are adjusted to be inversely proportional to
2011-02-26 12:05:10 +01:00
:math: `\rho(r_i)` .
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
isContourConvex
2011-02-22 21:43:26 +01:00
-------------------
2011-06-30 00:06:42 +02:00
Tests a contour convexity.
2011-06-16 14:48:23 +02:00
.. ocv:function :: bool isContourConvex( InputArray contour )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.isContourConvex(contour) -> retval
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:cfunction :: int cvCheckContourConvexity( const CvArr* contour )
.. ocv:pyoldfunction :: cv.CheckContourConvexity(contour)-> int
:param contour: The input vector of 2D points, stored in:
* `` std::vector<> `` or `` Mat `` (C++ interface).
* `` CvSeq* `` or `` CvMat* `` (C interface)
* Nx2 numpy array (Python interface)
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
The function tests whether the input contour is convex or not. The contour must be simple, that is, without self-intersections. Otherwise, the function output is undefined.
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
minAreaRect
2011-02-22 21:43:26 +01:00
---------------
2011-06-30 00:06:42 +02:00
Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
2011-06-16 14:48:23 +02:00
.. ocv:function :: RotatedRect minAreaRect( InputArray points )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.minAreaRect(points) -> retval
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:cfunction :: CvBox2D cvMinAreaRect2( const CvArr* points, CvMemStorage* storage=NULL )
.. ocv:pyoldfunction :: cv.MinAreaRect2(points, storage=None)-> CvBox2D
:param points: The input vector of 2D points, stored in:
* `` std::vector<> `` or `` Mat `` (C++ interface).
* `` CvSeq* `` or `` CvMat* `` (C interface)
* Nx2 numpy array (Python interface)
2011-04-30 15:52:25 +02:00
2011-05-05 15:31:54 +02:00
The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a specified point set. See the OpenCV sample `` minarea.cpp `` .
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
minEnclosingCircle
2011-02-22 21:43:26 +01:00
----------------------
2011-06-30 00:06:42 +02:00
Finds a circle of the minimum area enclosing a 2D point set.
2011-06-16 14:48:23 +02:00
.. ocv:function :: void minEnclosingCircle( InputArray points, Point2f& center, float& radius )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.minEnclosingCircle(points, center, radius) -> None
.. ocv:cfunction :: int cvMinEnclosingCircle( const CvArr* points, CvPoint2D32f* center, float* radius )
2011-04-30 15:52:25 +02:00
2011-06-30 00:06:42 +02:00
.. ocv:pyoldfunction :: cv.MinEnclosingCircle(points)-> (int, center, radius)
:param points: The input vector of 2D points, stored in:
* `` std::vector<> `` or `` Mat `` (C++ interface).
* `` CvSeq* `` or `` CvMat* `` (C interface)
* Nx2 numpy array (Python interface)
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param center: Output center of the circle.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param radius: Output radius of the circle.
2011-02-22 21:43:26 +01:00
2011-05-05 15:31:54 +02:00
The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm. See the OpenCV sample `` minarea.cpp `` .
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
matchShapes
2011-02-22 21:43:26 +01:00
---------------
2011-06-30 00:06:42 +02:00
Compares two shapes.
2011-06-16 14:48:23 +02:00
.. ocv:function :: double matchShapes( InputArray object1, InputArray object2, int method, double parameter=0 )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.matchShapes(contour1, contour2, method, parameter) -> retval
.. ocv:cfunction :: double cvMatchShapes( const void* object1, const void* object2, int method, double parameter=0 )
.. ocv:pyoldfunction :: cv.MatchShapes(object1, object2, method, parameter=0)-> None
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param object1: The first contour or grayscale image.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param object2: The second contour or grayscale image.
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
:param method: Comparison method: ``CV_CONTOUR_MATCH_I1`` , \ ``CV_CONTOURS_MATCH_I2`` \
2011-04-30 15:52:25 +02:00
or `` CV_CONTOURS_MATCH_I3 `` (see the details below).
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param parameter: Method-specific parameter (not supported now).
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
The function compares two shapes. All three implemented methods use the Hu invariants (see
2011-06-16 14:48:23 +02:00
:ocv:func: `HuMoments` ) as follows (
2011-02-26 12:05:10 +01:00
:math: `A` denotes `` object1 `` ,:math: `B` denotes `` object2 `` ):
2011-02-22 21:43:26 +01:00
* method=CV\_CONTOUR\_MATCH\_I1
2011-02-26 12:05:10 +01:00
2011-02-22 21:43:26 +01:00
.. math ::
2011-02-26 12:05:10 +01:00
I_1(A,B) = \sum _{i=1...7} \left | \frac{1}{m^A_i} - \frac{1}{m^B_i} \right |
2011-02-22 21:43:26 +01:00
* method=CV\_CONTOUR\_MATCH\_I2
.. math ::
2011-02-26 12:05:10 +01:00
I_2(A,B) = \sum _{i=1...7} \left | m^A_i - m^B_i \right |
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
* method=CV\_CONTOUR\_MATCH\_I3
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
.. math ::
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
I_3(A,B) = \sum _{i=1...7} \frac{ \left| m^A_i - m^B_i \right| }{ \left| m^A_i \right| }
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
where
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
.. math ::
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
\begin{array}{l} m^A_i = \mathrm{sign} (h^A_i) \cdot \log{h^A_i} \\ m^B_i = \mathrm{sign} (h^B_i) \cdot \log{h^B_i} \end{array}
2011-02-22 21:43:26 +01:00
2011-02-26 12:05:10 +01:00
and
:math: `h^A_i, h^B_i` are the Hu moments of
:math: `A` and
2011-04-30 15:52:25 +02:00
:math: `B` , respectively.
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
2011-02-22 21:43:26 +01:00
2011-02-28 22:26:43 +01:00
pointPolygonTest
2011-02-22 21:43:26 +01:00
--------------------
2011-06-30 00:06:42 +02:00
Performs a point-in-contour test.
2011-06-16 14:48:23 +02:00
.. ocv:function :: double pointPolygonTest( InputArray contour, Point2f pt, bool measureDist )
2011-02-22 21:43:26 +01:00
2011-06-30 00:06:42 +02:00
.. ocv:pyfunction :: cv2.pointPolygonTest(contour, pt, measureDist) -> retval
.. ocv:cfunction :: double cvPointPolygonTest( const CvArr* contour, CvPoint2D32f pt, int measureDist )
.. ocv:pyoldfunction :: cv.PointPolygonTest(contour, pt, measureDist)-> double
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param contour: Input contour.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param pt: Point tested against the contour.
2011-02-22 21:43:26 +01:00
2011-04-30 15:52:25 +02:00
:param measureDist: If true, the function estimates the signed distance from the point to the nearest contour edge. Otherwise, the function only checks if the point is inside a contour or not.
2011-02-22 21:43:26 +01:00
The function determines whether the
point is inside a contour, outside, or lies on an edge (or coincides
2011-04-30 15:52:25 +02:00
with a vertex). It returns positive (inside), negative (outside), or zero (on an edge) value,
2011-02-26 12:05:10 +01:00
correspondingly. When `` measureDist=false `` , the return value
2011-04-30 15:52:25 +02:00
is +1, -1, and 0, respectively. Otherwise, the return value
is a signed distance between the point and the nearest contour
2011-02-22 21:43:26 +01:00
edge.
2011-04-30 15:52:25 +02:00
Here is a sample output of the function where each image pixel is tested against the contour.
2011-02-22 21:43:26 +01:00
2011-03-05 22:26:13 +01:00
.. image :: pics/pointpolygon.png
2011-02-22 21:43:26 +01:00
2011-06-30 02:41:41 +02:00
.. [Fitzgibbon95] Andrew W. Fitzgibbon, R.B.Fisher. A Buyer<65> s Guide to Conic Fitting. Proc.5th British Machine Vision Conference, Birmingham, pp. 513-522, 1995.
2011-06-30 00:06:42 +02:00
.. [Hu62] M. Hu. Visual Pattern Recognition by Moment Invariants, IRE Transactions on Information Theory, 8:2, pp. 179-187, 1962.
2011-06-30 02:41:41 +02:00
.. [Sklansky82] Sklansky, J., <20> Finding the Convex Hull of a Simple Polygon<6F> . PRL 1 $number, pp 79-83 (1982)
2011-06-30 00:06:42 +02:00
2011-06-30 02:41:41 +02:00
.. [Suzuki85] Suzuki, S. and Abe, K., <20> Topological Structural Analysis of Digitized Binary Images by Border Following<6E> . CVGIP 30 1, pp 32-46 (1985)
2011-06-30 00:06:42 +02:00
2011-06-30 02:41:41 +02:00
.. [TehChin89] Teh, C.H. and Chin, R.T., <20> On the Detection of Dominant Points on Digital Curve<76> . PAMI 11 8, pp 859-872 (1989)