Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9220751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:25:19+00:00 2026-06-18T03:25:19+00:00

I used the code from here to find Face. Im trying to draw both

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:25:20+00:00Added an answer on June 18, 2026 at 3:25 am

    If your goal is to retrieve face and eyes position on iOS, why don’t you use CoreImage capabilities?

    CIImage *image = [CIImage imageWithContentsOfURL:[NSURL fileURLWithPath:@"image.jpg"]];
    
    NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:CIDetectorAccuracyHigh, CIDetectorAccuracy, nil];
    
    CIDetector *faceDetector = [CIDetector detectorOfType:CIDetectorTypeFace context:nil options:options];
    
    NSArray *features = [faceDetector featuresInImage:image];
    for(CIFaceFeature* faceFeature in features)
    {
        CGRect faceSize = faceFeature.bounds.size;
        PointF leftEyePosition;
        PointF rightEyePosition;
        PointF mouthPosition;
    
        if(faceFeature.hasLeftEyePosition)
            leftEyePosition = faceFeature.leftEyePosition;
        //do the same for right eye and mouth
    }
    

    It doesn’t use OpenCV, but you get the mouth position for free.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've used the following code, taken from here , to create my own custom
I used the code from http://www.rgagnon.com/javadetails/java-0580.html to get Motherboard Id, but the result is
I have used this code for extracting urls from web page.But in the line
All the examples I can find using DLLImport to call C++ code from C#
I'm trying to understand a particular Perl code from vcake . Usually I find
I want to get zip code from users current location(Latitude, Longitude), I had used
The Default code used to LIMIT the results fetched from the MySQL database using
I've used the code in Removing Icon from a WPF window to remove the
I've used this code https://github.com/johannilsson/android-pulltorefresh It all works perfectly apart from one thing, when
The following code is used to fetch logs from app engine for further processing.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.