OpenCV distance euclidienne entre deux vecteurs
2 réponses
Source: OpenCV, C++: Distance entre deux points
Mat pts1(nPts, 1, CV_8UC2), pts2(nPts, 1, CV_8UC2);
// populate them
Mat diffPts = pts1-pts2;
Mat ptsx, ptsy;
// split your points in x and y vectors. maybe separate them from start
Mat dist;
magnitude(ptsx, ptsy, dist); // voila!
2
répondu
rafaoc
2017-05-23 10:31:15