truecolor = multibandread(‘paris.lan’, [512, 512, 7],…
‘uint8=>uint8’,128, ‘bil’, ‘ieee-le’, …
{‘Band’,‘Direct’,[3 2 1]});%生成真彩色多分辨率彩色图像
figure
imshow(truecolor);%显示真彩色图像
title(‘Truecolor Composite (Un-enhanced)’)
text(size(truecolor,2), size(truecolor,1) + 15,…
‘Image courtesy of Space Imaging, LLC’,…
‘FontSize’, 7, ‘HorizontalAlignment’, ‘right’)
figure; subplot(121)
imhist(truecolor(:,:,1))%显示红色分辨率下的直方图
title(‘Histogram of the Red Band (Band 3)’)
r = truecolor(:,:,1);%红色分量
g = truecolor(:,:,2);%绿色分量
b = truecolor(:,:,3);%蓝色分量
subplot(122); plot3(r(😃,g(😃,b(😃,’.’)%在三维空间中显示三种颜色的分量
grid(‘on’); xlabel(‘Red (Band 3)’); ylabel(‘Green (Band 2)’);
zlabel(‘Blue (Band 1)’) ;title(‘Scatterplot of the Visible Bands’)
stretched_truecolor = imadjust(truecolor,…
stretchlim(truecolor));%调整颜色对比度
figure
imshow(stretched_truecolor)%显示对比度调整后的图像
title(‘Truecolor Composite after Contrast Stretch’)
figure
imhist(stretched_truecolor(:,:,1))%显示对比度调整后红色色带的直方图
title(‘Histogram of Red Band (Band 3) after Contrast Stretch’)
decorrstretched_truecolor = decorrstretch(truecolor, …
‘Tol’, 0.01);%使用去相关进行图像增强
figure
imshow(decorrstretched_truecolor)%显示去相关增强后的图像
title(‘Truecolor Composite after Decorrelation Stretch’)
r = decorrstretched_truecolor(:,:,1);%红色分量
g = decorrstretched_truecolor(:,:,2);%绿色分量
b = decorrstretched_truecolor(:,:,3);%蓝色分量
figure
plot3(r(😃,g(😃,b(😃,’.’) %在三维空间中显示三种颜色的分量
grid(‘on’); xlabel(‘Red (Band 3)’); ylabel(‘Green (Band 2)’);
zlabel(‘Blue (Band 1)’);
title(‘Scatterplot of the Visible Bands after Decorrelation Stretch’)
CIR = multibandread(‘paris.lan’, [512, 512, 7],…
‘uint8=>uint8’, 128, ‘bil’, ‘ieee-le’,…
{‘Band’,‘Direct’,[4 3 2]});%利用红外,红色和绿色生成多分辨率图像
stretched_CIR = decorrstretch(CIR, ‘Tol’, 0.01);%使用去相关拉伸
figure
imshow(stretched_CIR)%显示去相关拉伸后的图像
title(‘CIR after Decorrelation Stretch’)
MATLAB图像处理之图像增强实战三
最新推荐文章于 2024-05-29 19:30:34 发布