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 8477635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:31:20+00:00 2026-06-10T18:31:20+00:00

I am trying to implement Viola Jones detector. Because I don´t have enough images

  • 0

I am trying to implement Viola Jones detector. Because I don´t have enough images or time to train classifiers, I decided to use these OpenCV has.

So far, I was able to load whole haarcascade_frontface_alt.xml into structures in memory, create Integral Image for fast area sum and create basic algorithm for detector. But it is not working as expected, well, at all.

So, if anyone knows how Viola Jones detector works, and knows how OpenCV uses its structures, please confirm or deny my assumptions:

1, integral image is calculated in float values ranging from 0->1 for white
2, for every feature, you take area within its rectangles, multiply with weight and sum with all rectangles
3, if the sum is > threshold, left_val is summed further, if not right_val is used
4, is sum for all classifiers in stage is > than stage_threshold, it might be face, so continue with next stage, if not, break
5, repeat for all stages, detection windows and scales…

So far I am getting all kinds of detected areas, except those containing faces…

Please, if my assumptions of openCV cascade usage are wrong, help. Thanks.

  • 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-10T18:31:21+00:00Added an answer on June 10, 2026 at 6:31 pm
    1. Whether you use float or int as datatype for the integral image does not matter as long as it allows you to store values big enough to prevent arithmetic overflow. The values do not have to be normalized. Normalization is done later, during evaluation of the classifier (see 3).

    2. Yes

    3. if sum * inverse_area < threshold * standard_deviation, left_val is summed further, … (see below).

    4. Yes

    5. Yes

    I recommend you to look at high-level OpenCV ports such as JViolaJones written in Java or js-objectdetect for stump-based cascades, especially computeSat() and detectSingleScale() and Haar.js for non-stump based cascades both written in JavaScript to get a better understanding of the algorithm. The optimized OpenCV C/C++-code is somewhat difficult to read.

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

Sidebar

Related Questions

I'm trying to implement P. Viola and M. Jones detection framework in C++ (at
Trying to implement NSCopying for the first time, and I have a question about
I'm trying to implement the Viola Johns face detection algorithm on Cuda platform (I'm
I have this weird kind of error. I am trying implement basic Euclidean algorithm
Trying to implement what I thought was a simple concept. I have a user
Trying to implement the following structure from c to use NSArray in objective-c: In
Im trying to implement pagination using multiple searching criteria. Supposed I Have student table.
I'm trying implement a custom login page to use in my JSF 2.0 application.
Trying to implement the following behavior on an iPad. I have a map-centric application
Trying to implement a timer for my game that I'm making. I have a

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.