I have just started studying the Viola-Jones face detection algorithm to design a face recognition system. off all the things i understood, I have confusion regarding the phrase:"sum of pixels". Does it means sum of colors at given pixels or the sum of distance of the given pixels?
Asked
Active
Viewed 2,053 times
2 Answers
2
Generally if you see something like that they're talking about the value of a pixel (its intensity). According to OpenCV, the value of a pixel is calculated as 0.299 R + 0.587 G + 0.114 B. This is how OpenCV converts to grayscale, btw. So when they talk about the sum of pixels, they're likely talking about the sum of the pixel values in a given region (i.e. for a 3x3 region, take the value of each pixel and sum it up).
![](../../users/profiles/576139.webp)
Chris Eberle
- 44,989
- 12
- 77
- 112
-
It is not "likely", I confirm that it is the sum of grayscale pixel intensities, for sure. – Giuseppe Dini May 07 '16 at 11:02
2
The sum of pixels is the cumulative sum of pixels along the 2 dimensions of the image Please check cumsum function in Matlab.
For example: I = cumsum(cumsum(double(image)),2)
Check out this link for some good info on the Viola Jones Face Detection technique
Good Luck!
![](../../users/profiles/737507.webp)
Ash
- 21
- 2