Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/331.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 OpenCV:从图像坐标中提取特征/描述符_Python_Opencv - Fatal编程技术网

Python 2.7 OpenCV:从图像坐标中提取特征/描述符

Python 2.7 OpenCV:从图像坐标中提取特征/描述符,python,opencv,Python,Opencv,我使用Python中的OpenCV从图像中提取了几个感兴趣的点(x、y坐标)(即阈值、轮廓查找、矩)。现在,我想用参考模式匹配这些点,以排除falsy检测到的点。我的方法是将图像点的特征/描述符与参考模式的特征/描述符进行匹配,但我不知道如何从图像点提取特征/描述符 如何使用Python中的OpenCV从给定坐标提取特征/描述符?也许您应该使用 导入cv2 surf=cv2.surf()应与其他描述符一起使用 customKeyPoints=[cv2.KeyPoint(), cv2.KeyPoi

我使用Python中的OpenCV从图像中提取了几个感兴趣的点(x、y坐标)(即阈值、轮廓查找、矩)。现在,我想用参考模式匹配这些点,以排除falsy检测到的点。我的方法是将图像点的特征/描述符与参考模式的特征/描述符进行匹配,但我不知道如何从图像点提取特征/描述符

如何使用Python中的OpenCV从给定坐标提取特征/描述符?

也许您应该使用

导入cv2
surf=cv2.surf()应与其他描述符一起使用
customKeyPoints=[cv2.KeyPoint(),
cv2.KeyPoint(),…]
冲浪计算(img,自定义关键点)
#应该返回指定点的描述符

对不起我的英语

import cv2
surf = cv2.SURF() #Should works with another descriptors
customKeyPoints = [cv2.KeyPoint(<your coords, size, angle, etc>), 
                   cv2.KeyPoint(<your coords, size, angle, etc>), ...]
surf.compute(img, customKeyPoints)
#Should return you descriptors from specified points