OrthoEngine Workbook Course Guide Version 10.1 Geomatica Version 10.1 2007 PCI Geomatics Enterprises Inc.. All rights reserved. COPYRIGHT NOTICE Software copyrighted by PCI Geomatics, 50 West Wilmot St., Suite 200, Richmond Hill, ON CANADA L4B 1M5 Telephone number: (905) 764-0614 RESTRICTED RIGHTS Canadian Government Use, duplication, or disclosure by the Government is subject to restrictions as set forth in DSS 9400-18 "General Conditions ­ Short Form ­ Licensed Software". U.S. Government Use, duplication, or disclosure by the Government is subject to restrictions set forth in subparagraph (b)(3) of the Rights in Technical Data and Computer Software clause of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software-Restricted Rights clause at 48 CFR 52.227-19 as amended, or any successor regulations thereto. PCI, PCI Geomatics, PCI and design (logo), Geomatica, Committed to Image-Centric Excellence, GeoGateway, FLY!, OrthoEngine, RADARSOFT, EASI/PACE, ImageWorks, GCPWorks, PCI Author, PCI Visual Modeler, and SPANS are registered trademarks of PCI Geomatics Enterprises, Inc. All other trademarks and registered trademarks are the property of their respective owners. PCI Geomatics i Table of Contents Introduction: OrthoEngine Workbook ............................................... 1 Exercise 1: Digital Airphoto Project .................................................. 3 Exercise 2: Satellite Orbital Modelling Project - SPOT .................. 27 Exercise 3: Rational Functions - QuickBird RPC Project .............. 51 Exercise 4: ASTER DEM Extraction and DEM Editing ................... 81 Exercise 5: Simple Math Modelling - Polynomial Project ............ 103 Exercise 6: Mosaic Only Project .................................................... 119 Exercise 7: Raw Image Mosaic Project ......................................... 133 Table of Contents ii PCI Geomatics PCI Geomatics 1 Introduction OrthoEngine Workbook Welcome to the second part of the Introduction to OrthoEngine training course. This training manual is written for new and experienced users of remote sensing and digital photogrammetry software. The OrthoEngine Workbook allows you to chose the type of math models and projects you are most likely to use in your work. Exercises This workbook has seven exercises, each with its own dataset: * 1 - Digital Airphoto Project * 2 - Satellite Orbital Modelling Project - SPOT * 3 - Rational Functions - QuickBird RPC Project * 4 - ASTER DEM Extraction and DEM Editing * 5 - Simple Math Modelling - Polynomial Project * 6 - Mosaic Only Project * 7 - Raw Image Mosaic Project The data you will use in this course can be found in the OE Data folder supplied on the accompanying CD. You should copy this data to your hard disk. OrthoEngine Workbook 2 PCI Geomatics Starting OrthoEngine Windows Systems To start OrthoEngine on Windows systems: 1. Click the Start button, click Programs, click PCI Geomatics, click Geomatica Vx.x and then click OrthoEngine. Alternatively, if the Geomatica Toolbar is running, click the OrthoEngine button. The OrthoEngine window opens. Unix Systems To start OrthoEngine on Unix systems: 1. Enter the Unix environment. 2. At the command prompt, type orthoeng. Alternatively, click the OrthoEngine icon on the Geomatica toolbar. Figure 1.1 OrthoEngine window PCI Geomatics 3 Exercise 1 Digital Airphoto Project The Aerial Photography Math Model is a rigorous model based on the geometry of a frame camera. This model can compensate for the effects of varying terrain and for the distortions inherent to the camera, such as the curvature of the lens, the focal length, the perspective effects, and the camera's position and orientation. The computed math model calculates the camera's position and orientation at the time when the image was taken. Note You should not use the Aerial Photography Math Model when you are using only a portion of the original image, when the image has been geometrically processed, or when you do not have (or cannot estimate) the camera calibration information. Both standard aerial and digital/video cameras are supported within Geomatica OrthoEngine. Standard Aerial Analog airphotos are recorded on photographic film. The photographs often measure 9 inches by 9 inches in size and usually contain calibration (fiducial) marks. Normally, a camera calibration report is supplied with the images. The camera calibration report provides data about the camera, such as the focal length, fiducial coordinates, and radial distortion parameters. The photographs need to be scanned into digital form in order to be used as raster images within Geomatica OrthoEngine. Digital/Video Digital/Video frame images are generated from CCD arrays (Charged Coupled Devices). Oftentimes, a camera calibration report is not supplied with the images. However, most companies that provide calibration services for standard aerial cameras can provide camera calibration services for digital and video cameras. The minimum measurements required are the focal length, which is determined when the lens is set, and the chip size, which can be obtained from the camera manufacturer. In this exercise, you will use a block of six digital photos with GPS/INS data to compute the exterior orientation. The digital airphotos for this exercise are provided courtesy of Airborne Scientific (www.airbornescientific.com) and can be found in the Digital_AP folder. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 4 PCI Geomatics Work Flow for Digital Airphoto Projects Input Data Enter Exterior Orientation and/or Collect GCPs/TPs Create a Project Calculate Sensor Model Orthorectification Mosaicking Manual Automatic Use Existing DEM Extract DEM from Stereo Airphotos Build DEM from * Lines/Points * GCPs/Match Points * Contours * Rasters * TINs Data Preparation Data Extraction Data Correction 3D Viewing 3D Feature Extraction Set Interior Orientation PCI Geomatics 5 Exterior Orientation Exterior orientation is the position and orientation of the camera when the image was taken. In other words, it is the relationship between the ground and the image. Many photogrammetric cameras are equipped with onboard Global Positioning Systems (GPS) and sometimes with Inertial Navigation Systems (INS) or Inertial Measurement Units (IMU) as well. These systems collect the exterior orientation directly on the aircraft. The exterior orientation can be calculated using one of three methods: GCPs and Tie Points (TPs) Set the Exterior orientation to Compute from GCPs and tie points if you do not have GPS/INS data for your project. For the Aerial Photography model, the minimum requirement is that you have at least two GCPs on at least one photo in the project, to ensure scale. However, there should be a few photos with 3 GCPs in the project. This provides correct levelling and scale for the math model. Tie points can hold the rest of the project together. GCPs/TPs and GPS/INS If you have GPS/INS data but would like to improve the model with GCPs and TPs, select Compute from GCPs and tie points for the Exterior orientation option. GPS/INS If you have accurate GPS/INS data or the exterior orientation was calculated with another application, select User Input as the Exterior orientation option on the Project information dialog box. This option does not allow you to collect GCPs or tie points for the project. Term Whereas the interior orientation defines the relationship between the image and the camera, the exterior orientation defines the relationship between the camera and the Earth. Specifically, the exterior orientation defines the spatial position and angular orientation of a photo. Setting up the Project OrthoEngine works on a project-by-project basis. Therefore, you need to open an existing project or create a new project before you gain access to the functions within OrthoEngine. In this exercise, you will create a new project. To create a new project: 1. From the File menu on the OrthoEngine window, click New. The Project Information dialog box opens. 2. Click Browse and navigate to the Digital_AP folder. 3. For the File name, enter digital.prj. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 6 PCI Geomatics 4. Click Open. The path and filename appear in the File name box in the Project Information dialog box. 5. In the Name box, enter Digital airphoto project. 6. In the Description box, enter Digital airphoto project for Johnson County, Kansas. 7. For the Math Modelling Method, select Aerial Photography. 8. Under Options, select Digital/Video as the Camera type. 9. For Exterior orientation, ensure Compute from GCPs and tie points is selected. Figure 1.1 Project Information dialog box for the Aerial Photography Math Modelling Method with a digital camera 10. Click OK. The Project Information dialog box closes and the Set Projection dialog box opens. Figure 1.2 Set Projection dialog box PCI Geomatics 7 Setting the Projection Parameters The projection information needs to be set once, at the beginning of each project. Output Projection The Output Projection defines the final projection for orthoimages, mosaics, 3D features, and digital elevation models (DEMs). To set the projection information: 1. Set up the Set Projection dialog box as shown in the figure below. Figure 1.3 Projection parameters 2. Click Accept. The Set Projection dialog box closes and the Digital / Video Camera Calibration Information dialog box opens. Entering the Camera Calibration Data The Camera Calibration Information dialog box lets you enter critical information about the camera that was used to acquire the digital airphotos in your project. Entering the camera calibration data is necessary to establish the interior orientation. Focal Length The focal length must be entered before you can continue with the project. This value should be supplied with the airphotos. Principal Point of Symmetry The principal point of symmetry is the point on the image where a ray of light traveling perpendicular to the image plane passes through the focal point of the lens and intersects the film. In a perfectly assembled camera, the principal point of symmetry would be where the lines of opposing fiducial marks on an image intersect. However, in most cameras a slight offset occurs. The perspective effects in the image are radial about this point. This parameter is optional, but the offsets are usually specified in the camera calibration report and are referred to as the point of symmetry or the calibrated principal point. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 8 PCI Geomatics Chip Information The Chip Size is the physical size of the Charged Coupled Devices (CCDs) in digital or video cameras. Since images from digital and video cameras do not contain fiducial marks, the size of the CCDs is used to calculate the geometry of the camera. Most cameras have square sensor cells, but some (especially video cameras) may have rectangular sensor cells. The Y Scale Factor is the ratio between the horizontal and the vertical size of each sensor cell in digital or video cameras. It is used when the CCD pixels are not square. Radial Lens Distortion Radial Lens Distortion is the symmetric distortion caused by the lens due to imperfections in curvature when the lens was ground. It is recommend that you obtain the Radial Distortion values for digital cameras. Since the manufacturing of digital cameras and their lenses is often not as precise as that for high-end photogrammetric cameras, the Radial Distortion tends to be higher. Decentering Distortion Decentering Distortion is the non-symmetric distortion due to the misalignment of the lens elements when the camera is assembled. Decentering Distortion values may be provided to you as P1 to P4 coefficients or in tabular format. It is recommend that you obtain the Decentering Distortion values for digital cameras. Since the manufacturing of digital cameras and their lenses is often not as precise as that for high-end photogrammetric cameras, the Decentering Distortion tends to be higher. Image Scale The image scale gives OrthoEngine an idea of the size of the photos. If the scale is not known, OrthoEngine attempts to make a best estimate. Term Image Scale is the ratio of the size of the objects in the image to the size of the objects on the ground. This parameter is optional, except when you want to import GPS/INS observations and use them during the automatic tie point measurements. Earth Radius The Earth radius is an optional parameter, which is entered in unit of meters. If the Earth radius is entered, the bundle adjustment and ortho generation steps assume there is some notable curvature of the Earth over the area of interest, and correct for this curvature. By default, the Earth is assumed to be flat. Since airphotos are usually very large scale, of the order of 1:8000, the error due to this radius is negligible. Correction for the Earth radius is only needed for photos with a scale of 1:20000 or smaller. Since this is not the case for your project, leave this field blank. PCI Geomatics 9 To enter the Camera Calibration Data: 1. Enter the camera calibration information from the table below. 2. Click OK. Tip If you wish to modify the camera calibration information at any time, reopen the Camera Calibration dialog box. Saving your Project To save your project file: * From the File menu on the OrthoEngine window, click Save. The project information is saved in the digital.prj file. Adding Images to the Project This section describes how to load the airphotos into the project file. The project file will then contain the file name and location of each input photo. To add the airphotos to the project: 1. In the Processing step list on the OrthoEngine window, select Data Input. A new toolbar with six icons appears. You can use the Data Input toolbar to open a new or existing image, import GPS/INS data from file or enter it manually, change photo orientation and define a clip region. 2. On the Data Input toolbar, click Open a new or existing image. The Open Image dialog box opens. 3. In the Open Image dialog box, click New Image. The File Selector dialog box opens. Table 1: Camera Calibration Data Focal Length 28.653 Principal point of symmetry X = -0.048 Y = 0.106 Chip Size Width = 36.000 Height = 24.000 Radial Lens Distortion R0 0 R4 0 R1 0 R5 -1.685e-007 R2 0 R6 0 R3 0.0001207 R7 7.014e-011 Decentering Distortion P1 -3.125e-006 P3 0 P2 1.563e-007 P4 0 OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 10 PCI Geomatics 4. From the Digital_AP folder, select all 6 tif files and click Open. The Multiple File selection message window opens. This window indicates the total number of files that are detected, and the total number to be loaded into the project. 5. Click OK. You now have six photos listed in the Open Image dialog box. Importing GPS/INS Data The position of the camera means the x, y, and z location of the camera's focal point measured in a right-handed mapping coordinate system. The orientation of the camera is given by omega (the rotation about the x axis), phi (the rotation about the y axis), and kappa (the rotation about the z axis) as shown in the figure below. The x, y, and z coordinates and the omega, phi, and kappa angles are referred are collectively to as the six parameters of exterior orientation. If you have an existing triangulation solution for the project, you can import it as a known solution for the exterior orientation. It allows you to skip GCP and tie point collection if you are confident of the accuracy of the data. GPS/INS and triangulation data are usually already calibrated to the orientation of the images, but may require kappa rotations in some cases. It is quite common for some formats, such as Albany and Pat-B, to have kappa values rotated due to different flight lines. You should rotate the kappa value according to the scanning direction. Kappa is the counter-clockwise angle required to rotate from map north to image north (up). Figure 1.4 Understanding omega, phi and kappa PCI Geomatics 11 For this project, the exterior orientation will be calculated using GPS/INS data as well as GCPs and tie points. To import the GPS/INS data: 1. On the Data Input toolbar, click Import exterior orientation data from text file. The Import Exterior Orientation Data From Text File dialog box opens. Figure 1.5 Import Exterior Orientation Data From Text File dialog box 2. In the File Information section, for the File format select ImageID X Y Z Omega Phi Kappa. 3. Enter the following accuracy information: The eX, eY, and eZ are measured in projection units, and the eOmega, ePhi, and eKappa are measured in decimal degrees. The dataset or GPS/INS sensors usually contain the estimated accuracies. The estimated error values are used to automatically weight the exterior orientation data with GCPs and tie points during Table 2: Accuracy information eX 0.05 eOmega 0.2 eY 0.05 ePhi 0.2 eZ 0.2 eKappa 0.015 OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 12 PCI Geomatics the computation of the math model. They are also used to constrain positioning of the exterior orientation data in the math model solution. 4. Click Browse beside the Text file box and navigate to the Digital_AP folder. 5. In the File Selector dialog box, select eo.txt and click Open. 6. In the Import Exterior Orientation Data From Text File dialog box, click Import. 7. Click OK. The GPS/INS data have are now a part of the project and give enough information to compute the math model. Collecting Tie Points Automatically Term A tie point is a feature that you can clearly identify in two or more images that you can select as a reference point. Tie points do not have known ground coordinates, but you can use them to extend ground control over areas where you do not have ground control points (GCPs). Used in rigorous models such as Aerial Photography and Satellite Orbital (high and low resolution) math models, tie points identify how the images in your project relate to each other. Automatic Tie Point collection is used to eliminate the time consuming and repetitive task of identifying common points between overlapping images. Image correlation techniques are used to find matching points in a particular distribution in your imagery. Automatic Tie Point collection can be run on any project that meets one or more of the following criteria: * The exterior orientation of each image has already been computed based on GCPs and/or TPs. * There are at least three TPs between each pair of overlapping images. * GPS is used to supply the X,Y, and Z coordinates for each image center, and the Omega, Phi, and Kappa rotations are supplied by INS or are estimated by the user. Omega and Phi rotations are usually near zero. To collect tie points automatically: 1. In the Processing step list, select GCP/TP Collection. 2. On the GCP/TP Collection toolbar, click Automatically collect tie points. 3. Set up the Automatic Tie Point Collection dialog box as shown in the figure below. PCI Geomatics 13 Figure 1.6 Automatic Tie Point Collection dialog box 4. Click Collect Tie Points. A progress bar appears at the bottom of the dialog box to monitor the status. After the process is complete, a message box opens indicating the total number of tie points found. 5. In the Message box, click OK. 6. Close the Automatic Tie Point Collection dialog box. Tip This is a good time to save your project file. Verifying Automatic Tie Points Automatic tie points should always be verified to ensure that a given point was collected for the same feature in your imagery. This is especially important if there are clouds, shadows or snow in the imagery as the image correlation technique used for the TP collection process sometimes fails in these regions. It is also important to check for tie points collected on cars or buildings as these features may not be located at the same position due to movement or radial displacement, respectively; these points should be deleted. To verify the automatic tie points: 1. On the GCP/TP Collection toolbar, click Open a new or existing image. The Open Image dialog box opens. The four airphotos are listed as Uncorrected Images. 2. One at a time, select each file and click Quick Open. Each of the four airphotos open in a separate viewer. 3. On the GCP/TP Collection toolbar, click Manually collect tie points. The Tie Point Collection dialog box opens. 4. Ensure that the Auto Locate option is selected. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 14 PCI Geomatics 5. In the Tie Point Collection dialog box, click the tie points, one at a time. The viewers updates to display the imagery at 1:1 resolution centered on the selected TP. 6. If an automatic TP does not fall on the same feature in both images, select the TP in the Tie Point Collection dialog box and click Delete. Tip Each automatic TP should be checked as even TPs with a low RMS can be incorrectly placed on two different features. 7. Once you are finished verifying the automatic tie points, click Close on the Tie Point Collection dialog box. Collecting Ground Control Points Ground coordinates can come from a variety of sources such as the Global Positioning System (GPS), ground surveys, geocoded images, vectors, Geographic Information Systems (GIS), topographic maps, or chip databases. A GCP determines the relationship between the raw image and the ground by associating the pixel (P) and line (L) image coordinates to the x, y, and z coordinates on the ground. You can refine the GPS math model or verify its accuracy with GCPs. To do so, you must collect at least the minimum number of ground control points and tie points needed to build a math model solution without the GPS or INS data. For this project, you will collect GCPs from a text file. Ground control points collected with a GPS will often be delivered in a text file. Each point will have X, Y, E and possibly point Id information. Before you collect ground control points in the field, you need to ensure that you can clearly see that location in the raw image. The pixel and line coordinates for the uncorrected image must be determined manually and transferred to the GCP Collection dialog box. To import GCPs from a text file: 1. Open Image11.tif and make it the Working image. 2. On the GCP/TP Collection toolbar, click Collect GCPs Manually. The GCP Collection dialog box opens. 3. In the GCP Collection dialog box, select Compute Model. Residual errors will be calculated for each GCP and listed in the Residual column. Residual errors are the difference between the coordinates that you entered for the ground control points (GCPs) or tie points and where those points are according to the computed math model. PCI Geomatics 15 4. For the Ground control source, select PIX/Text file. The Read GCP from PIX/Text File dialog box opens. 5. Click Select and navigate to the Digital_AP folder. 6. Select Image11.gcp and click Open. 7. Under Sample formats, choose IXYE. IXYE Format The format of the Image11.gcp file is IXYE, which means that each row of text contains the following information from left to right: * The GCP ID (I) * The georeferenced East/West coordinate (X) * The georeferenced North/South coordinate (Y) * The elevation (E) The Pixel and Line position for each point will be taken from Image11.tif. 8. Click Apply Format. The GCPs are listed under GCPs extracted from file. Figure 1.7 Read GCP from Text File dialog box 9. Click OK. The GCP Text File dialog box opens. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 16 PCI Geomatics Figure 1.8 GCP Text File dialog box To locate the GCPs on the raw image: 1. In the GCP Text File dialog box, select ID 248 and click Transfer to GCP collection panel. The IXYE coordinate is transferred to the GCP Collection dialog box. If Auto locate is selected in the GCP Collection dialog box, OrthoEngine estimates the position of the GCP in the uncorrected image. In the viewer for Image11, the crosshair has automatically moved near the correct position. 2. Refer to the figure below to more accurately position the crosshair on the uncorrected Image11.tif image. Figure 1.9 ID 248 on Image11.tif PCI Geomatics 17 3. When you are satisfied with the position of the crosshair, click Use Point on the toolbar in the Image11.tif viewer. The image coordinates for ID 248 are transferred to the GCP Collection dialog box. They should be approximately: 2195.9 Pixel 2350.0 Line 4. In the GCP collection dialog box, click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0001. 5. In the GCP Text File dialog box, select ID 249 and click Transfer to GCP collection panel. 6. Refer to the figure below to more accurately position the crosshair for 249 on the uncorrected Image11.tif image. Figure 1.10 ID 249 on Image11.tif 7. Adjust the position of the crosshair on Image11 and when you are satisfied with its location, click Use Point on the viewer toolbar. The image coordinates for ID 249 are transferred to the GCP Collection dialog box. They should be approximately: 4316.0 Pixel 2664.5 Line 8. In the GCP collection dialog box, click Accept. The GCP information is transferred to the Accepted Points list. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 18 PCI Geomatics 9. Close the GCP Text File dialog box. Tip This is a good time to save your project file. To save time, the remaining GCPs for Image16.tif and Image17.tif will be imported from a text file in IPLXYE format. IPLXYE Format The format of the Image16.gcp file is IPLXYE, which means that each row of text contains the following information from left to right: * The GCP ID (I) * The image pixel position (P) * The image line position (L) * The georeferenced East/West coordinate (X) * The georeferenced North/South coordinate (Y) * The elevation (E) To open Image16.tif as the working image: 1. On the GCP/TP Collection toolbar, click Open a new or existing image. 2. Select Image16 from the list and click Quick Open & Close. A viewer opens displaying Image16. Note One image is always the Working image, while the other images are the Reference images. Click Reference on the viewer toolbar to change the status of an image to Working. To import GCPs for Image16.tif: 1. In the GCP Collection dialog box, click Select PIX/Text File. The Read GCP from PIX/Text File dialog box opens. 2. Click Select and navigate to the Digital_AP folder. 3. Select Image16.gcp and click Open. 4. Under Sample formats, choose IPLXYE. 5. Click Apply Format. Information for each point is listed in the GCPs extracted from file section. PCI Geomatics 19 Figure 1.11 Read GCP From Text File dialog box for GCPs with IPLXYE information 6. Check that the GCPs are listed correctly in the GCPs extracted from file area. 7. Click OK. After the GCPs are read in, the GCP ID number for each point is displayed in red. Check to see that the GCP positions are correct. To import the GCPs for Image17.tif: 1. Open Image17.tif. 2. With Image17.tif as the Working image, import GCPs from the Image17.gcp text file. Note When a photo is selected as the working image, the GCPs collected for this image are listed in the GCP Collection dialog box. Tip This is a good time to save your project file. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 20 PCI Geomatics Collecting Stereo GCPs A stereo ground control point (GCP) is a cross between a regular GCP and a tie point. It is a feature with known ground coordinates that you can clearly identify in two or more images. They have the same Point ID, Easting and Northing coordinates and elevation value, but the pixel and line location is different in each image. They are used to determine the stereo parallax between two or more images. To collect Stereo GCPs: 1. Ensure that the viewers for Image16 and Image17 are open, as well as the GCP Collection dialog box. 2. Make Image16.tif the Working image. 3. In the GCP Collection dialog box, locate and select Point ID NCT8. The GCP image and georeferenced position information is loaded based on the Image16.tif photo. If Auto Locate is selected, this GCP is loaded in each of the viewing windows. 4. Make Image17.tif the Working image. A list of GCPs collected for the Working image now appears in the GCP Collection dialog box. The identification of the desired stereo point, NCT8, is listed in the GCP Collection dialog box for Image17. The Georeferenced Position information for this point is shown in the dialog box. 5. Place your cursor on the feature corresponding to point NCT8 on the Working image and click Use Point. The Image Position information updates in the GCP Collection dialog box. 6. Click Accept. This point is now registered to the same georeferenced location on the earth for both overlapping images, making it a Stereo GCP. 7. Repeat these steps to make NCT6 a stereo GCP on Image16. Check Points In the GCP Collection dialog box, to the right of the Point ID text box, you can select whether the current point is a Ground Control Point (GCP) or a Check Point (Check). A GCP is used in computing the geometric model, whereas a Check Point is used to check the accuracy of the computed geometric model. Check Points are not used in the model calculations. Tip This is a good time to save your project file. PCI Geomatics 21 Displaying the Layout of the Images The Image Layout feature is a quality control tool that reveals the relative positioning of the image footprints and displays a plot of the distribution of the ground control points (GCPs) and tie points for the entire project. Use the Display Image Layout tool to ensure that your GCPs and tie points are well distributed in the project. Figure 1.12 Image Layout Calculating the Sensor Model The computation of a rigorous math model is often referred to as a bundle adjustment. The math model solution calculates the position and orientation of the sensor at the time when the image was taken. Once the position and orientation of the sensor is identified, it can be used to accurately account for known distortions in the image. When the model is calculated, the image is not manipulated. OrthoEngine simply calculates the position and orientation of the sensor at the time when the image was taken. To run the bundle adjustment: 1. There are three ways you can update the bundle in OrthoEngine: * By activating the Compute Model option in the GCP or Tie Point Collection dialog box * By clicking Compute Model in the Model Calculations Processing step * By clicking Compute Model in the Residual Reports dialog box 2. Delete any GCPs or tie points in the project that have high residuals. Now that the model has been computed, you can extract a DEM, extract features in 3D and/or orthorectify the images. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 22 PCI Geomatics Creating Epipolar Images Epipolar images are stereo pairs that are reprojected so that the left and right images have a common orientation, and matching features between the images appear along a common x axis. Using epipolar images increases the speed of the correlation process and reduces the possibility of incorrect matches. To create the epipolar images: 1. From the Processing step list, select DEM From Stereo. A new toolbar with five icons appears. Figure 1.13 DEM From Stereo toolbar 2. On the DEM from Stereo toolbar, click Create Epipolar Image. 3. Set up the Generate Epipolar Images dialog box as shown in the figure below. Figure 1.14 Generate Epipolar Images dialog box and parameters for digital airphoto project PCI Geomatics 23 4. Click Save Setup. This saves the epipolar image generation options and uses them for batch processing with Automatic DEM Extraction. 5. Click Close. Extracting the DEM To extract the DEM: 1. On the DEM from Stereo toolbar, click Extract DEM Automatically. The Automatic DEM Extraction dialog box opens. If the epipolar pairs do not exist or are not available (offline), OrthoEngine will automatically generate the epipolar pairs using the options that you saved in the Generate Epipolar Images dialog box. 2. Fill in the Automatic DEM Extraction dialog box as shown in the figure below. Figure 1.15 Automatic DEM Extraction dialog box with parameters for the digital airphoto project 3. Click Extract DEM. A Progress Monitor opens showing the status of the extraction process. 4. When the DEM has extracted, click Close. Tip This is a good time to save your project file. OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 24 PCI Geomatics Orthorectification Orthorectification is the process of using a rigorous math model and a digital elevation model (DEM) to correct distortions from the platform, the sensor, earth terrain and curvature and cartographic projection in raw images. The rigorous math models, such as the Aerial Photography or Satellite Orbital math models, provide a method to calculate the position and orientation of the sensor at the time when the image was taken. The DEM is a raster of terrain elevations. A raster DEM is required for orthorectification. The DEM you extracted for this project could be used for this process, however, you will use dem.pix which covers a slightly larger area. To orthorectify the images: 1. From the Processing step list, select Ortho Generation. 2. Click Schedule Ortho Generation. The Ortho Image Production dialog box opens. 3. Set up the Ortho Image Production dialog box using the parameters shown in the figure below. Figure 1.16 Ortho Image Production dialog box with parameters for digital airphoto project 4. Click Generate Orthos. A Progress Monitor opens to show the status of the operation. The ortho photos can be examined in Focus to see how well features are coregistered. PCI Geomatics 25 Tip This is a good time to save your project file. You can proceed to mosaicking the images using the steps outlined in Module 6 of the Geomatica OrthoEngine Course Guide. In this exercise you: * Created an Aerial Photography Modelling project * Input four digital airphotos * Computed exterior orientation from GPS/INS data and refined the model with GCPs and TPs * Extracted a DEM from epipolar images * Orthorectified the airphotos OrthoEngine Workbook - Exercise 1: Digital Airphoto Project 26 PCI Geomatics PCI Geomatics 27 Exercise 2 Satellite Orbital Modelling Project - SPOT There are four options for the satellite orbital modelling method in OrthoEngine: Toutin's Model (Low Res), Toutin's Model (High Res), the ASAR/ RADARSAT Specific Model and the Low Resolution AVHRR model. Figure 2.1 Satellite Orbital Modelling Options in OrthoEngine Note You should not use the Satellite Orbital Math Model when you are using only a portion of the original image, when the image has been geometrically processed, or when you do not have (or cannot estimate) the orbit information. Toutin's Model Toutin's Model is a rigorous model developed by Dr. Toutin at the Canada Centre for Remote Sensing to compensate for distortions, such as sensor geometry, satellite orbit and attitude variations, earth shape, rotation, and relief. This model is used for high and low resolution imagery. The following sensors are currently supported in the Satellite Model: Table 1: Supported Sensors ASAR ERS MERIS ASTER FORMOSAT ORBVIEW CBERS IRS PALSAR DMC IKONOS QUICKBIRD EOC JERS RADARSAT EROS LANDSAT SPOT OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 28 PCI Geomatics Note The processing steps for optical and radar projects are the same. ASAR/ RADARSAT Specific Model The ASAR/RADARSAT Specific Model is designed for stereo DEM extraction and image orthorectification of ASAR or RADARSAT data. Compared with Toutin's model for radar data, the ASAR/RADARSAT Specific model takes greater advantage of the satellite's ancilliary information delivered with the raw data. This in turn dramatically reduces the requirement for numerous well-distributed ground control points for ortho and DEM generation, while still maintaining positional accuracy and high levels of detail. The addition of ground control points, although not necessary, will refine the model and improve its accuracy. Unlike the General High Resolution model used for radar data, Tie Points (TPs) are not required nor is it possible to collect tie points for this type of project. Note The RADARSAT Specific Model produces better ortho images and DEMs, when GCPs are limited. Low Resolution Model The Low Resolution Model is only for GCP collection or GCP editing. Low resolution imagery such as AVHRR is orthorectified in PCI GeoComp. In this exercise, you will use Toutin's Model with SPOT data to extract a DEM and orthorectify two images. The data for this project can be found in the SPOT folder. PCI Geomatics 29 Work Flow for Satellite Orbital Modelling Create a Project Input Data Collect GCPs/TPs Calculate Sensor Model Orthorectification Mosaicking Manual Automatic Use Existing DEM Extract DEM from Stereo Images Build DEM from * Lines/Points * GCPs/Match Points * Contours * Rasters * TINs Data Preparation Data Extraction Data Correction 3D Viewing 3D Feature Extraction OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 30 PCI Geomatics Setting up the Project OrthoEngine works on a project-by-project basis. Therefore, you need to open an existing project or create a new project before you gain access to the functions within OrthoEngine. In this exercise, you will create a new project. To create a new project: 1. From the File menu on the OrthoEngine window, click New. The Project Information dialog box opens. 2. Click Browse and locate the SPOT folder. 3. For the File name, enter spot.prj. 4. Click Open. The path and filename appear in the File name field in the Project Information dialog box. 5. In the Name box, enter SPOT Project. 6. In the Description box, enter SPOT ortho project for Irvine, CA. 7. For the Math Modelling Method, select Satellite Orbital Modelling. 8. Under options, select Toutin's Model (Low Res). Figure 2.2 Project Information dialog box for Satellite Orbital Modelling 9. Click OK. The Project Information dialog box closes. The Set Projection dialog box opens. PCI Geomatics 31 Setting the Projection Parameters To enter the projection parameters: 1. In the Set Projection dialog box, enter the projection parameters as shown in the figure below. Figure 2.3 Set Projection dialog box for Satellite Orbital Modelling 2. Click OK. Adding the Images to the Project For most sensors, OrthoEngine uses the Read CD-ROM option on the Data Input toolbar to read the raw satellite data, save the imagery into a PCIDSK file, and add a binary segment containing the ephemeris data (orbit information) to the file. In this exercise, the images have already been read to PCIDSK format. In this case, you will use the Read PCIDSK file option from the Data Input toolbar. To import satellite data from a PCIDSK file: 1. On the OrthoEngine window in the Processing step list, select Data Input. A new toolbar with four icons appears on the OrthoEngine window. Figure 2.4 Data Input Processing Step 2. On the Data Input toolbar, click Read PCIDSK file. The Open Image dialog box opens. 3. Make sure the Uncorrected images option is selected. 4. Click New Image. The File Selector dialog box opens. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 32 PCI Geomatics 5. From the SPOT folder, select spotleft.pix and spotright.pix and click Open. The Multiple File selection message window opens indicating the total number of files that are detected, and the total number to be loaded into the project. 6. Click OK. The File Selector dialog box closes. Both SPOT images are now part of your project. Tip This is a good time to save your project file. Saving your Project To save your project file: * From the File menu on the OrthoEngine window, click Save. The spot.prj file is saved to the SPOT folder. Collecting Ground Control Points Term A ground control point (GCP) is a feature that you can clearly identify in the raw image for which you have a known ground coordinate. Ground coordinates can come from a variety of sources such as the Global Positioning System (GPS), ground surveys, geocoded images, vectors, Geographic Information Systems (GIS), topographic maps, or chip databases. A GCP determines the relationship between the raw image and the ground by associating the pixel (P) and line (L) image coordinates to the x, y, and z coordinates on the ground. How Many GCPs? The minimum number of GCPs you need to collect depends on the type of data you are correcting, the processing level of that data, and which math model you are using. For more information, please refer to Appendix A in the Introduction to OrthoEngine course guide. Note It is usually recommended to collect twice the minimum number of GCPs to ensure accuracy. PCI Geomatics 33 You will collect GCPs from a geocoded image and import GCPs from a text file. To open the working image: 1. From the Processing step list, select GCP/TP Collection. Eight icons appear in the main toolbar representing functions you can use during GCP and TP collection. Figure 2.5 GCP/TP Collection toolbar 2. On the GCP/TP Collection toolbar, click Open a new or existing image. The Open Image dialog box opens. Both SPOT input images are listed as Uncorrected Images. 3. Select the spotleft.pix file and click Quick Open & Close. The Open Image dialog box closes. A viewer opens containing the spotleft.pix image. To set up for GCP collection from a geocoded image: 1. On the GCP/TP Collection toolbar, click Collect GCPs Manually. The GCP Collection dialog box opens. 2. In the GCP Collection dialog box, select Compute Model. Residual errors are calculated for each GCP and are listed in the Residual column. Residual errors are the difference between the coordinates that you entered for the ground control points (GCPs) or tie points and where those points are according to the computed math model. 3. For the Ground control source, select Geocoded image. A File Selector dialog box opens. 4. From the SPOT folder, select spotmos.pix and click Open. The spotmos.pix file is loaded in a viewer as the Geocoded Image. 5. In the GCP Collection dialog box, click Browse beside the DEM box. 6. From the SPOT folder, select SPOTDEM.PIX and click Open. The DEM File dialog box opens. This allows you to select the channel containing the DEM information in the file. There is only one channel in SPOTDEM.PIX. 7. Click OK. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 34 PCI Geomatics To collect GCPs from a geocoded image: 1. In the spotmos.pix viewer, place the crosshair on the lower right corner of the image at the position shown in the figure below. Figure 2.6 Crosshair location (circled in black) for first GCP 2. On the viewer toolbar, click Zoom to 1:1 Image Resolution. 3. Place the cursor on the location shown in Figure 2.7, zooming in as necessary. Figure 2.7 Crosshair location (circled in black) for G0001 PCI Geomatics 35 4. On the Geocoded Image viewer toolbar, click Use Point. The georeferenced coordinates for this location are transferred to the GCP Collection window. They should be approximately: 438962 X 3713710 Y 5. On the GCP Collection dialog box, click Extract Elevation. If Auto locate is selected in the GCP Collection dialog box, OrthoEngine estimates the position of the GCP in the uncorrected image. In the spotleft viewer, the crosshair has automatically moved close to the correct position for G0001. 6. Adjust the position of the crosshair on spotleft and click Use Point on the viewer toolbar. The image coordinates for G0001 are transferred to the GCP Collection dialog box. They should be approximately: 4708 Pixel 5439 Line 7. Click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0001. 8. Collect two more GCPs for spotleft.pix using spotmos.pix as the geocoded image. In order for Auto locate to work, place the crosshair on a feature in the geocoded image, click Use Point and extract the elevation for this location. Tip The same workflow is used when collecting GCPs from a geocoded image and geocoded vectors. Tip This is a good time to save your project file. Ground control points collected with a GPS will often be delivered in a text file. Each point will have X, Y, E and possibly point Id information. Before you collect ground control points in the field, you need to ensure that you can clearly see that location in the raw image. The pixel and line coordinates for the uncorrected image must be determined manually and transferred to the GCP Collection dialog box. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 36 PCI Geomatics To import GCPs from a text file: 1. For the Ground control source in the GCP Collection dialog box, select PIX/ Text file. The Read GCP from PIX/Text File dialog box opens. 2. Click Select and navigate to the SPOT folder. 3. Select spotleft_1.GCP and click Open. 4. Under Sample formats, choose IXYE. IXYE Format The format of the spotleft_1.GCP file is IXYE, which means that each row of text contains the following information from left to right: * The GCP ID (I) * The georeferenced East/West coordinate (X) * The georeferenced North/South coordinate (Y) * The elevation (E) The Pixel and Line position for each point will be taken from the uncorrected spotleft.pix image. 5. Click Apply Format. The GCPs are listed under GCPs extracted from file. Figure 2.8 Read GCP From Text File dialog box for GCPs with IXYE information 6. Click OK. The GCP Text file dialog box opens. PCI Geomatics 37 To locate the GCPs on the raw image: 1. In the GCP Text File dialog box, select G0011 and click Transfer to GCP collection panel. The IXYE coordinate is transferred to the GCP Collection dialog box. If Auto locate is selected in the GCP Collection dialog box, OrthoEngine estimates the position of the GCP in the uncorrected image. In the viewer for spotleft, the crosshair has automatically moved near the correct position for G0011. 2. Refer to the figure below to more accurately position the crosshair on the uncorrected spotleft.pix image. Figure 2.9 G0011 on spotleft.pix 3. Once you are satisfied with the position of the crosshair, click Use Point on the toolbar in the spotleft.pix viewer. The image coordinates for G0011 are transferred to the GCP Collection dialog box. They should be approximately: 1152.5 Pixel 1546.5 Line 4. In the GCP collection dialog box, click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0011. 5. In the GCP Text File dialog box, select G0012 and click Transfer to GCP collection panel. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 38 PCI Geomatics 6. Refer to the figure below to more accurately position the crosshair on the uncorrected spotleft.pix image. Figure 2.10 G0012 on spotleft.pix 7. Adjust the position of the crosshair on spotleft and click Use Point on the viewer toolbar. The image coordinates for G0012 are transferred to the GCP Collection dialog box. They should be approximately: 3862.5 Pixel 3587.5 Line 8. In the GCP collection dialog box, click Accept. The GCP information is moved to the Accepted Points list for the GCP with Point ID G0012. 9. Select G0013 in the GCP Text File dialog box and click Transfer to GCP collection panel. 10. Use the figure below to help determine the location of G0013 on spotleft.pix. PCI Geomatics 39 Figure 2.11 G0013 on spotleft.pix 11. Adjust the position of the crosshair on spotleft and click Use Point on the viewer toolbar. The image coordinates for G0013 are transferred to the GCP Collection dialog box. They should be approximately: 3557.5 Pixel 4208.2 Line 12. In the GCP collection dialog box, click Accept. The GCP information is moved to the Accepted Points list for the GCP with Point ID G0013. Tip This is a good time to save your project file. To save time, the remaining GCPs for spotleft.pix and spotright.pix will be imported from a text file in IPLXYE format. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 40 PCI Geomatics IPLXYE Format The format of the spotleft_2.GCP file is IPLXYE, which means that each row of text contains the following information from left to right: * The GCP ID (I) * The image pixel position (P) * The image line position (L) * The georeferenced East/West coordinate (X) * The georeferenced North/South coordinate (Y) * The elevation (E) To import the remaining GCPs for spotleft.pix: 1. In the GCP Collection dialog box, click Select PIX/Text File. The Read GCP from PIX/Text File dialog box opens. 2. Click Select and navigate to the SPOT folder. 3. Select spotleft_2.GCP and click Open. 4. Under Sample formats, choose IPLXYE and click Apply Format. Information for each point is listed in the GCPs extracted from file section. Figure 2.12 Read GCP From Text File dialog box for GCPs with IPLXYE information 5. Check that the GCPs are listed correctly in the GCPs extracted from file area. 6. Click OK. After the GCPs are read in, the GCP ID number for each point is displayed in red. Check to see that the GCP positions are correct. PCI Geomatics 41 To import the remaining GCPs for spotright.pix: 1. On the GCP/TP Collection toolbar, click Open a new or existing image. 2. From the SPOT folder, select spotright.pix and click Quick Open & Close. A second viewer opens containing the spotright.pix image. This is now the Working image. 3. In the GCP Collection dialog box, click Select PIX/Text File. The Read GCP from PIX/Text File dialog box opens. 4. Click Select and navigate to the SPOT folder. 5. Select spotright.GCP and click Open. 6. Under Sample formats, choose IPLXYE and click Apply Format. Information for each point is listed in the GCPs extracted from file section. 7. Check that the GCPs are listed correctly and click OK. After the GCPs are read in, the GCP ID number for each point is displayed in red. Check to see that the GCP positions are correct for spotright.pix. Collecting Stereo GCPs A stereo ground control point (GCP) is a cross between a regular GCP and a tie point. It is a feature with known ground coordinates that you can clearly identify in two or more images. They have the same Point ID, Easting and Northing coordinates and elevation value, but the pixel and line location is different in each image. They are used to determine the stereo parallax between two or more images. To collect Stereo GCPs: 1. Ensure that both overlapping images are open, as well as the GCP Collection dialog box. 2. Make spotleft.pix the Working image. 3. In the GCP Collection dialog box, locate and select Point ID G0011. The GCP image and georeferenced position information is loaded based on the spotleft.pix image. If Auto Locate is selected, this GCP is loaded in each of the viewing windows. 4. Switch the spotright.pix image from Reference to Working. A list of GCPs collected for the Working image appears in the GCP Collection dialog box. The identification of the desired stereo point, G0011, is listed in the GCP Collection dialog box for spotright. The Georeferenced Position information for this point is shown in the dialog box. However, the Image Position information for the Working image is not available, since you have not yet associated the point G0011 with spotright. 5. Place your cursor on the feature corresponding to point G0011 in spotright.pix and click Use Point. The Image Position information updates in the GCP Collection dialog box. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 42 PCI Geomatics 6. Click Accept. This point is now registered to the same georeferenced location on the earth for both overlapping images, making it a Stereo GCP. 7. Collect another stereo GCP based on Point ID G0014. Check Points In the GCP Collection dialog box, to the right of the Point ID text box, you can select whether the current point is a Ground Control Point (GCP) or a Check Point (Check). A GCP is used in computing the geometric model, whereas a Check Point is used to check the accuracy of the computed geometric model. Check Points are not used in the model calculations. To create a Check Point: 1. Select spotleft.pix as the Working image. 2. In the GCP Collection dialog box, below Accepted Points, select G0022 or a GCP with a high residual value. 3. From the list beside the Point ID box, select Check. Figure 2.13 Changing G0022 on spotleft.pix to a Check Point 4. Click Accept. This point is now a Check Point and is not included in the bundle adjustment. To convert a Check Point to a GCP: 1. Select the Point ID that is the Check Point you want to make into a GCP, in this case G0022. 2. From the list beside the Point ID box, select GCP. 3. Click Accept. This point is once again a GCP and is included in the bundle adjustment. PCI Geomatics 43 Collecting Tie Points Manually Term A tie point is a feature that you can clearly identify in two or more images that you can select as a reference point. Tie points do not have known ground coordinates, but you can use them to extend ground control over areas where you do not have ground control points (GCPs). Used in rigorous models such as Aerial Photography and Satellite Orbital (high and low resolution) math models, tie points identify how the images in your project relate to each other. To collect tie points manually: 1. On the GCP Collection toolbar, click Collect tie points. The Tie Point Collection dialog box opens. 2. In the Auxiliary Information section, click Select. 3. From the SPOT folder, select SPOTDEM.PIX and click Open. The DEM File dialog box opens where you select the channel containing the DEM information. This will be your source of elevation for your tie points. Entering tie point elevation is optional. You can either load a DEM or select the Elevation option and manually enter the elevation. The elevation of the tie point is automatically incorporated into the math model. 4. Click OK. 5. Make spotleft.pix the Working image. 6. Find a location in spotleft.pix that can be clearly seen in the overlap area in spotright.pix, zooming in as necessary. 7. Place the cursor at this location and click Use Point. If Auto locate is selected in the Tie Point Collection dialog box, OrthoEngine estimates the position of the Tie Point on spotright.pix. You need to refine the position of the crosshair on spotright.pix before accepting the tie point on this image. 8. Place the cursor at the same location in spotright.pix, zooming in as necessary. 9. In the spotright viewer, click Use Point. 10. In the Tie Point Collection dialog box, click Accept. The point is listed in the Accepted Tie Points table. 11. Collect at least four more tie points to tie the two images together. For Auto locate to work, you need to click Use Point on the Working image after placing the crosshair on a feature that can be seen in both images. It does not matter which image you set as the Working image. 12. When you are finished collecting your tie points, click Close. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 44 PCI Geomatics Tip This is a good time to save your project file. Collecting Tie Points Automatically Automatic Tie Point collection is used to eliminate the time consuming and repetitive task of identifying common points between overlapping images. Image correlation techniques are used to find matching points in a particular distribution in your imagery. To collect tie points automatically: 1. On the GCP/TP Collection toolbar, click Automatically collect tie points. The Automatic Tie Point Collection dialog box opens. 2. Set up the Automatic Tie Point Collection dialog box as shown in the figure below. Figure 2.14 Automatic Tie Point Collection dialog box 3. Click Collect Tie Points. A progress bar appears at the bottom of the dialog box to monitor the status. After the process is complete, a message box opens indicating the total number of tie points found. 4. Click OK to exit the Message box. 5. Click Close. Tip This is a good time to save your project file. PCI Geomatics 45 Verifying Automatic Tie Points Automatic tie points should always be verified to ensure that a given point was collected for the same feature in your imagery. This is especially important if there are clouds, shadows or snow in the imagery as the image correlation technique used for the TP collection process sometimes fails in these regions. To verify the automatic tie points: 1. On the GCP/TP Collection toolbar, click Collect tie points. The Tie Point Collection dialog box opens. 2. Ensure that the Auto Locate option is selected. 3. In the Tie Point Collection dialog box, click the tie points that have an ID beginning with A, one at a time. The viewers update to display the imagery at 1:1 resolution centered on the selected TP. 4. If an automatic TP does not fall on the same feature in both images, select the TP in the Tie Point Collection dialog box and click Delete. 5. Once you are finished verifying the automatic tie points, click Close. Tip Each automatic TP should be checked as even TPs with a low RMS can be incorrectly placed on two different features. Tip This is a good time to save your project file. Displaying the Layout of the Images The Image Layout feature is a quality control tool that reveals the relative positioning of the image footprints and displays a plot of the distribution of the ground control points (GCPs) and tie points for the entire project. To check the layout of your images: 1. On the GCP Collection toolbar, click Display overall image layout. The Image Layout window opens. The Overview area shows the center of each image in the project. The top of the window points northward. 2. Under Overview, click a crosshair to reveal the image's footprint. In the right side of the window, the selected image is displayed with a red frame, while the other image is framed in blue. The GCPs are displayed as red squares, while the TPs are displayed as blue squares. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 46 PCI Geomatics Figure 2.15 Image Layout window 3. To open an image, double-click the image footprint or click Quick Open. If you are not satisfied with the distribution, edit your GCPs and tie points. 4. Click Close. Calculating the Math Model The computation of a rigorous math model is often referred to as a bundle adjustment. The math model solution calculates the position and orientation of the sensor at the time when the image was taken; when the model is calculated, the image itself is not manipulated. Once the position and orientation of the sensor is identified, it can be used to accurately account for known distortions in the image. To run the bundle adjustment: 1. There are three ways you can update the bundle in OrthoEngine: * By activating the Compute Model option in the GCP or Tie Point Collection dialog box * By clicking Compute Model in the Model Calculations Processing step * By clicking Compute Model in the Residual Reports dialog box 2. Delete any GCPs or tie points that have high residuals in the project. Now that the model has been computed, you can extract a DEM, extract features in 3D and/or orthorectify the images. PCI Geomatics 47 Creating Epipolar Images Epipolar images are stereo pairs that are reprojected so that the left and right images have a common orientation, and matching features between the images appear along a common x axis. Using epipolar images increases the speed of the correlation process and reduces the possibility of incorrect matches. To create the epipolar images: 1. From the Processing Step list, select DEM From Stereo. A new toolbar with five icons appears. Figure 2.16 DEM From Stereo toolbar 2. On the DEM from Stereo toolbar, click Create Epipolar Image. 3. Set up the Generate Epipolar Images dialog box as shown in the figure below. Figure 2.17 Generate Epipolar Images dialog box and parameters for SPOT project OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 48 PCI Geomatics 4. Click Save Setup. This saves the epipolar image generation options and uses them for batch processing with Automatic DEM Extraction. 5. Click Close. Extracting the DEM To extract the DEM: 1. On the DEM From Stereo toolbar, click Extract DEM Automatically. The DEM Extraction dialog box opens. If the epipolar pairs do not exist or are not available (offline), OrthoEngine will automatically generate the epipolar pairs using the options that you saved in the Generate Epipolar Images dialog box. 2. Set up the Automatic DEM Extraction dialog box as shown in the figure below. Figure 2.18 Automatic DEM Extraction dialog box with parameters for SPOT project 3. Click Extract DEM. A Progress Monitor opens showing the status of the extraction process. 4. When the DEM has extracted, click Close. Tip This is a good time to save your project file. PCI Geomatics 49 Orthorectification Orthorectification is the process of using a rigorous math model and a digital elevation model (DEM) to correct distortions from the platform, the sensor, earth terrain and curvature and cartographic projection in raw images. The rigorous math models, such as the Aerial Photography or Satellite Orbital math models, provide a method to calculate the position and orientation of the sensor at the time when the image was taken. The DEM is a raster of terrain elevations. A raster DEM is required for orthorectification. The DEM you extracted for this project could be used for this process; however, you will use SPOTDEM.PIX which covers a slightly larger area. To orthorectify the images: 1. From the Processing step list, select Ortho Generation. 2. Click Schedule Ortho Generation. The Ortho Image Production dialog box opens. 3. Set up the Ortho Image Production dialog box as shown in the figure below. Figure 2.19 Ortho Image Production dialog box with parameters for SPOT project 4. Click Generate Orthos. A Progress Monitor open showing the status of the orthorectification process. The orthos can be opened in Focus to see how well features are coregistered. Tip This is a good time to save your project file. OrthoEngine Workbook - Exercise 2: Satellite Orbital Modelling Project - SPOT 50 PCI Geomatics You can proceed to mosaicking the images using the steps outlined in Module 6 of the Geomatica OrthoEngine Course Guide. In this exercise you: * Created a Satellite Orbital Modelling project * Input two SPOT images * Collected GCPs and TPs * Extracted a DEM from epipolar images * Orthorectified the images PCI Geomatics 51 Exercise 3 Rational Functions QuickBird RPC Project Understanding the Rational Functions Math Model The Rational Functions math model is a math model that builds a correlation between the pixels and their ground locations. Use this math model when you are missing the information needed for a rigorous math model, when the sensor model is proprietary (classified), when the image has been geometrically processed, when the data provider computed the math model and distributed it with the image, or when you do not have the whole image. Tip Because rational polynomials also consider elevation, it can be more accurate than the Polynomial or Thin Plate Spline math models. The rational polynomial coefficients can be computed in two ways: they can be calculated from GCPs or they can be imported from a file. Compute from GCPs This is a simple math model you can use to correct any image data using rational polynomials when you have no orbit segment or camera model information, or if geometric correction has already been applied to the data. OrthoEngine can calculate the polynomial coefficients from GCPs. The minimum number of required GCPs is determined by multiplying the number of coefficients by 2 and then subtracting 1. For example, if you wanted to use 10 coefficients, you would multiply 10 by 2 and then subtract 1, which means you would need 19 GCPs per image. You have a choice to select the number of coefficients to be used in the fitted polynomial. The minimum is 3 and maximum is 20. Using more coefficients will result in a more accurate fit in the immediate vicinity of the GCPs, but it may introduce new and significant errors in the image away from the GCPs. The errors introduced into the imagery may be worse than the original errors that needed correcting. Tip Using 10 coefficients is recommended as is usually produces the best results. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 52 PCI Geomatics Note If you select the Compute from GCPs option using the Rational Functions method, you cannot extract a DEM. Extract from Image File This is a rigorous model that automatically uses the rational polynomial coefficients (RPCs) provided with the data to build a correlation between the pixels and their ground locations. The image distribution agency computes the polynomial coefficients for each image and distributes the data with the images. This is only available for CARTOSAT, IKONOS, QuickBird, and OrbView imagery, or images distributed in NITF 2.0 format with the RPC image support data included in the NITF file. You can refine the math model solution built from the coefficients by adding GCPs. If you have one or two GCPs per image, you can perform a zero-order transformation. A zero-order transformation produces a translation for x and y only. If you have at least three GCPs per image, you can perform a first-order transformation. A first-order transformation produces a translation and a rotation. Usually performing a first-order transformation is best, except when the GCPs are not well distributed. If your GCPs are clustered together, a first-order transformation may introduce new and significant errors in the image away from the GCPs. If your GCPs are not well distributed, you will probably obtain better results from the zero-order transformation. Note If you extract a DEM from stereo data, the height generated will be in Ellipsoidal heights. You can convert the geocoded DEM datum using "Convert DEM Datum" under "Utilities" in the OrthoEngine window. In this exercise, you will create a rational functions project with two QuickBird images. The math model will be refined by collecting a few GCPs on each image. Additionally, the images will be tied together with tie points. The data for this project can be found in the QB_RPC folder. QuickBird images provided for this exercise are courtesy of DigitalGlobe (www.digitalglobe.com). PCI Geomatics 53 Work Flow with a Rational Functions Project Orthorectification Mosaicking Manual Automatic Use Existing DEM Extract DEM from Stereo Images Build DEM from * Lines/Points * GCPs/Match Points * Contours * Rasters * TINs Data Preparation Data Extraction Data Correction 3D Viewing 3D Feature Extraction Create a Project Input DataInput Data Collect GCPs/TPs Extract from Image File Compute from GCPs Collect GCPs OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 54 PCI Geomatics Setting up the Project OrthoEngine works on a project-by-project basis. Therefore, you need to open an existing project or create a new project before you gain access to the functions within OrthoEngine. In this exercise, you will create a new project. To create a new project: 1. From the File menu on the OrthoEngine window, click New. The Project Information dialog box opens. 2. Click Browse and locate the QB_RPC folder. 3. In the File name box, enter denver_qb.prj and click Open. The path and file name appear in the File name box. 4. In the Name box, enter QB RPC Project. 5. In the Description box, enter QB RPC ortho project for Denver, CO. 6. For the Math Modelling Method, select Rational Functions. 7. Under Options, select Extract from Image File. Figure 3.1 Project Information dialog box 8. Click OK. The Project Information dialog box closes and the Set Projection dialog box opens. Setting the Projection Parameters To enter the projection parameters: 1. Enter the projection parameters in the Set Projection dialog box as show in the figure below. PCI Geomatics 55 Figure 3.2 Project Information dialog box for Rational Functions project 2. Click OK. Adding Images to the Project Before you start working with the imagery, you need to import the data to the project. QuickBird scenes will either be delivered in GeoTiff or NITF format. Note Both the QuickBird Basic 1B product and the Ortho Ready Standard product are supported in OrthoEngine. Due to the size limitations of CDs, OrthoReady Standard data may be delivered as image tiles with RPC data. The RPC data is used with the Rational Functions math model and covers the entire scene, not the individual tiles. Therefore, you must reassemble the tiles into one scene before importing it into your project. Up to 81 QuickBird tiles can be assembled at a time (9 rows by 9 columns). OrthoEngine will automatically read the RPC information provided with the data. The RPC data is delivered as an ASCII text file ending in .RPB. Note To assemble a QuickBird OrthoReady Standard scene delivered in tiles, you must create a Rational Functions, Extract from Image File project. To stitch scenes acquired along the same path, you must create a Satellite Orbital Modelling project. To open the Assemble QuickBird Tiles dialog box for a Rational Functions project: * From the Utilities menu, select Assemble QuickBird Tiles. To open the Stitch Image Tiles dialog box for a Satellite Orbital Modelling project: * From the Utilities menu, select Stitch Image Tiles. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 56 PCI Geomatics You will now add two images to the project. To add the images to the current project: 1. On the OrthoEngine window in the Processing Step list, select Data Input. A new toolbar with two icons appears. Figure 3.3 Data Input toolbar 2. On the Data Input toolbar, click Open a new or existing image. The Open Image dialog box opens. 3. Click New Image. The File Selector dialog box opens. 4. From the QB_RPC\P001 folder, select 02SEP19175401-M1BS- 000000184308_01_P001.TIF and click Open. The 02SEP19175401-M1BS-000000184308_01_P001.TIF file is now part of your project. 5. In the Open Image dialog box, click New Image. The File Selector dialog box opens. 6. From the QB_RPC\P004 folder, select 02OCT15174416-M1BS- 000000184308_01_P004.TIF and click Open. The 02OCT15174416-M1BS-000000184308_01_P004.TIF file is now part of your project. 7. Click Close. Saving your Project To save your project file: * From the File menu on the OrthoEngine window, click Save. The project file denver_qb.prj is saved in the QB_RPC folder. PCI Geomatics 57 Collecting Ground Control Points Note GCPs are optional in a Rational Functions, Extract from Image File project because the imagery is delivered with RPCs. However, even 1 or 2 GCPs can greatly improve the accuracy of the model. RPC Adjustment Order When working with a Rational Function, Extract from Image File project, you can select in the RPC adjustment order list the polynomial order you want to use to calculate the math model. OrthoEngine supports both zero and first order RPC polynomial adjustments. For a Rational Functions, Extract from Image File project, the RPC adjustment order under Auxiliary Information in the GCP Collection dialog box is set to 0 by default. For IKONOS images a zero order polynomial adjustment is adequate in most cases. For QuickBird images a first order polynomial adjustment is required to achieve the best results. In order to apply the first order polynomial adjustment, you need a minimum of three ground control points per image. For this project, GCPs will be collected manually and from a GCP text file. A zero order polynomial adjustment will be used as there will not be 3 GCPs on each image. To open the Working image: 1. On the OrthoEngine window in the Processing step list, select GCP/TP Collection. A new toolbar with seven icons appears in the main panel. The icons on the toolbar access functions for GCP and TP collection. Figure 3.4 GCP/TP Collection toolbar 2. On the GCP/TP Collection toolbar, click Open a new or existing image. The Open Image dialog box opens. Both QuickBird images are listed. 3. Select the 02SEP19175401-M1BS-000000184308_01_P001.TIF file and click Open. The Database Channels dialog box opens. 4. Below the list of Database Channels, click 3, 2, 1. In this case, 1:3, 2:2, 3:1 will load a true color composite. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 58 PCI Geomatics 5. Click Load & Close. A viewer opens displaying the 02SEP19175401-M1BS-000000184308_ 01_P001.TIF image in true color. 6. Close the Open Image dialog box. In this exercise, the crosshair will be placed at the location of the GCP in the viewer and the E, N coordinates will be entered manually into the GCP Collection dialog box. The elevation will be extracted from dem.pix. To set up for manual GCP collection: 1. On the GCP/TP Collection toolbar, select Collect GCPs Manually. The GCP Collection dialog box opens. 2. Beside the DEM box, click Browse. 3. From the QB_RPC folder, select dem.pix and click Open. The DEM File dialog box opens. This allows you to select the channel containing the DEM information in the file. There is only one channel in dem.pix. 4. Click OK. To collect the first GCP manually: 1. In the P001.TIF viewer, place the crosshair near the middle-left side of the image as shown in the figure below. Figure 3.5 Crosshair location for first GCP on P001.TIF PCI Geomatics 59 2. On the P001 viewer, click Use Point. The raw image coordinates for this location are transferred to the GCP Collection window. They should be approximately: 768.4 P 2077.6 L 3. For Easting (X), enter 480051.003. 4. For Northing (Y), enter 4419873.200. 5. On the GCP Collection dialog box, click Extract Elevation. 6. Click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0001. Note One image is always the Working image, while the other image is the Reference image. Click Reference on the viewer toolbar to change the status of an image to Working. To collect the second GCP manually: 1. In the P001.TIF viewer, place the crosshair near the right side of the image as shown in the figure below. Figure 3.6 Crosshair location for second GCP on P001.TIF OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 60 PCI Geomatics 2. On the P001 viewer, click Use Point. The raw image coordinates for this location are transferred to the GCP Collection window. They should be approximately: 5487.0 P 1983.1 L 3. For Easting (X), enter 492915.256. 4. For Northing (Y), enter 4419851.443. 5. On the GCP Collection dialog box, click Extract Elevation. 6. Click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0002. Tip This is a good time to save your project file. Collecting GCPs for the Second Image To open the second image as the Working image: 1. On the GCP/TP Collection toolbar, click Open a new or existing image. The Open Image dialog box appears. Both QuickBird images are listed. 2. Select 02OCT15174416-M1BS-000000184308_01_P004.TIF and click Open. The Database Channels dialog box appears. 3. Below the list of Database channels, click 3, 2, 1. In this case, 1:3, 2:2, 3:1 will load a true color composite. 4. Click Load & Close. A viewer opens displaying 02OCT15174416-M1BS- 000000184308_01_P004.TIF in true color. This is now the Working image. 5. Click Close. Ground control points collected with a GPS will often be delivered in a text file. Each point will have X, Y, E and possibly point Id information. Before you collect ground control points in the field, you need to ensure that you can clearly see that location in the raw image. The pixel and line coordinates for the uncorrected image must be determined manually and transferred to the GCP Collection dialog box. The GCPs for 02OCT15174416-M1BS-000000184308_01_P004.TIF will be transferred to the GCP Collection dialog box from a text file containing the X, Y, Z values for each point. The pixel/line coordinate will be determined by manually locating the GCP on the raw image. PCI Geomatics 61 To import GCPs from a text file: 1. For the Ground control source in the GCP Collection dialog box, select PIX/ Text file. The Read GCP from PIX/Text File dialog box opens. 2. Click Select and navigate to the QB_RPC\P004 folder. 3. Select 004.gcp and click Open. 4. Under Sample formats, choose IXYE. IXYE Format The format of the 004.GCP file is IXYE, which means that each row of text contains the following information from left to right: * The GCP ID (I) * The georeferenced East/West coordinate (X) * The georeferenced North/South coordinate (Y) * The elevation (E) The Pixel and Line position for each point will be taken from the uncorrected P004 image. 5. Click Apply Format. The GCPs are listed under GCPs extracted from file. Figure 3.7 Read GCP From Text File dialog box for GCPs with IXYE information 6. Click OK. The GCP Text file dialog box opens. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 62 PCI Geomatics To locate the GCPs on the raw image: 1. In the GCP Text File dialog box, select G0003 and click Transfer to GCP collection panel. The IXYE coordinate is transferred to the GCP Collection dialog box. If Auto locate is selected in the GCP Collection dialog box, OrthoEngine estimates the position of the GCP in the uncorrected image. In the viewer for P004, the crosshair has automatically moved near the correct position for G0003. 2. Refer to the figure below to more accurately position the crosshair on the uncorrected P004 image. Figure 3.8 Location of G0003 on P004 3. When you are satisfied with the position of the crosshair, click Use Point on the toolbar for the P004 viewer. The image coordinates for G0003 are transferred to the GCP Collection dialog box. They should be approximately: 6152.5 Pixel 7197.5 Line 4. In the GCP collection dialog box, click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0003. 5. In the GCP Text File dialog box, select G0004 and click Transfer to GCP collection panel. 6. Use the figure below to more accurately position the crosshair on the uncorrected P004 image. PCI Geomatics 63 Figure 3.9 Location of G0004 on P004 7. When you are satisfied with the position of the crosshair, click Use Point on the toolbar for the P004 viewer. The image coordinates for G0013 are transferred to the GCP Collection dialog box. They should be approximately: 1789.0 Pixel 1531.5 Line 8. In the GCP collection dialog box, click Accept. The GCP information is moved to the Accepted Points list for the GCP with Point ID G0004. Tip This is a good time to save your project file. Collecting Stereo GCPs A stereo ground control point (GCP) is a cross between a regular GCP and a tie point. It is a feature with known ground coordinates that you can clearly identify in two or more images. They have the same Point ID, Easting and Northing coordinates and elevation value, but the pixel and line location is different in each image. They are used to determine the stereo parallax between two or more images. Before collecting stereo GCPs, ensure that both overlapping images and the GCP Collection dialog box are open. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 64 PCI Geomatics To collect Stereo GCPs: 1. Make P001.TIF the Working image. 2. In the GCP Collection dialog box, locate and select Point ID G0001. The GCP image and georeferenced position information is loaded based on the P001 image. 3. Switch the P004.TIF image from Reference to Working. A list of GCPs collected for the Working image appears in the GCP Collection dialog box. The identification of the desired stereo point, G0001, is listed in the GCP Collection dialog box for P004. The Georeferenced Position information for this point is shown in the dialog box. However, the Image Position information for the Working image is not available, since you have not yet associated the point G0001 with P004. 4. Place your cursor on the feature corresponding to point G0001 on P004.TIF and click Use Point and then click Accept. The Image Position information updates in the GCP Collection dialog box. This point is now registered to the same georeferenced location for both overlapping images, making it a Stereo GCP. To change the RPC Adjustment Order: * On the GCP Collection dialog box, change the RPC adjustment order from 0 to 1. A first-order transformation will be applied. Check Points In the GCP Collection dialog box, to the right of the Point ID text box, you can select whether the current point is a Ground Control Point (GCP) or a Check Point (Check). A GCP is used in computing the geometric model, whereas a Check Point is used to check the accuracy of the computed geometric model. Check Points are not used in the model calculations. To create a Check Point: 1. Select P004.TIF as the Working image. 2. In the GCP Collection dialog box, select G0004. 3. From the list beside the Point ID box, select Check. 4. Click Accept. This point is now a Check Point and is not included in the bundle adjustment. To convert a Check Point to a GCP: 1. In the GCP Collection dialog box, select G0004. 2. From the menu below the Point ID text box, select GCP. 3. Click Accept. The point is now a GCP again and is included in the bundle adjustment. PCI Geomatics 65 Tip This is a good time to save your project file. Collecting Tie Points Manually Term A tie point is a feature that you can clearly identify in two or more images that you can select as a reference point. Tie points do not have known ground coordinates, but you can use them to extend ground control over areas where you do not have ground control points (GCPs). Used in rigorous models such as Aerial Photography and Satellite Orbital (high and low resolution) math models, tie points identify how the images in your project relate to each other. Although the RPC method only requires a small number of GCPs and TPs, high accuracy may not be achieved if the GCPs are not well distributed within the block. To improve the accuracy, a DEM can be used if it is available. During each bundle adjustment iteration, the computed elevation of each tie point can be replaced by the elevation at the computed TP X and Y coordinates from the DEM, similar to the results of changing the planimetric TPs into altimetric points. This method also helps to improve the relative accuracies between the ortho images, which helps to minimize differences during the mosaicking process. To set up for manual tie point collection: 1. On the GCP/TP Collection toolbar, click Collect tie points. 2. The Tie Point Collection dialog box opens. 3. In the Tie Point Collection dialog box, select Compute Model. Residual errors are calculated for each TP and are listed in the Residual column. Residual errors are the difference between the coordinates that you entered for the ground control points (GCPs) or tie points and where those points are according to the computed math model. 4. In the Auxiliary Information area, click Select. 5. From the QB_RPC folder, select dem.pix and click Open. The DEM File dialog box opens where you select the channel containing the DEM information. This will be your source of elevation for your tie points. Entering tie point elevation is optional. You can either load a DEM or select the Elevation option and manually enter the elevation. The elevation of the tie point is automatically incorporated into the math model. 6. Click OK. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 66 PCI Geomatics In the figure below, the area of overlap between the two QuickBird images is represented by a black rectangle. Figure 3.10 Overlap area outlined by a black rectangle To collect tie points: 1. Make P004.TIF the Working image. 2. Find a location in P004.TIF that can also be clearly seen in the overlap area in P001.TIF, zooming in as necessary. 3. Place the cursor at this location and click Use Point. If Auto locate is selected in the Tie Point Collection dialog box, OrthoEngine estimates the position of the Tie Point on P001.TIF. You need to refine the position of the crosshair on P001.TIF before accepting the tie point on this image. 4. Place the cursor at the same location in P001.TIF, zooming in as necessary. 5. In the P001.TIF viewer, click Use Point. 6. In the Tie Point Collection dialog box, click Accept. The point is listed in the Accepted Tie Points table. 7. Collect at least two more tie points. Ensure the tie points and GCPs are well distributed. Tip This is a good time to save your project file. PCI Geomatics 67 Collecting Tie Points Automatically Automatic Tie Point collection is used to eliminate the time consuming and repetitive task of identifying common points between overlapping images. Image correlation techniques are used to find matching points in a particular distribution in your imagery. To collect tie points automatically: 1. On the GCP/TP Collection toolbar, click Automatically collect tie points. The Automatic Tie Point Collection dialog box opens. 2. Set up the Automatic Tie Point Collection dialog box as shown in the figure below. Figure 3.11 Automatic Tie Point Collection dialog box 3. Click Collect Tie Points. A progress bar appears at the bottom of the dialog box to monitor the status. After the process is complete, a message box opens indicating the total number of tie points found. 4. Click OK to exit the Message box. 5. Click Close. Tip This is a good time to save your project file. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 68 PCI Geomatics Verifying Automatic Tie Points Automatic tie points should always be verified to ensure that a given point was collected for the same feature in your imagery. This is especially important if there are clouds, shadows or snow in the imagery as the image correlation technique used for the TP collection process sometimes fails in these regions. To verify the automatic tie points: 1. On the GCP/TP Collection toolbar, click Collect tie points. The Tie Point Collection dialog box opens. 2. Ensure that the Auto Locate option is selected. 3. In the Tie Point Collection dialog box, click the tie points that have an ID beginning with A one at a time. The viewers update to display the imagery at 1:1 resolution centered on the selected TP. 4. If an automatic TP does not fall on the same feature in both images, select the TP in the Tie Point Collection dialog box and click Delete. 5. Once you are finished verifying the automatic tie points, click Close. Tip Each automatic TP should be checked as even TPs with a low RMS can be incorrectly placed on two different features. Tip This is a good time to save your project file. Displaying the Layout of the Images The Image Layout feature is a quality control tool that reveals the relative positioning of the image footprints and displays a plot of the distribution of the ground control points (GCPs) and tie points for the entire project. To check the layout of your images: 1. On the GCP Collection toolbar, click Display overall image layout. The Image Layout window opens. The Overview area shows the center of each image in the project. The top of the window points northward. 2. Under Overview, click a crosshair to reveal the image's footprint. In the right side of the window, the selected image is displayed with a red frame, while the other image is framed in blue. The GCPs are displayed as red squares, while the TPs are displayed as blue squares. PCI Geomatics 69 Figure 3.12 Image Layout window 3. To open an image, double-click the image footprint or click Quick Open. 4. If you are not satisfied with the distribution, edit your GCPs and tie points. 5. Click Close. Calculating the Sensor Model When the model is calculated, the image is not manipulated. OrthoEngine simply calculates the position and orientation of the sensor at the time when the image was taken. The computation of a rigorous math model is often referred to as a bundle adjustment. The math model solution calculates the position and orientation of the sensor at the time when the image was taken. Once the position and orientation of the sensor is identified, it can be used to accurately account for known distortions in the image. To run the bundle adjustment: 1. There are three ways you can update the bundle in OrthoEngine: * By activating the Compute Model option in the GCP or Tie Point Collection dialog box * By clicking Compute Model in the Model Calculations Processing step * By clicking Compute Model in the Residual Reports dialog box 2. Delete any GCPs or tie points that have high residuals in the project. Now that the model has been computed, you can extract a DEM, extract features in 3D, orthorectify and/or mosaic the images. Because there is little overlap between these QuickBird images, you will only orthorectify and mosaic the images. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 70 PCI Geomatics Orthorectification Orthorectification is the process of using a rigorous math model and a digital elevation model (DEM) to correct distortions from the platform, the sensor, earth terrain and curvature and cartographic projection in raw images. The rigorous math models, such as the Aerial Photography or Satellite Orbital math models, provide a method to calculate the position and orientation of the sensor at the time when the image was taken. The DEM is a raster of terrain elevations. The Ortho Photo Production dialog box sets up and schedules the photos for orthorectification. Several photos can be selected and processed in batch mode. In this exercise, you will set up and orthorectify two QuickBird images. To set up the images: 1. On the OrthoEngine window in the Processing step list, select Ortho Generation. A new set of tools appears. Figure 3.13 Ortho Generation toolbar 2. Click Schedule ortho generation. The Ortho Image Production dialog box opens. 3. In the Available Images list, use the Shift key to select both images. 4. Click the arrow to move the images to the Images to Process list. 5. In the Images to Process list, select the 02SEP19175401-M1BS- 000000184308_01_P001.TIF file. 6. In the Ortho Image section, enter the File name oP001.pix. This will be the output file name for the ortho image. 7. In the Images to Process list, select the 02OCT15174416-M1BS- 000000184308_01_P004.TIF file. The 02OCT15174416-M1BS-000000184308_01_P004.TIF image is highlighted. 8. In the Ortho Image section, enter the File name oP004.pix. This will be the output file name for the ortho image. PCI Geomatics 71 Figure 3.14 Ortho Photo Production dialog box Selecting the Digital Elevation Model A digital elevation model (DEM) is a digital file of terrain elevations for ground positions. It is a raster representing the elevation of the ground and objects, such as buildings and trees, with pixel values in the images. In most cases, the best source of elevation for your project is a good DEM. You may want to use a DEM when you are orthorectifying an image to provide geometric correction for relief displacement, or when you do not have surveyed elevation measurements for your ground control points (GCPs) and/or tie points. You should make sure that the DEM will provide the level of accuracy that you require for your project, and that it includes the features that you are trying to analyze. A DEM's accuracy depends on: * The scale of the source data * The spacing of the data samples To locate the DEM: 1. In the DEM section, click Browse. 2. From the QB_RPC folder, select the file dem.pix and click Open. The Database Channels dialog box opens. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 72 PCI Geomatics Background Elevation Background elevation represents those areas inside the DEM for which there is no data provided. For DEMs generated by OrthoEngine, the background elevation defaults to -150. Other DEMs have different background elevation values that you must know before they can be used. Note It is critical that the background elevation be set to the correct value, if there are areas of no data in the DEM. To set the background elevation: 1. After selecting the DEM file, click DEM Info in the Database Channels dialog box. A message box appears and shows the three lowest and three highest values on the DEM. 2. Look for any large positive or negative value inside the DEM such as -9999. This may be a background value. 3. Click OK to exit the DEM Info message box. 4. For the current project, there is no background elevation but you can enter the value -150 in the Background Elevation box. To select the DEM: 1. Click OK in the Database Channels dialog box. The Database Channels dialog box closes. The DEM is selected. 2. After selecting the DEM, click Recompute Ortho Bound. This will reset the Upper Left and Lower Right values, which represent the computed footprint of the image on the ground. To generate the ortho images: 1. Click Generate Orthos. The Ortho Production Progress monitor opens and shows the status of the orthorectification process for each image. After all the orthos are generated, the following message appears: All Processing Completed. 2. Click Close. The message Ortho done appears beside each image in the Available Images list, indicating that the original images are now orthorectified. The files containing the corrected images are named oP001.pix and oP004.pix. Tip This is a good time to save your project file. PCI Geomatics 73 Defining Bitmaps Bitmaps are pseudo-images. They have the same pixel and line dimensions as the image data in the PCIDSK file, however, each pixel of a bitmap is only 1-bit deep. In other words, the gray value of a bitmap pixel can be either zero (pixel not "on") or one (pixel "on"). Bitmap pixels with a value of one will be visible (they take on the color of the graphic plane in which they are loaded). Bitmaps are used most commonly for delineating masks or training areas. You will now launch Focus to create a bitmap mask to exclude cloud and shadow areas from the calculation of the color balancing histogram when performing automatic mosaicking. To launch Focus: * On the Geomatica Toolbar, click the Focus icon. The Focus window opens. To create a bitmap layer: 1. From the QB_RPC folder, open the oP001.pix file. This is the orthorectified image you just created. 2. In the Maps tree, right-click the New Area and select New Bitmap Layer. The New Bitmap dialog box opens. Figure 3.15 New Bitmap dialog box 3. In the New Bitmap dialog box, select Use Layer Georeferencing. 4. For the source of the layer georeferencing, select oP001.pix. 5. Click OK. A New Bitmap Layer is added to the Maps tree under the area you selected. Now that you have created a new empty bitmap layer, you will define mask areas over the clouds and shadows in the image. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 74 PCI Geomatics To define mask areas: 1. Make sure the New Bitmap Layer is selected in the Maps tree. 2. On the Editing toolbar, click the New Shapes arrow and select Polygon. Figure 3.16 Polygon New Shapes tool 3. In the Focus viewer, trace the outline of the polygon by clicking at the end of each line segment. Figure 3.17 Defining bitmap masks PCI Geomatics 75 4. To complete the polygon, double-click near the first point in the mask area. The polygon is automatically closed and filled. 5. Identify other areas in the image you want to exclude when calculating the color balancing histogram in automatic mosaicking. These can include areas of cloud, shadow or very dark water areas. To edit the mask areas: 1. On the Editing toolbar, click the Raster Erase arrow and select Erase Polygon. 2. Use your mouse to trace over the pixels you want to remove from the mask area. 3. Double-click to erase. Now that you have defined the bitmap mask of the areas to be removed from calculating the color balancing, you will save the bitmap layer to the ortho image. To save the bitmap layer: 1. In the Maps tree, right-click the New Bitmap Layer and select Save. The New Item Detected dialog box opens. Figure 3.18 New Item Detected dialog box 2. From the File list, select oP001.pix. 3. In the Layer text box, enter Bitmap Mask Layer and click Save. The bitmap layer is saved to the ortho image file and is listed as a bitmap layer in the Files tree. OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 76 PCI Geomatics Mosaicking Term Mosaicking is joining together several overlapping images to form a uniform image. Defining a Mosaic Area Before you create a mosaic, you need to define an empty mosaic file. To define the Mosaic Area: 1. On the OrthoEngine window in the Processing Step list, select Mosaic. A new toolbar with four icons appears. The toolbar contains functions for defining a mosaic area, manual mosaicking, reapplying manual mosaicking, and automatic mosaicking. Figure 3.19 Mosaic toolbar 2. On the Mosaic toolbar, click Define mosaic area. The Define Mosaic Area dialog box opens. Figure 3.20 Define Mosaic Area dialog box PCI Geomatics 77 By default the bounds of the Mosaic Area are the maximum extents of the images in the project. The size of the mosaic area can be changed manually using your mouse. Alternatively, you can enter corner coordinates for the mosaic area. For this exercise, you will use the default maximum extents of the images in the project. 3. Click Create Mosaic File. 4. In the File box, type auto_mosaic.pix. 5. Click Create Later. By clicking Create Layer, the mosaic file and the automatic mosaic will be created at the same time. You are now ready to automatically mosaic your images. Automatic Mosaicking To mosaic the files automatically: 1. On the Mosaic toolbar, click Automatic Mosaicking. 2. Set up the Automatic Mosaicking dialog box as shown in the figure below. Figure 3.21 Automatic Mosaicking dialog box OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 78 PCI Geomatics Note Pixels values under the mask will be ignored when calculating the color balancing if Ignore pixels under bitmap mask is select. OrthoEngine uses the last bitmap segment in each image file as the mask. 3. Click Generate Preview. This creates a low-resolution version of the mosaic. It is saved in the file that you entered in the Preview file box. Figure 3.22 Mosaic Preview window Note Mosaic previews are useful for testing the results of several mosaic parameter settings and inputs through lower resolution mosaic previews. This saves time and disk space traditionally used in experimenting with mosaic parameter settings through the generation of full-resolution mosaics. 4. Click Generate Mosaic. This creates a full-resolution version of the mosaic. A message window appears after the mosaic is generated to indicate that automatic mosaicking is complete. 5. Click Close. PCI Geomatics 79 Viewing the Mosaic To view the mosaic: 1. From the File menu on the OrthoEngine window, select Image View. The File Selector dialog box opens. 2. From the QB_RPC folder, select auto_mos.pix and click Open. A viewer opens and displays the mosaic. Alternatively, you can open the mosaic in Focus. Figure 3.23 View of the mosaic In this exercise you: * Created a Rational Functions project with the Extract from Image File option * Input two QuickBird images in TIFF format * Collected GCPs and TPs * Orthorectified the images * Defined bitmaps for exclusion in color balancing * Automatically mosaicked the two images OrthoEngine Workbook - Exercise 3: Rational Functions - QuickBird RPC Project 80 PCI Geomatics PCI Geomatics 81 Exercise 4 ASTER DEM Extraction and DEM Editing The ASTER Earth Observation Satellite offers nearly simultaneous capture of stereo images, minimizing temporal changes and sensor modeling errors. Band 3 of the VNIR sensor includes two channels, a Nadir looking scene and a Backward looking scene. This provides stereo coverage from which a DEM can be automatically extracted. Aster Level 1A and Level 1B are both supported for DEM extraction and orthorectification by OrthoEngine. Each processing level has its own set of benefits and draw backs that you need to consider. Level 1A is not corrected, level 1B is and therefore has the potential to produce less accurate results than level 1A when you are using quality ground control (the difference is negligible if you are relying on the GCPs supplied with the sensor). Level 1A also enables you to use the stitching function to stitch continuous scenes from the same path. This can reduce the number of GCPs and tie points required and reduces the seam you may get mosaicking DEMs from the same path. Level 1A has an offset in the SWIR bands that is fairly significant so if you need these bands for multi-spectral analysis you may want to consider level 1B as this offset is corrected for in level 1B, but not level 1A. Also level 1B has been rotated so the stitching routine cannot be used with level 1B imagery. In this exercise you will start a Satellite Orbital Modelling project. You will import the 3n and 3b images to two separate PCISDSK files. Tie points will be collected for the project to improve the math model computed from the pseudo GCPs. After extracting the epipolar images, a DEM will be extracted and edited. The data from this project can be found in the ASTER folder. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 82 PCI Geomatics Work Flow for Satellite Orbital Modelling Create a Project Input Data Collect GCPs/TPs Calculate Sensor Model Orthorectification Mosaicking Manual Automatic Use Existing DEM Extract DEM from Stereo Images Build DEM from * Lines/Points * GCPs/Match Points * Contours * Rasters * TINs Data Preparation Data Extraction Data Correction 3D Viewing 3D Feature Extraction PCI Geomatics 83 Substituting the DEM Aster data is delivered with a set of pseudo GCPs that do not have elevation. If you do not collect any GCPs for your project, OrthoEngine assumes an elevation for the pseudo GCPs by using the USGS GTOPO30 DEM of the world which has been downsampled to 4 km. This dataset (demworld.pix) is included with your Geomatica installation and can be found in the etc folder. If you have a DEM of higher resolution for your area of interest, you can rename it demworld.pix and place it in the etc folder. Using a DEM with finer resolution will improved the accuracy of your model. To substitute a higher resolution DEM for demworld.pix: 1. Open an Explorer window to see the files on your hard drive. 2. Navigate to the etc folder in the Geomatica_v10 folder. 3. Rename the file demworld.pix to demworld_bk.pix. 4. Copy the file SRTM_dem.pix from ASTER to the etc folder. 5. Rename SRTM_dem.pix to demworld.pix. Starting a New Project OrthoEngine works on a project-by-project basis. Therefore, you need to open an existing project or create a new project before you gain access to the functions within OrthoEngine. In this exercise, you will create a new project. To start a new project: 1. From the File menu on the OrthoEngine window, click New. The Project Information dialog box opens. 2. Click Browse and locate the ASTER folder. 3. For the File name, enter aster_dem.prj. 4. Click Open. The path and file name appear in the File name box in the Project Information dialog box. 5. In the Name box, enter ASTER DEM Project. 6. In the Description box, enter ASTER project - no ground control. 7. For the Math Modelling Method, select Satellite Orbital Modelling. 8. Under Options, select Toutin's Model (Low Res). 9. Click OK. The Project Information dialog box closes. The Set Projection dialog box opens. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 84 PCI Geomatics Setting the Projection Parameters Projection information for the data can be obtained from the metadata that accompanies the ASTER HDF file (*.hdf.met file). This metadata file can be opened in a text editor to view the approximate georeferencing of the corner coordinates for the file. To enter the projection parameters: 1. Enter the projection parameters in the Set Projection dialog box as shown in the figure below. Figure 4.1 Set Projection dialog box 2. Click OK. Adding Images to the Project To read the ASTER 3N data to PCIDSK: 1. On the OrthoEngine window in the Processing step list, select Data Input. A new toolbar with four icons appears on the OrthoEngine window. With the Data Input toolbar, you can input data from either CD-ROM, tape, PCIDSK file, or a generic image file. Figure 4.2 Data Input toolbar 2. On the Data Input toolbar, click Read CD-ROM data. The Read CD-ROM dialog box opens. 3. Fill in the Read CD-ROM dialog box based on the information in the figure below. PCI Geomatics 85 Figure 4.3 Read CD-ROM dialog box for the 3N channel 4. Click Read. A Progress Monitor opens showing the status of the operation. To read the ASTER 3B data to PCIDSK: 1. In the Read CD-ROM dialog box, click 3N to clear this channel as the Requested channel. 2. Beside Requested channels, click 3B. 3. Fill in the Read CD-ROM dialog box based on the information shown in the figure below. Figure 4.4 Read CD-ROM dialog box for the 3B channel 4. Click Read. 5. Click Close. Tip This is a good time to save your project file. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 86 PCI Geomatics Stitching Image Tiles Some ASTER, IKONOS, QuickBird, and SPOT images may be delivered to you as image tiles with orbital data for each tile. If the image tiles were cut from a strip of data acquired on the same day in a single pass of the satellite, you can stitch the tiles into one image and rebuild the orbital data for the whole strip. Therefore, you can work with one large image instead of working with several smaller images, which offers some advantages: * Fewer images to orthorectify and mosaic. * Fewer ground control points (GCPs) to collect since you have to compute fewer math models. * More coverage by the math model by bridging over obscured areas, such as areas under cloud cover, where you cannot collect GCPs. However, computing the math model on the image tiles may provide better fit to the ground control than a math model for a large scene. Note For ASTER, only level 1A data can be stitched as the level 1B data has been rotated. Once you have read each tile to a PCIDSK file, you can stitch each 3N tile into one image and each 3B tile into one image. To open the Stitch Image Tiles dialog box: * From the Utilities menu, select Stitch Image Tiles. The Stitch Image Tiles dialog box opens. Figure 4.5 Stitch Image Tiles dialog box You do not need to use the Stitch Image Tiles tool in this exercise. PCI Geomatics 87 ASTER is not delivered with ephemeris data. Instead, the images include a set of computed Ground Control Points (GCPs) based on the ephemeris. The GCPs included with ASTER imagery are often referred to as pseudo GCPs since they do not include elevation values. If you do not collect any GCPs, approximate elevations are assumed for the pseudo GCPs using the USGS GTOPO30 DEM of the world which has been downsampled to 5 km. This dataset (demworld.pix) is included in your Geomatica installation and can be found in the etc folder. The nadir (3n) and backward-looking (3b) images do not use the same pseudo GCPs. In mountainous areas, it is likely that one or both of the images may tilt due to the GCPs that are being used. This may cause shifts between the two images. The prevent the two images from shifting relative to one another, tie points need to be collected. Tie points may still have high residuals because the model based on pseudo GCPs may have relative errors. However, the tie points will bring the images together and significantly improve the relative model. Note For ASTER imagery, pay particular attention to your tie point collection if you have not collected GCPs and are only using the pseudo GCPs provided with the data. Collect at least 20 TPs making sure to cover the edges well and ensure a good distribution through the middle of the scenes. Collecting Tie Points Manually To setup for manual tie point collection: 1. From the Processing step list, select GCP/TP Collection. 2. On the GCP/TP Collection toolbar, click Collect tie points. The Tie Point Collection dialog box and the Open Image window open. 3. In the Open Image window, double-click the 3b image, then double-click the 3n image. Each image is displayed in a viewer. 4. In the Tie Point Collection dialog box, select Compute Model. Residual errors will be calculated for each TP and are listed in the Residual column. Residual errors are the difference between the coordinates that you entered for the ground control points (GCPs) or tie points and where those points are according to the computed math model. 5. In the Auxiliary Information area, click Select. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 88 PCI Geomatics 6. From the ASTER folder, select SRTM_dem.pix and click Open. The DEM File dialog box opens where you select the channel containing the DEM information. This will be your source of elevation for your tie points. Entering tie point elevation is optional. You can either load a DEM or select the Elevation option and manually enter the elevation. The elevation of the tie point is automatically incorporated into the math model. 7. In the DEM file dialog box, enter a Background elevation of -150 and click OK. To improve the accuracy of the model, a DEM can be used if it is available. During each bundle adjustment iteration, the computed elevation of each tie point can be replaced by the elevation at the computed TP X and Y coordinates from the DEM, similar to the results of changing the planimetric TPs into altimetric points. This method also helps to improve the relative accuracies between the ortho images, which helps to minimize differences during the mosaicking process. To collect tie points manually: 1. Make 3n the Working image. 2. Find a location in 3n.pix that can be clearly seen in the overlap area in 3b.pix, zooming in as necessary. 3. Place the cursor at this location and click Use Point. If Auto locate is selected in the Tie Point Collection dialog box, OrthoEngine estimates the position of the Tie Point on P001.TIF. You need to refine the position of the crosshair on 3b.pix before accepting the tie point on this image. 4. Place the cursor at the same location in 3b.pix, zooming in as necessary. 5. In the 3b viewer, click Use Point. 6. In the Tie Point Collection dialog box, click Accept. The point is listed in the Accepted Tie Points table. 7. Collect at least seven additional tie points. Tip This is a good time to save your project file. PCI Geomatics 89 Collecting Tie Points Automatically Automatic Tie Point collection is used to eliminate the time consuming and repetitive task of identifying common points between overlapping images. Image correlation techniques are used to find matching points in a particular distribution in your imagery. To collect tie points automatically: 1. On the GCP/TP Collection toolbar, click Automatically collect tie points. The Automatic Tie Point Collection dialog box opens. 2. Set up the Automatic Tie Point Collection dialog box as shown in the figure below. Figure 4.6 Automatic Tie Point Collection dialog box 3. Click Collect Tie Points. A progress bar appears at the bottom of the dialog box to monitor the status. After the process is complete, a message box opens indicating the total number of tie points found. 4. Click OK to exit the Message box. 5. Click Close. Tip This is a good time to save your project file. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 90 PCI Geomatics Verifying Automatic Tie Points Automatic tie points should always be verified to ensure that a given point was collected over the same feature on your imagery. This is especially important if there are clouds or snow in the imagery as the image correlation technique used for the TP collection process sometimes fails in these regions. There is some cloud cover in the southern portion of the images. Any tie points collected over clouds should be deleted. To verify the automatic tie points: 1. On the GCP/TP Collection toolbar, click Collect tie points. The Tie Point Collection dialog box opens. 2. Ensure that the Auto Locate option is selected. 3. In the Tie Point Collection dialog box, click the tie points that have an ID beginning with A one at a time. The viewers update to display the imagery at 1:1 resolution centered on the selected TP. 4. If an automatic TP does not fall on the same feature in both images, select the TP in the Tie Point Collection dialog box and click Delete. 5. Once you are finished verifying the automatic tie points, click Close. Tip Each automatic TP should be checked as even TPs with a low RMS can be incorrectly placed on two different features. Displaying the Layout of the Images The Image Layout feature is a quality control tool that reveals the relative positioning of the image footprints and displays a plot of the distribution of the ground control points (GCPs) and tie points for the entire project. To check the layout of your images: 1. On the GCP Collection toolbar, click Display overall image layout. The Image Layout window opens. The Overview area shows the center of each image in the project. The top of the window points northward. 2. Under Overview, click a crosshair to reveal the image's footprint. In the right side of the window, the selected image is displayed with a red frame, while the other image is framed in blue. The TPs are displayed as blue squares and if there were any GCPs in the project, they would be displayed in red. PCI Geomatics 91 Figure 4.7 Image Layout dialog box 3. To open an image, double-click the image footprint or click Quick Open. 4. If you are not satisfied with the distribution, edit your GCPs and tie points. 5. Click Close. Calculating the Sensor Model When the model is calculated, the image is not manipulated. OrthoEngine simply calculates the position and orientation of the sensor at the time when the image was taken. The computation of a rigorous math model is often referred to as a bundle adjustment. The math model solution calculates the position and orientation of the sensor at the time when the image was taken. Once the position and orientation of the sensor is identified, it can be used to accurately account for known distortions in the image. To run the bundle adjustment: 1. There are three ways you can update the bundle in OrthoEngine: * By activating the Compute Model option in the GCP or Tie Point Collection dialog box * By clicking Compute Model in the Model Calculations Processing step * By clicking Compute Model in the Residual Reports dialog box 2. Delete any GCPs or tie points that have high residuals in the project. Now that the model has been computed, you can extract a DEM, extract features in 3D, orthorectify and/or mosaic the images. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 92 PCI Geomatics Creating Epipolar Images Epipolar images are stereo pairs that are reprojected so that the left and right images have a common orientation, and matching features between the images appear along a common x axis. Using epipolar images increases the speed of the correlation process and reduces the possibility of incorrect matches. To create the epipolar images: 1. From the Processing step list, select DEM From Stereo. A new toolbar with five icons appears. Figure 4.8 DEM From Stereo toolbar 2. On the DEM From Stereo toolbar, click Create Epipolar Image. 3. Set up the Generate Epipolar Images dialog box as shown in the figure below. Figure 4.9 Generate Epipolar Images dialog box PCI Geomatics 93 4. Click Save Setup. This saves the epipolar image generation options and uses them for batch processing with Automatic DEM Extraction. 5. Click Close. Extracting the DEM In OrthoEngine, you have the option of extracting and geocoding a DEM in one processing step. When you use the Automatic DEM Extraction dialog box to complete the entire process in one operation, OrthoEngine builds a model based on all the selected epipolar pairs and uses that model when the DEMs are geocoded. The geocoded DEMs are automatically stitched together and saved in a file. Because OrthoEngine uses a model to process all the epipolar pairs, the resulting integrated geocoded DEM is slightly more accurate than if you completed the process manually. In this exercise, you will not extracting and geocoding the DEM in one step because the extracted DEM requires editing over the water and clouds. You will take advantage of the epipolar image channel in the epipolar DEM to edit the DEM. An epipolar DEM file contains at least two channels, the DEM and a copy of the epipolar image. A score channel can also be optionally included. The score channel will be discussed later in this exercise. To extract the epipolar DEM: 1. On the DEM From Stereo toolbar, click Extract DEM automatically. 2. Setup the Automatic DEM Extraction dialog box as shown in the figure below. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 94 PCI Geomatics Figure 4.10 Automatic DEM Extraction dialog box 3. Click Extract DEM. A Progress Monitor opens showing the status of the extraction process. 4. When the DEM has extracted, click Close. Tip This is a good time to save your project file. Editing the Epipolar DEM DEMs may contain pixels with failed or incorrect values. You can edit a DEM to smooth out irregularities and create a more accurate model. For example, areas such as lakes often contain misleading elevation values; setting those areas to a constant value improves the model. Before you geocode the extracted DEM, you will edit the epipolar DEM to take advantage of the epipolar image data in 3n_3b_dem.pix. To set up for DEM editing: 1. On the DEM From Stereo toolbar, click Manually edit generated DEM. Geomatica Focus and the DEM Editing dialog box open. 2. In the DEM Editing dialog box, click Browse. 3. From the ASTER folder, select 3n_3b_dem.pix and click Open. PCI Geomatics 95 4. From the Layer list, select channel 3. A Geomatica Focus message window opens asking if you would like to display the raster with File or Math Model georeferencing. 5. Select File and click OK. 6. In the DEM Special Values section, enter a value of -100 for Failed and -150 for Background. 7. In the Output section, select the Save option. 8. From the File list, select 3n_3b_dem.pix. 9. From the Layer list, select New Layer. Note If you want to apply the edits repeatedly and achieve a cumulative effect on the data, enable the Load results to input check box. Figure 4.11 DEM Editing dialog box To set up bitmaps and the image layer: 1. In Focus, click the Files tab. 2. In the Files tree, expand the list of Rasters for 3n_3b_dem.pix. 3. Right-click channel 1 and select View As Grayscale. The epipolar image is displayed in the view area. 4. In the Files tree, right-click the 3n_3b_dem.pix file and select New Bitmap Layer. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 96 PCI Geomatics 5. Repeat step 4 to add 3 additional New Bitmap layers. 6. Rename the bitmaps in the Files Tree according to the following table: Now that you have added the new bitmap layers, you will use the Raster Seeding tool to grow and fill regions of similar pixels. The resulting bitmap masks will be used for DEM editing. To use the Raster seeding tool: 1. In the Files tree, right-click bitmap layer 4 and click View. The empty bitmap layer is listed in the Maps tree. 2. In the Maps tree, select bitmap layer 4. 3. On the Editing toolbar, click the New Shapes arrow and select Raster Seeding. The Raster Seeding dialog box opens. Figure 4.12 Raster Seeding dialog box 4. For the Selection criteria, select channel 1. This is the epipolar image. 5. For the Input pixel value tolerance, enter 3. 6. On the Zoom toolbar, click Zoom to Overview. Note If you change the zoom level for the image, the Raster Seeding dialog box will close. Make sure you reset the Input Layer in the Raster Seeding dialog box to channel 1. Table 1: Bitmap names for 3n_3b_dem.pix Segment number Bitmap name 4 Adriatic Sea 5 large lake 6 small lake 7 clouds and shadow PCI Geomatics 97 7. With the Raster Seeding dialog box open, click the open water at the right of the image and the small area in the bottom left corner. The bitmap is created for pixels with +/- 3 DN based on the seed pixel where you clicked. Figure 4.13 Mask of the Adriatic Sea Note You can vary the tolerance of the growth in the Raster Seeding panel to slowly adjust the size of the grown region. Higher tolerance settings create large growth regions and lower tolerance settings create smaller growth regions. You can use the Raster Seeding function in conjunction with the Undo command to grow regions of various sizes. To fill and edit the remaining water bodies: 1. Display bitmaps 5 and 6. 2. Repeat this raster seeding process for the remaining water bodies in the image. The Output Layer should be bitmap 5 for the large lake at the top of image and bitmap 6 for the small lake below the large lake. Make sure you use channel 1 as the Selection criteria for the seeding of each of the lakes. 3. Use the figure below as a guide for where to begin the seeding for each bitmap segment. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 98 PCI Geomatics Figure 4.14 Location of water bodies in the epipolar image. The numbers on the image indicate the start location for raster seeding and the corresponding output bitmap segment. 4. Clean up the bitmap mask 4 using the Polygon tool to include haze and cloud pixels over the sea that were not included during seeding. 5. In the Maps tree, right-click each of the bitmap layers and click Save. Using the Mask Operations in the DEM Editing dialog box, you can either create or load existing bitmap masks. You will remove the bitmap masks you created from the Maps tree and load them through the DEM Editing dialog box. To remove the bitmaps from the Maps tree: * Right-click each bitmap layer and click Remove. To open a bitmap layer and fill an area with a constant elevation: 1. Under Mask Operations in the DEM Editing dialog box, click Open a Mask Layer. 2. From the File list in the Select Layer dialog box, select 3n_3b_dem.pix. 3. From Layers Available list, select 4 and click OK. Bitmap layer 4 is listed in the Maps tree and in the Mask Operations area in the DEM Editing dialog box. 4. In the Area Fills Under Mask area, select Specified Value from the Fill using list box. 5. Accept the default Value of 0 for this mask as it lies over the Adriatic Sea. PCI Geomatics 99 6. In the Area Fills Under Mask section, click Fill. The pixels under the mask are now assigned a value of 0. The output is saved into the new Channel 4 in which the edits will be applied repeatedly and cumulatively. 7. Repeat steps 1 to 6 to fill pixels under mask 5 with a value of 8. 8. Repeat steps 1 to 6 to fill pixels under mask 6 with a value of 19. 9. In the Maps tree, right-click bitmap layer 6 and click Remove. Unfortunately, much of the southern part of the image near the coast is obscured by cloud and shadows. The elevations extracted in these areas will not be valid. If the cloud cover was not so extensive, a mask could be created over the clouds and the elevations under the mask could be interpolated from surrounding pixels. For this particular image however, the areas affected by clouds are too large to use interpolation for editing. You will instead create a mask for the cloud and shadow areas. The elevations under the mask will be set to a new no data value. To fill mask 7 for the cloud and shadow areas: 1. In the Files tree, right-click bitmap layer 7 and click View. 2. In the Maps tree, clear the visibility of raster layer 4. 3. Select bitmap layer 7. 4. From the Editing toolbar, select the New Shapes Polygon tool and create a masks over the cloud and shadow areas that can be seen in the epipolar image. Zoom in as necessary to create a detailed bitmap. Figure 4.15 Bitmap mask over cloud and shadow area in epipolar image OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 100 PCI Geomatics 5. Once you have finished creating the mask for the cloud and shadow areas, right-click the bitmap layer and select Save. 6. Remove bitmap 7 from the Maps tree. To assign a background value to the cloud and shadow areas: 1. Under Mask Operations in the DEM Editing dialog box, click Open a Mask Layer. 2. From the File list in the Select Layer dialog box, select 3n_3b_dem.pix. 3. From Layers Available list, select 7 and click OK. 4. In the Area Fills Under Mask area, select Specified Value from the Fill using list box. 5. Enter a Value of -150 and click Fill. 6. In the Maps tree, right-click raster layer 4 and click Save. 7. Close the DEM Editing dialog box and Exit Focus. A background value was assigned to the cloud and shadow areas because you do not want elevations to be interpolated here during the geocoding of the DEM. You do however want to interpolate an elevation for the original no data value pixels outside of the cloud and shadow areas. This will be done automatically when geocoding the epipolar DEM. To geocode the DEM: 1. On the DEM From Stereo toolbar, click Geocode Extracted Epipolar DEM. The Geocode Extracted Epipolar DEM dialog box opens. Figure 4.16 Geocode Extracted Epipolar DEM dialog box 2. In the Input DEM area of the dialog box, click Browse. 3. From the ASTER folder, select 3n_3b_dem.pix and click Open. PCI Geomatics 101 4. Ensure that DEM channel 4 is selected. This is the New Layer where the DEM edits were saved. 5. For the Failure value, enter -100. 6. For the Background value, enter -150. 7. In the Output DEM area, click Browse and locate the ASTER folder. 8. For the File name, enter geo_dem.pix and click Open. 9. For the Pixel spacing, enter 60 m. 10. In the Fill holes list, select Yes. 11. Click Geocode DEM. A Progress Monitor opens to show the status of the operation. A message window opens when the geocoding is complete. To view the geocoded DEM: 1. From the File menu on the OrthoEngine window, select Image View. The File Selector dialog box opens. 2. From the ASTER folder, select geo_dem.pix and click Open. A viewer opens and displays the geocoded and interpolated DEM. Alternatively, you can open the mosaic in Focus. Figure 4.17 Geocoded DEM An additional step not included in this exercise would be to replace the background values over the cloud areas with data from the SRTM DEM. OrthoEngine Workbook - Exercise 4: ASTER DEM Extraction and DEM Editing 102 PCI Geomatics The Data Merge tool in Focus could be used to resample the SRTM data to the same projection and resolution as the geocoded DEM. You could then write an EASI model to create a bitmap for areas of cloud and shadow that have a background elevation value of -150 and replace these values with elevation values from the SRTM layer. In this exercise you: * Created a Satellite Modelling project * Imported the 3N and 3B bands of an ASTER image to PCIDSK files * Manually and automatically collected tie points * Extracted and edited an epipolar DEM * Geocoded the DEM PCI Geomatics 103 Exercise 5 Simple Math Modelling Polynomial Project Simple math models, such as Polynomial and Thin Plate Spline use ground control points (GCPs) to calculate a transformation that will warp the raw image to fit the ground coordinates. The warping of the raw image is known as geometric correction. Polynomial Method This transformation model creates a new geocoded image space, where interpolated pixel values are later placed during resampling. The procedure requires that polynomial equations be fitted to the GCPs using least squares criteria to model the correction in the image domain without identifying the source of the distortion. One of several polynomial orders may be chosen, based on the desired accuracy and the available number of GCPs. Thin Plate Spline Method Thin Plate Spline (TPS) provides an attractive alternative to the traditional polynomials. With this method, all GCPs are used simultaneously to derive the transformation. The derived functions have minimum curvature between control points and become almost linear at great distances from the GCPs. However, when using TPS to geo-register a photograph or an image in rough terrain, it is usually necessary to acquire hundreds of GCPs. The reason is that there needs to be a point at every extreme of the terrain, such as at peaks or valley bottoms and along breaklines. In general, the Polynomial method is best for the geo-registration of images with high relief, while the Thin Plate Spline method is best for images with low relief. Rational Functions Compute from GCPs Option The Rational Functions math model solution uses the GCPs to build a relationship between the pixels and the ground locations. The math model is computed for each image separately. It uses a ratio of two polynomial functions to compute the image row, and a similar ratio to compute the image column. All four polynomials are functions of three ground coordinates: latitude, longitude, and height or elevation. The Rational Functions math model can be more accurate than the Polynomial or Thin Plate Spline math models since it considers elevations. OrthoEngine Workbook - Exercise 5: Simple Math Modelling - Polynomial Project 104 PCI Geomatics In this exercise you will start a polynomial project and input a raw landsat image. GCPs will be collected from geocoded vectors and a gecoded image. The raw landsat image will then be geometrically corrected. The data for this project can be found in the Polynomial folder. Simple Math Model Project Work Flows Create a Project Input Data Collect GCPs/TPs Orthorectification Build DEM from * Lines/Points * GCPs/Match Points * Contours * Rasters * TINs Data Preparation Data Extraction Data Correction Use Existing DEM Mosaicking Manual Automatic Create a Project Input Data Collect GCPs Geometric Correction Mosaicking Manual Automatic Polynomial / Thin Plate Spline Math Model Rational Functions Compute from GCPs Math Model PCI Geomatics 105 Setting up the Project OrthoEngine works on a project-by-project basis. Therefore, you need to open an existing project or create a new project before you gain access to the functions within OrthoEngine. In this exercise, you will create a new project. To create a new project: 1. From the File menu on the OrthoEngine window, click New. The Project Information dialog box opens. 2. Click Browse and locate the Polynomial folder. 3. In the File name box, enter landsat_poly.prj and click Open. The path and file name appear in the File name in the Project Information dialog box. 4. In the Name box, enter Landsat Polynomial Project. 5. In the Description box, enter Landsat Polynomial project - Southern Quebec. 6. For the Math Modelling Method, select Polynomial. Figure 5.1 Project Information dialog box 7. Click OK. The Project Information dialog box closes and the Set Projection dialog box opens. Setting the Projection Parameters To enter the projection parameters: 1. Enter the projection parameters in the Set Projection dialog box as show in the figure below. Note that the Output projection and the GCP Projection are not the same. OrthoEngine Workbook - Exercise 5: Simple Math Modelling - Polynomial Project 106 PCI Geomatics Figure 5.2 Project Information dialog box for Rational Functions project 2. Click OK. Adding Images to the Project Before you start working with the imagery, you need to import the data to the project. For simple math modelling projects (Polynomial, Thin Plate Spline and Rational Functions from GCPs), the input images can be in any GDB supported format. Note Compressed formats (JPEG, SID, ECW) should be avoided as input files for OrthoEngine as this slows down the processing speed for the project. To input the imagery to the project: 1. On the OrthoEngine window in the Processing Step list, select GCP Collection. A new toolbar with five icons appears Figure 5.3 Image Input toolbar 2. In the GCP Collection toolbar, click Open a new or existing image. The Open Image dialog box opens. 3. Click New Image. 4. From the Polynomial folder, select landsat_raw.pix and click Open. The landsat_raw.pix image is added to the project and is listed in the Open Image dialog box. PCI Geomatics 107 Tip This is a good time to save your project file. Saving your Project To save your project file: * From the File menu on the OrthoEngine window, click Save. The project file denver_qb.prj is saved in the Polynomial folder. Collecting Ground Control Points Term A ground control point (GCP) is a feature that you can clearly identify in the raw image for which you have a known ground coordinate. How Many GCPs? The minimum number of GCPs you need to collect depends on the simple math model you are using as well as the terrain of the imagery. As you increase the number of GCPs in a polynomial project, you can increase the polynomial order of the project. It is good practice to collect more GCPs than are required to reduce the effect of GCPs which have the largest positional errors on the georeferenced data or the uncorrected image. Note A higher order polynomial will result in a more accurate fit in the immediate vicinity of the GCPs, but it may introduce new and significant errors in the image away from the GCPs. The errors introduced into the imagery may be worse than the original errors that needed correcting. Table 1: Minimum Required GCPs for Polynomial Orders 2 - 5 Required GCPs Order 7 2nd 11 3rd 16 4th 22 5th OrthoEngine Workbook - Exercise 5: Simple Math Modelling - Polynomial Project 108 PCI Geomatics To open the Working Image: 1. In the Open Image dialog box, select landsat_raw.pix and click Open. The Database Channels dialog box opens. 2. Below the list of Database Channels, click 3, 2, 1. In this case, 1:3, 2:2, 3:1 will load a true color composite. 3. Click Load & Close. A viewer opens displaying the landsat_raw.pix image in true color. To set up for GCP collection GCPs from geocoded vectors: 1. On the GCP Collection toolbar, click Collect GCPs Manually. The GCP Collection dialog box opens. 2. For the Ground control source in the GCP Collection dialog box, select Geocoded vectors. 3. From the Polynomial folder, select roads.pix and click Open. The Database Vector Segment dialog box opens. 4. Select the ROADSEG layer and click Load and Close. A viewer opens displaying the roads vector layer. To collect GCPs from geocoded vectors: 1. In the Vector File viewer, place the cursor on the location shown in the figure below. Figure 5.4 Crosshair location (circled in black) for first GCP on geocoded vectors PCI Geomatics 109 2. On the Vector File viewer, click Use Point. The georeferenced coordinates for this location are transferred to the GCP Collection window. They should be approximately: 73d56'57" W 45d25'05" N 3. In the landsat_raw.pix viewer, place the crosshair on the same feature. Figure 5.5 Crosshair location (circled in black) for G0001 on landsat_raw.pix 4. When you are satisfied with the location of the crosshair, click Use Point on the viewer toolbar. The image coordinates for G0001 are transferred to the GCP Collection dialog box. They should be approximately: 3789 Pixel 3118 Line 5. On the GCP Collection dialog box, click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0001. 6. Repeat steps 1 to 6 to collect 2 additional GCPs using the roads vector layer. 7. When you have finished collecting the additional GCPs, click Close. Tip This is a good time to save your project file. OrthoEngine Workbook - Exercise 5: Simple Math Modelling - Polynomial Project 110 PCI Geomatics Note Ground control points used in a project can come from a variety of sources which may not use the same projection parameters. The GCP Projection parameters in the Set Projection dialog box allow you to adjust the projection for each reference data. To change the GCP Projection: 1. On the OrthoEngine window in the Processing step list, select Project. 2. On the Project toolbar, click Set output and GCP projection. The Set Projection dialog box opens displaying the current GCP Projection. 3. In the Set Projection dialog box, click Set GCP Projection based on Output Projection and click OK. To set up for GCP collection from a geocoded image: 1. On the OrthoEngine window in the Processing Step list, select GCP Collection. 2. On the GCP Collection toolbar, click Collect GCPs Manually. 3. For the Ground control source in the GCP Collection dialog box, select Geocoded image. The File Selector dialog box opens. 4. From the Polynomial folder, select landsat_geo.pix and click Open. 5. In the list of Database Channels, click 3, 2, 1. 6. Click Load & Close. A true color composite of landsat_geo.pix opens in a Geocoded Image viewer. To collect GCPs from a geocoded image: 1. In the Geocoded Image viewer, place the crosshair near the upper right corner of landsat_geo.pix at the position shown in the figure below. PCI Geomatics 111 Figure 5.6 Crosshair location (circled in white) for G0004 on landsat_geo.pix 2. Zoom to 1:1 image resolution and place the cursor on the location shown in the figure below. Figure 5.7 Crosshair location (circled in black) for G0004 on landsat_geo.pix OrthoEngine Workbook - Exercise 5: Simple Math Modelling - Polynomial Project 112 PCI Geomatics 3. On the Geocoded Image viewer toolbar, click Use Point. The georeferenced coordinates for this location are transferred to the GCP Collection window. They should be approximately: 496883 X 5138721 Y Once there are three GCPs in the project and Auto locate is selected in the GCP Collection dialog box, OrthoEngine estimates the position of the GCP in the uncorrected image. In the landsat_raw viewer, the crosshair has automatically moved close to correct position for G0004. 4. Adjust the position of the crosshair on landsat_raw and click Use Point. The image coordinates for G0004 are transferred to the GCP Collection dialog box. They should be approximately: 276 Pixel 132 Line 5. On the GCP Collection dialog box, click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0004. 6. Repeat steps 1 to 5 to collect 4 additional GCPs using the geocoded image. Distribute the GCPs as evenly as possible on landsat_raw. You are only collecting 8 GCPs in this exercise. However, you would ideally want to collect more GCPs, especially when using a Polynomial order greater than one. Tip This is a good time to save your project file. Changing the Polynomial Order of the Model First-order polynomial transformations can model a rotation, a scale and a translation. As up to 21 additional terms are added, giving a fifth-order polynomial, you can achieve more complex warping. However, using a lower order transformation reduces the time needed to complete the correction, and less geometric distortion may occur in areas with no GCPs. In order to change the polynomial order to 2 for landsat_raw, you need to have 7 GCPs on this image. If there are fewer than 7 GCPs collected for an image and the polynomial order is changed to 2, no residual will be reported for the GCPs. To change the Polynomial Order: * From the Polynomial Order list in the GCP Collection dialog box, select 2. Notice that the RMS for the GCPs has changed. PCI Geomatics 113 Check Points In the GCP Collection dialog box, to the right of the Point ID text box, you can select whether the current point is a Ground Control Point (GCP) or a Check Point (Check). A GCP is used in computing the geometric model, whereas a Check Point is used to check the accuracy of the computed geometric model. Check Points are not used in the model calculations. To create a Check Point: 1. In the GCP Collection dialog box, below Accepted Points, select the GCP with the highest residual. 2. From the list to the right of the Point ID text box, select Check. 3. Click Accept. This point is now a Check Point and is not included in the model calculations for the image. Note When using the Thin Plate Spline math model for your project, the residual errors will always indicate zero. Use Check Points to check the accuracy of the model. To convert a Check Point to a GCP: 1. Select the Point ID that is the Check Point you want to make into a GCP. 2. From the list beside the Point ID box, select GCP. 3. Click Accept. This point is once again a GCP and is included in the model calculation. Displaying the Image Layout The Image Layout feature is a quality control tool that reveals the relative positioning of the image footprints and displays a plot of the distribution of the ground control points (GCPs). To check the layout of your image: 1. On the GCP Collection toolbar, click Display overall image layout. The Image Layout window opens. The Overview area shows the center of each image in the project. The top of the window points northward. 2. Under Overview, click the crosshair to reveal the image's footprint. In the right side of the window, the selected image is displayed with a red frame. The GCPs are displayed as red squares. OrthoEngine Workbook - Exercise 5: Simple Math Modelling - Polynomial Project 114 PCI Geomatics Figure 5.8 Image Layout dialog box 3. To open an image, double-click the image footprint or click Quick Open. 4. If you are not satisfied with the distribution, edit your GCPs and tie points. 5. Click Close. Computing the Simple Math Model The computation of the simple models is done automatically as you add ground control points (GCPs) to the project. The image is not manipulated at this point. The simple math model uses the GCPs to calculate a transformation that will warp the raw image to fit the ground coordinates. Since the math model calculates a solution for each image, no tie points are used. In Rational Functions (Option: Compute from GCPs), Polynomial, and Thin Plate Spline projects, images are not connected together with tie points. Therefore, the math model and the resulting residual errors are calculated for each image separately. If you selected the Thin Plate Spline math model for your project, the residual errors will always indicate zero. Use Check Points to check its accuracy. Troubleshooting the Math Model Residual errors are the difference between the coordinates that you entered for the ground control points (GCPs) and where those points are according to the computed math model. You can see the residual errors for the image on the GCP Collection windows in the Residual column or you can generate a Residual Report for the entire project. In most projects you should aim for the residual errors to be one pixel or less. However, you should also consider how the resolution of the image, the accuracy of your ground control source, and the compatibility between your ground control source and the images can affect the residual errors. PCI Geomatics 115 For this particular exercise, you should be able to keep the RMS below 1 pixel as you used 1:50 000 vectors and a 30 m geocoded image as the reference data. To examine the residual values: 1. Ensure the overall RMS for landsat_raw is below 1.0 Pixel. Residuals can also be reported in ground units. 2. Delete or verify any points that have a residual greater than 1. Ensure you have at least 7 GCPs if you wish to use a 2nd order polynomial model. 3. Close the GCP Collection dialog box. Tip This is a good time to save your project file. Once you have an acceptable math model solution, you can geometrically correct the image. If there were more than 1 image in the project, you would also be able to mosaic your images. Geometric Correction Geometric correction is carried out in a two-step process: * Transformation of Pixel Coordinates: Each pixel in the target or georeferenced image is transformed according to the warping polynomial to determine a sampling location in the source or uncorrected image. * Resampling: Resampling determines the pixel values to be filled in the georeferenced image from the uncorrected image. Geometric Correction versus Orthorectification Geometric correction does not involve rigorous mathematical modelling nor the use of a DEM. Geometric correction only corrects the data in the X and Y directions. Therefore, orthorectified images are not generated. On the other hand, orthorectification is the process of using a rigorous math model and a digital elevation model (DEM) to correct images in the X and Y directions, as well as in the Z direction. To geometrically correct the image: 1. In the Processing step list, select Geometric Correction. A toolbar with three icons appears. OrthoEngine Workbook - Exercise 5: Simple Math Modelling - Polynomial Project 116 PCI Geomatics Figure 5.9 Geometric Correction toolbar 2. On the Geometric Correction toolbar, click Schedule geometric correction. The Geometric Corrected Image Production dialog box opens. 3. In the list of Available images, select landsat_raw and transfer it to the list of Images to process. 4. Set up the remaining parameters in the Geometric Corrected Image Production dialog box as shown in the figure below. Figure 5.10 Geometric Corrected Image Production dialog box 5. Click Correct Images. A Progress Monitor appears showing the status of the geometric correction process. 6. When the Geometric Correction is finished, click Close. Tip This is a good time to save your project file. PCI Geomatics 117 To verify the corrected image with the reference data: 1. On the Geomatica Toolbar, click the Focus icon. The Focus window opens. 2. From the Focus File menu, select Open. The File Selector dialog box opens. 3. From the Polynomial folder, select olandsat_raw.pix, roads.pix and landsat_geo.pix and click Open. Examine how well the raw image was geocoded. Figure 5.11 View of olandsat_raw.pix, landsat_geo.pix and roads.pix in Focus In this exercise you: * Created a Polynomial project * Input one uncorrected image * Collected GCPs from two sources of reference data * Geometrically corrected the image OrthoEngine Workbook - Exercise 5: Simple Math Modelling - Polynomial Project 118 PCI Geomatics PCI Geomatics 119 Exercise 6 Mosaic Only Project For some mosaic projects, you may find that you already have a number of existing georeferenced images. The images might come from one or more of the following groups: * Georeferenced images from a previous project. * Tiles of georeferenced imagery from a data supplier. * Tiles of an existing mosaic delivered by a contractor. If your images are already georeferenced, you can mosaic the images together without performing any geometric correction or warping. Term Mosaicking is joining together several overlapping images to form a uniform image. In this exercise you will start a mosaic only project to automatically mosaic two images. The automatically generated cutlines will then be edited manually to exclude an area of cloud in the mosaic. The mosaic will be regenerated with the new cutlines, but using the same color balancing from the automatic mosaic. The data for this project can be found in the Mosaic_Only folder. QuickBird images provided for this exercise are courtesy of DigitalGlobe (www.digitalglobe.com). OrthoEngine Workbook - Exercise 6: Mosaic Only Project 120 PCI Geomatics Work Flow for Mosaic Only Projects Create a Project Input Georeferenced Images Mosaicking Manual Automatic Data Preparation Data Extraction Data Correction PCI Geomatics 121 Setting up the Project OrthoEngine works on a project-by-project basis. Therefore, you need to open an existing project or create a new project before you gain access to the functions within OrthoEngine. In this exercise, you will create a new project. To create a new project: 1. From the File menu on the OrthoEngine window, click New. The Project Information dialog box opens. 2. Click Browse and locate the Mosaic_Only folder 3. In the File name box, enter mosaic_only.prj and click Open. 4. In the Name box, enter Mosaic Only Project. 5. In the Description box, enter QuickBird mosaic project for Denver, CO. 6. For the Math Modelling Method, select None (mosaic only). Figure 6.1 Project Information dialog box 7. Click OK. The Project Information dialog box closes and the Set Projection dialog box opens. Setting the Projection Parameters No geometric correction is performed for Mosaic-only project files. Therefore, the Output Projection represents the projection of the mosaic file; all input images must be in the same projection. For a Mosaic Only project, the output projection and resolution will be set automatically from the first image that you add to your project. To set the projection automatically: 1. In the Set Projection dialog box, click Cancel. The Set Projection dialog box closes and a Warning message window opens. OrthoEngine Workbook - Exercise 6: Mosaic Only Project 122 PCI Geomatics Figure 6.2 Warning message window 2. Click OK. The output projection and resolution for the project will be automatically set to the projection and resolution of the first image added. Adding Images to the Project Before you start working with the imagery, you need to import the data to the project. For a mosaic only math modelling project, the input images can be in any GDB supported format. Note Compressed formats (JPEG, SID, ECW) should be avoided as input files for OrthoEngine as this slows down the processing speed for the project. To add the images to the project: 1. On the OrthoEngine window in the Processing Step list, select Image Input. A new toolbar with two icons appears Figure 6.3 Image Input toolbar 2. On the Image Input toolbar, click Open a new or existing image. The Open Image dialog box opens. 3. Click New Image. 4. From the Mosaic_Only folder, select P001.pix and P004.pix and click Open. The Multiple File selection message window opens. This window indicates the total number of files that are detected, and the total number to be loaded into the project. 5. Click OK. The two images are listed in the Open Image dialog box. PCI Geomatics 123 Saving your Project To save your project file: * From the File menu on the OrthoEngine window, click Save. The project information is saved in the mosaic_only.prj file. Defining Bitmap Masks Bitmaps are pseudo-images. They have the same pixel and line dimensions as the image data in the PCIDSK file, however, each pixel of a bitmap is only 1-bit deep. In other words, the gray value of a bitmap pixel can be either zero (pixel not "on") or one (pixel "on"). Bitmap pixels with a value of one will be visible (they take on the color of the graphic plane in which they are loaded). Bitmaps are used most commonly for delineating masks or training areas. Before you perform automatic mosaicking, you will launch Focus to create bitmap masks to exclude cloud and shadow areas from the calculation of the color balancing histogram when performing automatic mosaicking. To launch Focus: * On the Geomatica Toolbar, click the Focus icon. The Focus window opens. To create a bitmap layer: 1. From the Mosaic_Only folder, open the P001.pix file. 2. In the Maps tree, right-click the New Area and select New Bitmap Layer. The New Bitmap dialog box opens. Figure 6.4 New Bitmap dialog box 3. In the New Bitmap dialog box, select Use Layer Georeferencing. 4. For the source of the layer georeferencing, select P001.pix. OrthoEngine Workbook - Exercise 6: Mosaic Only Project 124 PCI Geomatics 5. Click OK. A New Bitmap Layer is added to the Maps tree under the area you selected. Now that you have created a new empty bitmap layer, you will define mask areas. To define mask areas: 1. Make sure the New Bitmap Layer is selected in the Maps tree. 2. On the Editing toolbar, click the New Shapes arrow and select Polygon. Figure 6.5 Polygon new shapes tool 3. In the Focus viewer, trace the outline of the polygon by clicking at the end of each line segment. Figure 6.6 Defining bitmap masks PCI Geomatics 125 4. To complete the polygon, double-click near the first point in the mask area. The polygon is automatically closed and filled. 5. Identify other areas in the image you want to exclude when calculating the color balancing histogram in automatic mosaicking. These can include areas of cloud, shadow or very dark water areas. To edit the mask areas: 1. On the Editing toolbar, click the Raster Erase arrow and select Erase Polygon. 2. Use your mouse to trace over the pixels you want to remove from the mask area. 3. Double-click to erase. Now that you have defined the bitmap mask of the areas to be removed from calculating the color balancing, you will save the bitmap layer to the ortho image. To save the bitmap layer: 1. In the Maps tree, right-click the New Bitmap Layer and select Save. The New Item Detected dialog box opens. Figure 6.7 New Item Detected dialog box 2. From the File list, select P001.pix. 3. Click Save. The bitmap layer is saved to the ortho image file and is listed as a bitmap layer in the Files tree. OrthoEngine Workbook - Exercise 6: Mosaic Only Project 126 PCI Geomatics Mosaicking With OrthoEngine there are two methods for generating a mosaic: automatic mosaicking and manual mosaicking. Automatic Mosaicking Although you can create your mosaic one image at a time by using Manual Mosaicking, most of the time you will use Automatic Mosaicking to do the bulk of the work, and you will use Manual Mosaicking to edit portions of the mosaic file. Some projects may require more editing than others such as those containing large bodies of water or urban areas with buildings leaning in different directions. In addition to reducing your work load, Automatic Mosaicking will often produce a more seamless look than if you had attempted to create the mosaic by hand. Manual Mosaicking You can use Manual Mosaicking to create your mosaic one image at a time, to edit the cutlines in an automatically mosaicked project or to replace unsatisfactory areas in the mosaic. For each image that you want to include in the mosaic file, you must complete four steps in sequence; select an image to add, collect the cutline, adjust the color balance and add the image to the mosaic area. In this exercise, you will use automatic mosaicking to do the bulk of the work. Manual mosaicking will then be used to edit the cutlines and replace unsatisfactory areas in the automatic mosaic. Defining a Mosaic Area Before you create a mosaic, you need to define an empty mosaic file. To define the Mosaic Area: 1. On the OrthoEngine window in the Processing Step list, select Mosaic. A new toolbar with four icons appears. The toolbar contains functions for defining a mosaic area, manual mosaicking, reapplying manual mosaicking, and automatic mosaicking. Figure 6.8 Mosaic toolbar 2. On the Mosaic toolbar, click Define mosaic area. The Define Mosaic Area dialog box opens. PCI Geomatics 127 Figure 6.9 Define Mosaic Area dialog box By default the bounds of the Mosaic Area are the maximum extents of the images in the project. The size of the mosaic area can be changed manually using your mouse. Alternatively, you can enter corner coordinates for the mosaic area. For this exercise, you will use the default maximum extents of the images in the project. 3. Click Create Mosaic File. 4. In the File box, type denver_mosaic.pix. If a path is not specified, this file will be saved in the folder where the project file is saved. 5. Click Create Later. By clicking Create Later, the mosaic file and the automatic mosaic will be created at the same time. 6. Click Close. You are now ready to mosaic your images. Automatic Mosaicking To mosaic the files automatically: 1. On the Mosaic toolbar, click Automatic Mosaicking. 2. Set up the Automatic Mosaicking dialog box as shown in the figure below. OrthoEngine Workbook - Exercise 6: Mosaic Only Project 128 PCI Geomatics Figure 6.10 Automatic Mosaicking dialog box Note Pixels values under the mask will be ignored when calculating the color balancing if Ignore pixels under bitmap mask is select. OrthoEngine uses the last bitmap segment in each image file as the mask. 3. Click Generate Preview. This creates a low-resolution version of the mosaic. It is saved in the file that you entered in the Preview file box. Note Mosaic previews are useful for testing the results of several mosaic parameter settings and inputs through lower resolution mosaic previews. This saves time and disk space traditionally used in experimenting with mosaic parameter settings through the generation of full-resolution mosaics. 4. Click Generate Mosaic. This creates a full-resolution version of the mosaic. A message window appears after the mosaic is generated to indicate that automatic mosaicking is complete. PCI Geomatics 129 Viewing the Mosaic To view the mosaic: 1. From the File menu on the OrthoEngine window, select Image View. The File Selector dialog box opens. 2. From the Mosaic_Only folder, select denver_mosaic.pix and click Open. A viewer opens and displays the mosaic. Alternatively, you can open the mosaic in the Focus viewer. Figure 6.11 Image view of denver_mosaic.pix Editing the Cutline The cutline for P004.pix needs very little editing as the automatic mosaicking already excluded most of the cloud and shadow areas from P001.pix. Remember that the bitmap masks you created over P001.pix were to exclude those areas from the color balancing - not to exclude them from the mosaic. You will use the Manual Mosaicking tools to edit the cutline for P004. Alternatively, you could export the vector cutlines to a PCIDSK file, edit the cutline in Focus and then import the edited vector file to the project. To edit the cutline: 1. In the Mosaic toolbar, click Manual mosaicking. The Manual Mosaicking dialog box opens. 2. In the Project image files table, select P004. The Mosaicking Steps options are now active. OrthoEngine Workbook - Exercise 6: Mosaic Only Project 130 PCI Geomatics 3. Under Mosaicking Steps, click Collect cutline. 4. Select a vertex near the upper-right edge of the image. 5. Using the Move, Delete and Insert editing tools, edit a portion of the cutline to the right, as shown in the figures below. Figure 6.12 White rectangle outlines the vertices on the cutline for P004 to be shifted to the right When using the editing tools, click the same button again to end the edit.The figure below shows a possibility for how the cutline could be edited. Figure 6.13 White rectangle outlines the area where the cutline was edited on P004 6. When you are satisfied with your edits, click Close. PCI Geomatics 131 Tip This is a good time to save your project file. Manual Mosaicking was used to edit the cutline for P004. You will now use the Reapply Mosaicking tool to apply the cutline changes to the mosaic while using the same color balancing options from the automatic mosaic. To reapply the mosaic: 1. On the Mosaic toolbar, click Reapply mosaicking. 2. Ensure that P001 is listed above P004. Figure 6.14 Reapply Mosaicking dialog box 3. Click Generate Mosaic. The Reapply Mosaicking Progress window opens and show the status of the mosaicking process. 4. When the mosaicking has completed, click Close. OrthoEngine Workbook - Exercise 6: Mosaic Only Project 132 PCI Geomatics To view the mosaic: 1. From the File menu on the OrthoEngine window, select Image View. The File Selector dialog box opens. 2. From the Mosaic_Ony folder, select denver_mosaic.pix and click Open. A viewer opens and displays the mosaic. Alternatively, you can open the mosaic in a Focus window. In this exercise you: * Created a Mosaic Only project * Input two georeferenced images * Defined bitmaps for exclusion in color balancing * Automatically mosaicked the two images * Manually edited cutlines and reapplied the mosaicking PCI Geomatics 133 Exercise 7 Raw Image Mosaic Project Since raw (unreferenced) images contain the distortions inherent to the sensor, it is unlikely that features will align well in the overlapping areas without compensating for these distortions. If you are lacking the ground control needed to correct your images, you can adjust the alignment of the features in the raw images by building a math model based on image (pixel and line) coordinates. To create a mosaic with raw images, you have to build a project using the Polynomial or Thin Plate Spline math model, collect ground control points, geometrically correct the images, and then mosaic them. In this project, you will mosaic two ASTER images that are not georeferenced. Before they can be mosaicked, one image will be registered to the other image using a polynomial transformation. The data for this project can be found in the Raw_Image folder. OrthoEngine Workbook - Exercise 7: Raw Image Mosaic Project 134 PCI Geomatics Simple Math Model Project Work Flow Create a Project Input Data Collect GCPs Geometric Correction Mosaicking Manual Automatic Data Preparation Data Extraction Data Correction PCI Geomatics 135 Setting up the Project OrthoEngine works on a project-by-project basis. Therefore, you need to open an existing project or create a new project before you gain access to the functions within OrthoEngine. In this exercise, you will create a new project. To start a new project: 1. On the OrthoEngine window in the File menu, click New. The Project Information dialog box opens. 2. Click Browse and locate the Raw_Image folder. 3. In the Filename box, enter raw_mosaic.prj. 4. In the Name box, enter Raw Image Mosaic Project. 5. In the Description box, enter Raw Image Polynomial Mosaic Project ASTER Nepal. 6. For the Math Modelling Method, select Polynomial and click OK. The Project Information dialog box closes and the Set Projection dialog box opens. Figure 7.1 Project Information dialog box Setting the Projection Parameters For a raw image mosaic project, the math model will be built on a pixel/line coordinate system. This is not a true projection system but allows the images in the project to be referenced to one master image. To enter the output projection parameters: 1. From the list to the left of the Earth Model button, select Pixel. 2. For both the Output Pixel Spacing and the Output Line Spacing, enter 1. This represents the desired resolution of the output images in pixel units. OrthoEngine Workbook - Exercise 7: Raw Image Mosaic Project 136 PCI Geomatics To enter the GCP projection parameters: 1. Under GCP Projection, click Set GCP Projection based on Output Projection. The GCP Projection adopts the same settings used for the Output Projection. 2. Click OK. The Set Projection dialog box closes. Adding the Images to the Project For a simple math modelling project (Polynomial or Thin Plate Spline), the input images can be in any GDB supported format. Note Compressed formats (JPEG, SID, ECW) should be avoided as input files for OrthoEngine as this slows down the processing speed for the project. To input the imagery to the project: 1. On the OrthoEngine window in the Processing steps list, select GCP Collection. A toolbar with five icons appears. Figure 7.2 GCP Collection toolbar 2. On the GCP Collection toolbar, select Open a new or existing image. The Open Image dialog box opens. 3. Click New Image and locate the Raw_Image folder. 4. Using the CTRL key, select north.pix and south.pix and click Open. 5. Click OK on the Multiple File selection message box. The two images have been added to the project and are listed in the Open Image dialog box. Saving your Project To save your project file: * From the File menu on the OrthoEngine window, click Save. The project information is saved in the raw_mosiac.prj file. PCI Geomatics 137 Collecting Ground Control Points When creating a project to mosaic raw (unreferenced) images, you can choose one of the raw images as the source or "master image" for the coordinates. By matching a feature in the master image to a feature in an overlapping raw image, you can transfer the pixel and line coordinates from the master image to its overlapping images. In this exercise, south.pix will be the master image. You will reference north.pix to this master image. In the figure below, the area of overlap between the two ASTER images is represented by a white rectangle. Figure 7.3 Overlap between north.pix and south.pix bounded by white area To set up for GCP collection: 1. In the Open Image dialog box, select north and click Quick Open and Close. The north.pix file opens in a viewer as a 1:1, 2:2, 3:3n composite. 2. On the GCP Collection toolbar, click Collect GCPs Manually. The GCP Collection dialog box opens. 3. In the GCP Collection dialog box, select Geocoded image as the Ground control source. A File Selector dialog box opens. 4. From the Raw_Image folder, select south.pix and click Open. A Database Channels dialog box opens. 5. Select Channels 1, 2, 3 and click Load & Close. The south.pix file opens in a Geocoded Image viewer as a 1:1, 2:2, 3:3n composite. OrthoEngine Workbook - Exercise 7: Raw Image Mosaic Project 138 PCI Geomatics To collect GCPs for north.pix: 1. In the south.pix viewer, locate a prominent feature like a fork in a river in the overlap area, zooming in as necessary. 2. Select the feature by clicking on it with the mouse. The crosshair now appears at this location. The pixel and line coordinates for this location are shown in the status bar in the viewing window. In the current example, the red crosshair is positioned near the top of south.pix at the fork of a river and a stream. Figure 7.4 Location of G0001 on south.pix 3. When you are satisfied with the location of the crosshair, click Use Point on the Geocoded Image viewer toolbar. The image coordinates for G0001 are transferred to the GCP Collection dialog box. 4. In the north.pix viewer, locate the same feature, zooming in as necessary. 5. Select the feature by clicking it with the mouse. 6. In the north.pix viewer, click Use Point. The ID G0001 is placed beside the red crosshair. 7. In the GCP Collection dialog box, click Accept. The GCP information is transferred to the Accepted Points list for the GCP with Point ID G0001. 8. Repeat steps 1 to 7 to collect 6 - 9 additional GCPs that are well-distributed in the overlapping area. PCI Geomatics 139 Once there are three GCPs in the project and Auto locate is activated in the GCP Collection dialog box, OrthoEngine estimates the position of the GCP in the uncorrected image. This will save you time in looking for the same feature on north.pix. However, you will need to adjust the position of the crosshair on north.pix before accepting its autolocated position as a GCP. Tip This is a good time to save your project file. Note If using the Thin Plate Spline math model for a raw image mosaic project, you can estimate and enter nominal height if you do not have the actual elevation value. Displaying the Image Layout The Image Layout feature is a quality control tool that reveals the relative positioning of the image footprints and displays a plot of the distribution of the ground control points (GCPs). To check the layout of your image: 1. On the GPP Collection toolbar, click Display overall image layout. The Image Layout window opens. The left section of the viewer displays the center position of north.pix. The top of the window points northward. 2. Under Overview, click the crosshair to reveal the image footprint. The right section of the viewer displays all of the GCPs as red squares. Figure 7.5 Image Layout window OrthoEngine Workbook - Exercise 7: Raw Image Mosaic Project 140 PCI Geomatics 3. If you are not satisfied with the layout and distribution of the points, doubleclick the image footprint under the Overview area to open the image. 4. Change or add points using the GCP Collection dialog box until you are satisfied with the result. 5. After you are finished, click Close. Computing the Simple Math Model The computation of the simple models is done automatically as you add ground control points (GCPs) to the project. The image is not manipulated at this point. In a project using pixel coordinates, the simple math model uses the GCPs to calculate a transformation that will warp the raw image to fit the pixel coordinates of the master image. Since the math model calculates a solution for each image, no tie points are used. Additionally, the math model and the resulting residual errors are calculated for each image separately. For this particular exercise, you should be able to keep the RMS below 1 pixel as you used a 15 m master image as our reference data to transform a 15 m source image. To examine the residual values: 1. Ensure the overall RMS for north.pix is below 1.0 Pixel. Residuals can also be reported in ground units. 2. Delete or verify any points that have a residual greater than 1. 3. Close the GCP Collection dialog box. Tip This is a good time to save your project file. Once you have an acceptable math model solution, you can geometrically correct the image. Geometric Correction Geometric correction is carried out in a two-step process: * Transformation of Pixel Coordinates: Each pixel in the target or master image is transformed according to the warping polynomial to determine a sampling location in the source or uncorrected image. * Resampling: Resampling determines the pixel values to be filled in the output image from the uncorrected image. The north.pix file will be registered to south.pix, which is being used as the master image. PCI Geomatics 141 To geometrically correct the image: 1. In the Processing step list, select Geometric Correction. A toolbar with three icons appears. Figure 7.6 Geometric Correction toolbar 2. On the Geometric Correction toolbar, click Schedule geometric correction. The Geometric Corrected Image Production dialog box opens. 3. In the list of Available images, select south. 4. In the Uncorrected Image section of the dialog box, select Use raw image as master. Figure 7.7 Geometric Corrected Image Production dialog box 5. In the list of Available images, select north and transfer it to the list of Images to process. 6. For this exercise, use the default Processing Options. 7. Click Correct Images. 8. When the Geometric Correction is finished, click Close. Tip This is a good time to save your project file. OrthoEngine Workbook - Exercise 7: Raw Image Mosaic Project 142 PCI Geomatics Mosaicking Before you create a mosaic, you need to define an empty mosaic file. To define the Mosaic Area: 1. On the OrthoEngine window in the Processing steps list, select Mosaic. A new toolbar with four icons appears. The toolbar contains functions for defining a mosaic area, manual mosaicking, reapplying manual mosaicking, and automatic mosaicking. Figure 7.8 Mosaic toolbar 2. On the Mosaic toolbar, click Define mosaic area. The Define Mosaic Area dialog box opens. Figure 1.9 Define Mosaic Area dialog box A graphical representation of the available images appears in the viewer. The figure shows the overall coverage of the images associated with the project, as well as their positions relative to each other. The crosshairs represent center of each image. PCI Geomatics 143 By default the bounds of the Mosaic Area are the maximum extents of the images in the project. The size of the mosaic area can be changed manually using your mouse. Alternatively, you can enter corner coordinates for the mosaic area. For this exercise, you will use the default maximum extents of the images in the project. 3. Click Create Mosaic File. 4. In the File box, type raw_mosaic.pix and click Create Later. By clicking Create Later, the mosaic file and the automatic mosaic will be created at the same time. 5. Click Close. You are now ready to mosaic your images. Automatic mosaicking will be used for this exercise. To set up for automatic mosaicking: 1. On the Mosaic toolbar, click Automatic mosaicking. 2. Set up the Automatic Mosaicking dialog box as shown in the figure below. Figure 7.10 Automatic Mosaicking dialog box OrthoEngine Workbook - Exercise 7: Raw Image Mosaic Project 144 PCI Geomatics Note The Generate Preview button generates a low-resolution version of the mosaic. This is useful for testing parameters to obtain a seamless mosaic. 3. Click Generate Mosaic. A message window appears after the mosaic is generated to indicate that automatic mosaicking is complete. 4. Click Close. To view the mosaic: 1. From the File menu on the OrthoEngine window, select Image View. The File Selector dialog box opens. 2. From the Raw_Image folder, select raw_mos.pix and click Open. A viewer opens and displays the mosaic. Alternatively, you can open the mosaic in Focus. Figure 7.11 View of the mosaic In this lesson you: * Created a polynomial math modelling project * Referenced a raw image to an uncorrected reference image * Automatically mosaicked the images