Professional Documents
Culture Documents
Orthorectification
Module User’s
Guide
ENVI Orthorectification Module
Version 4.7
December, 2009
Copyright © ITT Visual Information Solutions
All Rights Reserved
20OM47DOC
Restricted Rights Notice
The IDL®, IDL Advanced Math and Stats™, ENVI®, ENVI Zoom™, and ENVI® EX software programs and the accompanying procedures, functions, and
documentation described herein are sold under license agreement. Their use, duplication, and disclosure are subject to the restrictions stated in the license
agreement. ITT Visual Information Solutions reserves the right to make changes to this document at any time and without notice.
Limitation of Warranty
ITT Visual Information Solutions makes no warranties, either express or implied, as to any matter not expressly set forth in the license agreement, including
without limitation the condition of the software, merchantability, or fitness for any particular purpose.
ITT Visual Information Solutions shall not be liable for any direct, consequential, or other damages suffered by the Licensee or any others resulting from use
of the software packages or their documentation.
Permission to Reproduce this Manual
If you are a licensed user of these products, ITT Visual Information Solutions grants you a limited, nontransferable license to reproduce this particular
document provided such copies are for your use only and are not sold or distributed to third parties. All such copies must contain the title page and this notice
page in their entirety.
Export Control Information
This software and associated documentation are subject to U.S. export controls including the United States Export Administration Regulations. The recipient
is responsible for ensuring compliance with all applicable U.S. export control laws and regulations. These laws include restrictions on destinations, end users,
and end use.
Acknowledgments
ENVI® and IDL® are registered trademarks of ITT Corporation, registered in the United States Patent and Trademark Office. ION™, ION Script™, ION Java™, and ENVI
Zoom™ are trademarks of ITT Visual Information Solutions.
ESRI®, ArcGIS®, ArcView®, and ArcInfo® are registered trademarks of ESRI.
Portions of this work are Copyright © 2009 ESRI. All rights reserved.
PowerPoint® and Windows® are registered trademarks of Microsoft Corporation in the United States and/or other countries.
Macintosh® is a registered trademark of is a trademark of Apple Inc., registered in the U.S. and other countries.
UNIX® is a registered trademark of The Open Group.
Adobe Illustrator® and Adobe PDF® Print Engine are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Numerical Recipes™ is a trademark of Numerical Recipes Software. Numerical Recipes routines are used by permission.
GRG2™ is a trademark of Windward Technologies, Inc. The GRG2 software for nonlinear optimization is used by permission.
NCSA Hierarchical Data Format (HDF) Software Library and Utilities. Copyright © 1988-2001, The Board of Trustees of the University of Illinois. All rights reserved.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities. Copyright © 1998-2002, by the Board of Trustees of the University of Illinois. All rights reserved.
CDF Library. Copyright © 2002, National Space Science Data Center, NASA/Goddard Space Flight Center.
NetCDF Library. Copyright © 1993-1999, University Corporation for Atmospheric Research/Unidata.
HDF EOS Library. Copyright © 1996, Hughes and Applied Research Corporation.
SMACC. Copyright © 2000-2004, Spectral Sciences, Inc. and ITT Visual Information Solutions. All rights reserved.
This software is based in part on the work of the Independent JPEG Group.
Portions of this software are copyrighted by DataDirect Technologies, © 1991-2003.
BandMax®. Copyright © 2003, The Galileo Group Inc.
Portions of this computer program are copyright © 1995-2008 Celartem, Inc., doing business as LizardTech. All rights reserved. MrSID is protected by U.S. Patent No. 5,710,835.
Foreign Patents Pending.
Portions of this software were developed using Unisearch’s Kakadu software, for which ITT has a commercial license. Kakadu Software. Copyright © 2001. The University of New
South Wales, UNSW, Sydney NSW 2052, Australia, and Unisearch Ltd, Australia.
This product includes software developed by the Apache Software Foundation (www.apache.org/).
MODTRAN is licensed from the United States of America under U.S. Patent No. 5,315,513 and U.S. Patent No. 5,884,226.
QUAC and FLAASH are licensed from Spectral Sciences, Inc. under U.S. Patent No. 6,909,815 and U.S. Patent No. 7,046,859 B2.
Portions of this software are copyrighted by Merge Technologies Incorporated.
Support Vector Machine (SVM) is based on the LIBSVM library written by Chih-Chung Chang and Chih-Jen Lin (www.csie.ntu.edu.tw/~cjlin/libsvm), adapted by ITT Visual
Information Solutions for remote sensing image supervised classification purposes.
IDL Wavelet Toolkit Copyright © 2002, Christopher Torrence.
IMSL is a trademark of Visual Numerics, Inc. Copyright © 1970-2006 by Visual Numerics, Inc. All Rights Reserved.
Other trademarks and registered trademarks are the property of the respective trademark holders.
Contents
Chapter 1
Introduction ....................................................................................................... 5
Introduction to the ENVI Orthorectification Module ..................................................................... 6
Supported Image Formats ........................................................................................................ 6
The ENVI Orthorectification Module Workflow .................................................................. 10
Installing and Starting the ENVI Orthorectification Module ................................................. 11
Chapter 2
The ENVI Orthorectification Layout Manager ............................................... 13
Working with the ENVI Orthorectification Layout Manager ...................................................... 14
Location Bar ........................................................................................................................... 15
Layout View Area .................................................................................................................. 15
Identification Area ................................................................................................................. 16
Display Controls .................................................................................................................... 17
Chapter 3
Orthorectifying Images ................................................................................... 19
The ENVI Orthorectification Wizard ........................................................................................... 20
Common Wizard Tools .......................................................................................................... 20
Saving and Restoring Projects ............................................................................................... 20
Selecting Bands ...................................................................................................................... 21
Viewing the Project Summary ............................................................................................... 21
Selecting Input Images and DEMs ............................................................................................... 22
Starting the ENVI Orthorectification Module ....................................................................... 23
Collecting and Editing Ground Control Points ............................................................................. 25
Chapter 4
Programming ................................................................................................... 49
Chapter 5
Tips and Tricks for the ENVI Orthorectification Module .............................. 55
Tips and Tricks ............................................................................................................................. 56
Appendix A
Glossary ........................................................................................................... 59
Introduction to the ENVI Orthorectification Module ENVI Orthorectification Module User’s Guide
Chapter 1: Introduction 7
accompany the imagery, and the imagery must be in its native format, filename, and directory
structure, exactly as delivered by the data provider.
ENVI Orthorectification Module User’s Guide Introduction to the ENVI Orthorectification Module
8 Chapter 1: Introduction
Introduction to the ENVI Orthorectification Module ENVI Orthorectification Module User’s Guide
Chapter 1: Introduction 9
Lv103_pan/
put panchromatic data here
Lv103_rgb/
put RGB images here
Lv103_cir/
put CIR images here
ENVI Orthorectification Module User’s Guide Introduction to the ENVI Orthorectification Module
10 Chapter 1: Introduction
The ENVI Orthorectification Module Workflow ENVI Orthorectification Module User’s Guide
Chapter 1: Introduction 11
ENVI Orthorectification Module User’s Guide Installing and Starting the ENVI Orthorectification Module
12 Chapter 1: Introduction
Installing and Starting the ENVI Orthorectification Module ENVI Orthorectification Module User’s Guide
Chapter 2
The ENVI
Orthorectification Layout
Manager
Working with the ENVI Orthorectification Layout Manager ENVI Orthorectification Module User’s Guide
Chapter 2: The ENVI Orthorectification Layout Manager 15
The dialog consists of three parts, as shown in Figure 2-1: Location Bar, Layout View Area,
Identification Area, and Display Controls. Each of these is described in the following
sections.
Location
Bar
Layout
View Area
Identification
Identification Area
Display
Controls
Location Bar
The Location Bar indicates the cursor position in meters for a UTM WGS-84 map projection.
ENVI Orthorectification Module User’s Guide Working with the ENVI Orthorectification Layout Manager
16 Chapter 2: The ENVI Orthorectification Layout Manager
images, the image boundaries are shown as white lines and filled with different colors to
visually show the image stack order.
Identification Area
The Identification Area lists the images and DEMs under the cursor location. Images are
listed in their stack order; the first listed image is at the top of the stack. Use the Layout View
Working with the ENVI Orthorectification Layout Manager ENVI Orthorectification Module User’s Guide
Chapter 2: The ENVI Orthorectification Layout Manager 17
Area and Identification Area to identify images, to verify the image stack order, and to ensure
that DEMs cover a spatial extent greater than the image area.
Display Controls
Use the check boxes in the Display Controls area to select which components of the
orthorectification process to view in the Layout View Area:
• Image: Bounding boxes for all input images (white)
• DEM: Bounding boxes for all input DEMs (red). By default, the Layout View Area is
set to the total image output area. If a DEM is significantly larger than this area, then
the DEM boundary is only visible if you zoom out. DEMs are not automatically
subsetted to the total image output area. If you use a global DEM, the Layout View
Area will not display its full spatial extent. A global DEM is shown with a bounding
box that is twice the size of the total image output area.
• GCP: Symbols representing locations of GCPs (yellow)
• GCP Labels: Labels identifying GCPs (red)
• Tie Point: Symbols representing locations of tie points (magenta)
• Tie Point Labels: Labels identifying tie points (purple)
• Cutline: Polygons representing cutlines (blue)
• Output Area: Polygon representing output area for the orthorectified output (yellow).
The default is the collective boundary of all input images.
• Residual Vectors: Vectors representing the magnitude and direction of errors in the
image plane at each GCP location (cyan). See “Evaluating Residual Errors in GCPs”
on page 30.
• Residual Image: A contour view of the overall residual error as a function of GCPs.
Red areas represent the highest error values, and blue-to-white values represent the
lowest values. The Residual Image option is not a recommended choice for viewing
the error magnitudes of GCPs that share the same map location or are very close to one
another. Use the Residual Vectors option and the Orthorectification Ground Control
Points List instead. See “Evaluating Residual Errors in GCPs” on page 30.
The RMSE field shows the root mean square error (RMSE) for the overall model.
To the right of the RMSE field is an area that lists the filenames of the input image and DEM
underlying the cursor location in the Layout View Area.
ENVI Orthorectification Module User’s Guide Working with the ENVI Orthorectification Layout Manager
18 Chapter 2: The ENVI Orthorectification Layout Manager
The Residual Exaggeration slider controls the relative magnitude of the residual vectors
when you select the Residual Vectors check box. The multiplication factor ranges from 1 to
10,000.
Working with the ENVI Orthorectification Layout Manager ENVI Orthorectification Module User’s Guide
Chapter 3
Orthorectifying Images
Button Description
Set the color for on/off GCPs, tie points, and cutlines.
Open a GCP or tie point file.
Save a GCP or tie point file.
If a multiband image is intially displayed as a grayscale image in
the display group, you can click the MB button in the ENVI
Orthorectification Wizard to display a multispectral image of
Bands 3, 2, and 1 as red, green, and blue, respectively. Click the
MB button again to display a grayscale image. This button is only
available for images with three or more bands. See “Selecting
Bands” on page 21.
Table 3-1:
2. Select an output location and filename, and click Save. ENVI saves the project state in
XML format. A file named *_envidata.xml contains any cutline polygons you
created (in original image space), and the state of the Layout Manager, including
GCPs, tie points, cutline color, auto tie point parameters, and GCP/tie point on/off
status. Do not modify this XML file or else the project will not restore correctly.
Follow these steps to restore a previously saved project. You can only restore a project during
Step 1 of the Wizard.
1. From the ENVI Orthorectification Wizard menu bar, select File → Restore Project.
The Select Project File dialog appears.
2. Select a project file (in XML format), and click Open. ENVI automatically opens all
input images, DEMs, GCPs, and tie points.
Selecting Bands
From the ENVI Orthorectification Wizard menu bar, select Options → Band Selection. The
Bands dialog appears. Use this dialog to change the default multi-band and single-band
display options. Band 1 is the default setting for single-band images. To change this setting,
enter a band number in the Single Band Number field. Bands 3, 2, and 1 are used by default
for red, green, and blue, respectively, in multi-band images. To change this setting, enter band
numbers in the Red, Green, and Blue fields.
Using this method ensures that band settings persist throughout the orthorectification
workflow. You can also change bands through ENVI’s Available Bands List, but the band
settings will not persist throughout the orthorectification workflow.
Selecting Input Images and DEMs ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 23
2. Click the button next to the Input Images section. The Select Input Files dialog
appears.
3. Click the Open drop-down button and select New File. A file selection dialog appears.
4. Select an input image. See “Introduction to the ENVI Orthorectification Module” on
page 6 for a list of supported image formats.
Note
For SPOT DIMAP files, select the .dim file.
Open KOMPSAT-2 and EROS Level-1A files by selecting File → Open External
ENVI Orthorectification Module User’s Guide Selecting Input Images and DEMs
24 Chapter 3: Orthorectifying Images
File → sensor type from the ENVI main menu bar, versus opening them from the
ENVI Orthorectification Wizard.
Selecting Input Images and DEMs ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 25
GCP elevations should be expressed in meters above mean sea level (orthometric height),
not as height above the ellipsoid.
ENVI Orthorectification Module User’s Guide Collecting and Editing Ground Control Points
26 Chapter 3: Orthorectifying Images
The controls in this step of the Wizard allow you to optionally restore GCP files, to add new
GCPs, and to edit existing GCPs. You may choose to bypass this step by clicking Next; the
orthorectified solution will be computed without GCPs in this case.
Collecting and Editing Ground Control Points ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 27
The header rows that say FileNamex refer to the input image filenames, where x is an index
number used to reference the filename throughout the rest of the GCP file. In the example
above, a line that begins with “1” indicates GCP data for the file image2.TIF, as indicated in
the header. If you ever change the mapped drive, you must remember to update the GCP file
headers.
If you are creating your own GCP file in a text editor or other application, you do not need to
include a full path to the image filenames (in the lines that begin with FileNamex) as long as
your filenames are unique. In cases where the filenames may be the same for all images (for
example, CARTOSAT-1 and SPOT data), you need to include the full path to each image file
in the FileNamex lines.
Note
Files in ENVI GCP format will not work with the ENVI Orthorectification Wizard; they
must be in the Rigorous Orthorectification GCP file format. The ENVI GCP file format is
described in the topic “ENVI ASCII Files” in ENVI Help.
Adding GCPs
Follow these steps to add new GCPs to an existing set, or to create a new set of GCPs.
1. A display group shows the image selected as the Active Image in the GCP Selection
panel. To change the image that is displayed, select a different image from the Active
Image list or Shift-click an image boundary in the Layout Manager to make that image
active. The active image is shown with a red border in the Layout Manager, and ENVI
will load the appropriate display group. (See “Changing the Image Stack Order” on
page 16.)
ENVI Orthorectification Module User’s Guide Collecting and Editing Ground Control Points
28 Chapter 3: Orthorectifying Images
2. In the Image window of the display group, position the red Zoom box over the area
where you want to add a new GCP.
3. In the Zoom window of the display group, click on a specific pixel to center the Zoom
window over that pixel or portion of that pixel.
The Image X/Y fields in the ENVI Orthorectification Wizard show the image
coordinates of the selected pixel underlying the crosshairs in the Zoom window.
Subpixel coordinates are supplied to provide higher accuracy in selecting GCPs.
Whole-number pixel coordinates correspond to the upper-left corner of the pixel. The
x,y values increase to the right and bottom of the pixel, respectively.
4. If your image is not already georeferenced, you can enter known map coordinates for
the GCP location into the E/N or Lat/Lon fields of the ENVI Orthorectification
Wizard. See “Selecting Map Projection Types” in the ENVI User’s Guide for
instructions on changing the projection.
• To enter map coordinates, select a map projection and datum. Click the toggle
button next to the map projection name to switch between E/N and Lat/Lon fields.
• Use negative (-) longitude for the western hemisphere and negative (-) latitude for
the southern hemisphere.
• To change the latitude and longitude values to decimal degrees, click DDEG. To
use degrees, minutes, and seconds, click DMS.
5. If your image is georeferenced, a recommended method is to use ENVI’s Pixel Locator
dialog to enter coordinates into the ENVI Orthorectification Wizard. From the Display
group menu bar, select Tools → Pixel Locator. The Pixel Locator dialog appears. The
Sample and Line values reflect the pixel location where the Zoom window is centered.
6. Set the correct map projection and datum (if needed) in the Pixel Locator dialog.
7. Click Export in the Pixel Locator dialog. The map coordinates are transferred to the
corresponding fields in the ENVI Orthorectification Wizard. (You do not need to
perform this step with the Image X/Y fields.)
8. Enter the elevation in meters above mean sea level for the point described by the
Lat/Lon (or E/N) values, into the Elev field of the ENVI Orthorectification Wizard.
9. Click Add Point in the ENVI Orthorectification Wizard to add the point to the GCP
list.
When you add a GCP, a marker is placed in the Layout View Area of the Layout
Manager and in the display group. The marker consists of an ID next to a + symbol and
indicates the selected pixel (or subpixel location). The center of the marker (located
under the + symbol) indicates the GCP location.
10. Add more GCPs as needed, using the same procedures.
When you enter at least three GCPs, the GCP list shows the residual errors for each GCP,
along with the RMSE for the entire model. While ENVI accepts as few as one GCP, it is
desirable to have four or more GCPs evenly distributed around each image. See “Evaluating
Residual Errors in GCPs” on page 30.
Collecting and Editing Ground Control Points ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 29
Editing GCPs
You can edit the location of a GCP by changing the map and/or image coordinates in the
ENVI Orthorectification Wizard.
To edit the location of a GCP in the ENVI Orthorectification Wizard, perform the following
steps:
1. Click Show List. The Orthorectification Ground Control Points List appears.
2. Click a row number to select a given GCP, or click in a table cell corresponding to a
GCP and click Goto. The display group centers over that GCP location, and the GCP is
highlighted in the Layout Manager. If the image that corresponds to the GCP is not
already displayed, ENVI loads the appropriate image into the display group.
3. Edit the E/N (or Lat/Lon), Image X/Y, and Elev values in the Orthorectification
Ground Control Points List. You can also use the Pixel Locator dialog to determine
map coordinates, as described in “Adding GCPs” on page 27.
4. Click Update in the Orthorectification Ground Control Points List. The changes are
reflected in the GCP list, display group, and the Layout Manager.
Removing GCPs
To remove any GCP from the table in the ENVI Orthorectification Wizard, select the row for
that GCP and click Delete. To remove all GCPs, select Options → Clear All Points from the
Orthorectification Ground Control Points List menu bar.
ENVI Orthorectification Module User’s Guide Collecting and Editing Ground Control Points
30 Chapter 3: Orthorectifying Images
Collecting and Editing Ground Control Points ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 31
in Figure 3-3. You should have at least three GCPs before enabling the Residual Vectors
option.
Figure 3-3: Error magnitudes and directions at each GCP location, indicated by arrows
Enable the Residual Image option in the Layout Manager to see a contour view of the
residual error magnitudes across the entire model. Red areas represent the highest errors, and
ENVI Orthorectification Module User’s Guide Collecting and Editing Ground Control Points
32 Chapter 3: Orthorectifying Images
blue-to-white areas represent the lowest errors. This area is restricted to the minimum
bounding rectangle of the GCPs.
Figure 3-4: Displaying the residual error magnitudes across the entire model, by
enabling the Residual Image option in the Layout Manager
Note
The accuracy of this plot is highly dependent on the distribution of GCPs. True errors may
not follow a trend, but this contour plot provides an alternative to the residual vector display.
Also, the Residual Image option is not a recommended choice for viewing the error
magnitudes of GCPs that share the same map location or are very close to one another. Use
the Residual Vectors option and Orthorectification Ground Control Points List instead.
Use the Residual Image option along with the Residual Vectors option, Residual
Exaggeration slider, and RMSE field to evaluate which GCPs have the highest residual
values. You can then correct or delete GCPs as needed to decrease the overall model error.
The Residual Image option does not become available until you have selected at least three
GCPs.
Collecting and Editing Ground Control Points ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 33
When you click Next in Step 2, the ENVI Orthorectification Wizard proceeds to the optional
Tie Point Selection panel (Step 3 of 5, Figure 3-5) if you selected more than one image for
input. Two display groups appear.
ENVI Orthorectification Module User’s Guide Collecting and Editing Tie Points
34 Chapter 3: Orthorectifying Images
The controls in this step of the wizard allow you to optionally restore tie point files, to add
new tie points, and to edit existing tie points. You may choose to bypass this step by clicking
Next. The orthorectified solution will be computed without tie points in this case.
Collecting and Editing Tie Points ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 35
The first five lines in this example contain header information that lists the image filenames
and the column labels.
The header rows that say FileNamex refer to the input image filenames, where x is an index
number used to reference the filename throughout the rest of the tie points file. In the example
above, “0” refers to image1.TIF and “1” refers to image2.TIF, as indicated in the header.
195.250000 and 370.250000 are the ImageX and ImageY values for image1.TIF.
6562.750000 and 398.250000 are the ImageX and ImageY values for image2.TIF.
If you are creating your own tie point file in a text editor or other application, you do not need
to include a full path to the image filenames (in the lines that begin with FileNamex) as long
as your filenames are unique. In cases where the filenames may be the same for all images
(for example, CARTOSAT-1 and SPOT data), you need to include the full path to each image
file in the FileNamex lines.
When you restore a tie point file, ENVI appends five new columns to the table displayed in
the Orthorectification Tie Points List: Correlation, RMSE, DX, DY, and Magnitude.
Correlation and RMSE are image-to-image error metrics that are used to estimate the quality
of a tie point match. These metrics are calculated for image chips that are the same size as the
moving window size and that are centered on the estimated tie point image coordinates. (See
Step 4 in “Automatically Generating Tie Points” on page 37 for a description of moving
window size and image chips).
DX, DY, and Magnitude show the difference (in meters) in model-predicted map coordinates
for the two tie-point image coordinates.
The image error metrics and image-to-ground difference metrics can be used to determine
potentially poor quality tie points.
ENVI Orthorectification Module User’s Guide Collecting and Editing Tie Points
36 Chapter 3: Orthorectifying Images
Collecting and Editing Tie Points ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 37
2. To generate tie points for all images where there is at least a 50% overlap in one
dimension (for example, along an image edge), enable the All Images and Majority
Overlap options, and click Auto Generate Points.
3. To generate tie points for all images, enable the All Images option only and click Auto
Generate Points.
4. An Auto Tie Points dialog shows the progress of generating tie points for each pair of
overlapping images, and the tie points are displayed in the Layout View Area of the
Layout Manager and in the ENVI display groups that show the active images.
5. Tie points are generated based on a default set of parameters. To change these
parameter values, select Options → Auto Tie Point Parameters from the ENVI
Orthorectification Wizard menu bar. The Generate Tie Points dialog appears. The
following parameters are used:
• Number of Tie Points: Specify the number of tie points to generate. This can be as
few as 1, but the recommended value is 6 (default setting).
• Search Window Size: Specify the search window size, in square pixels. The
search window is a defined subset of the image, within which the smaller moving
window scans to find a topographic feature match for a tie point placement. The
search window size can be any integer greater than or equal to 21, but it must be
larger than the Moving Window Size. The default is 101. This value depends upon
the accuracy of RPC information of the images, and it also depends on the
roughness of terrain.
• Moving Window Size: Specify the moving window size, in pixels. The moving
window scans methodically in the image subset area defined by the Search
Window Size, looking for matches to a topographic feature. The moving window
size must be an odd integer. The smallest allowable value is 5. The default is 31.
Using a larger value results in a more reliable tie point placement, but takes longer
processing time; conversely, a smaller value takes less processing time, but the tie
ENVI Orthorectification Module User’s Guide Collecting and Editing Tie Points
38 Chapter 3: Orthorectifying Images
points are less reliable. Determining a good moving window size largely depends
upon the image resolution and terrain type. Some general guidelines follow:
A. For a 10 meters or higher resolution image, use a range of 9–15.
B. For a 5–10 meter resolution image, use a range of 11–21.
C. For a 1–5 meter resolution image, use a range of 15–41.
D. For a 1 meter or less resolution image, use a range of 21–81 or higher.
E. Because most buildings in very high-resolution images in an urban area appear
similar, specify a larger value to take the surrounding area into account for more
robust matching results. To reduce the computational time for image matching,
ENVI automatically uses a hierarchical matching method when the moving
window size is greater than or equal to 19.
• Minimum Correlation: Specify a floating-point value for the minimum
correlation coefficient. Any matches with a correlation coefficient smaller than this
value are discarded. The default is 0.55.
• Chip Size: Specify an integer value for one side of a square image chip size for
finding the interest points in the base image. Larger values require more
computational time; however, the obtained tie points may be more useful. The
default is 128, meaning a 128 x 128 image chip size.
Collecting and Editing Tie Points ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 39
1. Scroll to the right until you see the Magnitude (m) column. From the
Orthorectification Tie Points List menu bar, select Options → Order Points by Error.
ENVI Orthorectification Module User’s Guide Collecting and Editing Tie Points
40 Chapter 3: Orthorectifying Images
Reordering Images and Defining Cutlines ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 41
Input Images and DEMs” on page 22). The image at the top of the list will be ordered first,
followed by the second image, and so forth. Image ordering only pertains to areas of overlap
between two or more images. Figure 3-7 shows an example:
Figure 3-7: Example output from three ordered images with no cutlines. Image 1 is on
top, and Image 3 is on the bottom.
Drawing Cutlines
Cutlines are polygons that are used in combination with image ordering to define areas that
you want to keep in the final output. They are typically used to hide seams in the final mosaic
or to exclude poor quality regions and instead use higher quality regions that are lower in the
image stack. A cutline is an inclusion polygon, similar to a cookie cutter applied to one or
more images. Cutlines are often defined by drawing a line along a geographic feature such as
ENVI Orthorectification Module User’s Guide Reordering Images and Defining Cutlines
42 Chapter 3: Orthorectifying Images
a river or street, and snapping to the nearest image edges or corners to define a polygon. The
following example shows a cutline for a single image.
Following is an example of applying a cutline to the first-order (top-most) image when you
have multiple images:
Reordering Images and Defining Cutlines ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 43
If you do not specify a cutline for a given image, ENVI uses the image frame by default. The
image frame is the area of usable data within an image, excluding any background pixels
(Figure 3-10).
A suggested method is to draw the cutline in the Scroll window of the display group
because you can see the entire image. However, if you need to more precisely draw a
ENVI Orthorectification Module User’s Guide Reordering Images and Defining Cutlines
44 Chapter 3: Orthorectifying Images
a. Click in the Scroll window to center the Image window over a specific location.
b. Add vertices (Alt-click) for your cutline in the Image window. When you reach the
edge of the Image window and need to continue the cutline, switch back to the Scroll
window and click once in a new location. The Image window will center over that
location, and you can continue adding vertices for the cutline.
c. Use Ctrl-click and Shift-click in the Scroll window to snap to the nearest edge and
corner, respectively. Right-click in the Scroll window to to close the cutline polygon.
4. To remove a cutline, select the cutline name from the Cutlines list and click the
button.
5. To change the default color of cutlines as they appear in the display group, click the Set
cutline color button . The Point Color dialog appears. Left-click to cycle through
various colors, or right-click to select a specific color.
6. If the active image is intially displayed as a grayscale image in the display group, you
can click the MB button in the ENVI Orthorectification Wizard to display a
multispectral image of Bands 3, 2, and 1. Click the MB button again to display a
grayscale image. See “Selecting Bands” on page 21.
7. Restoring a project during Step 4 (cutline selection) means that all GCPs and tie points
will be turned on by default. See “Saving and Restoring Projects” on page 20, “Turning
GCPs On and Off” on page 29, and “Turning Tie Points On and Off” on page 39 for
more information.
8. When you are done drawing cutlines, click Next in the ENVI Orthorectification
Wizard.
Reordering Images and Defining Cutlines ENVI Orthorectification Module User’s Guide
Chapter 3: Orthorectifying Images 45
Follow these steps to select an output filename, format, pixel size, and projection for the
orthorectified product, and to preview the result before creating an output file.
1. In the Enter Output Filename field, select an output location and rootname for the
output. ENVI will create a GeoTIFF file or band-interleaved-by-line (BIL) raster file in
ENVI format, along with an output summary text file that lists the data used in the
project.
2. From the File Format drop-down list, select GeoTIFF or ENVI for the output image.
3. Select the Auto Color Adjust option to perform automatic color and contrast
adjustment in the output mosaic. Spacemetric developed the underlying method, which
uses a least-squares adjustment to ensure radiometric consistency among the scenes
that comprise the mosaic. Results will vary when running the same workflow more
than once because the color adjustment is based on a randomized statistical calculation.
4. Enter an output pizel size in the Pixel Size (m) field, and press Enter. The projection
information in the Output Parameters panel updates to show your changes. Pixels in
orthorectified output are square, so this value is used for both the x and y dimensions of
the pixel. By default, the pixel size is set to the smallest pixel size of the input images.
The pixel size is always based on the initial UTM projection used in the workflow. A
larger pixel size will result in a lower resolution image with faster processing time,
while the default pizel size will result in the highest resolution image with slower
processing time.
5. Set the output projection as described in “Setting the Output Projection” on page 46.
6. The Preview button allows you to create a reduced-resolution version of the
orthorectified product so that you can look for potential problems before creating the
full-resolution product. When you click Preview, ENVI performs orthorectification,
creates the reduced-resolution mosaic, adds the mosaic to the Available Bands List, and
automatically loads it into a new display group. The reduced-resolution mosaic is
georeferenced to UTM WGS-84 and shows you the results of your cutline selection,
auto color adjustment (if you previously selected the Auto Color Adjust option), and
overall appearance of the final product. You can also use the reduced-resolution mosaic
to check geolocation accuracy of the orthorectified product before creating a full-
resolution version.
7. If you are satisfied with the preview results, you can choose to display the output by
selecting Display Result on Finish. When processing is complete (after you click
Finish), the ENVI Orthorectification Module closes and the orthorectified output
image loads into a new display group.
8. Click Finish to create the orthorectified product. The ENVI Orthorectification Module
closes.
The current output projection is shown at the top. The default projection in the example is
shown as follows:
UTM_Zone_13N
Datum: WGS-84
The UTM zone number will vary, depending on the geographic location.
By default, the initial projection pixel size is the same (when viewed in meters) as the pixel
size of the base output image. To change the projected pixel size and output number of pixels,
follow these steps:
1. Click Change Projection. The Convert Map Projection Parameters dialog appears.
2. The X/Y Pixel Size fields indicate the projected pixel size in the standard units of that
projection type. The Output X/Y Size fields indicate the output image size in pixels
(by default). Change these values as needed, and press Enter. For best results, the
projection pixel size should be greater than or equal to the base output pixel size. For
detailed instructions on using this dialog, see “Converting Map Projections” in the
ENVI User’s Guide.
3. Click OK in the Convert Map Projection Parameters dialog. The new projection
information is shown in the Post Processing Reprojection section.
4. To reset the orthorectified image to the default UTM projection and minimum pixel
size of the input images, click Reset Projection in the Output Parameters step.
ENVI_RIGOROUS_ORTHO_DOIT . . . . . 50
ENVI_RIGOROUS_ORTHO_DOIT
This procedure automates the ENVI Orthorectification Module workflow for programmers in
ENVI.
Syntax
See the “Syntax” heading in the Overview chapter of the ENVI Reference Guide for a
description of the syntax below.
ENVI_RIGOROUS_ORTHO_DOIT [, /AUTO_COLOR], DEM_FID=file IDs,
DEM_POS=array, FID=file IDs [, FILETYPE=string] [, GCPS=array],
OUT_NAME=string, PIXEL_SIZE=variable, R_FID=variable [, TIE_POINTS=array]
Keywords
AUTO_COLOR (optional)
Set this keyword to perform automatic color and contrast adjustment in the output mosaic.
See Step 3 in “Selecting Output Parameters” on page 45.
DEM_FID
Set this keyword to an array of one or more file IDs representing digital elevation model
(DEM) files. A file ID is a long-integer scalar with a value greater than 0. An invalid FID has
a value of -1. The FID is provided as a named variable by one of several ENVI routines used
to open or select an input file.
DEM_POS
Use this keyword to specify an array of band positions for the input DEM files, indicating the
band numbers to use. DEM_POS is an array of long integers, ranging from 0 to the number of
bands minus 1. Specify bands starting with zero (Band 1=0, Band 2=1, etc.). DEM_POS must
consist of the same number of array elements as DEM_FID.
FID
Set this keyword to an array of one or more file IDs representing the input images used for
orthorectification. The file ID (FID) is a long-integer scalar with a value greater than 0. An
invalid FID has a value of -1. The FID is provided as a named variable by one of several
ENVI routines used to open or select an input file.
The order of file IDs in the FID array determines the image stack order (see “Changing the
Image Stack Order” on page 16 and “Setting the Image Order” on page 40). For example, if
you want FID3 on top, FID1 in the middle, and FID2 on the bottom of the image stack for the
output mosaic, set FID as follows: FID= [fid3, fid1, fid2].
FILETYPE (optional)
Set this keyword to an ‘ENVI’ or ‘GeoTiff’ string to indicate the output file format.
GCPS (optional)
Set this keyword to a string scalar with the filename of a single ENVI Orthorectification GCP
file, or to a string array with the filenames of multiple GCP files.
OUT_NAME
Use this keyword to specify a string with the output filename for the resulting data.
PIXEL_SIZE
Use this keyword to specify the square pixel size. PIXEL_SIZE is a single, double-precision
variable that specifies the output square pixel size in meters.
R_FID
Set this keyword to a named variable containing the file ID to access the processed data.
Specifying this keyword saves you the step of opening the new file from disk.
TIE_POINTS (optional)
Set this keyword to a string scalar with the filename for a single ENVI Orthorectification tie
points file, or to a string array with the filenames of multiple tie points files.
Example
This example orthorectifies two QuickBird scenes of Phoenix, Arizona, USA, which are
available on the ENVI 4.7 Resource DVD. It demonstrates how to open the imagery, DEM,
GCP file, and tie points file. The output initially is in a UTM WGS-84 projection, but it will
be reprojected into a geographic coordinate system (latitude/longitude).
; FileName1=C:\workdata\05JUL11182931-M1BS-005606990010_01_P008.TIF
; projection info = {Geographic Lat/Lon, WGS-84, units=Degrees}
; ImageFile#, Map (x,y,elev), Image (x,y)
;
1 -112.004007 33.417396 311.083000 3569.000000
479.000000
1 -112.094899 33.385167 309.603000 245.000000
1861.000000
1 -112.038770 33.388203 316.788000 2263.000000
1788.000000
1 -112.074479 33.413951 296.985000 910.000000
621.000000
1 -111.978822 33.380607 336.632000 4521.000000
2143.000000
1 -111.930535 33.402122 327.582000 6332.000000
1181.000000
0 -111.894365 33.390883 333.140000 1279.000000
1631.000000
0 -111.900306 33.419145 329.810000 1058.000000
385.000000
Note
You may be prompted, “You are about to save the document in a Text-Only format,
which will remove all formatting. Are you sure you want to do this?” Click Yes.
7. Copy the following tie point information into a new file called phx_TIEs.pts, and
place it in your workdata directory.
; ENVI Rigorous Orthorectification TiePoint File
; FileName0=C:\workdata\05OCT09183407-M1BS-005606990010_01_P011.TIF
; FileName1=C:\workdata\05JUL11182931-M1BS-005606990010_01_P008.TIF
; Image1File#, Image2File#, Image1(ImageX, ImageY), Image2(ImageX,
ImageY)
;
1 0 6737.000000 511.750000 363.750000
480.000000
1 0 6860.250000 1997.750000 489.750000
1928.000000
1 0 6835.500000 3174.000000 471.750000
3073.500000
;Input data
inputimage1 = 'c:\workdata\05JUL11182931-M1BS-005606990010_01_P008.TIF'
inputimage2 = 'c:\workdata\05OCT09183407-M1BS-005606990010_01_P011.TIF'
inputdem = 'c:\workdata\phoenix_DEM_subset.tif'
inputgcps = 'c:\workdata\phx_GCPs.pts'
inputties= 'c:\workdata\phx_TIEs.pts'
;Loading Images and DEMs into ENVI and setting sensor type
; Open image 1
envi_open_data_file, inputimage1, /tiff, r_fid=fid1
sensor_type = envi_sensor_type('quickbird')
envi_change_head, fid1, sensor_type=sensor_type
; Open image 2
envi_open_data_file, inputimage2, /tiff, r_fid=fid2
sensor_type = envi_sensor_type('quickbird')
envi_change_head, fid2, sensor_type=sensor_type
end
The process will take several minutes to complete. Output will consist of the following files:
• Ortho_Output.tif: orthorectified base image in a UTM WGS-84 projection
• Ortho_Output_project_summary.txt: summary file listing data used in the
project
• If you do not specify a cutline for a given image, ENVI uses the image frame by
default. The image frame is the area of usable data within an image, excluding any
background pixels.
• Restoring a project during Step 3 (tie point selection) means that all GCPs will be
turned on but some tie points may still be turned off, depending on how you set them
before saving the project.
• You can set the image order in Step 4 of the worflow, or from the Layout Manager.
• Auto Color Adjust results (in Step 5 of the workflow) will vary when running the
same workflow more than once because the color adjustment is based on a randomized
statistical calculation.
• From the ENVI Orthorectification Wizard menu bar, select Options → View Project
Summary to review images, DEMs, GCPs, tie points, and cutlines currently used in
the project.
N 1⁄2
2
∑ ( en )
n=0
----------------------------
n
Where en is the error residual for the nth point and is the magnitude of the difference
between actual and projected ground locations (x,y,z).
In the ENVI Orthorectification Module, RMSE is measured in meters.
RPC Rational polynomial coefficients; used to build interior and exterior orientation in
photogrammetry.
tie points The location of a single feature across two or more overlapping images, used in
image-to-image registration.