小编R.j*_*deh的帖子

函数cv2.detectAndCompute和cv2.compute上的opencv 3 python特征检测错误

我使用opencv 3.0.0和python 2.7.5_x32

这是我的代码(ORB_feature_detection):

import numpy as np
import cv2
from matplotlib import pyplot as plt

img1 = cv2.imread('C:\\Python27\\madar1.jpg',0)          # queryImage
img2 = cv2.imread('C:\\Python27\\madar2.jpg',0) # trainImage

# Initiate SIFT detector
orb = cv2.ORB_create()

# line 12
# find the keypoints and descriptors with SIFT
kp1, des1 = orb.detectAndCompute(img1,None)
kp2, des2 = orb.detectAndCompute(img2,None)

# create BFMatcher object

bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True)

# Match descriptors.
matches = bf.match(des1,des2)

# Sort them in the order of their distance.
matches = sorted(matches, key = …
Run Code Online (Sandbox Code Playgroud)

python opencv

7
推荐指数
1
解决办法
5346
查看次数

标签 统计

opencv ×1

python ×1