I am currently working on SIFT using Matlab. I had implemented the Scale-Space and DoG. Currently working on Keypoint localization. I am able to extract the maxima and minima. How should I proceed from here? Besides that, anyone is interest to verify my coding?
http://www.ipol.im/pub/pre/82/preprint.pdf . This paper gives a detailed analysis of SIFT . This should clarify most of your implementation based queries
Related
I wish to stitch two or more images using OpenCV and C++. The images have regions of overlap but they are not being detected. I tried using homography detector. Can someone please suggest as to what other methods I should use. Also, I wish to use the ORB algorithm, and not SIFT or SURF.
The images can be found at-
https://drive.google.com/open?id=133Nbo46bgwt7Q4IT2RDuPVR67TX9xG6F
This a very common problem. Because images like this, they actually do not have much in common. The overlap region is not rich in feature. What you can do is dig into opencv stitcher code and there they use confidence factor for feature matching, you can play with that confidence factor to get matches in this case. But this will only work if your feature detector is able to detect some features in overlapping resion.
You can also look at this post:
Related Question
It might be helpful for you.
"OpenCV stitching code"
This is full pipleline of OPencv Stitching code. You can see that there are lot of parameters you can change to make your code give some good stitching result. Also I would suggest using a small image (640 X480) for the feature detection step. Using small images is better than using very large images
I intend to calculate haar-like features of input images, and then classify those features using SVM.
My question is: Is there some library (C++ or Matlab) of calculating haar-like features of an image I can use?
By the way, I know the application opencv_traincascade.exe from OpenCV. But I wonder if there is a separated code just for calculating haar-like features in OpenCV?
I've found source codes of opencv_traincascade.exe and opencv_haartraining.exe. They're in directory ".\sources\apps\".
And the code to calculate haar-like features of an image is in class CvHaarEvaluator from haarfeatures.cpp, but I can't find any explanation of its members.
As far as I know, CvHaarEvaluator is used once in CvCascadeClassifier.cpp, and the latter is then used once in traincascade.cpp. But I also can't find explanations of traincascade.cpp.
Since it seems that it will take me a lot of time to understand these source codes, I've decided to implement a simple one by myself.
Anyway, if anybody finds an explanation or example of how to use CvHaarEvaluator, please tell me. Thanks!
I found a tutorial about VLFeat HOG
http://www.vlfeat.org/overview/hog.html
I am a little confused by the 16*16*31 matrix. Can anyone tell me how can I extract features that can be used for classification task from the matrix that the function returns?
Thanks!
The entries in that matrix are features! Depending on what you're trying to achieve you might do some dimensionality reduction or augmentation or post processing, but none of that is strictly necessary. Check out the original HoG paper.
I'm trying to get started working with sift feature extraction using (C++) OpenCv. I need to extract features using SIFT, match them between the original image (e.g. a book) and a scene, and after that calculate the camera pose.
So far I have found this algorithm using SURF. Does anyone know a base code from which I can get started, or maybe a way to convert the algorithm in the link from SURF to SIFT?
Thanks in advance.
EDIT:
Ok, I worked out a solution for the sift problem. Now I'm trying to figure the camera pose. I'm trying to use: solvePnP, can anyone help me with an example?
Check out the feature2d tutorial section of the new OpenCV docs website.
There tutorials with code showing:
Feature detection with e.g. SURF
Feature Description
Feature Matching
If you have managed to find matches between the image and the scene, then I suggest you apply cv::findHomography(). It will calculate the homography matrix using 4 matches as input.
You can convert to camera pose from the homography matrix directly.
For using SIFT instead of SURF, I changed SurfFeatureDetector to SiftFeatureDetector and SurfDescriptorExtractor to SiftDescriptorExtractor. For some images, I found that the combination SURF detector <--> SIFT descriptor yields relatively accurate results, but you should experiment with other combinations (FAST detector - FREAK descriptor or ORB detector - BRISK descriptor), depending on your requirements.
Please follow this tutorial for solving the homography part of your question:
Feature Matching and Homography
Also, maybe this will help: Pose Estimation
I see HOG is often used with SVM for target detection, can it be used in matching keypoints in two images?
and btw, where could I find OpenCV sample of using HOGDescriptor?
HOG can be used without SVM for feature matching.
just choose some points ( edge, for example ) and calculate the feature of HOG inside ROI with those points centered.
HOGDescriptor seems only for GPU programming.
I created Descriptor for HOG as a Mat in openCV and it also works for OpenCV matching functions.
If you are working with images you can use SIFT/SURF with SVM. There is nothing that stops you from using HOG for keypoint matching, but bear in mind that the effectiveness depends on discrimination power and robustness of the descriptor.
Edit: My bad in understanding when I originally mentioned HOG being for video only. Somehow I was thinking about histogram of optical flow vectors which is very effective for video activity description.
Edit 2 [Oct '12]: I now suggest people to try ORB or BRISK for those looking for license friendly descriptors that are fast and quite effective for keypoint matching.