The Cozy Hut of Dr. Zhang分享 http://blog.sciencenet.cn/u/zjzhang

博文

图像类型转换---rgb2ind函数(将真彩色图像转换为索引图像)

已有 10720 次阅读 2011-11-10 23:06 |个人分类:图像分析(matlab,PDE)|系统分类:科研笔记| title

>> RGB=imread('peppers.png');
>> [X1,map1]=rgb2ind(RGB,16);
>> [X2,map2]=rgb2ind(RGB,16,'dither');
>> [X3,map3]=rgb2ind(RGB,16,'nodither');
>> subplot(2,2,1);
>> imshow(RGB);
>> title('原始图像');
>> subplot(2,2,2);
>> imshow(X1,map1);
>> title('最小方差量化转换结果');
>> subplot(2,2,3);
>> imshow(X2,map2);
>> title('使用转换结果');
>> subplot(2,2,4);
>> imshow(X3,map3);
>> title('不使用转换结果');


https://blog.sciencenet.cn/blog-287000-506728.html

上一篇:图像类型转换---rgb2gray函数(将真彩色图像转换为灰度图像)
下一篇:实战---灰度图像的水平集分解(书Page69,图3.16)
收藏 IP: 121.33.190.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-9-27 10:27

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部