I have to check several distances between points against a distance threshold. What I can do is taking the square of my threshold and compare it with the squared norm of
It seems there's nothings specific to address this problem.
I thought that one solution could be using the ddot
method (dot product), and compute something like
cv::Point distVec = a-b;
double squaredNorm = distVec.ddot(distVec);
If one is willing to take the risk, there's cv::normL2Sqr
which requires the input to be in array format: cv::Point
might be directly convertible to int[]
.
I will personally move on by writing my own squared norm.