how to extract number of colors from an image using matlab

2 次查看(过去 30 天)
how to extract number of colors from an image using matlab

回答(1 个)

Jan
Jan 2015-4-16
编辑:Jan 2015-4-16
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.

类别

Help CenterFile Exchange 中查找有关 Modify Image Colors 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by