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

4 ビュー (過去 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