Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张在 CIELab 颜色空间中表示的图像。如何返回图像包含的唯一 CIELab 颜色的数量?
谢谢。
您可以使用unique(...,'rows'):
unique(...,'rows')
n = size(unique(reshape(img, [], 3)),1);