sift

Issue: Bag of Features Training SIFT or SURF for car detection within Video with OpenCV + Python

吃可爱长大的小学妹 提交于 2019-12-04 21:55:35
I am trying to dump keypoints of cars with SIFT or SURF and match these keypoints to a video in order to detect cars. Keypoints are more convenient to use instead of Haar Cascades because I would have to use a lot of images for example 5000 to train, which will take a lot of computation process. Keypoints from SURF or SIFT are scale invariant which will be almost the same in every car. The code for dumping keypoints into a txt file is: import cv2 import numpy as np import os import cPickle surf = cv2.xfeatures2d.SURF_create() descriptors = [] image = cv2.imread('1.jpg') kp, dsc = surf

Using SIFT descriptors to compare similarity between two images

你离开我真会死。 提交于 2019-12-04 21:23:12
I'm using the SIFT algorithm to determine the level of similarity between two images. I managed to get the list of descriptors for image but I cant seem to figure what to do next. My problem is that I have a different number of descriptors and their order is maybe not the same. What is the best way to compare these descriptors? Thanks. Basic euclidean distance together with a heuristic that stipulated that a match is only accepted if it is significantly better than the second best match. As advocated by the (co) inventer, Lowe For each descriptor in image A, find its nearest neighbor in image

Merge multiple cv::Mat?

故事扮演 提交于 2019-12-04 20:48:47
问题 Basically I have 3 mat like this: Mat descriptors1 Mat descriptors2 Mat descriptors3 Where each descriptors have been loaded like this: extractor->compute( object, kp, descriptors ); How could I join in a single Mat all the descriptors (append one mat to the other) ? Example: Mat fullDesc = descriptors1 + descriptors2 + descriptors3; 回答1: Not very effective, but short: descriptors1.push_back(descriptors2); descriptors1.push_back(descriptors3); After that descriptors1 will be a concatenation.

Interpreting score in SIFT

梦想的初衷 提交于 2019-12-04 16:48:21
i am using SIFT algorithm in matlab to determine the similarity between template image and a set of images, where in the end i have to determine the best match between set of images on the basis of SCORES,is it true to say that higher the score of an image the better the match? i am aware that when there is an exact match, the score is zero, but what if the image is similar? I assume by SCORES you mean a similarity measurement between a pair of matched descriptors (e.g. euclidean distance). If my assumption is correct, statistically averaging the scores of all matches (e.g. SSD) should give

implementing Bags of Words object recognition using VLFEAT

拈花ヽ惹草 提交于 2019-12-04 14:05:35
I am trying to implement a BOW object recognition code in matlab. The process is slightly complicated and I've had a lot of trouble finding proper documentation on the procedure. So could someone double check if my plan below makes sense? I'm using the VLSIFT library extensively here Training: 1. Extract SIFT image descriptor with VLSIFT 2. Quantize the descriptors with k-means(vl_hikmeans) 3. Take quantized descriptors and create histogram(VL_HIKMEANSHIST) 4. Create SVM from histograms(VL_PEGASOS?) I understand step 1-3, but I'm not quite sure if the function for SVM is correct. VL_PEGASOS

Python+OpenCV 3 - cant use SIFT

对着背影说爱祢 提交于 2019-12-04 11:48:21
问题 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 &

SIFT and SURF feature extraction Implementation using MATLAB

大城市里の小女人 提交于 2019-12-04 10:19:52
I am doing an ancient coins recognition system using matlab. What I have done so far is: convert to grayscale remove noise using Gaussian filter contrast enhancement edge detection using canny edge detector. Now I want to extract feature for classification. Features I thought to select are roundness, area, colour, SIFT and SURF. My problem is how I can apply SIFT and SURF algorithms to my project. I couldn't find built-in functions for both. you can find a matlab implementation of SIFT features here: http://www.cs.ubc.ca/~lowe/keypoints/ You can find SIFT as a C implementation with MATLAB

how to use SIFT features for bag of words in opencv?

风格不统一 提交于 2019-12-04 09:45:45
I have read a lot of articles about implementing bag of words after taking sift features of an image, but I'm still confused what to do next. What do i specifically do? Thank you so much in advance for the guidance. This is the code that i have so far. cv::Mat mat_img = cropped.clone(); Mat grayForML; cvtColor(mat_img, grayForML, CV_BGR2GRAY); IplImage grayImageForML = grayForML.operator IplImage(); //create another copy of iplGray IplImage *input = cvCloneImage(&grayImageForML); Mat matInput = cvarrToMat(input); // Mat matInput = copy_gray.clone(); cv::SiftFeatureDetector detector; std:

C++/SIFT/SQL - If there a way to compare efficiently a SIFT descriptor of an image with a SIFT descriptor in a SQL database?

妖精的绣舞 提交于 2019-12-04 09:05:15
I would like to find a way which would allow to compare a SIFT descriptor of an image (query) with descriptors in a SQL database which contains lots of descriptors of differents pictures. In fact, my final purpose is to do an application which allow to compare one picture with lots of picture in a database (not in my device) but in a SQL database. The first thing i thought was to stock each descriptors on the SQL database and compare each descriptors to another one using the Brute Force method or the FlanneBased method. The problem is that,in a SQL database, it would take a long time to

SIFT matches and recognition?

淺唱寂寞╮ 提交于 2019-12-04 08:35:34
问题 I am developing an application where I am using SIFT + RANSAC and Homography to find an object (OpenCV C++,Java). The problem I am facing is that where there are many outliers RANSAC performs poorly. For this reasons I would like to try what the author of SIFT said to be pretty good: voting. I have read that we should vote in a 4 dimension feature space, where the 4 dimensions are: Location [x, y] (someone says Traslation) Scale Orientation While with opencv is easy to get the match scale and