Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Use a histogram to find the most common color in the area. The more bins you use, the harder to tell which is the most common color, but the more precise you can be as to which color.

This tutorial shows you how to use histograms to isolate colors. http://docs.opencv.org/3.1.0/da/d7f/tutorial_back_projection.html#gsc.tab=0