# How to choose a suitable threshold value for shi-tomasi corner detection algorithm?

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 ?

• 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. – nbro Jun 9 '20 at 14:55 • 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 . – Hissaan Ali Jun 9 '20 at 15:34 • I am suggesting you use MathJax to format the mathematical symbols. For example, use$\lambda_1\$ rather than λ1 . – nbro Jun 9 '20 at 16:16
• Thanks for pointing it out, i'll make the changes – Hissaan Ali Jun 9 '20 at 17:09

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