PCI Geomatics Help Center

How can we help you today?

Super Registration - Geomatica Banff SP2

PCI Geomatics -

In Geomatica Banff SP2 super registration was added. The super registration algorithms can co-register images with up to 1/10th of a pixel accuracy to reduce the risk of misalignment errors. When two ortho images are laid on top of each other they should, in theory, perfectly align. In practice there are often small shifts of a fraction of a pixel. In particularly bad cases this shift can be many pixels. This misalignment can be caused by poor math models (e.g. inaccurate GCPs), a low quality elevation model or distortions in the camera lens. Poor alignment can make some types of analysis, such as change detection, very difficult. Ideally alignment errors should be corrected at the source and the ortho's regenerated with more accuracy. However, in many cases this option is not available and it is necessary to find the misalignments and correct them as a separate process.

The SUPERMATCH and SUPERAPPLY algorithms comprise the super registration workflow in Geomatica. These algorithms can be accessed through the EASI or PYTHON environments. In this tutorial, the algorithms will be run in Python. Additional resources for creating Python scripts using Geomatica algorithms are available from the Developer Zone. Note that the script in this tutorial makes use of Python 3.5 as this is the new default version used in Geomatica Banff.

For more information on Super Registration see the Geomatica Help. 

 

Import necessary modules & setup inputs/outputs

The first step in the Python script is to import the required modules and set up the variables that will point to our input and output directories and files. You can import the PCI algo module which will be used to access the Geomatica algorithms.

Create input and output variables as outlined below:  

from pci import algo

# Input Variables
# Ortho file to be shifted
image = r"D:\Tutorials\SUPER_REGISTRATION\Sentinel2\Sent2_2017_10m_Imported.pix"
# Reference ortho file
ref = r"D:\Tutorials\SUPER_REGISTRATION\Sentinel2\Sent2_2020_10m_Imported.pix"
# Offset file
offset = r"D:\Tutorials\SUPER_REGISTRATION\Sentinel2\offsets.pix"

# Output Variables
# Output registered image
reg_image = r"D:\Tutorials\SUPER_REGISTRATION\Sentinel2\superreg.pix"

 

SUPERMATCH

The SUPERMATCH algorithm finds match points between a match image and a set of reference images. The output of this algorithm is a file that contains the shift (offset) between the match image and the reference images held in two channels, one channel giving the X shift and the second giving the Y shift. The objective is to allow subtle geometry errors between pairs of orthos to be visualized and removed.

The input image (fili) is set as the match image (image). Channel 3 will be used as the image and reference image matching channel (dbic and dbic_ref). The reference image (ref) is set for the filref parameter. The size of the area to search in the reference image (searchr) and the unit of measure (METER) is selected (searchun). The FFT template matching size in pixels is defaulted to 64. The minimum threshold value to use to control acceptance or rejection of a candidate match points is set (minscore). Point grid spacing in pixels is set to 25 (pntgrid). Typically values between 20 and 50 are used. The first strategy is selected to find matching points (pntstrat). This option finds matching points in the first reference image. Medium level of filtering is selected (pntclean). The output file paramter (filo) is set to the offset image (offset).

All of Geomatica algorithm parameters are outlined in the Geomatica Help. You can check the help for detailed information on each parameter.

 algo.supermatch(fili=image, dbic=[3], filref=ref, dbic_ref=[3], searchr=[30], searchun="METER",

                fftsize=[64], minscore=[0.8], pntgrid=[25], pntstrat="FIRST", pntclean="MED", filo=offset,

                pointapp="OFF")

SUPERAPPLY

The output offset file from SUPERMATCH is used as the input to the SUPERAPPLY algorithm. The SUPERAPPLY algorithm will apply and resample the match image using the offsets, resulting in a new match image which is more closely aligned with the reference images.

The match image and reference images must be the same resolution (within 5%) but can be in different projections. In areas where matching in not desired, for both the match and reference images, masks (e.g., clouds or water) can be used to prevent matching. The shifts in these areas will be interpolated from matches surrounding the masked area.

The input image parameter (fili) is set to the initial image (image). The output offset file (offset) generated previously, is set for the parameter filoff. Channels 1 and 2 are used to resample the input channels (dbdc). The resampled output image (reg_image) is saved (filo).

All of Geomatica algorithm parameters are outlined in the Geomatica Help. You can check the help for detailed information on each parameter.

 

algo.superapply(fili=image, filoff=offset, dbdc=[1, 2], filo=reg_image) 

 

Once you have run the SUPERMATCH and SUPERAPPLY algorithms the output (reg_image) and reference image (ref) will be coregistered. You can open the images in Focus to check the matching. You could then proceed to use these images in further analysis such as time-series analysis.

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk