ISIS 3 Application Documentation
coreg | Printer Friendly View | TOC | Home |
Subpixel registration of a pair of images
Overview | Parameters | Example 1 |
DescriptionThis program co-regsisters two images using an image-wide averaged sample/line translation with the TRANSLATE option or a set of variable sample/line translations with the WARP option. The program computes local translations spaced evenly throughout the image. The number and spacing of local translations is user defined. This allows for many output options including 1) directly creating the translated image, 2) creating a control network which can be used in other programs (e.g., translate, warp and qview-matchtool) or 3) creating a flat-field file usable in spreadsheets or plotting packages to visualize magnitude and direction of varying translations. For the TRANSLATE option, this implies that the internal geometry of both images be nearly the same so that the translation can be computed. That is, this program will not work if the translation varies significantly throughout the image. If condition of near constant translation is met then the translation can be computed to sub-pixel accuracy. If the internal geometry of both images do not match well, or a simple line/sample shift is not sufficient to register the images, the WARP option is a better choice than TRANSLATE because this uses the local translations to perform a rubber-sheet transformation. This option must be used with caution. It works very well with a well distributed collection of accurate control points across the image plane. NOTE: While coreg uses a predefined autoreg parameter template, there are a variety of pattern matching algorithms and parameter settings that can be used to optimize the success and accuracy of the co-registration attempt with the control point measures. It is recommended that you review the Pattern Matching page from the "Related Objects and Documents" section below. It is essential for using this application to understand how to create a "registration template" file and how to size your search and pattern chips. We will continue with the discussion of functionality of this program assuming the reader has a fundamental knowledge of Automatic Registration. The user can also refer to the autoregtemplate application that offers a gui interface for creating an autoreg template file. Below we give an example of an autoreg parameter template file (DEFFILE): Object = AutoRegistration Group = Algorithm Name = MaximumCorrelation Tolerance = 0.7 EndGroup Group = PatternChip Samples = 20 Lines = 20 ValidMinimum = 1400 ValidPercent = 75 EndGroup Group = SearchChip Samples = 90 Lines = 90 ValidMinimum = 1400 ValidPercent = 75 EndGroup EndObject For further discussion of the parameters used in this DEFFILE, see the Pattern Matching document. Briefly, the example DEFFILE will allow a successful registration only where the MaximumCorrelation algorithm's goodness-of-fit result is >=0.7, pixel value is >1400, and at least 75% of the pixels in both the PatternChip or the SearchChip are valid pixels. This program requires two input cubes, one which will be translated (FROM) and the other is held fixed (MATCH). The images must have the same number of samples and lines and can have only one band (use cube attributes to extract a single band if necessary). A grid will be defined across the held image using either the user parameters, ROWS and COLUMNS, or calculated based on the image size and the search chip size as follows: COLUMNS = (image samples - 1) / search chip samples + 1, and similarly for ROWS. Conceptually, the sparse grid defined by ROWS and COLUMNS will be laid on top of both images with even spacing between the rows (or columns) and but no row will touch the top or bottom of the image. That is, the grid is internal to the image. At each grid intersection, the local translation will be computed. This is done by centering the search chip at the grid intersection for the image to be translated (FROM) and centering the pattern chip at the grid intersection for the held image (MATCH). The pattern chip is walked through the search chip to find the best registration (if any). Again, see the Pattern Matching document for further details. The local translation is recorded at all grid intersections that had a successful registration. The results are written to a control network and/or flat-file if requested. The average of the local translations is then used to compute an overall sub-pixel translation which can be applied to the FROM image and written as the output image (TO). Some tips to improve odds of a successful registration are provided. In general a small pattern chip size makes registration more difficult. Depending on your dataset, 20x20 is probably a good starting point. The larger the translation, the larger the search chip size will need to be; if your translation is only a couple of pixels, you should make the search chip only slightly larger than the pattern (e.g., 25x25 vs 20x20). However if the translation is large you will need to expand the search area. For example, if the translation is roughly 45 pixels and your pattern is 20x20 the search area should be, roughly, 20+2*45 or 110x110. The output control point network file (ONET) can be visually overlayed on the the displayed input images using the qview-MatchTool. The qview image display application will allow you to evaluate and interactively edit the network within the MatchTool. CategoriesRelated Applications to Previous Versions of ISISThis program replaces the following applications existing in previous versions of ISIS:
Related Objects and DocumentsApplicationsDocumentsHistory
|
Parameter GroupsInput Files
Output Cube
ControlNetOptions
|
This cube will be translated to register to the MATCH (reference) cube.
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
This cube will be held as the reference and the FROM cube will be translated to match this cube. The sample/line measurements recorded from this image are basically the defined output coordinates that the FROM image will be mapped to.
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
The parameter template to use for the Autoregistration functionality. The default template calls the Maximum Correlation pattern matching algorithm with predefined parameter values. There are other templates available in the system autoreg/template directory. Also, the user can use the 'autoregtemplate' application to create a new template file.
Type | filename |
---|---|
File Mode | input |
Default Path | $base/templates/autoreg |
Default | $base/templates/autoreg/coreg.maxcor.p2020.s5050.def |
Filter | *.def |
Output cube containing the translated or warped data.
Type | cube |
---|---|
File Mode | output |
Internal Default | None |
Filter | *.cub |
The tranformation type to use on the output file. The options are TRANSLATE or WARP. If WARP is selected, the ONET and DEGREE parameters are required. Defaults to TRANSLATE.
Type | string | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Default | TRANSLATE | |||||||||
Option List: |
|
The degree to be used in the warp transformation for the linear regression model. Defaults to 1.
Type | integer |
---|---|
Default | 1 |
This will be the interpolation type used to generate the output file in either the translate or warp application. Defaults to NEARESTNEIGHBOR.
Type | string | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | CUBICCONVOLUTION | ||||||||||||
Option List: |
|
This file will contain the Control Point network results of coreg in a binary format. This is required if the WARP option is selected for the output file. The resulting control points in this file can be viewed using the qview-MatchTool. If the coregistration fails between any measures, the points and measures remain in this output file with a flag called Ignore=True.
Type | filename |
---|---|
File Mode | output |
Internal Default | None |
Filter | *.net *.txt |
This file will contain the Control Point network results of coreg in a readable format. The control point information will be comma separated and contain the sample, line positions in the first input (FROM) cube, the sample, line position found in the search (MATCH) reference cube, and the sample difference and line difference between the two. This output file will only contain the points and measures that resulted in a successful registration.
Type | filename |
---|---|
File Mode | output |
Internal Default | None |
Filter | *.txt *.lis *.lst |
The number of rows of points to establish in the coreg process. If not entered, it will default to ROWS = (image lines - 1) / search chip lines + 1.
Type | integer |
---|---|
Internal Default | Automatic |
Minimum | 1 (inclusive) |
The number of columns of points to establish in the coreg process. If not entered, it will default to COLUMNS = (image samples - 1) / search chip samples + 1.
Type | integer |
---|---|
Internal Default | Automatic |
Minimum | 1 (inclusive) |
Example 1Coregistration of 2 Images Description
This example shows the coreg application. The rows and columns parameters are left as default.
Sample,Line,TranslatedSample,TranslatedLine,SampleDifference,LineDifference,GoodnessOfFit 211.875,164.283,200,133,-11.8751,-31.2829,0.991597 211.766,429.437,200,398,-11.7661,-31.4369,0.995987The above text file is the ffile.txt file created when coreg is ran. The flat file is comma seperated and can easily be imported into excel. Command Line
coreg from=./lunar1.cub match=./lunar2.cub t=out.cub flatfile=ffile.txt
Just run coreg on 2 images.
Input Images
Output Image
|