Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Didn't go through the entire code, but you have to work on subimages with the Harris detector. That means that Ixx(x,y), Ixy(x,y) and Iyy(x,y) are the neighborhoods of pixel(x,y), not the entire image.

The structure tensor needs to be computed locally, not on the entire image.

So the algorithm becomes:

  1. Get the GX and GY gradients
  2. Using a sliding window, for each point(x,y):
    • Compute the sum(G'X²), sum(G'Y²), sum(G'X*G'Y); where G' is a subimage of G around the current point.
    • Construct M, a 2x2 matrix.
    • Compute det(M) and tr(M); then eventually lambda1 and lambda2
    • Compute R. This will be the probability of having a corner in the current point.

Didn't go through the entire code, but you have to work on subimages with the Harris detector. That means that Ixx(x,y), Ixy(x,y) and Iyy(x,y) are the neighborhoods of pixel(x,y), not the entire image.image. (This window has size of blockSize in the OpenCV implementation)

The structure tensor needs to be computed locally, not on the entire image.

So the algorithm becomes:

  1. Get the GX and GY gradients
  2. Using a sliding window, for each point(x,y):
    • Compute the sum(G'X²), sum(G'Y²), sum(G'X*G'Y); where G' is a subimage of G around the current point.
    • Construct M, a 2x2 matrix.
    • Compute det(M) and tr(M); then eventually lambda1 and lambda2
    • Compute R. This will be the probability of having a corner in the current point.