REGUT

Image registration with user transformation


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples :: Related

Back to top

Description


Transforms an image from one coordinate space to another, based on user-defined transformation data.
Back to top

Parameters


Name Type Caption Length Value range
FILI * String Input file name 1 - 192  
FILO * String Output file name 1 - 192  
DBIC * Integer Input raster image channel(s) 1 -    
DBOC * Integer Output transformed image channel(s) 1 -    
RESAMPLE String Resampling method 0 - 5 NEAR | BILIN | CUBIC | 8PT | 16PT
Default: NEAR
DBUTC * Integer Input user transformation channel(s) 2 - 2 1 -
USEGEO String Apply georeferencing to transformed output 0 - 3 ON | OFF
Default: OFF
MEMSIZE Float Working memory size (MB) 0 - 1 0 -
Default: 0.0
REPORT String Report mode 0 - 192 Quick links
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the input image file that contains the uncorrected image data and the GCP segment.

FILO

Specifies the name of the output file to receive the corrected image data. This file must already exist before running REGUT.

DBIC

Specifies the image channels from the input file (FILI) to correct.

Duplicate channels are NOT allowed.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

DBOC

Specifies the channels in the output file (FILO) to receive the corrected image data.

Duplicate channels are NOT allowed.

Note: For each channel specified in this parameter, a corresponding output channel must be specified in DBOC.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

RESAMPLE

Specifies the resampling method to use during the registration process.

The following methods are supported:

DBUTC

Specifies the channels from the output file (FILO) that contain the user-supplied transformation values.

The first of these channels should contain the X pixel coordinate of the corresponding pixel on the input image; the second channel should contain the Y line coordinate of the corresponding pixel on the input image.

For each pixel in the output image (x,y):

That is, to assign pixel 2,3 on the output image (DBOC), the function will fetch the values from DBUTC at the same pixel (2,3). The first value fetched (DBUTC[1]) will be used as the pixel value (x'), and the second value fetched (DBUTC[2]) will be used as the line value (y'). These values will then be used to sample a pixel from the input channel (DBIC).

Note: If USEGEO is "ON", the coordinates fetched from DBUTC[1] and DBUTC[2] are assumed to be in georeferenced (UTM) coordinates, and are transformed into pixel/line coordinates using the georeferencing transformation for FILI.

USEGEO

Specifies whether the input user transformation coordinates (DBUTC) are assumed to be in georeferenced coordinates.

Supported values are:

MEMSIZE

Specifies the amount, in megabytes (as a floating-point number), of internal memory allocated to REGPRO.

The default value of 0.0 Mbytes allows REGUT to automatically determine the appropriate amount of memory to allocate. If the user-entered value is less than 0.25 MB, the memory size will be rounded up to 0.25 MB. This parameter must not have a negative value.

REPORT

Specifies where to direct the generated report.

Available options are:

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

REGUT transforms an image from one coordinate space to another, based on user-supplied transformation data.

REGUT performs a user-defined image warping (registration). This function operates in a manner similar to REG.

Selected input image channels (DBIC) from the input file (FILI) are registered/corrected using a user-defined transformation (DBUTC). The registered image is stored in the specified output image channels (DBOC) in the output file (FILO).

The user-defined transformation is provided as two channels on the output file (FILO). The user transformation channels (DBUTC) specify the pixel/line, or georeferenced X/Y positions on the input file that should be transformed to that pixel on the output file. The values of DBUTC[1], and DBUTC[2] are treated as georeferenced if USEGEO is "ON", and as pixel/line coordinates if it is "OFF" (default).

In other words, for every pixel location on the output channel (DBOC), REGUT finds the pixel values at the same pixel location on the input user-transformation channel (DBUTC). These pixel values provide an x,y pixel location on the input channel (DBIC). The pixel value at this x,y location on DBIC is then read into the original pixel location on DBOC.

Thus, if the top-left pixel in the output file's DBUTC channels contained the values 4 and 10, the pixel value at (4,10) on the input file would get transformed into the top-left pixel of the output channel.

The user transformation is typically set up using modeling equations or a specialized transformation setup function. Also, when imported, some data sets (such as NASA EOSDIS HDF files) include two channels that contain the lat/long locations of each pixel. These can be transformed through modeling equations to refer to source pixels in lat/long on other databases.

REGUT only outputs actual resampled pixels to the output channels (DBOC). While this allows mosaicking of more than one image into the same channels, it does require the user to CLEAR the channels initially (see CLR).

Back to top

Examples

A model is used to set up a user-defined transformation that horizontally compresses pixels on the right side of the image, and stretches pixels on the left side of the image. This output is then used by REGUT to transform the image.

EASI>file	=	"smear.pix"
EASI>tex1	=	'' 
EASI>tex2	=	'' 
EASI>dbsz	=	512,512
EASI>pxsz	=
EASI>dbnc	=	1,0,0,2	! image and X, and Y channels
EASI>dblayout	=	''

EASI>RUN cim

Model to setup transformation exponential warp in X and no change in Y direction:

 %2=(@x/512)^1.5 * 512     
 %3=@y                     

Perform warp:

EASI>fili	=	'irvine.pix'	! input file name
EASI>filo	=	'smear.pix'
EASI>dbic	=	1
EASI>dboc	=	1
EASI>resample	=	'CUBIC'
EASI>dbutc	=	2,3	! user transformation channels
EASI>usegeo	=
EASI>memsize	=

EASI>RUN regut

A similar approach can be used to perform a rotation of the same input image. In this case, all steps are the same as in the previous example, except for the modeling step, which define a 45-degree rotation around the image center point (256,256)

Some of the pixel values in channel 2 and channel 3 will take on values that refer to pixels not available on the source database. When REGUT runs, the values in the output channels (DBOC) will not be modified for these pixels.

EASI>angle	=	45.0
EASI>%2=(@x - 256) * cos(angle) - (@y - 256) * sin(angle) + 256
EASI>%3=(@x - 256) * sin(angle) + (@y - 256) * cos(angle) + 256

EASI>RUN regut

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.