detectionzerofeature-detectioncorner-detection

The Harris & Stephens corner detection algorithm: determinant always 0 (zero)


As part of my Bachelor-Thesis, I'm trying to implement a corner detector with the Harris and Stephens algorithm: A combined Corner and Edge Detector

I do calculate:

  1. The x- and y- deviations with sobel Filters (3x3)
  2. Calculate the system Matrix M

    M = [A C; C B]

    which means, if I got all right:

    1. A = Response of sobel_x squared: Ix * Ix (at certain pixel)
    2. B = Response of sobel_y squared: Iy * Iy (at certain pixel)
    3. C = Response of sobel_x multiplied by response of sobel_y: Ix * Iy (at certain pixel)
  3. now I do calculate trace(M) and what I'm especially more concerned: determinant(M)

In there paper they suggest the following approximation for the determinant, as it avoids expensive calculation of the eigenvalues:

det(M) = A * B - C^2

This must always terminates in Zero!

The expression det(M) = A * B - C^2 can be rewritten as: (using the knowledge of point 2)

det(M) = A * B - C * C

det(M) = Ix*Ix * Iy*Iy - Ix*Iy * Ix*Iy

det(M) = Ix*Ix * Iy*Iy - Ix*Ix * Iy*Iy

det(M) = 0

So why should I even bother calculating the determinant? As far as I see, it is sufficent to calculate the trace! (Or did I make somewhere a major mistake?)


Solution

  • Before you calculate the R, apply Gaussian kernel on Ix2, Iy2, Ixy.