sift

Searching an Image Database Using SIFT

末鹿安然 提交于 2019-12-02 17:46:18
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 shortest Euclidean distance to the keypoints generated for a "query" image? When calculating the Euclidean

How to train and predict using bag of words?

依然范特西╮ 提交于 2019-12-02 17:17:48
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<FeatureDetector> features = FeatureDetector::create("SIFT"); Ptr<DescriptorExtractor> descriptors =

图像配准SIFT

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 15:52:22
(一)图像特征匹配--SIFT 1.1 SIFT背景简介 SIFT算法是David Lowe在1999年提出的局部特征描述子,并在2004年深入发展和完善。 SIFT算法是在尺度空间进行特征检测并确定关键点的位置和关键点所在的尺度。 该关键点方向特征选取该点邻域梯度的主方向,以便实现算子对尺度和方向的无关性。 1.2 SIFT特征向量生成步骤 一幅图像SIFT特征向量的生成步骤主要有如下四步: (1)检测尺度空间极值点,初步确定关键点的位置和所在尺度; [初步找出关键点群] (2)精确确定关键点位置和尺度,同时去除低对比度的关键点和不确定的边缘响应点,以便增强匹配稳定性、提高抗噪声能力;[精确确定关键点群并择优筛选] (3)指定每个关键点的方向参数,以便算子具有旋转不变性; (4)生成关键点描述子,即生成SIFT特征向量; 1.2.1尺度空间 概念解释:尺度空间:尺度空间是利用高斯核对原始图像进行尺度变换,获得图像多尺度下的尺度空间表示序列,对这些序列进行尺度空间特征提取 其中,二维高斯核定义为: 其中σ被称为尺度坐标, 是高斯正态分布的方差。 注:除高斯核外,尺度函数有很多,但并不是所有的尺度函数都可以构建尺度空间。Koenderink和Lindeberg已经证明,在一些合理的约束下,高斯核是唯一可以产生尺度空间的核,而且是唯一的线性核。 二维图像 在不同的尺度空间 可以通过图像

Comparing SIFT features stored in a mysql database

∥☆過路亽.° 提交于 2019-12-02 14:19:25
I'm currently extending an image library used to categorize images and i want to find duplicate images, transformed images, and images that contain or are contained in other images. I have tested the SIFT implementation from OpenCV and it works very well but would be rather slow for multiple images. Too speed it up I thought I could extract the features and save them in a database as a lot of other image related meta data is already being held there. What would be the fastest way to compare the features of a new images to the features in the database? Usually comparison is done calculating the

xfeatures2d not found in OpenCV on Ubuntu

风流意气都作罢 提交于 2019-12-02 00:57:15
I am using OpenCV version 3.2.0 and xfeatures2d is not found on this. Is there any way I can install this to the same version of OpenCV? >>> import cv2 >>> help(cv2.xfeatures2d) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'xfeatures2d' user2497484 I encountered the same problem. SURF and SIFT are not a part of the main repo module of OpenCV. Instead, they are available in opencv_contrib folder. The README file of opencv_contrib gives clear instructions on how to install the modules in opencv_contrib. cd <opencv_build

Is LSH about transforming vectors to binary vectors for hamming distance?

拈花ヽ惹草 提交于 2019-12-02 00:50:48
I read some paper about LSH and I know that is used for solving the approximated k-NN problem. We can divide the algorithm in two parts: Given a vector in D dimensions (where D is big) of any value, translate it with a set of N (where N<<D ) hash functions to a binary vector in N dimensions. Using hamming distance, apply some search technique on the set of given binary codes obtained from phase 1 to find the k-NN. The keypoint is that computing the hamming distance for vectors in N dimensions is fast using XOR. Anyway, I have two questions: Point 1. is still necessary if we use a binary

SIFT特征点检测实现

前提是你 提交于 2019-12-01 15:13:55
检测代码: 1 #include <opencv2/opencv.hpp> 2 #include <opencv2/xfeatures2d.hpp> 3 #include <iostream> 4 5 using namespace cv; 6 using namespace std; 7 using namespace cv::xfeatures2d; 8 9 int main(int argc, char** argv) { 10 Mat src = imread("L:/4.jpg"); 11 if (src.empty()) { 12 printf("could not load image...\n"); 13 return -1; 14 } 15 namedWindow("input image", CV_WINDOW_AUTOSIZE); 16 imshow("input image", src); 17 18 int numFeatures = 400; //检测400个特征点 19 Ptr<SIFT> detector = SIFT::create(numFeatures); 20 vector<KeyPoint> keypoints; 21 detector->detect(src, keypoints, Mat()); //开始检测 22 printf(

Comparing images using SIFT

孤人 提交于 2019-12-01 14:44:34
I'm trying to compare 2 images that are taken from a digital camera. Since there may be movement on the camera, I want to first make the pictures "match" and then compare (using some distant function). To match them, I'm thinking about cropping the second picture and using SIFT to find it inside the first picture... it will probably have a small difference on scale/translation/rotation so then I'd need to find the transformation matrix that converts image 1 to image 2 (based on points found by SIFT) any ideas on how to do that (or I guess that's a common problem that may have some opensource

vl_dsift trying to get a feature vector at every pixel

馋奶兔 提交于 2019-12-01 14:43:22
I am trying to use vl_dsift to get the 128*1 feature vectors at every pixel. Therefore I want the resulting matrix to have size 128*(#OfPixels) However when I use it on an image of size (192*168) then the resulting descriptor gives size (128*31,185) with a binsize of 1 and a magnification factor of 1. I = imread('Faces\yaleB11_P00A-130E+20.pgm'); size(I) figure imshow(I) binSize = 1 ; magnif = 1 ; Is = vl_imsmooth(single(I), sqrt((binSize/magnif)^2 - .25)) ; [f, d] = vl_dsift(single(I), 'size', binSize) ; size(f) size(d) I am afraid you cannot extract the feature vectors for all the pixels in

How does vl_ubcmatch work technically?

这一生的挚爱 提交于 2019-12-01 07:55:24
I am reading through vl_ubcmatch's function source code, provided here , and I am trying to understand, how does it compute the score, and how does it work technically internally. However, this C code has these macros, weird ## variables like, and what not, that I don't have experience with. So the main problem here is rather my incompetency in C. If possible, could somebody tell me, how does vl_ubcmatch work exactly? How does it compare two descriptors? This is explained in Sections 7.1 and 7.2 of Distinctive Image Features from Scale-Invariant Keypoints . Documentation for the function is