Detect ROI color [closed]

asked 2014-09-14 17:15:05 -0600

Eng Hind gravatar image

updated 2018-01-07 23:50:43 -0600

Hi , i'm a beginner with openCV and i want any one to help me HOW to detect ROI color of colored image using Histogram or any other way

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by berak
close date 2014-09-15 05:40:42.112201

Comments

aww, don't post duplicates, please..

worse enough, that you put all of it into the title (so anyone reading it suffers from serious eye-bleeding), please read the faq on how to actually improve your question

berak gravatar imageberak ( 2014-09-14 17:42:48 -0600 )edit

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

Eng Hind gravatar imageEng Hind ( 2014-09-14 17:49:40 -0600 )edit

I think it's OK now .. i edit the post by replacing title with content sorry for confusing you ...

Eng Hind gravatar imageEng Hind ( 2014-09-14 18:04:26 -0600 )edit

no fear, you're doing fine ;)

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())

berak gravatar imageberak ( 2014-09-14 18:05:50 -0600 )edit

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

Eng Hind gravatar imageEng Hind ( 2014-09-14 18:30:12 -0600 )edit