flann

How do I use the relationships between Flann matches to determine a sensible homography?

我只是一个虾纸丫 提交于 2019-11-28 12:42:53
I have a panorama image, and a smaller image of buildings seen within that panorama image. What I want to do is recognise if the buildings in that smaller image are in that panorama image, and how the 2 images line up. For this first example, I'm using a cropped version of my panorama image, so the pixels are identical. import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import math # Load images cwImage = cv2.imread('cw1.jpg',0) panImage = cv2.imread('pan1.jpg',0) # Prepare for SURF image analysis surf = cv2.xfeatures2d.SURF_create(4000) # Find

cv2 3.0.0 cv2.FlannBasedMatcher: flann.knnMatch is throwing cv2 error

给你一囗甜甜゛ 提交于 2019-11-28 08:57:15
问题 I want to use a flann-based matcher in Python as described in http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_feature2d/py_matcher/py_matcher.html Since I am using OpenCV 3.0.0, I had to adjust the code regarding the initialization of the SIFT detector. The rest is taken without changes def calculateMatch(self): # Initiate SIFT detector sift = cv2.xfeatures2d.SIFT_create() # find the keypoints and descriptors with SIFT (kp1, desc1) = sift.detectAndCompute(self.image1