flannbasedmatcher

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

蹲街弑〆低调 提交于 2019-12-17 20:39:05
问题 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

Issue converting KeyPoints to and from JSON and then using FlannBasedMatcher

旧街凉风 提交于 2019-12-11 19:11:38
问题 I'm saving my KeyPoints and Descriptors in a JSON file. Later when I retrieve them, I am trying to use them in a FlannBasedMatcher . However, I think something is going wrong in the conversion because I am getting the following error. cv2.error: OpenCV(4.1.0) /io/opencv/modules/flann/src/miniflann.cpp:315: error: (-210:Unsupported format or combination of formats) in function 'buildIndex_' > type=4 > Creating the keypoints and descriptors brisk = cv2.BRISK_create() kp1, des1 = brisk

FlannBasedMatcher returning different results

大城市里の小女人 提交于 2019-12-01 09:42:11
Using the FlannBasedMatcher in OpenCV, I am getting different results calling the matcher with the same parameters. Can anyone suggest what I am doing wrong please? The code below shows a minimal example of the problem I am having - it is simplified representative of how I use the FlannBasedMatcher - this isn't real code :) Results output each time around the loop should be identical, but they are not. int const k = std::min(query_descriptors.rows, std::min(train_descriptors.rows, 2)); cv::Mat query_descriptors_original = query_descriptors.clone(); cv::Mat train_descriptors_original = train

FlannBasedMatcher returning different results

北战南征 提交于 2019-12-01 04:36:28
问题 Using the FlannBasedMatcher in OpenCV, I am getting different results calling the matcher with the same parameters. Can anyone suggest what I am doing wrong please? The code below shows a minimal example of the problem I am having - it is simplified representative of how I use the FlannBasedMatcher - this isn't real code :) Results output each time around the loop should be identical, but they are not. int const k = std::min(query_descriptors.rows, std::min(train_descriptors.rows, 2)); cv:

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