Main Content

Enhance Multispectral Color Composite Images

此示例显示了一些基本的图像组成和增强技术,可与多光谱数据一起使用。通常有必要增强多光谱辐射或反射率数据,以创建适合视觉解释的图像。该示例使用了Landsat主题映射器图像,覆盖了法国巴黎的一部分。七个光谱带存储在一个以ERDAS LAN格式的文件中存储。涵盖的概念包括:

  • Reading multispectral data from Erdas LAN files

  • 从不同带组合构建颜色复合材料

  • 通过对比度增强图像

  • 增强图像通过去相关拉伸

  • Using scatterplots

从多光谱图像创建TrueColor复合材料

LAN文件,paris.lan,,,,contains a 7-band 512-by-512 Landsat image. A 128-byte header is followed by the pixel values, which are band interleaved by line (BIL) in order of increasing band number. They are stored as unsigned 8-bit integers, in little-endian byte order.

Read bands 3, 2, and 1 from the LAN file using the MATLAB® functionmultibandread。这些频带覆盖了光谱的可见部分。当它们分别映射到RGB图像的红色,绿色和蓝色平面时,结果是标准的TrueColor复合材料。最终输入参数multibandreadspecifies which bands to read, and in which order, so that you can create an RGB composite in a single step.

truecolor = multibandread('paris.lan',,,,[512, 512, 7],'uint8=>uint8',,,,...128,'bil',,,,'ieee-le',,,,{'Band',,,,'Direct',,,,[3 2 1]});

TrueColor复合材料的对比度很小,颜色是不平衡的。

imshow(truecolor) title(“ TrueColor复合材料(非增强)”)文本(大小(TrueColor,2),大小(TrueColor,1)+15,...'Image courtesy of Space Imaging, LLC',,,,...'FontSize',7,'水平对齐',,,,'right'

图包含一个轴对象。The axes object with title Truecolor Composite (Un-Enhanced) contains 2 objects of type image, text.

Explore Histogram and Scatterplot of Un-Enhanced Truecolor Composite

By viewing a histogram of the red band, for example, you can see that the data is concentrated within a small part of the available dynamic range. This is one reason why the truecolor composite appears dull.

imhist(truecolor(:,:,1)) title('Histogram of the Red Band (Band 3)'

图包含2个轴对象。轴对象1带有红色带的标题直方图(带3)包含类型词干对象。轴对象2包含2个类型图像的对象。

Another reason for the dull appearance of the composite is that the visible bands are highly correlated with each other. Two- and three-band scatterplots are an excellent way to gauge the degree of correlation among spectral bands. You can make them easily just by using情节。The linear trend of the red-green-blue scatterplot indicates that the visible bands are highly correlated. This helps explain the monochromatic look of the un-enhanced truecolor composite.

r = truecolor(:,:,1); g = truecolor(:,:,2); b = truecolor(:,:,3); plot3(r(:),g(:),b(:),'。')grid('上')xlabel('Red (Band 3)')ylabel('Green (Band 2)')zlabel('Blue (Band 1)')title(“可见带的散点图”

图包含一个轴对象。具有可见频段的标题散点图的轴对象包含一个类型线的对象。

加强真彩Composite with Contrast Stretch

当您使用时imadjust为了将线性对比度拉伸到TrueColor复合图像,表面特征易于识别。

stretched_truecolor = imadjust(truecolor,stretchlim(truecolor)); imshow(stretched_truecolor) title(“对比度拉伸后的TrueColor复合材料”

图包含一个轴对象。对比度拉伸后带有标题TrueColor复合材料的轴对象包含类型图像的对象。

Check Histogram Following the Contrast Stretch

A histogram of the red band after applying a contrast stretch shows that the data has been spread over much more of the available dynamic range. Create a histogram of all red pixel values in the image by using theimhist功能。

imhist(stretched_truecolor(:,:,1)) title('Histogram of Red Band (Band 3) after Contrast Stretch'

图包含2个轴对象。轴对面的红色波段的标题直方图(带3)对比度对比弹拉伸展后包含一个类型词干对象。轴对象2包含2个类型图像的对象。

增强truecolor复合材料,并具有去相关拉伸

增强TrueColor复合材料的另一种方法是使用去相关的拉伸,从而增强了跨高度相关通道的颜色分离。利用decorrstretchto perform the decorrelation stretch. Specify the optional name-value pair'Tol',0.112月后执行一个线性对比度拉伸orrelation stretch. Again, surface features have become much more clearly visible, but in a different way. The spectral differences across the scene have been exaggerated. A noticeable example is the area of green on the left edge, which appears black in the contrast-stretched composite. This green area is the Bois de Boulogne, a large park on the western edge of Paris.

deorrstretched_truecolor = deorrstretch(trueColor,,'Tol',0.01);imshow(decorrstretched_truecolor) title(“去相关拉伸后的truecolor复合材料”

图包含一个轴对象。去相关拉伸后带有标题TrueColor复合材料的轴对象包含类型图像的对象。

检查去相关后的相关性

正如预期的那样,去相关拉伸后的一个散点图显示相关性强烈下降。

r = dearrstretched_truecolor(:,::,1);g = decrstretched_truecolor(:,::,2);b = deorrstretched_truecolor(:,::,3);plot3(r(:),g(:),b(:),,,'。')grid('上')xlabel('Red (Band 3)')ylabel('Green (Band 2)')zlabel('Blue (Band 1)')title('Scatterplot of the Visible Bands after Decorrelation Stretch'

图包含一个轴对象。去相关拉伸后具有可见频段标题散点图的轴对象包含一个类型线的对象。

创建和增强CIR复合材料

Just as with the visible bands, information from Landsat bands covering non-visible portions of the spectrum can be viewed by constructing and enhancing RGB composite images. The near infrared (NIR) band (Band 4) is important because of the high reflectance of chlorophyll in this part of the spectrum. It is even more useful when combined with visible red and green (Bands 3 and 2, respectively) to form a color infrared (CIR) composite image. Color infrared (CIR) composites are commonly used to identify vegetation or assess its state of growth and/or health.

Construct a CIR composite by reading from the original LAN file and composing an RGB image that maps bands 4, 3, and 2 to red, green, and blue, respectively.

CIR = multibandread('paris.lan',,,,[512, 512, 7],'uint8=>uint8',,,,...128,'bil',,,,'ieee-le',,,,{'Band',,,,'Direct',,,,[4 3 2]});

即使近红外(NIR)频段(频段4)与可见的频段的相关性不如彼此相比,但脱机延伸也使许多功能更容易看到。颜色红外复合材料的特性是它们在植被(叶绿素)密度高的区域看起来是红色的。请注意,Bois de Boulogne Park在CIR复合材料中是红色的,这与其在解相关的TrueColor复合材料中的绿色外观一致。

拉伸_cir = deorrstretch(cir,'Tol',0.01);imshow(straveed_cir)标题(“去相关后的CIR”

图包含一个轴对象。去相关拉伸后带有标题CIR的轴对象包含类型图像的对象。

也可以看看

|||||

Related Topics