NAME

i.rectify2 - rectifies an image by computing a coordinate transformation for each pixel in the image based on the control points created by i.points or i.vpoints.
(GRASS Image Processing Program)

SYNOPSIS

i.rectify2

DESCRIPTION

i.rectify2 uses the control points identified in i.points or i.vpoints to calculate a transformation matrix based on a first, second , or third order polynomial and then converts x,y cell coordinates to standard map coordinates for each pixel in the image. The result is a planimetric image with a transformed coordinate system (i.e., a different coordinate system than before it was rectified).

i.points or i.vpoints must be run before i.rectify2, and both programs are required to rectify an image. An image must be rectified before it can reside in a standard coordinate LOCATION, and therefore be analyzed with the other map layers in the standard coordinate LOCATION. Upon completion of i.rectify2, the rectified image is deposited in the target standard coordinate LOCATION. This LOCATION is selected using i.target.

Program Prompts

The first prompt in the program asks for the name of the group containing the files to be rectified.
     Enter the group containing files to be rectified
     Enter 'list' for a list of existing imagery groups
     Enter 'list -f' for a verbose listing
     Hit RETURN to cancel request
     >
This is the same imagery group that was selected in i.points or i.vpoints and the group that contains the cell files with the marked points and their associated map coordinates. You are then asked to select the cell file(s) within the group to be rectified:
Please select the file(s) to rectify by naming an output file

       spot1.1 in mapsetname    ............
       spot1.2 in mapsetname   ............
       spot1.3 in mapsetname    ............
       spotclass1 in mapsetname spotrectify1..  
    
       spotreject1 in mapsetname     ............

(enter list by any name to get a list of existing cell
files)

AFTER COMPLETING ALL ANSWERS, HIT  TO CONTINUE
           (OR TO CANCEL)
More than one cell file may be rectified at a time. Each cell file should be given a unique output file name.

Next, you are asked to select one of two windows regions:

Please select one of the following options
1.  Use the current window in the target location
2.  Determine the smallest window which covers the image
>
The i.rectify2 program will only rectify that portion of the image or cell file that occurs within the chosen window region, and only that portion of the cell file will be relocated in the target database. It is important therefore, to check the current mapset window in the target LOCATION if choice number one is selected.

If you are rectifying a file with plans to patch it to another file using the GRASS program patch[1] or patch[2], choose option number one, the current window in the target location. This window, however, must be the default window for the target LOCATION. When a file being rectified is smaller than the default window in which it is being rectified, zeros are added to the rectified file. Patching files of the same size that contain 0/non-zero data, eliminates the possibility of a no-data line the patched result. This is because, when the images are patched, the zeros in the image are "covered" with non-zero pixel values. When rectifying files that are going to be patched, rectify all of the files using the same default window.

By selecting the 1st ORDER option, the user may select the order of transformation desired:

Select order of transformation -->   1st Order   2nd Order  
3rd Order
The program will immediately recalculate the RMSE and the number of points required.

Polynomial Transformation Matrix

The ANALYZE function has been changed to support calculating the registration coefficients using a first, second, or third order transformation matrix. The number of control points required for a selected order of transformation (represented by n) is
((n + 1) * (n + 2) / 2)
or 3, 6, and 10 respectively. It is strongly recommended that one or more additional points be identified to allow for an overly- determined transformation calculation which will generate the Root Mean Square (RMS) error values for each included point. The RMS error values for all the included control points are immediately recalculated when the user selects a different transformation order from the menu bar. The polynomial equations in the new i.rectify2 program are performed using a modified Gaussian elimination method instead of the Cramer's rule method used by i.rectify.

Program Execution

i.rectify2 will run in the background and notify you by mail when it is finished.

Note: The rectified image or rectified cell files will be located in the target LOCATION when the program is completed. The original unrectified files are not modified or removed.

This program is interactive and requires no command line arguments.

SEE ALSO

GRASS Tutorial: Image Processing

i.group
i.points
i.vpoints
i.rectify
i.target

AUTHOR

William R. Enslin, Michigan State University, Center for Remote Sensing