eye detection is shaky [closed]
Hi everyone.
I have problem with eye detection , it is very shaky is there a way to make it stable . I have uploaded video of this :
Hi everyone.
I have problem with eye detection , it is very shaky is there a way to make it stable . I have uploaded video of this :
Asked: 2016-01-13 05:34:49 -0600
Seen: 109 times
Last updated: Jan 13 '16
OpenCV DescriptorMatcher matches
Conversion between IplImage and MxArray
Video On Label OpenCV Qt :: hide cvNamedWindows
Problems using the math.h class with OpenCV (c++, VS2012)
How to reduce false positives for face detection
Area of a single pixel object in OpenCV
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
Can't compile .cu file when including opencv.hpp
Using OpenCV's stitching module, strange error when compositing images
In that video there is an error because there is no detection and you are trying to access some area in the frame that do not exists (outside of image border). For this you can do a verification like
if (faces.empty()) { break; }
(the same for the eyes) in your processing loop. I do not see to much shaking, but for remove it add some tracker for the face and for the eyes too. You will gain in speed too.I run face detector and then eye detector after that I extract the eye region
Can you post the part of detection face, then eye, then the extraction of the eye (just the region)?
Here is the code
your problems is in detectLargestObject: you are choosing the first object always, but it could be a wrong one. It is a little bit hard to find an example, but just print your rects on every frame see what you get. I am sure that you get a rectangle with tl corner with at least one coordinate negative...
What can I do to resolve this problem
Start simple, add some lines that prints the rects of the face, and the 2 eyes to see exactly what is happening, then add the info in the question and I will try to help you further. Be careful to print them before displaying them ;)