[英]Number of unique CIELab colors in an image
I have an image represented in the CIELab color space.我有一张在 CIELab 颜色空间中表示的图像。 How can I return the number of unique CIELab colors the image contains?
如何返回图像包含的唯一 CIELab colors 的数量?
Thanks.谢谢。
You can use unique(...,'rows')
:您可以使用
unique(...,'rows')
:
n = size(unique(reshape(img, [], 3)),1);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.