Image processing color percentage

2 views (last 30 days)
Song
Song on 3 Aug 2012
Hi, everybody, I have a question about image processing, how should I know the color percentage in a picture? I mean is not the percentage of the Red, Green and Blue. For example, I have a picture which is 100% white in the left and 100% red in the right and there is some mix part in the middle, I want to know the percentage of red and white in the middle. Thanks a lot.<<>>

Answers (1)

Image Analyst
Image Analyst on 3 Aug 2012
You have to define where white and red stop and the mixture begins. For example, RGB = (255,255,255) is definitely white. But is (255, 254, 254) white or is it a mixture?
As an example, what if a pixel is (150, 100, 120). Can you tell us what percentage of red, or of white, you would consider that?
Maybe you want to convert to HSV color space and look at the S channel. Define what saturation you think the mixture covers and get the mean within that region. Posting/uploading a picture always helps.

Categories

Find more on Modify Image Colors in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!