How can I get the percentage of each individual color from an RGB image?

 Accepted Answer

Do you mean:
I = your_RGB_image;
rgb_percent = squeeze(sum(sum(I,1),2))/sum(I(:))*100
%SCd

2 Comments

thank you this will help me for my project
thanks Sean de Wolski it is really helpful

Sign in to comment.

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!