far*_*ahm 9 opencv vector matrix euclidean-distance
我想计算两个向量之间的欧氏距离(或两个Matrx行,无关紧要).在OpenCV中是否有一个很好的功能?
ber*_*rak 23
Mat a,b; // num of rows/cols/channels does not matter, they just have to be equal for both
double dist = norm(a,b,NORM_L2);
Run Code Online (Sandbox Code Playgroud)