# Airphoto Orthorectification and Mosaicking - Geomatica Banff

PCI Geomatics -

This tutorial outlines the automatic orthorectification and mosaicking process of airphotos using Geomatica OrthoEngine. This workflow shows how to import data, automatically collect GCPs and tie points, generate orthos and finally generate a mosaic. The data used in this tutorial was captured using an UltraCam D camera and can be downloaded from the following link - https://pcigeomatics-my.sharepoint.com/:u:/g/personal/support_catalyst_earth/EQCK5Bo2YzlDuqQgqk5BHaEBVC95JlOkW8vV1UWlJvW7SA?e=j3ciKl&download=1

Project Setup and Data Ingest

Set GCP/TP Accuracy

Collect GCPs

Collect Tie Points

Point Thinning and Refinement

Point Thinning

Point Refinement

Residual Report

Generate Ortho Images

Mosaicking

Define Mosaic

Generate a Mosaic

When initially loading the images into Focus they appear to lie on top of each other. This tutorial explains how to process the data so that they lay in their correct geographical location.

# Project Setup and Data Ingest

To begin, you will need to create a new OrthoEngine project and ingest your imagery

1. Open OrthoEngine from the Geomatica toolbar.
2. On the OrthoEngine toolbar navigate to File > New. The Project Information window will open.
3. Give your project a Filename, Name and Description
• Select Aerial Photography as the Math Modeling Method
• Select Digital/Video under Options
• Select Compute from GCPs and tie points under Exterior orientation
• Click OK

1. The Set Projection window appears.
• Enter the output projection information for the images
• Enter the pixel and line spacing
• Click OK

1. On the OrthoEngine toolbar click the Set camera calibration icon

• The Digital/Video Camera Calibration Information window opens.
• Enter the focal length, chip size and Y scale factor information
• Click OK

1. On the OrthoEngine toolbar switch the processing step to Data Input
• Click Open a new or existing image.

• Click Add Image… when the Open Image window appears
• Navigate to the location of the images and click Open
• When prompted, choose YES to import the files to PIX format
• Click OK in the Multiple File selection window

• The new pix files will now appear in the Open Image window

1. On the OrthoEngine toolbar click the Import exterior orientation data from text file icon

• Verify the Input projection, Input angle unit and EO vertical datum information
• Enter the Accuracy information
• Click Browse to navigate to the eo.txt file for the dataset
• Select Import. You will notice the GPS/INS information for the images is saved

# Set GCP/TP Accuracy

Prior to collecting GCPs and TPs you’ll want to verify and adjust the GCP/TP Accuracy settings for your project. Setting the proper accuracy values is very important. If your project consists of surveyed GCPs, the accuracy entered should be sub- metre. More information on setting the accuracy of GCPs and TPs is found in the Geomatica Help.

1. On the OrthoEngine toolbar choose the Project or GCP/TP Collection Processing step. You can then select the GCP/TP Accuracy button.

1. Choose the images that you would like to adjust the accuracy for from the Selection list.
2. You can then optionally choose a preset accuracy based on the options in the Presets list.
3. Under GCPs, TPs, or both, enter the value by which you want to set the accuracy of the points in the Pixel, Line, Elevation (Z), Easting (X), and Northing (Y) boxes, as applicable.

Click Apply. The image or images are updated with the new accuracy values based on the item you selected in the Selection list.

# Collect GCPs

Now that the images are imported, you can collect GCPs and TPs.

1. On the OrthoEngine toolbar click the Collect GCPs Automatically button

1. Change the Control Source to Georeferenced Image and browse to the reference Image.
2. Browse to the DEM file.
3. If required Adjust the Search Options:
• Sample source method
• Susan: sample points are generated automatically using the SUSAN corner-detection algorithm
• Grid:sample points are generated automatically using sample points distributed evenly across the overlap region
• Number of GCPs per image - Type the number of points that you want to collect over each image
• Matching method
• FFTP (Fast Fourier Transform Phase matching): when two images have a relative shift between them, the result is a phase difference in the Fourier domain. FFTP determines the shift between images using this phase difference.
• NCC (Normalized Cross Correlation): this method finds the relative shift between two images by finding the shift that produces the maximum cross-correlation coefficient of the gray values in the images. This is the default method.
• Search Radius - Type a number to define the search radius around the kernel
• acceptance score- enter a value from 0-1 which defines the minimum correlation score that will be considered a successful match
4. Click Match GCPs.
5. Once the procedure is complete the collected GCPs will be listed in the Collected GCPs panel
6. Click Compute Model to view the residuals for each of the GCPs
7. If required you can change the Search Options and recollect GCPs. You can also select which GCPs you would like to use from the list of collected GCPs.
8. To remove a GCP from the model calculations simply click on the checkmark in the Use as GCP
9. Once you are satisfied with the GCPs in the list, click Add GCPs to Project. You can rerun the GCP collection after adding to the project to collect more GCPs.
10. Close the GCP Collection window.

# Collect Tie Points

Since there are multiple images, we will collect tie points in order to further improve the model. In the last year PCI has been working to improve the accuracy and speed of tie-point collection by up to 20%.

1. From the OrthoEngine toolbar, click the Automatic Tie Point Collection icon

• Browse to the DEM file.
• Note that you can always open the Geomatica Help to read about each of the options in this window
• Choose a Matching Method: FFTP, NCC or FBM. Note that the parameters for FFTP/NCC and FBM differ significantly as outlined below
• If you selected FFTP: Fast Fourier Transform Phase matching or NCC: Normalized Cross-Correlation  set the values for each of the parameters
• Tie points per area - enter the number of TPs to use over the image or overlap area
• Trials per point - enter a number representing how many attempts to make for each point before giving up on the match
• Min. acceptance score - enter a value from 0-1 which defines the minimum correlation score that will be considered a successful match
• Search radius - Enter a number representing the size of the area on the target image and select a unit of measure
• Input elevation - Set either constant elevation or select a DEM file
• Distribution pattern
• Entire Imagedistribute the TPs over the entire image and match each TP in all of the overlapping images.
• Overlap Area - evenly distribute the points only in the overlap area between any pair of overlapping images
• Search method
• Susan - find candidates by running a corner-detection algorithm on the image.
• Grid  - find candidates in a grid-like pattern. In the Edge margin distance box, enter the minimum distance you want, in pixels, between the edge of the image and the placement of the candidates.
• Matching channels - Enter the channel or channels to use during collection

• FBM: Feature-based matching *New in Geomatica Banff
• Local exclusion mask - Select the mask that you would like to use to exclude pixels under a bitmap or vector segment.
• None - exclude no pixels.
• Fiducial - exclude pixels near the fiducial marks and then enter a margin distance.
• Edge - exclude pixels along the edge of an image and then enter the margin distance.
• Rejection threshold - Enter a value in pixels, by which to eliminate blunders during random sample consensus (RANSAC)
• Maximum key points - Enter the number of key points to extract per image. Note: The actual number of extracted key points may differ due to a lack of features in the image or because of the minimum numbers of key points enforced to improve the distribution, match-ability, or both.
• Thin points
• Automatic - apply thinning automatically.
• None - apply no thinning.
• Custom - enter Cells per image to define the number of grid cells per image to control the amount of thinning that occurs.
• Feature database folder -  Type the path and file name of the folder to which to write feature database (FDB) files
• Search area
• Entire Image - match all key points of each image.
• Overlap Area - restrict key-point matching to only the points in the overlap area between any pair of overlapping images.

• A pop up will appear to tell you how many tie points were collected. More or less tie points will be collected based on how much overlap is available in your dataset.

• You can change the Options and collect more tie points if required.
• Close the Tie Point Collection Window

# Point Thinning and Refinement

After you have collected GCPs and TPs you can further refine them if required. Make sure to calculate the model (Processing Step > Model Calculations > Compute Model) before this step.

In Geomatica Banff a new Point Thinning and Refinement window has been added. This window allows you to automatically run thinning to remove redundant points and refinement to remove points with high RMS.

## Point Thinning

To set up point thinning, you select the type of points you want to thin, how you want to dispose of the points designated for removal, and then define the grid by which to divide the image into cells. By defining the grid, you can specify the how many points you want to retain in each cell.

If you want to Thin Points make sure that the Thin Points box is checked off.

1. Points - Select the type of points you want to thin: GCPs, TPs, or Both.
2. Number of cells on short side of each image - Enter the number of cells on the short side of each image.
3. Maximum points per cell  - Enter the number of points to retain in each cell.
4. Thinning action:
• Deactivate  - Designate removed points as inactive but does not delete the point. You can switch deactivated points back to active in the future.
• Delete -  Permanently remove the points from the project.
5. You can either choose to also Refine Points or skip the point refinement and run only point thinning.

## Point Refinement

To set up point refinement, you select the type of points you want to refine, the mode to use, how you want to dispose of the points desinated for removal, and then enter the maximum x and y residual per point.

If you want to Refine Points make sure that the Refine Points box is checked off.

1. Refinement Mode:
• Progressive - Reject points iteratively. Points with a very high RMS threshold will be removed. The threshold is reduced iteratively based on the maximum x and y residual you specify.
• Direct - Reject points at a specific threshold. Points are rejected at precisely the maximum x and y residual you specify.
2. Points - Select the type of points you want to thin: GCPs, TPs, or Both.
3. Maximum x, y residual per GCP/TP - Enter a value into either or both boxes depending on your points option. This value represents the threshold at which to reject the relevant points.
4. Deactivate images with insufficient TPs - Deactivates images that do not have enough TPs. You would then specify the threshold in the Maximum number of TPs box.
5. Refinement action:
• Deactivate  - Designate removed points as inactive but does not delete the point. You can switch deactivated points back to active in the future.
• Delete -  Permanently remove the points from the project.
6. You can either choose to also Thin Points or skip the point thinning and run only point refinement.

# Residual Report

From the OrthoEngine toolbar open the Residuals report icon

• The collected GCPs and TPs are displayed in this window. There are quite a few options in the window. Explanations of each of the Options are available in the help.

• If you have any points with very high residual errors you can remove them from the model using the Delete Point button
• Once you are satisfied click Compute Model and then Close the window

Generate Ortho Images

You can now generate the orthorectified images.

1. On the OrthoEngine toolbar switch to the Ortho Generation processing step and select the Schedule ortho generation icon

• In the Ortho Image Production window select the images in the left panel and add them to the right panel
• Browse to the output location for your ortho images
• Select the DEM
• Modify any of the default parameters to suit your data
• Click Generate Orthos

# Mosaicking

** Geomatica 2018 - Note that in Geomatica 2018 the Mosaicking process was changed. All mosaicking is now completed in the Mosaic Tool. The following tutorials outline Automatic and Manual Mosaicking in Geomatica 2018 (and up):

## Define Mosaic

Below are the original instructions for Geomatica 2017 mosaicking:

1. On the OrthoEngine toolbar switch to the Mosaic processing step and select the Define mosaic area icon

• In the Define Mosaic Area panel, click Browse
• In the File Selector, select the output file name and location for the mosaic file
• Click OK

## Generate a Mosaic

1. On the OrthoEngine toolbar click the Automatic mosaicking icon

• In the Automatic Mosaicking panel modify the color balancing method and cutline selected method to best suit your imagery.
• Click Generate Mosaic

• Once your mosaic has been generated the following window will appear. Click OK.