Interest point detection : Theory and Implementation


The procedure for finding the Harris corners is as follows:

  1. Create Gaussian derivative masks sx,sy by convolving a 5x5 Gaussian mask with [-1 0 1] and its transpose.
  2. Convolve the input image with sx,sy to form Dx and Dy, the vertical and horizontal edge gradients in the image.
  3. Form the products Dxx,Dxy,Dyy ( .* indicates pixel-wise multiplication )
    • Dxx = Dx .* Dx
    • Dxy = Dx .* Dy
    • Dyy = Dy .* Dy
  4. Smooth the obtained products by convolving them with a Gaussian smoothing filter.
  5. Compute the corner strength image (refer to Figure where the "hottest" edges are shown in red)



  6. In the corner strength image, select values which are above a fixed threshold and are local maxima in a 7 x 7 neighborhood.
  7. The pixel locations corresponding to the selected values define the Harris corners in the image.


Apart from the image itself, the parameters used by the Harris corner detector are:

  1. Corner strength threshold : Fixed threshold used on corner strength image
  2. Integration scale : Standard deviation of the Gaussian smoothing filter
  3. Derivative scale : Standard deviation of the Gaussian derivative filter
  4. Maximal suppression window length : Length of the window in which a candidate corner is tested for being a local maxima.
  5. Gaussian window side : Length of a side of the Gaussian filter
Some additional implementation issues:



As a preliminary test, I ran the corner detector on a chessboard.



The detected corners are marked in red. The detector finds all the corners on the chessboard. The corners at the edge of the image are detected too although they are not marked in the image.



Adaptive Non-maximal suppression (ANMS)

For applications such as stitching, it is very important to have interest points to be spatially well distributed across the image. This is done using the adaptive non-maximal suppression strategy described in Matthew Brown's CVPR-2005 paper. The image below shows the interest points using highest-corner-strength method.

Using ANMS provides a much more uniform distribution of interest points.

Click HERE to go back to main page.