Wednesday, May 22, 2013

IMAGE REGISTRATION

Unknown | 1:11 PM |
 

What is Image Registration ?

           In many situations one has two or more images of the same object where the differences between the images have to do with acquisition times, dissimilar acquisition hardware or changes in the shape of the object between exposures. To facilitate comparison between such images it is necessary to register them, i.e., to adjust them so that they match each other.
     The Image Registration operation modifies a test image to match a reference image when the keyfeatures are not too different. The algorithm is capable of subpixel resolution but it does not handle very large offsets or large rotations. The algorithm is based on an iterative processing that proceeds from coarse to fine detail. The optimization is performed using a modified Levenberg-Marquardt algorithm and results in an affine transformation for the relative rotation and translation with optional isometric scaling and contrast adjustment. The algorithm is most effective with square images where the center of rotation is not far from the center of the image.

Registering an Image

Image registration is the process of aligning two or more images of the same scene. Typically, one image, called the base image, is considered the reference to which the other images, called input images, are compared. The object of image registration is to bring the input image into alignment with the base image by applying a spatial transformation to the input image.
A spatial transformation maps locations in one image to new locations in another image.Determining the parameters of the spatial transformation needed to bring the images into alignment is key to the image registration process. Image registration is often used as a preliminary step in other image processing applications.
For example, you can use image registration to align satellite images of the earth’s surface or images created by different medical diagnostic modalities (MRI and SPECT). After registration, you can compare features in the images to see how a river has migrated, how an area is flooded, or to see if a tumor is visible in an MRI or SPECT image.

Point Mapping

The Image Processing Toolbox provides tools to support point mapping to determine the parameters of the transformation required to bring an image into alignment with another image. In point mapping, you pick points in a pair of images that identify the same feature or landmark in the images. Then, a spatial mapping is inferred from the positions of these control points.
The following figure provides a graphic illustration of this process. This process
is best understood by looking at an example.
 
clip_image002

EXAMPLE: REGISTERING TO A DIGITAL ORTHOPHOTO

This example illustrates the steps involved in performing image registration using point mapping. These steps include:
1 Read the images into the MATLAB workspace.
2 Specify control point pairs n the images.
3 Save the control point pairs.
4 Fine-tune the control points using cross-correlation. (This is an optional step.)
5 Specify the type of transformation to be used and infer its parameters from the control point pairs.
6 Transform the unregistered image to bring it into alignment.
To illustrate this process, the example registers a digital aerial photograph to a digital orthophoto covering the same area. Both images are centered on the business district of West Concord, Massachusetts.
The aerial image is geometrically uncorrected: it includes camera perspective, terrain and building relief, and internal (lens) distortions, and it does not have any particular alignment or registration with respect to the earth. The orthophoto, supplied by the Massachusetts Geographic Information System (MassGIS), has been orthorectified to remove camera, perspective, and relief distortions (via a specialized image transformation process). It is also georegistered (and geocoded)—the columns and rows of the digital orthophoto image are aligned to the axes of the Massachusetts State Plane coordinate system, each pixel center corresponds to a definite geographic location, and every pixel is 1 meter square in map units.
Step 1: Read the Images into MATLAB
In this example, the base image is westconcordorthophoto.png, the MassGIS georegistered orthophoto. It is a panchromatic (grayscale) image. The image to be registered is westconcordaerial.png, a digital aerial photograph supplied by mPower3/Emerge, and is a visible-color RGB image.
orthophoto = imread('westconcordorthophoto.png');
figure, imshow(orthophoto)
unregistered = imread('westconcordaerial.png');
figure, imshow(unregistered)



You do not have to read the images into the MATLAB workspace. The cpselect function accepts file specifications for grayscale images. However, if you want to use cross-correlation to tune your control point positioning, the images must be in the workspace.
clip_image004 
Step 2: Choose Control Points in the Images
The toolbox provides an interactive tool, called the Control Point Selection Tool, that you can use to pick pairs of corresponding control points in both images. Control points are landmarks that you can find in both images, like a road intersection, or a natural feature. To start this tool, enter cpselect at the MATLAB prompt, specifying as arguments the input and base images.
The cpselect function displays two views of both the input image and the base image in which you can pick control points by pointing and clicking.The number of control point pairs you pick is at least partially determined by the type of transformation you want to perform (specified in Step 5).
clip_image006
Step 3: Save the Control Point Pairs to the MATLAB Workspace
In the Control Point Selection Tool, click the File menu and choose the Save Points to Workspace option. See “Saving Control Points” on page 6-29 for more information.
For example, the Control Point Selection Tool returns the following set of control points in the input image. These values represent spatial coordinates; the left column are x-coordinates, the right column are y-coordinates.
input_points =
120.7086 93.9772
319.2222 78.9202
127.9838 291.6312
352.0729 281.1445
Step 4: Fine-Tune the Control Point Pair Placement
This is an optional step that uses cross-correlation to adjust the position of the control points you selected with cpselect. See “Using Correlation to Improve Control Points”
input_points_corr = cpcorr(input_points,base_points,...
                                  unregistered(:,:,1),orthophoto)

input_points_corr =
120.7086 93.9772
319.2222 78.9202
127.1046 289.8935
352.0729 281.1445
Step 5: Specify the Type of Transformation and Infer Its Parameters
In this step, you pass the control points to the cp2tform function that determines the parameters of the transformation needed to bring the image into alignment. cp2tform is a data-fitting function that determines the transformation based on the geometric relationship of the control points. cp2tform returns the parameters in a geometric transformation structure, called a TFORM structure.
When you use cp2tform, you must specify the type of transformation you want to perform. The cp2tform function can infer the parameters for five types of transformations. You must choose which transformation will correct the type of distortion present in the input image.
The predominant distortion in the aerial image of West Concord (the input image) results from the camera perspective. Ignoring terrain relief, which is minor in this area, image registration can correct for this using a projective transformation. The projective transformation also rotates the image into alignment with the map coordinate system underlying the base digital orthophoto image.
mytform = cp2tform(input_points,base_points,'projective');

Step 6: Transform the Unregistered Image
As the final step in image registration, transform the input image to bring it into alignment with the base image. You use imtransform to perform the transformation, passing it the input image and the TFORM structure, which defines the transformation. imtransform returns the transformed image.
registered = imtransform(unregistered,mytform)
clip_image008 

No comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Search

Infolinks In Text Ads

Total Pageviews

Subscribe here

Enter your email address:

Delivered by FeedBurner