10 Finds edges in an image using the [Canny86]_ algorithm.
12 .. ocv:function:: void Canny( InputArray image, OutputArray edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false )
14 .. ocv:pyfunction:: cv2.Canny(image, threshold1, threshold2[, edges[, apertureSize[, L2gradient]]]) -> edges
16 .. ocv:cfunction:: void cvCanny( const CvArr* image, CvArr* edges, double threshold1, double threshold2, int aperture_size=3 )
18 .. ocv:pyoldfunction:: cv.Canny(image, edges, threshold1, threshold2, aperture_size=3) -> None
20 :param image: single-channel 8-bit input image.
22 :param edges: output edge map; it has the same size and type as ``image`` .
24 :param threshold1: first threshold for the hysteresis procedure.
26 :param threshold2: second threshold for the hysteresis procedure.
28 :param apertureSize: aperture size for the :ocv:func:`Sobel` operator.
30 :param L2gradient: a flag, indicating whether a more accurate :math:`L_2` norm :math:`=\sqrt{(dI/dx)^2 + (dI/dy)^2}` should be used to calculate the image gradient magnitude ( ``L2gradient=true`` ), or whether the default :math:`L_1` norm :math:`=|dI/dx|+|dI/dy|` is enough ( ``L2gradient=false`` ).
32 The function finds edges in the input image ``image`` and marks them in the output map ``edges`` using the Canny algorithm. The smallest value between ``threshold1`` and ``threshold2`` is used for edge linking. The largest value is used to find initial segments of strong edges. See
33 http://en.wikipedia.org/wiki/Canny_edge_detector
37 cornerEigenValsAndVecs
38 ----------------------
39 Calculates eigenvalues and eigenvectors of image blocks for corner detection.
41 .. ocv:function:: void cornerEigenValsAndVecs( InputArray src, OutputArray dst, int blockSize, int ksize, int borderType=BORDER_DEFAULT )
43 .. ocv:pyfunction:: cv2.cornerEigenValsAndVecs(src, blockSize, ksize[, dst[, borderType]]) -> dst
45 .. ocv:cfunction:: void cvCornerEigenValsAndVecs( const CvArr* image, CvArr* eigenvv, int block_size, int aperture_size=3 )
47 .. ocv:pyoldfunction:: cv.CornerEigenValsAndVecs(image, eigenvv, blockSize, aperture_size=3) -> None
49 :param src: Input single-channel 8-bit or floating-point image.
51 :param dst: Image to store the results. It has the same size as ``src`` and the type ``CV_32FC(6)`` .
53 :param blockSize: Neighborhood size (see details below).
55 :param ksize: Aperture parameter for the :ocv:func:`Sobel` operator.
57 :param borderType: Pixel extrapolation method. See :ocv:func:`borderInterpolate` .
60 :math:`p` , the function ``cornerEigenValsAndVecs`` considers a ``blockSize`` :math:`\times` ``blockSize`` neighborhood
61 :math:`S(p)` . It calculates the covariation matrix of derivatives over the neighborhood as:
65 M = \begin{bmatrix} \sum _{S(p)}(dI/dx)^2 & \sum _{S(p)}(dI/dx dI/dy)^2 \\ \sum _{S(p)}(dI/dx dI/dy)^2 & \sum _{S(p)}(dI/dy)^2 \end{bmatrix}
67 where the derivatives are computed using the
68 :ocv:func:`Sobel` operator.
70 After that, it finds eigenvectors and eigenvalues of
71 :math:`M` and stores them in the destination image as
72 :math:`(\lambda_1, \lambda_2, x_1, y_1, x_2, y_2)` where
74 * :math:`\lambda_1, \lambda_2` are the non-sorted eigenvalues of :math:`M`
76 * :math:`x_1, y_1` are the eigenvectors corresponding to :math:`\lambda_1`
78 * :math:`x_2, y_2` are the eigenvectors corresponding to :math:`\lambda_2`
80 The output of the function can be used for robust edge or corner detection.
84 :ocv:func:`cornerMinEigenVal`,
85 :ocv:func:`cornerHarris`,
86 :ocv:func:`preCornerDetect`
94 .. ocv:function:: void cornerHarris( InputArray src, OutputArray dst, int blockSize, int ksize, double k, int borderType=BORDER_DEFAULT )
96 .. ocv:pyfunction:: cv2.cornerHarris(src, blockSize, ksize, k[, dst[, borderType]]) -> dst
98 .. ocv:cfunction:: void cvCornerHarris( const CvArr* image, CvArr* harris_responce, int block_size, int aperture_size=3, double k=0.04 )
100 .. ocv:pyoldfunction:: cv.CornerHarris(image, harris_dst, blockSize, aperture_size=3, k=0.04) -> None
102 :param src: Input single-channel 8-bit or floating-point image.
104 :param dst: Image to store the Harris detector responses. It has the type ``CV_32FC1`` and the same size as ``src`` .
106 :param blockSize: Neighborhood size (see the details on :ocv:func:`cornerEigenValsAndVecs` ).
108 :param ksize: Aperture parameter for the :ocv:func:`Sobel` operator.
110 :param k: Harris detector free parameter. See the formula below.
112 :param borderType: Pixel extrapolation method. See :ocv:func:`borderInterpolate` .
114 The function runs the Harris edge detector on the image. Similarly to
115 :ocv:func:`cornerMinEigenVal` and
116 :ocv:func:`cornerEigenValsAndVecs` , for each pixel
117 :math:`(x, y)` it calculates a
118 :math:`2\times2` gradient covariance matrix
119 :math:`M^{(x,y)}` over a
120 :math:`\texttt{blockSize} \times \texttt{blockSize}` neighborhood. Then, it computes the following characteristic:
124 \texttt{dst} (x,y) = \mathrm{det} M^{(x,y)} - k \cdot \left ( \mathrm{tr} M^{(x,y)} \right )^2
126 Corners in the image can be found as the local maxima of this response map.
132 Calculates the minimal eigenvalue of gradient matrices for corner detection.
134 .. ocv:function:: void cornerMinEigenVal( InputArray src, OutputArray dst, int blockSize, int ksize=3, int borderType=BORDER_DEFAULT )
136 .. ocv:pyfunction:: cv2.cornerMinEigenVal(src, blockSize[, dst[, ksize[, borderType]]]) -> dst
138 .. ocv:cfunction:: void cvCornerMinEigenVal( const CvArr* image, CvArr* eigenval, int block_size, int aperture_size=3 )
140 .. ocv:pyoldfunction:: cv.CornerMinEigenVal(image, eigenval, blockSize, aperture_size=3) -> None
142 :param src: Input single-channel 8-bit or floating-point image.
144 :param dst: Image to store the minimal eigenvalues. It has the type ``CV_32FC1`` and the same size as ``src`` .
146 :param blockSize: Neighborhood size (see the details on :ocv:func:`cornerEigenValsAndVecs` ).
148 :param ksize: Aperture parameter for the :ocv:func:`Sobel` operator.
150 :param borderType: Pixel extrapolation method. See :ocv:func:`borderInterpolate` .
152 The function is similar to
153 :ocv:func:`cornerEigenValsAndVecs` but it calculates and stores only the minimal eigenvalue of the covariance matrix of derivatives, that is,
154 :math:`\min(\lambda_1, \lambda_2)` in terms of the formulae in the
155 :ocv:func:`cornerEigenValsAndVecs` description.
161 Refines the corner locations.
163 .. ocv:function:: void cornerSubPix( InputArray image, InputOutputArray corners, Size winSize, Size zeroZone, TermCriteria criteria )
165 .. ocv:pyfunction:: cv2.cornerSubPix(image, corners, winSize, zeroZone, criteria) -> None
167 .. ocv:cfunction:: void cvFindCornerSubPix( const CvArr* image, CvPoint2D32f* corners, int count, CvSize win, CvSize zero_zone, CvTermCriteria criteria )
169 .. ocv:pyoldfunction:: cv.FindCornerSubPix(image, corners, win, zero_zone, criteria) -> corners
171 :param image: Input image.
173 :param corners: Initial coordinates of the input corners and refined coordinates provided for output.
175 :param winSize: Half of the side length of the search window. For example, if ``winSize=Size(5,5)`` , then a :math:`5*2+1 \times 5*2+1 = 11 \times 11` search window is used.
177 :param zeroZone: Half of the size of the dead region in the middle of the search zone over which the summation in the formula below is not done. It is used sometimes to avoid possible singularities of the autocorrelation matrix. The value of (-1,-1) indicates that there is no such a size.
179 :param criteria: Criteria for termination of the iterative process of corner refinement. That is, the process of corner position refinement stops either after ``criteria.maxCount`` iterations or when the corner position moves by less than ``criteria.epsilon`` on some iteration.
181 The function iterates to find the sub-pixel accurate location of corners or radial saddle points, as shown on the figure below.
183 .. image:: pics/cornersubpix.png
185 Sub-pixel accurate corner locator is based on the observation that every vector from the center
187 :math:`p` located within a neighborhood of
188 :math:`q` is orthogonal to the image gradient at
189 :math:`p` subject to image and measurement noise. Consider the expression:
193 \epsilon _i = {DI_{p_i}}^T \cdot (q - p_i)
196 :math:`{DI_{p_i}}` is an image gradient at one of the points
197 :math:`p_i` in a neighborhood of
198 :math:`q` . The value of
199 :math:`q` is to be found so that
200 :math:`\epsilon_i` is minimized. A system of equations may be set up with
201 :math:`\epsilon_i` set to zero:
205 \sum _i(DI_{p_i} \cdot {DI_{p_i}}^T) - \sum _i(DI_{p_i} \cdot {DI_{p_i}}^T \cdot p_i)
207 where the gradients are summed within a neighborhood ("search window") of
208 :math:`q` . Calling the first gradient term
209 :math:`G` and the second gradient term
216 The algorithm sets the center of the neighborhood window at this new center
217 :math:`q` and then iterates until the center stays within a set threshold.
223 Determines strong corners on an image.
225 .. ocv:function:: void goodFeaturesToTrack( InputArray image, OutputArray corners, int maxCorners, double qualityLevel, double minDistance, InputArray mask=noArray(), int blockSize=3, bool useHarrisDetector=false, double k=0.04 )
227 .. ocv:pyfunction:: cv2.goodFeaturesToTrack(image, maxCorners, qualityLevel, minDistance[, corners[, mask[, blockSize[, useHarrisDetector[, k]]]]]) -> corners
229 .. ocv:cfunction:: void cvGoodFeaturesToTrack( const CvArr* image, CvArr* eig_image, CvArr* temp_image, CvPoint2D32f* corners, int* corner_count, double quality_level, double min_distance, const CvArr* mask=NULL, int block_size=3, int use_harris=0, double k=0.04 )
231 .. ocv:pyoldfunction:: cv.GoodFeaturesToTrack(image, eigImage, tempImage, cornerCount, qualityLevel, minDistance, mask=None, blockSize=3, useHarris=0, k=0.04) -> cornerCount
233 :param image: Input 8-bit or floating-point 32-bit, single-channel image.
235 :param eig_image: The parameter is ignored.
237 :param temp_image: The parameter is ignored.
239 :param corners: Output vector of detected corners.
241 :param maxCorners: Maximum number of corners to return. If there are more corners than are found, the strongest of them is returned.
243 :param qualityLevel: Parameter characterizing the minimal accepted quality of image corners. The parameter value is multiplied by the best corner quality measure, which is the minimal eigenvalue (see :ocv:func:`cornerMinEigenVal` ) or the Harris function response (see :ocv:func:`cornerHarris` ). The corners with the quality measure less than the product are rejected. For example, if the best corner has the quality measure = 1500, and the ``qualityLevel=0.01`` , then all the corners with the quality measure less than 15 are rejected.
245 :param minDistance: Minimum possible Euclidean distance between the returned corners.
247 :param mask: Optional region of interest. If the image is not empty (it needs to have the type ``CV_8UC1`` and the same size as ``image`` ), it specifies the region in which the corners are detected.
249 :param blockSize: Size of an average block for computing a derivative covariation matrix over each pixel neighborhood. See :ocv:func:`cornerEigenValsAndVecs` .
251 :param useHarrisDetector: Parameter indicating whether to use a Harris detector (see :ocv:func:`cornerHarris`) or :ocv:func:`cornerMinEigenVal`.
253 :param k: Free parameter of the Harris detector.
255 The function finds the most prominent corners in the image or in the specified image region, as described in [Shi94]_:
258 Function calculates the corner quality measure at every source image pixel using the
259 :ocv:func:`cornerMinEigenVal` or
260 :ocv:func:`cornerHarris` .
263 Function performs a non-maximum suppression (the local maximums in *3 x 3* neighborhood are retained).
266 The corners with the minimal eigenvalue less than
267 :math:`\texttt{qualityLevel} \cdot \max_{x,y} qualityMeasureMap(x,y)` are rejected.
270 The remaining corners are sorted by the quality measure in the descending order.
273 Function throws away each corner for which there is a stronger corner at a distance less than ``maxDistance``.
275 The function can be used to initialize a point-based tracker of an object.
277 .. note:: 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`` .
281 :ocv:func:`cornerMinEigenVal`,
282 :ocv:func:`cornerHarris`,
283 :ocv:func:`calcOpticalFlowPyrLK`,
284 :ocv:func:`estimateRigidTransform`,
289 Finds circles in a grayscale image using the Hough transform.
291 .. ocv:function:: void HoughCircles( InputArray image, OutputArray circles, int method, double dp, double minDist, double param1=100, double param2=100, int minRadius=0, int maxRadius=0 )
293 .. ocv:cfunction:: CvSeq* cvHoughCircles( CvArr* image, void* circle_storage, int method, double dp, double min_dist, double param1=100, double param2=100, int min_radius=0, int max_radius=0 )
295 .. ocv:pyfunction:: cv2.HoughCircles(image, method, dp, minDist[, circles[, param1[, param2[, minRadius[, maxRadius]]]]]) -> circles
297 :param image: 8-bit, single-channel, grayscale input image.
299 :param circles: Output vector of found circles. Each vector is encoded as a 3-element floating-point vector :math:`(x, y, radius)` .
301 :param circle_storage: In C function this is a memory storage that will contain the output sequence of found circles.
303 :param method: Detection method to use. Currently, the only implemented method is ``CV_HOUGH_GRADIENT`` , which is basically *21HT* , described in [Yuen90]_.
305 :param dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if ``dp=1`` , the accumulator has the same resolution as the input image. If ``dp=2`` , the accumulator has half as big width and height.
307 :param minDist: Minimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed.
309 :param param1: First method-specific parameter. In case of ``CV_HOUGH_GRADIENT`` , it is the higher threshold of the two passed to the :ocv:func:`Canny` edge detector (the lower one is twice smaller).
311 :param param2: Second method-specific parameter. In case of ``CV_HOUGH_GRADIENT`` , it is the accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first.
313 :param minRadius: Minimum circle radius.
315 :param maxRadius: Maximum circle radius.
317 The function finds circles in a grayscale image using a modification of the Hough transform.
327 int main(int argc, char** argv)
330 if( argc != 2 && !(img=imread(argv[1], 1)).data)
332 cvtColor(img, gray, CV_BGR2GRAY);
333 // smooth it, otherwise a lot of false circles may be detected
334 GaussianBlur( gray, gray, Size(9, 9), 2, 2 );
335 vector<Vec3f> circles;
336 HoughCircles(gray, circles, CV_HOUGH_GRADIENT,
337 2, gray->rows/4, 200, 100 );
338 for( size_t i = 0; i < circles.size(); i++ )
340 Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));
341 int radius = cvRound(circles[i][2]);
342 // draw the circle center
343 circle( img, center, 3, Scalar(0,255,0), -1, 8, 0 );
344 // draw the circle outline
345 circle( img, center, radius, Scalar(0,0,255), 3, 8, 0 );
347 namedWindow( "circles", 1 );
348 imshow( "circles", img );
352 .. note:: Usually the function detects the centers of circles well. However, it may fail to find correct radii. You can assist to 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 an additional procedure.
356 :ocv:func:`fitEllipse`,
357 :ocv:func:`minEnclosingCircle`
362 Finds lines in a binary image using the standard Hough transform.
364 .. ocv:function:: void HoughLines( InputArray image, OutputArray lines, double rho, double theta, int threshold, double srn=0, double stn=0 )
366 .. ocv:pyfunction:: cv2.HoughLines(image, rho, theta, threshold[, lines[, srn[, stn]]]) -> lines
368 .. ocv:cfunction:: CvSeq* cvHoughLines2( CvArr* image, void* line_storage, int method, double rho, double theta, int threshold, double param1=0, double param2=0 )
370 .. ocv:pyoldfunction:: cv.HoughLines2(image, storage, method, rho, theta, threshold, param1=0, param2=0)-> lines
372 :param image: 8-bit, single-channel binary source image. The image may be modified by the function.
374 :param lines: Output vector of lines. Each line is represented by a two-element vector :math:`(\rho, \theta)` . :math:`\rho` is the distance from the coordinate origin :math:`(0,0)` (top-left corner of the image). :math:`\theta` is the line rotation angle in radians ( :math:`0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}` ).
376 :param rho: Distance resolution of the accumulator in pixels.
378 :param theta: Angle resolution of the accumulator in radians.
380 :param threshold: Accumulator threshold parameter. Only those lines are returned that get enough votes ( :math:`>\texttt{threshold}` ).
382 :param srn: For the multi-scale Hough transform, it is a divisor for the distance resolution ``rho`` . The coarse accumulator distance resolution is ``rho`` and the accurate accumulator resolution is ``rho/srn`` . If both ``srn=0`` and ``stn=0`` , the classical Hough transform is used. Otherwise, both these parameters should be positive.
384 :param stn: For the multi-scale Hough transform, it is a divisor for the distance resolution ``theta``.
386 :param method: One of the following Hough transform variants:
388 * **CV_HOUGH_STANDARD** classical or standard Hough transform. Every line is represented by two floating-point numbers :math:`(\rho, \theta)` , where :math:`\rho` is a distance between (0,0) point and the line, and :math:`\theta` is the angle between x-axis and the normal to the line. Thus, the matrix must be (the created sequence will be) of ``CV_32FC2`` type
391 * **CV_HOUGH_PROBABILISTIC** probabilistic Hough transform (more efficient in case if the picture contains a few long linear segments). It returns line segments rather than the whole line. Each segment is represented by starting and ending points, and the matrix must be (the created sequence will be) of the ``CV_32SC4`` type.
393 * **CV_HOUGH_MULTI_SCALE** multi-scale variant of the classical Hough transform. The lines are encoded the same way as ``CV_HOUGH_STANDARD``.
396 :param param1: First method-dependent parameter:
398 * For the classical Hough transform, it is not used (0).
400 * For the probabilistic Hough transform, it is the minimum line length.
402 * For the multi-scale Hough transform, it is ``srn``.
404 :param param2: Second method-dependent parameter:
406 * For the classical Hough transform, it is not used (0).
408 * For the probabilistic Hough transform, it is the maximum gap between line segments lying on the same line to treat them as a single line segment (that is, to join them).
410 * For the multi-scale Hough transform, it is ``stn``.
412 The function implements the standard or standard multi-scale Hough transform algorithm for line detection. See http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm for a good explanation of Hough transform.
413 See also the example in :ocv:func:`HoughLinesP` description.
417 Finds line segments in a binary image using the probabilistic Hough transform.
419 .. ocv:function:: void HoughLinesP( InputArray image, OutputArray lines, double rho, double theta, int threshold, double minLineLength=0, double maxLineGap=0 )
421 .. ocv:pyfunction:: cv2.HoughLinesP(image, rho, theta, threshold[, lines[, minLineLength[, maxLineGap]]]) -> lines
423 :param image: 8-bit, single-channel binary source image. The image may be modified by the function.
425 :param lines: Output vector of lines. Each line is represented by a 4-element vector :math:`(x_1, y_1, x_2, y_2)` , where :math:`(x_1,y_1)` and :math:`(x_2, y_2)` are the ending points of each detected line segment.
427 :param rho: Distance resolution of the accumulator in pixels.
429 :param theta: Angle resolution of the accumulator in radians.
431 :param threshold: Accumulator threshold parameter. Only those lines are returned that get enough votes ( :math:`>\texttt{threshold}` ).
433 :param minLineLength: Minimum line length. Line segments shorter than that are rejected.
435 :param maxLineGap: Maximum allowed gap between points on the same line to link them.
437 The function implements the probabilistic Hough transform algorithm for line detection, described in
438 [Matas00]_. See the line detection example below: ::
440 /* This is a standalone program. Pass an image name as the first parameter
441 of the program. Switch between standard and probabilistic Hough transform
442 by changing "#if 1" to "#if 0" and back */
449 int main(int argc, char** argv)
451 Mat src, dst, color_dst;
452 if( argc != 2 || !(src=imread(argv[1], 0)).data)
455 Canny( src, dst, 50, 200, 3 );
456 cvtColor( dst, color_dst, CV_GRAY2BGR );
460 HoughLines( dst, lines, 1, CV_PI/180, 100 );
462 for( size_t i = 0; i < lines.size(); i++ )
464 float rho = lines[i][0];
465 float theta = lines[i][1];
466 double a = cos(theta), b = sin(theta);
467 double x0 = a*rho, y0 = b*rho;
468 Point pt1(cvRound(x0 + 1000*(-b)),
469 cvRound(y0 + 1000*(a)));
470 Point pt2(cvRound(x0 - 1000*(-b)),
471 cvRound(y0 - 1000*(a)));
472 line( color_dst, pt1, pt2, Scalar(0,0,255), 3, 8 );
476 HoughLinesP( dst, lines, 1, CV_PI/180, 80, 30, 10 );
477 for( size_t i = 0; i < lines.size(); i++ )
479 line( color_dst, Point(lines[i][0], lines[i][1]),
480 Point(lines[i][2], lines[i][3]), Scalar(0,0,255), 3, 8 );
483 namedWindow( "Source", 1 );
484 imshow( "Source", src );
486 namedWindow( "Detected Lines", 1 );
487 imshow( "Detected Lines", color_dst );
493 This is a sample picture the function parameters have been tuned for:
495 .. image:: pics/building.jpg
497 And this is the output of the above program in case of the probabilistic Hough transform:
499 .. image:: pics/houghp.png
505 Calculates a feature map for corner detection.
507 .. ocv:function:: void preCornerDetect( InputArray src, OutputArray dst, int ksize, int borderType=BORDER_DEFAULT )
509 .. ocv:pyfunction:: cv2.preCornerDetect(src, ksize[, dst[, borderType]]) -> dst
511 .. ocv:cfunction:: void cvPreCornerDetect( const CvArr* image, CvArr* corners, int aperture_size=3 )
513 .. ocv:pyoldfunction:: cv.PreCornerDetect(image, corners, apertureSize=3)-> None
515 :param src: Source single-channel 8-bit of floating-point image.
517 :param dst: Output image that has the type ``CV_32F`` and the same size as ``src`` .
519 :param ksize: Aperture size of the :ocv:func:`Sobel` .
521 :param borderType: Pixel extrapolation method. See :ocv:func:`borderInterpolate` .
523 The function calculates the complex spatial derivative-based function of the source image
527 \texttt{dst} = (D_x \texttt{src} )^2 \cdot D_{yy} \texttt{src} + (D_y \texttt{src} )^2 \cdot D_{xx} \texttt{src} - 2 D_x \texttt{src} \cdot D_y \texttt{src} \cdot D_{xy} \texttt{src}
530 :math:`D_x`,:math:`D_y` are the first image derivatives,
531 :math:`D_{xx}`,:math:`D_{yy}` are the second image derivatives, and
532 :math:`D_{xy}` is the mixed derivative.
534 The corners can be found as local maximums of the functions, as shown below: ::
536 Mat corners, dilated_corners;
537 preCornerDetect(image, corners, 3);
538 // dilation with 3x3 rectangular structuring element
539 dilate(corners, dilated_corners, Mat(), 1);
540 Mat corner_mask = corners == dilated_corners;
542 .. [Canny86] J. Canny. *A Computational Approach to Edge Detection*, IEEE Trans. on Pattern Analysis and Machine Intelligence, 8(6), pp. 679-698 (1986).
544 .. [Matas00] Matas, J. and Galambos, C. and Kittler, J.V., *Robust Detection of Lines Using the Progressive Probabilistic Hough Transform*. CVIU 78 1, pp 119-137 (2000)
546 .. [Shi94] J. Shi and C. Tomasi. *Good Features to Track*. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 593-600, June 1994.
548 .. [Yuen90] Yuen, H. K. and Princen, J. and Illingworth, J. and Kittler, J., *Comparative study of Hough transform methods for circle finding*. Image Vision Comput. 8 1, pp 71–77 (1990)