imagfe -- Register an image by using common features in the data.
imagfe reftable sectable column1 column2 outtable secfile
This task lets you compute the parameters needed to register a so-called "secondary" file with a reference file by using a set of features common to the two files.
The rimcursor task in the IRAF lists package can be run on both the reference and secondary files to create a pair of features file, one for each input image. The features files must then be sorted in the same order so that the corresponding elements can be identified.
You can specify a set of orientation restraints that will determine how the registration is performed, for example, you can specify that the images are assumed to differ only in translation. The default values assume no constraints on the type of registration, which allows the task to control translation, rotation, and magnification.
The output table from this task may be used in the resamp task to resample the secondary file to the same scale and orientation as the reference file.
The output columns to the table are the coefficients c1 - c6 in the equations
X = c1 + c2*x + c3*y Y = c4 + c5*x + c6*y
(X,Y) are the pixel coordinates of a feature in the reference image and (x,y) are the pixel coordinates of the feature in the secondary image. Also, for informational purposes, the offset in X (DELTAX) the offset in Y (DELTAX), the rotation angle (ROTANG), the magnification in X (XMAG) and the magnification in Y (YMAG),
- reftable [file name]
- Name of features table from the reference file.
- sectable [file name]
- Name of features table from the secondary file.
- outtable [file name]
- Name of the output registration table.
- column= "c1" [string]
- The name of the X coordinate column in the features table. The default value, "c1", is the column name used for the first column of an ASCII table, which is the output from the rimcursor task. If another task is used to derive these positions and an STSDAS table is used, the name of the X coordinate column may be specified in this parameter.
- column= "c2" [string]
- The name of the Y coordinate column in the features table. The default value, "c2", is the column name used for the second column of an ASCII table, which is the output from rimcursor. If another task is used to derive these positions and an STSDAS table is used, the name of the Y coordinate column may be input here.
- secfile [file name]
- Name of the secondary features file.
- (method = general) [string, allowed values: translat | rotrans |
- constrained | general ]
Type of registration to use. The options available are:
translat - Assume difference is only in translation; no rotation or magnification will be computed. rotrans - Assume difference is only in rotation; no translation or magnification will be computed. constrained - Assume the magnification factor is the same in both directions, but the images may otherwise differ in any way. general - Images may differ in any way.
- maxit = [integer, min=1, max=100]
- Maximum number of iterations when computing registration
parameters and outliers.
The parameters gamma and fittoler define the tolerances for rejecting the outlying features. If all features are rejected or no valid registration is obtained in the specified number of iterations, then a more constrained set of assumptions may be necessary before another registration is attempted.
- gamma = 1.[real, min=0.0, max=1.0e+10]
- Tolerance on rejection of outlying image features.
A given feature is rejected if its residual is greater than gamma times the RMS deviation in units of pixels. To reject fewer points, select a larger value of gamma.
- fittoler = 0.[real, min=0.0, max=1.0]
- Tolerance on the rejection of a registration computation
based on the Jacobian determinant of the registration
An informational message is sent to the terminal if this criterion is not satisfied; the results are still given in the output registration table.
A given set of registration parameters is rejected if the Jacobian determinant of the coefficients differs by fittoler from unity. A skewed transformation (one in which the coordinate axes are not Cartesian) will result in a Jacobian which is not unity. The more skewed the transformation the more the Jacobian will differ from unity.
1. Derive the registration table reg.tab to resample the image image2.hhh with features table im2.tab to the same scale and orientation as the image image1.hhh with features table im1.tab. Both of the features tables are ASCII tables, with x-coordinates in column 1 and y-coordinates in column 2.
pl> imagfe reftable=im1.tab sectable=im2.tab column1=c1 column2=c2 outtable=reg.tab secfile=image2.hhh
Type "help registration option=sys" for a higher-level description of the registration package.