实验一:图像文件类型转换
实验目的:理解数字图像文件的几种基本类型
掌握在MATLAB中进行图象文件类型转换的方法
观察图象转换前后的效果
加深对图象文件类型的理解
熟悉图象格式、颜色系统间的转换
实验内容:1)灰度图像与索引图像的相互转换
2)RGB图像与索引图像的相互转换
3)将图像转换为二值化图像
实验方法:利用MATLAB工具进行实验
一、灰度图像到索引图像的转换
clear
>> info=imfinfo('rice.png')
info =
Filename: 'rice.png'
FileModDate: '26-Jan-2003 00:03:06'
FileSize: 44607
Format: 'png'
FormatVersion: []
Width: 256
Height: 256
BitDepth: 8
ColorType: 'grayscale'
FormatSignature: [137 80 78 71 13 10 26 10]
Colormap: []
Histogram: []
InterlaceType: 'none'
Transparency: 'none'
SimpleTransparencyData: []
BackgroundColor: []
RenderingIntent: []
Chromaticities: []
Gamma: []
XResolution: []
YResolution: []
ResolutionUnit: []
XOffset: []
YOffset: []
OffsetUnit: []
SignificantBits: []
ImageModTime: '27 Dec 2002 19:57:12 +0000'
Title: []
Author: []