Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes there is the norm-function: http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=cv2.norm#norm.

Example-usage:

Point2f a(10,10);
Point2f b(100,100);
double res = cv::norm(cv::Mat(a),cv::Mat(b));

Yes there is the norm-function: http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=cv2.norm#norm.

Example-usage:

Point2f a(10,10);
Point2f b(100,100);
double res = cv::norm(cv::Mat(a),cv::Mat(b));

EDIT: to avoid the creation of Mat-headers:

double res = cv::norm(a-b);