matlab提供的红外图像增强实例
- 格式:doc
- 大小:22.00 KB
- 文档页数:2
matlab里提供的TM图像增强实例:
View code for landsatdemoRun this demo
Landsat Color Composite
landsatdemo Landsat color composite demo.
This demo allows you to experiment with creating color composites from
Landsat Thematic Mapper data. Landsat data consists of 7 spectral bands
that each reveal different features of the region that is imaged. The
data is read into a 512-by-512-by-7 array. To create a color composite,
we form an RGB image by assigning spectral bands to red, green, and blue
intensities.
Try out some common color composites by clicking on the radio
buttons. The numbers in square brackets map the spectral bands to red,
green, and blue. The array [3 2 1] means band 3 will be shown as red
intensities, band 2 will be shown as blue intensities, and band 1 will
be shown as green intensities.
"True Color [3 2 1]" - shows what our eyes would see from an airplane.
"Near Infrared [4 3 2]" - shows vegetation as red, water as dark.
"Shortwave Infrared [7 4 3]" - shows changes due to moisture.
Click on "Custom Composite", and change the popup menus to create your own combinations of red, green, and blue.
Click on "Single Band Intensity" to see individual bands as gray
intensity images.
Try turning off "Saturation Stretch" by clicking on the checkbox. For
most Landsat data sets, saturation stretching is important. When
saturation stretching is turned on, the demo clips 2% of the pixels in
each band and does a linear contrast stretch before displaying the
image.
Try turning on "Decorrelation Stretch" by clicking on the checkbox.
This visual enhancement increases color separation by eliminating
correlation between channels, making subtle spectral differences
easier to recognize. If both "Saturation Stretch" and "Decorrelation
Stretch" are checked, the decorrelation stretch is followed by a
linear saturation stretch.
While the demo is running, you can bring the image and data into the workspace.
IMG = landsatdemo('getimage') brings the image into the workspace.
DA TA = landsatdemo('getdata') brings all 7 bands into the workspace.
Note
----
Permission to use Landsat TM data sets provided by Space Imaging, LLC, Denver, Colorado.
Example
-------
data = landsatdemo('getdata');
truecolor = data(:,:,[3 2 1]);
stretched = imadjust(truecolor,stretchlim(truecolor),[]);
imshow(truecolor), figure, imshow(stretched)
See also decorrstretch, imadjust, stretchlim, ipexlanstretch.
Run this demo