Catalyst.earth Logo
Catalyst.earth Logo

Super Registration in CATALYST Professional

Image of super registration

SUPER REGISTRATION WORKFLOW OVERVIEW
Image of super registration

The super registration algorithms can co-register images with up to 1/10th of a pixel accuracy to reduce the risk of misalignment errors. 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. 

The SUPERMATCH and SUPERAPPLY algorithms comprise the super registration workflow. These algorithms can be accessed through the EASI or PYTHON environments. In this tutorial, the algorithms will be run in Python.

Note: that the script in this tutorial makes use of Python 3.5

For more information on Super Registration see the CATALYST Professional Help.

IMPORT MODULES AND I/O SETUP​

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 CATALYST Professional 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 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).

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")
Test code
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).

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.

envelopephone-handsetcross