Preview only show first 10 pages with watermark. For full document please download

Airphoto Mosaic Training Workbook

   EMBED


Share

Transcript

ER Mapper 6 Level One Training Workbook for Airphoto Mosaic Applications 19 November 1999 ER Mapper Helping people manage the earth Asia/Pacific : Europe, Africa and Middle Americas: East: Earth Resource Mapping Earth Resource Mapping Earth Resource Mapping Level 2 Blenheim House 4370 La Jolla Village Drive 87 Colin Street Crabtree Office Village Suite 900 West Perth Eversley Way, Egham San Diego, CA Western Australia 6005 Surrey, TW20 8RY, UK 92122-1253, USA Telephone:+61 8 9388-2900 Telephone: +44 1784 430-691 Telephone: +1 858 558-4709 Facsimile: +61 8 9388-2901 Facsimile: +44 1784 430-692 Facsimile: +1 858 558-2657 ER Mapper and ER Storage software and documentation is proprietary to Earth Resource Mapping Pty Ltd. Copyright © 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999 Earth Resource Mapping Pty Ltd All rights reserved. No part of this work covered by copyright hereon may be reproduced in any form or by any means - graphic, electronic, or mechanical including photocopying, recording, taping, or storage in an information retrieval system, without the prior written permission of the copyright owner. While every precaution has been taken in the preparation of this manual, we assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. PostScript is a registered trademark of Adobe Systems, Inc. Unix® is a registered trademark and OPEN LOOK™ is a trademark of AT & T. Windows 95, Windows 98 and Windows NT are trademarks of Microsoft Corp. ARC/INFO® and ArcView® are trademarks of Environmental Systems Research Institute, Inc. Autodesk World™, AutoCAD™ and AutoCAD MAP™ are trademarks of Autodesk, Inc. MapInfo™ is a trademark of Mapinfo Corporation. ORACLE™ is a trademark of Oracle Corporation. All other brand and product names are trademarks or registered trademarks of their respective owners. Summary Contents About this workbook xiii Part One - Airphoto Mosaic Applications 15 1 Airphoto mosaics and ER Mapper 17 2 User interface basics 29 3 Importing and viewing an image 49 4 Viewing an image in RGB 73 5 Image rectification 89 6 Image orthorectification 113 7 Assembling image mosaics 141 8 Color balancing images 157 9 Removing seam lines 177 10 Creating the final mosaic 195 11 Color balancing image mosaics 207 12 Composing maps 217 13 Compressing images 245 14 Exporting to GIS systems 253 ER Mapper Workbook - Airphoto Mosaic Applications v Summary Contents Part Two - Enterprise Wide Imagery 273 About this section 275 15 Enterprise Wide Imagery 277 16 Using ER Viewer 283 17 Office applications (OLE) 291 18 ArcView GIS Users 301 19 MapInfo Users 317 20 Autodesk World Users 335 A System setup 351 B Reference texts 353 Index 355 vi ER Mapper Workbook - Airphoto Mosaic Applications Table of Contents About this workbook xiii 1 Airphoto mosaics and ER Mapper 17 Overview of airphotos and applications 17 Types of airphotos 18 Digitizing (scanning) of airphotos 19 Creating airphoto mosaics 20 Image processing concepts 25 Traditional image processing 26 ER Mapper image processing 27 2 User interface basics 29 User interface components 29 Hands-on exercises 35 1: Using menus and toolbars 35 2: Opening windows and algorithms 38 3: Resizing windows and zooming/panning 39 4: Managing multiple image windows 44 3 Importing and viewing an image 49 About the algorithms concept 49 Hands-on exercises 53 ER Mapper Workbook - Airphoto Mosaic Applications vii Contents 1: Opening an airphoto image file 54 2: Displaying an image in greyscale 56 3: Selecting bands and adjusting contrast 59 4: Labelling and saving the algorithm 68 5: Reloading and viewing the algorithm 70 4 Viewing an image in RGB 73 About RGB color images 73 Hands-on exercises 74 1: Creating RGB algorithms 75 2: Working with algorithm layers 79 3: Loading, adding and changing layers 82 4: Labelling and saving the algorithm 87 5 Image rectification 89 About image rectification 89 Hands-on exercises 91 1: Setting up the raw and reference images 92 2: Picking the first four GCPs 95 3: Picking additional GCPs in the images 101 2: Perform the image rectification 106 3: Evaluating image registration 109 6 Image orthorectification 113 About orthorectification 113 Hands-on exercises 115 1: Orthorectify an airphoto using GCPs 115 2: Orthorectify an airphoto using Exterior Orientation 134 7 Assembling image mosaics 141 About assembling mosaics 141 Hands-on exercises 142 1: Creating a greyscale image mosaic 143 2: Creating mosaics automatically 149 2: Creating an RGB image mosaic 153 viii ER Mapper Workbook - Airphoto Mosaic Applications Contents 8 Color balancing images 157 About color balancing 157 Hands-on exercises 159 1: Using brightness shift formulas 160 2: Create a mosaic of balanced images 166 9 Removing seam lines 177 About regions and feathering 177 Hands-on exercises 180 1: Determining areas of overlap 181 2: Defining regions to constrain overlap 183 3: Feathering images within regions 189 10 Creating the final mosaic 195 About algorithms as templates 195 Hands-on exercises 196 1: Creating green and blue band mosaics 197 2: Creating the final RGB algorithm 201 11 Color balancing image mosaics 207 Hands-on exercises 207 1: Color balancing the mosaic 208 12 Composing maps 217 About map composition 217 Hands-on exercises 218 1: Setting up the page 219 2: Adding a clip mask around the image 224 3: Drawing vector annotation 227 4: Defining map objects 233 13 Compressing images 245 About ECW compression 245 Saving a compressed image to disk 246 14 Exporting to GIS systems 253 About use in GIS systems 253 Using compressed images in GIS systems 255 ER Mapper Workbook - Airphoto Mosaic Applications ix Contents Hands-on exercises 255 1: Defining an area of interest 256 2: Creating a UDF dataset 257 3: Creating a “.hdr” file for ESRI products 264 4: Saving a subset image to a TIFF file 266 About this section 275 Chapter contents 275 15 Enterprise Wide Imagery 277 Using imagery within your organization 277 Enterprise wide imagery 278 ER Mapper free imagery solutions 279 Using ER Mapper for imaging 279 ER Mapper image compression 280 Working with large images 281 16 Using ER Viewer 283 About ER Viewer 283 Hands-on exercises 284 1: Using ER Viewer to display images 284 17 Office applications (OLE) 291 What is OLE? 292 Sharing image files using OLE 292 Hands-on exercises 293 1: Using OLE to display images 294 18 ArcView GIS Users 301 About the ER Mapper Extension for ArcView GIS 301 Using the extension with ER Mapper 302 How to obtain the ER Mapper Imagery Extension 302 Hands-on exercises 303 1: Using the ER Mapper extension 303 19 MapInfo Users 317 About the MapImagery plug-in for MapInfo 317 How to obtain the free MapImagery plug-in 318 x ER Mapper Workbook - Airphoto Mosaic Applications Contents Hands-on exercises 318 1: Open an ER Mapper image file 319 2: Open ER Mapper algorithm files 322 3: Overlay MapInfo vector data 327 4: MapImagery settings and options 330 Table (.tab) files created by MapImagery 330 Algorithm (.alg) files created by MapImagery 330 Choosing map projection information 331 The Supersampling setting 332 Contrast enhancement options 332 20 Autodesk World Users 335 About Autodesk World’s ER Mapper image viewing engine 335 Using Autodesk World with ER Mapper 336 Hands-on exercises 336 1: Inserting an ER Mapper image 337 2: Inserting multiple coregistered images 341 3: Combining image and drawing data 346 A System setup 351 Windows installation of training datasets 351 B Reference texts 353 Index 355 ER Mapper Workbook - Airphoto Mosaic Applications xi Contents xii ER Mapper Workbook - Airphoto Mosaic Applications About this workbook This workbook is intended to get you started learning and using ER Mapper to create mosaics of digital aerial photographs. It provides simple step-by-step lessons that give you hands-on practice using the basic features of the software, and using more advanced features as well. Please read the following important information before beginning. • Chapter contents • Setting up practice datasets • Typographical conventions used in this document Note: The hands-on exercises in this workbook require that example airphoto datasets have been installed. These are included with ER Mapper 6. Please refer to Appendix A “System setup” in this manual for installation instructions. This manual is not intended to cover all ER Mapper functionality, and does not cover concepts of digital photogrammetry such as DEM generation. Please refer to the ER Mapper Tutorial and User Guide manuals for more detailed information as needed. (These are also accessable directly from the online help system.) ER Mapper Workbook - Airphoto Mosaic Applications xiii About this workbook Chapter contents The chapters in this manual give you extensive hands-on experience using the ER Mapper software through a series of specially designed lessons. Most lessons have two basic sections: • an overview of key concepts • a series of step-by-step hands-on exercises It is recommended that you start at the beginning and proceed through the chapters in order because the later chapters build on concepts learned in earlier ones. The emphasis of this manual is on learning and using the ER Mapper software, not on teaching image processing, airphoto interpretation, and other concepts. For more detailed information on the concepts or specific applications, please refer to Appendix B “Reference texts” in this manual. Setting up practice datasets The exercises in this manual assume that ER Mapper 6 is installed and licensed, and that the example airphoto datasets have been installed in an ‘airphoto_training’ directory. For information on configuring your system for these exercises, please refer to Appendix A “System setup” in this workbook. Typographical conventions The following typographical conventions are used throughout this document: • ER Mapper menus, button names and dialog box names are printed in boldface Helvetica type, for example: “Select Print from the File menu to open the Print dialog box.” • Where you are asked to click the mouse on an icon button in the user interface, both the button and its formal name are indicated in the text. For example: “Click on the Edit Transform limits • button.” Text to be typed in a dialog box text field is shown in boldface Courier typeface, for example: “Type RGB_airphoto_mosaic in the text field.” xiv ER Mapper Workbook - Airphoto Mosaic Applications Part One Airphoto Mosaic Applications 1 Airphoto mosaics and ER Mapper This chapter provides an overview of airphoto concepts and steps used for creating mosaics of digital airphotos. It also describes the basics of image processing and use of the ER Mapper software in assembling airphoto mosaics. Overview of airphotos and applications Aerial photography has been used for many years to create maps for a wide variety of applications. The first known aerial photograph was taken from a balloon over Biervre, France in 1858. Airphotos were used extensively for mapping during the first and second world wars, and for intelligence gathering during the cold war era. Aerial photographs are taken from an aircraft to capture a series of images using a large roll of special photographic film. The film is then processed and cut into negatives. The most common size for negatives is 9" x 9" (23cm x 23cm). The final scale of the aerial photograph depends on the height of the aircraft when the photo was taken. Aerial photographs are taken with an overlap between each one, to ensure that a final mosaic can be assembled. Airphotos are now being used extensively as basemaps for updating vector data that is stored and manipulated in GIS and DMS systems. Often it is necessary to create a mosaic of several airphotos to cover the desired area. Common uses and mapping applications for airphotos include: ER Mapper Workbook - Airphoto Mosaic Applications 17 Chapter 1#Airphoto mosaics and ER Mapper z Types of airphotos • land use/land cover mapping • urban and regional planning • environmental assessment • civil engineering • geologic and soil mapping • agricultural and forestry applications • water resource and wetland applications Types of airphotos There are generally four types of airphotos in common use, and these are created by using specific types of film in the camera: 18 • Panchromatic–often called black and white, is sensitive to the same range of light wavelengths as perceived by the human eye (the “visible” wavelengths blue, green and red spanning 0.4 to 0.7 micrometers). Panchromatic photos are most commonly used for planimetric and/or topographic mapping. Digitized black and white photos have a single band (layer of information), so they are usually displayed in greyscale on a computer. • Natural color–often called true color, is also sensitive to the same wavelengths of light as perceived by the human eye. Digitized natural color photos have three separate bands, one each for the blue (0.4-0.5 micrometers), green (0.5-0.6) and red (0.6-0.7) wavelengths of light. They are usually displayed using the RGB color system on a computer to recreate the same colors as on the photo print. Natural photos are commonly used for creating photo maps, or for mapping applications that require discrimination of the color of features. • Infrared–often shortened to “IR,” is sensitive to a range of wavelengths that includes the red, green and near infrared portions of the spectrum. The near infrared wavelengths (0.7-1.0) cannot be perceived by the human eye, so they provide information that beyond the human perception system. Like panchromatic, digitized IR images have a single band and are usually displayed in greyscale. • Color infrared–often called false color or shortened to “CIR,” was developed during World War II to aid camouflage detection. Digitized CIR images have three separate bands, one each for the green (0.5-0.6), red (0.6-0.7) and near infrared (0.71.0) wavelengths of light. Like natural color, they are usually displayed using the RGB color system to recreate the same colors as on the photo print. Vegetation usually appears red on these images, thus the term false color. CIR photos are commonly used for agricultural, forestry and wetland studies because the IR band provides valuable information on vegetation health, species and biomass. ER Mapper Workbook - Airphoto Mosaic Applications Chapter 1#Airphoto mosaics and ER Mapper#z Digitizing (scanning) of airphotos Digitizing (scanning) of airphotos In order for an aerial photograph to be processed in a computer, the photo must first be scanned or digitized to create a digital image file. The photo print or transparency is run through a scanner, a device that converts visible images to digital files. Many airphoto acquisition firms supply their photo data already converted to digital image format, but you may also want or need to scan the photos yourself. Two factors affect the resolution, or size of features that can be detected, in the digital image of the aerial photograph. These factors are: • The scale at which the aerial photograph was flown. This is based on aircraft altitude above ground and focal length of the camera during photo acquisition. • The Dots Per Inch (DPI) used to scan the aerial photo. This determines the size on the ground, in meters or feet, of one pixel on the digital aerial photograph, and approximately corresponds to the size of the smallest feature that can be detected. Use the following table to decide what scale aerial photography to use and what DPI resolution to use when scanning the photos. A pixel size of 1 meter is adequate for many applications. ER Mapper Workbook - Airphoto Mosaic Applications 19 Chapter 1#Airphoto mosaics and ER Mapper z Creating airphoto mosaics Photo scale: 10000 24000 40000 Km. across: 2.3 5.5 9.1 Scanned image file sizes: Pixel size in meters: # of pixels color B&W 150 dpi scan 1.7 4.1 6.8 1350 5 Mb 2 Mb 300 dpi scan 0.8 2.0 3.4 2700 21 Mb 7 Mb 600 dpi scan 0.4 1.0 1.7 5400 83 Mb 28 Mb 1200 dpi scan 0.2 0.5 0.8 10800 334 Mb 111 Mb 2400 dpi scan 0.1 0.3 0.4 21600 1335 Mb 445 Mb Ask your aerial photograph supplier if they can provide you the aerial photographs pre-scanned, on a CD-ROM, in ER Mapper or TIFF format. This will save you having to scan the photos yourself. Creating airphoto mosaics An airphoto mosaic is an assemblage of two or more overlapping photographs that form a composite view of the area covered by the individual photos. Typically the aircraft flies back and forth across an area acquiring a set of photos that overlap, then the photos are scanned, rectified and assembled into a mosaic. Aircraft flight while taking aerial photographs 20 Photo #1 Photo #2 Photo #6 Photo #5 ER Mapper Workbook - Airphoto Mosaic Applications Photo #4 Chapter 1#Airphoto mosaics and ER Mapper#z Creating airphoto mosaics The basic steps involved in creating a mosaic of airphotos are shown below. These steps are covered in detail in the exercises in this workbook. Digitize airphotos Scan (digitize) airphoto hardcopy prints or transparencies to create digital image files, or acquire digital format photos saved in image formats such as TIFF. Import digital airphotos Read digital airphoto image files stored on tape, CD-ROM, etc. and convert to ER Mapper image format (using ER Mapper import utilities) Initial image display & evaluation View image data on a CRT monitor to evaluate quality or areal coverage, or display statistical information such as histograms or cell values. Image rectification Geometrically correct (rectify or geocode) images to correspond to geodetic coordinate systems and map projections such as UTM, State Plane, etc. Image enhancement & correction Create mosaic of images Annotation & map composition Data export & hardcopy printing Digitally process individual images to aid visual interpretation, highlight specific features, or correct color/brightness shifts and imbalances. Assemble rectified, enhanced images into a mosaic, balance contrast across the mosaic, and apply techniques to minimize visible seam lines between adjacent images. Setup map size/scale, and annotate mosaic of images with text, lines, shaded polygons, legends, scale bars, coordinate grids and other map objects. Export all or part of processed mosaic to GIS and DMS software, or print subsetted images or annotated raster/vector maps to hardcopy devices or files. ER Mapper Workbook - Airphoto Mosaic Applications 21 Chapter 1#Airphoto mosaics and ER Mapper z Creating airphoto mosaics Data import The first step in creating an airphoto mosaic is importing the data you want to use into ER Mapper. Typically the data might be stored on magnetic tape, CD-ROM, or other media. There are two primary types of data you may want to import into ER Mapper: raster and vector. Raster image data is the type used as input to image processing operations, for example a digitized aerial photograph. When you import a raster image file (using ER Mapper’s import utility programs), ER Mapper converts the data and creates two files: • a binary data file containing the image data, in band interleaved by line (BIL) format • a corresponding ASCII header file with an “.ers” file extension Vector data is stored as lines, points, and polygons. Many geographic information system (GIS) products use vector data structures because it is more efficient for representing discrete spatial objects like roads (lines), sample locations (points), or political boundaries (polygons). In an image processing product, it is often helpful to use vector data as a source of ground control for rectifying raw airphotos, or overlaying vector data on top of a raster image backdrop. When you import a vector file (using ER Mapper’s import utility programs), ER Mapper converts the data and creates two files: • an ASCII data file containing the vector data • a corresponding ASCII header file with an “.erv” file extension Note: You can open image files in many different formats in ER Mapper without having to import them as ER Mapper raster datasets. Image display After importing the data, the next step is usually to display the image on your CRT monitor to evaluate the data quality, geographic area of coverage, and coverage of overlapping areas with other images used in a mosaic. If the data is of poor quality, you might decide to digitize the photos again. If it has significant cloud cover or haze over your area of interest, you might try to obtain better data. There are two primary ways airphotos are viewed: 22 • black and white, or greyscale, displays (used to view black and white airphotos or a single band of a color airphoto) • red-green-blue (RGB) color composite displays (used to view all three bands of a color or color IR airphoto to reproduce the look of the original print) ER Mapper Workbook - Airphoto Mosaic Applications Chapter 1#Airphoto mosaics and ER Mapper#z Creating airphoto mosaics The way in which you choose to display your raster data is called the “Color Mode” in ER Mapper. You can also view data in traditional two-dimensional planimetric views, or 3-D perspective views if you have an elevation dataset such as a DTM. In addition to displaying the data, you may want to view statistical information about it. Statistics are often good indicators of image quality. You may want to calculate statistics for the image, such as the mean value in each band, and view them in a tabular format. Or you may want to view statistical information in a graphical format using tools like histograms, scattergrams, and traverse profiles. Image geocoding Many times, raster image data is supplied in a “raw” state and contains geometric errors. Whenever accurate area, direction, and distance measurements are required, raw image data must usually be processed to remove geometric errors and/or rectify the image to a real world coordinate system. • Registration is the process of geometrically aligning two or more images to allow them to be superimposed or overlaid. • Rectification is the process of geometrically correcting raster images so they correspond to real world map projections and coordinate systems (such as Latitude/ Longitude or Eastings/Northings). • Orthorectification is a more accurate form of rectification mainly used on airphotos. It takes into account properties of the camera used to take the images, and fiducial marks on the image. If your application requires that your images be registered to one another or rectified to a map projection, you will use ER Mapper’s Geocoding Wizard to do this. Image enhancement and correction Image enhancement refers to any one of many types of image processing operations used to digitally process image data to aid visual interpretation, extract quantitative information, or correct color/brightness distortions. Image enhancement is what many people commonly think of as “image processing.” In ER Mapper, image enhancement operations are greatly simplified by the “algorithms” processing concept. Nearly all types of image enhancement operations can be applied and displayed in real time to provide truly interactive control without writing temporary files to disk. Typical image enhancement operations include: ER Mapper Workbook - Airphoto Mosaic Applications 23 Chapter 1#Airphoto mosaics and ER Mapper z Creating airphoto mosaics • Contrast enhancements–Improve image presentation by maximizing the contrast between light and dark portions (or high and low data values) in an image. Or, highlight a specific data range or spatial area in an image. • Formula processing–Apply mathematical operations to derive specific thematic information or correct/normalize color and brightness shifts across an image. An example would be the color balancing formulas to correct color shifts supplied with ER Mapper. • Filtering–Enhance edges, smooth noise, or highlight or suppress specific linear or spatial features in images. For example, apply edge enhancement filters to enhance detail (sharpen) the image or smoothing filters to reduce noise. • Image merging (data fusion)–Combine images with different qualities to aid interpretation. For example, merge a black and white airphoto with a multispectral satellite image to combine satellite spectral information with airphoto spatial detail. • 3-D perspective visualization–Create realistic 3-D perspective views simply by adding a “height” element to the airphoto image display, such as digital terrain/ elevation data or any other type of data that may aid visualization and interpretation. • Color balancing–Use the ER Mapper Color Balancing Wizard to balance mosaiced images to produce a seamless single image. Creating image mosaics A mosaic is an assemblage of two or more overlapping images used to create a continuous representation of the area covered by the images. ER Mapper automates the building of image mosaics because co-registered images referenced in the same processing algorithm are automatically displayed in their correct geographic positions relative to each other. This means that you can work with each image file in the mosaic as a separate entity, and you are not required to write all images to one large file on disk in order to process and enhance them. This capability is especially important when working with large image files such as scanned airphotos, because final mosaics can consume gigabytes of disk space if they would have to be saved in a single file. The ER Mapper Image Display and Mosaic Wizard automatically mosiacs images in a specified directory path. Map composition You can use ER Mapper’s built-in Annotation and Map Composition tools to create top quality maps combining airphoto images or mosaics, vector, and tabular data. Annotation lets you draw directly on-screen using text, line, polygon, and other annotation tools, and specify fill color, shading, line styles, user-defined symbols, and group, move and resize objects. Vector annotation files created in ER Mapper can also be exported to external file formats for use in other products. 24 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 1#Airphoto mosaics and ER Mapper#z Image processing concepts ER Mapper’s Map Composition tools let you create top quality image maps by adding coordinate grids, map collars, scale bars, legends, north arrows, and many other map objects and standard cartographic symbols. You can layout and compose maps comprised of multiple processed images, and size and scale map output as desired. All map objects are defined as full color PostScript, and you can easily add custom map objects such as company logos or special north arrows. Data export and hardcopy Once you have completed processing your data, ER Mapper lets you translate raster and vector data to external standard file formats or print to over 200 different hardcopy devices. You can easily print both 2-D planimetric and 3-D perspective views. • ECW Compression enables you to save your imagery in compressed format for use in other applications. • Data export is used to export all or part of a processed airphoto mosaic for use in other software products, such as a backdrop for a GIS or DMS (desktop mapping system) product. Or, you may want export vector annotation or vectorized thematic data to a GIS product. • Free plug-ins enable you to open ER Mapper images, including ECW compressed images, from within many GIS products. • Hardcopy printing is often the final goal of processing and annotating images, and ER Mapper provides unsurpassed hardcopy support and output to standard graphics file formats. ER Mapper also includes a built-in PostScript-compatible rendering engine, so you get PostScript-quality output (such as beautiful, smooth text) on any supported device, whether the device supports PostScript or not. You can also easily print at exact sizes and map scales, and automatically print large images in strips for assembling a mosaic of prints. Supported hardcopy devices include inkjet printers, laser printers, dye sublimation printers, electrostatic plotters, and film recorders. Graphics file formats include PostScript, TIFF, Targa, CGM, and CMYK and RGB color separations. Image processing concepts The term digital image processing refers to the use of a computer to manipulate image data stored in a digital format. The goal of image processing for earth science applications is to enhance geographic data to make it more meaningful to the user, extract quantitative information, and solve problems. A digital image is stored as a two-dimensional array (or grid) of small areas called pixels (picture elements), and each pixel corresponds spatially to an area on the earth’s surface. This array or grid structure is also called a raster, so image data is ER Mapper Workbook - Airphoto Mosaic Applications 25 Chapter 1#Airphoto mosaics and ER Mapper z Traditional image processing often referred to as raster data. The raster data is arranged in horizontal rows called lines, and vertical columns called samples. Each pixel in the image raster is represented by a digital number (or DN). columns (samples) rows (lines) 110 81 57 87 61 42 69 44 31 raster image displayed as grey levels (lower values displayed as dark greys) enlarged view showing individual cells or pixels and their corresponding DNs For digitized airphotos, the DNs represent the intensity of reflected light in the visible, infrared, or other wavelengths of the electro-magnetic spectrum. By applying mathematical transformations to the digital numbers, ER Mapper can enhance image data to highlight and extract very subtle information that would be impossible using traditional manual interpretation techniques. Black and white airphotos capture reflectance of ground features in a single range of wavelengths, for example visible red/green or infrared (IR). Color airphotos have three bands (or layers) of data covering the same geographic area, each capturing reflectance of a different wavelength of light. A natural color airphoto, for example, has three bands of data that record reflectance from the earth’s surface in the red, green and blue wavelengths of light respectively. Traditional image processing Image processing was first developed on large mainframe computers in the 1960’s to process images from planetary satellites. To process an image, you specified the name of the file to process, the type of operation you wanted to perform, then 26 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 1#Airphoto mosaics and ER Mapper#z ER Mapper image processing waited for the system to process the data and write the results to a new image file on disk (shown in the diagram below). You then used a separate display program to view the output file and evaluate your results. Input file Single image processing operation Output file With traditional systems, the changes resulting from the image processing operation are saved in a separate output raster file. With the introduction of powerful workstations in the 1980’s, processing of large images could now be performed on the desktop. Surprisingly, nearly all image processing products on the market today are still designed around this “disk-to-disk” approach from the 1960’s. This means that to perform a processing operation that requires several steps, you need to write an intermediate file to disk for each step. Only when the final file is created can you view your desired results. Since digitized airphotos typically have large file sizes (up to hundreds of megabytes), this approach can consume tremendous amounts of time and disk space, and if the result is not what you intended, you must often start all over again. ER Mapper image processing Recognizing the restrictions inherent in traditional image processing software, the creators of ER Mapper developed an entirely new approach. Instead of writing a file to disk for each processing step, ER Mapper lets you combine many processing operations into a single step, and render the results directly to your screen display in near real-time. (In most cases, no processed copies of your original data are written to disk unless you request to do so.) The set of processing steps you apply to your data is called an “algorithm” in ER Mapper. Input file Processing algorithm: - formulas (corrections, etc.) - filters (sharpen, edges,) - contrast & brightness - seam feathering, etc... Image display With ER Mapper, you save only a description of the processing steps you wish to apply to the data (the algorithm), not separate processed copies of the original raster data file. By storing the processing steps separately from the actual data, image processing becomes faster, easier to learn, and more interactive. ER Mapper Workbook - Airphoto Mosaic Applications 27 Chapter 1#Airphoto mosaics and ER Mapper z ER Mapper image processing In ER Mapper, algorithms can be used for simple viewing of data such as greyscale or RGB band combinations. Algorithms are also used for complex processing and modelling operations involving many images, transformations of the data, and overlays of vector data–in both 2-D planimetric and 3-D perspective views. The algorithms design also allows ER Mapper to easily handle very large airphoto images (and mosaics of images) much more efficiently than traditional systems. Reducing the need to write processed copies of the data to disk is a very important consideration. 28 ER Mapper Workbook - Airphoto Mosaic Applications 2 User interface basics This chapter introduces the basic use of the ER Mapper graphical user interface. It gives you practice using menus, toolbars, dialog boxes, and image windows, and loading and displaying image processing algorithms. Note: In order to complete the exercises in this manual, you will need to access the example images and algorithms supplied with ER Mapper. If needed, ask your system manager for the location of the ER Mapper software directory at your site. User interface components This section provides a brief introduction to the main components of ER Mapper’s graphical user interface (GUI). You can perform nearly all operations by pointing and clicking with the mouse, and very little typing on the keyboard is required. The GUI is part of ER Mapper’s original design, so it is well integrated and easy to learn and use. ER Mapper Workbook - Airphoto Mosaic Applications 29 Chapter 2#User interface basics#z User interface components Using mouse buttons When using ER Mapper, use the left button on your mouse to perform operations like selecting items from menus, manipulating image windows, and drawing annotation. In this manual, all actions are performed with the left mouse button unless otherwise indicated. The following table explains terms used in this manual to describe actions you perform with the mouse. Term Meaning Point Position the mouse pointer on an item. Click Point to an item, then quickly push and release the left mouse button. Right-click Point to an item, then quickly push and release the right mouse button. Double-click Point to an item, then quickly click the left mouse button twice. Drag Point to an item. Then press and hold down the left mouse button as you move the pointer to a new location, then release the button. Shift-click or Ctrl-click Hold down the Shift key or Ctrl key on your keyboard, then click. Shift-drag or Ctrl-drag Hold down the Shift key or Ctrl key on your keyboard, then drag the mouse. The symbol representing the mouse pointer on the screen changes shape depending on what you are pointing to and the task you are performing. Pointer 30 Location on the screen Function Menu bars and buttons; or inside image window Choose menu commands and click buttons; point to the image to see data values or coordinates. Text fields Type or select text, or reposition the insertion point. Inside the current image window Zoom the image within the image window. Inside the current image window Drag a box over an area to fill image window. ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z User interface components Inside the current image window Pan the image within the image window. Inside inactive image windows Select an inactive window to become the current window. In image windows when annotation tools are selected Draw annotation and map composition objects. The ER Mapper main menu When you start ER Mapper, the main menu appears. The main menu has two primary components–the menu bar and rows of toolbar buttons. Title bar Menu bar Buttons Toolbars Menu bar Lets you select commands used to carry out actions in ER Mapper. To select a command from the menu bar, click on the name of the menu to open it, then click the desired command name. Toolbar buttons Shows groups of buttons to let you carry out common tasks quickly. To choose a function from a toolbar, click on the desired button. Tool tips Place the cursor on any toolbar button and within a couple of seconds the function of that toolbar button is displayed in a small text window just below the cursor Using ER Mapper toolbars Toolbars give you quick access to many common functions, such as saving an image processing algorithm or printing a hardcopy. ER Mapper also provides optional toolbars for specific tasks and image processing applications. To hide or display various toolbars, use the Toolbar menu. To get short help for any toolbar function, point to the button and read the tool tips. ER Mapper Workbook - Airphoto Mosaic Applications 31 Chapter 2#User interface basics#z User interface components ER Mapper provides toolbars for many common tasks, and also toolbars for building processing algorithms commonly used in remote sensing applications such as forestry, geophysics, and map generation. The functions of the Standard, and Common Functions toolbars are summarized below. Standard Provides quick access to standard commands for opening and saving algorithms, printing, starting and stopping algorithm processing, and changing the mouse pointer. Most functions are also available from the menu bar. Common Functions Provides quick access to commonly used functions, such as creating general types of algorithms, viewing and editing components of an algorithm. Using ER Mapper’s scripting language, you can also create your own customized toolbars for specific tasks and functions. For more information on creating custom toolbars, see the ER Mapper User Guide. Using dialog boxes When you select menu commands or click toolbar buttons, dialog boxes often appear for you to choose options to control your image processing tasks. Some dialog boxes, such as the File Chooser, can disappear when you make your selection. Other dialogs can remain open for setting options for as long as you want to use them. click to load file close dialog without action text fields (click to place cursor) display setup options drop-down list (click to open) access on-line help for this function To resize a dialog box, drag one of its corners or edges to the desired size. ER Mapper automatically resizes the dialog box intelligently, so that any central display areas are enlarged, and the layout of buttons remains the same. After resizing, the dialog retains your new size for the current ER Mapper session. 32 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z User interface components Using the File Chooser dialog boxes When you choose to open or save a dataset, algorithm, or other file, ER Mapper displays a File Chooser dialog box. The central window contains a list of directories, or files in the current directory. menu bar to navigate and mark directories current directory click to move up and down one directory level scroll to view other items in directory file types click to load and close dialog box click to view comments click to load and leave dialog open To open a file or directory displayed in the scroll list window, either double-click on it, or click once to select it and click the OK or Apply button to open it. Tip: You can see more levels of directories and/or files by widening the file chooser dialog box (drag one of the sides). ER Mapper Workbook - Airphoto Mosaic Applications 33 Chapter 2#User interface basics#z User interface components The File Chooser menus at the top have the following functions: History menu Use to change the File Chooser’s current directory. The menu has two parts: the upper portion lists most recently visited directories, and the lower portion lists marked directories. Special menu Use to change to your home directory, or to mark or unmark a directory (any directory may be marked for fast access using the History menu). View menu Use to sort the contents of the current directory by name, date modified, or date created. Volumes menu (Windows version only) Use to access volumes or disk drives on your network. Directories menu Use to change to any directory defined by your preferences settings. ECW URL History List of the most recent ECW Compressed image files accessed via an Image Web Server by means of their URLs. Using the on-line help system ER Mapper provides an extensive on-line help system with both simple overviews and detailed descriptions of all features and functions. There are two ways to access help: Help menu Lets you browse all the standard ER Mapper manuals on-line, and go between manuals and topics using hypertext links. Help buttons The Help button inside dialog boxes gives you context-sensitive help. If needed, you can navigate to view more detailed information using the hypertext links. Typing text in text fields To enter text for naming files or changing values in dialog boxes, ER Mapper provides text fields. When you point to a text field, the pointer shape changes to an I-beam. To enter text, click anywhere inside the text field to place the text cursor. To select existing text, you can drag through the desired portion, or double-click on a word or numeric value to select it. Text that is selected become reverse highlighted, and any subsequent typing replaces it. 34 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z Hands-on exercises Hands-on exercises The following hands-on exercises introduce you to the basic concepts of using menus and dialog boxes and managing image windows. What you will learn... After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Choose options from menus and toolbar buttons • Display and hide toolbars • Open an empty image window • Open an image processing algorithm into a window • Move and resize an image window • Zoom and pan the image within the window • Manipulate multiple image windows on the screen • Close image windows 1: Using menus and toolbars Objectives Learn to open and make selections from menus, use toolbars, and access on-line help. Move the ER Mapper main menu around the screen 1 Position the mouse pointer on the ER Mapper main menu title bar, then drag it to the lower-left part of the screen. Pointing to the title bar and dragging is how you move dialog boxes and image windows around the screen. 2 Drag the main menu to the upper-right corner of the screen. This is the recommended position for the main menu for the exercises in this tutorial. ER Mapper Workbook - Airphoto Mosaic Applications 35 Chapter 2#User interface basics#z 1: Using menus and toolbars Open a menu to display its commands, then close the menu 1 Click on the View menu button; a list of commands under the menu displays. The small arrows next to Quick Zoom and Statistics indicate that they have additional commands under them. 2 Click on the Statistics command to display its submenu. 3 Click anywhere outside the main menu to close the open menus without making a selection. Note: In the rest of this manual, selecting commands from menus is indicated as follows: “From the Edit menu, select Preferences...” (which means click on Edit in the menu bar, then click on the Preferences command). Select the Print command from the menu bar 1 From the File menu, select Print. The Print dialog box appears with options for printing hardcopy. 2 Click the Cancel button to close the dialog box. 36 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z 1: Using menus and toolbars Select the Print command from the Standard toolbar 1 On the Standard toolbar, click the Print button. Click to open Print dialog The same Print dialog box appears again. Using toolbar buttons is often a faster way to access many commands in ER Mapper. 2 Click the Cancel button to close the dialog box. Tip: Many common commands on the menu bar, such as Print, are also available on the Standard toolbar. Use whichever is fastest or most comfortable. Display and hide a toolbar 1 From the Toolbar menu, select Forestry. A third row of toolbar buttons appears on the main menu below the Standard and Common Functions toolbars. This toolbar has buttons for common image processing techniques used in forestry applications. Forestry toolbar buttons 2 Point the cursor to any button on the toolbar. A description of the button function displays in the small text field just below the cursor. 3 From the Toolbar menu, select Forestry again. The Forestry toolbar buttons disappear from the main menu. Use the Toolbar menu to display or hide any toolbar. (It is recommended that you always display the Standard and Common Functions toolbars.) ER Mapper Workbook - Airphoto Mosaic Applications 37 Chapter 2#User interface basics#z 2: Opening windows and algorithms 2: Opening windows and algorithms To display an image in ER Mapper, you first open an empty image window, then load and display an image processing algorithm. The algorithm references a raster data file on disk, and the processing steps ER Mapper uses to enhance and render the data on the screen display. (You will learn more about algorithms later.) You can have as many different image windows open on the screen as you need. Objectives Learn to open image windows on your computer display, and open and run an image processing algorithm stored on disk. Open a new empty image window 1 From the File menu, select New. An empty image window opens in the upper left corner of the screen. The window title bar reads “Algorithm Not Yet Saved” because no processing algorithm is associated with this image window yet. Open and display an image processing algorithm 1 From the File menu, select Open.... The Open file chooser dialog box opens. 2 From the Directories menu, select the path ending with the text \examples (The portion of the path name preceding it is specific to your site.) 3 Double-click on the directory named ‘Data_Types’ to open it. 4 Double-click on the directory named ‘Landsat_TM’ to open it. (Scroll if needed to view it first.) The list of example algorithms for processing Landsat Thematic Mapper (TM) satellite imagery displays. 5 Double-click on the algorithm named ‘RGB_321.alg.’ (Scroll down if needed to view it first.) ER Mapper runs the algorithm and displays an enhanced Landsat TM image of San Diego, California in the image window. This algorithm displays bands 3, 2, and 1 of the Landsat image as an RGB color composite image, with band 3 in the red display channel, band 2 in the green, and band 1 in the blue. Notice also that the algorithm filename ‘RGB_321’ now appears in the title bar of the image window. 38 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z 3: Resizing windows and zooming/panning Use the toolbar to open a different processing algorithm 1 Click the Open button on the Standard toolbar. The Open file chooser dialog box appears. (This toolbar button has the same function as selecting Open... from the File menu.) The algorithm named ‘RGB_321’ in the ‘Data_Types\Landsat_TM’ directory is already highlighted since it is currently loaded into the image window. 2 Double-click on the algorithm named ‘RGB_541.alg.’ ER Mapper runs the algorithm and displays a color composite of the same Landsat image, this time using bands 5, 4, and 1. Notice that the title bar also changes to show the filename of the new algorithm. Note: By default, ER Mapper runs the algorithm automatically for you when you open it from disk. You can also reprocess the data at any time by clicking the Refresh button. 3: Resizing windows and zooming/panning Objectives Learn to move and resize image windows, zoom (magnify) part of an image, and pan (scroll) to other parts of an image. Move the image window on the screen 1 Point the mouse at the image window title bar, then drag it to another part of the screen. 2 Drag the image back to the upper-left part of the screen. Like dialog boxes, dragging images by the title bar is how you move them around the screen. Resize the image window 1 Move the mouse pointer directly over the lower-right corner of the image window–the pointer shape changes to a double ended arrow. ER Mapper Workbook - Airphoto Mosaic Applications 39 Chapter 2#User interface basics#z 3: Resizing windows and zooming/panning 2 Drag the lower-right corner to make the window about twice its original size, then release. Image window Dragging any side or corner of an image window lets you change the default window size as you desire. Note: When you resize a window, ER Mapper maintains the size of the image inside the window. Empty areas on the sides are filled with a cross-hatch pattern to indicate that no data is displayed there. Set the mouse pointer to Zoom mode 1 On the Common Functions toolbar, click the Zoom Tool button. This tells ER Mapper to use the mouse pointer for zooming when it is positioned inside an image window. Also notice that the Zoom Tool button becomes depressed to indicate that it is the active pointer mode. 2 Move the pointer inside the image window. The mouse pointer displays as a magnifying glass icon. Zoom in and out of the image with the mouse 1 Position the pointer in the center of the image, and click the left mouse button. The image zooms in by 50%. 2 Position the pointer in the center of the image, hold down the Ctrl. key while clicking the left mouse button. The image zooms out by 50%. 3 Position the pointer in the image, and then drag it up and down. 40 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z 3: Resizing windows and zooming/panning As you drag the pointer down the image is magnified, i.e you zoom into it. When you drag the pointer upwards, the image gets smaller, i.e you zoom out. Set the mouse pointer to ZoomBox mode 1 On the Common Functions toolbar, click the ZoomBox Tool button. This tells ER Mapper to use the mouse pointer for creating a zoom box when it is positioned inside an image window. Also notice that the ZoomBox Tool button becomes depressed to indicate that it is the active pointer mode. 2 Move the pointer inside the image window. The mouse pointer displays as a magnifying glass and box icon. Zoom in (magnify) an area of the image with the mouse 1 Position the pointer near the upper-left center of the image, then drag to the lower-right to define a box. When you release the mouse, ER Mapper runs the algorithm again and magnifies (or “zooms in”) on the area of the image you defined with the box. Dragging a zoom box is a fast way to magnify an area of interest. (There are other zooming functions you will learn about later. Set the mouse pointer to Hand mode 1 On the Common Functions toolbar, click the Hand Tool button. This tells ER Mapper to use the mouse pointer for panning when it is positioned inside an image window. Also notice that the Hand Tool button becomes depressed to indicate that it is the active pointer mode. 2 Move the pointer inside the image window. The mouse pointer displays as a hand icon. Pan (scroll) the image within the window with the mouse 1 Click on the image. and drag it to a new position in the image window. The hand pointer will grab the image and move it (pan) to the new location. Zoom back out to view the full image extents 1 From the View menu, select Quick Zoom and then select Zoom to All Datasets. ER Mapper Workbook - Airphoto Mosaic Applications 41 Chapter 2#User interface basics#z 3: Resizing windows and zooming/panning ER Mapper runs the algorithm again and zooms back out to display the full extents of the Landsat image data. The Quick Zoom submenu provides many options for zooming in or out to specific datasets, setting window geolinking, and other options you will learn more about later. 2 Right-click inside the image window to open the shortcut menu, then select Quick Zoom and then Zoom to All Datasets. Right-click inside image window to open shortcut menu Zoom and pan using buttons for predefined options In addition to using the mouse, ER Mapper also lets you zoom and pan using buttons to invoke predefined zoom and pan functions. 1 From the View menu, select Geoposition.... 42 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z 3: Resizing windows and zooming/panning The Algorithm Geoposition Extents dialog box appears. 2 Click on the Zoom tab at the top to display zoom and pan options. The Zoom tab options show sets of buttons for zooming and panning the image within the window. 3 In the buttons labelled ‘Zoom,’ click the Zoom out 50% button. Click to zoom out 50% ER Mapper runs the algorithm and zooms out to 50% of the previous display resolution. Tip: For all icons on buttons under ‘Zoom’ and ‘Pan,’ the black square represents the current image, and the white box represents how the size or position of the image will change after the button is clicked. 4 In the buttons labelled ‘Set Extents To,’ click Previous. ER Mapper zooms out to the previous image display extents. ER Mapper Workbook - Airphoto Mosaic Applications 43 Chapter 2#User interface basics#z 4: Managing multiple image windows 5 Under ‘Zoom,’ click on the Zoom in 100% button. Click to zoom in 100% ER Mapper magnifies the images to two times (100%) of the previous display resolution (and keeps the image center point constant). 6 Under ‘Pan,’ click on the Pan left button. ER Mapper pans or scrolls the image 50% to the left (the previous center point is now on the far right side of the image). 7 Under ‘Pan,’ click on the Pan upper-right button. ER Mapper pans the image 50% to the upper-right (the previous center point is now on the lower-left corner of the image). 8 Experiment with other buttons under Zoom and Pan to see their effect. 9 Under ‘Set Extents To,’ click the All Datasets button. ER Mapper resets the image extents to fit the entire dataset in the image window. 10 Click Close on the Algorithm Geoposition Extents dialog to close it. 4: Managing multiple image windows Objectives Learn to open a second image window, specify overlap priority between windows, activate an image window, and close image windows. Open a second image window 1 From the File menu, select New. ER Mapper opens a new image window. As with all new image windows, it has no algorithm associated with it yet. Open and display a processing algorithm in the new window 1 From the File menu, select Open.... 44 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z 4: Managing multiple image windows The Open file chooser dialog box appears. 2 From the Directories menu, select the path ending with the text \examples. 3 Double-click on the directory named ‘Data_Types’ to open it. 4 Double-click on the directory named ‘SPOT_Panchromatic’ to open it. The list of example algorithms for processing SPOT Panchromatic satellite imagery displays. 5 Double-click on the algorithm named ‘Greyscale.alg.’ ER Mapper runs the algorithm and displays a SPOT Panchromatic satellite image the San Diego (the same geographic area covered by the Landsat image in the other window). The SPOT Pan data provides greater spatial detail than the Landsat data, but has only one spectral band which is displayed in greyscale. Move the SPOT window to overlap with the Landsat window 1 Drag the image window titled ‘Greyscale’ to the center of the screen until it partially overlaps with the Landsat ‘RGB_541’ image window. Your windows should be similar to the following diagram: Landsat TM window SPOT Pan window Move one window in front of the other 1 Click on the title bar of the window with the algorithm description titled ‘RGB_541.’ The Landsat window moves in front of the SPOT window where there is overlap. 2 Click on the title bar of the window with the algorithm description ‘Greyscale.’ The SPOT window now moves in front of the Landsat window where there is overlap. Clicking on the title bar of a window or dialog box bar lets you choose which window or dialog box to display on top of others. ER Mapper Workbook - Airphoto Mosaic Applications 45 Chapter 2#User interface basics#z 4: Managing multiple image windows Select a window to be the active window The “active” image window is the one you want to currently work with, such as zooming, loading a new processing algorithm, or editing the current algorithm. (You can have many image windows open on the screen, but only one can be active.) 1 Look at the title bar of the SPOT Panchromatic window and notice the three asterisks (***) on either side of the window title. The three asterisks indicate that this is the active (or current) window of the two. 2 Move the pointer inside the image area of the window with the algorithm description titled “RGB_541.” The pointer shape changes to a pointing hand. (This happens whenever you move from the active window to any inactive image window.) 3 Click anywhere inside the Landsat image window or on the Title Bar. It now becomes the active window and three asterisks appear next to the title. 4 Click inside the SPOT window or on the Title Bar again to make it active. Note: A window can be active and still be covered by another “inactive” window. To move the active window to the front, click on its title bar. Close both image windows 1 Close one image window using the window system controls: • For Windows, select Close from the window control-menu. The window closes and disappears from the screen. 2 Close the other image window by repeating Step 1. The window closes and disappears from the screen. Only the ER Mapper main menu is now open. What you learned 46 After completing these exercises, you know how to perform the following tasks in ER Mapper: • Choose options from menus and toolbar buttons • Display and hide toolbars • Open an empty image window • Open an image processing algorithm into a window • Move and resize an image window ER Mapper Workbook - Airphoto Mosaic Applications Chapter 2#User interface basics#z 4: Managing multiple image windows • Zoom and pan the image within the window • Manipulate multiple image windows on the screen • Close image windows ER Mapper Workbook - Airphoto Mosaic Applications 47 Chapter 2#User interface basics#z 4: Managing multiple image windows 48 ER Mapper Workbook - Airphoto Mosaic Applications 3 Importing and viewing an image This chapter shows you how to import a digitized airphoto in TIFF format, and how to display the dataset as a greyscale image and enhance the contrast. You learn about the interface ER Mapper provides for creating and editing data view algorithms (the Algorithm dialog). About the algorithms concept The goal of all image processing is to enhance your data to make it more meaningful and help you extract the type of information that interests you. To make this procedure faster and easier, Earth Resource Mapping developed a new image processing technique called “algorithm data views.” Understanding how to use algorithms is the key to understanding how to use ER Mapper effectively. What is an algorithm data view? An algorithm is a list of processing steps or instructions ER Mapper uses to transform raw datasets on disk into a final, enhanced image on your screen display. In this sense, algorithms let you define a “view” into your data that you can save, reload, and modify at any time. ER Mapper Workbook - Airphoto Mosaic Applications 49 Chapter 3#Importing and viewing an image#z About the algorithms concept You use ER Mapper’s graphical user interface to define your list of processing steps, and you can save the steps in an algorithm file on disk. An algorithm file can store any of the following information about your processing: • Names of dataset(s) to be processed and displayed • Subsets of the dataset(s) to be processed (zoomed areas) • Bands (layers of data) in the dataset(s) to be processed • Color mapping and contrast enhancements (Transforms) • Filtering to be applied to the data (Filters) • Equations and combinations of bands or datasets used to create the image (Formulae) • Color mode used to display the data (Pseudocolor, Red Green Blue, or Hue Saturation Intensity) • Any vector datasets, thematic color, or map composition layers to be displayed over the raster image data • Definition of a page size and margins (used for positioning the image on a page for creating maps and printing) • Viewpoint and other parameters when viewing the image in 3D perspective By being able to apply a set of processing steps as a single entity, the complexity often associated with image processing is greatly simplified. In addition, you gain tremendous savings in disk space, since you do not need to store intermediate processed copies of your original data on disk. Building Algorithms in ER Mapper There are three primary ways to build a processing algorithm in ER Mapper: • Open a dataset directly (File Open) and have ER Mapper automatically display the dataset using a simple default algorithm • Use the Algorithm dialog options to build an algorithm by adding the desired types of layers, loading datasets, and specify processing steps for each layer. • Use image wizards to have ER Mapper automatically create any of several types of specialized algorithms for you. In this case, ER Mapper adds the appropriate layers to the Algorithm dialog, prompts you to load a dataset, and possibly other options as well. The majority of exercises in this workbook ask you to build algorithms from scratch so you become familiar with and thoroughly understand the basic concepts. However, you will also use the automatic algorithm creation wizards from time to time to understand how they can save time. 50 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z About the algorithms concept Using Algorithms as Templates Once you have saved your processing instructions as an algorithm file, you can use the algorithm as a “template” to easily apply the same processing to other datasets. To use an algorithm as a template, simply load the desired dataset(s) to replace the default dataset(s) saved with the algorithm, and click GO to apply the same processing to the new dataset(s). You may also need to adjust the transforms (color mapping) for the new datasets. Any algorithm can be used as a template, and ER Mapper also provides many template algorithms for common tasks. These include common display techniques (pseudocolor, colordrape, etc.), writing processed image files to disk, and saving algorithms as “Virtual Datasets.” The Algorithm dialog The Algorithm dialog is a special dialog box that serves as your “command center” for creating and editing algorithms in ER Mapper. To open the Algorithm dialog, you can select Algorithm... from the View menu or click the Edit Algorithm toolbar button. The key components of the Algorithm dialog are labelled below and described in the table that follows. view mode (2D or 3D) tab pages to select categories of options for layer or surface (Layer tab page is selected) menu to add or change layers/surfaces surface list of layers in surface process diagram for selected layer data structure diagram panel Data structure diagram Shows a list of surfaces and layers contained in the current algorithm using a hierarchy or “tree” structure. Select (click on) a surface or layer change its options using the Tab pages. ER Mapper Workbook - Airphoto Mosaic Applications 51 Chapter 3#Importing and viewing an image#z About the algorithms concept Surface A group of raster and/or vector data layers that combine to create a view or image. A single algorithm can have multiple surfaces that become independent entities when viewed in 3D mode. Layers Components of a surface that contain data used to construct an image. Different layer types can contain raster or vector data, and processing for each layer is controlled independently from the others. View Mode Sets the manner in which data is displayed as two dimensions (2D) normal or page layout, or three dimensions (3D). Tab pages Display categories of options for controlling the image display and processing techniques, such as Layer for options for the current layer, or Surface for options that apply to an entire surface. Process diagram Used to control the processing operations applied to image(s) in the currently selected layer (displayed when Layer tab is selected). The Process Diagram When the Layer tab is selected, the horizontal row of buttons on the right-lower panel of the Algorithm dialog are called the process diagram. They are used to define your image enhancement and processing operations for the currently selected data layer. Each button in the diagram controls a specific image processing function. As the arrows indicate, the processing stream flows from left to right. Typically, you may specify a dataset to be used, the bands within the dataset to be processed, then apply processing using formulae, filters, transforms or other options to create your desired image. When you select GO (from the toolbar or File menu), ER Mapper compiles all the processing steps you specified and renders the resulting image to the screen display. The name and function of the main processing diagram buttons are as follows. 52 Button Function Load Dataset Use to load a dataset from disk, or edit or view information or comments about a dataset. Band Selection Use to select one or more bands in the dataset for use in generating an image (a drop-down list). ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z Hands-on exercises Button Function Formula Use to enter, load, or save a formula to perform image algebra and other arithmetic operations. Filter Use to add or delete one or more spatial filters. (There are both pre- and post-formula Filter buttons.) Transform Use to adjust image contrast and brightness. (There are both pre- and post-formula Transform buttons.) Sun Angle Use to specify sun angle illumination of the image to create shaded relief effects. Note: A cross or “X” through the button indicates that the function is not active in the current data layer. In addition, there are other buttons for some layer types that you will learn about later in this manual. Hands-on exercises These exercises show you how to import a digitized airphoto into ER Mapper, display and enhance the image in greyscale, and save and reload a simple image processing algorithm. What you will learn... Before you begin... After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Import a digitized airphoto into ER Mapper • Load and display the imported dataset as a greyscale image • Use the Algorithm dialog to define a simple processing algorithm • Change the color lookup table used to display the image • Use transforms to adjust the image contrast • Add text labels and comments to an algorithm • Save the processing algorithm to disk • Reload and view the saved algorithm Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. ER Mapper Workbook - Airphoto Mosaic Applications 53 Chapter 3#Importing and viewing an image#z 1: Opening an airphoto image file 1: Opening an airphoto image file Objectives Learn to import a airphoto image from an external file to create a new image dataset in ER Mapper format. Note: The sample airphoto applications training datasets must be installed on your computer before you can complete this exercise. See Appendix A if needed for more information. About imputting data You can open any of the following image data formats directly into ER Mppaer without having to import them as ER Mapper Raster Datasets: • ER Mapper Algorithm (.alg) • ER Mapper Raster Dataset (ers) • ER Mapper Compressed Image (.ecw) • Vector Map (.erv) • Windows Bitmap (.bmp) • ESRI BIL and GeoSPOT (.hdr) • GeoTIFF/TIFF (.tif) • JPEG (.jpg) • USGS DOQQ (Grayscale) • RESTEC/NASDA CEOS (.dat) Opening a TIFF image To open a TIFF image in ER Mapper, click on the Open Standard toolbar. Open button 54 ER Mapper Workbook - Airphoto Mosaic Applications button on the Chapter 3#Importing and viewing an image#z 1: Opening an airphoto image file In the Open dialog box, select ‘GeoTIFF/TIFF(.tif)’ from the Files of Type list, and then select the TIFF image to be opened in ER Mapper. You can add TIFF images to Algorithms and perform most image enhancements on them. ER Mapper adds a header file with a .ers extension to hold statistical information about the image. The Geocoding Wizard will only rectify ER Mapper Raster Dataset images. If you want to rectify a TIFF image you must either save it as an ER Mapper Raster Dataset or originally import it as an ER Mapper Raster Dataset. Importing a TIFF image To import a dataset from an external file into ER Mapper, you will use the import programs listed under the Utilities menu in ER Mapper. In this case, you will import an airphoto that has previously been converted to a digital format by scanning and saved as a TIFF format graphics file. When you import a dataset into ER Mapper, it creates two files: and binary data file (in Band Interleaved by Line or “BIL” format), and an ASCII header file with a “.ers” file extension: Utilities airphoto.tif Import Graphics formats Raster Translated Images (scanned raster airphoto file) airphoto (ER Mapper BIL data file) airphoto.ers (ER Mapper ASCII header file) TIFF (.tif) Open the TIFF import dialog 1 From the Utilities menu, select Import Graphics formats, then select Raster Translated Images, then Import. The Import Raster_Translated dialog box opens. This dialog lets you specify the name of the input file to be imported, and the name of the ER Mapper dataset to be created. All image formats that can be opened directly in ER Mapper are imported via this dialog bax. 2 Click the file chooser Name field. button on the right side of the Import File/Device The Input File Selection dialog box opens. 3 In the Files of Type: field, select ‘GeoTIFF/TIFF(.tif)’. ER Mapper Workbook - Airphoto Mosaic Applications 55 Chapter 3#Importing and viewing an image#z 2: Displaying an image in greyscale 4 From the Directories menu (on the Input File dialog), select the path ending with \examples. 5 Double-click on the directory named ‘Shared_Data’ and then the directory named ‘airphoto_training.’ 6 Double-click on the image file named ‘photo_86.tif’ to load it. 7 Click the file chooser button next to the Output Dataset Name field. The Output Dataset Selection dialog box opens. 8 From the Directories menu (on the Output Dataset dialog), select the path ending with \examples. 9 Double-click on the directory named ‘airphoto_training.’ 10 In the Save As: field, enter the text raw_photo_86 then click OK. 11 Click OK on the Import TIFF dialog. ER Mapper reads the TIFF file and begins creating a dataset in ER Mapper format. 12 When the import finishes, click OK on the confirmation dialog, then click Cancel on the Import Raster_Translated dialog. In this case, ER Mapper translated the TIFF image data and created two files: • ‘raw_photo_86’ (the binary data file) • ‘raw_photo_86.ers’ (the ASCII header file) 2: Displaying an image in greyscale Objectives Learn to open an image window and the Algorithm dialog, load an image, and display the image in greyscale. You will also learn to change the contrast (color mapping) of the image. Note: The airphoto you imported is a color photograph. You will initially learn to view and adjust the photo as a greyscale image, which is appropriate for black and white aerial photographs. Later you will learn to view it as an RGB color image (in the following chapter). Open an image window and the Algorithm dialog 1 From the View menu, select Algorithm.... 56 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z 2: Displaying an image in greyscale A new empty image window opens in the upper-left corner of the screen, and the Algorithm dialog opens. Note that the Algorithm dialog shows a default surface with one Pseudocolor layer in the left-hand panel (labelled “Pseudo Layer”), and a process diagram for that layer in the right-hand panel. The words “No Dataset” above the process diagram indicate that no dataset is currently loaded into the layer. Note: If you open the Algorithm dialog when no image windows are currently open (as in this case), ER Mapper opens an empty image window for you automatically. This shortcut saves you the step of opening a window. Load the airphoto dataset into the Pseudo layer 1 In the Algorithm dialog, click the Load Dataset button.. Load Dataset button The Raster Dataset file chooser dialog box appears. 2 From the Directories menu (on the Raster Dataset dialog), select the path ending with \examples. The scrolling list in the center now shows a list of directories containing example images supplied with ER Mapper . 3 Double-click on the directory named ‘airphoto_training.’ A list of raster datasets with the file extension “.ers” are displayed. (If you do not see files with an .ers extension, open the Files of Type menu and select ‘ER Mapper Raster Dataset (.ers).’) 4 Double-click on the dataset named ‘raw_photo_86.ers’ to load it. The file chooser dialog closes, and the dataset is loaded into the Pseudo layer. Note that the dataset name (‘raw_photo_ap.ers’) now appears above the process diagram. ER Mapper Workbook - Airphoto Mosaic Applications 57 Chapter 3#Importing and viewing an image#z 2: Displaying an image in greyscale Note: To load an ER Mapper format raster dataset, you must select the “.ers” header file, not the binary data file without the .ers extension. Change the color table to view the image in greyscale When you are using the Color Mode named Pseudocolor (as you are in this example), the Color Table controls the set of colors ER Mapper uses to display the image. If your airphoto is black and white airphoto, you should normally choose to view it as greyscale image. (RGB color images are discussed in the next chapter.). 1 In the Algorithm dialog, select the Surface tab. Select Surface tab Options for Color Mode, Color Table, and Transparency now appear in the panel. Color Mode is set to “Pseudocolor” meaning that a color lookup table (LUT) is used to control the image colors. The current color table is the last one selected in ER Mapper (‘pseudocolor’ in the above diagram). 2 Click on the Color Table drop-down list button. A menu listing available color lookup tables appears. 3 Click on the lookup table named greyscale. ER Mapper renders the image using a greyscale color table that has colors from black to white with grey shades in between. The brightest features in the airphoto are shown in light tones, darkest features in dark tones. Note: ER Mapper has many other color tables that are used for different types of data. For black and white airphotos, you will usually use ‘greyscale.’ 58 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast 3: Selecting bands and adjusting contrast Objectives Learn to view different bands in the dataset and use the Transform dialog options to adjust the image contrast. Also learn about image histograms. Select the Layer tab in the Algorithm dialog 1 In the Algorithm dialog, select the Layer tab. Select Layer tab The contents of the right side of the Algorithm dialog change to show the process diagram option buttons. 2 If needed, drag one side of the Algorithm dialog to widen it until you can see all the option buttons above. Tip: When you resize or reposition a dialog box, ER Mapper automatically remembers this the next time you open it. This lets you setup your work environment as you like. Display the histogram for the Red band Color airphotos are usually divided into red, green and blue components during the digitizing (scanning) process. This creates three layers of data, each called a “band” in ER Mapper. Notice that the Band Selection list in the Algorithm dialog shows that the Red band (band 1 of 3) is currently selected. 1 In the Algorithm dialog, click on the right-hand Edit Transform Limits button (blue) in the process diagram. Edit Transform Limits button ER Mapper Workbook - Airphoto Mosaic Applications 59 Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast The Transform dialog box opens showing a histogram of the data values in the current band (Red in this case), and options for modifying the image contrast. transform line color bar showing colors in current Color Table (greyscale) histogram of red band values actual range of values in red band A histogram is a graphical display of the relative frequency distribution of values in an image. In this case, most of the data values occur in the middle part of the 0 to 255 data range possible for digitized airphoto datasets. Peaks in the histogram show where there are many pixels with similar data values, and sometimes indicate identifiable features in an image. The shape of this histogram indicates that most pixels have mid-range brightness values (the peak in the histogram), with many fewer pixels either very bright or dark (the right and left sides of the histogram). The “Actual Input Limits” field shows the actual range of values in the current band of the dataset. In this case, the red band values fill the possible dynamic range of zero to 255. 2 Drag the Transform dialog left underneath the image window (so you can see the options on the Algorithm dialog). 60 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast Display the Green band of the airphoto 1 In the Algorithm dialog, click on the Band Selection drop-down list and select B2:Green. select green band ER Mapper redisplays the image in the window, this time showing the green band in the airphoto dataset. The Transform dialog now shows a histogram of the green band data values. Notice that the ‘Actual Inputs Limits’ at the bottom shows a range of 16-255, so band 2 (green) does not contain any values between 0-15. Display the Blue band of the airphoto 1 In the Algorithm dialog, click on the Band Selection drop-down list and select B3:Blue. select blue band ER Mapper displays the blue band data in the image window, which is noticeably brighter that the red or green bands. On the Transform dialog, notice that the ‘Actual Inputs Limits’ shows a range of approximately 48-255, so band 3 (blue) does not contain any values between 0-47. (This is also indicated by the shape of the histogram, with the left side being empty.) Each band in a color airphoto usually has its own unique histogram, caused by differences in the amount of red, green and blue light reflected by objects on the ground. (This will be discussed more later.) ER Mapper Workbook - Airphoto Mosaic Applications 61 Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast Adjust the contrast to use the entire range of colors By default, there is a linear mapping between the input data values and the output colors used to display them. Since the blue band has no values between 0-44, the darker grey shades in the greyscale color table are not used in the image (thus it appears very bright). 1 From the Limits menu (on the Transform dialog), select Limits to Actual. The X axis data range fields (below the histogram) change to match the Actual Input Limits values. ER Mapper renders the image again, this time mapping only the range of values that actually occurs in the blue band image (48-255) to the full range of grey tones to display the image. This creates better overall contrast between the light and dark areas. Notice also that the histogram has widened slightly to better fill the histogram window area. Apply a linear lightening effect to the image 1 As shown in the diagram below, drag the circled part of the dashed transform line up to the left until it is flush with the left-hand vertical axis. display (color) range 0 255 100 48 255 input data values ER Mapper applies the change and the image lightens. As shown in the right-hand diagram (above), you have adjusted the transform line to exclude values of about 0-100 on the display (vertical) axis, which correspond to the darker shades of grey in the greyscale lookup table. Now the entire 48-255 range of data on the X (horizontal) axis is mapped to only the lighter shades of grey in the greyscale lookup table, causing the image to appear lighter. Also notice that a second unfilled histogram appears in the window. This is the output histogram, and it represents the distribution of colors in the image. (It is different to the input histogram because you changed the color mapping by adjusting the transform line.) 62 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast 2 On the Transform dialog, click the Create default linear transform button. Create default linear transform button ER Mapper returns the transform line to its default position and redisplays the image. (The default position is a straight linear transform, where the line’s X position is equal to its Y position. This also makes the output histogram the same as the input histogram, so it is no longer visible.) Apply a linear darkening effect to the image 1 As shown in the diagram below, drag the circled part of the dashed transform line down to the right along the right-hand vertical axis. 200 display (color) range 0 200 255 45 255 input data values ER Mapper applies the change and the image darkens. As shown in the right-hand diagram, you have adjusted the transform line to exclude values of about 200-255 on the display (vertical) axis, which correspond to the lighter shades of grey in the lookup table. Now the entire 0-255 range of data on the X (horizontal) axis is mapped to only the darker shades of grey, causing the image to appear darker. Also notice that the linear darkening effect caused the output histogram to shift left, showing that predominantly darker grey shades are used in the image. 2 Click on the Create default linear transform button. The transform line returns to its default position and the image redisplays. ER Mapper Workbook - Airphoto Mosaic Applications 63 Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast Apply a linear contrast stretch to increase image contrast 1 Point to the base of the left side of the histogram (at the bottom of the slope). The X-Y coordinate location of the cursor displays below ‘Histogram Style.’ Note that the first (X) value is about 80-85. Even though the lower limits of the band 3 values are 45, there are very few values between 45 and 85 (as indicated by the frequency shown in the histogram). 2 Adjust the transform line down to move it the base of the left side of the histogram as shown in the diagram below. 0 0 64 ER Mapper Workbook - Airphoto Mosaic Applications display or LUT range 255 85 data values 255 Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast ER Mapper applies the change and the image contrast increases. Now the contrast between light and dark parts of the image is enhanced, making spatial features easier to visually interpret. In this case, you adjusted the transform line to map data values of about 85-255 on the horizontal axis to the entire range of grey shades. Any value less than 85 is mapped to the darkest color (black). This mapping better utilizes the dynamic range of grey shades in the lookup table, which improves image contrast. (This effect is often called histogram clipping because it clips the tail off the histogram.) 3 Click on the Create default linear transform button. The transform line returns to its default position and the image redisplays. Apply a 99% clip transform to the data 1 On the Transform dialog, click the Create autoclip transform button. Create autoclip transform button ER Mapper automatically sets the transform line into a position that clips off one percent of the data values (0.5% from the low end and 0.5% from the high end). This is called “autoclipping” since ER Mapper analyzes the histogram for the current dataset band and automatically positions the transform line for you. Autoclipping is the most commonly used contrast enhancement technique for airphoto datasets, and you will use it throughout the rest of this workbook. Tip: You can set the percentage used for the autoclip function by double-clicking on the button. Values between 90 and 99.5 are usually used. Lower values create stronger contrast, but also saturate more of the brightest and darkest features. The default is 99 percent. ER Mapper Workbook - Airphoto Mosaic Applications 65 Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast Apply a Histogram equalize transform to the data 1 On the Transform dialog, click the Histogram equalize button. Histogram equalize button Tip: Pass the mouse over the button to see the button name (tooltip). ER Mapper creates a complex piecewise linear transform line and updates the image. Notice that in this case the overall contrast is maximized, but detail may be obscured (saturated) in the brightest and darkest features. Histogram equalization (also called uniform distribution stretching) automatically adjusts the transform line so that image values are assigned to display levels based on their frequency of occurrence. More display values are assigned to the most frequently occurring portion of the histogram, so the greatest contrast enhancement occurs in the data range with the most values (peaks in the histogram). Histogram equalization tries to create and approximately equal number of each color in the image, and usually creates an image with very strong contrast. In some cases, it can also saturate areas which can obscure detail. Apply a Gaussian equalize transform to the data 1 On the Transform dialog, click the Gaussian equalize button. Gaussian equalize button ER Mapper creates a complex piecewise linear transform line (sometimes with slight stair steps) and updates the image. Gaussian equalization automatically adjusts the transform line so that image values are assigned as needed to make the output (display) values occur with a Gaussian distribution. A Gaussian, or “normal” distribution, is characterized as producing a bell-shaped histogram (shown in the output histogram.) 66 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z 3: Selecting bands and adjusting contrast Gaussian equalization is useful when data is skewed in such a way that features could be abnormally saturated if stretched linearly (such as with an autoclip). This technique tends to bring out more detail in areas with less frequently occurring data values so it is good for emphasizing subtle features. Tip: You can set the number of standard deviations used for the Gaussian equalize function by double-clicking on the button. Smaller values produce more contrast and higher values less contrast. The default is 3 standard deviations. 2 On the Transform dialog, click Create default linear transform . 3 Click Close on the the Transform dialog to close it. Use 99% Contrast Enhancement button Up until now you have learned to manually adjust the image contrast by using the options on the Transform dialog because it is important to understand them. Now you will learn to use a faster, easier way to adjust the image contrast. 1 In the Algorithm dialog, click on the Band Selection drop-down list and select B2:Green. select green band 2 On the main ER Mapper menu, click the 99% Contrast Enhancement button. 99% Contrast Enhancement button ER Mapper runs the algorithm again to display the green band of the airphoto, and automatically adjusts the contrast for you. This button performs the following sequence or actions for you automatically: ER Mapper Workbook - Airphoto Mosaic Applications 67 Chapter 3#Importing and viewing an image#z 4: Labelling and saving the algorithm Process->Limits to Actual->Process->99% autoclip->Process 3 In the Algorithm dialog, click on the Band Selection drop-down list and select B1:Red. 4 On the main ER Mapper menu, click the 99% Contrast Enhancement button. ER Mapper runs the algorithm again to display the red band of the airphoto, and automatically adjusts and optimizes the contrast for you. Tip: , 99% Contrast Enhancement The Refresh and STOP buttons are located on both the main menu and the Algorithm dialog. The STOP button ceases all processing so you don’t have to wait for the processing to finish if you make a mistake. 4: Labelling and saving the algorithm Objectives Learn to specify description labels, titles, and comments for an algorithm, and save the algorithm processing steps to a file so you can view it later. In order to save your image and view it later, you need to save the processing steps you defined previously as an algorithm file on disk. Note that you are not creating a new image file, you are only saving a text description of the steps required to enhance your original airphoto image. Enter a description for the Pseudo layer 1 In the Algorithm dialog, click on the text “Pseudo Layer” in the left-hand panel. click to make text field editable The text become reverse highlighted (shown above) indicating the text is selected. 2 Type the text airphoto red band in the field. Then press the Enter or Return key on your keyboard. This text now becomes a visual description for the layer. 68 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z 4: Labelling and saving the algorithm Note: If a layer is not already selected (highlighted), click once on the layer to select it, then click a second time on the text label to make it editable. Enter a description for the entire algorithm 1 In the Algorithm dialog, select the text in the Description text field (it currently reads ‘No Description’). (To select the text, either drag through it, or triple-click to select the entire line.) 2 Type the following text, then press Enter or Return on your keyboard: San Diego airphoto 86 in greyscale This text now becomes a brief description for the entire algorithm. Save the processing steps to an algorithm file on disk 1 From the File menu (on the main menu), select Save As.... The Save Algorithm file chooser dialog opens. 2 From the Directories menu, select the path ending with the text \examples. (The portion of the path name preceding it is specific to your site.) 3 Double-click on the directory named ‘airphoto_training’ to open it. 4 In the Save As: text field, click to place the cursor, then type the following name for the algorithm file: Airphoto_86_greyscale 5 Click the Apply button to save the algorithm and leave the dialog open. Your pseudocolor greyscale algorithm is now saved to an algorithm file on disk. Add comments to the algorithm 1 On the Save Algorithm dialog, click the Comments... button. A dialog box appears titled with the algorithm path and file name, and a text area to type comments about your algorithm. The cursor is already active. 2 In the comments dialog, type the following information to describe your algorithm: This algorithm displays the red band of Tustin airphoto 86 as a greyscale algorithm. A 99% autoclip transform is used ER Mapper Workbook - Airphoto Mosaic Applications 69 Chapter 3#Importing and viewing an image#z 5: Reloading and viewing the algorithm to increase image contrast. 3 Click OK on the comments dialog to save your comments. 4 Click Cancel on the Save Algorithm dialog close it. 5: Reloading and viewing the algorithm Objectives Learn to reload and display the algorithm you just created. Open a second image window 1 On the Standard toolbar (on the main menu), click the New Image Window button. ER Mapper opens a new image window (this is a shortcut for selecting New from the File menu). Drag the new window to the lower left part of the screen (so you can see all or most of the other image window). Open the greyscale algorithm you created earlier 1 On the main menu, click on the Open button. The Open file chooser dialog appears. (This is a shortcut for selecting Open... from the File menu.) 2 From the Directories menu, select the path ending with the text \examples. 3 From the Files of Type: list, select ‘ER Mapper Algorithm (.alg)’. 4 Double-click on the directory named ‘airphoto_training’ to open it. Your ‘Airphoto_86_greyscale’ algorithm name should appear in the list. 5 Click once on your algorithm name to highlight it (do not double-click). 6 Click the Apply button to load and process the algorithm without closing the Open dialog box. ER Mapper runs the algorithm and displays the enhanced airphoto dataset in the image window. It looks identical to the other image since they both use the same algorithm and dataset. 70 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 3#Importing and viewing an image#z 5: Reloading and viewing the algorithm View the algorithm comments 1 On the Open dialog, click the Comments... button. The dialog box opens showing the comments you entered for your algorithm. These comments can be very helpful to others who use or display your algorithm, and they are a good way to document the procedures you used to create it. 2 Click Cancel on the comments dialog box to close it. Close both image windows and the Algorithm dialog 1 Close the lower image window: • For Windows, click the Close button in the upper-right window corner. 2 Close the other image window by repeating Step 1. 3 On the Algorithm dialog, click the Close button. Only the ER Mapper main menu is now open on the screen. What you learned... After completing these exercises, you know how to perform the following tasks in ER Mapper: • Import a digitized airphoto into ER Mapper • Load and display the imported dataset as a greyscale image • Use the Algorithm dialog to define a simple processing algorithm • Change the color lookup table used to display the image • Use transforms to adjust the image contrast • Add text labels and comments to an algorithm • Save the processing algorithm to disk • Reload and view the saved algorithm ER Mapper Workbook - Airphoto Mosaic Applications 71 Chapter 3#Importing and viewing an image#z 5: Reloading and viewing the algorithm 72 ER Mapper Workbook - Airphoto Mosaic Applications 4 Viewing an image in RGB This chapter shows you how to display an airphoto dataset as an RGB color composite image. You also learn how to manipulate layers on the Algorithm dialog, and how to use wizards for viewing datasets and creating RGB algorithms. About RGB color images In the RGB color system, each color is created by mixing different proportions of the three additive primary colors–red, green and blue. Computers create color by lighting up an array of tiny red, green and blue phosphors on the screen. For example, to create a green pixel on the screen, the green phosphor for that pixel is lit up to its full intensity, and the red and blue phosphors are essentially turned off. (This might be a park or golf course for example.) To create a yellow pixel, the red and green phosphors are set to full intensity and the blue is turned off. (Red and green together combine to create yellow in the RGB color system.) By combining various proportions of the three additive primary colors, nearly any color can be created. When all three phosphors are lit to their full intensity white is created, when all are turned off black results. When red, green and blue occur in equal proportions, grey is produced. ER Mapper Workbook - Airphoto Mosaic Applications 73 Chapter 4#Viewing an image in RGB#z Hands-on exercises Scanning and display of color aerial photography Natural color airphotos record reflected light in the same wavelengths as the human eye can perceive–red, green and blue. Color infrared (CIR) airphotos are sensitive to the red and green wavelengths (not blue), but also to the near infrared wavelengths (which are beyond the range of human vision). When color airphotos are digitized (scanned), the resulting digital file is divided into red, green and blue components called bands. Each band can have a possible data value range of 0 to 255 (8 bits). For example, a pixel in the digital image that is green (grass for example) has a high value in the green band (perhaps 200), and relatively low values in the red and blue bands (perhaps 70). To display a color airphoto on a computer screen, the red band of the image file is loaded into the red display plane of the computer (which controls the red phosphors), the green band into the green color plane, and the blue band into the blue plane. These combine to create a single RGB color composite image on the screen, which looks the same as the original printed airphoto. original color print scanning process ER Mapper layers red layer red color airphoto color image display green blue band image green layer RGB color composite blue layer Hands-on exercises These exercises show you how to display a color airphoto dataset as an RGB color composite image, understand how to use red, green and blue layers in an algorithm, and use image wizards to create RGB algorithms. What you will learn... 74 After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Open a dataset directly and have ER Mapper create a display algorithm • Understand the red, green and blue layers in an RGB algorithm • Delete, add and change layers in an algorithm ER Mapper Workbook - Airphoto Mosaic Applications Chapter 4#Viewing an image in RGB#z 1: Creating RGB algorithms • Before you begin... Use transforms to adjust the RGB color contrast Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. 1: Creating RGB algorithms Objectives Learn to open a dataset directly and have ER Mapper automatically create a simple display algorithm for it. Also learn to use the Image Display and Mosaic Wizard. In the previous exercise, you created an algorithm manually by loading a dataset into the Algorithm dialog and adjusting the contrast using the Transform dialog options. This was necessary to introduce you to basic concepts of loading and displaying datasets. Now you will learn to use ways to automate the creation of algorithms. Open and display the sample airphoto dataset 1 On the main menu, click the Open button. An image window and the Open dialog box appear. 2 From the Directories menu (on the Open dialog), select the \examples path. 3 Double-click on the ‘airphoto_training’ directory to open it. The Open dialog can be set to display files with certain extensions, or all files. In previous exercises, you have used the Open dialog to open algorithm (.alg) files. 4 From the ‘Files of Type’ drop-down list, select ER Mapper Raster Dataset (.ers). The contents now show only files with “.ers” file extensions. 5 Click once on the ‘raw_photo_86.ers’ dataset, then click the Apply button. ER Mapper automatically loads the dataset and creates a simple RGB color composite algorithm. This procedure is a fast way to view any dataset. (If you have many datasets to view, select them in the Open dialog and click Apply. Clicking OK closes the dialog.) ER Mapper Workbook - Airphoto Mosaic Applications 75 Chapter 4#Viewing an image in RGB#z 1: Creating RGB algorithms Note: If the dataset has only one band (such as a black and white airphoto), ER Mapper creates a greyscale algorithm similar to the one you created earlier. 6 On the Open dialog, select ‘ER Mapper Algorithm (.alg)’ from the Files of Type drop-down list. 7 Click Cancel on the Open dialog to close it. The default file type will be “.alg” the next time you open it. (This is recommended to simplify these exercises.) 8 Select Close from the File menu to close the image window. Use the Image Display and Mosaic Wizard 1 On the Common Functions toolbar, click the Image Display and Mosaic Wizard button. click to create algorithm The Select files to display and mosaic page of the Image Display and Mosaic Wizard opens 2 Click the Load Image button. The Select File dialog opens. 3 From the Directories menu (on the Select File dialog), select the \examples path. 4 Double_click on the ‘Applications’ directory to open it. 5 Double_click on the ‘Airphoto’ directory. 6 Open the ‘3_Balancing’ directory. 76 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 4#Viewing an image in RGB#z 1: Creating RGB algorithms 7 Double-click on the image dataset ‘ADAR_Del_Mar_1.ers’ to select it. This dataset is a high resolution image covering a portion of Del Mar, California near San Diego. This dataset is a multispectral image acquired by the ADAR 5000 system mounted on an aircraft. The data values represent reflectance of light in three different wavelengths (similar to a multispectral satellite image). 8 Select the following options on the wizard page: Display image in 2D Image will be displayed in a 2D mode. Manually set display method Enables you to set how the image is to be displayed. If you do not select this option, the wizard will set the display method. 9 Click on the Next > button to go to the next dialog box. The wizard will open the Select display method dialog box for you to specify the display method. Select display method. You have the choice of four different display methods: Greyscale Loads a single band into a pseudocolor layer using the greyscale Color Table. Red Green Blue Loads three of the bands into RGB layers. ER Mapper Workbook - Airphoto Mosaic Applications 77 Chapter 4#Viewing an image in RGB#z 1: Creating RGB algorithms Sunshade Loads a single band into a greyscale pseudocolor layer with sun-shading enabled. Colordrape Drapes a pseudocolor layer over an intensity layer with the sun-shading enabled. 10 Select the Red Green Blue option and Manually select display method properties to specify how the image is to be displayed. 11 Click on the Next > button to go to the next dialog box. Select display method The Select How to display using Red Green Blue wizard dialog box allows you to select the image bands that are to be displayed as Red Green and Blue. 12 In the Type: field, select ‘RGB 123’ so that bands 1, 2 and 3 of the image will be displayed as Red, Green and Blue respectively. 13 Click on the Next> button to go to the final dialog box. The wizard will process the image and display it with the transform clip limits set to 99%. 14 In the Image Display and Mosaicing Wizard has finished dialog box, select Finish to close the wizard, or one of the options to change the displayed image. 78 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 4#Viewing an image in RGB#z 2: Working with algorithm layers 2: Working with algorithm layers Objectives Learn to turn data layers on to include them in processing and off to exclude them from processing. Also learn how to move layers, add layers to an algorithm, and understand the concept of Red Green Blue (RGB) algorithms. Select layers in a surface In ER Mapper, a surface is a group of layers that combine to create an image on the screen. Surfaces and layers are shown in the data structure diagram on the left side of the Algorithm dialog. Each surface has one or more layers that can be raster data (such as a scanned airphoto) or vector data (such as a vector GIS overlay of roads). 1 On the main menu, click the Edit Algorithm Algorithm dialog box. button to open the 2 On the Algorithm dialog, click on the Green layer to select it click to select - process diagram applies to selected layer When you select a layer, the process diagram on the right side shows the processing options that pertain to that layer. For example, if you wanted to change the contrast (transform) of the data in the Green layer, you would first select the Green layer and then click the button in the process diagram. 3 Hold down the Shift key and click on the Blue layer. Both the Green and Blue layers are now selected, so you see two process diagrams on the right side. Note: The layer labels ‘Red Layer,’ ‘Green Layer,’ and so on were added by ER Mapper automatically when it created the RGB algorithm. As shown in the previous exercise, you can change the labels to any text desired by clicking on the text when the layer is selected. ER Mapper Workbook - Airphoto Mosaic Applications 79 Chapter 4#Viewing an image in RGB#z 2: Working with algorithm layers Contract and expand the surface diagram 1 Click once on the small “-” (minus sign) button next to the surface name ‘[RGB]:RGB 123.’ The layers are contracted into the surface, and all of their process diagrams are shown on the right side. (This can be useful when working with algorithms that have many surfaces and layers.) 2 Click once on the small “+” (plus sign) button next to the surface name. All three layers are again expanded and shown in the tree structure diagram under the surface name. Turn layers on and off to see the effect 1 On the Algorithm dialog, right-click on the Red layer, and select Turn Off from the shortcut menu. right-click, then select Turn Off The Red layer becomes dim to indicate that it is turned off. 2 Right-click on the Blue layer, and select Turn Off. The Blue layer becomes dim to indicate that it is turned off. ER Mapper displays only the green component of the image (band 2 of the scanned airphoto) because the Blue and Red layers of the algorithm are turned off. Any layers that are turned off are ignored during processing. 3 Right-click on the Red layer again, and select Turn On. ER Mapper displays the red (band 1) and green (band 2) components of the image. (The image looks yellow because combining red and green creates yellow in the RGB color system.) 4 Right-click on the Blue layer again, and select Turn On. ER Mapper displays all the image bands again, so you see a full color image. 80 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 4#Viewing an image in RGB#z 2: Working with algorithm layers Change the order of layers by moving them You can move layers up or down relative to each other by dragging and dropping them, or by selecting them and using the Move Up and Move Down buttons. (Layer order can be important in mosaic algorithms as you will learn later.) 1 Point to the blue icon next to the text “Blue Layer” and drag it up above the Red Layer.. The Blue layer moves to the top of the layer list. You can move layers by dragging and dropping them. 2 Click once on the Red Layer to select it, then click the Move Up button. 2-click Move Up 1-select Red layer The Red layer moves up one position to the top of the list. 3 Click once on the Blue Layer to select it, then click the Move Down button. The Blue layer moves down one position to the bottom of the list. ER Mapper Workbook - Airphoto Mosaic Applications 81 Chapter 4#Viewing an image in RGB#z 3: Loading, adding and changing layers 3: Loading, adding and changing layers Objectives Learn to load a dataset into a specific layer or set of layers in an algorithm. Also learn to add and delete layers, change the layer type, and change the algorithm Color Mode. Load a different dataset into all three layers One of the great advantages of the ER Mapper’s algorithm concept is that any algorithm can be used as a “template” to apply the same processing to another dataset. You simply need to load the new dataset. 1 In the process diagram, click on the Load Dataset button. The Raster Dataset file chooser appears. Move it left so it does not cover the Algorithm dialog. 2 From the Directories menu, select the path ending with the text \examples. 3 Double-click to open the directory named ‘Shared_Data.’ 4 Click once on the dataset named ‘Airphoto.ers.’ 5 Click the Apply button. The dataset is loaded into all three layers in the algorithm. ER Mapper displays an airphoto of downtown San Diego, California as an RGB color composite image. This demonstrates that you can open any existing RGB algorithm and simply load a different dataset to view in RGB also. 6 On the main ER Mapper menu, click the 99% Contrast Enhancement button to improve the image contrast. About the OK and Apply buttons 82 • If all three layers contain the same dataset (as in this case), Apply and OK load the new dataset into all three layers automatically. (Apply and OK are the same except that Apply leaves the dialog open and OK closes it.) • If you want to load a dataset into only the currently selected layer, use Apply this layer only or OK this layer only. This is often useful when creating mosaic algorithms as you will see later. (Apply this layer only and OK this layer only are the same except that the first leaves the dialog open and the other closes it.) • Double-clicking on a dataset name in the file chooser is the same as clicking OK. ER Mapper Workbook - Airphoto Mosaic Applications Chapter 4#Viewing an image in RGB#z 3: Loading, adding and changing layers Delete the Blue and Green layers The following exercise is designed to familiarize you with building an RGB algorithm by deleting, adding and duplicating layers, loading datasets, and selecting bands. Although much of this is automated in ER Mapper, it is important to understand how it works. 1 Click on the Blue layer to select it. 2 Click the Cut button. select Blue layer, then Cut The Blue layer is deleted from the layer list. 3 Click on the Green layer to select it. 4 Click the Cut button to delete the Green layer from the list. ER Mapper displays only the red component of the image (airphoto band 1 in this case) because the Blue and Green layers of the algorithm were deleted. Restore the Green layer by adding one and loading the dataset 1 From the Edit menu, select Add Raster Layer, then select Green. A new Green layer is added to the algorithm. New layers have no dataset loaded (indicated by “No Dataset” above the process diagram), so it is dimmed (off). 2 In the process diagram, click the Load Dataset button. The Raster Dataset file chooser appears. 3 From the Directories menu, select the path ending with the text \examples. 4 Double-click on the directory named ‘Shared_Data.’ 5 Double-click on the dataset named ‘Airphoto.ers’ to load it and close the dialog. ER Mapper loads the dataset into the new Green layer and turns it on. ER Mapper Workbook - Airphoto Mosaic Applications 83 Chapter 4#Viewing an image in RGB#z 3: Loading, adding and changing layers Also note that band 1 is loaded in the Green by default in the process diagram. You will need to select band 2 (green) for this layer to recreate the original RGB color composite. Note: If you had wanted to load this dataset into only the Green layer, you could have clicked OK this layer only or Apply this layer only. 6 From the Band Selection drop-down list, select B2:Green. You have now created a new Green layer that contains the same dataset and band as the original green layer you deleted earlier. Restore the Blue layer by duplicating the Green layer 1 With the Green layer still selected, click the Duplicate button. click Duplicate A second Green layer is added below the first one. The second Green layer is an exact copy of the first one, so it already has the ‘Airphoto’ dataset loaded. 2 Right-click on the new (lower) Green layer, then select Blue from the shortcut menu. The Green layer changes to a Blue layer. 3 From the Band Selection drop-down list, select B3:Blue. The new Blue layer is now correctly set to display band 3 (blue) of the airphoto dataset. Tip: When manipulating multiple layers, duplicating an existing layer with the desired dataset and changing its type is usually faster than adding a new layer and loading the desired dataset. ER Mapper displays the RGB algorithm. You have now rebuilt the original algorithm after deleting the Blue and Green layers earlier. 84 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 4#Viewing an image in RGB#z 3: Loading, adding and changing layers Adjust the transforms of the Green and Blue layers When displaying images in RGB, the red, green and blue layers of the algorithm can be modified and adjusted independently of each other. This lets you “fine tune” the image display as you desire. 1 Select the Green layer, then click the right-hand Edit Transform Limits button in the process diagram select Green layer, click Edit Transform Limits button The Transform dialog box opens showing the histogram for the green band in the airphoto dataset. Notice that the color bar and histogram are also green (this corresponds to the green layer type). 2 Drag the transform line up along the left-hand side. By doing this, you have increased the overall brightness of the green layer in the algorithm, so the image appears more green than before. 3 Click the Create default linear transform button. The transform line returns to its default position and the image redisplays. 4 Click the Move to next blue layer in surface dialog. button on the Transform ER Mapper automatically selects the Blue layer and displays its histogram.) 5 Drag the transform line up along the left-hand side. ER Mapper Workbook - Airphoto Mosaic Applications 85 Chapter 4#Viewing an image in RGB#z 3: Loading, adding and changing layers You increase the overall brightness of the blue layer in the algorithm, so the image appears more blue than before. As you can see, the contrast of each color plane (layer) can be adjusted independently. This is sometimes necessary for airphotos that exhibit a color cast or other color changes characteristics. Tip: When the Transform dialog is open, you can use the buttons to move between the transforms for the Red, Green and Blue layers. (You can also do this by selecting the layer in the Algorithm dialog.) 6 Click the Create default linear transform button. The transform line returns to its default position and the image redisplays. 7 Click Close on the Transform dialog to close it. Change the Color Mode to see how it affects layers 1 In the Algorithm dialog, select the Surface tab. 2 From the Color Mode drop-down list, select Pseudocolor. select Surface tab, select Pseudocolor mode All three layers now have a cross (X) through them, indicating that they are no longer valid with the current Color Mode. Red, Green and Blue layers are only valid with the Color Mode named Red Green Blue. Note: Whenever raster layers are not valid with the current Color Mode, they become crossed out in the layer list. ER Mapper treats inactive layers as if they are turned off when processing the algorithm. 3 Click OK on the ER Mapper error dialog. 4 From the Color Mode drop-down list, select Red Green Blue. 86 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 4#Viewing an image in RGB#z 4: Labelling and saving the algorithm Note: Black and white airphotos usually have only one band of data. To display them, you use the Color Mode named Pseudocolor, a layer of type Pseudo, and the ‘greyscale’ Color Table to create black and white image. 4: Labelling and saving the algorithm Objectives Learn to specify description labels, titles, and comments for an algorithm, and save the algorithm processing steps to a file so you can view it later. Enter a description for the entire algorithm 1 In the Algorithm dialog, select the text in the Description text field (it currently reads ‘RGB 321’). (To select the text, either drag through it, or triple-click to select the entire line.) 2 Type the following text, then press Enter or Return on your keyboard: Airphoto in RGB This text now becomes a brief description for the entire algorithm. Save the processing steps to an algorithm file on disk 1 From the File menu (on the main menu), select Save As.... The Save Algorithm file chooser dialog opens. 2 From the Directories menu, select the path ending with the text examples\. (The portion of the path name preceding it is specific to your site.) 3 Double-click on the directory named ‘airphoto_training’ to open it. 4 In the Save As: text field, click to place the cursor, then type the following name for the algorithm file: Airphoto_in_RGB 5 Click the Apply button to save the algorithm and leave the dialog open. Your RGB algorithm is now saved to an algorithm file on disk. ER Mapper Workbook - Airphoto Mosaic Applications 87 Chapter 4#Viewing an image in RGB#z 4: Labelling and saving the algorithm Add comments to the algorithm 1 On the Save Algorithm dialog, click the Comments... button. 2 In the comments dialog, type the following information: This algorithm displays the airphoto as an RGB algorithm. A 99% autoclip transform is used to increase image contrast. 3 Click OK on the comments dialog to save your comments. 4 Click Cancel on the Save Algorithm dialog close it. Close the image window and the Algorithm dialog 1 Close the image window: • For Windows, click the Close button in the upper-right window corner. 2 On the Algorithm dialog, click the Close button. Only the ER Mapper main menu is now open on the screen. What you learned... 88 After completing these exercises, you know how to perform the following tasks in ER Mapper: • Open a dataset directly and have ER Mapper create a display algorithm • Use the Image Display and Mosaic Wizard to display an RGB algorithm • Understand the red, green and blue layers in an RGB algorithm • Delete, add and change layers in an algorithm • Use transforms to adjust the RGB color contrast ER Mapper Workbook - Airphoto Mosaic Applications 5 Image rectification This chapter explains how to use ER Mapper to geometrically correct raw airphotos and rectify them to real world coordinate systems and map projections. This is an essential step when creating a mosaic of images. About image rectification In order to create a mosaic of two or more airphotos, you must geometrically correct the raw airphoto dataset to a known map coordinate system. A common way to do this is by selecting ground control points (GCPs) between the raw airphoto and a reference image or map, and then creating a new output image that is rectified (or geocoded) to the real world coordinate system. raw (uncorrected) airphoto airphoto corrected to the UTM coordinate system ER Mapper Workbook - Airphoto Mosaic Applications 89 Chapter 5 Image rectification z About image rectification A ground control point (GCP) is a point on the earth’s surface where both image coordinates (measured in rows and columns) and map coordinates (measured in degrees of latitude and longitude, meters, or feet) can be identified. Rectification is the process of using GCPs to transform the geometry of an image so that each pixel corresponds to a position in a real world coordinate system (such a UTM or State Plane map projection). This process is sometimes called “geocoding” or “rubbersheeting” because the image data are stretched or compressed as needed to align with a real world map grid or coordinate system. To perform a control point rectification, you need a raw and reference dataset: • The raw dataset is simply a digitized airphoto that has been imported into ER Mapper • The reference dataset is any other dataset, hardcopy map, or set of known coordinate points that can be used to correct the raw dataset. You can use another airphoto or image that has already been rectified, a geocoded vector dataset, a hardcopy map mounted on a digitizing table, or GPS survey points of known features in your image (such as buildings or road intersections). Note: Some airphoto datasets have already been rectified before import into ER Mapper. These include orthorectified datasets such as the USGS Digital Ortho Quad (DOQ) series and others. In this case, you do not need to rectify the dataset in ER Mapper, you only need to make sure the proper datum, projection, and other parameters are specified (usually using the dataset header editor). Note: Orthorectification, which is described in the next chapter, is a more accurate method for geocoding images. For this reason, it is generally recommended for use with airphotos. 90 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z Hands-on exercises In this exercise, you will perform an image-to-image rectification. A typical procedure for performing an image-to-image rectification is as follows: Geocoding Wizard Open the Ortho and Geocoding Wizard, enter the raw (uncorrected) and reference images, and start the Define Ground Control Points function Manually Choose 4 GCPs Choose the first 4 ground control points between the raw (FROM) image window and the reference (TO) image window Choose additional GCPs Choose additional GCPs using an automated technique based on the transformation defined by the first 4 GCPs Refine or delete GCPs Refine the location of individual GCPs (or delete GCPs) as needed to reduce the overall RMS error to an acceptable threshold Rectify the image Create a new output dataset rectified to the reference dataset’s datum and map projection Evaluate registration accuracy Evaluate the accuracy of the rectification using simple overlays or other techniques Hands-on exercises These exercises give you practice using ER Mapper’s Rectification features. What you will learn... After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Choose common ground control points (GCPs) between two images ER Mapper Workbook - Airphoto Mosaic Applications 91 Chapter 5 Image rectification z 1: Setting up the raw and reference images Before you begin... • Use options to modify the GCP display and edit GCPs • Evaluate the error associated with GCPs • Rectify a “raw” image to the chosen datum and projection of a reference dataset • Evaluate registration accuracy using a simple overlay method • View the map coordinates of any part of the rectified image Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. Note: It is very important to adhere to the following procedures exactly as written. Choosing GCPs can be a fairly complex procedure, and you will learn the basic concepts best by following these exact steps the first time. After you become familiar with the basic procedures, you can modify them as you like. 1: Setting up the raw and reference images Objectives Learn how to open the Ortho and Geocoding Wizard and enter the raw and reference images. Open the Ortho and Geocoding Wizard 1 On the Common Functions toolbar, click on the Ortho and Geocoding Wizard button. Ortho and Geocoding Wizard The Geocoding Wizard dialog opens with the Start tab selected. 2 On the Geocoding Wizard dialog, click the Load Algorithm or Dataset button. A file chooser dialog box appears. 92 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 1: Setting up the raw and reference images Enter the file name of the raw dataset 1 From the Directories menu on file chooser dialog, select the path ending with \examples. 2 Double-click on the directory ‘Applications’ to open it, then double-click on the directory, ‘Airphoto’ followed by ‘1_Geocoding’. 3 In the 1+Geocoding directory, double-click on the ‘San_Diego_Airphoto_34_not_rectified.ers’ file to load it. This is an Airphoto of downtown San Diego, which has not yet been rectified. Note: You can also load ER Mapper algorithm files for rectification. 4 In the Geocoding Type box, select Polynomial. This specifies that Polynomial rectification is to be used. Polynomial uses polynomial equations to transform the raw dataset to the rectified output grid, it is best for reducing global distortion. The other option, Triangulation, uses a mesh of triangles between each set of three GCPs, and does a linear rectification within each triangle (best for highly skewed data because it reduces local distortion). Select the Polynomial Order 1 Click on the 2) Polynomial Setup tab to go to the next page of the Geocoding Wizard. ER Mapper Workbook - Airphoto Mosaic Applications 93 Chapter 5 Image rectification z 1: Setting up the raw and reference images 2 On the Polynomial Order box, select Linear. The Polynomial Order is the geometric coordinate transformation that relocates every pixel in the input (raw) dataset to its proper position in the output (rectified) dataset (also called spatial interpolation). The order is the highest exponent used in the polynomial equation, with Linear being first-order, Quadratic second-order, and Cubic third-order. In general, you should select the lowest order that gives an acceptable RMS. You must have at least 3 GCPs to perform a Linear rectification, 6 for Quadratic, and 10 for Cubic Enter the file name of the reference dataset 1 Click on the 3) GCP Setup tab to go to the next Geocoding Wizard page. 2 On the GCP Picking Method box, select the Geocoded image, vectors or algorithm option. The Load Corrected Algorithm or Dataset you to select the reference dataset. button will appear to allow You also have the option of selecting the GCPs from a paper map on a digitizer table or typing the GCP coordinates directly in on the 4) GCP Edit wizard page. 3 Click on the Load Corrected Algorithm or Dataset file chooser dialog box. button to open a 4 From the Directories menu on file chooser dialog, select the path ending with \examples. 94 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 2: Picking the first four GCPs 5 Double-click on the directory ‘Applications’ to open it, then double-click on the directory, ‘Airphoto’ followed by ‘1_Geocoding’. 6 In the 1+Geocoding directory, double-click on the ‘San_Diego_Airphoto_34_rectified.ers’ file to load it. This is an Airphoto of downtown San Diego, which has previously been rectified. You should also note that the Output Coordinate Space box displays the geocoding information of the reference dataset. If you want the output rectified dataset to have different coordinate information, you can click on the Change... button to open the Geocoding Wizard Output Coordinate Space dialog box. This allows you to select the Datum, Projection and Coordinate system type for the image. Please refer to the ER Mapper User Guide for more information. 2: Picking the first four GCPs Objectives Learn how to start the Define Ground Control Points function, and pick the first four GCPs between the RGB airphoto and vector roads image windows. Open the GCP editor and remove existing GCPs 1 Click on the 3) GCP Setup tab to go to the next Geocoding Wizard page. ER Mapper Workbook - Airphoto Mosaic Applications 95 Chapter 5 Image rectification z 2: Picking the first four GCPs ER Mapper opens several image windows and dialog boxes. You should see a screen setup similar to this one: UNCORRECTED GCP ZOOM WINDOW CORRECTED GCP ZOOM WINDOW UNCORRECTED GCP (OVERVIEW ROAM geolink) WINDOW ER Mapper main menu CORRECTED GCP (OVERVIEW ROAM geolink) WINDOW Geocoding Wizard dialog box Note: If your system does not position the windows automatically, rearrange them as shown above before proceeding. 2 On the Geocoding Wizard dialog, click on the Delete all GCPs to remove any GCPs that may have previously been picked. button Delete all GCPs You can save all geocoding information in the header file of the raw dataset. This means that you do not have to re-enter it when you next geocode the image. We will use this feature in later exercises. For this exercise we will remove all previously entered information. 96 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 2: Picking the first four GCPs Setup the image windows to pick the first four GCPs When you first begin picking GCPs, your “raw” (unrectified) image contains no ground control points. You will begin by picking the first four control points using the CORRECTED and UNCORRECTED image windows. Once you have picked the first four GCPs, you can use the CORRECTED windows to quickly pick the remaining GCPs. Note: The reference image only covers a part of the raw image. This means that we can only rectify that part of the image with any accuracy. We will crop the output rectified image to be the same size as the reference image by setting the extents later in this exercise. 1 On the main menu, click the Edit Algorithm Algorithm window. button to open the 2 Click inside the ’CORRECTED GCP ZOOM’ window to activate it. 3 In the Algorithm window, turn off the Smoothing option. 4 Click your right mouse button inside the ‘CORRECTED GCP ZOOM’ window, and select Zoom to All Datasets from the Quick Zoom menu. The ‘CORRECTED GCP ZOOM’ window zooms out to the full image extents. 5 Click inside the ‘UNCORRECTED GCP ZOOM’ image window to activate it. 6 In the Algorithm window, turn off the Smoothing option. 7 Click your right mouse button inside the ‘UNCORRECTED GCP ZOOM’ window, and select Zoom to All Datasets from the Quick Zoom menu. The ‘UNCORRECTED GCP ZOOM’ window zooms out to the full image extents. You are now ready to pick your first GCP. 8 Click Close on the Algorithm window to close it. Note: It is a good idea to turn off the Smoothing option on algorithms where you will pick ground control points. This makes it easier to see the locations of individual image pixels when you zoom in closely to areas. ER Mapper Workbook - Airphoto Mosaic Applications 97 Chapter 5 Image rectification z 2: Picking the first four GCPs Pick a GCP in the upper-left part of both images Note: Make sure the main ER Mapper menu is not hidden by the image windows–move it slightly if needed so you can easily access the toolbars. 1 On the main menu, click the ZoomBox Tool toolbar button. 2 Point to the ‘UNCORRECTED GCP ZOOM’ image window, and zoom in on a small area in the upper-left part of the image with well defined features (drag a zoom box). 3 Move the pointer over the ‘CORRECTED GCP ZOOM’ image window (notice the pointer is a icon), and click once to activate the window. 4 In the ‘CORRECTED GCP ZOOM’ image window, drag a box to zoom in on the same geographic area you have displayed in the ‘UNCORRECTED’ window. You have now zoomed to a common area in both images to pick a GCP. 5 On the main menu, click the Pointer Tool toolbar button. 6 In the ‘CORRECTED GCP ZOOM’ window (which is active), click on a clearly identifiable feature in the image, such as a sharp boundary between red vegetation and white barren land. ER Mapper marks the control point with green cross hairs, and the geographic location of that point appears in the Easting and Northing fields on the Geocoding Wizard GCP Edit dialog. (This dialog has many options you will learn more about later.) 7 Click once inside the ‘UNCORRECTED GCP ZOOM’ window to activate it. 8 Click on exactly the same geographic feature in the ‘UNCORRECTED GCP ZOOM’ window. (It is important to be as accurate as possible). ER Mapper marks the control point with cross hairs, and the image pixel location of that point in the raw image appears in the Cell X and Cell Y fields on the GCP Edit dialog. The location of each point is marked with a white “X” in each image with the number “1.” You have now picked the first GCP. 98 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 2: Picking the first four GCPs . Cell X & Y location of GCP in raw image Eastings & Northings of GCP in reference image Pick a second GCP in the lower-left of both images 1 On the Geocoding Wizard GCP Edit tab, select Auto zoom. The ZOOM windows will now automatically zoom into the point selected in the corresponding OVERVIEW ROAM windows. 2 On the Geocoding Wizard Edit GCP dialog, click the Add new GCP button. 3 Click on a well defined feature in the ‘UNCORRECTED GCP (OVERVIEW ROAM geolink)’ window to select it. The ‘UNCORRECTED GCP ZOOM’ window will zoom ito the selected point 4 Click once in the ‘CORRECTED GCP (OVERVIEW ROAM geolink)’ window to activate it, then click on the same feature to select it as a GCP. The ‘CORRECTED GCP ZOOM’ window will zoom ito the selected point 5 Use the two ZOOM windows to adjust the positions of the GCP. You have now picked a second GCP in the image. ER Mapper Workbook - Airphoto Mosaic Applications 99 Chapter 5 Image rectification z 2: Picking the first four GCPs Pick two more GCPs in the upper- and lower-right 1 Following the steps from the previous section, pick a GCP near the upperright and lower-right corners of the images. Tip: When picking the first four GCPs, it is best to pick them in the four corners of the CORRECTED image (if this is possible). This will make the Calculate from point function you will use next as accurate as possible. (In this case there was ocean in the lower-left, so you picked a point in the closest area possible.) Once you have picked the first four GCPs, notice that ER Mapper now displays values in the ‘RMS’ field on the GCP Edit dialog. The Root Mean Square (RMS) error is a measurement of the accuracy of the GCP in this image expressed in the image’s pixel size. (An RMS of 1.00 would be 80 meter positional error in the case of the Landsat MSS data used here.) If you have done an accurate job selecting the first four GCPs, the RMS should be one or less. When an RMS can be calculated, ER Mapper can now use the coefficients generated from the first four points to “predict” the location of ‘UNCORRECTED’ (raw) points when you pick additional points in the ‘CORRECTED’ (rectified) image. This feature makes selection of the remaining points much faster and easier, and you will use it next. About RMS errors GCPs are used to compute a mathematical transformation to rectify the raw image to a geographic frame of reference (in this case, the UTM map projection of the vector dataset). Using coordinate transform coefficients computed from the GCPs, it is possible to model geometric distortions in the raw airphoto. A common way to measure this distortion is by computing the root mean square (RMS) error for each control point. This value represents the accuracy of the GCP in the image. ER Mapper is able to compute the RMS error when you have selected at least four control points. The RMS error is expressed in the dataset’s pixel size (or corresponding units of a vector dataset). This raw airphoto has a pixel size of 2 meters, so an RMS of 5.00 represents a 10 meter positional error. GCPs with lower RMS errors are more accurate than ones with higher errors, and you should strive to pick your control points with the lowest possible RMS error. If you have control points with high errors, you can try to adjust them to decrease the error, or delete them. (Steps for adjusting GCPs will be covered later.) 100 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 3: Picking additional GCPs in the images 3: Picking additional GCPs in the images Objectives Learn how to use the overview image window and “Calculate uncorrected point” function to help speed and simplify picking of the remaining control points. After you have picked your first four GCPs, ER Mapper can use the resulting geometric model to predict where a point picked in the reference ‘CORRECTED’ image will be located in the raw ‘UNCORRECTED’ image. Based on this, you will use a different technique for picking the rest of your control points for this exercise. Pick additional GCPs using the Corrected GCP Overview window 1 On the main menu, click the Set Pointer mode button (if needed). 2 If needed, activate the ‘CORRECTED GCP (OVERVIEW ROAM geolink)’ window by clicking in it. 3 On the Geocoding Wizard Edit GCP dialog, click the Add GCP button. 4 In the ‘CORRECTED GCP (OVERVIEW ROAM geolink)’ window, click on a well defined feature near the center of the image. ER Mapper marks the control point with cross hairs, and enters the geographic location of GCP #5 in the TO Easting and Northing fields. The ‘CORRECTED GCP ZOOM’ window zooms into the point for you to adjust its position. 5 In the Geocoding Wizard GCP Edit dialog, click the Calculate from point button. ER Mapper automatically enters values in Cell X and Cell Y fields–this is the “predicted” location of GCP #5 in the FROM image. Notice that the new GCP #5 has an RMS error of zero. Since it’s location is computed from the existing points, it adds no new information to the rectification model (and is therefore not yet a true GCP). Next you need to “fine tune” the location of the point in the ZOOM windows to make it a true GCP. 6 Click once in one of the ZOOM windows to activate it, then click on the GCP in the image. Adjust its position if necessary. ER Mapper repositions GCP #5 to the new position, and calculates an RMS value to display in the Geocoding Wizard GCP Edit dialog box. You have now picked a fifth GCP using the “predict FROM points” technique. ER Mapper Workbook - Airphoto Mosaic Applications 101 Chapter 5 Image rectification z 3: Picking additional GCPs in the images Tip: You can keep clicking in the UNCORRECTED AND CORRECTED ZOOM windows as many times as needed to refine the GCP location. Pick several other points spread throughout the images 1 Using the procedure in steps 2-6 above, pick several other GCPs well spread throughout the image (pick at least 10). Tip: If the default magnification level in the ZOOM windows is too great or small for your taste, activate each window and use the Zoom In or Zoom Out options in the Quick Zoom menu to change the zoom factor by a fixed amount in both windows. That zoom factor is retained for subsequent points. (If you make a mistake, you can select Previous Zoom to fix it.) Other features on the GCP Edit dialog The GCP Edit dialog contains a number of controls to help adjust GCPs and visualize errors and relationships between GCPs. undo last include GCP lock GCP in RMS calc from editing GCP click height at GCP (if available) root mean square (RMS) error display polynomial grid display error bars auto zoom on selected GCP list GCPs in order of RMS values save GCPs with raw dataset 102 save GCPs and exit ER Mapper Workbook - Airphoto Mosaic Applications exit without saving GCPs Chapter 5#Image rectification#z 3: Picking additional GCPs in the images 1 In the Geocoding Wizard GCP Edit dialog, click on any GCP number under the ‘Name’ column. ER Mapper moves the crosshairs to highlight that point in all the ‘OVERVIEW ROAM’ and ‘ZOOM’ windows. 2 Turn off the Auto Zoom option. 3 Click on any GCP number under the ‘Name’ column. ER Mapper moves the crosshairs to highlight that point in the ‘OVERVIEW ROAM’ windows, but not the ‘ZOOM’ windows. 4 Click on the Zoom to current GCP button. ER Mapper zooms into the selected GCP in the “ZOOM’ windows. 5 Turn on the Auto Zoom option. View the contribution of a single GCP to the RMS errors 1 In the GCP Edit dialog, click on the number under the ‘Name’ field for a GCP with a high RMS error value. (You can scroll the GCP list or make the GCP Edit dialog bigger to see more points at once.) ER Mapper highlights that GCP location in the large ‘TO’ window, and zooms to that point on the smaller zoom windows. This is now the active GCP, so any clicking in the image windows will relocate it. 2 Click on the text ‘On’ in the second column for the selected GCP. The text changes to ‘Off’ and all the RMS errors are recomputed without including that GCP. Generally you will see the RMS errors of other GCPs go down when a GCP with a high RMS is turned off. This helps you determine how the positional error of any GCP influences the RMS of the others. This can be important when choosing which GCPs will be used for the final image rectification. A GCP that is turned off is marked with a red cross in all the image windows. 3 Click on the text ‘Off’ in the second column to turn the GCP on again. The RMS errors for all GCPs are again recomputed. Refine the location of the high error GCP 1 Turn on the Errors option. The magnitude and direction of the calculated positional error are shown graphically by a line extending from the GCP in the ‘UNCORRECTED GCP ZOOM’ window. You can use this as a guide to help adjust the position of the GCP to make it more accurate. ER Mapper Workbook - Airphoto Mosaic Applications 103 Chapter 5 Image rectification z 3: Picking additional GCPs in the images 2 Turn on the x10 option (if it is not already on). When you turn on the Errors option, an additional x10 option also appears. When x10 is turned on, the length of the error bar line is magnified 10 times to make it more visible. (If you have very small RMS errors you may not see the error line without the x10 option turned on.) The length of the line is equivalent to the RMS in pixels, so a an RMS of 5 makes a line 5 pixels long (if the x10 option is off) or 50 pixels long if x10 is on. 3 In the ‘UNCORRECTED GCP ZOOM’ window, reposition the GCP by clicking slightly away from the original location in the direction of the error line. adjust GCP location by clicking a small amount in the direction of the error line The RMS error for that GCP may go down, depending on where you clicked. The RMS errors for all other GCPs are also recomputed, and they may also go down (although some may go up as well). (Remember that the error line is magnified 10 times with x10 turned on, so you should generally not adjust the GCP more than one-tenth of the line length.) 4 Click on the text ‘Undo’ in the fourth column for your active GCP. The result of your last mouse click are reversed, so the previous values are filled into the ‘Cell X’ and ‘Cell Y’ fields for that GCP. Clicking ‘Undo’ lets you quickly return to the previous location if you make a mistake. 5 Click on the text ‘Redo’ in the fourth column for your active GCP. The result of your last mouse click is again restored. ‘Undo’ and ‘Redo’ are helpful features when refining GCPs. They always apply to the last mouse click, in either the ‘FROM’ or ‘TO’ image windows. 104 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 3: Picking additional GCPs in the images Note: Sometimes an error bar will appear to indicate that you should move a GCP to an area where it clearly does not line up with the chosen feature in the two images. This can be due to inaccuracies in the reference dataset or other factors, so you should not rely on the error bar as an absolute indicator. (Use it only as a general guideline.) Lock a GCP so cannot be edited 1 Click on the text ‘Edit’ in the third column for any GCP. The text changes to ‘No’ and the “X” and number marking it in the image turns green. This effectively “locks” a GCP so it cannot be edited (that is, clicking in the image windows do not redefine it’s position). This is useful when you have several very good GCPs and you to lock them to avoid accidentally changing them. 2 Click on the text ‘No’ in the third column to unlock the GCP. Enter a label for a GCP 1 Select the number text for a GCP under the ‘Name’ column, and type a short name. You can give GCPs text labels as well as numbers to help identify them. For example, you might label a GCP for the intersection of the two roads. Adjust the location or delete GCPs with high errors 1 Using the information you learned previously, try to refine the location of your five highest error GCPs to reduce their RMS error to less than 5.00. The basic procedure is: • Click on the label under the ‘Name’ column of the GCP you want to adjust– ER Mapper selects the GCP and zooms to it in the two left-hand zoom windows. • Adjust the location of the GCP by clicking in the ‘UNCORRECTED GCP ZOOM’ or ‘CORRECTED GCP ZOOM’ windows to try to reduce the RMS error. (There is a limit to how low an RMS error you can achieve, so don’t be too concerned with this.) • If you cannot reduce the RMS of a particular GCP, you may choose to delete the GCP altogether by clicking the Delete GCP more GCPs to account for any you deleted. button. If desired, select a few At the end, you should have 10 GCPs with RMS errors less than 10.00, and well distributed throughout the airphoto image. ER Mapper Workbook - Airphoto Mosaic Applications 105 Chapter 5 Image rectification z 2: Perform the image rectification Tip: When rectifying images to create a mosaic, it is very important to try to pick GCPs toward the edges of the image where it will overlap with other images. This will help ensure that features on adjacent images will align well when the mosaic is created, and minimize offset or shifted features. View a polynomial grid over the entire airphoto image 1 On the GCP Edit dialog, turn on the Grid option. A green polynomial grid displays over the airphoto image and the three other image windows. This grid is a simple “preview” of the way in which the FROM (raw) dataset pixels will be reprojected or translated onto the new coordinate grid of the TO dataset. The geometry of the raw airphoto image will be changed during the rectification process so that the grid would be aligned straight up and down. Typically, the grid should appear as straight, evenly spaced lines for images that cover small geographic areas like this one. If you were to see skewing or warping of the grid, this indicates a poor fit of the GCPs in that area of the image. 2 Turn off the Grid option Save the GCPs to the raw dataset 1 Click Save on the GCP Edit dialog. When asked confirm saving the GCPs to disk, click Yes. ER Mapper saves the GCPs to the header file of the raw airphoto dataset. These will be used to rectify the raw dataset to the UTM map projection coordinates obtained from the vector roads dataset. 2: Perform the image rectification Objectives Learn how to use the ground control points you selected to rectify the image to the selected datum and map projection. Specify output (rectified) image file 1 Select the Geocoding Wizard Rectify tab. 2 Click the file chooser button in the Output Info box. 3 From the Directories menu, select the path ending with \examples. 106 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 2: Perform the image rectification 4 Double-click on the ‘airphoto_training’ directory to open it. 5 Enter the filename San_Diego_rectified_polynomial (start with your initials), then click OK. 6 In the Resampling: in the Cell Attributes box select ‘Nearest Neighbour’. The Cell Attributes box also lets you resample the output image to a different cell size (Output Cell width and height), and specify a null cell value. Set extents of output image The reference dataset covers a smaller area than the raw dataset. We can edit the extents of the output rectified image so that it covers the same area as the reference dataset. 1 On the Geocoding Wizard dialog, click on the Edit Extents button to open the Geocode Output Extents dialog box. This box allows you to specify the extents of the output rectified image. For Polynomial rectification you can set this in three ways: Maximum extents This is the default setting, which sets the extents to be that of the full raw image. Custom extents Allows you to enter the exact top left and bottom right coordinates of the image. We will be using this option. Snapshot. This is enabled when the Custom extents option is chosen. It automatically enters the coordinates of the zoomed in the currently active window. ER Mapper Workbook - Airphoto Mosaic Applications 107 Chapter 5 Image rectification z 2: Perform the image rectification 2 Select the Custom extents option and enter the Easting/Northing values shown below. These values are the coordinate extents for the reference image. Note that the Latitude and Longitude values change automatically as you change the Eastings and Northings values. 3 Click on the OK button to exit the Geocode Output Extents dialog box. Create the output rectified image on disk 1 Check that the Output Info and Cell Attributes are similar to what is shown below: Size of rectified image file. Physical size of rectified image 2 If the values are not similar to what is shown above, Click on the Default Cell Size button. 108 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 3: Evaluating image registration Leave the Null cell value box unchecked, so that the rectified image will use the same null cell value (if any) as that of the reference image. If you check the box, you can enter a null cell value. 3 Select Display rectified image to display the image after it is rectified. 4 Click on the Save file and start rectification button. ER Mapper opens a status dialog to indicate the progress of the rectification. This should take about five minutes to complete. 5 When the operation finishes, click OK on the successful completion dialog. 6 Click on the Close button to exit the Geocoding Wizard. You have now rectified the uncorrected San Diego airphoto correspond to the 1927 North American Datum (NAD27) and UTM zone 11 (NUTM11) map projection. 3: Evaluating image registration Objectives Learn a simple way to visually evaluate the registration of two images using an overlay technique. In this case, you will evaluate the registration of the raw image you rectified and the rectified MSS image supplied with ER Mapper. Evaluate the image orthorectification 1 On the main menu, click the Edit Algorithm Algorithm window. button to open the 2 The Algorithm window shows the Red, Green and Blue layers of the orthorectified image ‘_Airphoto_orthorectified’ 3 In the Algorithm window, click on the Blue layer to select it. 4 Click the Load Dataset button in the algorithm process diagram. 5 From the Directories menu, select the path ending with \examples. 6 Double-click on the ‘Applications’ directory to open it. 7 Double-click on the ‘Airphoto’ and then on ‘1_Geocoding’ directory to open it. 8 Click once on the image ‘San_Diego_Airphoto_34 _rectified.ers’ to select it, then click OK this layer only button to load it into the Blue layer. (The Red and Green layers should still have the your rectified image.) 9 Select B3:Blue from the Blue layer’s Band Selection drop-down list. ER Mapper Workbook - Airphoto Mosaic Applications 109 Chapter 5 Image rectification z 3: Evaluating image registration Display the two images to evaluate registration 1 Click the 99% Contrast Enhancement toolbar button. This image combines two different images–one in the Red and Green layers and one in the Blue layer. If your images are well aligned the image appears normal. If you see areas that are dominantly yellow or blue, this indicates poor registration. 2 On the Algorithm window, turn off the Smoothing option. 3 On the main menu, click the ZoomBox tool toolbar button. 4 Drag a zoom box over a very small area of the image that contains land and water. Errors in registration appear as either blue or yellow pixels because this is where the two images do not align perfectly. This is a very simple way to evaluate the registration of two images. If the RMS errors of your GCPs were generally less than one, you should not see more that one pixel offsets or registration errors. Blue and yellow pixels indicate areas of poor registration View geographic coordinates in the image 1 On the main menu, click the Pointer Tool button. You must use the Pointer tool to view geographic coordinates in an image. 2 In the Algorithm dialog, select the ‘Blue Layer’ in the layer list. 3 From the View menu, select Cell Coordinate.... The Cell Coordinates dialog appears. Drag it next to the image window. 110 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 5#Image rectification#z 3: Evaluating image registration The upper three fields of this dialog show the location of the current pixel in dataset column (X) and row (Y) coordinates, and the Eastings/Northings and Latitude/Longitude coordinate systems. 4 Point to the image window, and drag the pointer through the image. The dataset and geographic location of the current cell appear, and are updated as you drag the mouse. Using this, you can query the geographic location of any feature in your rectified airphoto. column (X) and row (Y) location of cursor geographic location of cursor in image Note: The Easting Northing and Latitude Longitude field values only display if the dataset is rectified to a map projection. If you are displaying a “raw” image, only values dataset X and Y pixel locations are displayed. View distances between points in the image The lower three fields of the Cell Coordinate dialog show distance between the point where you first depress the mouse button and the point where you release it. Distances are shown as Imperial distance (feet and miles), Metric distance (meters and kilometers), and Dataset distance (number of pixels in the X and Y directions). 1 Point to the image window, and click on any point in the image. The Imperial, Metric, and Dataset distance fields are cleared to zero values. 2 Pick out two features in the image, then drag the mouse between them. This distance between those two points is displayed when you release the mouse button. Measuring the distance between two points is called mensuration. distance between points in image ER Mapper Workbook - Airphoto Mosaic Applications 111 Chapter 5 Image rectification z 3: Evaluating image registration 3 Click the Close button on the Cell Coordinates dialog box to close it.Close all image windows and dialog boxes 4 Close all image windows using the window system controls: • For Windows, select Close from the window control-menu. 5 Click Close on the Algorithm window to close it. Only the ER Mapper main menu should be open on the screen. Only the main menu should be open on the screen. What you learned... 112 After completing these exercises, you know how to perform the following tasks in ER Mapper: • Choose common ground control points (GCPs) between two images • Use options to modify the GCP display and edit GCPs • Evaluate the error associated with GCPs • Rectify a “raw” image to the chosen datum and projection of a reference dataset • Evaluate registration accuracy using a simple overlay method • View the map coordinates of any part of the rectified image ER Mapper Workbook - Airphoto Mosaic Applications 6 Image orthorectification This chapter explains how to use the ER Mapper Geocoding Wizard to geometrically correct raw image data and orthorectify it to real world coordinate systems and map projections. About orthorectification Orthorectification is more accurate than Linear or Polynomial rectification because it corrects local and global distortions in an image by adjusting for camera characteristics, platform positions and terrain details. The camera characteristics, derived from a camera calibration report, are stored in a camera file for use by the Geocoding Wizard. The terrain details are supplied in the form of a DEM. If the terrain is relatively flat, you can use an average height value. In the case of Advanced Orthorectification, the platform position is determined by exterior orientation values which describe the exact position of the aircraft at the time the image was taken, and how this relates to the image. The following parameters are specified: Attitude omega The tilt angle (roll) of the aircraft; i.e. the rotation about the X axis (direction of travel). ER Mapper Workbook - Land Information 113 Chapter 6 Image orthorectification ● About orthorectification Attitude phi The swing angle (pitch) of the aircraft; i.e the rotation about the Y axis. Attitude kappa The azimuth angle (yaw)of the aircraft; i.e the rotation about the Z axis. Exposure center XYZ The co-ordinates of the exposure center of the image. If the exterior orientation parameters are not known, you have to specify about 4 to 6 GCPs for the Geocoding Wizard to compute them. To use Orthorectification you must have the following information available: • Camera file containing camera calibration information • DEM file (You can enter an average height if the terrain is relatively flat) • Exterior orientation (Only for Advanced Orthorectification. Otherwise you must select GCPs) • GCPs referenced by their XYZ coordinates. The diagram below illustrates the required inputs for orthorectification. Camera Calibration Report Camera Wizard Exterior Orientation DEM Camera File OR average height Roll Pitch Yaw Exposure Center Ground OR Control Points Uncorrected image (airphoto) Corrected image (airphoto) Geocoding Wizard Orthorectification 114 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● Hands-on exercises Hands-on exercises These exercises give you practice using ER Mapper’s Geocoding Wizard to orthorectify an airphoto image. What you will learn... Before you begin... After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Use the Geocoding Wizard to orthorectify an airphoto • Use the Camera Wizard to create a Camera File from a calibration report • Locate fiducial marks on an airphoto • Pick suitable Ground Control Points (GCPs) Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. In these exercises you will use the Geocoding Wizard to orthorectify the same airphoto image of San Diego taken in 1997, that we used in the previous chapter. we will then be able to compare the results. The example images are used with permission from Aerial Fotobank. 1: Orthorectify an airphoto using GCPs Objectives Learn how to use ER Mapper’s Geocoding Wizard to orthorectify an airphoto. Use the Camera Wizard to create a Camera File with given calibration parameters. Select Ground Control Points Open the Geocoding Wizard 1 Click on the Ortho and Geocoding Wizard Functions toolbar. button in the Common ER Mapper Workbook - Land Information 115 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs The Geocoding Wizard will open with the 1) Start tab selected. 2 Click the Load Algorithm or Dataset open the file chooser. button in the Input file: field to 3 From the Directories menu, select the path ending with the text \examples. 4 Select the directory ‘Applications\,Airphoto\1_Geocoding’ and then doubleclick on ‘San_Diego_Airphoto_34_not_rectified.ers’ to select it. 5 Select the Geocoding Wizard Orthorectify using ground control points option. In this example, you do not have exterior orientation parameters which provide information on the position of the platform or aircraft. Instead, you will pick GCPs so that the wizard can compute the exterior orientation parameters. If these parameters were available, you would have chosen the Orthorectify using exterior orientation option. 6 Select the 2) Ortho Setup tab. 116 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs Enter terrain and camera details This tab allows you to enter the terrain details in the form of a DEM or as an average height value. Obviously, using a DEM would produce a more accurate result. However, if the terrain is relatively flat, you can enter an average value. In this example you will enter the name of a DEM file. You supply the camera details to the Geocoding Wizard in the form of a camera file. If the applicable camera file does not exist, you can use the Camera Wizard to create one. 1 Select the Use a DEM file as height option in the DEM Setup box. Notice that the DEM Setup box changes according to the option that you choose. Because you selected the Use a DEM file as height option, the DEM Setup box displays a file and a band chooser for you to select the DEM file and the required data band. 2 Click on the Load input DEM File button to open the file chooser. 3 Select the file ‘San_Diego_DEM.ers’ from the ‘examples\Applications\,Airphoto\1_Geocoding’ directory and click on the OK button to return to the Geocoding Wizard. 4 Click on the Camera Wizard dialog. button to open the Camera Wizard ER Mapper Workbook - Land Information 117 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs Create a Camera file The Camera Wizard creates a Camera file for the Geocoding Wizard to use. It does this by providing a number of dialog boxes for you to enter camera calibration information. You normally get this information from a camera calibration report. If you do not have a valid calibration report for the camera that was used to take the image, you can use a generic report for that camera model. This could result in a some inaccuracies. 1 Click on the Create new option to create a new Camera File. You could edit an existing Camera File, in which case the wizard provides you with the Camera file: field and chooser to enter the name of the existing file. 2 Click on the Next> button to go to the Camera identification page. 118 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs The information you enter here is not used by the Geocoding Wizard. Therefore it can be omitted. It is, however, a good idea to include it because it is a means of identifying the camera and the calibration report in the future. 3 Enter the following information in the applicable fields: Manufacturer: Wild Model: RC20 Lens serial number: 13115 Date calibrated: Day: 31 Month:10 Year: 1998 4 Click on the Next> button to go to the ‘Camera attributes page’. Use this page to enter information on the focal length of the camera lens. The Camera Wizard uses this information, so it must be entered. In addition, you can enter information on the position of the Principal Point relative to the lens center as a measure of lens distortion. Any distortion in the lens would cause the principal point to be offset from the lens center. 5 Enter the following information in the applicable fields: Focal length: 152.793 X offset to principal point: 0 Y offset to principal point: 0 ER Mapper Workbook - Land Information 119 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs This is the ideal case where the principal point is at the lens center on the focal plane. Lens distortion could cause it to be slightly off-center, and this is represented by the X and Y offsets to the principal point. The diagram below illustrates this by exaggerating the lens distortion. Principal point Lens X offset Focal length Y offset Lens center Focal plane 6 Click on the Next> button to go to the ‘Number of Fiducial points’ page Aerial photography cameras insert Fiducial marks around the edges of the airphoto images. The Geocoding Wizard uses the positions of these marks to relate the image to the camera model. Different cameras insert these marks in different places on the image. Use this page to specify where the camera has placed the Fiducial marks. If you specify four Fiducial marks where the camera has, in fact, inserted eight, the Geocoding Wizard will only take into consideration the four you specified. 120 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs 7 Select the All 8 option; indicating that the Fiducial points are on the four corners and the middle of edges of the image. 8 Click on the Next> button to got to the ‘Fiducial point offsets’ page. This page enables you to specify the positions of the fiducial points relative to the principal point. 9 Enter the following values in the applicable fields: Top left X:-105.99 Y:106.01 Middle top X: 0.011 Y: 110.01 Top right X:106.01 Y:106.02 Middle left X:-109.99 Y: 0.012 Middle right X:110.01 Y: 0.013 Bottom left X:-105.99 Y:-105.99 Middle bottom X:-0.005 Y: -109.99 Bottom right X:106.0l Y:-105.99 Note: The data strip is not always on the left side of the image. Ensure that your scanned image has the data strip on the same side as what is specified in the Camera File. If not, you will have to either change the Camera file or rotate the scanned image. ER Mapper Workbook - Land Information 121 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs 10 Click on the Next> button to go to the ‘Finish’ page. 11 Click the Save button in the Camera file: field to open the file chooser to select a directory and file name to which to save the new camera file. 12 From the Directories menu, select the path ending with the text \examples. 13 Select the directory ‘airphoto_training’, and then enter ‘camera_’ in the Save as: field. 14 Click on the OK button to return to the Camera Wizard. The file name and directory you entered should now be displayed in the Camera file: field. 15 Click on the Finish button to return to the Geocoding Wizard. 16 Click the Load Camera File button in the Geocoding Wizard Camera file: field to open the file chooser. 17 From the Directories menu, select the path ending with the text \examples. 18 Select the directory ‘airphoto_training’, and then double-click on the ‘camera_’ file you saved. 19 Click on the 3) Fiducial Point Edit tab. 122 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs Edit the fiducial points This wizard page enables you to enter the locations of the fiducial points on the image into ER Mapper. ER mapper opens two image windows one in OVERVIEW ROAM mode, and the other in ZOOM mode. ZOOM OVERVIEW ROAM 1 Select the Auto zoom option. This causes the ZOOM window to automatically zoom to the selected fiducial mark. 2 Select the Pointer Tool on the Standard toolbar. 3 On the table, select ‘Top Left’ in the ‘Name’ column. ER Mapper Workbook - Land Information 123 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs 4 In the OVERVIEW ROAM window, click on the Fiducial mark on the top left corner of the image. The image in the ZOOM window will automatically zoom to the selected fiducial mark. Use this to adjust the position of the cursor to the center of the red circle. 5 On the table, select ‘Top Right’ in the ‘Name’ column. 6 In the OVERVIEW ROAM window, click on the Fiducial mark on the top right corner of the image. The image in the ZOOM window will automatically zoom to the selected fiducial mark. Use this to adjust the position of the cursor to the center of the red circle. 7 On the table, select ‘Bottom Left’ in the ‘Name’ column. 8 In the OVERVIEW ROAM window, click on the Fiducial mark on the bottom left corner of the image. The image in the ZOOM window will automatically zoom to the selected fiducial mark. Use this to adjust the position of the cursor to the center of the red circle. 9 On the table, select ‘Bottom Right’ in the ‘Name’ column. 10 In the OVERVIEW ROAM window, click on the Fiducial mark on the bottom right corner of the image. The image in the ZOOM window will automatically zoom to the selected fiducial mark. Use this to adjust the position of the cursor to the center of the red circle. 11 On the table, select ‘Middle Left’ in the ‘Name’ column. 124 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs 12 In the OVERVIEW ROAM window, click on the Fiducial mark on the middle of the left side of the image. The image in the ZOOM window will automatically zoom to the selected fiducial mark. Use this to adjust the position of the cursor to the center of the red circle. 13 On the table, select ‘Middle Right’ in the ‘Name’ column. 14 In the OVERVIEW ROAM window, click on the Fiducial mark on the middle of the right side of the image. The image in the ZOOM window will automatically zoom to the selected fiducial mark. Use this to adjust the position of the cursor to the center of the red circle. 15 On the table, select ‘Middle Top’ in the ‘Name’ column. 16 In the OVERVIEW ROAM window, click on the Fiducial mark on the middle of the top the image. The image in the ZOOM window will automatically zoom to the selected fiducial mark. Use this to adjust the position of the cursor to the center of the red circle. 17 On the table, select ‘Middle Bottom’ in the ‘Name’ column. 18 In the OVERVIEW ROAM window, click on the Fiducial mark on the middle of the bottom of the image. The image in the ZOOM window will automatically zoom to the selected fiducial mark. Use this to adjust the position of the cursor to the center of the red circle. After selecting the fiducial markers, the table on the Fiducial Point Edit tab should be similar to what is shown below. The RMS column should show values of less than 1.00. The image window should now have all the fiducial points labelled. ER Mapper Workbook - Land Information 125 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs 19 If necessary, select the Errors option, and adjust the position of the selections in the direction of the indicated errors. The x10 option enlarges the error markers for a more accurate indication. 20 Click on the 4) GCP Setup tab. Setup Ground Control Points The GCP Setup tab lets you specify the way that you want to choose control points. Control points may be entered manually, chosen from a reference image, chosen from a digitizing tablet, or chosen using a combination of these three methods. In this exercise, you will use a previously orthorectified reference image to locate GCPs. 1 In the GCP Picking Method box, select Geocoded image, vectors or algorithm option. This tells ER Mapper you plan to pick corresponding points between two images on the screen. 2 Click the Load Corrected Algorithm or Dataset file chooser button. 3 Choose ‘ER Mapper Raster Dataset (.ers)’ in the Files of Type: field. 4 From the Directories menu on the file chooser dialog, select the path ending with the text \examples. 5 Double_click on the ‘Applications’ directory to open it. 6 Double-click on the ‘Airphoto\1_Geocoding’ directory to open it, then double-click on ‘San_Diego_Airphoto_34_rectified.ers’ to load it. 126 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs This is the already rectified image containing coordinate information. Setup parameters for the image rectification The To geodetic datum, To geodetic projection and To Coordinates, fields in the Output Coordinate Space box show the datum, projection and coordinate type for the output rectified file you will create. These parameters are included automatically from the ‘CORRECTED’ (rectified) airphoto image. 7 Click on the Change... button to open the Geocoding Wizard Output Coordinate Space dialog. 8 If necessary, change the settings to what is displayed above. 9 Click OK on the Geocoding Wizard Output Coordinate Space dialog to close it. 10 Select the Geocoding Wizard 5) GCP Edit tab. ER Mapper Workbook - Land Information 127 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs Edit Ground Control Points ER Mapper opens several image windows and dialog boxes. You should see a screen setup similar to this one: UNCORRECTED GCP ZOOM WINDOW CORRECTED GCP ZOOM WINDOW UNCORRECTED GCP (OVERVIEW ROAM geolink) WINDOW CORRECTED GCP (OVERVIEW ROAM geolink) WINDOW Geocoding Wizard dialog box 128 ER Mapper Workbook - Land Information ER Mapper main menu Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs Note: If your system does not position the windows automatically, rearrange them as shown above before proceeding. The GCP Edit box should already have the GCPs you picked in the previous exercise. To save time we can use these existing GCPs and go straight to “Rectify the image” on page 131. Orthorectification only requires 4 to 6 GCPs, so you might want to delete those that show a high RMS error value. Pick a GCP in the upper-left part of both images Note: Make sure the main ER Mapper menu is not hidden by the image windows–move it slightly if needed so you can easily access the toolbars. 1 On the Geocoding Wizard GCP Edit tab, select Auto zoom. The ZOOM windows will now automatically zoom into the point selected in the corresponding OVERVIEW ROAM windows. 2 Click on a well defined feature in the ‘UNCORRECTED GCP (OVERVIEW ROAM geolink)’ window to select it. The ‘UNCORRECTED GCP ZOOM’ window will zoom ito the selected point 3 Click once in the ‘CORRECTED GCP (OVERVIEW ROAM geolink)’ window to activate it, then click on the same feature to select it as a GCP. The ‘CORRECTED GCP ZOOM’ window will zoom ito the selected point 4 Use the two ZOOM windows to adjust the positions of the GCP. You have now picked a GCP in the image. Pick a second GCP in the lower-left of both images 5 On the Geocoding Wizard Edit GCP dialog, click the Add new GCP button. 6 Click on a well defined feature in the ‘UNCORRECTED GCP (OVERVIEW ROAM geolink)’ window to select it. The ‘UNCORRECTED GCP ZOOM’ window will zoom into the selected point 7 Click once in the ‘CORRECTED GCP (OVERVIEW ROAM geolink)’ window to activate it, then click on the same feature to select it as a GCP. The ‘CORRECTED GCP ZOOM’ window will zoom ito the selected point ER Mapper Workbook - Land Information 129 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs 8 Use the two ZOOM windows to adjust the positions of the GCP. You have now picked a second GCP in the image. 9 Following the above steps, pick another four GCPs near the upper-right, lower-right and middle of the images. The more GCPs you pick the lower the possibility of errors. For orthorectification you need at least six. Try some other features on the Geocoding Wizard GCP Edit dialog 1 In the Geocoding Wizard GCP Edit dialog, click on any GCP number under the ‘Name’ column. ER Mapper moves the crosshairs to highlight that point in all the ‘OVERVIEW ROAM’ and ‘ZOOM’ windows. 2 Turn off the Auto Zoom option at the bottom. 3 Click on any GCP number under the ‘Name’ column. ER Mapper moves the crosshairs to highlight that point in the ‘OVERVIEW ROAM’ windows, but not the ‘ZOOM’ windows. 4 Click on the Zoom to current GCP button. ER Mapper zooms into the selected GCP in the “ZOOM’ windows. 5 Select the number text for a GCP under the ‘Name’ column, and type a short name. You can give GCPs text labels as well as numbers to help identify them. 6 Click on the text ‘On’ in the second column for any GCP. The text changes to ‘Off’ and all the RMS errors are recomputed without including that GCP. (This is an easy way to see how the positional error of any GCP influences the RMS of the others. For example, turning off a GCP with a large RMS often reduces the RMS of the others.) This can be important when choosing which GCPs will be used for the final image rectification. 7 Turn off other GCPs to see the effect, but turn all on again when finished. 8 Click on the text ‘Edit’ in the third column for any GCP. The text changes to ‘No’ and the “X” and number marking it in the image turns green. This effectively “locks” a GCP so it cannot be edited (that is, clicking in the image windows do not redefine it’s position). This is useful when you have several very good GCPs and you to lock them to avoid accidentally changing them. 9 Turn on the Errors option. 130 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs The magnitude and direction of the calculated positional error are shown graphically by a line for each GCP on the image. (If you have very small RMS errors you may not see the error line, even if you increase the line length by a factor of 10 using the x10 option.) 10 Turn on the Grid option. A polynomial grid displays over all three image windows. This grid is a simple “preview” of the way in which the FROM (raw) image pixels will be reprojected onto the new coordinate grid of the TO image. (This grid is only an approximation, in reality the lines would be curved.) 11 Click the Add new GCP button and select a point on the CORRECTED image. 12 Click on the Calculate uncorrected point button. The wizard will automatically position the corresponding GCP on the UNCORRECTED image. Use the ZOOM windows to adjust the GCP position. This facility is available once you have positioned four points. 13 Click Save on the Geocoding Wizard dialog. When asked confirm saving the GCPs to disk, click Yes. This will save the geocoding information into the header file of the UNCORRECTED image. 14 Select the Geocoding Wizard 6) Rectify tab. Rectify the image 1 Click the file chooser button in the Output Info box. ER Mapper Workbook - Land Information 131 Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs 2 From the Directories menu, select the path ending with \examples. 3 Double-click on the ‘airphoto_training’ directory to open it. 4 Enter the filename ‘San_Diego_orthorectified’ (start with your initials), then click OK. 5 Click on the Edit Extents... button to open the Geocode Output Extents dialog box. This dialog allows you to specify how much of the orthorectified image you want to save. You have three main options: Maximum extents: Saves the whole image including any portion not visible in the currently active image window. Optimum extents: Automatically calculates the extents of airphotos to exclude the black edges around them. Custom extents: Allows you to specify the top left and bottom right coordinates of the area to be included. If you click on the Snapshot button ER Mapper will automatically select the extents of the visible part of the image in the currently active image window. The Custom extents should still have the coordinates entered in the previous exercise. This limits the extents to those of the reference image 6 Click on the OK button to return to the Geocoding Wizard. 7 In the Resampling: in the Cell Attributes box select ‘Nearest Neighbour’. The Cell Attributes box also lets you resample the output image to a different cell size (Output Cell width and height), and specify a null cell value. 132 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 1: Orthorectify an airphoto using GCPs 8 Click on the Save button to save the orthorectification parameters in the ‘San_Diego_Airphoto_34 _not_rectified.ers’ header file. You will use this in the next exercise. 9 Select Display rectified image to display the image after it is rectified. 10 Click on the Save file and start rectification button. ER Mapper opens a status dialog to indicate the progress of the rectification. This should take approximately 10 minutes. 11 When the operation finishes, click OK of the successful completion dialog. 12 Click on the Close button to exit the Geocoding Wizard. You have now rectified the uncorrected airphoto image to correspond to the 1927 North American Datum (NAD27) and UTM zone 11 (NUTM11) map projection. 13 Do not close the image window with the orthorectified image Evaluate the image orthorectification 1 On the main menu, click the Edit Algorithm Algorithm window. button to open the 2 The Algorithm window shows the Red, Green and Blue layers of the orthorectified image. 3 In the Algorithm window, click on the Blue layer to select it. 4 Click the Load Dataset button in the algorithm process diagram. 5 From the Directories menu, select the path ending with \examples. 6 Double-click on the ‘Applications’ directory to open it. 7 Double-click on the ‘Airphoto’ and then on ‘1_Geocoding’ directory to open it. 8 Click once on the image ‘San_Diego_Airphoto_34 _rectified.ers’ to select it, then click OK this layer only button to load it into the Blue layer. (The Red and Green layers should still have the ‘_Airphoto_orthorectified’ image.) 9 Select B3:Blue from the Blue layer’s Band Selection drop-down list. Display the two images to evaluate registration 1 Click the 99% Contrast Enhancement toolbar button. ER Mapper Workbook - Land Information 133 Chapter 6 Image orthorectification ● 2: Orthorectify an airphoto using Exterior This image combines two different images–one in the Red and Green layers and one in the Blue layer. If your images are well aligned the image appears normal. If you see areas that are dominantly yellow or blue, this indicates poor registration. 2 On the Algorithm window, turn off the Smoothing option. 3 On the main menu, click the ZoomBox tool toolbar button. 4 Drag a zoom box over a very small area of the image that contains land and water. Errors in registration appear as either blue or yellow pixels because this is where the two images do not align perfectly. This is a very simple way to evaluate the registration of two images. If the RMS errors of your GCPs were generally less than one, you should not see more that one pixel offsets or registration errors. Close all windows 1 Close all image windows using the window system controls: • For Windows, select Close from the window control-menu. 2 Click Close on the Algorithm window to close it. 2: Orthorectify an airphoto using Exterior Orientation Objectives Learn how to use ER Mapper’s Geocoding Wizard to orthorectify an airphoto using Exterior Orientation parameters In this exercise you will orthorectify the same image as in the previous exercise. This time, instead of using Ground Control Points, you will enter Exterior Orientation parameters which have been obtained from a photogrammetry, aerial triangulation or geoposition system external to ER Mapper. In the previous exercise you saved orthorectification parameters in the ‘San_Diego_Airphoto_34_not_rectified.ers’ file. This means that you will not have to re-enter them in this exercise. Open the Geocoding Wizard 1 Click on the Ortho and Geocoding Wizard Functions toolbar. 134 ER Mapper Workbook - Land Information button in the Common Chapter 6 Image orthorectification ● 2: Orthorectify an airphoto using Exterior The Geocoding Wizard will open with the 1) Start tab selected. 2 Click the Load Algorithm or Dataset open the file chooser. button in the Input file: field to 3 From the Directories menu, select the path ending with the text \examples. 4 Select the directory ‘Applications\,Airphoto\1_Geocoding’ and then doubleclick on ‘San_Diego_Airphoto_34_not_rectified.ers’ to select it. This is the same file as that you used in the previous exercise. 5 Select the Geocoding Wizard Orthorectify using exterior orientation option. In this example, you enter exterior orientation parameters which provide information on the position of the platform or aircraft. 6 Select the 2) Ortho Setup tab. The fields in the Ortho Setup page should contain the information that you entered in the previous exercise because it was saved to the header file of the image being orthorectified. 7 Click on the 3) Fiducial Point Edit tab. The fields in the Fiducial Point Edit page should also contain the information you entered in the previous exercise. 8 Click on the 4) Exterior Orientation Setup tab. ER Mapper Workbook - Land Information 135 Chapter 6 Image orthorectification ● 2: Orthorectify an airphoto using Exterior Enter Exterior Orientation parameters Exterior Orientation parameters contain information on the position of the platform or aircraft at the time the image was taken. You would have to obtain this data from a system external to ER Mapper. If these parameters are not available then you would use Ground Control Points as in the previous exercise. 1 Enter the information in the relevant fields as shown in the table below: 136 Field name Description Enter value Attitude omega The tilt angle (roll) of the aircraft; i.e. the rotation about the X axis (direction of travel). 0.024233136466399 Attitude phi The swing angle (pitch) of the aircraft; i.e the rotation about the Y axis. 0.028555797949162 Attitude kappa The azimuth angle (yaw)of the aircraft; i.e the rotation about the Z axis. 0.0019776681959326 Exposure center X The X co-ordinate of the 483681.44788264 exposure center of the image. Exposure center Y The Y co-ordinate of the 3621463.0778646 exposure center of the image. ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 2: Orthorectify an airphoto using Exterior Field name Description Enter value Exposure center Z The Z co-ordinate of the 3182.9321414632 exposure center of the image. Scale The scale of the image expressed as a decimal value. 0.000048745007960398 The following diagram illustrates the relationship between the parameters. Z Y Exposure center Omega X Phi Kappa 2 Click on the Change... button to open the Geocoding Wizard Output Coordinate Space dialog. 3 Enter the Datum, Projection and Coord system type as shown below Tip: NUTM11 is a utm projection type. 4 Click on the 5) Rectify tab. ER Mapper Workbook - Land Information 137 Chapter 6 Image orthorectification ● 2: Orthorectify an airphoto using Exterior Rectify the image 1 Click the file chooser button in the Output Info box. 2 From the Directories menu, select the path ending with \examples. 3 Double-click on the ‘airphoto_training’ directory to open it. 4 Enter the filename ‘San_Diego_orthorectified_advanced’ (start with your initials), then click OK. 5 Click on the OK button to return to the Geocoding Wizard. 6 In the Resampling: in the Cell Attributes box select ‘Nearest Neighbour’. The Cell Attributes box also lets you resample the output image to a different cell size (Output Cell width and height), and specify a null cell value. 7 Click on the Save button to save the orthorectification parameters in the ‘San_Diego_Airphoto_34 _not_rectified.ers’ header file. 8 Select Display rectified image to display the image after it is rectified. 9 Click on the Save file and start rectification button. ER Mapper opens a status dialog to indicate the progress of the rectification. 10 When the operation finishes, click OK on the successful completion dialog. 11 Click on the Close button to exit the Geocoding Wizard. You have now rectified the uncorrected airphoto image to correspond to the 1927 North American Datum (NAD27) and UTM zone 11 (NUTM11) map projection. 12 Do not close the image window with the orthorectified image 138 ER Mapper Workbook - Land Information Chapter 6 Image orthorectification ● 2: Orthorectify an airphoto using Exterior Evaluate the image orthorectification 1 On the main menu, click the Edit Algorithm Algorithm window. button to open the 2 The Algorithm window shows the Red, Green and Blue layers of the orthorectified image. 3 In the Algorithm window, click on the Blue layer to select it. 4 Click the Load Dataset button in the algorithm process diagram. 5 From the Directories menu, select the path ending with \examples. 6 Double-click on the ‘Applications’ directory to open it. 7 Double-click on the ‘Airphoto’ and then on ‘1_Geocoding’ directory to open it. 8 Click once on the image ‘San_Diego_Airphoto_34 _rectified.ers’ to select it, then click OK this layer only button to load it into the Blue layer. (The Red and Green layers should still have the ‘_Airphoto_orthorectified_advanced’ image.) 9 Select B3:Blue from the Blue layer’s Band Selection drop-down list. Display the two images to evaluate registration 1 Click the 99% Contrast Enhancement toolbar button. This image combines two different images–one in the Red and Green layers and one in the Blue layer. If your images are well aligned the image appears normal. If you see areas that are dominantly yellow or blue, this indicates poor registration. 2 On the Algorithm window, turn off the Smoothing option. 3 On the main menu, click the ZoomBox tool toolbar button. 4 Drag a zoom box over a very small area of the image that contains land and water. Errors in registration appear as either blue or yellow pixels because this is where the two images do not align perfectly. This is a very simple way to evaluate the registration of two images. If the RMS errors of your GCPs were generally less than one, you should not see more that one pixel offsets or registration errors. Close all windows 1 Close all image windows using the window system controls: • For Windows, select Close from the window control-menu. ER Mapper Workbook - Land Information 139 Chapter 6 Image orthorectification ● 2: Orthorectify an airphoto using Exterior • For Unix systems, press right mouse button on the window title bar, and select Close or Quit (for systems with both options, select Quit). 2 Click Close on the Algorithm window to close it. Only the ER Mapper main menu should be open on the screen. What you learned... 140 After completing these exercises, you know how to perform the following tasks in ER Mapper: • Use the Camera Wizard to create a Camera File • Select fiducial markers on an airphoto image • Use options to modify the GCP display and edit GCPs • Enter Exterior Orientation parameters for advanced orthorectification. • Use the Geocoding Wizard to orthorectify a “raw” airphoto image to the chosen datum and map projection. ER Mapper Workbook - Land Information 7 Assembling image mosaics This chapter explains how to create algorithms to display and process two or more separate airphoto images as a mosaic. You will learn how ER Mapper approaches the concept of creating mosaics and how to build an image mosaic algorithm. About assembling mosaics The term “mosaic” refers to assembling two or more overlapping images to create a continuous representation of the area covered by the images (a mosaic). In this example, you will create a mosaic of several overlapping aerial photos to cover a larger geographic area. The process of creating image mosaics is very simple in ER Mapper once the images are rectified to the same datum and map projection. Any number of co-registered images used in the same processing algorithm are automatically displayed in their correct geographic positions relative to each other. Requirements for mosaics In order for ER Mapper to create a mosaic, each of the images must have the following in common: • they must be registered to the same geographic datum • they must be registered to the same map projection ER Mapper Workbook - Airphoto Mosaic Applications 141 Chapter 7#Assembling image mosaics#z Hands-on exercises • they must be rotated the same amount from north (if rotation is used). You will learn how to rectify images to datums and map projections later. Mosaic capabilities Other than having a common datum and map projection, you can create mosaics that contain very different types of data. An image mosaic can be built with datasets that have: • different numbers of bands (i.e., three for a color airphoto versus seven for a Landsat satellite image) • different data formats (i.e., byte format versus floating point format) • different resolutions or cell sizes (i.e., 1-meter versus 3-meter). Dataset display priority By changing the order of the algorithm layers containing the separate datasets, you can control dataset display priority (that is, which images appear on top of others in the event of overlap). Datasets loaded into the uppermost layer of any type always appear on top of any other datasets in layers below where overlap occurs between them. Datasets loaded into the lowest layer of any type always have the lowest display priority and will only be visible in areas where there is no overlap from datasets in layers above them. For example, if you are creating a mosaic with a high resolution dataset and a lower resolution dataset, you can display the entire extents of the high resolution dataset by putting its layer(s) on top in the algorithm layer list. Note: Layer priority only applies to raster layers; vector layers always appear on top of raster layers regardless of their position in the algorithm layer list. Hands-on exercises These exercises show you how to create greyscale and RGB image mosaic algorithms. 142 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 7#Assembling image mosaics#z 1: Creating a greyscale image mosaic The ER Mapper Image Display and Mosaic Wizard provides the easiest and most efficient way of mosiacing images, and should be used where possible. For illustrative purposes, these exercises will also cover manual methods for mosiacing images. What you will learn... Before you begin... After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Create a mosaic algorithm by displaying each dataset in its own layer • Turn images on or off in a mosaic • Specify image priority for the mosaic (which images appear on top of others in the event of overlap • Use the “Create Mosaic” wizard to speed creation of greyscale and RGB mosaics Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. 1: Creating a greyscale image mosaic Objectives Learn how display several overlapping images in different Pseudocolor layers to create an image mosaic, and learn to specify image priority in the event of overlap. How ER Mapper creates mosaics To create a mosaic of images, you need to create an algorithm that has each image loaded in its own layer (or set of layers for RGB). ER Mapper automatically displays each image in its correct geographic position relative to other images in the algorithm. (Each image must previously have been rectified to the same datum and map projection.) Since each image is loaded in a separate layer, you can adjust contrast and other display qualities of each image independent of other images. Note: The sample airphotos used in the following exercise were previously rectified to the same map projection, so they can be displayed together in a mosaic. Open a new image window and the Algorithm dialog 1 On the main menu, click the Edit Algorithm button. ER Mapper Workbook - Airphoto Mosaic Applications 143 Chapter 7#Assembling image mosaics#z 1: Creating a greyscale image mosaic An image window and the Algorithm dialog box appear. Edit Algorithm button 2 Select the Surface tab, then select greyscale from the ‘Color Table’ menu. This tells ER Mapper to display an image in greyscale. 3 Select the Layer tab again. Display the Geocoding toolbar 1 On the main menu, select Geocoding from the Toolbars menu. The Geocoding toolbar buttons are added to the main menu. You will use these for fast access to zooming options. Load a dataset into the Pseudo layer 1 In the process diagram, click the Load Dataset button. Load Dataset button The Raster Dataset file chooser dialog box appears. 2 From the Directories menu, select the path ending with the text / examples. 3 Double-click on the ‘Functions_and_Features’ directory and then doubleclick on the ‘Compression’ directory. 4 Click once on the dataset ‘San_Diego_Airphoto_34_compressed.ers’ to select it, then click the Apply button. ER Mapper loads the dataset into the Pseudocolor layer and leaves the The Raster Dataset dialog open (you will use it load additional datasets). 144 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 7#Assembling image mosaics#z 1: Creating a greyscale image mosaic Note: If you plan to load multiple datasets in an algorithm, it is sometimes easier to leave the Raster Dataset dialog open until you are finished. This saves you the time of opening the file chooser and navigating to the directory each time. This airphoto dataset is a compressed copy of the same image you used in the rectification exercise. It has been rectified to the UTM map projection, and is one of four sample airphotos you will use to create a mosaic. The airphotos have been compressed with ECW (Enhanced Compression Wavelet) compression, which creates a data (.ecw) and header (.ers) file for each image. You can select either of the two because the .ecw file also contains the geocoding information. The .ers file must have a corresponding .ecw file but you can have a .ecw file without a .ers file. 5 Change the layer label text to read NW airphoto. Create a mosaic by adding a second adjacent airphoto 1 Click the Duplicate button. click Duplicate A second ‘NE airphoto’ layer is added below the first one. The second Pseudo layer is an exact copy of the first one, so it already has the ‘NE_photo’ dataset loaded. 2 In the Raster Dataset dialog, click once on the dataset ‘San_Diego_Airphoto_36_compressed.ers’ to select it, then click the Apply this layer only button. ER Mapper loads the dataset into only the lower (copied) layer and leaves the Raster Dataset dialog open. Note: Since both the original and copied layers contained the same dataset (‘NE_photo’), you must use the Apply this layer only button to load the new dataset into only the currently selected layer. Apply or OK would have loaded the ‘NW_photo’ dataset into both layers. 3 On the Geocoding toolbar, click the Zoom to All Datasets button. ER Mapper Workbook - Airphoto Mosaic Applications 145 Chapter 7#Assembling image mosaics#z 1: Creating a greyscale image mosaic ER Mapper zooms out to show the full extents of both airphotos. The ‘NE_photo’ dataset is on the right (east side) and the ‘NW_photo’ dataset is on the left. Tip: Zoom to All Datasets zooms out to the extents of all datasets referenced in the algorithm, which includes the full extents of a mosaic if two or more adjacent images are loaded. 4 Change the lower layer label text to read NE airphoto. Add the third airphoto to the mosaic 1 Click the Duplicate button. A copy of the ‘NE airphoto’ layer is added below the original. 2 In the Raster Dataset dialog, click once on the dataset ‘San_Diego_Airphoto_37_compressed.ers’ to select it, then click the Apply this layer only button. ER Mapper loads the new dataset into only the lower (copied) layer. 3 On the Geocoding toolbar, click the Zoom to All Datasets button. ER Mapper zooms out to show the full extents of all three airphotos. The ‘SW_photo’ dataset is on the lower left (southwest) portion of the mosaic. 4 Change the lower layer label text to read SW airphoto. Add the fourth (and final) airphoto to the mosaic 1 Click the Duplicate button. A copy of the ‘SW airphoto’ layer is added below the original. 2 In the Raster Dataset dialog, click once on the dataset ‘San_Diego_Airphoto_39_compressed.ers’ to select it, then click the OK this layer only button. ER Mapper loads the new dataset into only the lower (copied) layer and close the Raster Dataset dialog. (You are using OK this layer only to close the dialog since this is the final image in the mosaic.) 3 On the Geocoding toolbar, click the Zoom to All Datasets 146 ER Mapper Workbook - Airphoto Mosaic Applications button. Chapter 7#Assembling image mosaics#z 1: Creating a greyscale image mosaic ER Mapper zooms out to show the full extents of all four airphotos. The ‘SE_photo’ dataset is on the lower right (southeast) portion of the mosaic. Newport Beach is the harbor on the Pacific Ocean in the lower-left area of the mosaic. 4 Change the lower layer label text to read SE airphoto. Note: There is an obvious darkening effect in the lower portions of the two northern airphotos. This is typical of aerial photography, and ways to correct for this are discussed later. Turn the northwest (upper left) image on and off 1 Right-click on the ‘NW airphoto’ layer, and select Turn Off. Since its layer is turned off, the northwest airphoto is no longer included in the mosaic. 2 Turn the ‘NW airphoto’ layer on again. The northwest airphoto redisplays in its appropriate geographic position again. This shows how images can be added or subtracted from a mosaic simply by turning their layers on or off. Change the display priority of the southern images Right now, the two northern airphotos are higher in the layer list than the two southern airphotos. This means that where the southern and northern photos overlap, the data from the northern photos will be displayed. 1 Drag and drop the two southern layers until they are both above the two northern layers. drag and drop to reorder layers The airphotos in the two southern layers now have display priority over those in the two northern layers below them. ER Mapper Workbook - Airphoto Mosaic Applications 147 Chapter 7#Assembling image mosaics#z 1: Creating a greyscale image mosaic Tip: An alternative way to move layers is to select them, then use the Move Up Move Down or buttons above them. The data from the two southern airphotos displays on top of the data from the two northern airphotos where overlap occurs between the images. When displaying two or more images in a mosaic algorithm, the image in the top layer in the layer list appears on top of all others when the algorithm is processed. The image in the lowest layer has the lowest priority and will only be visible in areas where there is no overlap from other datasets in layers above it. By adjusting to order of layers, you can set which datasets appear on top of others in areas where they overlap. Zoom in to the geographic extents of any airphoto 1 From the View menu, select Geoposition... (or click the Algorithm dialog). button on the The Algorithm Geoposition Extents dialog opens. 2 Select the Zoom tab. 3 In the Algorithm dialog, select the ‘SW airphoto’ layer. 4 Click the Current Datasets button. ER Mapper zooms in to the full geographic extents of the image in the current layer (the southwest airphoto). 5 In the Algorithm dialog, select the ‘NE airphoto’ layer. 6 Click the Current Datasets button. ER Mapper zooms in to the geographic extents of the northeast airphoto. This feature lets you instantly zoom to the extents of any raster dataset(s) in the currently selected layer, so it is very useful for mosaic algorithms. 7 Click Close on the Algorithm Geoposition Extents dialog to close it. Close the mosaic image window 1 On the main menu, select Close from the File menu. The mosaic image window closes (File/Close closes the active image window). The contents of the Algorithm dialog also clear to indicate that no algorithm is currently open. 148 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 7#Assembling image mosaics#z 2: Creating mosaics automatically 2: Creating mosaics automatically Objectives Learn how to speed the creation of greyscale and RGB mosaic algorithms using the Image Display and Mosaic Wizard. Start the Create Mosaic Algorithm wizard 1 On the Common Functions toolbar, click the Image Display and Mosaicing Wizard button. The Select files to display and mosaic page of the Image Display and Mosaicing Wizard opens 2 Click the Load Image button. The Select File dialog opens. 3 From the Directories menu (on the Select File dialog), select the \examples path. 4 Double_click on the ‘Functions_and_Features’ directory to open it. 5 Double_click on the ‘Compression’ directory. 6 Double-click on the image dataset ‘San_Diego_Airphoto_34_compressed.ers’ to select it. This is the same compressed airphoto that we used in the previous exercise. 7 Select the following options on the wizard page: Display image in 2D Image will be displayed in a 2D mode. ER Mapper Workbook - Airphoto Mosaic Applications 149 Chapter 7#Assembling image mosaics#z 2: Creating mosaics automatically Manually set display method Enables you to set how the image is to be displayed. If you do not select this option, the wizard will set the display method. Mosaic all files of this type The wizard will search for files of the same type and automatically mosaic them. Manually set mosaic method Enables you to set how the images are to be mosaiced. If you do not select this option, the wizard will set the mosaicing 8 Click on the Next> button to go to the next wizard page. Select file types to mosaic This page allows you to specify the characteristics and location of image files that the wizard must search for to mosaic with the image already selected. 1 Select the Cell sizes and Manually set mosaic properties options. Do not select the other options on the page. This tells the wizard that the images to be mosaiced must all have the same data types and number of bands. They are also in the same directory. They can have different cell sizes. 2 Click on the Next> button to go to the next wizard page. Select mosaic properties This page allows you to specify properties of the mosaiced image. 150 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 7#Assembling image mosaics#z 2: Creating mosaics automatically 1 Select the Feather blend mosaic between images options. Do not select the other two options. To simplify the exercise, we will not be defining and using stitch regions. 2 Click on the Next> button to go to the next wizard page. Select display method This page allows you to specify how you want the mosaiced image to be displayed. 1 Select the Greyscale display option and Manually select display method properties. 2 Click on the Next> button to go to the next wizard page. Select display band This page allows you to select the image band to display as a greyscale. 1 Select band ‘B1:Red’ from the drop-down menu. This specifies that the Red band of the image is to be displayed as Greyscale. 2 Click on the Next> button to go to the next wizard page. ER Mapper Workbook - Airphoto Mosaic Applications 151 Chapter 7#Assembling image mosaics#z 2: Creating mosaics automatically Mosaic and display the images The wizard searches the current directory and mosaics and displays the following images: • San_Diego_Airphoto_34_compressed.ers • San_Diego_Airphoto_36_compressed.ers • San_Diego_Airphoto_37_compressed.ers • San_Diego_Airphoto_39_compressed.ers 1 For the moment, leave the Image wizard has finished page open. 2 Drag the lower border of the image window downward about 50%. 3 Right-click in the image window, select Quick Zoom, then Zoom to All Datasets. ER Mapper zooms out to show the full extents of all four airphotoimages. Since this image mosaic is taller than it is wide, increasing the window’s width would have created a large unfilled area on the right side. This is an example of shaping the window to best fit a particular image display. 4 On the main menu, click the Edit Algorithm button. The Algorithm dialog box opens. You now have a algorithm that displays band 1 of each dataset as a greyscale image mosaic. 152 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 7#Assembling image mosaics#z 2: Creating an RGB image mosaic 5 If necessary, use the Move Up and Move Down buttons to arrange the layers so that they are as shown in the diagram above. Turn the top image on and off 1 Right-click on the top ‘Pseudo Layer’ and select Turn Off. Only the top right, bottom leeft and bottom right images display (since the top left image is turned off). 2 Right-click on the top ‘Pseudo Layer’ and select Turn On. The top left image redisplays in its appropriate geographic position again. Any images in a mosaic can be displayed or not displayed by turning their layers on or off. Zoom in to the geographic extents of any image dataset 1 Widen the image window 2 Select the top ‘Pseudo Layer’ (‘San_Diego_Airphoto_34_compressed’) in the algorithm. 3 Right-click in the image window, select Quick Zoom, then Zoom to Current Dataset. ER Mapper zooms in to the full extents of the ‘San_Diego_Airphoto_34_compressed’ dataset (but also displays part of the lower dataset that occupies the same extents). Zoom to Current Dataset lets you instantly zoom in or out to the extents of any raster image dataset(s) in the currently selected layer, so it is very useful for mosaic algorithms. 2: Creating an RGB image mosaic Objectives Learn how display several overlapping images in different sets of red, green, and blue raster layers to create an RGB image mosaic. We use the Image Display and Mosaicing wizard to re-display the existing greyscale mosaiced image as an RGB image. The final page of the wizard should still be open from the previous exercise. ER Mapper Workbook - Airphoto Mosaic Applications 153 Chapter 7#Assembling image mosaics#z 2: Creating an RGB image mosaic Change the image display method 1 Select the Back to Change display method button from the still open Image Wizard has finished wizard page. 2 On the Select display method page, select the Red Green Blue option. 3 Click on the Next> button to go to the next wizard page. 4 Select RGB 123 as the Red Green Blue display mode type. This option allocates band 1 to Red. band 2 to Green and Band 3 to Blue. 5 Click on the Next> button to mosaic and display the images, and to go to the final wizard page. The wizard will now display the mosaiced image in RGB mode. 6 Click on the wizard Finish button to exit the wizard. Do not close the image window yet. 154 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 7#Assembling image mosaics#z 2: Creating an RGB image mosaic Tip: In RGB mosaic algorithms, each group of red, green and blue layers act together as a set. Therefore, you normally want to keep them grouped together in the layer list in the Algorithm dialog. (To see which dataset is loaded into a particular layer, select the layer–the name is shown above the process diagram.) layers for NW_photo layers for NE_photo process diagram for selected layer (green layer of NE_photo) layers for SW_photo layers for SE_photo Save the mosaic algorithm to disk 1 From the File menu (on the main menu), select Save As.... The Save As... file chooser dialog opens. 2 In the Files of Type: field, select ‘ER Mapper Algorithm (.alg)’ 3 From the Directories menu (on the Open dialog), select the path ending with \examples. 4 Double-click to open the directory named ‘airphoto_training.’ 5 In the Save As: text field, type the following filename: airphoto_mosaic This name denotes that it is a mosaic of airphots. 6 Click OK to save the algorithm. Your mosaic algorithm is now saved to an algorithm file on disk. ER Mapper Workbook - Airphoto Mosaic Applications 155 Chapter 7#Assembling image mosaics#z 2: Creating an RGB image mosaic Close all image windows and dialog boxes 1 Close both image windows by selecting Close from the File menu. 2 Click Close on the Algorithm dialog to close it. Only the ER Mapper main menu should be open on the screen. What you learned 156 After completing these exercises, you know how to perform the following tasks in ER Mapper: • Create a mosaic algorithm by displaying each dataset in its own layer • Turn images on or off in a mosaic • Specify image priority for the mosaic (which images appear on top of others in the event of overlap • Use the “Create Mosaic” wizard to speed creation of greyscale and RGB mosaics ER Mapper Workbook - Airphoto Mosaic Applications 8 Color balancing images This chapter explains techniques to correct or normalize changes in brightness across single images that cause some areas to appear noticeably brighter or darker than others. It also discusses ways to balance the overall contrast of a mosaic of images to make them appear as a single image. About color balancing When creating a mosaic of images, there are two primary issues to be addressed that help make the mosaic appear to be a single, seamless image: Note: The Color Balancing Wizard balances and matches colors automatically, and does not require any manual intervention. The descriptions and exercises in this chapter have been included to provide an understanding of the color balancing process. • correcting shifts in brightness or color within individual images • balancing the overall contrast of the mosaic (normalizing the contrast of all images to a common level) ER Mapper Workbook - Airphoto Mosaic Applications 157 Chapter 8#Color balancing images#z About color balancing When balancing the brightness and contrast of images (and mosaics of images), it is often easier to work with a single band of the image at a time in greyscale. This is because subtle brightness and contrast adjustments are more difficult to carry out when working with three components (red, green and blue) than one component (red, for example). For example, you might start by creating a balanced mosaic showing only the red band of each airphoto. Then do the same for the green and blue components, and add them back together into an RGB mosaic at the end. Although this is not the only approach, it is the one that will be used in these exercises. Brightness shifts and vignetting Airphotos sometimes exhibit shifts in brightness or intensity across the image, for example one side of an image is noticably darker than another. This intensity “roll off” problem is due to lens refraction of the camera, and usually results in darkening toward one side or toward the edges of the image (“vignetting”). It is usually desirable to try to correct brightness shifts in airphotos because they will be more noticeable when the images are displayed side-by-side in a mosaic. Note: Not all airphotos will exhibit noticeable brightness shifts. This chapter explains how to correct for them if your airphotos exhibit these characteristics. original photo with top to bottom brightness shift (light to dark) intensity normalized across photo using linear ramp formula There are three main types of brightness or color shifts in airphotos: • 158 linear brightness shifts–the brightness changes at a fairly constant rate from one side of an image to the other ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z Hands-on exercises • vignetting (hot spots)–a central portion of the image is noticably brighter, and the image darkens as you move out toward the edges • haze (blue cast) corrections–some airphotos (usually natural color) have a bluish cast or tint, either overall or outward from the center Note: See the sections “Vignetting (“hot spot”) corrections” and “Haze (blue cast) corrections” at the end of this chapter for more details on techniques to remove or minimize their effects. Overall contrast balancing Once the brightness shifts have been corrected in individual photos (if needed), the next issue is creating a mosaic and balancing the contrast of each image relative to the others. This is an important step to help make the color and brightness consistent across the entire mosaic. initial mosaic showing contrast differences between images contrast balanced mosaic created using histogram matching One common technique for doing this is called histogram matching. This technique matches the output histograms (transforms) for all images to one image which is chosen as the reference image. You will learn to do this in this exercise. Hands-on exercises These exercises show you how to use ER Mapper’s formulas feature to correct brightness shifts across an image. What you will learn... After completing these exercises, you will know how to perform the following tasks in ER Mapper: ER Mapper Workbook - Airphoto Mosaic Applications 159 Chapter 8#Color balancing images#z 1: Using brightness shift formulas Before you begin... • Enter and modify a formula in ER Mapper • Use special formulas to correct brightness shifts in an image • Create a greyscale mosaic of individually corrected images • Use histogram matching to balance the contrast of the mosaic Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. 1: Using brightness shift formulas Objectives Learn how to apply a formula to correct a brightness shift in an image, and how to modify the formula to suit problems in specific airphotos. Create a greyscale image of the San Diego 36 airphoto 1 On the main menu, click the Image Display and Mosaic Wizard button. Image Display and Mosaic Wizard button The Select files to display and mosaic page of the Image Display and Mosaic Wizard opens 2 Click the Load Image button. The Select File dialog opens. 3 From the Directories menu (on the Select File dialog), select the \examples path. 4 Double_click on the ‘Applications’ directory to open it. 5 Double_click on the ‘Airphoto’ directory. 6 Open the ‘1_Geocoding’ directory. 7 Double-click on the image dataset ‘San_Diego_Airphoto_36_rectified.ers’ to select it. This dataset is a high resolution image covering a portion of San Diego. 160 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z 1: Using brightness shift formulas 8 Select the following options on the wizard page: Display image in 2D Image will be displayed in a 2D mode. Manually set display method Enables you to set how the image is to be displayed. If you do not select this option, the wizard will set the display method. 9 Click on the Next > button to go to the next dialog box. The wizard will open the Select display method dialog box for you to specify the display method. Select display method. You have the choice of four different display methods: Greyscale Loads a single band into a pseudocolor layer using the greyscale Color Table. Red Green Blue Loads three of the bands into RGB layers. Sunshade Loads a single band into a greyscale pseudocolor layer with sun-shading enabled. Colordrape Drapes a pseudocolor layer over an intensity layer with the sun-shading enabled. 10 Select the Greyscale option and Manually select display method properties to specify how the image is to be displayed. 11 Click on the Next > button to go to the next dialog box. Select display method The Select How to display using Greyscale wizard dialog box allows you to select the image bands that are to be displayed as Red Green and Blue. 12 In the Band to display: field, select ‘B1:Red’ so that band 1 (Red ) will be displayed as greyscale. 13 Click on the Next> button to go to the final dialog box. The wizard will process the image and display it with the transform clip limits set to 99%. ER Mapper Workbook - Airphoto Mosaic Applications 161 Chapter 8#Color balancing images#z 1: Using brightness shift formulas 14 In the Image Display and Mosaicing Wizard has finished dialog box, select Finish to close the wizard. ER Mapper creates a simple pseudocolor algorithm that displays the red band (band 1) of the San Diego 36 airphoto as a greyscale image. This airphoto exhibits a subtle, but noticable brightness shift from top to bottom (darker at the bottom). These types of shifts, even subtle ones, can be very noticable in mosaics of several images. Load the linear ramp formula into the Pseudo layer 1 On the main menu, click the Edit Algorithm Algorithm dialog box. 2 In the process diagram, click the Edit Formula button to open the button. Edit Formula button The Formula Editor dialog box opens. (If needed, move it right so it does not cover the image window.) This dialog lets you load standard formulas supplied with ER Mapper, and create your own formulas for specific image processing tasks. 3 From the File menu (on the Formula Editor dialog), select Open. 162 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z 1: Using brightness shift formulas The Open Formula dialog appears. This dialog gives you access to directories containing standard formulas supplied with ER Mapper. 4 From the Directories menu, select the path ending with \formula. 5 Double-click to open the directory named ‘mosaic’ to open it. 6 Double-click on the formula ‘linear_ramp.frm’ to load it. The “linear_ramp’ formula is loaded in the Formula Editor dialog. This dialog has three major areas: generic formula–load or enter formula text relations area–define relationships between generic formula parms and dataset bands, etc. specific formula–final formula to be executed Adjust parameters of the linear ramp formula 1 Click the Comments button on the Formula Editor dialog. Comments about the use of the linear ramp formula are displayed. The ‘linear_ramp’ formula is designed to apply a gradual change in brightness (a “ramp”) across an image. It can therefore be used to counter the brightness shift problem and normalize the brightness to a constant level across this image. This formula has three main controls: • INPUT1–controls the dataset band on which the formula will operate, band 1 of the image (red) in this case. • X_Correction and Y_Correction–two parameters that control the direction and strength of the brightness shift operation 2 Click the OK on the Formula comments dialog to close it. ER Mapper Workbook - Airphoto Mosaic Applications 163 Chapter 8#Color balancing images#z 1: Using brightness shift formulas 3 In the Formula Editor dialog, click the ‘Variables’ button in the relations area. click Variables button fields to assign values to variables The contents of the relations area change to show two fields for entering values for the X_Correction and Y_Correction variables in the linear ramp formula. 4 Change the value of the ‘Y_Correction’ field to 0.4 then press Enter or Return to validate. Note: After changing a variable value, make sure you press Enter or Return on your keyboard to have ER Mapper validate and check the value. 5 Click the 99% Contrast Enhancement button. ER Mapper runs the algorithm and applies an overall shift in brightness to the image. (The top becomes slightly darker and the bottom slightly lighter to make the overall brightness the same across the airphoto.) Note: You are using the 99% Contrast Enhancement button here because each set of variable values creates slightly different output data ranges. 99% Contrast Enhancement compensates for that by setting transform limits to actual each time to give a good contrast enhancement automatically. 164 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z 1: Using brightness shift formulas Try other correction values to see how the formula works The linear ramp formula is very versatile and can be used to adjust the brightness shifts top-to-bottom, side-to-side, and diagonally across an image. To do this, adjust the values for X_CORRECTION and/or Y_CORRECTION variables as needed. Suggested values range from 0.4 to -0.4, but larger values may also be useful. X_Correction - adjust brightness in the left to right direction: Example: 0.3 lightens the right side relative to left, -0.3 the opposite. Y_Correction - adjust brightness in the top to bottom direction: Example: 0.3 lightens the bottom relative to top, -0.3 the opposite. By using both variables, you can adjust brightness diagonally across the image. 1 Change the variable values as follows (press Return or Enter after): X_Correction = 0.4 Y_Correction = 0.0 2 Click the 99% Contrast Enhancement button. The right side of the image lightens relative to the left. 3 Change the variable values as follows (press Return or Enter after): X_Correction = 0.4 Y_Correction = 0.4 4 Click the 99% Contrast Enhancement button. The lower-right corner of the image lightens relative to the upper-left. 5 Change the variable values as follows (press Return or Enter after): X_Correction = -0.4 Y_Correction = -0.4 6 Click the 99% Contrast Enhancement button. The upper-left corner of the image lightens relative to the lower right. Reset the correction values to the best for this image 1 Change the variable values as follows (press Return or Enter after): X_Correction = 0.0 Y_Correction = 0.4 ER Mapper Workbook - Airphoto Mosaic Applications 165 Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images 2 Click the 99% Contrast Enhancement button. The lower part of the image lightens relative to the upper part. This is the best overall adjustment for this particular image, since its primary problem is a light-todark shift from top-to-bottom. 3 Click the Close on the Formula Editor dialog to close it. Note: Each image (or group of related images) will have its own brightness shift characteristics. You should try various settings to see which gives the best results on your airphotos. There is always a compromise you must reach between optimizing contrast in different parts of the image, so keep this in mind. In addition, there are other formulas for correcting “hot spots” and bluing at the edges. See the sections “Vignetting (“hot spot”) corrections” and “Haze (blue cast) corrections” at the end of this chapter for more details. 2: Create a mosaic of balanced images Objectives Learn how to create a mosaic of corrected images, and use histogram matching to balance the overall contrast and brightness of the mosaic. Duplicate the layer to display another dataset Since the current layer already has your formula loaded, it is easiest to duplicate it an load the different dataset. 1 On the Algorithm dialog, click the Duplicate button. click Duplicate The Pseudo layer is duplicated. 2 Click the Load Dataset button in the process diagram. The Raster Dataset dialog opens. Move it next to the Algorithm dialog so both dialogs are visible. 166 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images 3 From the Directories menu (on the Raster Dataset dialog), select the path ending with \examples. 4 Double_click on the ‘Applications’ directory to open it. 5 Double_click on the ‘Airphoto’ directory. 6 Open the ‘1_Geocoding’ directory. 7 Click once on the dataset ‘San_Diego_Airphoto_34_rectified.ers’ to select it, then click Apply this layer only. ER Mapper loads the ‘San Diego 34’ dataset into only the selected layer. Note: Since you duplicated the original layer, both it and the copy had the same dataset loaded. Since you want to load the new dataset into only the copied layer, you must use Apply this layer only or OK this layer only. (OK, Apply or doubleclicking would load the new dataset into both layers.) Zoom out to the extents of both airphotos 1 Right-click in the image window, and from the shortcut menu select Quick Zoom, then Zoom to All Datasets. ER Mapper zooms out to show the full extents of all four images in the greyscale airphoto mosaic. (Right-clicking in the image window gives you quick access to many of the same options on the main menu.) 2 Click the 99% Contrast Enhancement button. ER Mapper runs the algorithm and automatically optimizes the contrast of the two individual images in the mosaic. Even though each photo has the linear ramp correction applied, you can see the seams between airphotos by the difference in overall brightness and contrast between them. This is typical of mosaics because each airphoto dataset has a different range of values than the others. Assign the western photo display priority in the mosaic Currently the eastern airphoto (36) covers the western airphoto where there is overlap because it is higher in the layer list. Now is the time when you decide which photo will appear on top of the other where there is overlap. 1 Select the surface layer in the algorithm (the green icon next to [Ps]:Pseudocolor). ER Mapper Workbook - Airphoto Mosaic Applications 167 Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images Process diagrams for both layers display in the Layer tab area. This lets you see which dataset is loaded into each layer (above the Load Dataset button.) 2 Change the order of layers so that the airphotos are in the following order (by dragging and dropping the layers or using the Move Up Down and Move buttons): San_Diego_Airphoto_34_rectified.ers San_Diego_Airphoto_36_rectified.ers The eastern airphoto is now covered by the western photo. For this particular set of images, this configuration achieves a better overall contrast balance and creates the most visually pleasing mosaic. Tip: When working with your own data, you would typically try different configurations until you find the one that looks best. For example, changing the priority can help minimize contrast differences, or you might want to make sure a problem area in one image is covered by a better image if possible. Histogram match the airphotos to the west photo Histogram matching tries to make the output histogram for several images match the output histogram of a reference image. By doing this, the overall differences in contrast between a set of images can be minimized. 1 Select the layer containing the ‘San_Diego_Airphoto_36_rectified.ers’ dataset (the second layer). This will be the reference image to which the contrast of the other image will be matched. 2 Click the Edit Transform Limits button in the process diagram. Edit Transform Limits button 168 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images The Transform dialog opens showing the histogram for the ‘SE_photo’ dataset. The solid black histogram is the input (dataset) histogram, and the thin grey histogram line is the output (screen) histogram: output histogram The output histogram shows the distribution of colors in the screen image (grey shades in this case). Histogram matching will attempt to make the output histograms for the other three dataset layers match this one. 3 In the Transform dialog, click the Histogram match button. Histogram match button 4 A dialog appears explaining the histogram match function–click Yes to continue. ER Mapper reprocesses the mosaic image and adjusts the contrast slightly so that all four images have similar contrast characteristics. (The transform lines for the other three Pseudo layers in the algorithm were automatically changed to make their output histograms match that of the reference dataset.) 5 In the Transform dialog, click the other layer. button to view the transform for the ER Mapper Workbook - Airphoto Mosaic Applications 169 Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images Notice that the other layer has a complex transform line defined–this is the result of the histogram matching operation. (The transform for the reference layer was not changed, only the other layer.) 6 Click Close on the Transform dialog to close it. Note: When working with your own data, you would typically experiment by trying different datasets as the reference dataset until you achieve the best overall result. Usually your reference image should be one that contains a mixture of the types of surface cover found in the entire mosaic (urban, farmland, water, etc.). To try different datasets, first click the 99% Contrast Enhancement button to set all the transforms back to a 99% clip on limits, then select the new reference layer and click the Histogram match button. Enter a description for the entire algorithm 1 In the Algorithm dialog, change the text in the Description field to read Red band mosaic - balanced and histogram matched This text now becomes a brief description for the entire algorithm. Save the balanced red bands algorithm to disk 1 From the File menu (on the main menu), select Save As.... The Save Algorithm file chooser dialog opens. 2 From the Directories menu, select the path ending with the text \examples. 3 Double-click on the directory named ‘airphoto_training’ to open it. 4 In the Save As: text field, type the following filename: Red_bands_balanced_mosaic This name denotes that it contains a balanced mosaic of the red band images. 5 Click OK to save the algorithm. Your balanced red band algorithm is now saved to an algorithm file on disk. 170 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images Tip: You will also have to define similar algorithms for the green and blue bands of the image mosaic. Since you will next perform some other processing to help remove seam lines, it is easier to do this first to the red band mosaic, then duplicate the processing for the green and blue band mosaics before assembling the final RGB color mosaic. Close all image windows and dialog boxes 1 Close the image window by selecting Close from the File menu. 2 Click Close on the Algorithm dialog to close it. Only the ER Mapper main menu should be open on the screen. What you learned After completing these exercises, you know how to perform the following tasks in ER Mapper: • Enter and modify a formula in ER Mapper • Use special formulas to correct brightness shifts in an image • Create a greyscale mosaic of individually corrected images • Use histogram matching to balance the contrast of the mosaic Other color shift corrections In the previous exercise, you used the ‘linear_ramp’ formula to correct brightness shifts because that was the appropriate adjustment for the four sample images. However, there are also corrections for vignetting and haze (blue cast) removal that you may consider using if your airphotos exhibit these problems. Vignetting (“hot spot”) corrections Instead of a gradual shift in brightness or color from one side to another, some airphotos have a general darkening toward the edges outward from a central brighter area (the “hot spot”). This effect is called vignetting, and is due to lens refraction in the camera. (Special antivignette filters are sometimes used on the camera to minimize this effect.) This type of correction is a bit more complicated mathematically, but is still fairly easy to implement in ER Mapper. To use the hot spot formula technique, first display your image in an RGB algorithm, then follow these steps: 1 Select Cell Coordinate from the View menu. ER Mapper Workbook - Airphoto Mosaic Applications 171 Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images The Cell Coordinate dialog opens. 2 In the image, click in the center of the hot spot, and note the cell location in Dataset X,Y coordinates. You will use this X,Y cell location in the hot spot formula to tell ER Mapper where the hot spot originates on the image. 3 Click the Edit Formula button, and load the formula ‘hot_spot_correction.frm’ in the ‘mosaic’ directory. This formula has four variables that allow you to specify the location of the hot spot, and apply a correction factor to brighten other parts of the image relative to the hot spot. 4 On the Formula Editor dialog, click the ‘Variables’ button and set the values of the four variables as needed for your image: X_Center - the X (column) cell location of the hot spot in dataset X,Y coordinates (from step 2) Y_Center - the Y (row) cell location of the hot spot in dataset X,Y coordinates (from step 2) X_Factor - a factor controlling the amount of brightness increase in areas right and left of the hot spot; suggested values are 0.1 to 0.35. Y_Factor - a factor controlling the amount of brightness increase in areas above and below the hot spot; suggested values are 0.1 to 0.35. 5 After balancing the image, save the algorithm. You can use this a s template to correct other hot spot images, or copy the layers and add other datasets to create a mosaic of hot spot corrected images. Haze (blue cast) corrections The blue band of natural color airphotos is very sensitive to atmospheric scattering due to pollution and haze in the atmosphere. This scattering effect often gives the photo a bluish cast or tint, either over the entire photo, or toward the edges (vignetting). There are some special techniques that may be applied only to the blue band image to compensate for this. (Haze generally does not affect the green and red bands of natural color airphotos, and does not affect color IR airphotos since they do not image in the blue wavelengths. Black and white visible wavelength airphotos often use special “minus blue” filters to block the blue wavelengths and prevent this problem.) Haze can also affect the clarity of features in the blue band image, and sometimes makes interpretation of detail difficult. Unfortunately there is no way to correct this problem because it is inherent in the original airphoto data. (This effect can be 172 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images seen in the northern parts of the sample training airphotos.) Usually the effect is not too noticeable in RGB color airphotos because the clarity in the red and green bands tends to hide problems in the blue band to some degree. Overall blue cast removal Natural color images often have an overall blue cast to them, for example what should be green vegetation looks more cyan than green. Because the blue wavelengths of light are heavily scattered by the atmosphere, the blue band data often has increased overall brightness relative to the green and red bands. This can be seen in the histograms of the three bands, where the lowest value for the blue band data is usually much higher than the green or red bands: red band lowest value = 8 green band lowest value = 35 blue band lowest value = 69 scattering increases blue band values Usually applying a 99% clip transform to the image will remove this problem, as it will set the transform line to the base of the histogram in each band. If this does not occur, you can apply a stronger clip (97 or 95% for example), or manually drag the transform lines to the base of the histogram in each layer. The gap between the origin (left side) and the base of the histogram and the histogram is generally considered to be the contribution of atmospheric scattering recorded on film by the camera. (The green band also has some, but less, of this effect). ER Mapper Workbook - Airphoto Mosaic Applications 173 Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images Tip: Applying a 99% clip transform to the data works best if you first zoom in to crop off any black edges that may have been scanned as part of the airphoto. The black edges tend to contain low or zero data values that will not be clipped off if processed as part of the image data. Blue vignetting removal Sometimes the blue cast or tint increases toward the edges of the image, and the interior portions look normal (a vignetting effect). Following is one way to try to remove the blue cast from only the affected areas. 1 Define and name a region polygon within the image that contains the “normal” color you expect to see (without the blue cast). This is typically near the center of the image. Make the region as large as possible without including any areas with a noticeable blue cast. You will use the characteristics of this area to help correct other areas affected by the blue cast. Note: Chapter 8 contains information about defining regions and using them in a formula as you are asked to do here. 2 Select Cell Coordinate from the View menu. The Cell Coordinate dialog opens. 3 In the image, click inside the region you defined and note the cell location of the area with the best “normal” RGB color in Dataset X,Y coordinates. You are looking for the location (within the overall region) of the best overall color balance in the image. You will use this X,Y cell location in the correction formula. 4 Select the Blue layer in your algorithm, then click the Edit Formula button in the process diagram. 5 Load the formula ‘anti_vignetting.frm’ in the ‘mosaic’ directory. 6 Edit the formula text to add the following before the it (where is the existing anti vignette formula): IF INREGION(REGION1) THEN INPUT1 ELSE This formula tells ER Mapper that “if the data falls inside the good area region, then display it without changes, else apply the antivignetting formula (to the area outside the region).” 7 In the Formula dialog, click on the ‘Regions’ option button, then select your good region name from the ‘REGION1’ drop-down list. 174 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images 8 In the Formula dialog, click on the ‘Variables’ option button, then set the variables to the following values: OFFSET- a factor controlling the amount of offset to the blue histogram (set to zero for now, you will adjust this later). X_Center - the X (column) cell location of the “good color” area in dataset X,Y coordinates (from step 3) Y_Center - the Y (row) cell location of the “good color” area in dataset X,Y coordinates (from step 3) X_Factor - a factor controlling the amount of blue color adjustment in areas left and right of the good region; suggested values are 0.1 to 0.35. (Try one of these values, you will need to experiment to get it right.) Y_Factor - a factor controlling the amount of blue color adjustment in areas above and below the good region; suggested values are 0.1 to 0.35. (Try one of these values, you will need to experiment to get it right.) The entire image should appear with a slight blue cast. 9 Click the Edit Transform Limits analyze the blue band histogram. button in the process diagram, then The histogram should have two peaks, one representing the “good” area and another (to the right) representing the area affected by the blue cast. Note the difference in data values between the two peaks (usually this is about 60 to 80 but varies with each image). This is the value for the OFFSET variable. 10 Enter the valued determined in step 10 for the ‘OFFSET’ variable in the Formula dialog. 11 Continue to adjust the OFFSET, X_Factor and Y_Factor variables until the image has a constant blue cast across it (no noticeable color shift). 12 Finally, adjust the transforms for the red and green layers until the entire image appears in the “normal” RGB color you want. ER Mapper Workbook - Airphoto Mosaic Applications 175 Chapter 8#Color balancing images#z 2: Create a mosaic of balanced images 176 ER Mapper Workbook - Airphoto Mosaic Applications 9 Removing seam lines This chapter explains techniques you can use to minimize or remove visible seams between images in a mosaic. This may not always be necessary, but it helps create a “seamless” final mosaic. Note: The Color Balancing Wizard will do all that is described in this chapter automatically. These descriptions are included to give you an understanding of the processes involved. About regions and feathering After the previous exercise, you have learned to correct the overall brightness and contrast problems encountered in creating mosaics. This is the first step in balancing the overall contrast of the mosaic to help create one continuous, seamless image. However, there are always minor contrast problems between adjacent images that cannot be removed, and slight mismatches of features along seam lines due to slight errors in the rectification of the images. To create the best possible mosaic, ER Mapper has two additional features that help you achieve a final “seamless” look. They are: • region polygons to constrain the overlap between images to exact areas ER Mapper Workbook - Airphoto Mosaic Applications 177 Chapter 9#Removing seam lines#z About regions and feathering • edge feathering to blend images in areas of overlap to remove visible seam lines Creating hidden stitch line regions to remove seams One effective technique for removing seam lines is to define a special region for each image that constrains the area of overlap with other images to a narrow area. Inside this small area of overlap, ER Mapper’s feathering feature can be used to blend the two images, thus creating a seamless merge between adjacent images. You can also create specially shaped regions that create seams between images that correspond exactly with the border of a specific feature, for example a river. Since the feathering feature works in across an image (horizontally), it is best to define specially shaped regions that create a diagonal zone of overlap between the top and the bottom image. To do this, you need to be able to see the true areas of overlap (using the RGB or other technique), then define a region for each image: region polygon for image A (defines area to be displayed) image A true area of overlap in images A & B regions constrain overlap to only the area common to both regions; blending (feathering) occurs only within this zone image B region polygon for image B (defines area to be displayed) 178 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 9#Removing seam lines#z About regions and feathering For these four sample images, the regions will look like the following diagram when finished. The goal is to create a narrow zone of overlap between the images as this will make the feathering feature more effective for blending out seam lines. image A image C feathering occurs only inside overlap zones image D image B true areas of overlap in the four images regions to constrain areas of overlap regions can also be used to cut out edges of airphotos with fiducial marks or black areas ER Mapper Workbook - Airphoto Mosaic Applications 179 Chapter 9#Removing seam lines#z Hands-on exercises Feathering (blending) images in overlap zones Feathering is an image processing technique that blends or averages the data values between two image across a zone of overlap. This creates a gradual transition from one image to another, instead of the sharp boundary between images if feathering is not used. natural seam line between images feathering across image seam Feathering can also be effective to hide small misalignments between features on adjacent photos. (However gross misalignments will create a blurred look, and you should consider rectifying one or both images again to improve this.) Feathering works best when constrained to fairly small areas of overlap. You can define these areas using regions as described previously. Hands-on exercises These exercises show you how to use ER Mapper’s regions feature to define exact areas of overlap, and to use edge feathering to minimize seam lines. What you will learn... 180 After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Display images so that areas of overlap are evident • Define a region polygon to constrain areas of overlap • Use the region as a mask in a formula ER Mapper Workbook - Airphoto Mosaic Applications Chapter 9#Removing seam lines#z 1: Determining areas of overlap • Before you begin... Use edge feathering to minimize seam lines between adjacent images Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. 1: Determining areas of overlap Objectives Learn how to view areas of overlap between images as an RGB algorithm, and concepts behind defining overlap areas for mosaics. Open the balanced red band algorithm 1 On the main menu, select Open from the File menu. An image window and the Open dialog appear. 2 From the Directories menu (on the Open dialog), select the path ending with \examples. 3 Double-click to open the directory named ‘airphoto_training.’ 4 Double-click on your ‘Red_bands_balanced_mosaic.alg’ algorithm to open it. The balanced greyscale mosaic displays in the image window. This algorithm was created to view images in greyscale, so it uses the Pseudocolor Color Mode and two Pseudo layers. By changing the display of this algorithm, you can easily view areas of overlap between the two images. Display the two images as red and green 1 Right-click on the ‘[Ps]:Pseudocolor’ icon, then select Red Green Blue. The surface Color Mode changes to Red Green Blue (indicated in the surface name [RGB]:Default Surface). The Pseudo layers are crossed out because they are not valid in RGB mode. You will change them Red, Green and Blue layers next. Tip: You can change the Color Mode for the surface either by right-clicking on it, or by selecting the Surface tab and selecting it there. ER Mapper Workbook - Airphoto Mosaic Applications 181 Chapter 9#Removing seam lines#z 1: Determining areas of overlap 2 Right-click on each of the two layers and change them to Red and Green layers as shown below: Change to Red Change to Green The mosaic redisplays so each of the images is shown in a different color . Areas of overlap are clearly visible by the color that results from mixing red and green . The area of overlap between the images is shown in yellow (since red and green combine to create yellow). Areas where images do not overlap are shown as either red or green. Tip: This technique is also a good way to evaluate the accuracy of registration between two images in the area of overlap. For example, where a red and green image overlap, you will typically see a red or green “halo” around features that do not align well in the two images. (This is caused by the same feature being slightly offset in the two images.) Good registration will make features appear as solid yellow. Display the images as a greyscale mosaic again 1 Right-click on the ‘[RGB]:Pseudocolor’ icon, then select Pseudocolor. The surface Color Mode changes to Pseudocolor (indicated in the surface name [Ps]:Default Surface). The Red and Green are crossed out because they are not valid in Pseudocolor mode. 2 Right-click on each of the two layers and change them to Pseudo layers: The mosaic redisplays in greyscale again. As you can see, it is easy to change the type of display and color mode for an algorithm as needed to help accomplish a particular task. (In this case, you wanted to see the overlap between images in the mosaic.) 182 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 9#Removing seam lines#z 2: Defining regions to constrain overlap 2: Defining regions to constrain overlap Objectives Learn how to define region polygons, how to view areas of overlap between images, and how to reference regions in a formula to constrain areas of overlap. Also learn the concepts behind defining overlap areas for mosaics. You will learn the method used to actually define and name region polygons for the raster datasets in the mosaic. Add a vector layer for region definition to the first dataset 1 In the Algorithm dialog, right-click on the lower layer and select Turn Off. The ‘San_Diego_Airphoto_34_rectified.ers’ image will be the only one to be displayed. 2 On the main menu (or Algorithm dialog), click the Annotate Vector Layer button. The New Map Composition dialog box opens. 3 Select the ‘Raster Region’ option button, then click OK. The Raster Region option tells ER Mapper that the annotation layer will be used to create regions for a raster dataset. ER Mapper opens the Tools palette dialog box containing your vector annotation tools. Also notice that a new vector layer titled ‘Region Layer’ has been added to the layer list in the Algorithm window. Define and name a region polygon 1 On the Tools palette dialog, click on the Polygon button. 2 Draw a polygon on the by clicking once at each point, then double-clicking to close the polygon. (Make your polygon fairly large.) The polygon should ER Mapper Workbook - Airphoto Mosaic Applications 183 Chapter 9#Removing seam lines#z 2: Defining regions to constrain overlap be in the form of a rectangle that covers the entire image apart from half of the overlap area. Polygon Overlap area The polygon is selected by default when you close it. Since it is selected, you can now add a color and text attribute to give the polygon a name. 3 On the Tools dialog, double-click the Polygon Style dialog box. button to open the Line 4 In the Line Style dialog, click the Set Color button, choose any bright color, and click OK to close the color chooser. The polygon redisplays with the new color. Note: The line width, line style and other controls apply only to vector annotation, so they are inactive when defining raster regions. You will learn to use the vector annotation tools later during map composition. 5 Click Close on the Line Style dialog. 6 On the Tools dialog, click the Display/Edit Object Attribute open the Map Composition Attribute dialog box. 184 ER Mapper Workbook - Airphoto Mosaic Applications button to Chapter 9#Removing seam lines#z 2: Defining regions to constrain overlap 7 In the Map Composition Attribute dialog, enter the name “west_region” for your region in the text field at the bottom, then click the Apply button. 2 - then click Apply 1- type a region name The text is now defined as a the name or text attribute of the polygon. Later you can refer to the polygon by this name in a formula. Save the region to the dataset 1 Click Close on the Map Composition Attribute dialog. 2 On the Tools palette dialog, click the Save File button. A message dialog appears prompting you to confirm the overwrite of the dataset header file. 3 Click OK on the overwite message dialog. A message window appears showing the names of regions that were added to the dataset header file. 4 Click Close on the ER Mapper Message Window to close it. The region definition and name is saved to the header file of the ‘San_Diego_airphoto_34_rectified.ers’ dataset. 5 Click Close on the Tools palette dialog to close it. Add a vector layer for region definition to the second dataset 1 In the Algorithm dialog, right-click on the lower layer and select Turn On. Right-click on the upper Pseudo Layer and Region layer, and select Turn Off. ER Mapper Workbook - Airphoto Mosaic Applications 185 Chapter 9#Removing seam lines#z 2: Defining regions to constrain overlap The ‘San_Diego_Airphoto_36_rectified.ers’ image will be the only one to be displayed. 2 On the main menu (or Algorithm dialog), click the Annotate Vector Layer button. The New Map Composition dialog box opens. 3 Select the ‘Raster Region’ option button, then click OK. The Raster Region option tells ER Mapper that the annotation layer will be used to create regions for a raster dataset. ER Mapper opens the Tools palette dialog box containing your vector annotation tools. Also notice that a new vector layer titled ‘Region Layer’ has been added to the layer list in the Algorithm window. Define and name a region polygon 1 On the Tools palette dialog, click on the Polygon button. 2 Draw a polygon on the by clicking once at each point, then double-clicking to close the polygon. (Make your polygon fairly large.) The polygon should be in the form of a rectangle that covers the entire image apart from half of the overlap area. The polygon is selected by default when you close it. Since it is selected, you can now add a color and text attribute to give the polygon a name. 3 On the Tools dialog, double-click the Polygon Style dialog box. button to open the Line 4 In the Line Style dialog, click the Set Color button, choose a different bright color, and click OK to close the color chooser. The polygon redisplays with the new color. Note: The line width, line style and other controls apply only to vector annotation, so they are inactive when defining raster regions. You will learn to use the vector annotation tools later during map composition. 5 Click Close on the Line Style dialog. 6 On the Tools dialog, click the Display/Edit Object Attribute open the Map Composition Attribute dialog box. 186 ER Mapper Workbook - Airphoto Mosaic Applications button to Chapter 9#Removing seam lines#z 2: Defining regions to constrain overlap 7 In the Map Composition Attribute dialog, enter the name “east_region” for your region in the text field at the bottom, then click the Apply button. The text is now defined as a the name or text attribute of the polygon. Later you can refer to the polygon by this name in a formula. Save the region to the dataset 1 Click Close on the Map Composition Attribute dialog. 2 On the Tools palette dialog, click the Save File button. A message dialog appears prompting you to confirm the overwrite of the dataset header file. 3 Click OK on the overwite message dialog. A message window appears showing the names of regions that were added to the dataset header file. 4 Click Close on the ER Mapper Message Window to close it. The region definition and name is saved to the header file of the ‘San_Diego_airphoto_36_rectified.ers’ dataset. 5 Click Close on the Tools palette dialog to close it. Display the region polygons over the image mosaic Each one of the four sample airphoto images already has an appropriate region polygon defined to constrain the areas of overlap. Now you will learn how to display the regions simultaneously for all images in the mosaic. 1 In the Algorithm dialog, turn on all the layers by right-clicking on them and selecting Turn on. The two Pseudo and their corresponding Region layers should now be displayed ER Mapper Workbook - Airphoto Mosaic Applications 187 Chapter 9#Removing seam lines#z 2: Defining regions to constrain overlap Note that each region layer has a different color. This was done to make them easy to differentiate when displayed together like this. As you can see, the regions are defined to constrain the area of overlap to a narrow zone as described previously. 188 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 9#Removing seam lines#z 3: Feathering images within regions 3: Feathering images within regions Objectives Learn how to use formulas to process only portions of images inside region polygons, and how to turn on feathering to minimize seam lines between images. Turn off layers for the eastern image 1 Right-click on the ‘San_Diego_Airphoto_36_rectified.ers’ layer, then select Turn Off. (For both the Region and Pseudo layers). right-click and turn off layers for the lower image Only the western image and its region polygon displays. Edit the linear ramp formula to reference the region 1 Select the top Pseudo Layer in the layer list. 2 In the process diagram, click the Edit Formula button. The Formula Editor dialog box opens. Move it left of the Algorithm dialog and below the image window (so all three are visible). You will edit the linear ramp formula so it only operates on and displays the data inside the region polygon. 3 Edit the formula as follows, where is the existing linear ramp formula text already in place: IF INREGION(REGION1) THEN ELSE NULL ER Mapper Workbook - Airphoto Mosaic Applications 189 Chapter 9#Removing seam lines#z 3: Feathering images within regions Make sure the spaces between words and spelling are exactly as above. When finished, the formula should look like this: edit generic formula as described 4 Click the Apply changes button on the Formula dialog. ER Mapper verifies the syntax of your formula. (If you receive an error message, go back a edit the formula as needed, then click Apply changes again.) This formula tell ER Mapper “if the data is inside the named region, then apply the linear ramp formula to it, else assign it a value of null.” Any data values (pixels) assigned a value of null are “masked” from further processing and do not appear on the image. Assign the generic “region1” to the ‘west_region’ region The text you added in parentheses–(region1)–is a generic reference that you can assign to any region name you defined for your dataset. 1 In the Formula dialog, click on the ‘Regions’ option button. The relations area of the dialog changes to show the text REGION1 with dropdown menu next to it. 2 Open the ‘REGION1’ menu and select west_region. This tells ER Mapper to relate the text “REGION1” in the generic formula to the actual region in your dataset named “west_region.” Only the portion dataset inside the region polygon displays. Areas outside the polygon are masked by the formula. Next you will make this change to the formulas in the other Pseudo layer, so only the area within its ‘east_region’ region is processed and displayed. 190 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 9#Removing seam lines#z 3: Feathering images within regions Save the modified linear ramp formula Since you want to add the same formula to the other Pseudo layer, one shortcut is to save the formula. That way, you can load it directly into the other layer without having to retype the text. 1 From the File menu (on the Formula dialog), select Save As. The Save Formula file chooser dialog opens. It is already set to the directory containing the original ‘linear_ramp.frm’ formula, and you will save your modified version in the same place. 2 In the Save As field, enter the text linear_ramp_inregion then click OK. Your formula is now saved to disk and can be reloaded at any time. Turn on all layers in the algorithm 1 Right-click on both the layers for the lower dataset, then select Turn On. (For both the Region and Pseudo layer) Add the inregion formula to the other Pseudo layer 1 Select the second Pseudo layer in the algorithm. The contents of its formula appear in the Formula dialog box, the default linear ramp formula without the region statement. (This should be the layer containing the ‘SE_photo’ dataset.) 2 On the Formula dialog, select Open from the File menu. The Open Formula file chooser dialog opens. It is already set to the directory containing both the original ‘linear_ramp.frm’ formula and your modified ‘linear_ramp_inregion.frm’ version. 3 Click on your ‘linear_ramp_inregion.frm’ formula, then click OK. The formula is loaded and replaces the original linear ramp formula. Your modified formula is now loaded into both Pseudo layers, so it will both images. 4 Click Close on the Formula dialog to close it. Display the images as red and green 1 Right-click on the ‘[Ps]:Pseudocolor’ surface icon, then select Red Green Blue. ER Mapper Workbook - Airphoto Mosaic Applications 191 Chapter 9#Removing seam lines#z 3: Feathering images within regions The surface Color Mode changes to Red Green Blue. 2 Right-click on each of the Pseudo layers and change them to Red and Green layers (as you did previously). The two images display as red or green, but this time notice that the areas of overlap (combined colors like yellow) are constrained to the areas where the regions overlap. This is the effect of the shape of the regions and the use of the ‘inregion’ statement in the formula for each Pseudo layer. Display the images as a greyscale mosaic again 1 Right-click on the ‘[RGB]:Pseudocolor’ icon, then select Pseudocolor. The surface Color Mode changes to Pseudocolor. 2 Right-click on each of the raster layers (Red or Green ) and change them to Pseudo layers: The mosaic redisplays in greyscale again, then the regions display. Zoom into the vertical seam and turn on feathering 1 On the Algorithm dialog, turn off the ‘Feather’ option 2 Right-click in the image window, then select Quick Zoom, then Zoom to All Datasets. The image zooms back out to the full extents of the mosaic. 3 Zoom into the vertical area of overlap below between the west and east photos (a freeway runs through the center). drag a zoom box around overlap area 192 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 9#Removing seam lines#z 3: Feathering images within regions Notice that a vertical seam is very apparent between the two photos, and there is a slight misaligment of features as well. This is typical of airphoto mosaics due to differences in the brightness of each photo and the difficulty with very precise rectification of multiple images. 4 On the Algorithm dialog, turn on the ‘Feather’ option. The zoomed area redisplays with a blending of the two images. What was previously a very noticable seam is now blended and almost undetectable. To achieve this, feathering creates a mathematical blend of the two images in the horizontal direction: 100% of image A 50/50 blend (average value of images A & B) 100% of image B image B image A overlap area 5 Right-click in the image window, then select Quick Zoom, then Zoom to All Datasets. The image zooms back out to the full extents of the mosaic. Delete the region layers in the algorithm 1 Delete both ‘Region Layer (Outline)’ layers by holding down the Ctrl key, selecting both, and then clicking Cut . Enter a description for the final red band algorithm 1 In the Algorithm dialog, change the text in the Description field to read: Final red band mosaic - balanced and feathered This text now becomes a brief description for the entire algorithm. ER Mapper Workbook - Airphoto Mosaic Applications 193 Chapter 9#Removing seam lines#z 3: Feathering images within regions Save the final red band algorithm to disk 1 From the File menu (on the main menu), select Save As.... The Save As... file chooser dialog opens. 2 In the Files of Type: field, select ‘ER Mapper Algorithm (.alg)’ 3 In the Save As: text field, type the following filename: Final_red_bands_mosaic This name denotes that it is the final mosaic of the red band images. 4 Click OK to save the algorithm. Your final red band algorithm is now saved to an algorithm file on disk. The next step is would be to create balanced and feathered algorithms for the green and blue band images, then assemble them into a final RGB color mosaic. Close the image window and Algorithm dialog 1 Close the image window by selecting Close from the File menu. 2 Click Close on the Algorithm dialog to close it. Only the ER Mapper main menu should be open on the screen. What you learned 194 After completing these exercises, you know how to perform the following tasks in ER Mapper: • Define a region polygon to constrain areas of overlap • Display images so that areas of overlap are evident • Use the the region as a mask in a formula • Use edge feathering to minimize seam lines between adjacent images ER Mapper Workbook - Airphoto Mosaic Applications 10 Creating the final mosaic This chapter explains how to apply the same processing techniques to the green and blue band data in each image, and assemble them into a final RGB color mosaic. You will also learn about using an algorithm as a template to apply the same processing to other bands or datasets. Note: The information in this chapter is provided to give you an understanding of the processes involved. You would normally use the Color Balancing Wizard to do this automatically. About algorithms as templates Any algorithm can be used as a template to apply the same processing to other datasets without having to repeat all the steps used to create the algorithm originally. This can save you much time and trouble, and simplify what can sometimes be rather complex processing to create large mosaics of airphotos. For example, instead of repeating all the steps in the previous two chapters to color balance and feather the green and blue band data, you will use the red band algorithm you already created and simply adjust it where needed. ER Mapper Workbook - Airphoto Mosaic Applications 195 Chapter 10#Creating the final mosaic#z Hands-on exercises Using algorithms as datasets Up until now, you have loaded raster datasets into your algorithms (actual image files residing on disk). ER Mapper also lets you use an algorithm as input to another algorithm, just as if the algorithm were actually a dataset. This feature lets you perform processing in stages, without using the time and disk space of writing a new dataset to disk at each stage. For example, when you balanced and feathered the four red band images, you saved it as an algorithm. This algorithm can be loaded into the red layer of another RGB algorithm (as if it were a dataset), and ER Mapper will automatically process all four of the image files as if they were merged into a single file. Note: ER Mapper also has an extension of the algorithm concept called a Virtual Dataset (or VDS). A Virtual Dataset is a special type of algorithm that can be used exactly like a real dataset for the most part, but the virtual image is computed on demand. (A VDS even has an ‘.ers’ file extension like a real dataset.) One common application for a VDS is to link several files together (such as a mosaic) and reference them as if they were one file. The difference between using an algorithm and a Virtual Dataset is that you can calculate statistics for a VDS, define regions, and several other things that you cannot do with an algorithm. See the ER Mapper Tutorial and User Guide manuals for more information. Hands-on exercises These exercises show you how to apply the final balancing and feathering processing to the green and blue bands in each image, and assemble them into a final RGB color mosaic. What you will learn... Before you begin... 196 After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Use an algorithm as a template to apply the same processing to other data • Create an RGB algorithm to display the final mosaic • Enhance the overall contrast of the final mosaic Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. ER Mapper Workbook - Airphoto Mosaic Applications Chapter 10#Creating the final mosaic#z 1: Creating green and blue band mosaics 1: Creating green and blue band mosaics Objectives Learn how to use the red band algorithm as a template to create mosaics for the green and blue bands of each image. Open the final red band mosaic algorithm 1 On the main menu, select Open form the File menu. An image window and the Open dialog appear. 2 From the Directories menu (on the Open dialog), select the path ending with \examples. 3 Double-click to open the directory named ‘airphoto_training.’ 4 Double-click on your ‘Final red_bands_mosaic.alg’ algorithm to open it. The balanced greyscale mosaic of the red airphoto bands displays. Once you have created an algorithm, you can use it as a template to easily apply the same processing to other datasets or bands of data. Display the green band (band 2) of each image 1 From the View menu, select Algorithm. The Algorithm dialog opens. 2 Click on the green ‘[Ps]:Pseudocolor’ icon. Process diagrams for both layers appear in the Layer panel. 3 In the process diagram for each layer, select B2:Green from the Band Selection list. 1 - click surface icon 2 - select B2:Green for both layers ER Mapper Workbook - Airphoto Mosaic Applications 197 Chapter 10#Creating the final mosaic#z 1: Creating green and blue band mosaics This tells ER Mapper to process the green band (band 2) of each image. 4 Click the 99% Contrast Enhancement button. The mosaic image redisplays, but this time shows the green band data for each image in the mosaic. (The green band data is slightly brighter overall.) Histogram match the green band of the airphotos The 99% Contrast Enhancement button has reset the transforms in both layers to optimize the contrast of each green band image separate from the other. Sometimes this produces acceptable results by itself to balance the contrast of all images, but you should try histogram matching to see if you can get any improvement. 1 Select the top layer containing the ‘San_Diego_Airphoto_34_rectified.ers’ dataset . Only the process diagram for that layer displays. As with the red band data, this will be the reference dataset to which the contrast of the other dataset will be matched. 2 Click the Edit Transform Limits button in the process diagram. Edit Transform Limits button The Transform dialog opens showing the histogram for the ‘San_Diego_Airphoto_34_rectified.ers’ dataset. 3 In the Transform dialog, click the Histogram match button. Histogram match button 4 If the dialog appears explaining the histogram match function, click Yes to continue. ER Mapper reprocesses the mosaic image and adjusts the contrast slightly so that both images have similar contrast characteristics. 198 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 10#Creating the final mosaic#z 1: Creating green and blue band mosaics Tip: It is acceptable to use a different reference image for the green or blue histogram match than for the red band. Typically, in larger mosaics, you would try other images as the reference image to see if they produce better results. The idea is to get the best overall contrast between all images, no matter what manner you choose. 5 Click Close on the Transform dialog. You have now performed exactly the same steps on the green band data as you did earlier for the red band data. Each layer has a formula that processes only the data inside the region polygons, and the linear ramp formula to balance the brightness shifts across individual images. Enter a description for the final green band algorithm 1 In the Algorithm dialog, change the text in the Description field to read: Final green band mosaic - balanced and feathered This text now becomes a brief description for the entire algorithm. Save the final green band algorithm to disk 1 From the File menu (on the main menu), select Save As.... The Save As... file chooser dialog opens. 2 In the Files of Type: text field, select ‘ER Mapper Algorithm (.alg)’. 3 In the Save As: text field, type the following filename: Final_green_bands_mosaic This name denotes that it is the final mosaic of the green band images. 4 Click OK to save the algorithm. Your final green band algorithm is now saved to an algorithm file on disk. Display the blue band (band 3) of each image 1 From the View menu, select Algorithm. The Algorithm dialog opens. 2 Click on the green ‘[Ps]:Pseudocolor’ icon. Process diagrams for both layers appear in the Layer panel. ER Mapper Workbook - Airphoto Mosaic Applications 199 Chapter 10#Creating the final mosaic#z 1: Creating green and blue band mosaics 3 In the process diagram for each layer, select B3:Blue from the Band Selection list. This tells ER Mapper to process the blue band (band 3) of each image. 4 Click the 99% Contrast Enhancement button. The mosaic image redisplays, but this time shows the blue band data for each image in the mosaic. Histogram match the blue band of the airphotos The blue bands of airphotos often exhibit the most problem with contrast. These photos are from the southern California area, which suffers from considerable air pollution. The effects of this haze are most apparent by increased brightness and blurring of ground features in the blue band image. (The blue wavelengths of light are the shortest, so they are scattered more by small particles in atmospheric haze than the green and red band images.) However, these color balancing techniques work fairly well at minimizing the effect. 1 Select the second layer containing the ‘San_Diego_Airphoto_36_rectified.ers’ dataset . Only the process diagram for that layer displays. As with the green band data, this will be the reference dataset to which the contrast of the other dataset will be matched. 2 Click the Edit Transform Limits button in the process diagram. Edit Transform Limits button The Transform dialog opens showing the histogram for the ‘San_Diego_Airphoto_36_rectified.ers’ dataset. 3 In the Transform dialog, click the Histogram match Histogram match button 200 ER Mapper Workbook - Airphoto Mosaic Applications button. Chapter 10#Creating the final mosaic#z 2: Creating the final RGB algorithm 4 If the dialog appears explaining the histogram match function, click Yes to continue. ER Mapper reprocesses the mosaic image and adjusts the contrast slightly so that all four images have similar contrast characteristics. 5 Click Close on the Transform dialog. You have now performed exactly the same steps on the blue band data as you did earlier for the red and green bands. Enter a description for the final blue band algorithm 1 In the Algorithm dialog, change the text in the Description field to read: Final blue band mosaic - balanced and feathered This text now becomes a brief description for the entire algorithm. Save the final blue band algorithm to disk 1 From the File menu (on the main menu), select Save As.... The Save As... file chooser dialog opens. 2 In the Files of Type: text field, select ‘ER Mapper Algorithm (.alg)’. 3 In the Save As: text field, type the following filename: Final_blue_bands_mosaic This name denotes that it is the final mosaic of the blue band images. 4 Click OK to save the algorithm. Your final blue band algorithm is now saved to an algorithm file on disk. 2: Creating the final RGB algorithm Objectives Learn how to display the individual band mosaics as an RGB algorithm, and how to adjust the final contrast and color. Run the Image Display and Mosaic Wizard ER Mapper lets you display an algorithm just as if it were a dataset. For example, you will take the three algorithms you created earlier and display them as the red, green and blue components of an RGB algorithm. ER Mapper Workbook - Airphoto Mosaic Applications 201 Chapter 10#Creating the final mosaic#z 2: Creating the final RGB algorithm 1 On the main menu, click the Image Display and Mosaic Wizard button. The Image Wizard dialog opens. 2 On the Image Wizard dialog, click the file chooser button. 3 From the Directories menu (on the Select File dialog), select the path ending with the text \examples. 4 Double-click on the directory named ‘airphoto_training.’ 5 From the Files of Type list, select ‘ER Mapper Algorithm (.alg)’. The contents of the file list change to show files with ‘.alg’ extensions (algorithms). 6 Double-click on the algorithm ‘Final_blue_bands_mosaic’ to load it. 7 Select the Display image in 2D and the Mosaic all files of this type options. This will cause the wizard to search for the same type of file in the ‘airphoto_training’ directory and to mosaic them into one image. 8 Click the Next > button on the Image Wizard dialog. ER Mapper runs the wizard and creates a multi-layer Pseudocolor algorithm. Display the final mosaic in RGB color The Image Display and Mosaic wizard should have mosaiced all the similar algorithms that it found in the ‘airphoto_training’ directory. This should be the ‘Final_blue_bands_mosaic’, ‘Final_green_bands_mosaic’ and ‘Final_red_bands_mosaic’ algorithms. It might also have included the original ‘red_bands_balanced_mosaic” algorithm, which is not wanted in our final RGB image. 1 In the Algorithm dialog, if necessary, remove the unwanted ‘red_bands_balanced_mosaic’ layer by selecting it and clicking on the Cut button. The algorithm should now have three Pseudo layers in one Pseudocolor surface. We must now change these to Red Green and Blue layers in an RGB surface. 2 Right-click on the ‘[Ps]:Pseudocolor’ surface icon, then select Red Green Blue. The surface Color Mode changes to Red Green Blue. 3 Right-click on each of the Pseudo layers and change them to Red, Green and Blue layers. 202 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 10#Creating the final mosaic#z 2: Creating the final RGB algorithm The image should now display in RGB color. 4 Click the 99% Contrast Enhancement button. The complete mosaic image displays in RGB. Notice that there still some minor contrast and color differences between images, but overall the mosaic should look fairly good. Increase the overall contrast of the RGB mosaic The initial mosaic of the red, green and blue band images often sacrifices overall contrast to make sure the images are balanced relative to each other. Now you can increase the contrast of the overall mosaic as desired. 1 Select the Red layer in the algorithm. 2 Click the right-hand Edit Transform Limits diagram. button in the process The Transform dialog box opens showing the histogram for the entire red band mosaic of four images. 3 In the Transform dialog, double-click on the Create autoclip transform button. Create autoclip transform button The ER Mapper autoclip percentage dialog opens. This dialog lets you set the amount of clip applied to the histogram. The default is 99%. 4 Enter the value 97 then click OK. The transform line changes automatically to apply a 97% clip to the data. (97% clips 3% off the histogram–1.5% from both the low and high ends.) 5 Click the Move to next green layer in surface Transform dialog. button on the ER Mapper selects the Green layer and displays its histogram. 6 Click on the Create autoclip transform button. The 97% clip transform line is applied to the green layer histogram. ER Mapper Workbook - Airphoto Mosaic Applications 203 Chapter 10#Creating the final mosaic#z 2: Creating the final RGB algorithm 7 Click the Move to next blue layer in surface button. ER Mapper selects the Blue layer and displays its histogram. 8 Click on the Create autoclip transform button. The 97% clip transform line is applied to the blue layer histogram. Notice that the overall contrast is increased and adds more color to the mosaic image. 9 If desired, try other autoclip percentages or the Histogram equalize or Gaussian equalize options on all three layers and see the result. You can easily fine tune the contrast of the entire mosaic until you get it just right. 10 When finished, reset each layer to a 97% autoclip transform. Zoom in to crop off edges and blank areas After creating a mosaic, it is often desirable to crop off uneven edges or zoom in to make a map of only a portion of the overall mosaic area. 1 From the View menu, select Geoposition. The Algorithm Geoposition Extents dialog opens. 2 Click the Extents tab to display the current mosaic extents. 3 Enter the following values in the Eastings and Northings Top Left and Bottom Right fields: Top Left - Easting: 483610 Top Left - Northing: 3623199 Bottom Right - Easting: 487199 Bottom Right - Northing: 3619609 edit values (Enter/Return to validate) 204 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 10#Creating the final mosaic#z 2: Creating the final RGB algorithm 4 Click the Apply button. ER Mapper zooms to the exact extents you entered, which crop off the outer edges of the mosaic image. You can define the image extents either by entering exact Lat/ Long or E/N values, or visually by dragging a zoom box over the desired area. 5 Click Close on the Algorithm Geoposition Extents dialog. Enter a description for the final RGB algorithm 1 In the Algorithm dialog, change the text in the Description field to read: Final RGB mosaic of red/green/blue band algorithms This text now becomes a brief description for the entire algorithm. Save the final RGB algorithm to disk 1 From the File menu (on the main menu), select Save As.... The Save As... file chooser dialog opens. 2 In the Files of Type: field, select ‘ER Mapper Algorithm (.alg)’. 3 In the Save As: text field, type the following filename: Final_RGB_mosaic 4 Click OK to save the algorithm. Your final RGB algorithm is now saved to an algorithm file on disk. Close the image windows and Algorithm dialog 1 Close the image windows by selecting Close from the File menu. 2 Click Close on the Algorithm dialog to close it. Only the ER Mapper main menu should be open on the screen. What you learned After completing these exercises, you know how to perform the following tasks in ER Mapper: • Use an algorithm as a template to apply the same processing to other data • Create an RGB algorithm to display the final mosaic • Enhance the overall contrast of the final mosaic ER Mapper Workbook - Airphoto Mosaic Applications 205 Chapter 10#Creating the final mosaic#z 2: Creating the final RGB algorithm 206 ER Mapper Workbook - Airphoto Mosaic Applications 11 Color balancing image mosaics This chapter explains how you use the ER Mapper Image Balancing Wizard for Airphotos to balance and color match airphoto mosaics. The previous chapters outlined how you would perform these tasks manually. This was to give you an understanding of what is involved. You will now see how much easier it is to use the Image Balancing Wizard for Airphotos to perform the same tasks automatically. Hands-on exercises These exercises show you how to balance and color match mosaic algorithms using the Image Balancing Wizard for Airphotos. For these exercises, we will be using the airphoto mosaic algorithm we created previously using the Image Display and Mosaic Wizard. What you will learn... After completing these exercises, you will know how to perform the following tasks in ER Mapper: • Use the Image Balancing Wizard to balance and color match an airphoto mosaic. ER Mapper Workbook - Airphoto Mosaic Applications 207 Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic • Before you begin... Compress and save the final image. Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. 1: Color balancing the mosaic Objectives Learn how to use the Color Balancing Wizard for Airphotos to color balance mosaiced images so that they interface seamlessly with one another. Open the airphoto mosaic 1 On the main menu, click the Open button. click to open algorithm 2 From the Directories menu, select the \examples path. 3 Open the ‘airphoto_training’ directory. 4 Double-click on the algorithm ’airphoto_mosaic.alg’ to open it. This is the algorithm that you saved in a previous exercise. It comprises four compressed airphotos of San Diego that were mosaiced using the Image Display and Mosaic Wizard. 208 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic Open the Image Balancing Wizard for Airphotos 1 Click on the Image Balancing Wizard for Airphotos Common Functions toolbar to open the wizard. button on the The wizard processes the currently active image window 2 Select the Images have changed and need reanalyzing option. The wizard only has to analyze the images the first time it is used on them, and skips over it if the images have been previously analyzed. Selecting this option forces the wizard to analyze the images regardless of whether this has been done before. 3 Click on the Next> button to go to the next wizard page. Analyze images for balancing The wizard requires the images to be analyzed before it can do the balancing. The analysis information is stored in the image dataset header files. If the images have not yet been analyzed or you selected the reanalyzing option, the wizard will now do so. 1 Click on the Next> button for the wizard to analyze the images. The wizard will calculate the statistics for the four images and write the information into their respective header files. 2 Click on the Next> button to go to the next wizard page. ER Mapper Workbook - Airphoto Mosaic Applications 209 Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic Select how to balance the images In addition to color balancing, you also have a number of options for clipping the image. These are described below: 210 Original Remove any color balancing and display the unbalanced images Balanced Display the balanced images but do not clip edges. Balanced with no black edges Display the balanced image(s) and remove the black edges. It is preferable not to select this option when balancing images that have very dark water, near the edges of the image. The color balancing wizard for airphotos may select too much of the image as dark edges to be removed. Balanced with clip regions When mosaicing images, compute clip regions to hide the edges between images. (The wizard re-computes the clip regions every time you run it.) By default, the wizard turns feathering ON for when balancing with clip regions, and OFF in all other cases. Show clip regions as a vector overlay Create a vector layer which outlines the clip regions. ER Mapper Workbook - Airphoto Mosaic Applications Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic 1 Select the Balanced with clip regions option. 2 Do not select the Correct for water areas because the image does not have large areas of water. 3 Click on the Next> button for the wizard to balance the images and go to the Color matching page. The wizard will create the clip regions and then balance the image. It will then display it in the image display window as the temp-balance algorithm. Color matching the image To create a seamless mosaic, the wizard is able to match the colors of the mosaiced image to the whole mosaiced image or to one of the images that are part of the mosaic. Alternatively you can skip the color matching altogether. For this exercise we will match the color to the ‘San_Diego_Airphoto_39_compressed.ers’ image. ER Mapper Workbook - Airphoto Mosaic Applications 211 Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic 1 Select the Select a single file to match colors to option, and then click on the Next button. 2 Use the file chooser button to select the image to which the colors are being matched. In this case we will select ‘San_Diego_Airphoto_39_compressed.ers’. 3 Select the Apply 99% clip option to improve the contrast, and click on the Next button. Caution: You would not select the Apply 99% clip option if you are going to compress the image. You would not be able to reverse it when the image is decompressed. The wizard will display the status of the color matching which can take some time to finish. It will then display the final balanced and matched image in temporary algorithm. 4 Click on the Finish button to exit the Color Balancing Wizard for Airphotos. View the algorithm 1 On the main menu, click the Edit Algorithm button. The Algorithm dialog box opens. You now have a algorithm that displays the Red, Green and Blue layers of the four images. 2 Select the top Red layer and click on the Edit Formula process diagram. 212 ER Mapper Workbook - Airphoto Mosaic Applications button on the Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic This will open the Formula Editor. You should notice that the wizard has applied a formula to the layer. This is displayed in the text box at the bottom of the Formula Editor dialog box. The formula applies a balancing function, balance(), to the area of the image that falls within the automatically created clip region, ‘Image Clip’. Areas outside the clip region are converted to nulls. 3 On the Formula Editor dialog , click on the Red button to view the formula for the next red layer. Red button Note that the formula applied is the same as that for the top red layer. 4 Click twice more on the Red button, to move to the two lower red layers. Not that, in both cases, the formula applied is the same. 5 Repeat the above steps for the Green and Blue layers by clicking on the Green and Blue buttons respectively. Green button Blue button 6 Click on the Close button to exit the Formula Editor. 7 Once again select the top Red layer, and click on the Edit Transform Limits button on the right side of the Process Diagram. This will open the Transform dialog box. 8 View the transforms of all the Red layers by clicking on the Red button. ER Mapper Workbook - Airphoto Mosaic Applications 213 Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic Notice that the wizard has matched the histograms of the four layers. The following picture illustrates this. Top layer Second layer Third layer Fourth layer 9 Repeat the above for the Green and Blue layers. In all cases note how the wizard has matched the histograms for the four images that make up the mosaic. Save the balanced algorithm to disk 1 From the File menu (on the main menu), select Save As.... The Save Algorithm file chooser dialog opens. 2 From the Directories menu, select the path ending with the text \examples. 3 Double-click on the directory named ‘airphoto_training’ to open it. 4 In the Save As: text field, type the following filename: airphoto_mosaic_balanced.alg This name denotes that it contains a balanced mosaic of the airphoto images. 214 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic 5 Click OK to save the algorithm. Your balanced algorithm is now saved to an algorithm file on disk. Close the image window and Algorithm dialog 1 On the main menu, select Close from the File menu to close the image window. 2 Click Close on the Algorithm dialog. Only the ER Mapper main menu should be open on the screen. What you learned After completing these exercises, you know how to perform the following tasks in ER Mapper: • Use the Color Balancing Wizard for Airphotos to balance and color match the mosaiced images. ER Mapper Workbook - Airphoto Mosaic Applications 215 Chapter 11#Color balancing image mosaics#z 1: Color balancing the mosaic 216 ER Mapper Workbook - Airphoto Mosaic Applications 12 Composing maps This chapter explains how to use ER Mapper’s Page Setup and Map Composition tools to create top quality cartographic maps. You will learn about setting up a page size, scale and extents for your map, how to draw vector annotation, how to add map objects such as coordinate grids and scale bars, and considerations for printing to hardcopy devices. Note: The following exercise is a simplified example of creating a map. More details on some aspects are provided at the end of the chapter, and you are referred to the ER Mapper User Guide for more complete information. About map composition ER Mapper provides a complete set of map composition tools that let you easily transform images into top quality image maps. Your maps can include common map objects such as coordinate grids, scale bars, symbols, legends, north arrows, and more. You can use the annotation tools to draw lines, text, shaded polygons, and other vector objects. Your maps can also include other layers to add vector data from GIS systems, tabular data, or other external data. ER Mapper’s map composition also has an open design and is user-extendable. You can add your own Postscript map objects to ER Mapper's map object library, such as company logos or north arrows, include external text or graphic image files, and many other types of data. You can also modify the default attributes of map objects and save them under your own unique names for later use. ER Mapper Workbook - Airphoto Mosaic Applications 217 Chapter 12#Composing maps#z Hands-on exercises The following diagram shows the general procedure for creating and printing a map in ER Mapper: Image processing Page setup Compose map Save algorithm Print map Create the desired image using algorithm processing and any dynamic link vector or tabular overlays to be included. Specify page setup parameters for the algorithm to define the position of the image on an output page, map scale, margins, background color, etc. Compose the map by dragging and dropping map objects, specifying object attributes, and drawing annotation such as lines and text. Save the vector map composition file, then save the algorithm containing the annotation/map composition layer and raster layers. Print the map on your hardcopy device, or to an external file format (TIFF, CGM, etc.). Hands-on exercises These exercises give you practice setting up an algorithm to create a map, defining Page Setup parameters, and composing the map by adding map objects and other annotation. What you will learn... 218 After completing these exercises, you will know how to perform these tasks in ER Mapper: • Define Page Setup parameters for an algorithm • Add an Annotation/Map Composition layer to an algorithm • Add a clip mask around the image ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 1: Setting up the page Before you begin... • Draw annotation objects (lines, text, polygons, etc.) on your map • Place map objects (grids, scale bars, etc.) on your map • Specify color and other attributes for annotation and map objects Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. 1: Setting up the page Objectives Learn to use ER Mapper’s Page Setup options to define the position of an image on an output page, and specify other options such as map scaling parameters and background color. In this case, you will create a 1:24,000 scale map to be printed on a large format hardcopy device. Open the final RGB mosaic algorithm 1 On the main menu, click the Open button. An image window and the Open dialog box appear. 2 From the Directories menu, select the \examples path. 3 Open the ‘airphoto_training’ directory, then double-click on the algorithm ‘airphoto_mosaic_balanced.alg’ to open it. This is the image mosaic image you created earlier, and you will use it to create your map. 4 Re-size the image window so that the displayed image is a perfect rectangle. This will crop the image to remove the jagged edges. Display the Annotation toolbar 1 On the main menu, select Annotation from the Toolbars menu. ER Mapper adds a third toolbar with buttons for quick access to common functions used for annotation and map composition. Specify Metric or Imperial units for page setup 1 On the main menu, select Preferences from the Edit menu. ER Mapper Workbook - Airphoto Mosaic Applications 219 Chapter 12#Composing maps#z 1: Setting up the page The Preferences dialog opens providing General, Datasets, 3D Options, and Advanced tab pages. 2 Select the General tab page (if needed), then select either Metric or Imperial from the ‘Display Units’ drop-down list (whichever you prefer). 3 Click Close on the Preferences dialog to close it. All values regarding the plot size, margin sizes and other page setup parameters will be displayed in the measurement units you selected. Open the Page Setup dialog box 1 From the File menu, select Page Setup (or click the Setup Algorithm Page Size button on the Annotation toolbar). The Page Setup dialog box opens. This dialog provides controls for you to choose a default hardcopy device, position and scale your image on the output plot area, specify a background color and more. apply settings to current algorithm number of pages hardcopy device will print using current settings page contents outline (blue box) page extents outline (red box) select default hardcopy device overall size of page extents (plot size) select predefined plot sizes size of borders surrounding page contents e xact m ap sca le 220 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 1: Setting up the page Note: You can also use the Page Setup Wizard to set the page up. This will not be described in this exercise. Refer to the ER Mapper User Guide for information on the Page Setup Wizard. The area on the left side shows the size and shape of the plot in red (the “page extents”), and the relative size and position of the algorithm image within the plot area in blue (the “contents extents”). Select the destination hardcopy device 1 Select the ‘Hardcopy Control Files’ option at the top (if it is present). This tells ER Mapper to use its own set of device drivers. (If you are running ER Mapper on a PC, you can also choose to use the Windows drivers.) 2 Click the Default Hardcopy file chooser button. The Default Hardcopy dialog opens to let you select the type of printer or graphics file that you will be using. 3 From the Directories menu, select the \hardcopy path. A list of directories for categories of hardcopy devices and file formats displays. 4 Double-click on the directory named ‘HP’ to open it and view a list of available options for Hewlett-Packard printers. 5 Double-click on the entry ‘HP_DesignJet_300dpi_A0.hc’ to select it. This device is now selected as your default hardcopy device, and we will assume that your example map will be printed on it. It is a good idea to choose the device you intend to print on so you can see how large your plot will be later. However, you can change and print to any other device or file format at print time. (The HP DesignJet is a large format color inkjet plotter. The entry you selected is designed to tell the printer to print at 300 dots per inch on an A0 size area (35 inches or 89 cm wide), which the device’s total printable area. Specify how the page or map contents can be scaled The Constraints drop-down list lets you specify how map objects are scaled relative to the output page. Typically you need to decide which parameters are most important for your map: a fixed page size, fixed borders, or a fixed map scale. 1 From the Constraints drop-down list, select Auto Vary:Page. ER Mapper Workbook - Airphoto Mosaic Applications 221 Chapter 12#Composing maps#z 1: Setting up the page The outlines representing the page extents (red) and page contents (in blue) become the same size and shift down to the center of the white area on the Page Setup dialog. The Border and Scale fields are now editable. Auto Vary:Page mode tells ER Mapper that it can automatically change the size of the image extents (size) to accommodate any changes you make to the map scale or the size of borders surrounding the image. (Other Constraints options will automatically change plot borders or map scale if other parameters are changed.) 2 Click on the Snapshot current image window extents button. This will crop the page contents extents with to that with which it is currently being displayed. The page will still display the whole image, and will require a clip-mask to remove the edges. Specify the output map scale 1 In the Scale - 1: text field, enter the value 12000 then press Enter or Return to validate. ER Mapper sets the size of the page contents (the physical size of the image on the page) to print at 1:12,000 map scale. Specify borders surrounding the page contents Right now the page extents and page contents are the same size. Next you will add borders around the contents (the seismic image) so you have space to add a title, scale bar, map grid, and other items. 1 In the text fields under ‘Border,’ enter the following values for each field in the units you are using (press Enter or Return after each to validate): Top: 2.0 (inches) or 50 (mm) Left: 2.0 (inches) or 50 (mm) Right: 2.0 (inches) or 50 (mm) Bottom: 4.0 (inches) or 100 (mm) By adding borders, you increased the total plot size to approximately 420 by 629 mm (or about 29 by 28 inches). The blue outline shows the relative size and position of the page contents in the new, larger plot size. The physical size of the mosaic image (page contents) has not changed, it will still print at 1:12,000 scale. 222 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 1: Setting up the page Tip: After setting the desired map scale and border values, notice that the Hardcopy Pages Across and Down fields show the percentage of device’s A0 size print area that the plot will occupy (45% of the width of an A0 page in this case). If your total plot size (page extents) is larger than the print area of your device, these values will be greater than one, indicating that ER Mapper would divide the plot and print each portion on a separate page or strip. Set the background color to white 1 Select the text in the Background Color field, type white, and press Enter or Return to validate. ER Mapper sets the page background color to white (the areas of the page surrounding the page contents). If you will be printing on a device that has a white background, it is often helpful to set the background color to white while you are composing the map to get a better idea of the final output. (You can use the Set Color button as well to choose any arbitrary background color.) Your Page Setup dialog should now look like this (units shown are Metric): percentage of A1 size area the plot will fill size of page contents (image) relative to total size and shape of plot (page extents) total size of plot ER Mapper Workbook - Airphoto Mosaic Applications 223 Chapter 12#Composing maps#z 2: Adding a clip mask around the image Save the algorithm with the Page Setup parameters 1 Click OK on the Page Setup dialog to close it. ER Mapper redisplays the colordrape image to show the white page border areas that you added in Page Setup. Note: The edges of the airphotos are still visible until you add a clip mask to the image to mask them out. You will do this next. 2 From the File menu, select Save As... to save the algorithm under your own name. 3 From the Directories menu, select the \examples path. 4 Double-click on the directory ‘airphoto_training’ to open it. 5 In the Save As: text field, enter the text Final_mosaic_map. 6 Click OK to save the algorithm, which now includes your page setup parameters. 2: Adding a clip mask around the image Objectives Learn to add a clip mask map object to an image to block out any undesired areas. Add a vector layer for the clip mask 1 On the Common Functions toolbar, click the Annotate Vector Layer button. Annotate Vector Layer button The New Map Composition dialog box opens to ask what type of annotation you want to create. 2 Make sure the Vector File option is selected, then click OK on the New Map Composition dialog. 224 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 2: Adding a clip mask around the image ER Mapper opens the Tools dialog containing your drawing tools. Move the Tools dialog next to the right side of your image. Add a clip mask map object 1 On the Tools dialog, click on the Map Rectangle button. The Map Object Select and Map Object Attributes dialogs open. These dialogs let you drag-and-drop map objects onto your page and specify color, text style, and other attributes. 2 In the Map Object Select dialog, select Clip Mask from the Category drop-down list. Previews of the two types of clip mask objects appear. One masks out areas inside the mask border, and the other masks areas outside the border. (The name of the object is shown in the status line at the bottom of the dialog when you point to it.) 3 Point to the icon titled Clip_Mask/Outside (the green border outside the image), then drag and drop it into the map algorithm image window. drag and drop object onto map page (image window) The clip mask object is “dropped” onto the page and appears as a small box in the center with four selection handles. (You will learn more about bounding boxes later.) 4 In the Map Object Attributes dialog, click the Fit Grid button. The bounding box automatically expands to cover the exact area that wish to display (the extents you defined in the Page Setup dialog earlier). 5 In the Map Object Attributes dialog, turn off the ‘Fast Preview’ option. ER Mapper Workbook - Airphoto Mosaic Applications 225 Chapter 12#Composing maps#z 2: Adding a clip mask around the image The clip mask map object draws over the image. Now the exact area you wish to plot as your map is bounded by the white borders area. Turn off Fast Preview to view mask object Fit Grid to fit box to zoom extents Save the clip mask as a separate annotation file 1 On the Tools dialog, click the blue Save As button. The Map Composition Save As dialog opens. 2 Make sure the ‘Vector File’ option is selected, then click the next to ‘Save to File.’ button 3 From the Directories menu (on the file chooser dialog) , select the \examples path. 4 Double-click on the directory ‘airphoto_training’ to open it. 5 In the Save As: text field, type the text map_clip_mask. 6 Click OK to validate the filename. 7 Click OK on the Map Composition Save As dialog. Your clip mask vector annotation object are saved to an ER Mapper format vector file (.erv) on disk. 8 Click Close on the Tools dialog. Label the annotation layer 1 Click the Edit Algorithm button on the main menu. On the Algorithm dialog, notice that ER Mapper has added an ‘Annotation Layer’ to the algorithm layer list to display the vector clip mask you created. 226 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 3: Drawing vector annotation 2 Change the annotation layer’s label to clip mask. 3 Click Close on the Algorithm dialog to close it. 3: Drawing vector annotation Objectives Learn to use the vector annotation tools to draw text, lines and polygons, and the change the color, style and other attributes of the objects. Zoom to the Page Contents and Page Extents Currently the image is zoomed out to show the page extents and the relative position of the image within it. 1 Expand the image window size to make it slightly larger. 2 Right-click on the image and, from the Quick Zoom menu, select Zoom to Page Contents. The image zooms in to the extents of the page contents (the extents of the mosaic image that you wish to appear in your map). Since you will draw annotation on the image, it is helpful to maximize the area on the screen used for the image. Later you will zoom to the extents again to add map objects in the border areas. Add a second vector layer for map annotation 1 On the Common Functions toolbar, click the Annotate Vector Layer button. The Open Map Composition dialog box opens. Since your algorithm already has one vector layer, you are prompted to reopen that dataset or create a new one. 2 Click New on the Open Map Composition dialog. The New Map Composition dialog box opens. 3 Make sure the Vector File option is selected, then click OK on the New Map Composition dialog. ER Mapper opens the Tools dialog containing your drawing tools. Move the Tools dialog next to the right side of your image. Draw a polyline to trace the highway in the image This image shows a highway running from the left center down to the lower right. ER Mapper Workbook - Airphoto Mosaic Applications 227 Chapter 12#Composing maps#z 3: Drawing vector annotation 1 On the Tools dialog, click once on the Polyline button. 2 Draw a line to trace the highway path by clicking once at each point, then double-clicking to end the line. A line appears on your image to highlight the linear feature. Note that markers appear on the line at each node to indicate that the line is “selected.” View and modify the attributes of the polyline 1 On the Tools dialog, double-click on the Polyline button. The Line Style dialog box opens to let you choose attributes for your polylines. 2 Click the Set Color button, choose a bright blue color, then click OK to close the Color chooser dialog. The line color on the image changes to your selected color. 3 Click the Width drop-down list and choose 5.0 to increase the line width. The attributes for your selected polyline change interactively. 4 On the Tools dialog, click on the Edit Object Extents button. The Map Composition Extents dialog opens to show information about the polyline object. It shows the line length in map units, and other attributes such as the number of vertices, geographic extents, and so on. 5 Click Close on the Map Composition Extents dialog. 6 On the Tools dialog, click the Select/Edit Points Mode button. 7 Drag any node of the selected polyline to move it. When a polyline is selected and Select/Edit Points Mode is active, you can reshape the line as desired by dragging the line nodes. (You will learn how to move entire objects later.) 8 In the Line Style dialog, turn on the ‘Curved’ option. ER Mapper applies a spline function to the selected line and reshapes it into smooth, rounded curves. This can be helpful to create more visually pleasing lines when tracing roads, rivers, and other curving linear features. 9 Turn off the ‘Curved’ option. The line returns to its original appearance with straight segments at each node. 10 Click Close on the Line Style dialog. 228 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 3: Drawing vector annotation Tip: To trace a long linear feature in a large image (such as this one), it is helpful to draw the line along the entire extent of the feature first, then zoom into each area and adjust the exact position of the vector object by moving the line nodes. Draw a shaded polygon around a feature 1 On the Tools dialog, click on the Polygon button. 2 Draw a polygon around any areal feature (such as a housing development) by clicking once at each point, then double-clicking to close the polygon. The polygon object appears surrounding the area, and it is selected. By default, your polygon displays the currently selected line color, thickness, etc. 3 On the Tools dialog, double-click on the Polygon button. The Line Style dialog box opens to let your set polygon attributes. (The same dialog is used for polylines, rectangles, and other vector objects.) 4 Click the Set Color button, choose a yellow color, then click OK to close the Color chooser dialog. 5 Under Fill Pattern, click on one of the diagonal line fill patterns. The pattern you choose appears in the Current Fill window on the dialog. The polygon is filled with a diagonal yellow shade pattern. 6 On the Tools dialog, click on the Edit Object Extents button. The Map Composition Extents dialog opens to show information about the polygon object, including the perimeter length and area. 7 Click Close on the Map Composition Extents dialog to close it. Tip: To delete a node from an existing polyline or polygon, use Select/Edit Points Mode to select it, click on the node to delete, then click the Delete Point button. To add a node, click the Add Points Mode on the line to add a node at that point. button, then click Draw a shaded oval and move and resize it 1 On the Tools dialog, click the Oval button. ER Mapper Workbook - Airphoto Mosaic Applications 229 Chapter 12#Composing maps#z 3: Drawing vector annotation 2 Point anywhere inside the image, drag an oval shape and release. A shaded yellow oval appears. By default, the oval is selected. 3 Under Fill Pattern, click on the top entry (clear or none). The fill pattern is removed from the oval. 4 Click Close on the Line Style dialog. 5 On the Tools dialog, click the Select and Move/Resize Mode button. Select and Move/Resize Mode lets you move and/or resize the selected object. Notice that the oval’s selection handles change–now there are eight handles. object handles–drag to resize object as desired 6 Drag one of the selection handles to increase the oval size. 7 Point inside the oval, and drag it to a new location. When an object is selected and Select and Move/Resize Mode you can move the object by dragging it from inside. 8 In the Tools dialog, click the Delete Object is active, button. The selected oval object disappears from the image. Selecting an object and clicking Delete Object Tip: is the way to delete any vector annotation object. If you delete an object by mistake, immediately click the Undo Last Delete button to restore it. Tips for selecting objects ER Mapper’s annotation tool set provides two “select” tools for different tasks: • 230 Use the Select/Edit Points Mode button to select a polyline or polygon object when you want to move the individual line nodes, or select nodes. ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 3: Drawing vector annotation • Use the Select and Move/Resize Mode button to select any annotation object when you want to move the entire object (drag from the center) or resize the entire object (drag one of the yellow handles). • To select multiple objects at once, choose the Select and Move/Resize Mode button. Then either drag a marquee box around all the objects, or select them one at a time by holding down the Shift key and clicking on them. Tip: To duplicate an object, select it and click the Clone Object button. This can useful, for example, for copying blocks of text or creating exact copies of polygons, ovals, and so on. Draw and modify a text string 1 On the Tools dialog, click the Text Object button. The Text Style dialog box opens. 2 Drag a box inside the image about one-half inch in height. 3 In the Text Style dialog, click in the Text field at the bottom to position the cursor, then type main highway. The text appears on the image as you type. 4 In the Text Style dialog box, select the following text attributes: Size: 72.0 Color: choose any bright color Font Type: Postscript Stroke Font: Helvetica-Bold Notice that the text object automatically updates as you change the attributes. Tip: Text drawn as annotation can be set to always print at an exact point size (the Fixed Text option on), or to automatically scale up or down proportionally at whatever size the image is printed (Fixed Text option off). 5 Click the Select and Move/Resize Mode button, then drag the text in the image to overlap with the blue vector you traced earlier. 6 From the Angle (deg) drop-down list, select 310.0. ER Mapper Workbook - Airphoto Mosaic Applications 231 Chapter 12#Composing maps#z 3: Drawing vector annotation The text string rotates 310 degrees counter-clockwise, so it now points down toward the lower right. (You can also type any arbitrary rotation value. Text strings rotate around their origin in the upper-left corner.) 7 On the Tools dialog, click the Select and Move/Resize Mode button. 8 Point to the text block, and drag it to any desired position. 9 Click Close on the Text Style dialog to close it. Place a highway number symbol on the road object 1 On the Tools dialog, click on the Map Polygon button. The Map Object Select and Map Object Attributes dialogs open. 2 In the Map Object Select dialog, drag and drop the Road_Maps/ Highway4 object onto highway line on the image. The highway road symbol appears on the image. 3 In the Map Object Attributes dialog, set the following value (press Enter or Return afterward): Highway: 405 Fill Color: red The highway number and color change. 4 On the Tools dialog, click the Select and Move/Resize Mode button. 5 Resize and position the highway symbol as desired. Tip: ER Mapper contains a wide variety of special symbols you can use in maps. These are located on the Map Objects dialog under Map_Symbols, Symbols, and other categories. Save the vector objects to an annotation file 1 On the Tools dialog, click the blue Save As button. The Map Composition Save As dialog opens. 2 Make sure the ‘Vector File’ option is selected, then click the next to ‘Save to File.’ 232 ER Mapper Workbook - Airphoto Mosaic Applications button Chapter 12#Composing maps#z 4: Defining map objects 3 From the Directories menu (on the file chooser dialog) , select the \examples path. 4 Double-click on the directory ‘airphoto_training’ to open it. 5 In the Save As: text field, type the filename vector_annotation. 6 Click OK to validate the filename. 7 Click OK on the Map Composition Save As dialog. Your vector annotation objects are saved to an ER Mapper format vector file. 8 Click Close on the Tools dialog. Label the annotation layer 1 Click the View Algorithm for Image Window menu. button on the main Notice that ER Mapper has added a second ‘Annotation Layer’ to the algorithm layer list to display the interpretations you create. 2 Change the annotation layer’s label to interpretations. Note: Clip masks will cover other vector annotation if they are above the other layers in the algorithm layer list. (The same priority rule that applies to overlap in multiple raster layers.) It is recommended that layers for clip masks be positioned below other vector layers unless you want to mask other vector data. 3 Click Close on the Algorithm dialog to close it. 4: Defining map objects Objectives Learn to use ER Mapper’s Map Composition tools to place and modify map objects such as scale bars, coordinate grids, north arrows, and others. Zoom to the Page Extents to view the entire map page 1 On the Annotation toolbar, click the Zoom to Page Extents button. The image zooms out to the extents of the page defined for the algorithm, and shows the white border areas where you will place map objects. ER Mapper Workbook - Airphoto Mosaic Applications 233 Chapter 12#Composing maps#z 4: Defining map objects 2 On the Tools dialog, click on the Map Rectangle button. The Map Object Select and Map Object Attributes dialog boxes open on the right side of the screen. These dialog boxes let you drag and drop map objects onto the page in your image window, and specify attributes for the objects. Layout the types and positions of map objects Before creating your map, it is a good idea to determine which types of map objects you want to use, and their relative sizes and positions on the page. In this exercise, you will create a map with the following objects similar to this one Map title E/N grid & labels North arrow Company logo Scale bar You will define these objects on your image window “page” in two ways: 234 • draw a bounding box and drag-and-drop the object into it; or • drag-and-drop the object onto the page and resize the bounding box afterward ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 4: Defining map objects Refer back to the diagram above as a guide for the size and position of map objects you are asked to create in the next sections. Add a third vector layer for cartographic symbols 1 On the Annotation toolbar, click the Annotate Vectors/Map Composition button. The Open Map Composition dialog box opens showing the names of the two annotation files you created. You want to create a third new one. 2 Click New on the Open Map Composition dialog. 3 On the New Map Composition dialog that opens, make sure the Vector File option is selected, then click OK. ER Mapper opens the Tools dialog containing your drawing tools. Add a main title above the image 1 On the Tools dialog, click on the Map Rectangle button. The Map Object Select and Map Object Attributes dialogs open. 2 Drag a bounding box centered at the top of the image window (leave some space below it for grid labels). drag a box above the image 3 In the Map Object Select dialog, select Title from the Category drop-down list. 4 Point to the icon titled Title/Scaling, drag it into the Map Object Attributes dialog. (The default title color is white so it does not appear initially.) ER Mapper Workbook - Airphoto Mosaic Applications 235 Chapter 12#Composing maps#z 4: Defining map objects 5 On the Map Object Attributes dialog, change the following text and attributes for your title: Title: Airphoto Mosaic, San Diego (press Enter or Return afterward) Font Color: black (either type or use Set Color button) The title object automatically updates as you change the attributes. 6 On the Tools dialog, click the Select and Move/Resize Mode button. 7 Resize (by dragging a handle) or reposition the title as desired. The title text changes size automatically to fill at least one dimension of your bounding box. Tip: If the title text is not visible, you can click on the Refresh Image Tools dialog to force ER Mapper to re-display the image. button on the Add a scale bar below the image 1 In the Map Object Select dialog, select Scale Bar from the Category drop-down list. Previews of the various types of scale bar objects appear. 2 Point to the icon titled Scale_Bar/Box, then drag and drop it into a position below the image. The scale bar object is “dropped” onto the page and it draws a few seconds later. The default attributes for the scale bar appear in the Map Object Attributes dialog box. Zoom in on the scale bar and change the attributes 1 On the Tools dialog, click the ZoomBox Mode button. 2 Inside the image window, drag a box around the scale bar object to zoom in on it. 3 On the Map Object Attributes dialog, change the following attributes for your scale bar: Labels Color: black Labels Font: Helvetica-Bold (select from pop-up fonts dialog) Units Font: Helvetica-Bold 236 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 4: Defining map objects Notice that the scale bar object automatically updates as you change the attributes. 4 On the Annotation toolbar (on the main menu), dialog, click the Previous Zoom button. ER Mapper zooms out to the previous zoom level (the page extents). 5 On the Tools dialog, click the Select and Move/Resize Mode button. 6 Drag your scale bar object into the desired position, or resize it by dragging one of the selection handles. If you resize the scale bar (make it wider or narrower), ER Mapper automatically adjusts the scale and divisions (it is a “smart” map object). Tip: To resize or move any map object, select it first using the Select and Move/ Resize Mode button, then move or resize it as desired. Add a north arrow on the lower-right 1 In the Map Object Select dialog, select North Arrow from the Category drop-down list. A list of icons representing various types of north arrows appears. 2 Point to the compass north arrow (North_Arrow/Compass), and drag it to a position in the lower-right of the page. The north arrow object drops onto the page. 3 Click the Select and Move/Resize Mode button (on the Tools dialog), and resize and position the north arrow as desired. Tip: ER Mapper’s north arrows are “smart” and will always point to north on a rectified image. Add a company logo on the lower-left 1 In the Map Object Select dialog, select Logo from the Category drop-down list. A list of icons showing some sample company logos appears. ER Mapper Workbook - Airphoto Mosaic Applications 237 Chapter 12#Composing maps#z 4: Defining map objects 2 Point to the ER Mapper logo icon, and drag-and-drop it onto the lower-left part of the page. The logo object drops onto the page. Resize and position it as desired. Tip: You can add your own company logos as Postscript files and access them from the standard Logos category used here. Define an Eastings/Northings coordinate grid over the image 1 In the Map Object Select dialog, select Grid from the Category drop-down list. 2 Point to the Grid/EN icon, and drag it into the image window. The grid map object draws in the lower-right part of the image. 3 On the Map Object Attributes dialog, click the Fit Grid button. ER Mapper automatically fits the bounding box exactly to the extents of the page contents (image) on the page. 4 On the Map Object Attributes dialog, turn on the Fast Preview option. Fast Preview tells ER Mapper not to update the object interactively as you change the attributes. 5 On the Map Object Attributes dialog, change the following attributes for your grid (use defaults for all others): Grid Style: Full Grid Border Type: Checks Grid Spacing X: 500 meters Grid Spacing Y: 500 meters Top labels orientation: Horizontal Right Tip: You could have used the grid to clip the image without having a separate clip mask. To do this you would select the Clip option. 6 On the Map Object Attributes dialog, turn off the Fast Preview option. The grid map object is rendered using the attributes you defined. The grid spacing is 500 meters, and the “checks” option puts a map collar around the image. 238 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 4: Defining map objects Tip: The Fast Preview option is very useful for working with complex map objects that take time to redraw (such as a grid or algorithm image). This lets you change all the attributes you desire or fine tune object size/position without ER Mapper trying to update the object on the screen each time. Adjust the size or position of any object If desired, you can easily resize or position any map object by moving or resizing the bounding box that contains it. 1 In the Tools palette dialog, click the Select and Move/Resize Mode button. 2 Click on any map object to select it (the handles will appear), and drag the bounding box to reposition it or change the size by dragging a handle. Save the map composition file to disk 1 On the Tools dialog, click the blue Save As button. The Map Composition Save As dialog opens. 2 Make sure the ‘Vector File’ option is selected, then click the next to ‘Save to File.’ button 3 From the Directories menu (on the file chooser dialog) , select the \examples path. 4 Double-click on the directory ‘airphoto_training’ to open it. 5 In the Save As: text field, type the text map_composition. 6 Click OK to validate the filename. 7 Click OK on the Map Composition Save As dialog. Your map objects are saved to an ER Mapper format vector file (.erv) on disk. 8 Click Close on the Tools dialog. Note: When you close the Tools dialog (exit edit mode), ER Mapper redisplays the image exactly as it will look when printed. (During edit mode, line thickness is slightly exaggerated to help editing and modifications.) ER Mapper Workbook - Airphoto Mosaic Applications 239 Chapter 12#Composing maps#z 4: Defining map objects Label the map composition layer 1 Click the View Algorithm for Image Window menu. button on the main On the Algorithm dialog, you now have three annotation layers–your new map objects layer, your ‘vector annotation’ layer, and your ‘clip mask’ layer. 2 Change the ‘Annotation Layer’ label to map composition. 3 Click Close on the Algorithm dialog to close it. Tip: It is often helpful to separate different types of annotation into separate files as you did here–one for a clip mask, one for vector drawing, and another for map objects. This makes it easier to work with the data, and you can simply turn the desired vector layers on/off to display/not display those items in your algorithm. (You could have saved all your vector interpretations and map objects in the same file.) Save the algorithm to update the changes 1 On the main menu, click the Save toolbar button. 2 When asked to confirm the overwrite, click OK. Your algorithm can now be printed using the Print selecting Print from the File menu. toolbar button or by Note: It is important to remember to save your algorithm after defining map objects. Otherwise the annotation layers and files will not be part of the algorithm when you go to print it later. Close all image windows and dialog boxes 1 Close the image window using the window system controls or by selecting Close from the File menu. Only the ER Mapper main menu should be open on the screen. What you learned... After completing these exercises, you know how to perform the following tasks in ER Mapper: • 240 Define Page Setup parameters for an algorithm ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 4: Defining map objects • Add an Annotation/Map Composition layer to an algorithm • Add a clip mask around the image • Draw annotation objects (lines, text, polygons, etc.) on your map • Place map objects (grids, scale bars, etc.) on your map • Specify color and other attributes for annotation and map objects Additional features of Map Composition The preceding simple example covered only the basics of using ER Mapper’s Map Composition, and following are some additional features. Refer to the chapter on creating maps in the ER Mapper User Guide for complete information. • If you drag an object into a bounding box that already contains an object, the old object is replaced by the new one. This is an easy way to try several north arrows, for example. • Objects that are dragged and dropped to replace a current object automatically inherit any common attributes from the previous object. For example, if you have a red north arrow in a bounding box and then drag in a scale bar object, the scale bar automatically inherits the red color (since both objects have the “Color” attribute in common). • You can modify the default attributes of map objects and save them under your own names (using Save As on the Map Object Attributes dialog). • You can draw other image processing algorithms you’ve created as map objects on the page (using the Category: Algorithm on the Map Object Select dialog). This is useful for drawing inset images that show an overview map, inset image, or other types of processing techniques or data of the same area. • You can plot objects from external files like TIFF, EPS, or Targa (using the Category: Image on the Map Object Select dialog) • You can import text directly from ASCII text files and plot it on your map page (using the Category: Text on the Map Object Select dialog) Page Relative and Map Unit Relative map objects The vector map objects you defined in this exercise have their position and size specified relative to the page, rather than to map units (such as Latitude Longitude). This allows you to create standard map sheets with objects that remain in a fixed size and position on the page, regardless of how the page is scaled or the extents of the datasets used in the page contents are changed. You can also specify the position of map objects in geographic coordinate units. The position of each object is tied to a particular geographic location and map sheet size. ER Mapper Workbook - Airphoto Mosaic Applications 241 Chapter 12#Composing maps#z 4: Defining map objects To specify a map object as map unit relative, turn off the Page Relative option on the Map Object Attribute dialog box. The page relative attribute can be assigned either before or after the object is dragged-and-dropped onto the page. See the ER Mapper User Guide for more information. Page Setup Constraints options In the previous simple example, you chose the ‘Auto Vary:Page’ option, although you could have chosen others as well. The Constraints options you can use are summarized briefly below: • Fixed Page:Extents from Zoom–This is the default setting for all new algorithms, where the contents scale and borders are taken from the current zoom extents of the algorithm. For map making purposes, Extents from Zoom is not recommended because it can effect line thickness and text sizing. • Auto Vary:Page–This mode allows ER Mapper to automatically vary the page size to account for any changes made to the map scale or page borders. This mode is easiest, for example, to print a map at an exact scale without regards to constraining it to a specific page size. If you want to place map objects outside the image (page contents) area, enter the desired border sizes to create space for them. (This is a good initial choice when you are prompted to change the mode when using the annotation tools.) • Auto Vary:Borders–This mode allows ER Mapper to automatically vary the page borders to account for any changes made to the map scale or page size. This mode is most useful for printing at both an exact map scale and exact plot size. • Auto Vary:Scale–This mode allows ER Mapper to automatically vary the map scale to account for any changes made to the page size or page borders. This mode is useful, for example, for printing an image at various sizes when exact map scale is not important. Printing your map When you want to print your final map algorithm (using File/Print or the Print button), ER Mapper asks for the name of the algorithm. When the print operation begins, ER Mapper automatically locates, processes and renders all the 242 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 12#Composing maps#z 4: Defining map objects datasets used in the algorithm into one final print image. In this case, your map algorithm uses seven datasets–a mosaic of four airphotos, and three vector datasets for clip mask, annotation and map items (which you created). mosaic of airphotos printer Mosaic Map algorithm map comp dataset(s) or file (TIFF, CGM, etc) Since the map algorithm is made of several layers (and datasets), you can easily change it. For example, to print the image without the map annotation, simply turn off that layer in the algorithm, resave it, and print it. ER Mapper Workbook - Airphoto Mosaic Applications 243 Chapter 12#Composing maps#z 4: Defining map objects 244 ER Mapper Workbook - Airphoto Mosaic Applications 13 Compressing images This chapter shows you how to save your large mosaic as a compressed image. About ECW compression ER Mapper compresses images using wavelet compression technology which offers very high quality results at high compression rates. You can typically compress a color image to less than 2% to 5% of its original size (50:1 to 20:1 compression ratio) and compress a grayscale image to less than 5% to 10% of its original size (20:1 to 10:1 compression ratio). This means that, at 20:1 compression, 10GB of color imagery will compress down to 500MB, which is small enough to fit on to a single CD-ROM. You may actually achieve higher compression rates where your source image has a structure well suited to compression. In addition to reducing storage requirements, you can also use the free imagery plug-ins for GIS and office applications to read the compressed imagery in a wide range of software applications such as ArcView®, AutoCAD MAP®, MapInfo®, ER Viewer, Photoshop™, Microsoft Office® and Excel®, and other software applications. ER Mapper Workbook - Airphoto Mosaic Applications 245 Chapter 13#Compressing images#z Saving a compressed image to disk Saving a compressed image to disk Objectives Learn how to save large images in compressed format using the ER Mapper ECW compression. 1 From the main ER Mapper File menu, select Save as a Compressed Image. The Compression Wizard will open. Input image to be compressed 1 Select the Select input image (or mosaic) to compress option as the source of the image(s) to be compressed and click on the Next > button. 2 In the Input file: field, click the Select File button. 3 From the Directories menu, select the \examples path. 4 Open the ‘airphoto_training’ directory, then double-click on the algorithm ‘final_mosaic_map.alg’ to select it. This is the image mosaic map that you created earlier, and you now save it as a compressed image. In addition to using an algorithm as the source image to be compressed, you could specify any other file format supported by ER Mapper, such as ESRI BIL, TIFF, JPG as the input. 246 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 13#Compressing images#z Saving a compressed image to disk Compressed image file name 5 In the Output file: field, click the Select File button. 6 From the Directories menu, select the \examples path. 7 In the Select File dialog, choose ER Mapper compressed images (.ecw) in the Files of Type field. 8 Open the ‘airphoto_training’ directory. 9 In the Open: text field, enter the text final_mosaic_map_compressed and separate each word with an underscore (_). 10 Click OK on the Select File dialog. Your file name appears as the Output File name with a ‘.ecw’ extension. ER Mapper will save the compressed image as a header (.ers) and a compressed data (.ecw) file. You can use File / Open or one of the wizards to open the header (.ers) or data (.ecw) file just like any other image file supported by ER Mapper. Note: The data (.ecw) file contains embedded georeferencing information, so the header (.ers) file can be dispensed with if the compressed image is to be used in applications other than ER Mapper. Compress to Grayscale, RGB or Multi 11 In the Compress to: field, select the Color (RGB) option The compression engine internally converts the RGB color image into YUV color space, specifically the one defined as the "JPEG Digital version of YUV". YUV is a color space that separates out intensity (Y) from chromatic or color changes (U and V). This enables more efficient compression of color imagery, ensuring that detail is preserved. The RGB to YUV conversion (and back again for decompression) is automatic; the user always sees the file as a RGB file. Other compression options available are: Grayscale The compression engine constructs and compresses a grayscale view of your input image data using the normal formula for Intensity from Red, Green and Blue. Multiband The compression engine compresses all the bands of a multi-band image. Use this option for compressing hyperspectral images. 12 Click on the Next > button to continue ER Mapper Workbook - Airphoto Mosaic Applications 247 Chapter 13#Compressing images#z Saving a compressed image to disk Compression ratio 13 Check the Compress for Internet usage box. This option is for compressed images to be served on an ER Mapper Internet Web Server (IWS). The transfer rate over a network for images compressed with this option is higher, thus allowing faster zooming and roaming. However, the actual compression ratio achieved will be less than that for images compressed without this option. For more information on the IWS, refer to the ER Mapper web site, http://www.ermapper.com. 14 If necessary change the Colorscale ratio: to 50 and click on the Recompute desired output size button. This value is the desired compression ratio that you would like to achieve. For example, you might specify a ratio of 20:1 for an input file of 1,000MB to achieve a desired a 50MB compressed image (so the output image is 5% of the size of the input image). The Compression Wizard uses the Target Compression ratio as a measure of how much information content to preserve in the image; i.e as a quality indicator. If, however, your image has areas that are well suited to compression, a greater rate of compression may be achieved while still achieving the desired information content. The actual compression ratio could also be less than the target if you are compressing small files. The Compression Wizard uses multiple wavelet encoding techniques at the same time, and adapts and chooses the best technique depending on the area currently being compressed. 248 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 13#Compressing images#z Saving a compressed image to disk One example of this is an image that has large areas of water or desert. These can often be compressed with greater efficiency. Another example is a compressed image that consists of high resolution airphotos, over lower resolution satellite imagery where there are no airphotos. Because the satellite images are lower spatial resolution, greater compression can be achieved in these areas of the image, while still preserving high quality detail in the airphoto area. 15 Click on the Finish button to start the compression process. Compression process A status dialog will display the progress of the compression. When the compression is complete, a dialog will display the Target and Actual compression rates. Except when compressing very small files (less than 2MB in size), the Actual compression ratio will generally be greater than the Target compression ratio. Comparing compressed and original images 1 On the main menu, click the Open button. An image window and the Open dialog box appear. 2 From the Directories menu, select the \examples path. 3 Open the ‘airphoto_training’ directory, then double-click on the algorithm ‘final_mosaic_map.alg’ to open it. This is the original image map, which comprises four compressed and mosaiced airphotos. 4 Re-size the image window to make it larger. 5 Right-click on the image and, from the Quick Zoom menu, select Zoom to Page Extents. The image will enlarge so that the map page fills the image window. 6 On the main menu, click on the New button. ER Mapper Workbook - Airphoto Mosaic Applications 249 Chapter 13#Compressing images#z Saving a compressed image to disk This will open a second image window. 7 On the main menu, click the Open button. An image window and the Open dialog box appear. 8 In the Files of Type: field, select ‘ER Mapper compressed images (.ecw)’. 9 From the Directories menu, select the \examples path. 10 Open the ‘airphoto_training’ directory, then double-click on the file ‘final_mosaic_map_compressed.ecw’ to open it. This is the compressed image file that you have just created. 11 Re-size this new image window to make it the same size as the other. 12 Right-click on the image and, from the Quick Zoom menu, select Zoom to All Datasets. The image will enlarge to fill the image window. 13 Move the image windows so that they are next to one another. 14 Compare the quality of the two images. The quality should be virtually identical because the original mosaic was made up of individually compressed images. This is an example of how you could create mosaics with thousands of large images while conserving disk space. The steps to follow are: 1. After geocoding the images, compress them and store them on disk. 2. Use the Image Display and Mosaic Wizard to mosaic the compressed images. 3. Use the Balancing Wizard to balance and color match the mosaiced image. 4. Use the Compression Wizard to compress the final image. 250 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 13#Compressing images#z Saving a compressed image to disk Close both image windows and dialog boxes 1 Close the image window using the window system controls: • For Windows, click the Close button in the upper-right window corner. 2 Click Close on the Algorithm dialog. Only the ER Mapper main menu should be open on the screen What you learned After completing these exercises, you know how to perform the following tasks in ER Mapper: • Save the image in compressed format using the ECW compressor. ER Mapper Workbook - Airphoto Mosaic Applications 251 Chapter 13#Compressing images#z Saving a compressed image to disk 252 ER Mapper Workbook - Airphoto Mosaic Applications 14 Exporting to GIS systems This chapter shows you how to save all or part of a processed mosaic image for use in a GIS or desktop mapping software product. About use in GIS systems Once you have created your mosaic of images in ER Mapper, you may want to save all or part of the mosaic image in a format suitable for use in a GIS or Desktop Mapping System (DMS). The procedure you will use depends upon the raster formats your GIS can accept, and its capabilities for handling large image datasets. Note: ER Mapper provides free plug-ins to most GIS or Desktop Mapping System applications, which allow you to open ER Mapper images directly in those applications. Formats supported include ER Mapper algorithms, raster datasets, virtual datasets and ECW compressed images. Where possible, you are advised to use these plug-ins which are available for download at www.ermapper.com. Since GIS and desktop mapping systems are usually designed to handle vector (line/polygon) data, they have limited capabilities for handling raster (image) data. For example, ER Mapper has no problem handling a 20,000 by 20,000 pixel ER Mapper Workbook - Airphoto Mosaic Applications 253 Chapter 14#Exporting to GIS systems#z About use in GIS systems image, but few GIS or DMS applications can do this. When preparing to save an enhanced image from ER Mapper for use in a GIS or DMS, there are three possible solutions to this problem: • Save the image in ECW compressed format. The high compression rates achieved by using this format make the image files significantly smaller. You can then use the applicable free plug-in to open the compressed image in the GIS application. • Resample the image to a lower spatial resolution (cell size). This creates much smaller files, but you lose detail in the image. This may be best if you want to make a single image file that covers a large geographic area. • Subset the airphoto (or mosaic) image into a set of smaller files, each covering a smaller geographic area. This maintains the original detail in the airphotos and creates individual files small enough for your GIS or DMS to handle. (It still requires a large amount of disk space to store all the individual high resolution files.) Cropping or subsetting images Often you will want to crop or subset part of the entire mosaic that covers just an area of interest, or subset a large mosaic into smaller pieces. There are two basic steps: • Zoom into the desired area. You can do this visually by dragging a zoom box with the the mouse, or by entering exact coordinates in the Algorithm Geoposition Extents dialog. • Save the area of interest to an external file. You can save to an ER Mapper UDF (Universal Data Format) dataset (which can be read by many systems), or to a graphics file such as TIFF. Spatial resolution (cell size) Digitized aerial photos are often created at very high resolution; for example one meter pixel size or even less. This creates very large image files that can be hundreds of megabytes in size. There are two reasons why you may want to consider reducing the spatial resolution (cell size) of the exported image: 254 • GIS/DMS file size limitations–If you want to use an image covering a large geographic area, you may need to resample the image to a lower spatial resolution (larger cell size), thus creating a smaller file that can be handled by the GIS product. • Detail required for the project–The amount of detail in airphotos is often not needed for a particular application or project. For example, for updating a general land use database, it may not be necessary to use imagery with less than 1-meter resolution. If desired, you can resample the image to the level of detail needed for the project to create files that are only as large as necessary for the application. ER Mapper Workbook - Airphoto Mosaic Applications Chapter 14#Exporting to GIS systems#z Using compressed images in GIS systems Raster formats for GIS and DMS products The two most common formats accepted by GIS and DMS products are TIFF (Tagged Image File Format) and BIL (band interleaved by line) format. ER Mapper’s native format is binary BIL, so that is the best solution for products that can read BIL format. Use the following guide to determine which format you need to use: • ArcView® OR ARC/INFO® –Create an ER Mapper UDF (Universal Data Format) dataset (in BIL format), which, in addition to the “.ers” header file, includes a “.hdr” file that allows ArcView® or ARC/INFO® to read the BIL file directly. • Autodesk World™, AutoCAD MAP® or AutoCAD® –Use ER Mapper to save the image to a TIFF format file. • MapInfo–Use ER Mapper to save the image to a TIFF format file. Alternatively, ER Mapper also provides a free upgrade to MapInfo users that allows MapInfo to directly read ER Mapper format image files and algorithms. The link automatically passes the map projection information to MapInfo. This allows users to integrate very large mosaics of imagery as backdrops into MapInfo quickly and easily. • Other GIS and DMS products–Use ER Mapper to save the image to a TIFF or other compatible graphics format file. Using compressed images in GIS systems The ECW Compression Wizard, which is included in ER Mapper, enables you to save large images in the ECW compressed format with minimal loss in quality. Compression rates can typically be in the order of 50:1. The relatively small file sizes of ECW compressed images make them ideal for use in GIS applications. The free plug-ins available for many GIS products allow you to open ECW compressed images directly in those products. You can also open ECW compressed images served over a network (e.g. the Internet) by entering their URLs. You can then roam over and zoom into the image over the network from within the application. Hands-on exercises These exercises show you how to crop an area of interest from a mosaic image, save the area as an ER Mapper UDF dataset and a TIFF file. What you will learn... After completing these exercises, you will know how to perform the following tasks in ER Mapper: ER Mapper Workbook - Airphoto Mosaic Applications 255 Chapter 14#Exporting to GIS systems#z 1: Defining an area of interest Before you begin... • Define an exact area of interest using geographic coordinates • Save the image as a new UDF dataset • Resample the resolution (cell size) of a dataset • Save an image as a TIFF format graphics file Before beginning these exercises, make sure all ER Mapper image windows are closed. Only the ER Mapper main menu should be open on the screen. 1: Defining an area of interest Objectives Learn to define exact areas of interest in an image, and how to subsection an image into smaller files. Open the final mosaic algorithm 1 On the main menu, select Open from the File menu. An image window and the Open dialog appear. 2 From the Directories menu (on the Open dialog), select the path ending with \examples. 3 Double-click to open the directory named ‘airphoto_training.’ 4 Double-click on your ‘airphoto_mosaic.balanced.alg’ algorithm to open it. The balanced RGB mosaic image displays. Next you define a small area of interest for your project. Zoom into the project area Assume that you have a project to assess the progress and environmental impacts of the highway interchange in the centre of the mosaic image. The project calls for an image showing an exact area defined by Easting and Northings values (meters) in the UTM projection being used. 1 From the View menu, select Geoposition. The Algorithm Geoposition Extents dialog opens. 2 Click the Extents tab to display the current mosaic extents. 3 Enter the following values in the Eastings and Northings Top Left and Bottom Right fields: Top Left - Easting: 484979 256 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 14#Exporting to GIS systems#z 2: Creating a UDF dataset Top Left - Northing: 3621220 Bottom Right - Easting: 486213 Bottom Right - Northing: 3620059 edit values (Enter/Return to validate) 4 Click the Apply button. ER Mapper zooms to the exact extents you entered. You have now defined a project area to be exported for analysis in your GIS or DMS system. Also notice that the area is approximately 1.2 by 1.1 kilometers in size (in the Eastings and Northings Size fields), and that the it displays approximately 1970 by 985 pixels of the mosaic image. 5 Click Close on the Algorithm Geoposition Extents dialog. 2: Creating a UDF dataset Objectives Learn to save the area of interest to a new raster dataset in UDF format, and how to resample the image to a larger cell size (reduce the spatial resolution). Note: You can also use the following procedure to save your entire mosaic of images to a single, large ER Mapper dataset. This may be desirable if disk space is not an issue because displaying and zooming a processed ER Mapper dataset is much faster than displaying and zooming a mosaic of images that have complex formulas and other options in the algorithm (where the processing must be executed each time you zoom or pan). ER Mapper Workbook - Airphoto Mosaic Applications 257 Chapter 14#Exporting to GIS systems#z 2: Creating a UDF dataset Setup the algorithm for dataset output Saving an image as a dataset is similar to creating an algorithm for the screen display, except that you are sending the resulting processed image to a new dataset on disk, instead to an image window on the screen. 1 On the main menu, select Algorithm from the View menu. The Algorithm dialog opens. Note that this algorithm has red, green and blue layers to create the RGB color image. You want your output ER Mapper dataset to also have red, green and blue bands. 2 Examine the layer labels. The layer labels you see determine what the band labels will be in the new output dataset. In this case, your output dataset will have three bands labelled ‘Red Layer,’ ‘Green Layer’ and ‘Blue Layer.’ layer labels become band labels in output dataset Note: ER Mapper merges any layers with the same label into a single band in the output dataset. (So if you have two or more sets of red, green and blue layers, they are merged into single red, green and blue bands in the output dataset.) To output layers as individual bands, make sure each layer has a unique label in the algorithm. Save the project area to a full resolution UDF dataset In this case, assume you want to maintain the full resolution of the airphoto data when you create the output dataset. This guarantees that all the detail in the airphoto will be carried through to the new dataset. 1 On the main menu, select Save As... from the File menu. The Save As... dialog opens. This dialog lets you specify the name for the new dataset to be created, and parameters for the dataset such as data type and size/ resolution. 2 In the Files of Type: field, select ‘UDF (.ers)’. 3 From the Directories menu, select the path ending with the text \examples. 258 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 14#Exporting to GIS systems#z 2: Creating a UDF dataset 4 Double-click on the directory named ‘airphoto_training.’ 5 In the Save As: field, enter the filename project_area_full, then click OK. This will be the filename for the new UDF dataset. 6 On the Save as UDF dialog, click the Defaults button. The contents of the four parameters fields on the dialog change to display the settings and values read from the current algorithm. Notice that: • The Output Type field is set to ‘Multilayer’ because there are more than three layers in the algorithm. You should change this to ‘RGB’. • The Width and Height fields are set to the number of pixels displayed in the area you defined with Geoposition (1432 by 1346). This creates a full resolution dataset. Note: You should always click the Defaults button to load the values that pertain to the current algorithm first, then you can change them as needed. 7 Make sure that the Maintain aspect ratio and Current View options are selected. The Current View option limits the image size to the extents currently being displayed in the image window. 8 Click OK. ER Mapper creates a new output dataset on disk in the form of three files; the image data file,with a “.bil” extension, and two header files with a “.ers” and “.hdr” extension respectively. This enables them to be opened in ER Mapper and applications like ArcInfo®. 9 Click OK on the completion dialog. Display the new dataset in RGB 1 On the main menu, select New from the File menu. A new image window opens. 2 On the main menu, click the Open button. The Select a Dataset dialog opens. 3 On the Open dialog, Files of Type field, select either ‘ER Mapper Raster Dataset (.ers)’ or ‘ESRI BIL and GeoSPOT (.hdr)’. ER Mapper Workbook - Airphoto Mosaic Applications 259 Chapter 14#Exporting to GIS systems#z 2: Creating a UDF dataset You can do this because saving an image as UDF creates the BIL data file with a .ers and a .hdr header file. 4 From the Directories menu (on the Select File dialog), select the path ending with the text \examples 5 Double-click on the directory named ‘airphoto_training.’ 6 Double-click on the dataset ‘Project_area_full.ers’ or ‘Project_area_full.hdr’ to load it. Both selections will open the same image. 7 Click OK on the Open dialog. ER Mapper displays the entire subsetted image as an RGB algorithm. View information about the new dataset 1 On the Algorithm dialog, click the Load Dataset button. The Raster Dataset dialog opens, and your ‘Project_area_full’ dataset is highlighted (since it is the dataset currently loaded in the layer). 2 On the Raster Dataset dialog, click the Info button. The Dataset Information dialog opens showing information about the dataset: It shows the datum and projection, number of rows and columns (image dimensions, pixel (cell) size in meters (approximately 1-meter resolution), and file size (about 5.7 Mb in this case). 3 Click Close on the Dataset Information dialog. 260 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 14#Exporting to GIS systems#z 2: Creating a UDF dataset Save the project area to a half resolution UDF dataset Let us assume that the full detail in the airphoto is not needed, and you would like to resample the image to approximately two-meter resolution to create a smaller file for your GIS. One way to do this is to follow the same steps as before, but divide the default image width and height values by two to create a dataset at half the original resolution. (You may also want to do this simply to reduce the file size when covering a large area if your GIS or DMS cannot handle very large images.) 1 Activate the image window containing the original mosaic image (named ‘Final_RGB_mosaic’). The contents of the Algorithm dialog change to show the mosaic algorithm. 2 On the main menu, select Save As... from the File menu. The Save As... dialog opens. This dialog lets you specify the name for the new dataset to be created, and parameters for the dataset such as data type and size/ resolution. 3 In the Files of Type: field, select ‘UDF (.ers)’. 4 From the Directories menu, select the path ending with the text \examples. 5 Double-click on the directory named ‘airphoto_training.’ 6 In the Save As: field, enter the filename project_area_half, then click OK. This will be the filename for the new UDF dataset. 7 On the Save as UDF dialog, click the Defaults button. The contents of the four parameters fields on the dialog change to display the settings and values read from the current algorithm. 8 Open the Output Type field, select ‘RGB’. As before, this tells ER Mapper to rescale the real data values into an 8-bit integer (0-255) data range in the output dataset. 9 Change the values in the Width and Height fields as follows (the original values divided by 2 and rounded up): Cells Across (width) = 716 Cells Down (height) = 673 10 Click OK, then click Yes when asked to confirm the dataset creation. ER Mapper creates a new half-resolution output dataset on disk. 11 Click OK on the completion dialog. ER Mapper Workbook - Airphoto Mosaic Applications 261 Chapter 14#Exporting to GIS systems#z 2: Creating a UDF dataset Note: When creating a new dataset with different cell sizes to the original data, ER Mapper resamples the original data to the new output cell size during the process of creating the new dataset. If the ‘Smoothing’ button is turned on in your algorithm (as in this case), ER Mapper uses bilinear interpolation to create the new output dataset cell values. If the ‘Smoothing’ button is turned off, ER Mapper uses nearest neighbor resampling. Bilinear usually creates a nicer looking output image, so it is recommended that you turn on Smoothing in your algorithm before writing the new dataset. (If you are creating the dataset at the original resolution, this does not matter.) Display the half resolution dataset in RGB 1 On the main menu, select New from the File menu. A new image window opens. 2 On the main menu, click the Open button. The Select a Dataset dialog opens. 3 On the Open dialog, Files of Type field, select either ‘ER Mapper Raster Dataset (.ers)’ or ‘ESRI BIL and GeoSPOT (.hdr)’. You can do this because saving an image as UDF creates the BIL data file with a .ers and a .hdr header file. 4 From the Directories menu (on the Select File dialog), select the path ending with the text \examples 5 Double-click on the directory named ‘airphoto_training.’ 6 Double-click on the dataset ‘Project_area_half.ers’ or ‘Project_area_half.hdr’ to load it. Both selections will open the same image. 7 Click OK on the Open. dialog. ER Mapper displays the subsetted and resampled image as an RGB algorithm. View information about the half resolution dataset 1 On the Algorithm dialog, click the Load Dataset 2 On the Raster Dataset dialog, click the Info button. 262 ER Mapper Workbook - Airphoto Mosaic Applications button. Chapter 14#Exporting to GIS systems#z 2: Creating a UDF dataset It shows the number of rows and columns is half that of the other dataset ‘Project_area_full,’ the cell size is approximately 2 meters, and the file size is about 1.4 Mb (25% the size of the full resolution subset image). Geolink the subset images to see the resolution difference In order to compare the difference in detail between the full and half resolution subset images, it is helpful to use ER Mapper’s geolinking feature to tie the two image windows together. That way, you can zoom to the exact same area in both windows and see how the different cell sizes affect detail in the data. Make sure the newest image window (containing the ‘Project_area_half’ dataset) is active (it should be by default). 1 On the Algorithm dialog, turn off the ‘Smoothing’ option. Turning off smoothing will allow you to see individual pixels when you zoom in on a small area later (smoothing would integrate and smooth out pixels). 2 Right-click in the image window, select Quick Zoom, then select Set Geolink to Window. The window title bar shows that the window is set to “WINDOW geolink” mode. 3 Activate the other image window containing the ‘Project_area_full’ dataset. 4 On the Algorithm dialog, turn off the ‘Smoothing’ option. 5 Right-click in the image window, select Quick Zoom, then select Set Geolink to Window. The window title bar shows that the window is also set to “WINDOW geolink” mode. 6 Drag a zoom box in one of the windows to zoom on a very small area. The two windows zoom to the same area automatically, and you should be able to see individual pixels in the two images. (Zoom in some more if you cannot.) Notice difference in detail between the two images–this is the effect of resampling to a larger cell size. So, in exchange for creating a much smaller file (1.4 Mb versus 5.7 Mb), you must reduce the level of detail in the image. Note: Geolinking images is a very useful feature for analyzing different images or the same image in different ways or zoom levels. You can also set these options using the Geolink tab on the Algorithm Geoposition Extents dialog. See the ER Mapper Tutorial manual for examples of the different geolink modes, and the User Guide for more information. ER Mapper Workbook - Airphoto Mosaic Applications 263 Chapter 14#Exporting to GIS systems#z 3: Creating a “.hdr” file for ESRI products 7 If desired, pan to other areas in both images by clicking – both images will pan to the same area because they are geolinked in Window mode. 8 Click Close on the Algorithm dialog (you do not need it anymore). Resampling to an exact cell size You can also resample an ER Mapper dataset to any desired cell size. This may be a more intuitive way to resample an image by selecting a cell size rather than using image dimensions as in the previous procedure. However, this technique requires an ER Mapper dataset as input (you cannot use an algorithm as in the previous procedure). To do this: • Select Process/Geocoding Wizard. • On the Geocoding Wizard Start page, load the dataset to be resampled (.ers file), and select Rotation, then click on the Rotation Setup tab. • On the Rotation Setup page, enter 0 for the Rotation angle, then click on the Rectify tab. A rotation angle of 0 ensures that the image is resampled without being rotated. • On the Rectify page, enter the desired cell size (in meters) in the Cell size X and Cell size Y fields. • In the File field, enter the file name of the resampled image. • If you want to output only a portion of the entire image, first determine the desired upper-left and lower-right coordinates. Then click Extents on the Rectify page and enter the desired extents on the Geocode Output Extents dialog. • The dimensions and output file size for the resampled dataset at the cell size you entered are displayed in Output Info box. • Select ‘Bilinear’ for Resampling. • Click on the Save File and Start Rectification button to create the new resampled output dataset. 3: Creating a “.hdr” file for ESRI products Objectives Learn to create a header (.hdr) file for the full resolution ER Mapper dataset so it can be read directly by ESRI products. The ESRI products ArcView® and ARC/INFO® can read image files stored in binary BIL format, which is also ER Mapper’s internal raster format. If you already have a ER Mapper dataset, you can simply have ER Mapper create a “.hdr” file for the dataset so the same image can be read by directly by ESRI products (without creating a new dataset). If you have saved the image in UDF 264 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 14#Exporting to GIS systems#z 3: Creating a “.hdr” file for ESRI products format, as in the previous exercises, ER Mapper has already created the “.hdr” file so you need not do anything else. You can also use the ER Mapper export facilities to create the “.hdr” file for a ER Mapper Raster Dataset. This exercise demonstrates how you would do this. Close the half resolution subset image window 1 Close the image window containing the half resolution subset image. (Leave the two other windows open.) Zoom out on the full resolution subset image 1 If needed, activate the window containing the full resolution subset image. 2 Right-click in the image window, select Quick Zoom, then select Zoom to All Datasets. The image zooms out to the full extents of the subsetted project area. (This is not strictly needed, but helps to simply the following concepts.) Create the “.hdr” file for the ER Mapper dataset 1 From the Utilities menu, select Export Raster, then ARC/INFO BIL Image (.hdr), then Export. The ER Mapper raster file to make ARC/INFO compatible dialog opens. 2 Click the button next to the File field. 3 From the Directories menu (on the Select File dialog), select the path ending with the text \examples. 4 Double-click on the directory named ‘airphoto_training.’ 5 Double-click on the dataset ‘Project_area_full.ers’ to load it. 6 Turn on the Verbose Messages option. 7 Click OK to start the export process. ER Mapper displays messages about the export process, including the datum, projection, cell size and registration coordinate encoded in the “.hdr” file. The ARC/INFO BIL Image export utility does three things: • Renames the ER Mapper binary data file to add a “.bil” file extension (so ESRI products recognize it as a BIL format image). In this case, the original ‘Project_area_full’ dataset is renamed to ‘Project_area_full.bil.’ ER Mapper Workbook - Airphoto Mosaic Applications 265 Chapter 14#Exporting to GIS systems#z 4: Saving a subset image to a TIFF file • Creates a corresponding “.hdr” file for the binary data file (‘Project_area_full.hdr’). This ASCII header file provides the projection, cell size and parameters needed to register the image when it is loaded into ArcView or ARC/INFO. • Changes the “source file” reference in the ER Mapper header (.ers) file from ‘Project_area_full’ (the previous filename) to ‘Project_area_full.bil.’ This lets you load and use the dataset in ER Mapper just as you did before. 8 Click Close on the Batch Engine Output dialog to close it. Close the subset image window 1 Close the subset image window image window containing the full resolution subset image You now have now transformed an ER Mapper dataset into an ESRI-compatible dataset (without actually creating a new image file, only an ASCII header file.) Note: The above procedure is useful if you already have an ER Mapper Raster Dataset, and you simply want to create an additional “.hdr” file for it. If you were saving the image from an algorithm, it would be quicker to save it as ‘UDF’ or ‘ESRI BIL and GeoSPOT (.hdr)’ type file. 4: Saving a subset image to a TIFF file Objectives Learn to save a portion of the airphoto mosaic to a TIFF graphics file. This file format can be read by most GIS and DMS products. The original ‘airphoto_mosaic_balanced’ algorithm should be open on the screen. If you closed it, open it again using File/Open. Zoom into the project area For this example, assume that the project calls for an image showing part of the boat harbor in the lower left corner of the full mosaic image. Again you will define the exact project area using Easting and Northings values in the UTM projection system. 1 From the View menu, select Geoposition. The Algorithm Geoposition Extents dialog opens. 2 Click the Extents tab to display the current mosaic extents. 266 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 14#Exporting to GIS systems#z 4: Saving a subset image to a TIFF file 3 Enter the following values in the Eastings and Northings Top Left and Bottom Right fields: Top Left - Easting: 484037 Top Left - Northing: 3618876 Bottom Right - Easting: 484897 Bottom Right - Northing: 3618114 4 Click the Apply button. ER Mapper zooms to the exact extents you entered, and shows part of the harbor area. This is the image you will save to a TIFF file. The area displayed is 860 by 762 meters in size (in the Eastings and Northings Size fields), and 1850 by 1200 pixels of the mosaic image (the Cell X and Cell Y Size fields). 5 Click Close on the Algorithm Geoposition Extents dialog. Save the project area to a true color (24-bit) TIFF file In this case, assume you want to maintain the full resolution of the airphoto data when you create the output dataset. This guarantees that all the detail in the airphoto will be carried through to the new dataset. 1 On the main menu, select Save As... from the File menu. The Save As... dialog opens. This dialog lets you specify the name for the new dataset to be created, and parameters for the dataset such as data type and size/ resolution. 2 In the Files of Type: field, select ‘GeoTIFF/TIFF (.tif)’. 3 From the Directories menu, select the path ending with the text \examples. 4 Double-click on the directory named ‘airphoto_training.’ 5 In the Save As: field, enter the filename project_area_full, then click OK. This will be the filename for the new tif file. 6 On the Save as GeoTIFF/TIFF dialog, click the Defaults button. The contents of the four parameters fields on the dialog change to display the settings and values read from the current algorithm. Notice that: • The Output Type field is set to ‘’RGB’, indicating that it will be saved as a true color image. • The Width and Height fields are set to the number of pixels displayed in the area you defined with Geoposition (998 by 884). This creates a full resolution dataset. ER Mapper Workbook - Airphoto Mosaic Applications 267 Chapter 14#Exporting to GIS systems#z 4: Saving a subset image to a TIFF file Note: You should always click the Defaults button to load the values that pertain to the current algorithm first, then you can change them as needed. 7 Make sure that the Maintain aspect ratio and Current View options are selected. The Current View option limits the image size to the extents currently being displayed in the image window. 8 Click OK. ER Mapper creates a new output dataset on disk. 9 Click OK on the completion dialog. Display the new dataset in RGB 1 On the main menu, select New from the File menu. A new image window opens. 2 On the main menu, click the Open button. The Select a Dataset dialog opens. 3 On the Open dialog, Files of Type field, select ‘GeoTIFF/TIFF (.tif)’. 4 From the Directories menu (on the Select File dialog), select the path ending with the text \examples 5 Double-click on the directory named ‘airphoto_training.’ 6 Double-click on the dataset ‘Project_area_full.tif’. Both options will open the same image. 7 Click OK on the Open dialog. ER Mapper displays the entire subsetted image as an RGB algorithm. View information about the new dataset 1 On the Algorithm dialog, click the Load Dataset button. The Raster Dataset dialog opens, and your ‘Project_area_full’ dataset is highlighted (since it is the dataset currently loaded in the layer). 2 On the Raster Dataset dialog, click the Info button. The Dataset Information dialog opens showing information about the dataset: 268 ER Mapper Workbook - Airphoto Mosaic Applications Chapter 14#Exporting to GIS systems#z 4: Saving a subset image to a TIFF file It shows the datum and projection, number of rows and columns (image dimensions, pixel (cell) size in meters (approximately 1-meter resolution), and file size (about 2.6 Mb in this case). 3 Click Close on the Dataset Information dialog. Save the project area to a half resolution ER Mapper dataset Let us assume that the full detail in the airphoto is not needed, and you would like to resample the image to approximately two-meter resolution to create a smaller file for your GIS. One way to do this is to follow the same steps as before, but divide the default image width and height values by two to create a dataset at half the original resolution. (You may also want to do this simply to reduce the file size when covering a large area if your GIS or DMS cannot handle very large images.) 1 Activate the image window containing the original mosaic image (named ‘Final_RGB_mosaic’). The contents of the Algorithm dialog change to show the mosaic algorithm. 2 On the main menu, select Save As... from the File menu. The Save As... dialog opens. This dialog lets you specify the name for the new dataset to be created, and parameters for the dataset such as data type and size/ resolution. 3 In the Files of Type: field, select ‘GeoTIFF/TIFF (.tif)’. 4 From the Directories menu, select the path ending with the text \examples. 5 Double-click on the directory named ‘airphoto_training.’ 6 In the Save As: field, enter the filename project_area_half, then click OK. This will be the filename for the new tiff dataset. 7 On the Save as GeoTIFF/TIFF (.tif) dialog, click the Defaults button. The contents of the four parameters fields on the dialog change to display the settings and values read from the current algorithm. 8 Open the Output Type field, select ‘RGB’. As before, this tells ER Mapper save the image as a real color tiff file. 9 Change the values in the Width and Height fields as follows (the original values divided by 2 and rounded up): Cells Across (width) = 500 Cells Down (height) = 443 ER Mapper Workbook - Airphoto Mosaic Applications 269 Chapter 14#Exporting to GIS systems#z 4: Saving a subset image to a TIFF file 10 Click OK, then click Yes when asked to confirm the dataset creation. ER Mapper creates a new half-resolution output dataset on disk. 11 Click OK on the completion dialog. Note: When creating a new dataset with different cell sizes to the original data, ER Mapper resamples the original data to the new output cell size during the process of creating the new dataset. If the ‘Smoothing’ button is turned on in your algorithm (as in this case), ER Mapper uses bilinear interpolation to create the new output dataset cell values. If the ‘Smoothing’ button is turned off, ER Mapper uses nearest neighbor resampling. Bilinear usually creates a nicer looking output image, so it is recommended that you turn on Smoothing in your algorithm before writing the new dataset. (If you are creating the dataset at the original resolution, this does not matter.) Display the half resolution dataset in RGB 1 On the main menu, select New from the File menu. A new image window opens. 2 On the main menu, click the Open button. The Select a Dataset dialog opens. 3 On the Open dialog, Files of Type field, select ‘GeoTIFF/TIFF (.tif)’. 4 From the Directories menu (on the Select File dialog), select the path ending with the text \examples 5 Double-click on the directory named ‘airphoto_training.’ 6 Double-click on the dataset ‘Project_area_half.tif’ to load it. Both options will open the same image. 7 Click OK on the Open. dialog. ER Mapper displays the subsetted and resampled image as an RGB algorithm. View information about the half resolution dataset 1 On the Algorithm dialog, click the Load Dataset 2 On the Raster Dataset dialog, click the Info button. 270 ER Mapper Workbook - Airphoto Mosaic Applications button. Chapter 14#Exporting to GIS systems#z 4: Saving a subset image to a TIFF file It shows the number of rows and columns is half that of the other dataset ‘Project_area_full,’ the cell size is approximately 2 meters, and the file size is about 0.7 Mb (25% the size of the full resolution subset image). Close the image windows and the Algorithm dialog 1 Close the image windows. 2 On the Algorithm dialog, click the Close button. Only the ER Mapper main menu is now open on the screen. What you learned... After completing these exercises, you know how to perform the following tasks in ER Mapper: • Define an exact area of interest using geographic coordinates • Save the image as a new UDF dataset • Resample the resolution (cell size) of a dataset • Save the image as a TIFF format graphics file ER Mapper Workbook - Airphoto Mosaic Applications 271 Chapter 14#Exporting to GIS systems#z 4: Saving a subset image to a TIFF file 272 ER Mapper Workbook - Airphoto Mosaic Applications Part Two Enterprise Wide Imagery About this section This section of the manual is intended to help explain the problems and solution to sharing imagery throughout your enterprise, and focuses on free software plug-ins provided by Earth Resource Mapping. The hands-on exercises in this document require that certain software and sample data be installed beforehand. Please read the introduction to each chapter for more information. Chapter contents Most chapters in this section give you hands-on experience using the ER Mapper software plug-ins inside of the host application, such as ArcView GIS, MapInfo, Autodesk World, and office and word processing applications. In general, each chapter is independent of the others. The emphasis is on learning and using the ER Mapper software plug-ins, not on teaching image processing and remote sensing concepts. For more detailed information on the principles of image processing or remote sensing for specific applications, please refer to the ER Mapper Applications Manual, or any of the text books available. Enterprise Wide Imagery 275 Chapter About this section ● Chapter contents 276 Enterprise Wide Imagery 15 Enterprise Wide Imagery Enterprise wide imagery is the concept of making imagery easily available and accessible to all users and software applications within your organization. This chapter explains how you can use free ER Mapper tools to overcome problems with using and sharing imagery. It also includes a short introduction to imagery, and an overview of the capabilities of the ER Mapper software. Using imagery within your organization Many groups within an organization can benefit from the use of imagery such as aerial photographs and satellite images in their everyday work. These include departments such as engineering, marketing, mapping/GIS, graphics, publications and others. Because these groups use a wide range of software applications, it has been difficult to share imagery across an entire enterprise. Two primary reasons: • Incompatible file formats–Images used by one group cannot be used by other groups because the file format is not compatible with their software. • Large file sizes–Even when your software can read an image file’s format, it often cannot process large image files. Large image files, such as airphotos, are increasingly demanded by clients to show high levels of detail and coverage of large geographic areas of interest. Enterprise Wide Imagery 277 Chapter 15 Enterprise Wide Imagery ● Enterprise wide imagery • Images served over the Internet–Images that you access over the internet have to retrieved via a browser and stored locally before you can use them in your software application. It would be far more efficient to be able to access images from within the software application by specifying their URL (Universal Resource Locator) as you would with an Internet browser like Internet Explorer. Now ER Mapper provides free software solutions to help you overcome these problems. Anyone who wants to use imagery can do so without having to convert between formats, reduce file sizes, learn complex imaging products, and so on. Enterprise wide imagery Enterprise wide imagery is the concept of making imagery easily available and accessible to all users and software applications within your organization. These applications include desktop mapping and GIS products, graphics and presentation products, word processing products, database products, and others. Sharing Imagery Throughout an Enterprise Publications (Word, FrameMaker, AmiPRO, etc.) Graphics (Photoshop, Powerpoint, Corel Draw, etc.) Imagery Files (TIFF, BMP, JPEG, HDR, ERS, ECW, ALG) Engineering (CAD software, AutoCAD, AutoCAD Map) Business/Marketing (MapInfo, spreadsheet, database, etc.) Mapping/GIS (ArcView, ARC/INFO, Intergraph, etc.) ER Mapper’s free imagery products provide solutions to the two main problems: • 278 Incompatible file formats–Images used by one group can now be used by all groups because ER Mapper’s free solutions allow most products to read an industry standard set of imagery formats. For example, word processing or graphics applications can now directly display satellite images in their native formats. Enterprise Wide Imagery Chapter 15 Enterprise Wide Imagery ● ER Mapper free imagery solutions • Large file sizes–ER Mapper’s free solutions allow your applications to read image files of virtually any size very quickly. Mosaics of aerial photographs, for example, often require 100’s of megabytes (even gigabytes) of disk space. ER Mapper’s solutions handle the underlying technology, so even simple word processors can display very large image files in a snap. • Images served over the internet–ER Mapper 6.1 allows you to directly access images served over the internet by specifying their URL. The free plug-ins allow most other GIS and Office products to do the same. ER Mapper free imagery solutions ER Mapper’s free Enterprise Wide Imagery solutions are tightly integrated software tools and plug-ins that let you share images throughout your enterprise. • ER Viewer–A free image viewer that lets you view ER Mapper images and algorithms, TIFF and GeoTIFF files, Windows BMP, JPEG, Universal Data Format (UDF), ESRI BIL, and SPOTView image formats. • Imagery plug-in for Office users–Users of office products (word processing, graphics, spreadsheets, etc.) can use ER Viewer’s OLE capabilities to directly display large imagery files quickly within their applications. • ER Mapper Imagery Extension for ArcView GIS–A free extension that lets ArcView GIS users display ER Mapper format images and smart data algorithms. • MapImagery plug-in for MapInfo–A free plug-in that lets MapInfo users display and enhance the same image formats supported by ER Viewer. • AutoCAD Map plug-in–A free plug-in that lets AutoCAD Map users display the same image formats supported by ER Viewer. • Autodesk World imagery viewer–Autodesk World lets users display any images supported by ER Viewer (this functionality is embedded in the World software). Using ER Mapper for imaging By using the plug-ins and tools in conjunction with ER Mapper, you gain access to the powerful capabilities of this leading integrated mapping and image processing application. ER Mapper can be used as a central depository for all image data, where it can be processed as needed before passing on to other applications in you organization via the plug-ins and tools. Adding ER Mapper to your enterprise gives you capabilities to: • Import and display over 100 different image formats Enterprise Wide Imagery 279 Chapter 15 Enterprise Wide Imagery ● ER Mapper image compression • Directly read TIFF, GeoTIFF, BMP, ER Mapper images and algorithms, ESRI BIL, SPOTView and Universal Data Format (UDF) imagery without the need for import or conversion • Easily view the entire project area in one image–no limits on image file sizes • Geocode and orthorectify imagery easily to precisely register with GIS vector data • Automatically display, mosaic and color balance numerous images • Combine imagery, vector and tabular data from any number of sources • Create and edit vector data over imagery backdrops, and highlight features of interest and save them as vectors with ER Mapper’s raster to vector conversion tools • Use advanced image processing functions such as contrast enhancement, multispectral classification, vegetation indexes, color shaded reliefs, filtering, merging images, and many others. airphotos satellite images digital elevation models geophysical data ASCII and binary (over 100 image formats) ER Mapper (image processing, mosaicing, geocoding, map production, 3D visualization...) Autodesk World ArcView GIS AutoCAD MAP MapInfo Office applications ER Viewer (image viewing) ER Mapper can serve as a central hub for all the image data, so you can process and enhance images if needed before passing them onto other applications in your enterprise. ER Mapper image compression ER Mapper also lets you create and distribute royalty-free compressed images using the patent pending ER Mapper ECW Compression facilities and the free plug-ins for other applications. You can now achieve significant compression ratios with no noticeable deterioration in image quality. 280 Enterprise Wide Imagery Chapter 15 Enterprise Wide Imagery ● Working with large images Working with large images When working with satellite imagery, airphotos, scanned topographical maps and other types of imagery, the size of image files can become very large. For example, it takes 3 terrabytes (3,000GB) of color imagery to take aerial photographs of typical city at 3 inch resolution. It takes 1.5TB (1,500GB) of color imagery to cover all of California at a resolution of one meter. Compression of imagery offers several advantages including: • reduced image file size • faster access • easier distribution • the ability to work with imagery covering larger areas Enterprise Wide Imagery 281 Chapter 15 Enterprise Wide Imagery ● Working with large images 282 Enterprise Wide Imagery 16 Using ER Viewer This chapter explains how to use the free ER Viewer application to display and analyze several types of image files. ER Viewer is a free Windows application that can be installed from the ER Mapper installation CD-ROM or downloaded from the ER Mapper website at www.ermapper.com. About ER Viewer ER Viewer is a free, easy to use image viewing application featuring interactive roaming and zooming of very large image files. It also acts as an OLE server application to let you view images inside your favorite Windows applications. ER Viewer offers unequalled stability and supports a wide range of image formats, including: • Universal Data Format (UDF) images • ER Mapper compressed and uncompressed images • TIFF and GeoTIFF images • Windows BMP images • SPOTView images • ESRI BIL (ARC/INFO and ArcView) images • Smart Data ER Mapper algorithms Enterprise Wide Imagery 283 Chapter 16 Using ER Viewer ● Hands-on exercises Hands-on exercises These exercises show you how to use ER Viewer to display image files and perform zooming, roaming and measuring distances. What you will learn... After completing these exercises, you will know how to perform the following tasks in ER Viewer and OLE-enabled Windows applications: • Use ER Viewer to display images in several different formats • Interactively zoom and roam images • View geographic coordinates and measure distances on an image • Print an image (optional) Before you begin... Before beginning these exercises, you must have installed ER Viewer on your system. You can download it free of charge from the ER Mapper web site at www.ermapper.com if needed. Note: The following examples use image files supplied with ER Mapper as sample data. If it is not possible to install ER Mapper, you must have a sample TIFF or BMP image file to use for the exercises. 1: Using ER Viewer to display images Objectives Learn how to use ER Viewer to display images, zoom and roam around the images, and measure distances on geocoded images. Start ER Viewer 1 Start ER Viewer by double-clicking the icon on your desktop or selecting Start/Programs/ER Mapper/ER Viewer. ER Viewer starts up and displays the Getting Started information dialog that contains basic instructions for using ER Viewer. 2 Click Close on the Getting Started With ER Viewer dialog. 3 Click the Maximize button in the upper-right corner of the ER Viewer window (if it is not already maximized) 284 Enterprise Wide Imagery Chapter 16 Using ER Viewer ● 1: Using ER Viewer to display images ER Viewer expands to fill your desktop. About the ER Viewer interface The ER Viewer user interface has the following components: main menu toolbar image window coordinates of current mouse position and distance measurement status bar Tip: To get help on using any ER Viewer component, click the What’s this? button then and click on the component of interest. Open an ER Mapper-format image file 1 Click the Open toolbar button (or select File > Open). 2 On the Open algorithm or image files dialog, open the Files of type menu. Enterprise Wide Imagery 285 Chapter 16 Using ER Viewer ● 1: Using ER Viewer to display images A list of image formats supported by ER Viewer displays. You can open ER Mapper-format images and algorithms, graphics formats like TIFF and BMP, satellite image formats such as GeoSPOT and ESRI BIL, and others. 3 Select the All image files option. 4 Navigate to the directory where ER Mapper is installed. Open the ‘examples\Shared_Data’ directory. Double-click on the file ‘airphoto.ers.’ ER Viewer displays an aerial photograph of the San Diego, California area. (This file was previously imported and saved in ER Mapper ‘.ers’ image file format.) Note: If the ER Mapper sample data is not installed, navigate to a directory containing an image in TIFF, BMP or other supported format an open it instead. Enlarge the image window 1 Drag the image window by a corner to make it larger. 2 From the Zoom menu, select Data Extents. The image expands to fill the new image window size. Use the Zoom Tool to zoom freely in and out 1 Click the Zoom Tool button on the toolbar (or press F6). 2 Point to the center of the image, then drag downward to zoom in. 3 Point to the center of the image, then drag upward to zoom out. By dragging up or down, you can zoom in or out by any amount. When you release the mouse, ER Viewer refreshes the image detail as needed. Use the Zoom Tool to zoom by fixed amounts 1 From the Zoom menu, select Data Extents. The airphoto image zooms out to show the entire image extents. 2 Click on the center of the image to zoom in. The image zooms in to twice (200%) the previous magnification. 3 While holding down the Ctrl key, click the image center again. The image zooms out to half (50%) of the previous magnification. With the Zoom Tool selected, clicking zooms in and Ctrl-clicking zooms out by fixed amounts. 286 Enterprise Wide Imagery Chapter 16 Using ER Viewer ● 1: Using ER Viewer to display images Use the Zoom Box Tool to zoom on an exact area 1 From the Zoom menu, select Data Extents. The image zooms out to show the entire image extents. 2 Click the ZoomBox Tool button (or press F5). 3 Drag a box around the central portion of the image. ER Viewer zooms in to display the area you defined with your box. Use the ZoomBox Tool tool to zoom in on an exact area of interest. Use the Hand Tool to roam around (pan) the image 1 Click the Hand Tool button (or press F7). 2 Drag the airphoto within the image window. ER Viewer roams (or pans) to display the adjacent area of the image. Use the Hand Tool tool to roam around and quickly view adjacent areas of the image. Tip: When the Zoom Tool Hand Tool is selected, pressing Shift temporarily enables the . View geographic locations on the image 1 Without depressing the mouse, point to different locations on the image. The geographic locations of the current mouse position are shown in the lower right part of the ER Viewer window. (Locations are shown in the units of the map projection. This airphoto is registered to the UTM coordinate system, so the locations are in meters of Easting and Northings.) Note: Geographic locations only display when your image has been registered to a map projection. If your image in unregistered, the locations appear as row and column (cell) values instead. Use the Measure Tool to measure distances in the image 1 Click the Measure Tool button (or press F8). Enterprise Wide Imagery 287 Chapter 16 Using ER Viewer ● 1: Using ER Viewer to display images 2 Drag a line between two points on the image. drag a line, distance is shown in status bar ER Viewer shows the distance between the start and end points on the right side of the status bar. 3 While keeping the mouse button depressed, drag to different points on the image. The distances are updated interactively as you move the mouse. As with locations, distances are shown in the units of the map projection (in this case meters). Tip: Ctrl-Shift temporarily enables the Measure Tool , ZoomBox Tool or Hand Tool Open a second ER Mapper image file 1 Click the Open 288 Enterprise Wide Imagery button. when the Zoom Tool is selected. Chapter 16 Using ER Viewer ● 1: Using ER Viewer to display images 2 Navigate to the directory where ER Mapper is installed. Open the directory ‘examples\Applications\Land_Information.’ Tip: The ‘Automatically adjust contrast on dataset load’ option enhances the contrast of any image you open automatically. You should usually leave this option turned on. 3 Double-click on the file ‘SPOT_XS_07Aug88.ers’ to display it. ER Viewer displays a SPOT XS satellite of the San Diego, California area in a new image window. This is a color infrared image, so vegetated areas are shown in red tones. 4 Make the image window two times larger, then select Zoom > Data Extents. 5 Zoom in to an area of interest using the Zoom Tool or ZoomBox Tool . 6 Pan or scroll the image as desired using Hand Tool . View properties of the image file 1 From the View menu, select Properties. ER Viewer displays tab pages showing properties of the image file. 2 On the Properties dialog, click the Registration tab. The geodetic datum, map projection, units and other georeferencing information about the image file is shown. 3 Click Cancel on the Properties dialog. Preview a hardcopy print of the image 1 Click the Print Preview button. ER Viewer redisplays the image to show how it would be sized and positioned on your default printer. ER Viewer tries to center the image on the page and fill the printable area. Tip: Only the area you zoomed into will be printed, so you can easily print any portion of a large image. Enterprise Wide Imagery 289 Chapter 16 Using ER Viewer ● 1: Using ER Viewer to display images 2 Click Close or click the button on the image window. The image redisplays in normal mode for zooming and roaming. Print of the image (optional) 1 Click the Print button. The Windows Print dialog for your default printer opens to let you select a printer, change the properties, and print the image. 2 If desired, select the printer and properties, then click OK to print the image. Otherwise click Cancel to close the Print dialog. Close ER Viewer 1 Click the Close What you learned 290 button on the ER Viewer window (or select File > Exit). After completing these exercises, you know how to perform the following tasks in ER Viewer: • Use ER Viewer to display images in several different formats • Interactively zoom and roam images • View geographic coordinates and measure distances on an image • Print an image (optional) Enterprise Wide Imagery 17 Office applications (OLE) This chapter explains how you can use your office software’s OLE capabilities to easily display and manipulate large images inside Windows applications (without having to save the image as part of the file). Note: To use the OLE capabilities described here, make sure you first install ER Viewer and perform the exercises in the previous chapter to become familiar with it. You can install ER Viewer from the ER Mapper installation CD-ROM or download it from the ER Mapper website at www.ermapper.com. Enterprise Wide Imagery 291 Chapter 17 Office applications (OLE) ● What is OLE? What is OLE? Many Windows applications support OLE–Object Linking and Embedding. OLE is a program-integration technology developed by Microsoft that lets you easily share information between programs. This capability allows you to insert an object (such as an image) into any OLE-enabled application. Most office applications running under Microsoft Windows support OLE. Image file (source file) image object spreadsheet document image object image object presentation document word processing document With a linked object, information is created in one file (the source file) and inserted into another file (the destination file) while maintaining a connection or “link” between the two files. When you save the destination file (such as a word processing document), you save only the link to the source file and do not embed the image as part of the document. For example, several different documents can display the same image, all via links to the single source image file. If the source image file is modified, the linked image objects in the destination files are also automatically updated to reflect any changes. Sharing image files using OLE In addition to letting you view images, ER Viewer also acts as an OLE server application to let you view images inside your favorite Windows applications. Using ER Viewer’s OLE capabilities provides many advantages for sharing large image files throughout your enterprise, including: 292 • You can display image files much larger than the application itself is capable of displaying (for example a 500MB airphoto) since ER Viewer performs the processing (not the application where the image is displayed) • Much faster display of large image files in documents, since ER Viewer performs the processing (not the application where the image is displayed) Enterprise Wide Imagery Chapter 17 Office applications (OLE) ● Hands-on exercises • Word processing documents, spreadsheets, presentations, and other applications can all share a single copy of the original imagery files • Documents can display images in many additional image formats not supported by the destination application, but that are supported by ER Viewer • Images can be displayed in the application without having to permanently embed and save the image files as part of the document (so the documents remain small in size) • You can access the power of ER Mapper Smart Data Algorithms to apply complex processing enhancements that create beautiful images interactively without changing the original image files Hands-on exercises These exercises show you how to insert an image into another Windows application as a linked OLE object using ER Viewer as the source application. What you will learn... Before you begin... After completing these exercises, you will know how to perform the following tasks in OLE-enabled Windows applications: • Insert an image as a linked OLE object into another Windows application • Edit the image object within the application using the ER Viewer toolbar • Copy and paste an OLE image form one area to another Before beginning these exercises, you must have installed ER Viewer on your system. Note: The following examples use image files supplied with ER Mapper as sample data. If it is not possible to install ER Mapper, you must have a sample TIFF or BMP image file to use for the exercises. Enterprise Wide Imagery 293 Chapter 17 Office applications (OLE) ● 1: Using OLE to display images 1: Using OLE to display images Objectives Learn how to use ER Viewer as an OLE server to display and edit large image files within OLE-enabled Windows applications. In the past, it was usually necessary to embed large image files in word processing documents, spreadsheets or presentations in order to display and print them at full resolution. Since the image file was saved as part of the document, it created very large document files and the data could not be edited once it was inserted. With Object Linking and Embedding (OLE), you can use ER Viewer as a powerful image viewing engine to display and edit large image files directly inside your Windows applications. This allows you to display images in many formats that cannot be read by the application itself, and also makes the document files much smaller because only a link to the image file is saved with the document. The following example uses Microsoft Word as the example OLE-enabled application. You can use any other OLE-enabled word processing application if desired (WordPerfect, Framemaker, and so on). Start Microsoft Word (or other OLE-enabled word processor) 1 Start up the Word application on your system (or another OLE-enabled word processor). 2 Type the text San Diego Airphoto as the first line of your document, then press Enter to create a new line. Open the Windows Explorer 1 Open the Windows Explorer application (select Start > Programs > Windows Explorer). 2 Open the ER Mapper installation directory. Then open the directory ‘examples\Applications\Airphoto\1_Geocoding.’ You should see a list of files beginning with ‘San_Diego_Airphoto.’ 3 Move the Word application window and the Explorer window side by side (resize them if needed). 294 Enterprise Wide Imagery Chapter 17 Office applications (OLE) ● 1: Using OLE to display images Drag an image file into the Word document 1 Drag the file ‘San_Diego_Airphoto_36_rectified.ers’ from the Explorer window and drop it into the Word document window. After a short time, the image file displays in your document. 2 In the word processor, click once on the image to select it, then drag the lower-right corner handle to make it much larger. The image redisplays at the larger size. This image is a color aerial photograph of the San Diego, California area. The source image file is over 34MB in size. Zoom and roam using the ER Viewer toolbar 1 In Word, double-click on the image. Enterprise Wide Imagery 295 Chapter 17 Office applications (OLE) ● 1: Using OLE to display images The word processor’s native toolbar changes to display the ER Viewer zoom and roam tools. When you double-click on a linked object, the object’s server application (ER Viewer) is temporarily enabled inside the container application (the word processor) so you can edit the object. ER Viewer toolbar 2 Click the ZoomBox Tool button, then drag a box to enclose the area of white buildings in the lower central portion of the image. 3 ER Viewer zooms in to display the area you defined with your box. 4 Click the Hand Tool button, then drag the image. 5 ER Viewer roams (or pans) to display the adjacent area of the image. Return to the Word application 1 In the word processing document, click outside the image area. The usual word processor toolbar and interface returns, and the image is updated to the new extents you defined. Drag and drop a second image into the document 1 Press Enter twice to create two new lines below the image, then type the text Mount St. Helens Volcano. 296 Enterprise Wide Imagery Chapter 17 Office applications (OLE) ● 1: Using OLE to display images 2 In the Explorer window, open the ER Mapper home directory, then open the directory examples\Applications\Mt_St_Helens. 3 Drag the file ‘2D_after_eruption.alg’ from the Explorer window and drop it into the word processing document window. After a short time, the image file displays in your document. 4 Click once on the image to select it, then drag the lower-right corner handle to make it larger. This is an image of the Mount St. Helens Volcano in the state of Oregon, USA after an eruption that blew out the central portion of the mountain. The image data from which this is created is a Digital Elevation Model (DEM) where each pixel value represents a terrain elevation. The special processing technique is called a “colordrape” that combines a color image that shows elevation with a shaded relief image that shows terrain features. In this case, the image file you linked to is an ER Mapper Smart Data Algorithm (.alg). The algorithm file runs the ER Mapper processing engine in the background to interactively create the enhanced colordrape image from the original DEM image data. Tip: Most OLE-enabled applications also let you insert a linked OLE object into a document using a menu command (as an alternative to the drag and drop method shown in the previous example). Zoom into and center the volcano image 1 Double-click on the inserted image to display the ER Viewer toolbar. Enterprise Wide Imagery 297 Chapter 17 Office applications (OLE) ● 1: Using OLE to display images 2 Use the Zoom Tool to zoom in on the central portion of the image (the volcanic caldera), then use the Hand Tool center it. to drag the image and Use tools to zoom in and center image 3 When finished, click outside the image to return to the word processing application. Copy and paste the volcano image 1 Click once on the volcano image to select it. 2 Press Ctrl+C (or select Edit > Copy) to copy it. 3 Press Enter twice to create two new paragraphs in your document. 4 Press Ctrl+V (or select Edit > Paste) to paste the volcano image into the new location. It is sometimes useful to copy and paste OLE images from one part of your document to another. For example, you might insert an airphoto covering a large area, then copy and paste it to different parts of the document and zoom in to show different areas of interest. 298 Enterprise Wide Imagery Chapter 17 Office applications (OLE) ● 1: Using OLE to display images (Optional) Save your word processing document. 1 Save your document, then close the application. Note: If you check the file size of your word processing document, it should only be about 1MB. Yet this document displays images that are created from almost 40MB of image files. This is one of the big advantages of OLE–you can display very large image files inside a document very quickly without having to embed the image files. (That is, images are not saved as part of the document, only the link to them is saved.) What you learned After completing these exercises, you know how to perform the following tasks in OLE-enabled Windows applications: • Insert an image as a linked OLE object into another Windows application • Edit the image object within the application using the ER Viewer toolbar • Copy and paste an OLE image from one area to another Enterprise Wide Imagery 299 Chapter 17 Office applications (OLE) ● 1: Using OLE to display images 300 Enterprise Wide Imagery 18 ArcView GIS Users This chapter explains how to use the free ER Mapper Imagery Extension for ESRI’s ArcView GIS software. It also explains how to obtain and install the extension, and the additional imaging capabilities ArcView users can gain by using the extension in conjunction with ER Mapper. Note: You must have a licensed copy of ArcView GIS version 3.1 or greater to install and run the ER Mapper Imagery Extension. You do not need to have a copy of ER Mapper installed, but this is recommended to gain access to sample ER Mapper imagery and algorithms used in the following tutorial. (You can order the free ER Mapper installation CD-ROM from www.ermapper.com.) About the ER Mapper Extension for ArcView GIS As imagery data sources become more important for GIS applications, the need to efficiently process, enhance and display large image files also becomes more important. Earth Resource Mapping (developers of ER Mapper) provides a free extension (or “plug-in”) that lets ArcView GIS users directly display ER Mapper imagery and algorithms. With the ER Mapper Imagery Extension, ArcView GIS users are no longer restricted by limited image handling capabilities. In addition, Enterprise Wide Imagery 301 Chapter 18 ArcView GIS Users ● Using the extension with ER Mapper you can experience the full power of ER Mapper algorithms from within ArcView GIS, and give your vector GIS data real world meaning by presenting it over image backdrops. Using the extension with ER Mapper By using the extension in conjunction with ER Mapper, ArcView GIS users gain access to the extensive capabilities of this powerful integrated mapping and image processing software, including: • Import and display over 100 different image formats • Directly read TIFF, GeoTIFF, BMP, ER Mapper images and algorithms, ESRI BIL, SPOTView and Universal Data Format (UDF) imagery without the need for import or conversion • Easily view the entire project area in one image–no limits on image file sizes • Geocode and orthorectify imagery easily to precisely register with GIS vector data • Automatically display, mosaic and color balance numerous images • Combine imagery, vector and tabular data from any number of sources • Create and edit vector data over imagery backdrops, and highlight features of interest and save them as vectors with ER Mapper’s raster to vector conversion tools • Use advanced image processing functions such as contrast enhancement, multispectral classification, vegetation indexes, color shaded reliefs, filtering, merging images, and many others. How to obtain the ER Mapper Imagery Extension You can obtain the free ER Mapper Imagery Extension from two sources: 302 • The ER Mapper installation CD-ROM–The extension can be installed as a separate component from the ER Mapper installation CD-ROM. (It is recommended that you also install ER Mapper to gain access to a wide variety of sample data and test drive the software in free evaluation mode to see what it can do for you.) • The ER Mapper web site–You can download the latest version of the extension from the ER Mapper web site at www.ermapper.com. Navigate to the “free software” area and download the ArcView GIS plug-in. Enterprise Wide Imagery Chapter 18 ArcView GIS Users ● Hands-on exercises Hands-on exercises These exercises show you how to use the ER Mapper Imagery extension for ArcView GIS. What you will learn... Before you begin... After completing these exercises, you will know how to perform the following tasks in ArcView GIS using the ER Mapper Imagery Extension: • Enable the ER Mapper Imagery Extension after starting ArcView GIS • Display an ER Mapper image file (.ers) as an Image Data Source • Display an ER Mapper algorithm file (.alg) as an Image Data Source • Display a vector theme on an ER Mapper image Before beginning these exercises, you must have installed ArcView GIS version 3.1 or higher and the ER Mapper extension for ArcView on your system. These exercises use sample ER Mapper imagery and algorithm files from the ER Mapper installation CD-ROM. You may also follow the general procedures using your own ER Mapper imagery (.ers) or algorithm (.alg) files. 1: Using the ER Mapper extension Objectives Learn to enable the ER Mapper extension for ArcView and display ER Mapper imagery (.ers) files and algorithm (.alg) files. Start ArcView GIS 1 Start the ArcView GIS software on your system. 2 If the Welcome to ArcView GIS dialog appears, click Cancel. 3 Click the Maximize button in the upper-right corner of the ArcView GIS application window (if it is not already maximized) ArcView GIS expands to fill your desktop. Load the ER Mapper extension 1 From the File menu, select Extensions.... 2 On the Extensions dialog, click on the box next to ‘ER Mapper Algorithms and Imagery’ (a check mark should appear). Enterprise Wide Imagery 303 Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension 3 Turn on the ‘Make Default’ option, then click OK. turn on ER Mapper extension load extension on startup The ER Mapper Imagery Extension for ArcView GIS loads. You can now display ER Mapper algorithm and imagery files. Since you selected ‘Make Default,’ the extension will load automatically each time you start ArcView GIS. Open an ER Mapper-format (.ers) image file 1 If the Project window is not open, select File > New Project. 2 On the Project window, click New to open a View window. (It should titled ‘View1’.) 3 Click the Add Theme button (or select View > Add Theme). 4 On the Add Theme dialog, select ‘Image Data Source’ from the ‘Data Source Types’ list. (ER Mapper imagery and algorithms are always image data sources in ArcView GIS.) 5 Double-click on the folder where ER Mapper is installed. Then open the ‘examples\applications\land_information’ folder. A list of ER Mapper imagery (.ers) and algorithm (.alg) files appears. 304 Enterprise Wide Imagery Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension 6 Scroll down to the bottom, then double-click on the file ‘spot_xs_07aug88.ers.’ load image 7 Click the check box next to the ‘Spot_xs_07aug88’ theme to turn it on. ArcView GIS displays a SPOT XS color satellite image of the San Diego, California area. This is a 3-band color infrared image, so vegetated areas appear in red tones. turn on theme Enterprise Wide Imagery 305 Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension This image file is in ER Mapper’s native ‘.ers’ imagery format. The extension enables ArcView GIS to read it as one of its native formats. (ER Mapper’s imagery format is composed of a binary data file and an ASCII header ‘.ers’ file similar to the ‘.hdr’ files also used by ESRI products.) 8 Resize the ‘View1’ window to make the image larger. Zoom, pan and measure the image 1 Click the Zoom In tool, then drag a box over the central part of the SPOT image to zoom into it. 2 Click the Pan 3 Click the Measure area. tool, then drag the image to view adjacent areas. tool, then drag a line to view distances across an The line length appears in the lower-left corner of the ArcView GIS dialog. 4 Move the mouse pointer around inside the image. Geographic coordinates appear in the upper-right area indicating that the image is georeferenced. (In this case to the UTM projection, so units are meters of Easting and Northings.) Tip: When you load an ER Mapper imagery (.ers) file, the contrast is automatically enhanced by the ER Mapper Imagery Extension (using a 99% linear contrast stretch). You can further adjust image contrast if desired using Theme > Edit Legend, however this is usually not necessary. Open an ER Mapper algorithm (.alg) file In ER Mapper, an algorithm is a list of processing steps or instructions ER Mapper uses to transform a raw imagery file into a final, enhanced image on your screen or printer. Algorithms let you define a “view” into your data that you can save, reload, and modify at any time. By using the ER Mapper Imagery Extension, you can display ER Mapper algorithms just like an other image data source. Tip: 306 You need a license for ER Mapper to create algorithms, but you only need the free ER Mapper Imagery Extension to view them in ArcView GIS. This means that anyone using ER Mapper can create algorithms and send them to you for viewing. Enterprise Wide Imagery Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension 1 From the Edit menu, select Delete Themes. When prompted to delete the theme ‘Spot_xs_07aug88.ers’ click Yes. The theme is deleted from your view. 2 Click the Add Theme button (or select View > Add Theme). The files in the ‘land_information’ directory should be displayed. 3 Open the ‘applications\airphoto\3_balancing’ folder. A list of ER Mapper imagery (.ers) and algorithm (.alg) files appears. 4 Scroll down to the bottom, then double-click on the file ‘san_diego_airphoto_34_36_balanced_mosaic.alg’ (the next to last file). balanced mosaic algorithm 5 Click the check box next to the theme to turn it on. ArcView GIS displays a mosaic of two orthorectified color airphotos of the downtown San Diego, California area. This image is created from an ER Mapper algorithm, so it has several processing enhancements applied to the two airphoto imagery (.ers) files used as input: • brightness and color variations within each image are normalized to remove “hotspots” or light-to-dark variations across each photo • the contrast and brightness of the two normalized images are then balanced to each other ensure uniform color and brightness across the mosaic • the seam between the two images is feathered to ensure a smooth transition between the two images and make the mosaic truly “seamless” 6 Click the Zoom In tool, then drag a box over the central part of the mosaic image to zoom into it. 7 Click the Pan tool, then drag the image to view adjacent areas. Enterprise Wide Imagery 307 Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension This example shows how you can access the power of ER Mapper algorithms to apply complex image enhancements and display them directly with ArcView GIS. This example uses only two airphotos, but you could just as easily display a mosaic algorithm containing 100’s of megabytes (even gigabytes) of airphoto images. Add a second view to display a merged satellite image 1 Click the Minimize close it if desired). button on the ‘View1’ window to minimize it (or 2 On the Project window, click New to open a new View window. (It should be titled ‘View2’.) 3 Click the Add Theme button (or select View > Add Theme). The files in the ‘3_balancing’ directory should be displayed. 4 Open the ‘examples\functions_and_features\data_fusion’ folder. A list of ER Mapper algorithm (.alg) files appears. These algorithms all show different ways of merging (or “fusing”) two different images into one. 5 Double-click on the file ‘brovey_transform.alg.’ 6 In the ‘View2’ window turn on the ‘Brovey_transform’ theme. ArcView GIS displays a color image of the San Diego, California area. This is a merge of a Landsat TM satellite image (bands 5, 4 and 2) and a SPOT Panchromatic satellite image. By merging the two types of data, you get the high spatial detail provided by the SPOT Pan image (10-meter resolution) with the multispectral color information provided by the Landsat TM image (seven bands at 30-meter resolution). The Brovey Transform is a mathematical way of combining the two images that also greatly enhances the color. Merging or fusion techniques like this are used to combine the strengths of different satellite sensors and create up-to-date views of the earth’s surface. 7 Enlarge the ‘View2’ window to make the image larger. 8 Zoom in and pan to different parts of the image using the Zoom In Pan and tools. The image shows a high resolution, color-enhanced view of the area. As with the airphoto mosaic, the ER Mapper algorithm creates this image interactively from the two separate Landsat and SPOT satellite imagery files. (The Brovey Transform technique usually requires up to three intermediate image files to be created when using traditional imaging software, but ER Mapper performs the processing in real time from the two source images without creating intermediate files.) 308 Enterprise Wide Imagery Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension 9 Click the Zoom to Full Extent button (or select View > Full Extent) to zoom out to the full image extents again. Add a second theme (algorithm) showing thematic land cover 1 Click the Add Theme button (or select View > Add Theme). The files in the ‘data_fusion’ directory should be displayed. 2 Open the ‘functions_and_features\classification_display’ folder. 3 Double-click on the file ‘isoclass_classification.alg.’ 4 In the ‘View2’ window turn on the ‘isoclass_classification’ theme. ArcView GIS displays a thematic color image of the same area of San Diego. Different colors correspond to different types of landuse in the area. This image was created from a 1985 Landsat TM satellite image using ER Mapper’s ISOCLASS unsupervised classification feature. Classification groups pixels with similar spectral values into classes that can represent different types of landuse or land cover. 5 Turn the ‘isoclass_classification’ theme on and off to compare it with the ‘brovey_transform’ merged satellite image theme. Adding several themes showing different types of data or processing techniques as backdrop images can be very helpful to aid analysis of your vector GIS data. Add a third theme (algorithm) showing topography 1 Click the Add Theme button (or select View > Add Theme). The files in the ‘classification_display’ directory should be displayed. 2 Open the ‘examples\data_types\digital_elevation’ folder. A list of ER Mapper algorithm (.alg) files appears. These algorithms all show different ways displaying and processing digital elevation model (DEM) data files. 3 Double-click on the file ‘colordrape.alg.’ 4 In the ‘View2’ window turn on the ‘Colordrape.alg’ theme. ArcView GIS displays a color shaded relief (or “colordrape”) image of the same area of San Diego. Colors represent elevation (reds are highest) and the shading effect highlights topographic features such as hills and valleys. This image is illuminated from the northeast, so shadows appear on the southwest side of terrain features. ER Mapper has a built-in “realtime shading” feature that lets you interactively change the shading parameters without creating output files. Enterprise Wide Imagery 309 Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension 5 Turn the three themes on and off to compare them (if more than one is on, the top theme covers the others). turn on any theme (drag and drop to reorder) Add a third view to display an image and vector data 1 If desired, click the Minimize it. button on the ‘View2’ window to minimize 2 On the Project window, click New to open a new View window. (It should be titled ‘View3’.) 3 Click the Add Theme button (or select View > Add Theme). The files in the ‘digital_elevation’ directory should be displayed. 4 Open the ‘examples\shared_data’ folder. A list of ER Mapper image (.ers) and algorithm (.alg) files appears. 5 Double-click on the file ‘airphoto.ers.’ 6 In the ‘View3’ window turn on the ‘Airphoto’ theme. ArcView GIS displays a color aerial photo of a small area near downtown San Diego, California. 310 Enterprise Wide Imagery Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension Overlay vector roads (in DXF format) on the airphoto You can display any vector data such as shapefiles, coverages, and other supported vector formats on your ER Mapper image data. In this example, you will overlay a vector roads file of the corresponding area stored in DXF format. 1 From the File menu, select Extensions.... 2 Click on the box next to ‘Cad Reader’ (if not already turned on), then click OK. This enables the CAD Reader extension, so ArcView GIS can now display DXF and DWG vector files. 3 Click the Add Theme button (or select View > Add Theme). The files in the ‘shared_data’ directory should be displayed. 4 Open the ‘examples\data_types\autocad_dxf’ folder. 5 On the Add Theme dialog, select ‘Feature Data Source’ from the ‘Data Source Types’ list. 6 Double-click on the file ‘roads.dxf.’ 7 In the ‘View3’ window turn on the ‘Roads.dxf’ theme. ArcView GIS displays a vector roads coverage over the airphoto. 8 If desired, select ‘roads.dxf’ theme and change the vector color and line size to make them more visible. (Select Theme > Edit Legend, then double-click on the vector in the Symbol column). 9 Close the views by clicking the Close button on the view windows. These simple examples show how you can use the power of ER Mapper algorithms showing various “views” of your image data, and display them directly inside ArcView GIS. Open a URL file The ER Mapper extension enables you to open an ECW compressed image, served via an ER Mapper Image Web Server, inside arcview by specifying its URL. You can then zoom into and roam over this image in real time. The Image Web Server sends the compressed image blocks as they are requested. The extension includes the facility to store image URLs in a ‘Favorites’ list so that they can easily be accessed in later ArcView® sessions. You can also select URLs from a ‘History’ list that displays the last 20 URLs requested. Enterprise Wide Imagery 311 Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension In order for you to do these exercises, the PC in which ArcView is installed must have access to an Image Web Server over the Internet or private intranet. In this example we will use the public ‘www.earthetc.com’ web site. 1 On the Project window, click New to open a new View window. (It should be titled ‘View1’.) 2 Click the Add ECW Image Theme from an Image Web Server URL button (or select View > Add URL Theme). This should open the Image Theme URL dialog box. 3 Enter the following URL in the URL: field. ecwp://www.earthetc.com/images/world/gtopo30.ecw This URL will access the gtopo30.ecw compressed image file at the Earth Resource Mapping www.earthetc.com web site. The protocol to be used is ECWP (Enhanced Compression Wavelet Protocol). Note: This step requires your PC to have Internet Access. If you are accessing another Image Web Server on a local network, you must change the URL accordingly. The 1 Km resolution image of the world was created by using the ER Mapper Image Display and Mosaic Wizard to mosaic 30 gtopo DTMs (Digital Terrain Maps). The resultant 2.8GB image was then compressed to 50 MB using ECW compression. 4 Click on the OK button. The image will be loaded as theme via the Internet. If you have a slow connection to the Internet this step could take a few minutes. If your PC is not able to access the www.earthetc.com web site, it will display an error message. 5 In the ‘View1’ window turn on the ‘Gtopo30.url’ theme. 312 Enterprise Wide Imagery Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension ArcView GIS displays the world image. Turn on the theme 6 In the ‘View1’ window, select the ‘Gtopo30.URL’ theme and then select Edit > Delete Themes to remove the theme. Answer Yes to the Delete Themes query. 7 Click the Add ECW Image Theme button (or select View > Add URL Theme) to reopen the Image Theme URL dialog box. The URL: field should now be blank. 8 From the History: list select the ‘ecwp://www/earthetc.com/images/world/ gtopo30.ecw’ entry. The History: list contains the last 20 URLs entered. This saves you from having to type in the full URL to re-open a recently accessed image. The URL: field should now contain the URL that you selected from the History: list. If you were to click on the OK button, it would re-load the image as a theme in the ‘View1’ window. 9 Click on the Add to Favorites button to open the Add to Favorites dialog box. Enterprise Wide Imagery 313 Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension This box allows you to select a directory and file name to store URLs that you are likely to access again. The file names all have a .url extension. You should note that there is already a ‘gtopo30.url’ entry in the ‘arcview\averm\urls’ directory. The ER Mapper extension automatically creates these files in the default directory whenever you access a URL. The Add to Favorites facility is really only required if you want to save the URL to another directory and/or under another name. 10 Select the default directory, which should be ‘ARCVIEW\averm\urls’. 11 Enter World_.url in the File Name: field and click on the OK button to return to the Image Theme URL dialog box. 12 Click on the Open from Favorites button. This opens the Open From Favorites dialog box Automatically created entry Default favorites directory Your entry 13 Select the ‘arcview\averm\urls’ directory if it is not already selected. 14 Select the ‘World_.url’ file which you previously added. There should also be ‘gtopo30.url file’ that was automatically created by the ER Mapper extension. 15 Click on the OK button to return to the Image Theme URL dialog. The URL: field should now contain he full URL . 16 Click on the OK button. The image will be loaded as theme via the Internet. If you have a slow connection to the Internet this step could take a few minutes. If your PC is not able to access the www.earthetc.com web site, it will display an error message. You should also note that the theme name is now the same as that you entered for the ‘Favorites’ file. 314 Enterprise Wide Imagery Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension 17 In the ‘View1’ window turn on the ‘World_.url’ theme. The same world image will open with the new theme name. Zoom, pan and measure the image 1 Click the Zoom In tool, then drag a box over the central part of the image to zoom into it. 2 Click on the Refresh View Tip: button to improve the image resolution. If you are connected to the Internet via a slow link, you may have to click on the Refresh View button a number of times to get the best resolution. This is because ArcView® may display the image before it is fully downloaded from the server. The Refresh View button reloads the image with all new information that has been cached on the PC. 3 Click the Pan tool, then drag the image to view adjacent areas. 4 Click on the Refresh View 5 Click the Measure area. button to improve the image resolution. tool, then drag a line to view distances across an The line length appears in the lower-left corner of the ArcView GIS dialog. Enterprise Wide Imagery 315 Chapter 18 ArcView GIS Users ● 1: Using the ER Mapper extension Close ArcView GIS 1 If desired, save your views as an ArcView project using File > Save Project As.... 2 Close ArcView GIS by clicking the Close window or selecting File > Exit. What you learned... 316 button on the application After completing these exercises, you know how to perform the following tasks in ArcView GIS using the ER Mapper Imagery Extension: • Enable the ER Mapper Imagery Extension after starting ArcView GIS • Display an ER Mapper image file (.ers) as an Image Data Source • Display an ER Mapper algorithm file (.alg) as an Image Data Source • Display a vector theme on an ER Mapper image • Display an ER Mapper URL file (.ecw) as an Image Data Source. Enterprise Wide Imagery 19 MapInfo Users This chapter explains how to use the free MapImagery plug-in for MapInfo software to view ER Mapper imagery and algorithm files. (The free MapImagery plug-in is developed by GID Australia.) It also explains how to obtain and install the plug-in, and the additional imaging capabilities MapInfo users can gain by using the plug-in in conjunction with ER Mapper. Note: You must have a licensed copy of MapInfo version 4.5 or greater to install and run the MapImagery plug-in. You do not need to have a copy of ER Mapper installed, but this is recommended to gain access to sample ER Mapper imagery and algorithms used in the following tutorial. (You can order the free ER Mapper installation CD-ROM from www.ermapper.com.) About the MapImagery plug-in for MapInfo As imagery data sources become more important for GIS applications, the need to efficiently display, process and enhance large image files also becomes more important. GID Australia provides a plug-in that lets MapInfo users directly display ER Mapper imagery and algorithms. This plug-in uses the ER Mapper processing engine to display imagery within MapInfo. Using the plug-ins, MapInfo users can choose from three levels of imagery support: • Level 1 (using the free MapImagery plug-in)–By installing the free MapImagery plug-in, MapInfo users can directly display ER Mapper imagery and algorithms from within MapInfo. You can also use the plug-in to display other imagery formats directly supported by ER Mapper such as GeoTIFF, BMP, GeoSPOT and others. Enterprise Wide Imagery 317 Chapter 19 MapInfo Users ● How to obtain the free MapImagery plug-in • Level 2 (using the commercial MapImagery plug-in)–By installing the commercial version of MapImagery plug-in, MapInfo users add advanced image processing capabilities to MapInfo. These include contrast enhancement, convolution filtering, image mathematics functions, color lookup tables, and much more. The commercial version can also create ER Mapper algorithms. For information on the commercial version, contact GID Australia at their web site at www.gid.com. (GID Australia also makes other ER Mapper and MapInfo tools. See their website for information.) • Level 3 (using the free MapImagery plug-in with a licensed copy of ER Mapper)–By purchasing a license for ER Mapper, MapInfo users can access the full range of high-level ER Mapper image processing functions, and display the images within MapInfo using the free or commercial MapImagery plug-in. ER Mapper provides functions for easily creating seamless, color balanced mosaics of many large image files such as airphotos. It also provides advanced image processing functions such as orthorectification, image reprojection, multispectral classification, color shaded reliefs, raster to vector conversion, image merging/ fusion, support for over 100 imagery formats and over 200 hardcopy printing devices, and much more. How to obtain the free MapImagery plug-in You can obtain the free MapImagery plug-in from three sources: • The GID Australia web site–GID Australia regularly updates the MapImagery plug-in and posts the latest version on their web site at www.gid.com. Navigate to the “products and services” area and download the free MapImagery plug-in. • The ER Mapper web site–You can download the plug-in from the ER Mapper web site at www.ermapper.com. Navigate to the “free software” area and download the MapInfo plug-in. • The ER Mapper installation CD-ROM–The plug-in can be installed as a separate component from the ER Mapper installation CD-ROM. (Note that this may not be the latest version. Check the GID Australia web site for the latest update.) Hands-on exercises These exercises show you how to use the free MapImagery plug-in for MapInfo. What you will learn... 318 After completing these exercises, you will know how to perform the following tasks in MapInfo using the free MapImagery plug-in: • Display an ER Mapper image file (.ers) as a MapInfo table • Display an ER Mapper algorithm file (.alg) as MapInfo table • Overlay MapInfo vector and tabular table data on an ER Mapper image Enterprise Wide Imagery Chapter 19 MapInfo Users ● 1: Open an ER Mapper image file • Before you begin... Choose MapImagery setup options to control image display and printing Before beginning these exercises, you must have installed MapInfo version 4.5 or higher and the free version of the MapImagery plug-in on your system. Note: These exercises use sample ER Mapper imagery and algorithm files from the ER Mapper installation CD-ROM. You may also follow the general procedures using your own ER Mapper imagery (.ers) or algorithm (.alg) files. 1: Open an ER Mapper image file Objectives Learn to use the MapImagery plug-in to display ER Mapper imagery (.ers) files and to zoom, pan and measure distances on the image. Note: You can use the following procedure to open any image formats supported by MapImagery, including TIFF, Windows BMP, JPEG, SPOTView, ESRI BIL, and others. (Additional formats are added periodically, so make sure you are using the latest version of MapImagery.) Start MapInfo 1 Start the MapInfo software on your system. 2 If the Quick Start dialog appears, click Cancel on it. Enterprise Wide Imagery 319 Chapter 19 MapInfo Users ● 1: Open an ER Mapper image file In the MapInfo application window, you should see the MapImagery plug-in enabled as both a floating toolbar and menu: MapImagery menu and toolbar 3 Click the Maximize button in the upper-right corner of the MapInfo application window (if it is not already maximized) MapInfo expands to fill your desktop. Open an ER Mapper-format (.ers) image file 1 Click the Open Image button on the MapImagery toolbar (or select MapImagery > Open Image). Open Image The option lets you open several types of imagery files directly inside MapInfo. 2 On the Open Image Files dialog, open the ‘Files of Type’ list. 320 Enterprise Wide Imagery Chapter 19 MapInfo Users ● 1: Open an ER Mapper image file A list of all the supported imagery formats displays. You can open ER Mapper imagery (.ers) and algorithm (.alg) files, as well as TIFF and BMP and compressed formats such as ER Mapper’s compressed wavelet (.ecw), and JPEG. (Make sure the ‘All Image Files’ option is selected when closing the list.) 3 Double-click on the folder where ER Mapper is installed. Then open the directory ‘examples\Applications\Land_Information.’ A list of ER Mapper imagery (.ers) and algorithm (.alg) files appears. 4 Scroll down to the bottom, then double-click on the file ‘SPOT_XS_07Aug88.ers.’ 5 If you see a message asking to overwrite the existing .alg file, click Yes. The Choose Algorithm Style dialog appears. This lets you select how you want MapImagery to display the image. 6 Select the ‘Automatic contrast stretching’ option, then click OK. 7 If you see a message asking to overwrite the previous .tab file, click Yes. The MapImagery Projection dialog appears. 8 Select the correct MapInfo projection items (as follows), then click OK: • MapInfo Category–>Universal Transverse Mercator (NAD27 for US) • MapInfo Category Members–>UTM Zone 11 (NAD27 for US) • MapInfo Units–meters MapImagery displays a SPOT XS color satellite image of the San Diego, California area in a new map window. This is a 3-band color infrared image, so vegetated areas appear in red tones. The spatial resolution (pixel size) is 20 meters. Note: When you open image or algorithm file, MapImagery creates a MapInfo table (.tab) file to allow correct coordinates and georeferencing. You may be prompted to overwrite this file; see “Table (.tab) files created by MapImagery” in part 3 in this chapter for details on when and why to do this. Zoom, pan and measure the image 1 Click the Zoom-in button on the Main toolbar, then drag a box around the central part of the SPOT image to zoom in on it. 2 Click the Grabber tool, then drag the image to view adjacent areas. 3 Click the Ruler tool, then drag a line between two points on the image and double-click to end it. Enterprise Wide Imagery 321 Chapter 19 MapInfo Users ● 2: Open ER Mapper algorithm files The distance along the line is displayed in the pop-up Ruler dialog. 4 Select Map > View Entire Layer, then click OK on the pop-up dialog. The image zooms out to the full extents of the SPOT satellite image. View geographic coordinates on the image 1 Select Map > Options. 2 On the Map Options dialog, select degrees or meters for ‘Coordinate Units’ (whichever you prefer). 3 Under ‘Display in Status Bar,’ click ‘Cursor Location.’ Then click OK. 4 Move the cursor around inside the satellite image. Geographic coordinates appear in the Status Bar (lower-left area). The coordinates are in Latitude/Longitude (if you chose degrees) or meters of Eastings and Northings in the UTM projection (if you chose meters). 5 Select File > Close All to close all current tables (in case any others were also open). 2: Open ER Mapper algorithm files Objectives Learn to use the MapImagery plug-in to display ER Mapper algorithm (.alg) files, and to add several images as different layers in your map. Open an ER Mapper algorithm (.alg) file In ER Mapper, an algorithm is a list of processing steps or instructions ER Mapper uses to transform a raw imagery file into a final, enhanced image on your screen or printer. Algorithms let you define a “view” into your data that you can save, reload, and modify at any time. By using the MapImagery plug-in, you can display ER Mapper algorithms just like any other imagery file. Tip: You can create algorithm files with ER Mapper or with the commercial version of the MapImagery plug-in. You only need the free MapImagery plug-into view algorithm files in MapInfo. 322 Enterprise Wide Imagery Chapter 19 MapInfo Users ● 2: Open ER Mapper algorithm files 1 Click the Open Algorithm button on the MapImagery toolbar (or select MapImagery > Open Algorithm). Open Algorithm The files in the ‘Land_Information’ directory should be displayed. 2 Backup one directory (to ‘Applications’). Then double-click on the ‘Airphoto’ folder, then double-click on the ‘3_balancing’ folder. A list of ER Mapper imagery (.ers) and algorithm (.alg) files appears. 3 Double-click on the ‘San_Diego_Airphoto_34_36_Balanced_Mosaic.ers’ file. 4 If you see a message asking to overwrite the previous .tab file, click Yes. 5 The correct MapInfo projection parameters are displayed, then click OK. MapImagery displays a mosaic of two orthorectified color airphotos of the downtown San Diego, California area. This image is created from an ER Mapper algorithm, so it has several processing enhancements applied to the two airphoto imagery (.ers) files used as input: • brightness and color variations within each image are normalized to remove “hotspots” or light-to-dark variations across each photo • the contrast and brightness of the two normalized images are then balanced to each other ensure uniform color and brightness across the mosaic • the seam between the two images is feathered to ensure a smooth transition between the two images and make the mosaic truly “seamless” 6 Click the Zoom-in button on the Main toolbar, then drag a box around the central area of the airphoto mosaic. MapImagery applies the algorithm processing to the airphotos, then zooms in to display your area of interest. 7 Click the Grabber tool, then drag the image to view adjacent areas. MapImagery applies the algorithm processing, then pans to display the adjacent area. 8 Select File > Close All to close all current tables (in case any others were also open). Enterprise Wide Imagery 323 Chapter 19 MapInfo Users ● 2: Open ER Mapper algorithm files This example shows how you can access the power of ER Mapper algorithms to apply complex image enhancements and display them directly within MapInfo. (Each one of these airphotos is over 30MB in size.) This example uses only two airphotos, but you could just as easily display a mosaic algorithm containing 100’s of megabytes (even gigabytes) of airphoto images. Note: When you have displayed an image and selected the projection information in MapInfo, MapImagery remembers this in the future. See “Choosing map projection information” in part 3 in this chapter for more information on how and when to select projections. Set the option to add multiple images to the current mapper For this next example, you will add several images as layers in the same mapper window. MapImagery has setup options to make this easier. 1 Click the MapImagery Options button (on the MapImagery toolbar), or select MapImagery > MapImagery Options. 2 Click the General tab. Under ‘When Opening an Algorithm Table’ select the ‘Add to Current Mapper’ option. Click OK. This tells MapImagery to add new images to the same mapper, rather than open a new mapper each time. Open a merged satellite image algorithm 1 Click the Open Algorithm button on the MapImagery toolbar (or select MapImagery > Open Algorithm). The files in the ‘3_Balancing’ directory should be displayed. 2 Backup to the ‘examples’ directory. Double-click on the ‘Functions_and_Features’ folder, then double-click on the ‘Data_Fusion’ folder. A list of ER Mapper algorithm (.alg) files appears. These algorithms all show different ways of merging (or “fusing”) two different images into one. 3 Double-click on the file ‘Brovey_Transform.alg.’ 4 The correct MapInfo projection parameters are displayed, then click OK. MapImagery displays a color image of the San Diego, California area. This is a merge of a Landsat TM satellite image (bands 5, 4 and 2) and a SPOT Panchromatic satellite image. By merging the two types of data, you get the high 324 Enterprise Wide Imagery Chapter 19 MapInfo Users ● 2: Open ER Mapper algorithm files spatial detail provided by the SPOT Pan image (10-meter resolution) with the multispectral color information provided by the Landsat TM image (seven bands at 30-meter resolution). The Brovey Transform is a mathematical way of combining the two images that also greatly enhances the color. Merging or fusion techniques like this are used to combine the strengths of different satellite sensors and create detailed, up-to-date views of the earth’s surface. 5 Use the Zoom-in tool to zoom into the image. Then use the Grabber tool to pan around inside it. MapImagery applies the algorithm processing to merge the two image files, then displays your new area of interest. The image shows a high resolution, color-enhanced view of the area. As with the airphoto mosaic, the ER Mapper algorithm creates this image interactively from the two separate Landsat and SPOT satellite imagery files. (The Brovey Transform technique usually requires up to three intermediate image files to be created when using traditional imaging software, but ER Mapper performs the processing in real time from the two source images without creating intermediate files.) 6 Select Map > View Entire Layer, then click OK on the pop-up dialog. The image zooms out to the full extents of the merged satellite image. Add a second image (algorithm) showing thematic land cover 1 Click the Open Algorithm button on the MapImagery toolbar (or select MapImagery > Open Algorithm). The files in the ‘Data_Fusion’ directory should be displayed. 2 Open the ‘examples\Functions_and_Features\Classification_Display’ folder. 3 Double-click on the file ‘ISOCLASS_Classification.alg.’ 4 The correct MapInfo projection parameters are displayed, then click OK. MapImagery displays a thematic color image of the same area of San Diego. Different colors correspond to different types of landuse in the area. This image was created from a 1985 Landsat TM satellite image using ER Mapper’s ISOCLASS unsupervised classification feature. Classification groups pixels with similar spectral values into classes that can represent different types of landuse or land cover. Enterprise Wide Imagery 325 Chapter 19 MapInfo Users ● 2: Open ER Mapper algorithm files Add a third image (algorithm) showing topography 1 Click the Open Algorithm button on the MapImagery toolbar (or select MapImagery > Open Algorithm). The files in the ‘Classification_Display’ directory should be displayed. 2 Open the ‘examples\Data_Types\Digital_Elevation’ folder. A list of ER Mapper algorithm (.alg) files appears. These algorithms all show different ways displaying and processing digital elevation model (DEM) data files. 3 Double-click on the file ‘Colordrape.alg.’ 4 The correct MapInfo projection parameters are displayed, then click OK. MapImagery displays a color shaded relief (or “colordrape”) image of the same area of San Diego. Colors represent elevation (reds are highest) and the shading effect highlights topographic features such as hills and valleys. This image is illuminated from the northeast, so shadows appear on the southwest side of terrain features. ER Mapper has a built-in “realtime shading” feature that lets you interactively change the shading parameters without creating output files. View the three images (layers) in the mapper 1 Click the Layer Control Layer Control). button on the Main toolbar (or select Map > 2 In the Layer Control dialog, turn off the Visible checkboxes for the ‘Colordrape’ and ISOCLASS_classification’ layers, then click OK. Turn off Visible checkbox for layers MapImagery redisplays the Brovey Transform algorithm. 3 If desired, repeat step 2 to view other images (turn on only the one you want, then click OK). 326 Enterprise Wide Imagery Chapter 19 MapInfo Users ● 3: Overlay MapInfo vector data 4 If desired, save your workspace using File > Save Workspace. 5 Select File > Close All to close any open tables. 3: Overlay MapInfo vector data Objectives Learn to overlay MapInfo vector and point table data on an ER Mapper algorithm image. In this case, you will display a world shaded relief image generated by an ER Mapper algorithm, then overlay MapInfo data of a Lat/Long grid, world capitals, and country borders. Open an ER Mapper world topography algorithm 1 Click the Open Algorithm button on the MapImagery toolbar (or select MapImagery > Open Algorithm). 2 Backup to the ‘examples’ folder, open the ‘applications’ folder, then open the ‘World_Topography’ folder. A list of ER Mapper imagery (.ers) and algorithm (.alg) files appears. 3 Double-click on the ‘World_Topography.alg’ file. 4 If you see a message asking to overwrite the previous .tab file, click Yes. 5 Select the correct MapInfo projection items (as follows), then click OK: • MapInfo Category–>Longitude / Latitude • MapInfo Category Members–>Longitude / Latitude • MapInfo Units–degrees MapImagery displays a color shade relief image (a “colordrape”) of the world. Colors of the land areas represent elevation (magenta are the highest, red are the lowest). Ocean areas are colored blue, and bathymetric features such as mid-ocean ridges are shown by the shading effect. Note: When displaying data that is in a Longitude Latitude coordinate system, it is important to select ‘degrees’ as the map projection units. This lets you overlay any other data that is also stored in degrees. View Longitude Latitude coordinates on the image 1 Select Map > Options. 2 On the Map Options dialog, select degrees for ‘Coordinate Units.’ Enterprise Wide Imagery 327 Chapter 19 MapInfo Users ● 3: Overlay MapInfo vector data 3 Under ‘Display in Status Bar,’ click ‘Cursor Location.’ Then click OK. 4 Move the cursor around inside the satellite image. Longitude Latitude coordinates appear in the Status Bar. (Negative Longitudes indicate the western hemisphere, and negative Latitudes indicate the southern hemisphere.) Overlay a Longitude Latitude coordinate grid 1 Select File > Open Table. 2 On the Map Options dialog, open the ‘WORLD’ directory (under the MapInfo ‘Data’ directory). 3 Double-click on the ‘GRID15.TAB’ file. MapInfo overlays a Longitude Latitude grid (graticule) with a 15-minute grid spacing. Overlay a table of world capital cities 1 Select File > Open Table. 2 Double-click on the ‘WORLDCAP.TAB’ file. MapInfo overlays the locations of world capital cities. 3 Click the Layer Control button on the Main toolbar (or select Map > Layer Control). Turn on auto labelling, then click OK. Turn on Auto Label MapInfo redisplays the world map with labels (city names) plotted next to the symbols. (If desired, you can make the labels bigger, change fonts, and so on by selecting Layer Control again and clicking Labels...). 328 Enterprise Wide Imagery Chapter 19 MapInfo Users ● 3: Overlay MapInfo vector data Overlay a table of vector country borders 1 Select File > Open Table. 2 Double-click on the ‘WORLD.TAB’ file. MapInfo overlays the borders of countries on the world map. Turn off the GRID15 and WORLDCAP layers 1 Click the Layer Control button again. Turn off the ‘GRID15’ and ‘WORLDCAP’ layers, make the ‘WORLD’ layer editable, then click OK. Turn off display of GRID15 and WORLDCAP Make WORLD layer editable MapInfo redisplays the map without the grid and capital cities layers. Make the Africa country border polygons transparent 1 Click the Marquee Select button on the Main toolbar, then drag a selection box around the continent of Africa. MapInfo selects all the polygons in your selection marquee. 2 Click the Region Style > Region Style). button on the Draw toolbar (or select Options 3 On the Region Style dialog, select the ‘Pattern’ of ‘None,’ then click OK. The selected region polygons redisplay without the fill pattern, so you can see the country borders in relation to the ER Mapper world topography image. 4 Click Zoom-in on the Main toolbar, then drag a box around the African continent to zoom in on it. Enterprise Wide Imagery 329 Chapter 19 MapInfo Users ● 4: MapImagery settings and options Query the country data or go to other areas of the world 1 If desired, use the MapInfo query tools to get information about the countries, or follow the same steps as above to make country borders for other regions transparent. 2 (Optional.) Save your workspace using File > Save Workspace. 4: MapImagery settings and options Objectives Learn to understand the way MapImagery handles and displays imagery, and how to setup default options to control the way images are displayed and printed in MapInfo. (There are no exercises here, only information.) Table (.tab) files created by MapImagery When you open an ER Mapper imagery or algorithm file (or any other supported format), MapImagery automatically creates a MapInfo table (.tab) file for the image. The table file contains information on the map projection, image extents, viewing resolution, and other information MapInfo needs to properly display the image. When you open an image or algorithm file that was already opened in the past, MapImagery prompts you to overwrite the previously created table file in case you have changed any parameters since then. You would want to overwrite the existing table file in the following cases: • You selected the wrong map projection information the first time. Click Yes to overwrite the existing table file for the image, and select the correct projection information for the future. • You change the ‘Supersampling Factor’ on the MapImagery Options dialog’s Supersampling tab. This option lets you manipulate the quality of images within MapInfo, but is also tied to the image extents and coordinates saved in the table file. If you change the supersampling factor, you must regenerate the table files for all imagery files you opened in the past. Click Yes to overwrite the existing table file for the image to update the supersampling setting. (If you do not overwrite the existing table file, your image will display but the map coordinates will be wrong, so this is very important.) Algorithm (.alg) files created by MapImagery When you open an ER Mapper imagery (.ers) or other supported image file, MapImagery automatically creates an ER Mapper-format algorithm file for the image (in addition to a MapInfo table file). The algorithm file tells MapImagery how to display the image file, and is independent from the image file itself. 330 Enterprise Wide Imagery Chapter 19 MapInfo Users ● Choosing map projection information When you open an image file that was already opened in the past, MapImagery prompts you to overwrite the previously created algorithm file. You should do this if you want to change the contrast enhancement option you selected the first time you opened the image. Otherwise, you do not need to overwrite it. Choosing map projection information When you open an ER Mapper or other image file for the first time, or when you choose to overwrite an existing table (.tab) file, you are presented with MapInfo projection options. These options let you choose the correct map projection and coordinate units, and these are important to make sure that georeferenced images display with correct coordinates in MapInfo. Since the image often originated in ER Mapper, it usually has georeferencing information attached to it (stored in the .ers header file). You need to match the ER Mapper projection information to the equivalent information in MapInfo. Once you do this one time for a given projection type, MapImagery remembers this setting and will automatically set the MapInfo defaults for you when you open another image that has the same ER Mapper projection parameters. To match the ER Mapper projection information to the MapInfo equivalent, examine the ER Mapper information at the top, then make the appropriate selections from MapInfo projection database: ER Mapper datum, projection, units Select corresponding MapInfo Category, Member and Units Enterprise Wide Imagery 331 Chapter 19 MapInfo Users ● The Supersampling setting The Supersampling setting When you open an ER Mapper or other image file, MapImagery processes and displays the image data at a predefined resolution. This is called supersampling, and is controlled by the ‘Supersampling Factor’ on the MapImagery Options dialog’s Supersampling tab. For example, if you set supersampling to 8, then an 8x8 pixel area is displayed for every underlying pixel. You should set the supersampling factor according to these guidelines: • Use lower values to speed display of very large images, or mosaic algorithms containing many images. Lower values may not produce optimal hardcopy prints however. • Use higher settings to improve detail in on the screen when smoothing is enabled in the ER Mapper algorithm, and when hardcopy printing from MapInfo. Contrast enhancement options When you open an ER Mapper imagery (.ers) file and are prompted to create an algorithm for it, clicking Yes displays the Choose Algorithm Style dialog. This dialog lets you choose how contrast will be adjusted to improve the image presentation: • Create an algorithm with No contrast stretching–This displays the image without enhancing the contrast. Use this option if you wish to view the image without enhancement or if your image is already contrast enhanced. Non-photographic images like digital terrain models (DEMs) may look better when displayed this way, or may look better with contrast stretching. • Create an algorithm with Automatic contrast stretching–This displays the image with a linear contrast enhancement to improve color and brightness. Use this option for images that are not already contrast enhanced (like satellite images) or if your images look too dark or light or lack contrast using the no stretching option. The type of contrast enhancement applied is a linear contrast stretch that “clips” (or saturates) a certain percentage of brightest and darkest pixels at the high and low ends of the image histogram. The amount of clipping (percentage) is set in the MapImagery Options dialog’s Algorithm Generation tab. A 99% clip applies a mild contrast enhancement that look good on many types of images. If the image still lacks contrast, choose 97.5. (The smaller the percentage the more contrast, but experiment for best results.) Note: The algorithm file contains the contrast enhancement settings, so the setting you choose is automatically applied to all images you open (if you choose to overwrite an existing algorithm file). If you have a problem image, try smaller percent values for that image, then set the default back to 99% so it is used in the future. 332 Enterprise Wide Imagery Chapter 19 MapInfo Users ● Contrast enhancement options Close MapInfo 1 Close MapInfo by clicking the Close or selecting File > Exit. What you learned... button on the application window After completing these exercises, you know how to perform the following tasks in MapInfo using the free MapImagery plug-in: • Display an ER Mapper image file (.ers) as a MapInfo table file • Display an ER Mapper algorithm file (.alg) as MapInfo table file • Overlay MapInfo vector and tabular table data on an ER Mapper image • Choose MapImagery setup options to control image display and printing Enterprise Wide Imagery 333 Chapter 19 MapInfo Users ● Contrast enhancement options 334 Enterprise Wide Imagery 20 Autodesk World Users This chapter explains how to use the capabilities of the Autodesk World software to display ER Mapper imagery and algorithm files as backdrops. This chapter covers steps similar to those described in the Autodesk World software documentation and help system. Note: You must have a licensed copy of Autodesk World 2.0 to run this tutorial. You do not need to have a copy of ER Mapper installed, but this is recommended to gain access to sample ER Mapper imagery and algorithms used in the following tutorial. (You can order the free ER Mapper installation CD-ROM from www.ermapper.com.) About Autodesk World’s ER Mapper image viewing engine As imagery data sources become more important for GIS applications, the need to efficiently process, enhance and display large image files also becomes more important. Many projects require the analysis of vector GIS drawing data by presenting it over image backdrops that show a “real world” perspective. For example, you gain a better understanding of parcel ownership, tax zones, zip codes, and many other vector entities by overlaying them on an airphoto showing landuse and buildings. Enterprise Wide Imagery 335 Chapter 20 Autodesk World Users ● Using Autodesk World with ER Mapper Autodesk World incorporates the ER Mapper viewing engine, which lets you incorporate nearly any type of image data into your projects. These include aerial photographs, satellite images, digital elevation (topography) images and many more image types. By incorporating the ER Mapper image viewing engine, Autodesk World users are not restricted by limited image handling capabilities as are some other GIS products. You can directly display ER Mapper imagery and algorithms, and image formats with location information such as GeoTIFF, ESRI/GeoSPOT HDR, and others. In addition, you can experience the full power of ER Mapper algorithms from within Autodesk World. Using Autodesk World with ER Mapper By using Autodesk World in conjunction with a copy of the ER Mapper software, you gain access to the extensive capabilities of this powerful integrated mapping and image processing product, including: • Import and display over 100 different image formats • Use advanced image processing functions such as contrast enhancement, multispectral classification, vegetation indexes, color shaded reliefs, filtering, merging images, and many others. • Directly read TIFF, GeoTIFF, Windows BMP, ER Mapper images and algorithms, ESRI BIL, SPOTView and Universal Data Format (UDF) imagery without the need for import or conversion • Easily view the entire project area in one image–no limits on image file sizes • Geocode, orthorectify or reproject imagery easily to precisely register with GIS vector drawing data • Automatically display, mosaic and color balance numerous images • Combine imagery, vector and tabular data from any number of sources • Create and edit vector data over imagery backdrops, and highlight features of interest and save them as vectors with ER Mapper’s raster to vector conversion tools Hands-on exercises These exercises show you how to use the ER Mapper image display capabilities within Autodesk World. What you will learn... After completing these exercises, you will know how to perform the following tasks in Autodesk World: • 336 Insert an ER Mapper image into an Autodesk World drawing Enterprise Wide Imagery Chapter 20 Autodesk World Users ● 1: Inserting an ER Mapper image Before you begin... • Enhance the image contrast and apply image smoothing • Choose equivalent coordinate systems in Autodesk World and ER Mapper • Insert an ER Mapper smart data algorithm into an Autodesk World drawing • Stack and change the order of multiple images in a drawing • Combine image and vector drawing data in a project Before beginning these exercises, you must have installed Autodesk World version 2.0 or higher on your system. These exercises use sample ER Mapper imagery and algorithm files from the ER Mapper installation CD-ROM. You may also follow the general procedures using your own ER Mapper imagery (.ers) or algorithm (.alg) files. 1: Inserting an ER Mapper image Objectives Learn to insert ER Mapper imagery (.ers) files into an Autodesk World drawing. (You can also use the following procedure to open any image formats directly supported by ER Mapper, including TIFF and GeoTIFF, Windows BMP, SPOTView, ESRI BIL, and others.) The ER Mapper imagery (.ers) format stores image data in its “raw” form. That is, the imagery may not be processed or enhanced for best presentation. When you insert an ER Mapper image, Autodesk World gives you options to enhance the imagery as it is loaded and displayed. Start Autodesk World 1 Start the Autodesk World software on your system. 2 Click the Maximize button in the upper-right corner of the Autodesk World application window (if it is not already maximized). Autodesk World expands to fill your desktop. You should start with a new project. 3 If you do not already have a new (empty) project open, start one by choosing File > New, then clicking Blank Template. 4 If the Display Manager window is open, close it. Enterprise Wide Imagery 337 Chapter 20 Autodesk World Users ● 1: Inserting an ER Mapper image Set the coordinate system for the new project All projects have an associated coordinate system. If you are beginning with an ER Mapper image that has location information as your “basemap,” you should choose the same coordinate system as the image for your project. 1 Choose File > Properties. 2 Click the Coordinate System tab, then click Change.... 3 On the Project Detail dialog, select UTM27-11 from the Coordinate System list. This selection specifies a coordinate system using the NAD27 datum and the Universal Transverse Mercator (UTM) map projection (zone 11 in the northern hemisphere). The coordinate units are meters, so locations are defined in meters of Eastings and Northings. 4 Click OK on the Project Detail dialog, then click OK on the Project Properties dialog. This coordinate system is now assigned to your project, and is the same one used by the ER Mapper images you will use in the upcoming examples. Insert an ER Mapper-format (.ers) image into the drawing 1 Choose Insert > ER Mapper Image. 2 On the Insert ER Mapper Image dialog, click the Image tab, then click Browse. 3 Double-click on the folder where ER Mapper is installed, then open the ‘examples/Applications/Airphoto/1_Geocoding’ folder. A list of ER Mapper algorithm (.alg) files appears. 4 Turn off the ‘Bilinear Smoothing’ and ‘Contrast Stretching’ options. (These will be explained later). 5 Click on the ‘Files of Type’ list to view the different image formats. You can insert ER Mapper algorithms (.alg) and datasets (.ers), as well as TIFF, BMP, ARC/INFO-GeoSPOT HDR, and others. 6 From the ‘Files of Type’ list, select Datasets (*.ers). 7 Double-click on the file ‘San_Diego_Airphoto_34_rectified.ers.’ 8 Click the Zoom All button or choose View > Zoom All. Autodesk World displays a color aerial photograph of the downtown San Diego, California area. This image has been rectified to the NAD27 datum and UTM zone 11 map projection, so it has geographic location information (true earth coordinates). 338 Enterprise Wide Imagery Chapter 20 Autodesk World Users ● 1: Inserting an ER Mapper image Zoom in to a small area to see the pixel resolution 1 Click the Zoom Window button (or choose View > Zoom Window), then drag a very small box over part of the photo to zoom into it. If needed, do this again until you can see the small square areas that comprise the digital image. These squares are called pixels (for picture elements), and are roughly equivalent to the smallest object you can see in the photo. In this image, each pixel is about 1 meter in diameter, which is termed “1-meter resolution.” Reload the image with smoothing and contrast enhancement 1 Choose Insert > ER Mapper Image. 2 This time turn on the ‘Bilinear Smoothing’ and ‘Contrast Stretching’ options. 3 From the ‘Files of Type’ list, select Datasets (*.ers). 4 Click Browse, then double-click on the file ‘San_Diego_Airphoto_34_rectified.ers’ again to reload it. The airphoto image redisplays with improved contrast and a “smoother” appearance. • Bilinear Smoothing improves the display of zoomed images or large hardcopy prints by averaging the pixel values to remove the “blocky” look you saw previously when smoothing was not turned on. (You only see the effect of smoothing when you zoom into the pixel level.) • Contrast Stretching generally improves the image color and presentation by increasing contrast between the light and dark areas. This option is recommended when inserting most image files, otherwise they may lack contrast or look too dark or light. Zoom in and out in the image 1 Click the Zoom All button or choose View > Zoom All. The image zooms out to display the full extents of the airphoto. 2 Click the Zoom Window button (or choose View > Zoom Window), then drag a box over the central part of the photo to zoom into it. 3 Click the Zoom In or Zoom Out to zoom in or out by fixed amounts. buttons, then click on the image 4 When finished, click the Zoom All to zoom out to the full image extents. button or choose View > Zoom All Enterprise Wide Imagery 339 Chapter 20 Autodesk World Users ● 1: Inserting an ER Mapper image 5 Once again, click Zoom Window of the photo to zoom into it. , then drag a box over the central part Pan (scroll) the image 1 Click the Pan 2 Points button (or choose View > Pan). Click on one point in the photo, then click on a second point. The image pans (scrolls) in the direction and distance you defined by your two points. This is one way to view adjacent areas of an image. 2 Drag the scroll bars on the right or lower areas of the project window. The image pans in the direction you drag the scroll bar. View geographic coordinates on the image 1 Choose Tools > Format Options. 2 Click the Coordinate tab, select Latitude Longitude from the ‘Display Type’ list, then click OK. 3 Point to various locations in the image. The Latitude Longitude coordinates of the current cursor location appear in the status bar. (The format is decimal degrees, and negative longitudes indicate the western hemisphere.) 4 Choose Tools > Format Options again. 5 Click the Units tab, then select m from the ‘User Unit’ list. 6 Click the Coordinate tab, select Projection Coordinate from the ‘Display Type’ list, then click OK. 7 Point to various locations in the image. The UTM map projection coordinates appear in the status bar. (The format is meters of Northings and Eastings in UTM zone 11.) Close the project 1 Choose File > Close. When asked to save the contents or save changes, click No. 340 Enterprise Wide Imagery Chapter 20 Autodesk World Users ● 2: Inserting multiple coregistered images 2: Inserting multiple coregistered images Objectives Learn to insert ER Mapper smart data algorithm (.alg) files into an Autodesk World drawing. Also learn to “stack” multiple images covering the same geographic area, and to turn images on/off and move them to the top of the display. An ER Mapper algorithm is a list of processing steps or instructions ER Mapper uses to transform a raw image file into a final, enhanced image on your screen or printer. An algorithm does not contain the actual image data, but only stores references to it. (The actual image data is stored in ERS or other files.) When you insert an ER Mapper algorithm into an Autodesk World drawing, it follows the steps in the algorithm and displays the finished image accordingly. Note: In order to precisely overlay multiple images (as you will do next), the images must have the same coordinate system information. Start a new project 1 Start a new project by choosing File > New, then clicking Blank Template. Set the coordinate system for the new project 1 Choose File > Properties. 2 Click the Coordinate System tab, then click Change.... 3 On the Project Detail dialog, select UTM27-11 from the Coordinate System list. Set the data viewing coordinate type 1 Choose Tools > Format Options. 2 Click the Units tab, then select m from the ‘User Unit’ list. 3 Click the Coordinate tab, select Projection Coordinate from the ‘Display Type’ list, then click OK. The display coordinates are now set to the units of the map projection (meters of Northings and Eastings in UTM zone 11.) Enterprise Wide Imagery 341 Chapter 20 Autodesk World Users ● 2: Inserting multiple coregistered images Create drawing layers to display three different images 1 Choose File > Data Manager. The Data Manager dialog lets you add and controls layers in your drawings. 2 Click the Drawing Data tab to view drawing layers Drawing Data tab 3 Right-click on ‘Drawing1’ then select New Layer. A new ‘Layer1’ is added in addition to the default ‘0’ layer. 4 Click on the ‘Layer1’ text and change it to satellite image. 5 Right-click on ‘Drawing1’ again, select New Layer, then name the new layer landuse image. 6 Right-click on ‘Drawing1’ again, select New Layer, then name the new layer terrain image. You should have three new labelled layers (the order does not matter for now): new drawing layers where images will be inserted 7 Click Close on the Data Manager dialog box. Insert an ER Mapper satellite image algorithm (.alg) file 1 Choose Insert > ER Mapper Image. 2 On the Insert ER Mapper Image dialog, click the Image tab, then click Browse. 3 On the Insert Picture dialog, select Algorithms (*.alg) from the ‘Files of Type’ list. 342 Enterprise Wide Imagery Chapter 20 Autodesk World Users ● 2: Inserting multiple coregistered images Note: When you insert an algorithm file, the Bilinear Smoothing and Contrast Stretching options are disabled because the algorithm file contains the contrast enhancement and other information. 4 Double-click on the folder where ER Mapper is installed, then open the ‘examples/Functions_And_Features/Data_Fusion’ folder. A list of ER Mapper algorithm (.alg) files appears. These algorithms all show different ways of merging (or “fusing”) two different images into one picture. 5 Double-click on the file ‘Brovey_Transform.alg.’ Tip: You need a license for ER Mapper to create algorithms, but you can insert and view them in directly in Autodesk World. This means that anyone using ER Mapper can create algorithms and send them to you for use in your projects. 6 Click General tab, then select satellite image from the ‘Layer’ list. select layer where image will be inserted You can insert ER Mapper algorithms (.alg) and datasets (.ers), as well as TIFF, BMP, ARC/INFO-GeoSPOT HDR, and others. 7 Click OK to insert the image into the drawing layer, then click Zoom All or choose View > Zoom All to display it. Autodesk World displays a color image of the San Diego, California area. This is a merge of a Landsat TM satellite image (bands 5, 4 and 2) and a SPOT Panchromatic satellite image. By merging the two types of data, you get the high spatial detail provided by the SPOT Pan image (10-meter resolution) with the multispectral color information provided by the Landsat TM image (seven bands at 30-meter resolution). Enterprise Wide Imagery 343 Chapter 20 Autodesk World Users ● 2: Inserting multiple coregistered images The Brovey Transform is a mathematical way of combining the two images that also greatly enhances the color. Merging or fusion techniques like this are used to create to combine the strengths of different satellite sensors and create up-to-date views of the earth’s surface. 8 Click Zoom Window (or choose View > Zoom Window), then drag a box over the central part of the image to zoom into it. The image shows a high resolution, color-enhanced view of the area. The ER Mapper algorithm creates this image interactively from the two separate Landsat and SPOT satellite imagery files. (The Brovey Transform technique usually requires up to three intermediate image files to be created when using traditional imaging software, but ER Mapper performs the processing in real time from the two source images without creating intermediate files.) 9 When finished, click the Zoom All to zoom out to the full image extents. button or choose View > Zoom All Insert a second algorithm image showing thematic landuse 1 Choose Insert > ER Mapper Image. 2 On the Insert ER Mapper Image dialog, click the Image tab, then click Browse. 3 Double-click on the folder where ER Mapper is installed, then open the ‘examples/Functions_And_Features/Classification_Display’ folder. A list of ER Mapper algorithm (.alg) files appears. These algorithms all show different ways of merging (or “fusing”) two different images into one picture. 4 Double-click on the file ‘Isoclass_classification.alg.’ 5 Click General tab, then select landuse image from the ‘Layer’ list. 6 Click OK to insert the image into the layer and display it. Autodesk World displays a thematic color image of the same area of San Diego. Different colors correspond to different types of landuse in the area. This image was created from a 1985 Landsat TM satellite image using ER Mapper’s ISOCLASS unsupervised classification feature. Classification groups pixels with similar spectral values into classes that can represent different types of landuse or land cover. Insert a third algorithm image showing terrain and topography 1 Choose Insert > ER Mapper Image. 2 On the Insert ER Mapper Image dialog, click the Image tab, then click Browse. 344 Enterprise Wide Imagery Chapter 20 Autodesk World Users ● 2: Inserting multiple coregistered images 3 Double-click on the folder where ER Mapper is installed, then open the ‘examples/Data_Types/Digital_Elevation’ folder. These algorithms all show different ways displaying and processing digital elevation model (DEM) data files. 4 Double-click on the file ‘Colordrape.alg.’ 5 Click General tab, then select terrain image from the ‘Layer’ list. 6 Click OK to insert the image into the layer and display it. Autodesk World displays a color shaded relief (or “colordrape”) image of the same area of San Diego. Colors represent elevation (reds are highest) and the shading effect highlights topographic features such as hills and valleys. This image is illuminated from the northeast, so shadows appear on the southwest side of terrain features. ER Mapper has a built-in “realtime shading” feature that lets you interactively change the shading parameters without creating output files. View any of the three images It is often helpful to “stack” multiple different types of images of the same geographic area (as you did here). Images are treated as CAD entities in Autodesk World, so you stack multiple images the same way you stack vector data–put each image on a separate layer and just turn the layers on and off. You can also control the redraw order (which image is on top) of the layers by dragging them around in the Display Manager to achieve the desired ordering. 1 Choose View > Display Manager. 2 In the Display Manager dialog, turn off the Entity Style checkboxes for the ‘landuse image’ and the ‘terrain image.’ turn off landuse and terrain images 3 Press F5 (or select View > Refresh View). The merged color satellite image displays. 4 In the Display Manager, turn off the ‘satellite image’ checkbox and turn on the ‘landuse image’ checkbox, then press F5. Enterprise Wide Imagery 345 Chapter 20 Autodesk World Users ● 3: Combining image and drawing data 5 View any of the three images by turning on its layer and turning the other two off, then pressing F5 to refresh the view. These simple examples show how you can use the power of ER Mapper algorithms to showing various “views” of your image data as backdrops for analysis of your vector data in Autodesk World. Close the project 1 If desired, save your project using File > Save As.... 2 Choose File > Close to close the project. 3: Combining image and drawing data Objectives Learn to use both image (raster) and drawing (vector) data in a project. In this example, you will overlay a network of roads on a small aerial photograph image. Note: Before beginning, make sure the ‘AutoCAD DXF’ GDX driver has been added to Autodesk World. Consult your Autodesk World documentation or on-line help if needed to do this before continuing. Start a new project 1 Start a new project by choosing File > New, then clicking Blank Template. Set the coordinate system for the new project 1 Choose File > Properties. 2 Click the Coordinate System tab, then click Change.... 3 On the Project Detail dialog, select UTM27-11 from the Coordinate System list. Set the data viewing coordinate type 1 Choose Tools > Format Options. 2 Click the Units tab, then select m from the ‘User Unit’ list. 3 Click the Coordinate tab, select Projection Coordinate from the ‘Display Type’ list, then click OK. 346 Enterprise Wide Imagery Chapter 20 Autodesk World Users ● 3: Combining image and drawing data The display coordinates are now set to the units of the map projection (meters of Northings and Eastings in UTM zone 11.) Create a drawing layer to display an airphoto image 1 Choose File > Data Manager. 2 Click the Drawing Data tab to view drawing layers. 3 Right-click on ‘Drawing1’ then select New Layer. 4 Click on the ‘Layer1’ text and change it to airphoto image. Insert an ER Mapper airphoto image into the drawing 1 Choose Insert > ER Mapper Image. 2 On the Insert ER Mapper Image dialog, click the Image tab, then click Browse. 3 From the ‘Files of Type’ list, select Datasets (*.ers). 4 Double-click on the folder where ER Mapper is installed, then open the ‘examples/Shared_Data’ folder. 5 Double-click on the file ‘Airphoto.ers.’ 6 Turn on the ‘Bilinear Smoothing’ and ‘Contrast Stretching’ options. 7 Click General tab, then select airphoto image from the ‘Layer’ list. 8 Click OK to insert the image into the layer and display it. 9 Click the Zoom All button or choose View > Zoom All. Autodesk World displays a color aerial photograph of small part of the downtown San Diego, California area. Open a DXF drawing to overlay on the airphoto image 1 Choose File > Data Manager. 2 Click the Drawing Data tab, then click the Open Drawing button. 3 From the ‘Files of Type’ list, select Autodesk DXF File (*.dxf). Note: If ‘Autodesk DXF’ does not appear as a filetype option, you need to install the AutoCAD DXF GDX driver. 4 Open the ER Mapper ‘examples/Data_Types_AutoCAD_DXF’ folder. Enterprise Wide Imagery 347 Chapter 20 Autodesk World Users ● 3: Combining image and drawing data 5 Double-click on the file ‘Roads.dxf.’ The DXF file is added as a layer in your project. 6 Click Close on the Data Manager, then click the Zoom All choose View > Zoom All. button or Autodesk World displays a vector road network over the airphoto image. This is a very simple example of combining image and drawing (vector) data. This is the most common way you will be using the ER Mapper image handling capabilities within Autodesk World. Close the Autodesk World application 1 If desired, save your project using File > Save As.... 2 Close Autodesk World by clicking the Close window or selecting File > Exit. What you learned... 348 button on the application After completing these exercises, you know how to perform the following tasks in Autodesk World: • Insert an ER Mapper image into an Autodesk World drawing • Enhance the image contrast and apply image smoothing Enterprise Wide Imagery Chapter 20 Autodesk World Users ● 3: Combining image and drawing data • Choose equivalent coordinate systems in Autodesk World and ER Mapper • Insert an ER Mapper smart data algorithm into an Autodesk World drawing • Stack and change the order of multiple images in a drawing • Combine image and vector drawing data in a project Enterprise Wide Imagery 349 Chapter 20 Autodesk World Users ● 3: Combining image and drawing data 350 Enterprise Wide Imagery A System setup This appendix describes the steps needed to install the training datasets so that students can perform the hands-on exercises in this manual. Most of the hands-on exercises in this workbook require students to access the airphoto example images supplied with ER Mapper 6. Note: Before beginning the installation, you must have at least 450 Mb of free disk space (310 Mb for the files on the CD-ROM and 140 Mb additional space for files to be created during the exercises.) Windows installation of training datasets 1 Create a new directory named “airphoto_training” inside the directory ERMAPPER/dataset. This is the directory where the training datasets are assumed to reside. 2 Use the Windows File Manager or Explorer to copy all the files on the CDROM into the “ERMAPPER/dataset/airphoto_training” directory. The datasets are now accessible to users performing the exercises. The datasets are now accessible to users performing the exercises. ER Mapper Workbook - Airphoto Mosaic Applications 351 Appendix A#System setup z Windows installation of training datasets 352 ER Mapper Workbook - Airphoto Mosaic Applications B Reference texts This appendix provides references to textbooks that describe uses, interpretation and processing of airphotos. These books will be very helpful to those who want to learn more about interpretation of airphotos and their applications, and also contain many references to other sources of data and publications. Avery, E. A., and G. L. Berlin. 1992. Fundamentals of Remote Sensing and Airphoto Interpretation, Macmillan Publishing Company, New York, N.Y, USA. Faulkner, E. 1995. Aerial Mapping: Methods and Applications, CRC Press, Boca Raton, Fla. USA. Lillesand, T. M., and R. W. Kiefer. 1991. Remote Sensing and Image Interpretation, John Wiley and Sons, Inc. New York, N.Y, USA. ER Mapper Workbook - Airphoto Mosaic Applications 353 Appendix # z 354 ER Mapper Workbook - Airphoto Mosaic Applications Index A airphotos annotating 227 color balancing 157 composing maps 217 contrast enhancement 59 exporting 245 haze (blue cast) removal 172 importing 54 mosaic creation 20, 141 rectifying (geocoding) 89 saving and exporting 253 scanning 19 scanning and display 74 types 18 viewing overlap areas 181 Algorithm dialog overview 51 Algorithm Geoposition Extents dialog box Extents options 204 Geolink options 263 Zoom options 43 algorithm layers. See layers algorithms basic concepts 28, 49, 74 changing color table 58 commenting 69 ER Mapper Workbook - Airphoto Applications 355 Index creating automatically 50 creating manually 50 entering description 69, 87 mosaics 143, 160, 166, 208 opening 38 plotting as map object 241 printing 242 process diagram 52 saving 69, 87, 155, 170, 194, 199, 201, 205, 214 using as templates 51 annotation. See map composition ArcView GIS 301 ER Mapper imagery extension 301 ArcView GIS ER Mapper plug-in how to obtain 302 loading 303 opening ER Mapper images 304 overview 301 tutorial 303 using with ER Mapper 302 vector data 310 zoom and pan 306, 315 autoclip transform concept 65 setting percent clip 203 Autodesk products save/export from ER Mapper 255 Autodesk World 335 bilinear smoothing 339 contrast enhancement 339 inserting ER Mapper images 337 setting coordinate system 338 tutorial 335 using images and drawing data 346 using multiple images 341 C camera calibration report 113 Camera file 122 Camera Wizard 117 Camera attributes page 119 Camera identification page 118 Fiducial point offsets page 121 Focal length 119 356 ER Mapper Workbook - Airphoto Applications Index Number of Fiducial points page 120 X offset to principal point 119 Y offset to principal point 119 clip masks for maps 224 Color (RGB) 247 Color Balancing Wizard for Airphotos 209 Color Mode relation to layer type 86 color tables 58 comments defining 69 viewing 71 composing maps. See map composition compression of imagery 280 Compression Wizard Actual compression ratio 249 Compress to Grayscale or RGB 247 saving the compressed image 247 Target Compression ratio 248 contrast enhancement 59 automatic 67 manual 62 D data structure diagram 51 dialog boxes 32 text entry 34 displaying datasets 57 E Enterprise wide imagery 277 definition 278 free ER Mapper plug-ins 279 problems 277 solutions 279 ER Mapper compression technology 280 dialog boxes 32 file choosers 33 help system 34 introduction 17, 317 main menu 31 product capabilities 279 ER Mapper Workbook - Airphoto Applications 357 Index raster datasets 22 toolbars 31 user interface 29 vector datasets 22 ER Mapper plug-ins for ArcView GIS 301 for MapInfo (MapImagery) 317 for office applications 291 ER Viewer 283 how to obtain 283 measuring distances 287 opening images 285 panning (roaming) images 287 printing images 289 product capabilities 283 tutorial 284 using as OLE server 291 viewing image properties 289 zooming (magnifying) images 286 ESRI ArcView GIS 301 ESRI products save/export from ER Mapper 255 exporting data 25, 253 resampling cell size 261, 264, 269 to Autodesk products 255 to ESRI .hdr format 264 to MapInfo 255 to TIFF format 266 F feathering images 180, 192 fiducial points 123 file chooser dialog boxes 33 free imagery plugins for GIS and office applications 245 G Gaussian equalization 66 setting std. dev. 67 GCP Edit dialog box 130 GCP Setup tab 126 Geocode Output Extents dialog 132 geocoding advanced orthorectification 113 358 ER Mapper Workbook - Airphoto Applications Index camera calibration report 113 Compute FROM function 101 GCP display options 103 picking first 4 GCPs 97 picking points from overview 101 RMS errors 100 Geocoding Wizard 113 Auto zoom 129 Auto Zoom option 103 Calculate from point button 101 Cell Attributes box 107 Exterior Orientation Setup tab 135 Fiducial Point Edit tab 122, 135 GCP Edit tab 98, 103, 127 GCP Setup tab 126 Ortho Setup tab 116, 135 Orthorectify using exterior orientation 116, 134 Output Coordinate Space dialog 127 Rectify tab 106, 131, 137 resampling 107 Use a DEM file as height 117 Zoom to current GCP button 103 geocoding. See rectification GID Australia 317 GIS systems exporting images to 245 raster image formats 255 resampling cell size for 254 subsetting images for 254 using images in 253 graphics formats exporting to 25 using in map composition 241 ground control points adjusting 103 labelling 105 locking 105 overview 90 picking 98 saving to dataset 106 viewing error bars 103 H hardcopy printing 25 ER Mapper Workbook - Airphoto Applications 359 Index haze corrections 172 help system 34 histogram equalization 66 I Image Display and Mosaic Wizard 76, 160 Image Display and Mosaicing Wizard 149 image files. See raster datasets image processing concepts 25 enhancements 23 ER Mapper algorithms 27 traditional techniques 27 image rectification parameters 127 image windows closing 46 loading datasets 57 measuring distances 111 moving 39 moving to front 45 opening 38 panning with buttons 42 resizing 40 selecting current 46 shaping to fit image 152 using multiple windows 44 viewing coordinates 110 zooming with buttons 42 zooming with mouse 41 imagery compression 281 file formats 277 file sizes 277, 281 served over the internet 278, 279 sharing among applications 277 sharing via OLE 291 using in office applications 291 importing airphoto images 55 L Layer tab 52 layers 52 adding 83 360 ER Mapper Workbook - Airphoto Applications Index Annotation/Map Composition 217 changing type 84 deleting 83 dragging and dropping 147 duplicating 84 labelling 68 loading data into 82 moving between 85, 203, 204 moving up or down 81 selecting 79 selecting bands 84 setting display priority 147 shortcut menu 84, 147 with Color Mode 86 Line Style dialog box 228 loading datasets 57 OK vs Apply button 82 M magnifying images. See zooming map composition adding inset images 241 area of polygon 229 basic concepts 217 clip masks 224 deleting objects 230 drag and drop objects 237 drawing annotation 228 drawing map objects 234 duplicating (cloning) objects 231 Fast Preview option 238 importing graphics formats 241 importing text 241 length of line 228 object attributes 241 object selection tools 230 page background color 223 Page Relative option 241 Page Setup options 242 polygon attributes 229 polyline attributes 228 resizing/positioning objects 239 saving to disk 239 selecting multiple objects 231 ER Mapper Workbook - Airphoto Applications 361 Index selecting objects 228 setting map object attributes 225, 236 special features 241 text attributes 231, 232 map projections. See rectification 113 MapImagery plug-in 317 algorithm (.alg) files created by 330 commercial version 318 contrast enhancement 332 controlling image layers 326 free version 317 how to obtain 318 measuring distances 321 opening ER Mapper algorithms 322 opening ER Mapper images 320 overlaying vector data 327 setting image map projection 321, 331 table (.tab) files created by 330 tutorial 318 using with ER Mapper 318 viewing image coordinates 322 zoom and pan 321 MapInfo 317 export from ER Mapper 255 link with ER Mapper 255 MapImagery plug-in 317 measuring distances 111 mensuration 111 Microsoft Office applications 291 mosaicing 20 analyze images 209 basic steps 21 capabilities 142 creating algorithms 143, 208 display band 151 display method 151 feathering 210 file types 150 mosaic properties 150 requirements 141 RGB 123 154 setting display priority 142, 147 turning images on/off 147, 153 zooming to all datasets 146 mosaicking creating algorithms 160, 166 362 ER Mapper Workbook - Airphoto Applications Index viewing overlap areas 181 zooming to all datasets 164 mouse buttons 30 mouse pointer Hand mode 41 Pointer mode 110 shapes 30 Zoom mode 40 ZoomBox mode 41 O Object Linking and Embedding (OLE) 291 office applications using imagery in 291 OLE displaying images 294 drag and drop images 295 overview 292 tutorial 291 orthorectification Attitude kappa 114, 136 Attitude omega 113, 136 Attitude phi 114, 136 Camera Wizard 117 Exposure center X Y Z 136 exterior orientation 114, 116, 135, 136 fiducial points 124 Focal length 119 Scale 137 X offset to principal point 119 Y offset to principal point 119 P Page Setup dialog box 220 panning images with buttons 43 with mouse 41 polygon attributes 229 area measurement 229 color and shading 229 polyline attributes 228, 229 polylines color and style attributes 228 ER Mapper Workbook - Airphoto Applications 363 Index editing points 228 length (geographic units) 228 smoothing (spline) 228 Postscript files printing to 25 using in map composition 217 printing images 25, 242 process stream diagram 52 Pseudocolor color mode 58 R Raster Dataset dialog 82 Apply button 82 OK vs Apply buttons 82 raster datasets description 26 importing 22 mosaicing 177, 195, 207 mosaics 141 opening directly 75 raster images mosaicing 207 rectification 23 adjusting GCPs 103 Compute FROM function 101 GCP display options 103, 130 picking first 4 GCPs 97 picking points from overview 101 RMS errors 100 Red Green Blue (RGB) color mode 73 Refresh Image button 39 regions 177 defining 183 hidden stitch lines 178 naming 185, 187 referencing in formulas 189 RMS errors 100 S saving data 253 cropping/subsetting 254 for Autodesk products 255 for MapInfo 255 364 ER Mapper Workbook - Airphoto Applications Index in UDF format 257 resampling cell size 261, 264, 269 to ESRI .hdr format 264 to TIFF format 266 shortcut menus layers 147 surfaces 181 surfaces 52 changing color mode 181 expanding/contracting 80 shortcut menu 181 T tab pages 52 text attributes 231 Text Style dialog box 231 toolbars displaying 37 hiding 37 overview 31 using 37 Transform dialog box 60 transforms autoclipping 65, 203 Gaussian equalization 66 histogram equalization 66 viewing 60 viewing for other layers 85, 203, 204 U UDF images 257 V View Mode 52 vignetting 158 W warping images. See rectification 113 wavelet compression technology 245 ER Mapper Workbook - Airphoto Applications 365 Index wavelet image compression 280 windows. See image windows word processing inserting images via OLE 291 Z zooming images out to full extents 42, 44 to current dataset extents 148 to page extents or contents 227 to specific dataset extents 153 with buttons 43 with mouse 41 366 ER Mapper Workbook - Airphoto Applications