我有两个4000维的HOG特征,由cv2.HOGDescriptor
创建。我需要找到这两个向量之间的距离
def getDistances(firstFace,secondFace):
EuclideanDistance = distance.euclidean(firstFace,secondFace)
print("Euclidean distance from x to y: ", EuclideanDistance)
我试过这样的方法,但结果似乎不对。如果我需要解释,我有3张图片。A和B几乎相同。C完全不同
Euclidean distance from x to y: 232.5758819580078 # A and C
Euclidean distance from x to y: 238.22845458984375 # B and C
Euclidean distance from x to y: 249.4779052734375 # A and B
A和B的距离应小于该距离
试试这个
相关问题 更多 >
编程相关推荐