This code will search for the most red, green and blue pixel in the image (provided by a webcam) ignoring the white pixels. When the desired pixel is found, it will be marked with a circle (you can vary the radius of the circle with the mouse wheel)
Also it will show an histogram of the quantity of pixels with certain level of red, green and blue.