Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pmi432 / LR07 / 2read / image processing toolbox guide.pdf
Скачиваний:
166
Добавлен:
18.03.2015
Размер:
18.08 Mб
Скачать

7 Image Registration

Using Correlation to Improve Control Points

You might want to fine-tune the control points you selected using cpselect. Using cross-correlation, you can sometimes improve the points you selected by eye using the Control Point Selection Tool.

To use cross-correlation, pass sets of control points in the input and base images, along with the images themselves, to the cpcorr function.

input_pts_adj= cpcorr(input_points, base_points, input, base);

The cpcorr function defines 11-by-11 regions around each control point in the input image and around the matching control point in the base image, and then calculates the correlation between the values at each pixel in the region. Next, the cpcorr function looks for the position with the highest correlation value and uses this as the optimal position of the control point. The cpcorr function only moves control points up to 4 pixels based on the results of the cross-correlation.

Note Features in the two images must be at the same scale and have the same orientation. They cannot be rotated relative to each other.

If cpcorr cannot correlate some of the control points, it returns their values in input_points unmodified.

7-30

Intensity-Based Automatic Image Registration

Intensity-Based Automatic Image Registration

Intensity-based automatic image registration is an iterative process. It requires that you specify a pair of images, a metric, an optimizer, and a transformation type. The metric defines the image similarity metric for evaluating the accuracy of the registration. This image similarity metric takes two images and returns a scalar value that describes how similar the images are. The optimizer defines the methodology for minimizing or maximizing the similarity metric. The transformation type defines the type of 2-D transformation that brings the misaligned image (called the moving image) into alignment with the reference image (called the fixed image).

The process begins with the transform type you specify and an internally determined transformation matrix. Together, they determine the specific image transformation that is applied to the moving image with bilinear interpolation.

Next, the metric compares the transformed moving image to the fixed image and a metric value is computed.

Finally, the optimizer checks for a stop condition. A stop condition is anything that warrants the termination of the process. In most cases, the process

has reached a point of diminishing returns or it has reached the specified maximum number of iterations. If there is no stop condition, the optimizer adjusts the transformation matrix to begin the next iteration.

7-31

7 Image Registration

Perform intensity-based image registration with the following steps:

1Read the images into the workspace with imread.

2Create the optimizer and metric with imregconfig.

3Register the images with imregister.

4View the results with imshowpair or save a copy of an image showing the results with imfuse.

The example, “Registering Multimodal MRI Images” on page 7-33, demonstrates this workflow in detail.

7-32

Registering Multimodal MRI Images

Registering Multimodal MRI Images

This example shows how you can use imregister to automatically align two magnetic resonance images (MRI) to a common coordinate system using intensity-based image registration. Unlike some other techniques, it does not find features or use control points. Intensity-based registration is often well-suited for medical and remotely sensed imagery.

Step 1: Load Images

This example uses two magnetic resonance (MRI) images of a knee. The fixed image is a spin echo image, while the moving image is a spin echo image with inversion recovery. The two sagittal slices were acquired at the same time but are slightly out of alignment.

fixed = dicomread('knee1.dcm'); moving = dicomread('knee2.dcm');

The imshowpair function is a useful function for visualizing images during every part of the registration process. Use it to see the two images

individually in a montage fashion or display them stacked to show the amount of misregistration.

figure, imshowpair(moving, fixed, 'montage') title('Unregistered')

7-33

7 Image Registration

In the overlapping image from imshowpair, gray areas correspond to areas that have similar intensities, while magenta and green areas show places where one image is brighter than the other. In some imager pairs, green and magenta areas don’t always indicate misregistration, but in this example it’s easy to use the color information to see where they do.

figure, imshowpair(moving, fixed) title('Unregistered')

7-34

Соседние файлы в папке 2read