I am currently working on a hand recognition system. I have been able to detect the hand and draw a contour for it. Now, I have to extract features from the hand region. What is the best feature extraction method that i can use?
I was thinking to use Local Binary Pattern, but since i am new to computer vision i don't know how to use it.
Perhaps you must look at histogram of gradients (HOG), which can be considered as a more general version of LBP. You can have multiple images of hands; by extracting HOG features from each image and using an SVM or neural network classifier, you can learn a statistical model of hand poses. This will help in recognizing an unseen hand. Look also at the current literature on deep learning.
A C++ implementation of HOG is available from vlfeat library [1], which can be called from OpenCV. HOG can be computer from OpenCV also [2].
[1] http://www.vlfeat.org/overview/hog.html
[2] http://goo.gl/8jTetR
Related
I came across GridAdaptedFeatureDetector as an interface to feature detector in opencv. I was under the impression that we could use this to say partition an image into NxM cells and detect features for each cell. But I can't find documentation nor can I understand the source code for this interface.
Could someone let me know if GridAdaptedFeatureDetector can detect features by partitioning an image and returning image descriptors per cell? Or is there another method I could use to detect features in each cell individually?
Thanks!
Yes, GridAdaptedFeatureDetector partitions image into cells and detect features for each cell. This functionality is available only in OpenCV2. Here is the documentation.
However, you might be interested in a recent paper that tackles the problem of homogeneous keypoint distribution on the image. C++, Python, and Matlab interfaces are provided in this repository.
I am trying to develop an automatic(or semi-automatic) image annotator for my final year project with OpenCV. I have been studying many OpenCV resources and have come across cascade classification for training and detection purposes. I understood that part, and also tried the Face Detection tutorial provided with OpenCV. So, now I know how to train and detect objects.
However, I still cannot understand how can I annotate objects present in the image?
For example, the system will show that this is an object, but I want the system to show that it is a ball. How can i accomplish that?
Thanks in advance.
One binary classificator (detector) can separate objects by two classes:
positive - the object type classifier was trained for,
and negative - all others.
If you need detect several distinguished classes you should use one detector for each class, or you can train multiclass classifier ("one vs all" type of classifiers for example), but it usually works slower and with less accuracy (because detector better search for similar objects). You can also take a look at convolutional networks (by Yann LeCun).
This is a very hard task. I suggest simplifying it by using latent SVM detector and limiting yourself to the models it supplies:
http://docs.opencv.org/modules/objdetect/doc/latent_svm.html
Im new at OpenCV so please help me out. I want to detect lips edge using OpenCV. So can you give me some links and solution ?
Ive checked out normal procedure of detecting face and mouth using OpenCV but accuracy is not there. Ive used "haarcascade_mcs_mouth" to detect mouth in a picture but result was not so good. And I heard about AAM method , but could not get any documents regarding it. please help me...
Lip recognition is a problem in Computer Vision that it is not completely solved. The haar-like classifiers that you've been using (included in OpenCV) perform well in face recognition but for lip recognition better techniques have been developed. You will have to build different algorithms and choose the better one for your purpose. The fact that you are developing for iOS makes the task harder because of additional constraints (memory footprint, CPU, etc.). I have condensed for you a brief overview of the state of the art in lip recognition so you can research further:
Methods for recognising lips can be classified in three big categories:
Image based techniques: These are based on the hypotesis that skin and lips have different color. The paper [2] is an example of this kind of approach applied for sign language recognition. Color clustering has also been explored by [3]. It assumes that there are two pixel classes in the image: skin and lips. This method is not appropriate if the person has a beard, or is showing his/her teeth, for example.
Model based techniques: These methods are more robust than the previous ones because they use prior information about the lip shape. However, they are more expensive computationally so they may not be suitable for an implementation on mobile devices. AAM (Active Appearance Models) belong to this group and learn the shape of lips from manually annotated data. In the "External links" section of the Wikipedia article you can see some open source implementations and libraries that can be ported to C++/OpenCV.
Hybrid techniques: These methods are a combination of image based methods and model based methods. Typically, a color based technique is first applied to the image in order to estimate the lip region position and size; then, a model based technique (like AAM) is applied to the region of interest to extract lip contours. [4] is an example of this technique.
[2] U. Canzler and T. Dziurzyk, "Extraction of Non Manual Features for Videobased Sign Language Recognition". ;In Proceedings of MVA. 2002, 318-321
[3] Leung, Shu-Hung, Shi-Lin Wang, and Wing-Hong Lau. "Lip image segmentation using fuzzy clustering incorporating an elliptic shape function." Image Processing, IEEE Transactions on 13.1 (2004): 51-62.
[4] Bouvier, Christian, P-Y. Coulon, and Xavier Maldague. "Unsupervised lips segmentation based on ROI optimisation and parametric model." Image Processing, 2007. ICIP 2007. IEEE International Conference on. Vol. 4. IEEE, 2007.
What is best method of Traffic Sign Detection and Recognition?
I review the popular traffic sign detection methods prevalent in recent literature, but don't know which way is best!
I would like to use Color-based and shape-based detection methods.
I work image processing using opencv in visual studio c++.
Try this one:
https://sites.google.com/site/mcvibot2011sep/
Check dlib. The file example/train_object_detector.cpp* has some details on how this can be achieved. It uses a feature description technique called Histogram of Oriented Gradients (HOG).
Check the following links for a starting point:
Detecting Road Signs in Mapillary Images with dlib C++
Dlib 18.6 released: Make your own object detector!
* Note: don't just use the examples to train your detector! Read the files as a guide/tutorial! These example programs assume that you are trying to detect faces and make some improvements based on that (such as using image mirrors on training since faces are symmetric, which can be be disastrous for some signs).
Edit: Check my implementation of a traffic sign detector and classifier using dlib:
https://github.com/fabioperez/transito-cv
I have a simple question, which I want to know, what kind of libraries are available and can give good results for implementing SIFT, HOG(Histogram Oriented Gradient) and SURF in c++ or opencv?
Hence: 1- Give me the link for the code if you can, which I will be so appreciated.
2- If you know one of them or any kind of information to lead me to what I want, I will be so appreciated as well.
Thanks
check these:
surf
- great article
http://people.csail.mit.edu/kapu/papers/mar_mir08.pdf
sift
- great source, I tried it on the iPhone
http://blogs.oregonstate.edu/hess/
- fast - fast corner detection library
http://svr-www.eng.cam.ac.uk/~er258/work/fast.html
Example of surf code in openCV
https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/cpp/matching_to_many_images.cpp
Not sure if this is still relevant, but you also get two implementations of computing HOG descriptors in opencv i.e. both GPU and CPU versions of the HOG code.
for the CPU version you can check this blog post
however in the CPU version you would need to write your own logic for sliding windows.
and the GPU version is fairly straightforward you can read the documentation here
Might help you to know that SIFT and SURF implementations are already integrated into OpenCV.
http://opencv.willowgarage.com/documentation/cpp/features2d__feature_detection_and_descriptor_extraction.html
Be careful about OpenCV implementations, because latest versions of OpenCV have classified SIFT and SURF implementations as nonfree http://docs.opencv.org/modules/nonfree/doc/nonfree.html.
Now you can use them, but probably they are subject to licensing and cannot be used for commercial solutions.
This one uses descriptors based on HoG, Sobel and Lab channels for detection Class-Specific Hough Forests for Object Detection (opencv/c source code).
Rather then performing detection at every possible location this approach calculates a vote for each descriptor, then when putted together they produce a voting cloud where maximum will correspond to most probable location of the target. When combined with cvGoodFeaturesToTrack can produce very good results, even with a small training database.