-
Face detection with OpenCV in iOS
over 9 years ago
-
over 8 years ago
Where is CvEffects xcode project in OpenCv? i am unable to find out. please help me.
-
-
over 8 years ago
Is it possible to apply this code to a single image rather than to a video stream? I tried removing the video camera and adding the following code the the view controller:
// Load image and xml files for facial features UIImage* resImage = [UIImage imageNamed:@"glasses.png"]; UIImageToMat(resImage, parameters.glasses, true); cvtColor(parameters.glasses, parameters.glasses, CV_BGRA2RGBA); resImage = [UIImage imageNamed:@"mustache.png"]; UIImageToMat(resImage, parameters.mustache, true); cvtColor(parameters.mustache, parameters.mustache, CV_BGRA2RGBA); // Load Cascade Classisiers NSString* filename = [[NSBundle mainBundle] pathForResource:@"lbpcascade_frontalface" ofType:@"xml"]; parameters.faceCascade.load([filename UTF8String]); filename = [[NSBundle mainBundle] pathForResource:@"haarcascade_mcs_eyepair_big" ofType:@"xml"]; parameters.eyesCascade.load([filename UTF8String]); filename = [[NSBundle mainBundle] pathForResource:@"haarcascade_mcs_mouth" ofType:@"xml"]; parameters.mouthCascade.load([filename UTF8String]); // Single image feature detection: // Steps -- create CV image UIImage* faceImage = [UIImage imageNamed:@"Clark.png"]; // The picture that was taken (should have a face) cv::Mat faceMat; UIImageToMat(faceImage, faceMat, false); // Convert image to opencv matrix // Detect and draw with face animator faceAnimator = new FaceAnimator(parameters); faceAnimator->detectAndAnimateFaces(faceMat); // How do I get the result of this?? Shouldn't this set the faceMat to an image that has the features drawn on? // Print features faceImage = MatToUIImage(faceMat); _imageView.image = faceImage;
When running the following code I get a log saying that a face has been detected, yet the glasses are not drawn on the image. I assumed that if I passed a reference of the image to detectAndAnimateFaces that the image would come back with the features drawn on it. This isn't the case though. Am I missing something? Thanks!
-
-
over 8 years ago
Hi, I have already added comment for broken link: you can find CVEffect folder with this link: https://github.com/Itseez/opencv_for_ios_book_samples/tree/master/
-
-
over 8 years ago
What is the licensing on this? Am I free to use it in proprietary software?
-
-
over 8 years ago
Sorry for the inconvenience . Link has been updated as: https://github.com/Itseez/opencv_for_ios_book_samples/tree/master/ . Please take look into it.
-
-
over 8 years ago
same to @mitesh i still can't find CvEfffects project in dowloaded folder
-
6 Comment(s)