I used the code from here to find Face. Im trying to draw both the eyes and the face.
But I can only show both the eyes or the face depending which of the statements i write first. How to do this?
// Detect faces
std::vector faces;
_faceCascade.detectMultiScale(mat, faces, 1.1, 2, kHaarOptions, cv::Size(60, 60));
//Detect eyes
std::vector eyes;
_eyesCascade.detectMultiScale(mat, eyes, 1.1, 2, kHaarOptions, cv::Size(30, 30));
Here eyes.size() = 0. If i interchange the position of the two statements, i get eyes.size() = 2 and faces.size() = 0
If your goal is to retrieve face and eyes position on iOS, why don’t you use CoreImage capabilities?
It doesn’t use OpenCV, but you get the mouth position for free.