2

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?

saurabheights
  • 3,152
  • 1
  • 26
  • 39
nkt217
  • 21
  • 5

2 Answers2

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).

Chris Eberle
  • 44,989
  • 12
  • 77
  • 112
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!

Ash
  • 21
  • 2