24
Combining Rasters page 1 Tutorial with TNTmips ® Combining Rasters C O M B O R A S T E R S

Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

  • Upload
    dophuc

  • View
    230

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 1

Tutorial

with

TNTmips®

CombiningRasters

COMBO

RASTERS

Page 2: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 2

Before Getting StartedThis booklet introduces the Raster Combination operations available in TNTmips®.These operations allow you to apply mathematical or logical expressions tocombine or transform a set of two or more raster objects, or to derive alteredvalues from a single raster object. Raster combination operations can serve awide variety of purposes in the preparation, processing, and analysis of rasterdata.

Prerequisite Skills This booklet assumes that you have completed the exercisesin the tutorials Displaying Geospatial Data and TNT Product Concepts. Thoseexercises introduce essential skills and basic techniques that are not coveredagain here. Please consult those booklets for any review you need. You shoulduse the Display Process (Main / Display) to view the input and output objects forthese exercises.

Sample Data The exercises presented in this booklet use sample data that isdistributed with the TNT products. If you do not have access to a TNT productsDVD, you can download the data from MicroImages’ web site. In particular, thisbooklet uses sample files in the COMBRAST data collection.

More Documentation This booklet is intended only as an introduction tocombining raster images. Details of the processes described here can be found ina variety of tutorial booklets, Techical Guides, and Quick Guides, which are allavailable from MicroImages’ web site.

TNTmips® Pro and TNTmips Free TNTmips (the Map and Image ProcessingSystem) comes in three versions: the professional version of TNTmips (TNTmipsPro), the low-cost TNTmips Basic version, and the TNTmips Free version. Allversions run exactly the same code from the TNT products DVD and have nearlythe same features. If you did not purchase the professional version (which requiresa software license key) or TNTmips Basic, then TNTmips operates in TNTmipsFree mode. All the exercises can be completed in TNTmips Free using the samplegeodata provided.

Randall B. Smith, Ph.D., 21 April 2011©MicroImages, Inc., 1997-2011

You can print or read this booklet in color from MicroImages’ web site. Theweb site is also your source for the newest Getting Started booklets on othertopics. You can download an installation guide, sample data, and the latestversion of TNTmips Free.

http://www.microimages.com

Page 3: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 3

Pages 4-7 introduce theMultiresolution Fusion pro-cess for pan-sharpening andthe Automatic Combinationprocess. The exercises onpages 8-11 sample severalof the Predefined RasterCombination operations, witha focus on computing indexvalues. Page 12 introducesthe Principal Componentstransformation for reducingthe dimensionality of rastersets. The DecorrelationStretch process for enhanc-ing multiraster datasets isdiscussed on page 13.Pages 14-19 lead youthrough the task of repairinga data dropout in one rasterof a multiband set. Pages 20-22 demonstrate key steps innormalizing multitemporaldatasets.

Welcome to Combining RastersThe Raster Combination operations in TNTmips(available on the Image / Combine menu cascade)provide a varied and powerful set of tools for cor-recting, enhancing, transforming, and analyzing ras-ter data. Most of the operations require a set ofraster objects that are coregistered (have the sameline and column dimensions, geographic extents, andcell size). Each raster object in the set is used as avariable in a mathematical or logical expression,which is applied on a cell-by-cell basis to the inputraster values to produce a new set of output rasters.Other operations use mathematical or logical func-tions to derive new values from a single input raster.

Many of the Raster Combination procedures aredesigned for processing and enhancing multispec-tral imagery (scanned color-infrared airphotos,frame-grabbed aerial video, or satellite imagery). Theexercises in this booklet are organized into groupsthat illustrate the steps in several common process-ing or analysis tasks. These tasks include creatingseveral types of index rasters, repairing a “data drop-out” in one band of a raster set, andprocessing scenes acquired on differentdates to correct for differences in illumina-tion conditions (image normalization). Byperforming these tasks you will become fa-miliar with many of the Raster Combinationoperations.

The exercises use a set of Landsat ThematicMapper (TM) scenes of cropland adjacentto the town of Hanford, California. The threescenes, acquired in April, June, and Octoberof 1993, have been georeferenced, resampledto the same projection, and trimmed to thesame raster size and geographic extents.

Landsat TM scene of Hanford, CAarea for April 27, 1993. TM band 5(middle infrared) is displayed as red,TM4 (near infrared) as green, andTM3 (red) as blue. Vegetated areasare indicated by green colors andbare soil by pink and magenta.

Page 4: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 4

STEPSchoose Image / Combine/ Multiresolution Fusionfrom the TNTmips menuin the MultiresolutionImage Fusion window,choose Panchromatic +RGB Composite from theType menupress[Select]in the Select Objectswindow choose PAN

from the ETM Project Filefor the Panchromaticraster and COMP as theColor raster and press[OK]choose Composite Colorfrom the Product menuon the Fusion tabbedpanelchoose Brovey from theMethod menuturn off theEnhancepanchromaticcontrast togglepress [Run], createa new Project FileFUSION, and acceptthe default outputraster name

Multiresolution Fusion (Pan-Sharpening)The Multiresolution Image Fusion process allowsyou to enhance the spatial resolution of amultispectral image (composite or separate bands)by combining it with a higher-resolutionpanchromatic (pan) band, a procedure commonlyreferred to as pan-sharpening. The multispectral andpan images must have matching spatial extents andthe cell size of the multispectral image must be aninteger multiple of the pan cell size.

The raster objects used in this exercise are extractsof a Landsat 7 image (cell sizes: 30-m multispectraland 15-m pan). The Landsat 7 panchromatic bandincludes green, red, and near-infrared wavelengths.These three multispectral bands were combined asblue, green, and red color components in the ColorConversion process (Raster / Combine / ConvertColor) with contrast-enhancement to form the color-infrared composite image that is used here.

Portion of the originalmultispectral image(left) and the pan-sharpened result(below).

NOTE: For best fusionresults, the composite colorimage (or set of separateRGB bands) should coverthe same spectral range asthe panchromatic imageband, as in this exercise.

Page 5: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 5

Enhance Pan Contrast in Image FusionSTEPS

turn on the Enhancepanchromatic contrasttoggle on the Fusionpanelset the Intensity Boostvalue to 1.20keep the default darkand bright cutoffpercentile values (1.0and 99.0, respectively)press [Run] and directthe output raster to theFUSION Project File

The fusion process uses raw panchromatic rastervalues, unmodified by any saved contrast table, tocreate the pan-sharpened product. However, theEnhance panchromatic contrast toggle on theFusion panel activates settings that can be used toapply mild contrast enhancement to the selectedpanchromatic raster during image fusion. You canset percentile values for dark and bright cutoffs toapply a linear contrast enhancement. The IntensityBoost setting is a multiplier applied to thepanchromatic values; boost settings greater than 1.0(the default is 1.30) result in brightening acrossthe whole range of panchromatic values. If youcannot achieve the desired brightness andcontrast in the pan-sharpened image by thesemeans, you may want to create a contrast tablefor the pan raster and use the Apply Contrastprocess (Raster / Filter / Apply Contrast) to createa new pan raster containing contrast-enhancedvalues for use in Multiresolution Fusion.

The Product menu on the Fusion tabbed panelallows you to choose the form of the pan-sharpenedproduct. When your source type is Panchromatic +RGB (either Composite or Separated), theproduct choices include Composite Colorand either 8-bit or 16-bit RGB separates (setof three grayscale rasters). The separateschoices allow you to apply additionalcontrast enhancement when you createRGB displays of the pan-sharpenedseparates. If you choose Unspecified forthe source type, you can select a pan rasterand three or more grayscale bands toproduce one sharpened output raster foreach intput grayscale raster.

Part of thepan-sharpenedimage with enhancedpanchromatic contrast

NOTE: when using RGB bands for the color input, raster values are notcontrast-adjusted by any saved contrast table. For best color in thePanchromatic + RGB Separates mode, use contrast-enhanced RGB bandsproduced by the Apply Contrast process.

Page 6: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 6

STEPSchoose IKONOS (Pan +MS) from the Type menuon the Source panelpress[Select]navigate to the IKX

Project File and selectPAN for Panchromatic, BL

for Blue, GL for Green, RL

for Red, and NA for NearInfraredturn on the toggle UseParis panchromaticspectral rangecorrectionon the Fusion panelchoose Natural Color(composite) from theProduct menuchoose Paris from theMethod menu

set the pancontrastsettings asshown in theillustrationpress [Run]and direct theresult to theFUSION ProjectFile

Calibrated Image FusionThe QuickBird and IKONOS satellites each provideblue, green, red, and near-infrared multispectralbands and a pan band that spans this entire spectralrange with four times the spatial resolution. TheMultiresolution Fusion process provides specially-designed pan-sharpening methods for these images.Use the Paris panchromatic spectral range correction(Source panel) and the Paris fusion method (Fusionpanel) to produce natural color or color-infrared pan-sharpened composites or RGB raster sets with theproper color balance, brightness, and spectralcalibration.

The Paris fusion method automatically incorporatespan contrast enhancement. It also includes theoption to increase the color saturation of the product(via the Saturation Boost setting) and to vary the

relative contributions of the two colormodels used to form the color fusionresult (via the Brightness vs Intensitysetting).

RGB display of IKONOS RL, GL,and BL bands (natural color).

Natural color result from fusionprocess.

Page 7: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 7

Automatic Raster Combination

Land use raster for 1986 Land use raster for 1995

CELLVALUES table forthe combination rastershowing combinations ofland use classes. Tablehas been sorted on theLC1986 field and isshown with row colorsinterleaved by group.

STEPSpress [Exit] on theMultiresolution ImageFusion wiindowselect Image / Combine /Automatic from theTNTmips menupress [Rasters] on theAutomatic RasterCombination windowselect rasters LC1986and LC1995 from theLCRAST Project Filepress [Run]

The Automatic Raster Combination process can beused to compare and analyze corresponding cellvalues in a set of two or more input rasters. Theprocess is best suited for sets of categorical rastersin which the raster values identify spatial classes ofsome type. The process tabulates all of thecombinations of input cell values for correspondingcell locations, then assigns each unique combinationto a distinct arbitrary cell value in a new combinationraster. An attached CELLVALUES table identifiesthe actual combinations: it has a record for each cellvalue in the combination raster and fields containingthe corresponding source raster cell valuesand the count of cells having thatcombination.

In this example the input rasters show landuse for an area for two different years; thevalues in each raster are 4-digit land use classcodes. Each source raster includes 62 classes,and the process finds 154 unique combinationsof these classes. The cell counts in theCELLVALUES table can be used to analyze theproportion of the area that experienced overall orparticular changes in land use.

The Transfer Colors option creates a set of color palettesfor the combination raster; each palette reproduces thedistribution of class colors for one source raster.

Page 8: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 8

When we study satellite images of the Earth’s surface,we often want to use the brightness values recordedby the sensor in various spectral bands todifferentiate and identify different kinds of surfacematerials. However, before you use satellite imageryin other Raster Combination operations, you shoulduse the Scale/Offset operation to subtract a pathradiance value from each band.

Path radiance is light scattered back to the satellitesensor by gas molecules and dust in the atmosphere.The scattered light adds to the brightness signalreceived from the Earth’s surface. The amount ofscattering (and thus the path radiance value) isgreatest for blue light (TM band 1) and decreaseswith wavelength, becoming almost negligible for thelonger middle-infrared wavelengths (TM band 7).Path radiance also varies between scenes taken ondifferent dates. Several techniques for estimatingpath radiance values are described by Sabins (1997,p. 261) and Jensen (1996, p. 116).

The Scale/Offset operation allows you to multiplyraster values by a scaling factor and to add separatepre-scaling and post-scaling offset values. Tosubtract a path radiance value, keep the Scale Factor

set to 1.00 and enter a negative offset value.

Path-radiance correctedbands for the Hanford TMscenes can be found in theHAN_PR Project File.

Result of subtracting 66 from eachcell in TM1_D27 to correct for pathradiance.

Select Scale/Offset fromthe Operationoption button.

This text fieldshows themathematicalexpressionused in theoperation.

Subtract the Path Radiance ValueSTEPS

choose Image / Combine/ Predefined from theTNTmips menuin the RasterCombination windowchoose Algebraic fromthe Type menuchoose Scale/Offsetfrom the Operation menupress [Rasters] and usethe standard File / ObjectSelection procedure toselect raster objectTM1_D27 from the APR27folder in the HAN_TM

Project Fileset the Post-ScaleOffset value to -66(negative)press [Run], create anew Project FileCOMBRAST, and accept thedefault output rastername

Page 9: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 9

STEPSin the RasterCombination windowselect Divide from theOperation option buttonpress [Rasters],navigate to the APR27folder in the HAN_PR

Project File, and selectobject TM4_D27_P for Aand TM3_D27_P for B

Compute a Band RatioA simple but very useful raster combination for mul-tispectral imagery is the ratio of one spectral bandto another. Use the Algebraic/Divide operation tocreate simple band-ratio images.

In an individual spectral band, identical surface ma-terials can have different brightness values fromplace to place because illumination varies with slopeangle, slope direction (aspect), and shadowing byadjacent features. Because these illuminationeffects have about the same magnitude re-gardless of wavelength, they tend to cancelout when one band is divided by another. Aband ratio image therefore emphasizes the in-herent properties of the surface materials. In agrayscale display of a ratio image, the darkestand lightest tones identify areas with the great-est difference in reflectance for the two spec-tral bands. Areas with similar reflectance ap-pear in intermediate gray tones.

Different band ratio combinations emphasizeparticular types of surface materials. The ratio ofnear-infrared (TM4) to red (TM3) is widely used asa vegetation index. Green vegetation exhibits a largeand unique difference in reflectance in these twobands, appearing bright in the near-infrared anddark in the red band. In a 4/3 ratio image theareas with a full plant canopy appear very bright,and the ratio value decreases as the proportionof plant cover to soil background decreases.

With 8-bit input rasters, the possible range ofoutput ratio values is 1/255 to 255 (excluding 0input values). Using the commonly availablemultispectral bands, useful ratio valuesgenerally range from 0.4 to 15.0. Use a floatingpoint (decimal value) raster format for theoutput to preserve the full range of ratio valueswithout requiring rescaling.

choose 32-bit floating-point from the OutputRaster Type menupress [Run] and directthe output raster to theCOMBRAST Project File

TM 4/3 ratio image for April Hanfordscene displayed with auto-normal-ized contrast enhancement. Brightareas show actively growing crops.

Page 10: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 10

Compute a Normalized Difference IndexSTEPS

in the RasterCombination windowchooseIndices from theType menu; theOperation menu defaultsto NDpress [Rasters],navigate to the JUN30folder in the HAN_PR

Project File, and selectraster object TM3_F30_P

for A and TM4_F30_P forBcheck that the ScaleFactor value is set to100press [Run] and directthe output raster to theCOMBRAST Project File

Simple band ratio images have several disadvantages.Sensor noise (which is usually specific to particularbands) is accentuated by the ratio calculation. Theratio result also includes both fractional values (A /B is less than 1 when A < B) and values greater than1 (for A > B). If these values are scaled to the 8-bitdata range (0 to 255) by multiplying by a constantscale factor, the lower range (for A < B) is com-pressed and the upper range is expanded.

The normalized difference index is a variant form ofratio calculation that alleviates these problems. Thedifference between corresponding raster values intwo spectral bands (B-A) is “normalized” by dividingby their sum (B+A). As with a simple band ratio,brightness variations due to topography are largely

eliminated. Output values can vary from -1to +1, so the data range is symmetricalaround 0 (B = A). This range is easily scaledto the 8-bit signed integer data range (-127to +128). The default scale factor of 100produces a possible range of output valuesof -100 to +100.

The Normalized Difference Vegetation In-dex (NDVI) is a widely used index for greenvegetation cover. It assigns the near-infra-red chan-nel to Band the

red channel to A.Higher values forNDVI (brightertones) indicate agreater proportionof ground cover bygreen vegetation.

Hanford NDVI image for June 30,1993. Bright tones indicate fieldswith actively growing crops.

TM 4/3 ratio and NDVI images for the Hanford TMscenes can be found in the HAN_INDX Project File.

The Indices procedures in-clude a number of genericoperations to extract bio-physical properties such asvegetation cover and soilbrightness from multispec-tral datasets.

Page 11: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 11

Compute TM Tasseled Cap IndicesSTEPS

in the RasterCombination windowchoose Indices - TMfrom the Type menu; theOperation menu defaultsto Tasseled Cap TMpress [Rasters],navigate to the OCT20folder in the HAN_PR

Project File, and selectobject TM1_J20_P forTM1,TM2_J20_P for TM2, andso on through TM7press [Run] and directthe output Greenness,Brightness, andWetness rasters to theCOMBRAST Project File

NDVI is a derived value that expresses the variationin a real biophysical property of the surface: the de-gree of cover by green vegetation. Another ap-proach to deriving index values is to project the spec-tral values from the full set of available bands to anew set of orthogonal coordinate axes in spectralspace. The new axes are chosen to correspond asclosely as possible to important biophysical proper-ties.

The Tasseled Cap transformation for the sixnonthermal Landsat TM bands (1-5 and 7) computesthree index values: Greenness (a vegetation index),Brightness (an index of soil brightness), and Wet-ness (an index of soil moisture content). Most ofthe variability in soil and vegetation conditions con-tained in the six TM bands is expressed inthese three dimensions. Each of the indices iscomputed cell by cell as a weighted sum (lin-ear combination) of the input band values.The computation has the form Index Value =aTM1 + bTM2 + ... + fTM7. The weightingcoefficients a through f are predefined for eachindex, and are shown in the expression panelof the Raster Combination window.

The Tasseled Cap transformation isnamed for the shape of the point distri-bution in a plot of Greenness versusBrightness for typical vegetated regions.

RGB display of Tasseled Cap index rasters forOctober Hanford scene with Brightness = Red,Greenness = Green, and Wetness = Blue. In-dex rasters for all dates can be found in theHAN_INDX Project File. Brightness

Gre

enne

ss

Page 12: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 12

Compute Principal ComponentsSTEPS

press [Exit] on theRaster Combinationwindowchoose Image / Combine/ Principal Componentsfrom the TNTmips menupress [Rasters] in thePrincipal Componentswindow, navigate to theAPR27 folder in the HAN_PR

Project File, and selectobjects TM1_D27_P

through TM7_D27_P

press [Run] and directthe six output principalcomponent rasters to theCOMBRAST Project Filepress [Exit] to close thePrincipal Componentswindow

The Principal Components process is another meansof transforming a set of spectral bands to derive areduced number of parameters (dimensional reduc-tion) and increase interpretability. Like the TasseledCap transformation, the Principal Components pro-cess maps each set of input raster values to a new setof orthogonal coordinate axes. However, the coef-ficients used in the Principal Components transfor-mation are derived from a statistical analysis of theinput rasters. The first principal component is thedirection of greatest spread (variance) in the data.The second component is the direction perpendicu-lar to the first with the next largest variance. Theother components are determined by the requirementof mutually perpendicular axes. This procedure pro-duces a set of uncorrelated output rasters.

First principal component image from the AprilHanford TM scene (see the HAN_PC Project File).For typical TM scenes, over 95 percent of thespectral variability in the six nonthermal bands isexpressed in the first three principal components.These derived rasters can be interpreted directlyor used as input for other processes, such asAutomatic Classification, in which the reduction inthe number of input rasters greatly speedsprocessing. Dimensional reduction is possiblewith common multispectral datasets becausecertain groups of spectral bands (visible lightbands, for example) show a high correlation intheir responses to similar surface materials.

Component statisticsare shown in a separatewindow, and can besaved as a text file.

Page 13: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 13

Apply Decorrelation StretchSTEPS

choose Image / Combine/ Decorrelation from theTNTmips menupress [Rasters] in theDecorrelation Stretchingwindow, navigate to theOCT20 folder in the HAN_PR

Project File, and selectobjects TM1_J20_P

through TM3_J20_P

press [Run] and directthe three output rastersto the COMBRAST ProjectFilepress [Exit] to close theDecorrelation Stretchingwindow

Hanford bands TM3, TM2, and TM1 for theOctober scene displayed as Red, Green,and Blue (respectively), providing a “naturalcolor” view of the scene.

Same band combination after decorrelationstretch. The increased saturation helpsdistinguish different crops (greens) anddifferent soil types or conditions (shades oforange, red, brown, and lavender).

Decorrelation stretching is a process that enhancesthe color display of highly correlated raster sets, suchas the first three Landsat Thematic Mapper bands.The process performs a principal components trans-formation on the set of input bands, applies a con-trast stretch to the components, then reverses thetransformation. When the output rasters are dis-played in RGB, hue and intensity are usually similarto the original image, but the color saturation isgreatly increased. This enhancement exaggeratesthe differences in spectral properties between sur-face materials to a greater degree than is possibleusing conventionalcontrast enhance-ment of the originalbands. As a result,you can more eas-ily discriminatesubtle variations insurface materialsusing the decor-related raster set.

You can choose from severalcontrast stretching methodson the Contrast option button.

You can use more thanthree input bands with thedecorrelation process, butit provides the greatest en-hancement for highlycorrelated bands.

Page 14: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 14

STEPSchoose Image / Combine/ Predefined from theTNTmips main menuin the RasterCombination windowchoose Logical from theType menu; theOperation menu defaultsto Thresholdpress [Rasters] andselect raster object TM2from the HAN_BD ProjectFilechange the ThresholdValue to 2choose Above Thresholdfrom the Output Whitemenupress [Run], create anew Project File HAN_BD1,and change the outputraster name to BD_MASK

[Exit] the RasterCombination process

Threshold a Raster to Create a Mask

Select Logical fromthe Type menu.

Threshold is thedefault Logicaloperation.

Select Above Threshold from the Output Whiteoption button to assign an output value of 1for input cell values greater than 2.

Raster object TM2 with areaof bad data values (0 and 1,displayed as black).

Change the Threshold Value to 2.0

This is the first of six exercises that lead you throughthe task of “repairing” an area of “bad data” in oneraster of a multiband set. A sensor or datatransmission malfunction can result in a loss of datafor part of an image band. The result is one or morelines in the raster that contain spurious values(sometimes called a data dropout). This conditionhas been simulated for these exercises by editingband TM2 in the June Hanford TM raster set.

The first step is to use the Logical Thresholdoperation to create a binary raster to mask the dropoutarea in later processes. The mask should have a rastervalue of 0 for each cell in the dropout and a value of1 for all other cells. The Threshold process uses asingle input raster value as a boundary to determinethe binary value of the output cells. You can chooseto output a value of 1 (white) for all input cell valuesbelow the threshold, or the inverse. In this casethere is a numeric break between the dropout values(0 and 1) and the smallest real data value (23), so athreshold value of 2 provides the necessaryseparation.

Page 15: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 15

STEPSchoose Image / Combine/ Multilinear Regressionfrom the TNTmips menupress the Rasters buttonin the MultilinearRegression window andselect raster objects TM1through TM7 from theHAN_BD Project Filepress [Input Mask] andselect the BD_MASK objectfrom the HAN_BD ProjectFilepress [Run]

Perform Multilinear Regression

Keep the Multilinear Regression andMultilinear Regression Results windowsopen for use in the next exercise.

You can set line and columnsampling intervals by enteringvalues in these text boxes.

Calculatedvalues areshown in theMul t i l inearRegressionR e s u l t swindow.

Now use the Multilinear Regression process todetermine the mathematical relationships betweenthe TM rasters in the HAN_BD Project File. In thenext exercise we will use these relationships topredict values for the dropout area in band TM2.

The Multilinear Regression process calculates aseries of linear regression equations for a set ofrasters. The analysis treats each input band in turnas the dependent variable, and the remaining bandsas independent variables. Each of the resultingequations identifies the linear combination ofremaining bands that best reproduces the rastervalues in the dependent band. The best fit isdetermined by minimizing the sum of the squareddeviations between the predicted values and the realvalues.

The regression relationships should be based onlyon the real data in each of the rasters. The spuriousvalues in TM2 should not influence the calculations.Therefore we use the mask produced in the previousexercise to eliminate the dropout area from thecalculations. If you were running the process on alarger set of input rasters, you could speed processingby using a subset of the cells to determine theregression equations. This subset is defined bysetting a sampling interval in the line andcolumn directions.

Options on the File menu allow you to save the regression resultsas an array file (for use in other processes) or as a text file.

Output rasters for each ofthe exercises in thissequence can be found inthe HAN_BD Project File. Youcan use these objects asinput for the next step, oruse the ones you place inyour HAN_BD1 output file.

Page 16: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 16

Predict Values from Regression ResultsSTEPS

in the MultilinearRegression Resultswindow, turn on theApply Mask to Outputand the Invert Masktoggle buttonschoose Predict from theOperation menuin the File / ObjectSelection window,highlight TM2 in theSelections listnavigate to the HAN_BD1Project File andpress the NewObject icon buttonaccept the default objectname (P_TM2) in the NewObject window andpress [OK]press [OK] on the File /Object Selectionwindow to beginprocessingwhen the processfinishes, choose Closefrom the File menu onthe MultilinearRegression Resultswindowclick [No] on the Verifywindow that asks if youwant to save the resultsclick [Exit] on theMultilinear Regressionwindow

Once the regression relationships have beencomputed, we can use the Predict operation tocalculate estimated values for any band from thevalues in the remaining rasters in the set. We needpredicted values only for TM2, so we assign anoutput raster only for this band; no other predictedrasters are computed.

Later we will want to merge the predicted TM2values for the dropout area with the real TM2 valuesfor the remainder of the image. The steps leading tothis merger are easier if predicted values are assignedonly to the dropout area, and another known valueto the remaining portion of the predicted TM2 raster.To do this we have the Predict operation apply thebad data mask to the output raster after predictedvalues are calculated. Since the mask contains 0values for cells in the dropout area and values of 1for remaining cells, we need to invert the mask forthis operation. Then the predicted values for thedropout area are multiplied by 1, and passedunchanged to the output raster, while other cells areassigned the default null value (255).

Output P_TM2 raster with predicted rastervalues for the dropout area. Masked areasare assigned a value of 255, but are shownin cyan in this illustration.

Choose Predict from the Operation menuto calculate a predicted TM2 raster.

Page 17: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 17

Use Replace All OperationSTEPS

choose Image / Combine/ Predefined from theTNTmips menuchoose Algebraic fromthe Type menuchoose Replace All fromthe Operation menupress [Rasters] andselect object P_TM2 fromthe HAN_BD Project Filechange the Lower Limitvalue and the Upper Limitvalue to 255press [Run], open theHAN_BD Project File, andchange the output rastername to P_TM2_0

Keep the RasterCombination window openfor the next exercise.

Output raster P_TM2_0, in which the raster value255 in the input has been replaced by the value0 (shown in yellow in this illustration).

The default Inside Range option replaces allinput values within the range of the Lower Limitand Upper Limit. In this case both limits areidentical, and only the value 255 is replaced.

In order to merge predicted and actual rasters mostsimply, the cells for which we have real data in rasterTM2 should have a value of 0 in the predicted raster.Unfortunately, the Predict operation assigned a valueof 255 to these cells. We can use the Replace Alloperation to remedy this situation.

The Replace All operation replaces a single inputvalue or range of values with another designatedvalue. In this case we replace the value 255 in theinput raster with 0. However, 255 was designatedas the null value in the raster produced by the Predictoperation in the previous exercise. Before cells withthis value can be processed in this exercise, it isnecessary to use the Project File Maintenanceprocess (Tools / Manage Project Files) to edit theobject information for the predicted TM2 raster andturn off the Has Null Value toggle button. (This hasalready been done for object P_TM2 in the HAN_BD

Project File.) PredictedValues Raster

P_TM2

255

Replace255

Predictedvalues

Output Raster

0

Keep the defaultvalue of 0.00 forthe Replace Withsetting.

Page 18: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 18

Multiply Rasters to Apply a MaskSTEPS

in the RasterCombination window,choose Multiply from theOperation menupress [Rasters] andselect objects TM2 andBD_MASK from the HAN_BD

Project Filepress [Run], open theHAN_BD1 Project File, andname the output rasterTM2_MASKED

Keep the Raster Combinationwindow open for the next exercise.

In previous exercises we used a binary mask raster(BD_MASK) to control the input and output of valuesin the Multilinear Regression process. Before wemerge the predicted raster values from the previousexercise with the real data values in raster TM2, weneed to make a masked version of the TM2 raster inwhich all values in the dropout area are set to 0.(Recall that the dropout area includes values of 0and 1). We can accomplish this by using the Multiplyoperation to multiply each value in TM2 by the

corresponding value in BD_MASK. Since themask has a value of 0 for all cells in thedropout area, the multiplication will produce0 values for the entire dropout area. Cellsoutside the dropout area have a mask valueof 1, so the multiplication passes the real datavalues to the output masked raster with nochange.

You can multiply any types of grayscaleraster object in the Multiply operation. Theoperation also includes a Scale Factor with adefault value of 1.00. If you multiply two ormore nonbinary rasters, you may need toadjust the Scale Factor to rescale the data to

fit the range of the selected output raster type, orselect an output raster type with higher bit-depth.

Output rasterTM2_MASKED. Allcell values in thedropout area havea value of 0.

TM-2

Data

Multiply by Mask

0 values

Noise

Output Raster

0

Mask

Data

1

Page 19: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 19

Add RastersSTEPS

choose Add from theOperation menu in theRaster Combinationwindowpress [Rasters] andselect objects P_TM2_0and TM2_MASKED from theHAN_BD Project Filepress [Run], open theHAN_BD1 Project File, andchange the output rastername to TM2_FIXED

Keep the Raster Combinationwindow open for the next exercise.

We can now use a final algebraic operation to mergethe masked TM2 raster (TM2_MASKED) with the rasterthat contains predicted values for the dropout area(P_TM2_0). The dropout area has 0 values inTM2_MASKED and predicted values in P_TM2_0.Conversely, the remaining area has real data valuesin TM2_MASKED and 0 values in P_TM2_0. So a simplecell-by-cell addition of raster values will merge thepredicted values for the dropout area with the realdata without changing any of the raster values.

The Add operation performs this cell-by-celladdition. You can input any number and typeof raster objects. There is no option toautomatically scale the result, however, so insome cases you may need to choose an outputraster type with greater bit-depth than theinput objects to ensure that output values donot exceed the range of the output raster type.(For an 8-bit output raster, any calculatedvalue greater than 255 is assigned a value of255).

Raster object TM2_FIXED, with predictedvalues for the dropout area merged with realvalues for the remaining portion of the raster.

PredictedTM2

MaskedTM2

0 Data+

Predictedvalues

0 values

Merged Real and Predicted Values

Page 20: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 20

Use Logical Range to Create a MaskSTEPS

choose Logical from theType menu in the RasterCombination windowchoose Range from theOperation menupress [Rasters],navigate to the APR27folder in the HAN_INDX

Project File, and selectobject NDVI

set the Lower Limitparameter value to -10,and the Upper Limit valueto 10press [Run] and directthe output raster to theCOMBRAST Project File

Mask raster produced by the Range operationdisplayed over the grayscale April NDVI raster.Zero values in the mask are displayed in green,identifying cells with brightness influenced byvegetation or wet conditions.

Satellite scenes of the same area acquired on differ-ent dates may have different brightness values foridentical surface materials because of varying sen-sor and illumination conditions. These variationscan complicate analysis and interpretation of a time-series of images. The next three exercises presentkey steps in adjusting (normalizing) the April andOctober Hanford TM scenes to match the condi-tions of the June scene.

First we use the Logical Range operation to create amask from the April NDVI raster. The Rangeoperation creates a binary raster with valuesdetermined by a continuous range of values in theinput raster. The input range is defined by LowerLimit and Upper Limit parameter values. In thisexercise the mask is designed to mask out cells whosebrightness is likely to change through time: vegetatedareas (high NDVI) and areas of water or wet soil(low NDVI). The Lower Limit value is chosen toseparate wet from dry conditions, and the UpperLimit value to separate nonvegetated and vegetatedcells. The operation assigns an output value of 1 foreach input cell with an NDVI value inside the

specified range.

NOTE: Determine limit val-ues in the Display process bycomparing the NDVI raster toan RGB display of TM 5-4-3,in which vegetated areas ap-pear green and wet areasappear dark blue. Some trial-and-error testing may be re-quired to find the best values.

Choose Inside Range fromthe Output White optionbutton to assign an outputvalue of 1 for input cellvalues within the range;choose Outside Range forthe opposite effect.

Page 21: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 21

Merge Masks using Logical ANDSTEPS

choose AND from theOperation menupress [Rasters] andselect objects PIF_D27,PIF_F30, and PIF_J20 fromthe PIF_MASK Project Filepress [Run] and directthe output raster to theCOMBRAST Project File

The mask created for the April scene in the previousexercise has a value of 1 for cells in nonvegetated,nonwet areas. We need to identify areas that remainin this state for all three image dates. Such areas(called pseudoinvariant features) have about thesame spectral properties in each scene and can there-fore be used to determine the brightness adjustmentsrequired to normalize the three scenes. Further in-formation on scene normalization usingpseudoinvariant features can be found in Jensen(1996, p. 116-121) and in Schott and others (1988).

We can use the Logical AND operation to create apseudoinvariant features mask (PIF mask) fromNDVI masks created for each date. The AND op-eration creates a binary raster from two or more in-put binary rasters. An output cell is assigned a valueof 1 only if the corresponding cell value in each in-put raster has a value of 1. The resulting PIF masktherefore has a value of 1 only for cells that werenonvegetated and nonwet on all three dates. ThePIF mask can be applied to each TM band using theMultiply operation (as in a previous exercise) to cre-ate a pseudoinvariant features raster set for each date.

PIF mask created by applying the LogicalAND operation to the three input masks.Values of 0 are shown in yellow, and 1 inblue. Only a small proportion of the cellsrepresent pseudoinvariant features.

The output pseudoinvariantfeatures mask is included asobject PIF_MASK in the PIF_MASK

Project File. Pseudoinvariantfeatures raster sets for eachdate can be found in theHAN_PIF Project File.

Keep the Raster Combination windowopen for the next exercise.

The Logical OR operationalso creates a binary rasterfrom two or more input binaryrasters. An output cell is as-signed a value of 1 if the cor-responding value in any ofthe input rasters is 1.

Page 22: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 22

The pseudoinvariant features in each TM band foreach date exhibit a range of brightness values. If wecompare the same band on two dates (TM1 for Apriland June, for example), there is a strong linearrelationship between the sets ofbrightness values. By using thepair of PIF-masked rasters in theMultilinear Regression process(discussed on page 15), we canderive linear regressionequations describing thisrelationship. The equation that expresses June valuesas a function of April values (displayed in theMultilinear Regression Results window) yields aconstant and a coefficient that can be used to adjustthe April TM1 values to match the June sceneconditions. (Each TM band pair yields a uniqueconstant and coefficient).

We use the Scale/Offset operation to rescale the AprilTM1 raster (path-radiance corrected) to match theJune scene. The coefficient from the June-Aprilregression equation is used as the Scale Factor, andthe constant as the Post-Scale Offset.

Apply Scale and OffsetSTEPS

choose Algebraic fromthe Type menu in theRaster CombinationwindowchooseScale/Offsetfrom the Operation menupress [Rasters],navigate to the APR27folder in the HAN_PR

Project File, and selectobject TM1_D27_P

set the Scale Factorparameter value to 1.279set the Post-ScaleOffset value to 0.08press [Run] and directthe output raster to theCOMBRAST Project File

Landsat TM scene for April normalized to Juneillumination conditions. RGB band assignmentsare TM5, TM4, and TM3, respectively.

Normalized versions of the Hanford TMscenes can be found in the HAN_NORM

Project File.

Before performing the linearregression, the Has NullValue option was turned off forrasters in the HAN_PIF ProjectFile. This includes the 0 val-ues in the calculation; thesevalues should be equivalenton different dates for bandswith path radiance correctionapplied.

TM1_D27_P

TM

1_F30

_P

Page 23: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 23

What Next?This booklet has provided a brief introduction to Raster Combination operationsin TNTmips. Although the exercises in this booklet focus on sample applicationsof Raster Combination operations to satellite imagery, there are many additionalapplications. These operations can be applied to any type of spatially-varyingnumerical data stored in raster form. For example, raster data on crop type, soilconditions, and past crop yield could be used to calculate required fertilizerapplication rates on a cell-by-cell basis for precision crop management. Rastervalues of soil erodibility, slope conditions, rainfall, and vegetative cover could beused as input to the Universal Soil Loss equation to calculate soil erosion rates.Raster combination operations can thus be very useful in spatial modeling andraster-based GIS analysis. You can also perform similar computations using rastersand attributed vector objects in the GeoFormula process, which is described inthe tutorial booklet Using Geospatial Formulas.

References

The following references are good places to start if you want additional informationon raster combination operations and their applications to remote sensing andspatial modeling:

Bonham-Carter, Graeme F. (1994). Geographic Information Systems forGeoscientists: Modelling with GIS. New York: Pergamon. 398 pp.

Burrough, P. A. (1986). Principles of Geographical Information Systems for LandResources Assessment. Chapter 5, Methods of Data Analysis and SpatialModelling. Oxford: Clarendon Press. pp. 81-102.

Jensen, John R. (1996). Introductory Digital Image Processing: a Remote SensingPerspective (2nd ed.). Chapter 6, Image Preprocessing: Radiometric andGeometric Correction, and Chapter 7, Image Enhancement. New York: JohnWiley and Sons. 316 pp.

Sabins, Floyd F. (1997). Remote Sensing: Principles and Interpretation (3rd ed.).Chapter 8, Digital Image Processing. New York: W. H. Freeman. 494 pp.

Schott, John R., Salvaggio, Carl, and Volchok, William J. (1988). RadiometricScene Normalization Using Pseudoinvariant Features. Remote Sensing ofEnvironment, 26, 1-16.

Page 24: Tutorial: Combining Rasters - gisteam.de · Combining Rasters page 1 Tutorial with ... or to derive altered ... Combining Rasters page 6 STEPS;choose IKONOS (Pan +

Combining Rasters

page 24

Advanced Software for Geospatial AnalysisCOMBO

RASTERS

MicroImages, Inc.11th Floor - Sharp Tower206 South 13th StreetLincoln, Nebraska 68508-2010 USA

Voice: (402) 477-9554 email: [email protected]: (402) 477-9559 internet: www.microimages.com

IndexAND (logical operation).........................21Add (algebraic operation)........................19automatic combination...........................7band ratio..........................................9,10brightness index......................................11contrast stretch.......................................13decorrelation stretch...............................13dimensional reduction.............................12divide (algebraic operation)........................9greenness index......................................11mask raster...............................14,16,18,20multilinear regression.........................15,16multiply (algebraic operation).................18multiresolution fusion..........................4-6NDVI................................................10,11,20,21

normalization of multidate images....3,20-22normalized difference index........................10pan-sharpening........................................4-6path radiance...............................................8pseudoinvariant features...........................21principal components transformation........12range (logical operation)............................20ratio index............................................9,10replace all (logical operation).....................17saturation...................................................13scale/offset (algebraic operation).............8,22tasseled cap indices................................11threshold (logical operation)......................14vegetation index....................................10,11wetness index........................................11

MicroImages, Inc. publishes a complete line of professional software for advanced geospatialdata visualization, analysis, and publishing. Contact us or visit our web site for detailed productinformation.

TNTmips Pro TNTmips Pro is a professional system for fully integrated GIS, imageanalysis, CAD, TIN, desktop cartography, and geospatial database management.

TNTmips Basic TNTmips Basic is a low-cost version of TNTmips for small projects.

TNTmips Free TNTmips Free is a free version of TNTmips for students and profession-als with small projects. You can download TNTmips Free from MicroImages’ web site.

TNTedit TNTedit provides interactive tools to create, georeference, and edit vector, image,CAD, TIN, and relational database project materials in a wide variety of formats.

TNTview TNTview has the same powerful display features as TNTmips and is perfect forthose who do not need the technical processing and preparation features of TNTmips.

TNTatlas TNTatlas lets you publish and distribute your spatial project materials on CD orDVD at low cost. TNTatlas CDs/DVDs can be used on any popular computing platform.