oh i'm sorry .. i wrote "RIO" instead of "ROI" by mistake
i'm looking for something that tell me the Predominant color in ROI ..
for example if the there is 200 red pixel and 20 green pixel this ROI Will be considered as Red

again, could you clarify, if you're trying to track a colored region through succesive frames(camshift,tracking), or are you just trying to segment a colored region in 1 image ?(segmentation, inRange())

no i'm not tracking a colored region
i want to select any part of my image with mouse by drag and drop AS ROI 'i have done this part of my code ' .. then i want to detect the color of this segmented Part by calculating Dominant color on it ..
i hope you understand my Q ..
Sorry for poor language .. i'm not fluent