【Mathematica入门】图像颜色量化

2025-04-18 01:40:53

1、用三种颜色显示图像:ColorQuantize[img,3]

【Mathematica入门】图像颜色量化

2、用两种颜色显示图像:ColorQuantize[img,2]

【Mathematica入门】图像颜色量化

3、用制定的三种颜色显示图像:ColorQuantize[img,{Black,White,Green}]

【Mathematica入门】图像颜色量化

4、ColorQuantize[img,{Black,White,Green,Red,Blue}]

【Mathematica入门】图像颜色量化

5、防抖动:ColorQuantize[img,{Black,White,Green,Red,Blue},Dithering->False]

【Mathematica入门】图像颜色量化

6、用36种颜色显示图像,并防抖动:ColorQuantize[img,36,Dithering->False]

【Mathematica入门】图像颜色量化

7、与原图相减的效果。

【Mathematica入门】图像颜色量化
【Mathematica入门】图像颜色量化
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢