Little doubt about the face detection operation using Haar cascades

asked 2017-06-26 08:51:27 -0500

Kelvin gravatar image

I don't quite understand how the pixels are summed in each rectangle area described here: Face Detection using Haar Cascades

It says:

Each feature is a single value obtained by subtracting sum of pixels under white rectangle from sum of pixels under black rectangle.

What are summed in each region (rectangle)? The number of pixels or the intensity of all pixels in that region?

edit retag flag offensive close merge delete


Thanks @berak. So, the value for the rectangle area is calculated based on the integral image, and each value from the integral image, in turn, is generated from the sum of all pixels (intensity) in the up-left from the original image. Is that right? If it is right, the answer to my question is that it uses the intensity of the pixels to calculate the rectangles value.

Now I have another doubt, about the integral image. It uses the intensity of the current pixel to generate the corresponding value (x,y) for the integral image?

For example:







Is that correct?

Kelvin gravatar imageKelvin ( 2017-06-26 11:14:22 -0500 )edit
  • "that it uses the intensity of the pixels to calculate the rectangles value". -- yes.
  • sorry, i do not understand the part about the "current pixel"
  • in the end, the "absolute" intensity does not matter. think again of those haar rectangles. if the sum of the left rect is larger than the sum of the right, the left one is considered "white", and the right one "black", that's it ;)
berak gravatar imageberak ( 2017-06-26 11:35:11 -0500 )edit