How to calculate the proportion value of some colors to the all color in an image
5 次查看(过去 30 天)
显示 更早的评论
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148896/image.jpeg)
Many thanks
0 个评论
回答(2 个)
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?
0 个评论
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
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!