Align aligns images relative to each other, for example, to correct shifts in the optical path of a microscope in each channel of a multi-channel set of images.
For two or more input images, this module determines the optimal alignment among them. Aligning images is useful to obtain proper measurements of the intensities in one channel based on objects identified in another channel, for example. Alignment is often needed when the microscope is not perfectly calibrated. It can also be useful to align images in a time-lapse series of images. The module stores the amount of shift between images as a measurement, which can be useful for quality control purposes.
Note that the second image (and others following) is always aligned with respect to the first image. That is, the X/Y offsets indicate how much the second image needs to be shifted by to match the first.
Available measurements
- XShift, Yshift: The pixel shift in X and Y of the aligned image with respect to the original image.
Settings:
Select the alignment method
Two options for the alignment method are available:
- Mutual Information: This more general method works well for aligning
images from different modalities that contain the same information, but are
expressed differently. However, this method performs better than Normalized Cross Correlation,
even in the same modality, if the images are not highly correlated.
It is iterative, and thus tends to be slower than other methods,
but is more likely to be correct. Essentially, alignment is performed by measuring
how well one image "explains" the other. For example, a flourescent image
can be aligned to a brightfield image by this method since the relevant
features are bright in one modality where they are dim in the other.
- Normalized Cross Correlation: This is a good means
of alignment in the case of images acquired with the same modality
(e.g., all images to be aligned are fluorescent). It is fast, however
it can be highly influenced by a particular, possibly spurious, feature and
in turn generate anomalously large shifts. It allows for a
linear relationship between the intensities of the two images,
i.e., the relevant features in the images to be aligned all have
varying degrees of brightness.
References
- Lewis JP. (1995) "Fast normalized cross-correlation." Vision Interface, 1-7.
Crop mode
The crop mode determines how the output images are either cropped
or padded after alignment. The alignment phase calculates the
areas in each image that are found to be overlapping. In almost
all cases, there will be portions of some or all of the images
that don't overlap with any other aligned image. These portions
have no counterpart and will be excluded from analysis. There
are three choices for cropping:
- Crop to aligned region: Crop every image to the region that overlaps
in all images. This makes downstream
analysis simpler because all of the output images
have authentic pixel data at all positions, however it discards
parts of images. Also, the output images may not be the same size
as the input images which may cause problems if downstream modules
use aligned and unaligned images (which may be of differing sizes)
in combination.
- Pad images: Align every image and pad with masked black
pixels to make each image the same size. This results in larger
images, but preserves all information in each of the images. This
may be the best choice if images undergo an operation such as
smoothing that could use the information that would otherwise be
cropped.
- Keep size: Maintain the sizes of the images but
align them, masking the unaligned portions with black pixels.
Align aligns all images relative to the first.
This is a reasonable option for alignments
with small displacements since it maintains a consistent image
size which may be useful if output images from different image sets
will be compared against each other after processing. The
reference image can also be used across image sets. For example,
the reference image could be loaded for all image sets in a
group to align the entire group's images similarly, then the
aligned images could be combined in a module such as
MakeProjection.
Select the first input image
Specify the name of the first image to align.
Name the first output image
Enter the name of the first aligned image.
Select the second input image
Specify the name of the second image to align.
Name the second output image
Enter the name of the second aligned image.