[英]Python 2.7 OpenCV: Extracting features/descriptors from image coordinates
我使用Python中的OpenCV從我的圖像中提取了幾個感興趣的點(x,y坐標)(即閾值,輪廓尋找,力矩)。 現在,我想將這些點與參考圖案進行匹配,以排除虛假的檢測點。 我的方法是將圖像點的特征/描述符與參考圖案的特征/描述符進行匹配,但是我不知道如何從圖像點提取特征/描述符。
如何在Python中使用OpenCV從給定坐標中提取特征/描述符?
也許您應該使用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
PS對不起,我的英語
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.