How to calculate the proportion value of some colors to the all color in an image

조회 수: 2 (최근 30일)
lina
lina 2015년 9월 10일
답변: Image Analyst 2015년 9월 10일
Dear all,
Let say I have an image as attached. I need to calculate the ratio or proportion between pixel with blue color compare to all part of image (except the background) Could anyone help how to implement it in a matlab code?
Many thanks

답변 (2개)

Steven Lord
Steven Lord 2015년 9월 10일
First, define "blue." This may seem like a simple question, but it may not be; see John D'Errico's "fuzzycolor" submission on the File Exchange.
For example, take a look at the 9 on the side of the car. I say that to me the top of the 9 is yellow, the middle is orange, and the bottom is red. So where does the yellow-ness end and the orange-ness begin? Where is the dividing line between orange and red?

Image Analyst
Image Analyst 2015년 9월 10일
You need to do color segmentation. I have several examples/tutorials of how to do that in my File Exchange. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

Community Treasure Hunt

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

Start Hunting!

Translated by