how to extract number of colors from an image using matlab
Show older comments
how to extract number of colors from an image using matlab
Answers (1)
Assuming that the "image" means a file, and not something on paper:
img = imread('YourImage.jpg');
uni = unique(reshape(img, [], 3), 'rows');
Unfortunately rgb2ind does not help here anymore.
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!