sift

Python+OpenCV 3 - cant use SIFT

梦想与她 提交于 2019-12-03 07:16:14
I compiled OpenCV 3 & opencv_contrib from latest source code. Installed it into site-packages folder for Python 2.7. I can follow all of the tutorials at http://docs.opencv.org/trunk/doc/py_tutorials/py_feature2d/py_matcher/py_matcher.html except the ones involving SIFT. Here is the error I get: Traceback (most recent call last): File "C:\Projects\icu\ex01.py", line 9, in <module> sift = cv2.SIFT() AttributeError: 'module' object has no attribute 'SIFT' Please help. I searched & searched & searched and cant find anything related to Opencv3. Oh, and I used Visual Studio 2013 to build it. as of

Recognizing an image from a list with OpenCV SIFT using the FLANN matching

99封情书 提交于 2019-12-03 06:23:23
问题 The point of the application is to recognize an image from an already set list of images. The list of images have had their SIFT descriptors extracted and saved in files. Nothing interesting here: std::vector<cv::KeyPoint> detectedKeypoints; cv::Mat objectDescriptors; // Extract data cv::SIFT sift; sift.detect(image, detectedKeypoints); sift.compute(image, detectedKeypoints, objectDescriptors); // Save the file cv::FileStorage fs(file, cv::FileStorage::WRITE); fs << "descriptors" <<

Searching an Image Database Using SIFT

痴心易碎 提交于 2019-12-03 04:35:28
问题 Several questions have been asked about the SIFT algorithm, but they all seem focussed on a simple comparison between two images. Instead of determining how similar two images are, would it be practical to use SIFT to find the closest matching image out of a collection of thousands of images? In other words, is SIFT scalable? For example, would it be practical to use SIFT to generate keypoints for a batch of images, store the keypoints in a database, and then find the ones that have the

How to train and predict using bag of words?

白昼怎懂夜的黑 提交于 2019-12-03 03:54:47
问题 I have a folder of images of a car from every angle. I want to use the bag of words approach to train the system in recognizing the car. Once the training is done, I want that if an image of that car is given it should be able to recognize it. I have been trying to learn the BOW function in opencv in order to make this work and have come at a level where I do not know what to do now and some guidance would be appreciated. Here is my code that I used to make the bag of words: Ptr

Python+OpenCV 3 - cant use SIFT

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I compiled OpenCV 3 & opencv_contrib from latest source code. Installed it into site-packages folder for Python 2.7. I can follow all of the tutorials at http://docs.opencv.org/trunk/doc/py_tutorials/py_feature2d/py_matcher/py_matcher.html except the ones involving SIFT. Here is the error I get: Traceback (most recent call last): File "C:\Projects\icu\ex01.py", line 9, in <module> sift = cv2.SIFT() AttributeError: 'module' object has no attribute 'SIFT' Please help. I searched & searched & searched and cant find anything related to Opencv3.

how to use SIFT in opencv

无人久伴 提交于 2019-12-03 02:50:35
I am learning C++ and OpenCV these days. Given an image, I want to extract its SIFT features. From http://docs.opencv.org/modules/nonfree/doc/feature_detection.html , we can know that OpenCV 2.4.8 has the SIFT module. See here: But I do not know how to use it. Currently, to use SIFT, I need to first call the class SIFT to get a SIFT instance. Then, I need to use SIFT::operator()() to do SIFT. But what is OutputArray , InputArray , KeyPoint ? Could anyone give a demo to show how to use SIFT class to do SIFT? Liam McInroy See the example from Sift implementation with OpenCV 2.2 #include <opencv2

number of keypoints by SIFT openCV?

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using the following code to extract and draw the SIFT keypoints in an image. But in my code, i haven't specified that how many keypoints i want to extract? so, it completely depends upon the image how many keypoints it have. What i want: I want to specify that i need maximum 20 keypoints in an image. If 20 keypoints are not present then no need to proceed further or if keypoints are more than 20 then just consider the most important 20 keypoints. My current code: //To store the keypoints that will be extracted by SIFT vector<KeyPoint>

OpenCV SIFT descriptor keypoint radius

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was digging into OpenCV's implementation of SIFT descriptor extraction . I came upon some puzzling code to get the radius of the interest point neighborhood. Below is the annotated code, with variable names changed to be more descriptive: // keep octave below 256 (255 is 1111 1111) int octave = kpt.octave & 255; // if octave is >= 128, ...???? octave = octave = 0 ? 1.0f/(1 I understand that this has something to do with converting to the scale from which the interest point was taken (I have read Lowe's paper), but I can't connect the dots

SURF and SIFT algorithms doesn&#039;t work in OpenCV 3.0 Java

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using OpenCV 3.0 (the latest version) in Java, but when I use SURF algorithm or SIFT algorithm it doesn't work and throws Exception which says: OpenCV Error: Bad argument (Specified feature detector type is not supported.) in cv::javaFeatureDetector::create I have googled, but the answers which was given to this kind of questions did not solve my problem. If anyone knows about this problem please let me know. Thanks in advance! Update: The code below in third line throws exception. Mat img_object = Imgcodecs.imread("data/img_object.jpg"

python opencv SIFT doesn&#039;t work for 8 bit images (JPEG)

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I used SIFT for all my other 24 bit JPEG images without any problems, however, the 8 bit one always give me this following error. image is empty or has incorrect depth (!=CV_8U) in function cv::SIFT::operator () Does anyone know how to deal with it? Here is my code: import cv2 import numpy as np import os import glob import scipy.cluster os.chdir('\mydirectory') images = [] for infile in glob.glob('./*.jpg'): pic = cv2.imread(infile,0) images.append(pic) my_set = images descriptors = np.array([]) feaL=np.array([]) for pic in my_set: kp, des