I have tried building my own Haar for segmenting out lips. But I have not achieved very good results. Can I get any Haar for lips segmentation just like the one we have for eyes. I searched the internet for such haar but couldn't find one.
My aim is to find if my mouth is widely open or closed.
If no one has done such haar. I will build one and opensource it.
If there are no Haar cascades in the OpenCV distribution that currently implement how to segment out lips, consider building your own. Take a look at the guide to building Haar cascades from the OpenCV project for more details:
http://docs.opencv.org/trunk/doc/user_guide/ug_traincascade.html
I am assuming you already have positive and negative examples of what you want to classify, and so you can build your own cascades using your own ground truth data. The above guide will get you started on creating your own Haar cascades.
NB: I am usually against deferring people to external links without some sort of closure in my posts, but the process to do this is quite involved, and I can't invest the effort in repeating that information here.
This will help u in matlab use Viola-Jones algorithm
vision.CascadeObjectDetector System object
Detect objects using the Viola-Jones algorithm
Description
The cascade object detector uses the Viola-Jones algorithm to detect people's faces, noses, eyes, mouth, or upper body. You can also use the Training Image Labeler to train a custom classifier to use with this System object. For details on how the function works, see Train a Cascade Object Detector.
Related
Can someone direct me to a document or some kind of source about the "magic" behind trainCascadeObjectDetector? I was looking around for quite a bit but couldn't find anything. Thank you for your time.
Check the answer on MATLAB Answers:
Hello Dai,
Do you need to explain how the face detector itself works, or how the training of the face detector works?
vision.CascadeObjectDetector implements the deletection algorithm by Viola and Jones. It is a "sliding-window" approach, which slides a window across an image, and tries to determine whether or not there is a face in each location using a cascade of boosted classifiers. The original algorithm uses Haar-like features. vision.CacadeObjectDetector also gives you the option to use LBP or HOG features.
The Algorithms section of the vision.CascadeObjectDetector documentation gives a good high-level overview of what it is doing.
As far as the training process, there is a tutorial in the documentation explaining some of the details.
I'm looking for good library for camera calibration, I'm aware of Camera Calibration Toolbox for Matlab and OpenCV. The problem with the toolbox is that it is in Matlab and not very friendly for modifications. OpenCV on the other hand seems to be less precise (see Suriansky).
So are there any alternatives?
The paper you cite is rubbish: whoever wrote it did not bother to actually read the code.
The Matlab toolbox uses exactly the same calibration algorithms as the OpenCV code: Zhang's for the initial estimation, followed by a round of bundle adjustment. The reason they are very similar is that the author of the original implementation of the Matlab toolbox worked for a while with the Intel team that produced the calibration code in the very first release of OpenCV.
Any differences among the results they produce are most likely due to different configurations of the control parameters.
I don't understand what you mean by "not very friendly for modification". If you have Matlab, and your application can use it (it's slow), J.Y. Bouguet's code is quite easy to read and modify. On the other hand, I always found the OpenCV codebase somewhat annoyingly low-level (but understandably so, given the stress on performance).
One alternative is the camera calibration functionality in the Computer Vision System Toolbox for MATLAB. Specifically, check out the Camera Calibrator and the Stereo Camera Calibrator apps.
As mentioned by Francesco, both Matlab and OpenCV use the Zhang method. As 2022, OpenCV offers a larger range of distortion parameters thus offering more precision in the pose estimation results. However, all parameters might not be required at once. More details on these parameters are provided in the documentation:
https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga3207604e4b1a1758aa66acb6ed5aa65d
As an alternative solution to both OpenCV and Matlab, I would definitely recommend CalibPro, a web platform that allows you to upload your data and get your calibration parameters in a matter of minutes without a single line of code. CalibPro is fully compatible with OpenCV camera parameters. The platform is rapidly developing and will provide more than the pinhole camera model in the near future.
[Disclaimer]: I am the founder of CalibPro. I am happy to take any feedback on our platform or help people with their calibration.
I would like to know what is the best approach to begin a project to perform graphical recognition of people. In other words, the computer will parse an image file and through a heuristic figure out if it sees the shape of a person.
Any API's or open sources available, is this too ahead of the times?
Thanks
Are you searching for face detection or people detection?
If face-detection:
OpenCV comes with samples for face detection. And OpenCV 2.4-beta has samples for face recognition also. Check here : http://github.com/Itseez/opencv/tree/master/samples/cpp
If people-detection:
OpenCV comes with a sample for people-detection using HOG descriptors. Link
This is the result i obtained with above code:
Hey guys, Am wondering if anybody can help me with a starting point for the design of a Neural Network system that can recognize visual patterns, e.g. checked, and strippes. I have knowledge of the theory, but little practical knowledge. And net searches are give me an information overload. Can anybody recommend a good book or tutorial that is more focus on the practical side.
Thank you!
Are you only trying to recognize patterns such as checkerboards and stripes? Do you have to use a neural network system?
Basically, you want to define a bunch of simple features on the board and use them as input to the learning system. It can often be easier to define a lot of binary features and feed them into a single-layer network (what can become essentially linear regression).
Look at how neural networks were used for learning to play backgammon (http://www.research.ibm.com/massive/tdl.html), as this will help give you a sense of the types of features that make learning with a neural network work well.
As suggested above, you probably want to reduce your image a set of features. A corner detector (perhaps the Harris method) could be used to determine features in the checkerboard pattern. Likewise, an edge detector (perhaps Canny) could be used in the stripes case. As mentioned above, the Hough transform is a good line detection method.
MATLAB's image processing toolbox contains these methods, so you might try those for rapid prototyping. OpenCV is an open-source computer vision library that also provides these tools (and many others).
I am trying to take an image and extract hand written text so that it can be read easily and zoomed in on. I would like to convert the text to vector paths.
I am not aware of any libraries that would make this as painless as possible. Any help is greatly appreciated. Examples are nice too :)
Simple iPhone Image Processing (on Google code) contains all the primitive tools you will need:
Canny edge detection
Histogram equalisation
Skeletonisation
Thresholding, adaptive and global )
Gaussian blur (used as a
preprocessing step for canny edge
detection)
Brightness normalisation
Connected region extraction
Resizing - uses interpolation
The only program I know of for the iPhone that does handwriting recognition is HWPEN. Unfortunately, it's not a library but a full application and (to make matters worse) it requires a Jailbroken phone.
I fear you must either try to get the source for HWPEN or reverse engineer it to obtain the code you need.
Barring that, you may want to write your own. There are several studies on handwriting recognition that may help.