<< return to Pixycam.com

Get dominant Color of a region


#1

The Video API has the function getRGB which gives the RGB color at a pixel.

How can I get the “dominant” color in a region. For example, in the attached image, the dominant color is red …

region


#2

Hello Jimmie,
When grabbing RGB values, the RGB value is averaged over 5x5 pixels of the location given. Getting the average of the entire image isn’t something that’s supported. You could grab say 10 RGB values at strategic locations and average them to get basically what you want though.

Hope this helps!

Edward