imregister (Aug2004) |
rjtools
|
imregister (Jul2013) |
imregister
imregister - register an image using objects in a reference image
imregister input output refimage [coords] [cntrbox] [srchbox]
[niterate] [refrecen] [execute] [interpol]
[boundary] [geometry] [z1] [z2] [verbose] [logfile]
- input = ""
- Image to register.
- output = ""
- Registered output image.
- refimage = ""
- Reference image.
- coords = ".coo"
- Reference object coordinates file. This file need not yet exist. If the
specified name starts with a period, it is assumed to be an extension to
the reference image root name.
- cntrbox = 7
- Size of the fine centering box in pixels.
- srchbox = 11
- Size of the coarser search/centering box in pixels.
- refrecen = no
- Recenter the reference coordinates? Only set this parameter to 'yes'
when the reference coordinate file does not yet exist, or when 'refrecen'
was inadvertently set to 'no' when it was generated.
- execute = yes
- Perform the image transformation? If not, then the task will output a
file named "geomap.sol" containing the derived transformation, but
will not perform that transformation. This may be useful as a dummy run of
this task, or when only generating the reference coordinates file.
- interpol = "spline3" ["nearest"|"linear"|"poly3"|"poly5"|"sinc"]
- Type of interpolation to use.
- boundary = "wrap" ["nearest"|"reflect"|"constant"]
- Type of image boundary handling to use.
- constant = 0.
- Value to assign to out-of-bounds pixels, when boundary = "constant".
- geometry = "rscale" ["shift"|"xyscale"|"rotate"|"rxyscale"|"general"]
- Type of geometric model to fit. All options, except "general" fit
linear geometric transformations; "general" also attempts to fit a
non-linear polynomial distortion.
- z1, z2 = INDEF
- Lower and upper cut levels to use when displaying both input and reference
image. Default INDEF will be appropriate for most users.
- verbose = yes
- Print center, shift, magnification and rotation?
- logfile = "register.log"
- Name of the text log file.
Task to register (i.e., shift, (de)magnify and rotate) an image using a
list of matched input coordinates. The coordinate file need not yet
exist or even be specified; if absent, the reference image is displayed
and the user may interactively mark reference objects. Then the image
that is to be registered to the reference image is displayed with the
numbered positions of the reference objects indicated. If the only
transformation required is a translation, then the user need only mark
the position of the first of the reference objects in the image that is
to be registered, and the remaining objects will be found automatically;
if there is also a magnification and/or rotation, then all objects need
to be marked in the same order that the reference ones were marked,
unless the magnification and/or rotation are so slight that all objects
are still within the search box ('srchbox') from their location in the
reference coordinates file and no other object move into that search box.
If a very large transformation is required, one may want to start with
marking only a few reference objects that can easilly be identified in
the image to be registered. And subsequently use more objects to
perform the final registration during a second call to this task. If a
transposition is involved you may want to transpose the image first,
such that the image orientation is closer to that of the reference
image.
Note, that interpolation of pixel values always leads to a slight loss
in spatial resolution, and in a change of the noise characteristics of
the images (correlated noise).
Register an image to a reference image:
rj> unlearn imregister
rj> imregister 0152.NGC5267U 0152.NGC5267Ur 0137.NGC5267U refrecen+
IMREGISTER: input = "0152.NGC5267U.fits"
reference = "0137.NGC5267U.fits"
Wait for the cursor cross to appear in the image display area, then
mark at least 3 objects (stars) for coordinate referencing using
the 'c' key (press q to quit).
...
(mark stars)
...
Recentering objects in the reference coordinate list ...
Wait for the cursor cross to appear in the image display area, then
mark all reference stars in the same order using the 'c' key.
...
(mark one or more stars, depending on the situation)
...
Guessing the positions of the unmarked reference objects...
Recentering objects in the coordinate list ...
GEOMAP: Computing the spatial transformation function...
X fit ok. Y fit ok.
Xin and Yin fit rms: 0.06708224 0.0366997
Mean Xref and Yref: 321.5475 289.5375
Mean Xin and Yin: 320.9775 289.715
X and Y shift: -0.6733525 0.5605336 (xin yin)
X and Y scale: 0.9995855 0.9995855 (xin / xref yin / yref)
X and Y axis rotation: 0.047 0.047 (degrees degrees)
GEOTRAN: 0152.NGC5267U.fits --> 0152.NGC5267Ug.fits
Finished.
and text log file 'register.log' will list the following information:
IMREGISTER: IRAF2.12.1 raj@hasnap Dec 10 22:37:49 2003
reference = 0137.NGC5267U.fits
refcoords = 0137.NGC5267U.coo
input = 0152.NGC5267U.fits
TVMARK: N_obj = 5, N_marked = 1, N_guessed = 4
GEOMAP: Computing the spatial transformation function...
X fit ok. Y fit ok.
Xin and Yin fit rms: 0.06708224 0.0366997
Mean Xref and Yref: 321.5475 289.5375
Mean Xin and Yin: 320.9775 289.715
X and Y shift: -0.6733525 0.5605336 (xin yin)
X and Y scale: 0.9995855 0.9995855 (xin / xref yin / yref)
X and Y axis rotation: 0.047 0.047 (degrees degrees)
GEOTRAN: interpol = spline3 boundary=wrap
0152.NGC5267U.fits --> 0152.NGC5267Ug.fits
IMREGISTER: Finished.
- IMREGISTER v2.11, Jun 19 2000 [R.A. Jansen]
- First 'rjtools' version of this task, building on an earlier script by RAJ;
IRAF 2.11.3
- IMREGISTER v2.12, Jul 12 2003 [RAJ]
- Changed 'imroot'->'impath//imroot' after change to 'chkimg'; IRAF 2.12.1
- IMREGISTER v2.12, Jul 29 2003 [RAJ]
- Changed 'cparse'->'ocparse' after revamp of task 'cparse'; IRAF 2.12.1
- IMREGISTER v2.12, Aug 24 2004 [RAJ]
- Wrote this help file; IRAF 2.12.2
- IMREGISTER v2.12, May 26 2007 [RAJ]
- Added 'geometry' parameter (see manual of 'geomap' for the meaning of the
available choices). 'rscale' used to be hardcoded and remains the default.
Also added cut level parameters 'z1' and 'z2'. Default values INDEF ensure
meaningful cut levels in most cases, and allow input and reference image to
have different signal levels; IRAF 2.12.2
- IMREGISTER v2.12, May 28 2007 [RAJ]
- Updated this help file; IRAF 2.12.2
- IMREGISTER v2.12, Jul 17 2013 [RAJ]
- Re-enabled option "constant" for boundary handling, added associated
'constant' parameter for this option; Updated this help file and fixed an
error in the syntax of the calling sequence in the example; IRAF 2.12–2.16
tvmark, geomap, geotrans, chkimg, ctrcoo, xdisplay, ocparse