Reputation: 19
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?
Upvotes: 2
Views: 2073
Reputation: 21
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!
Upvotes: 2
Reputation: 48795
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).
Upvotes: 2