0
$\begingroup$

While implementing shi-tomasi corner detection algorithm i got stuck at deciding a suitable threshold for corner detection.

In shi-tomasi algorithm all those points that qualify min(λ1 , λ2) > threshold are considered as corner points. (where λ1, λ2 are eigenvalues )

My question is what is a suitable criteria to decide that threshold ?

$\endgroup$
  • 1
    $\begingroup$ You can use MathJax/Latex on this site. Please, edit your post to use MathJax. To do that, you need to wrap the symbols with $ on each site. $\endgroup$ – nbro Jun 9 at 14:55
  • $\begingroup$ Can you elaborate which point in not clear ? I believe the term threshold for shi-tomasi is self explanatory for people who are familiar with this topic . $\endgroup$ – Syed Hissaan Jun 9 at 15:34
  • 1
    $\begingroup$ I am suggesting you use MathJax to format the mathematical symbols. For example, use $\lambda_1$ rather than λ1 . $\endgroup$ – nbro Jun 9 at 16:16
  • $\begingroup$ Thanks for pointing it out, i'll make the changes $\endgroup$ – Syed Hissaan Jun 9 at 17:09
0
$\begingroup$

The threshold is typically chosen empirically, so there is no exact answer.

It's dependent on how many corners you wish to select, and how strict you want the detection, which could depend on the use case, the dataset, and the block size of the algorithm. If you’re not sure what to choose for the threshold, I would suggest using a scheme relative to your images to deduce the best threshold, based on what performs best for your use case.

For example, let the criteria for selection, or scoring function, be $R$, which in the Shi-Tomasi case is $R = min(\lambda_1, \lambda_2)$. We could choose some value $q \in (0,1)$, so that the threshold becomes

$t = q\max_p{R}$,

where the max $R$ is calculated over all points $p$, an approach similar to OpenCV Good Features to Track.

You could examine the corners detected and adjust $q$ based on how stringently you wanted to select corners. If you don't want to waste the time manually fine-tuning the threshold, you could check out some automated approaches in the literature, such as Automated thresholding for low-complexity corner detection

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.