Traffic Sign Detection and Recognition - c++

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

Related

Stitching images can't detect common feature points

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

dlib vs opencv which one to use when

I am currently learning OpenCV API with Python and its all good. I am making decent progress. Part of it comes from Python syntax's simplicity as against using it with C++ which I haven't attempted yet. I have come to realize that I have to get dirty with C++ bindings for OpenCV at some point if I intend to do anything production quality.
Just recently I came across dlib which also claims to do all the things OpenCV does and more. Its written in C++ and offers Python API too (surprise). Can anybody vouch for dlib based on their own implementation experience?
I have used both OpenCV and dlib extensively for face detection and face recognition and dlib is much accurate as compared to OpenCV Haar based face detector. ( Note that OpenCV now has a DNN module where we get Deep Learning based Face Detector and Face Recognizer models. )
I'm in the middle of comparing the OpenCV-DNN vs Dlib for face detection / recognition. Will post the results once I'm done with it.
There are many useful functions available in dlib, but I prefer OpenCV for any other CV tasks.
EDIT : As promised, I have made a detailed comparison of OpenCV vs Dlib Face Detection methods.
Here is my conclusion :
General Case
In most applications, we won’t know the size of the face in the image before-hand. Thus, it is better to use OpenCV – DNN method as it is pretty fast and very accurate, even for small sized faces. It also detects faces at various angles. We recommend to use OpenCV-DNN in most
For medium to large image sizes
Dlib HoG is the fastest method on CPU. But it does not detect small sized faces ( < 70x70 ). So, if you know that your application will not be dealing with very small sized faces ( for example a selfie app ), then HoG based Face detector is a better option. Also, If you can use a GPU, then MMOD face detector is the best option as it is very fast on GPU and also provides detection at various angles.
For more details, you can have a look at this blog

How to extract LBP features from a hand contour using opencv c++

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

Object Annotation in images with OpenCV

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

SIFT, HOG and SURF c++, opencv

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.