【发布时间】:2020-12-16 01:21:46
【问题描述】:
我有两个 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 的距离应该比那个小。
【问题讨论】:
标签: python image-processing image-preprocessing histogram-of-oriented-gradients