Comparing two face opencv - c++

I am new in opencv. I am trying to make a program which capture video from webcam and show the face on the video is exist in the directory or not. I already complete face detect from webcam. Now i jast need to compare the similarity of detected face with the directory image face. Please help me some one...
I am using
C++
MSVC 2010
OpenCV 2.1

You can use OpenCV's face detection methods. They have a very good tutorial in their website.
http://opencv.willowgarage.com/wiki/FaceDetection/

You can see to libface. It can detect and recognise faces.

Related

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

Opencv Images Orthorectification

I'm writing a program in opencv that stitches aerial images taken by a drone. The problem is that the stitch,after a certain point, start to "curving", so my homography matrix will be messed up and I can't stitch anything more.
There's a way in openv to do images orthorectivication without gps or DEM parameters? If not in opencv, there's a library easily integrable with opencv?
Thanks!
PS: I'm programming in C++

Feature detection in profile face images

I am using opencv 2.4.2 and c++. I am trying to detect the eyes,nose and mouth of a profile face using haarcascade xml files.The eyes are most of the time detected correctly using haarcascade_mcs_righteye and haarcascade_mcs_lefteye. However,the nose and mouth xml are mostly failures with profile faces[as shown below]. I understand that those were made for frontal face,but is there any other "not-so-complicated" open source method which I can use to detect the tip of the nose and corner of mouth in profile images?Basically,I will need their coordinates,but first I will need to detect them. Anybody please?
Recently, Zhu and Ramanan CVPR 2012 had intoduced Face detection, pose estimation and landmark localization, this is by far the best I've seen, OpenCV Is Great By All means, but it's not state of the art for all applications out there nowadays.
I hope this helps

Beyond Face Detection-OpenCV

I used the information provided in the OpenCV wiki to make a face detection program which identifies the presence of a face in the Camera feed. The source code that I used was provided in the link given below
http://docs.opencv.org/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html
Now I wanted to take it to another level so that it can actually identify the ears also. Thus I would want to place a mask on the users face which shows the presence of face and also the ears, something like
http://code.google.com/p/ehci/wiki/6dofhead
How to do this without using OpenGL, and using some kind of cascade classifier?
There HaarCascades available for ears, eyes, nose, mouth, etc. You can use them in the same way as you used Face cascades to detect faces. The cascades are provided with the source.
OpenCV-version/data/haarcascades
There is a facedetector example in the OpenCV distribution that shows how to detect the face and some other face features. All you have to do is to send the cascades names to the executable. The cascades are located in the openCV_install/data/cascades/
Here is the latest tutorial
and there is a bit older one, compatible with the older cascades.

Stitching Panoramic Images

Today I came up with an interesting project from Germany: Throwable PanoramicBall Camera 36 images are captured in a small ball, then they are showed panoramically. The author declares to use OpenCV
Can you give me some idea about creating a model for cameras at fixed position/orientation and stitching images with OpenCV?
Look into Image rectification:
http://en.wikipedia.org/wiki/Image_rectification
This book also has some good explanations and code examples on how to do it in OpenCV in the later chapters:
http://www.amazon.com/OpenCV-Computer-Application-Programming-Cookbook/dp/1849513244/ref=sr_1_1?ie=UTF8&qid=1319209140&sr=8-1
The author was probably using the new samples available in OpenCV.
Here are links to the samples currently available in OpenCV...
stitching_detailed
stitching
You may want to start with these samples if you're trying to do image stitching in OpenCV.