Find corner points in image
C = corner(I)
C = corner(I,method)
C = corner(I,N)
C = corner(I,method,N)
C = corner(___,Name,Value,...)
A grayscale or binary image.
The algorithm used to detect corners. Supported methods are:
The maximum number of corners the corner function can return.
Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
A vector, V, of filter coefficients for the separable smoothing filter. The outer product, V*V', gives the full filter kernel. The length of the vector must be odd and at least 3.
Default: fspecial('gaussian',[5 1],1.5)
A scalar value, Q, where 0 < Q < 1, specifying the minimum accepted quality of corners. When candidate corners have corner metric values less than Q * max(corner metric), the toolbox rejects them. Use larger values of Q to remove erroneous corners.
A scalar value, K, where 0 < K < 0.25, specifying the sensitivity factor used in the Harris detection algorithm. The smaller the value of K, the more likely the algorithm is to detect sharp corners. Use this parameter with the 'Harris' method only.
An M-by-2 matrix containing the X and Y coordinates of the corner points detected in I.
Find and plot corner points in a checkerboard image.
I = checkerboard(50,2,2); C = corner(I); imshow(I); hold on plot(C(:,1), C(:,2), 'r*');
The corner and cornermetric functions both detect corners in images. For most applications, use the streamlined corner function to find corners in one step. If you want greater control over corner selection, use the cornermetric function to compute a corner metric matrix and then write your own algorithm to find peak values.
The corner function performs nonmaxima suppression on candidate corners, and corners are at least two pixels apart.