X中的大量贴图就是TIFF格式的。TIFF最大色深为32bit,可采用LZW无损压缩方案存储。多种程序都可以识别它,故在本次图像处理中采用.tif格式的图片。Р3.对灰度图像pout.tif和彩色图像shadow.tif的对比增强处理Р3.1 加载灰度图像pout.tif和彩色图像shadow.tifРpout = imread('pout.tif');Р[X map] = imread('shadow.tif');Рshadow = ind2rgb(X,map); Р3.2 调整图像大小Рwidth = 210;Рimages = {pout,shadow};Рfor k = 1:2Р dim = size(images{k});Р images{k} = imresize(images{k},[width*dim(1)/dim(2) width],'bicubic');РendРpout = images{1};Рshadow = images{2};Р3.3 增强灰度图片pout.tif处理Р处理结果如图3.3.1-图3.3.5所示Рpout_imadjust = imadjust(pout);Рpout_histeq = histeq(pout);Рpout_adapthisteq = adapthisteq(pout);Рimshow(pout);Рtitle('Original');Рfigure, imshow(pout_imadjust);Рtitle('Imadjust');Рfigure, imshow(pout_histeq);Рtitle('Histeq');Рfigure, imshow(pout_adapthisteq);Рtitle('Adapthisteq');Рfigure, imhist(pout), title('pout.tif');