Get most common colours in an image using OpenCV
I would transform the images to the HSV color space and then compute a histogram of the H values. Then, take the bins with the largest values.
Hi I'm using Opencv and I want to find the n most common colors of an image using x sensitivity. How could I do this? Are there any opencv functions to do this? 
Cheers!
*Note: this isn't homework, i'm just using opencv for fun!