Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Calc eucliadian distance between two single point ?

I have

Point2f a(10,10);
Point2f b(100,100);

I would like to calc the distance (Euclidean) between these two points. Instead to write the manual function:

float euclideanDist(Point& p, Point& q) {
    Point diff = p - q;
    return cv::sqrt(diff.x*diff.x + diff.y*diff.y);
}

Is there any OpenCV function?

Calc eucliadian distance between two single point ?

I have

Point2f a(10,10);
Point2f b(100,100);

I would like to calc the distance (Euclidean) between these two points. Instead to write the manual function:

float euclideanDist(Point& p, Point& q) {
    Point diff = p - q;
    return cv::sqrt(diff.x*diff.x + diff.y*diff.y);
}

Is there any OpenCV function?function? (That's pretty similary to what does descriptormatcher.match() with L2_NORM)

Calc eucliadian distance between two single point ?

I have

Point2f a(10,10);
Point2f b(100,100);

I would like to calc the distance (Euclidean) between these two points. Instead to write the manual function:

float euclideanDist(Point& p, Point& q) {
    Point diff = p - q;
    return cv::sqrt(diff.x*diff.x + diff.y*diff.y);
}

Is there any OpenCV function? (That's pretty similary to what does descriptormatcher.match() with L2_NORM)

Calc eucliadian distance between two single point ?

I have

Point2f a(10,10);
Point2f b(100,100);

I would like to calc the distance (Euclidean) between these two points. Instead to write the manual function:

float euclideanDist(Point& p, Point& q) {
    Point diff = p - q;
    return cv::sqrt(diff.x*diff.x + diff.y*diff.y);
}

Is there any OpenCV function? (That's pretty similary to what does descriptormatcher.match() with L2_NORM)