Detecting corners of image using Non-Maximum Suppression

Non-maximum supression is often used along with edge detection algorithms. The image is scanned along the image gradient direction, and if pixels are not part of the local maxima they are set to zero. This has the effect of supressing all image information that is not part of local maxima.

Syntax

C = corner(I)
C = corner(I,method)
C = corner(I,N)
C = corner(I,method,N)
C = corner(___,Name,Value,…)

Description

C = corner(I) detects corners in image I and returns them in matrix C.
C = corner(I,method) detects corners in image I using the specified method.
C = corner(I,N) detects corners in image I and returns a maximum of N corners.
C = corner(I,method,N) detects corners using the specified method and maximum number of corners.
C = corner(___,Name,Value,…) specifies parameters and corresponding values that control various aspects of the corner detection algorithm.

Input Arguments

I A grayscale or binary image.
method The algorithm used to detect corners. Supported methods are:

  • 'Harris': The Harris corner detector.
  • 'MinimumEigenvalue': Shi &
    Tomasi’s minimum eigenvalue method.

Default: 'Harris'

N The maximum number of corners the corner function
can return.

Default: 200

Example

clear all

a = imread('untitled.jpg'); % reading images
I = rgb2gray(a);            % converting image to grayscale
C = corner(I);              % detecting corners
imshow(I);                  
hold on
plot(C(:,1), C(:,2), 'r*'); % plotting edges

Output

corners

Share

You may also like...