Harris Corner Detector

Code Snippets

The Harris corner detector is invariant to rotation, illumination variation and image noise. It operates on a grayscale BW8 image and delivers a vector of points of interest.

Harris corner detector example

The EasyImage Harris corner detector requires three parameters:

  • The integration scale σi: the standard deviation of the Gaussian Filter used for scale analysis.
    σd = 0,7 x σi, where σd is the differentiation scale: the standard deviation of the Gaussian Filter used for noise reduction during computation of the gradient.
  • A corner threshold: a fraction ranging from 0 to 1 of the maximum value of the cornerness of the source image.
  • A Boolean that toggles sub-pixel detection.

Basic usage of Harris Corner Detector

An object of the EHarrisCornerDetector class can be reused across Harris detector applications, in order to reduce the setup time.

  1. Create an instance of the detector and set the appropriate method, for instance, the integration scale, SetScale, with the structures of interest that could have a spatial extent of 2 pixels.
  2. Apply the detector with two arguments to the new image : the input image and the interest points in the input image EHarrisInterestPoints.
  3. Access the individual elements of the output vector.