Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What the Hessian minimum threshold means on the SurfFeatureDetector function?

I'm working on a OpenCV project using surf to detect feature from images. The detector is initialized in this way

int minHessian = 100;

SurfFeatureDetector detector( minHessian );

Can someone explain me the meaning of the hessian threshold (in a mathematics and practice way)?

like image 520
Fabrizio Duroni Avatar asked Sep 11 '13 14:09

Fabrizio Duroni


2 Answers

This is explained in the SURF paper, which you should really read before using it. The SURF algorithm really contains two parts: interest point detection, and a descriptor. The Hessian corner detector is used for interest point detection in this case. The threshold determines how large the output from the Hessian filter must be in order for a point to be used as an interest point. A larger value will result in fewer, but (theoretically) more salient interest points, whereas a smaller value will result in more numerous but less salient points.

like image 113
devrobf Avatar answered Sep 24 '22 00:09

devrobf


Mathematically, the Hessian matrix describes the second derivatives of a function, which stand for curvatures. Imagine you have a 3-D surface f(x,y), how could you find your local extrema? Just find your zero point in first derivative. To justify whether that point is the local max or min, we need know its first two largest abs(second derivatives in the space). If the product of them is negative, that point cannot be local extreme. If the product is positive, that point would be local extreme, moreover, the larger the product is, the sharper the local extreme.

Let's come back to the Hessian matrix, which stands for second derivatives. The most important things for Hessian are its eigenvalues. The eigenvalues describe largest second derivative in the 3-D space (not limit to x and y direction). As mentioned before, their product is useful. The tricky here is that the product of eigenvalues is the determinant of Hessian. minHessian here could be consider as that determinant, which is how "sharp" the extrema you need. If one point's Det(Hessian) is larger than that value, it could be the interest point.

Instead of using LoG and Hessian like SIFT, SURF using Det(Hessian) to selecting both scale and interest points. In that way, SURF could "Speed Up".

However, there are more details about that Determinant, including Haar wavelet filter, weights on different direction.... If you are interests in those details, please refer to the SURF paper.

like image 20
Donny Avatar answered Sep 24 '22 00:09

Donny