Isis 2 Documentation
fit - Compute polynomial functions, Y(X), to correlate two images FIT computes polynomial functions, Y(X), to correlate two input images. Important for equation order of 1: If input image(1-X) is to be matched to input image(2-Y), then the equation to be applied to input image (1) will be as follows: Y = B0 + B1 * X If input image(2-Y) is to be matched to input image(1-X) then the equation to be applied to input image (2) is: X = (Y - B0) / B1 FIT is only limited as to how much memory that it can allocate to process the input bands. For large 2-dimensional images, FIT may have trouble allocating 2 floating point image planes. The areas used to compute the fit may be determined two ways. If USEMAP="YES", then mapping parameters must exist in both the FROM and FROM2 images. For this case, only the overlapping areas of the images are used for computing the fit. NOTE that subcube specifiers SFROM and SFROM2 should NOT be used for this case. If USEMAP="NO", then the user must determine the areas of BOTH input images that will be used for the overlap. This is always a function of the subcube specifiers SFROM and SFROM2. For this case, the entire areas selected by the subcube specifiers are used to compute the fit. The values of LOW and HIGH are used to exclude pixel values from the computation of the correlation. R, ADD and MULT parameters are so FIT can be run from within a procedure PDF and returns the output parameters of FIT to the calling PDF. This is set up so that FIT can still be run as a stand-alone program as well. (This is accomplished by setting these parameters to locally declared parameters and simply discarded after the run.) When running FIT directly, do not modify the values of R, ADD and MULT. Programmer: Kris Becker, USGS, Flagstaff, Arizona
Parm | Description | Default |
---|---|---|
FROM | File name of the cube that is treated as X | NONE |
SFROM | Subcube specified for FROM file | -- |
FROM2 | Second input cube file name. Image will be treated as the Y image | NONE |
SFROM2 | Subcube specified for FROM2 file (Note: this must select a single band/image) | "::1" |
EQORDER | Order of of polynomial fit | 1 |
TITLE | Title of the plot | "HISTOGRAM MATCHING" |
BAND | Band/image number from the FROM (input) file that will be used to calculate the correlation | 1 |
LOW | Lowest value of valid DN | -- |
HIGH | Highest value of valid DN | -- |
MIN | Minimum number points that can be used to compute correlation | 5 |
FRAC | Fractional minimum of total points used to compute correlation | 0.0 |
GOODFIT | Specifies the minimim acceptable goodness of fit/correlation between the two images. Correlation range is 0 (worst) to 1 (best). | 0.0 |
USEMAP | Specifies to use mapping label information to determine image overlaps | "YES" |
R | Returns the correlation of fit computed for the two images | LOCAL1 |
ADD | Parameter that returns the additive component | LOCAL2 |
MULT | Array that returns the multiplicative components |
ADDITIONAL NOTES:
Parm | Description |
---|---|
FROM | The name of the input cube file. This is the file that contains the image plane that is treated as the X image in the correlation function. (Default extention is .cub) |
SFROM | The input subcube specifier. Allows the user to select a subarea of the input cube for processing. The default " " selects the entire cube. |
FROM2 | The name of the secondary input cube file. This file contains the image that will be used as the Y image in the correlation equation. (Default extention is .cub) |
SFROM2 | The secondary input subcube specifier. Allows the user to select a subarea of the second (FROM2) input cube for processing. This specifier must select a single band/image and the spatial dimensions of this input file must be equivalent to the input file (FROM). The default "::1" selects all LINES, SAMPLES and the FIRST band from this file. |
EQORDER | EQORDER is the order of the polynomial equation used. Valid values are 1-8. |
TITLE | As each order of the correlation is computed a crude plot is generated. The value of this input paramter will be attached to the plot. |
BAND | This parameter selects the BAND/image from the input cube file (FROM) that will be used to compute the pixel correlation. |
LOW | The lowest value of valid DNs. If LOW = 11, then pixels with DN values 0-10 will be excluded from processing. |
HIGH | The highest value of valid DNs. If HIGH = 200, then values greater that 200 will be excluded from processing. |
MIN | Specifies the minimum number of points that can be used to compute the pixel registration. This value should be such that a least square fit function can return resonable results. Note that FRAC may also be used to give an additional option on specifying this value. Note, however, that BOTH MIN and FRAC cannot be used. If this case does occur, the value of MIN will be used. |
FRAC | This parameter can also be used to specify a fractional miniumum of the total points that can be used to compute the pixel registration. For example, if FIT uses 2000 points maximum to compute the correlation and FRAC is 0.05, then the minimum number of points that can be used is MIN = (0.05 * 2000) = 100. Note, however, that BOTH MIN and FRAC cannot be used. If this case does occur, the value of MIN will be used. |
GOODFIT | This parameter allows the user to specify a minimum acceptable goodness of fit. If the correlation bewteen the two images is less that GOODFIT, the no output file will be generated and the program returns an error condition. If the correlation coeeficient is greater than or equal to GOODNESS, then an output file will be generated using the returned pixel registration parameters. Note that the correlation coeeficient will range from 0 to 1 where 0 is the worst fit, 1 is the best fit. This parameter is very useful for simply testing correlation between two images. This can be easily achieved setting GOODFIT to any value greater than 1.0 (GOODFIT=2.0). |
USEMAP | This parameter allows the caller to choose how the image overlap is determined. If USMAP="YES" (default), then BOTH FROM and FROM2 must have mapping parameters in the labels. These are then compared and used to determine overlapping image areas. Only overlapping areas are used to compute the fit. If the images do not have mapping information on the label or the user does not want to use them, set USEMAP="NO". For this case, the ALL lines and samples of both images are used to compute the fit. Thus the input subcube specifiers select the areas and they must match. |
R | R is a parameter that will receive the correlation coeeficient computed by FIT. This parameter is needed ONLY if FIT is run from a procedure PDF an the calling PDF wants the parameters to be returned. This is a single scalar value. |
ADD | ADD is a parameter that will receive the additive component of the FIT. This parameter is needed ONLY if FIT is run from a procedure PDF an the calling PDF wants the parameters to be returned. This is a single scalar value. |
MULT | MULT is a parameter that will receive the multiplicative component of the FIT. This parameter is needed ONLY if FIT is run from a procedure PDF an the calling PDF wants the parameters to be returned. This is an array of up to eight values. Note that MULT must be at least as large as EQORDER. |
Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov