简体   繁体   English

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

[英]Python 2.7 OpenCV: Extracting features/descriptors from image coordinates

I extracted several points (x,y-coordinates) of interest from my image using OpenCV in Python (ie Thresholding, contourfinding, moments). 我使用Python中的OpenCV从我的图像中提取了几个感兴趣的点(x,y坐标)(即阈值,轮廓寻找,力矩)。 Now, I want to match those points with a reference pattern to exclude falsy detected points. 现在,我想将这些点与参考图案进行匹配,以排除虚假的检测点。 My approach is to match the features/descriptors from the image points with the features/descriptors of the reference pattern, but I don't know how to extract features/descriptors from the image points. 我的方法是将图像点的特征/描述符与参考图案的特征/描述符进行匹配,但是我不知道如何从图像点提取特征/描述符。

How do I extract features/descriptors from the given coordinates using OpenCV in Python? 如何在Python中使用OpenCV从给定坐标中提取特征/描述符?

Maybe you should use KeyPoint 也许您应该使用KeyPoint

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

Similiar question with answer 有问题的类似问题

PS Sorry for my English PS对不起,我的英语

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM