Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

imregconfig

Configurations for intensity-based registration

Syntax

[optimizer,metric] = imregconfig(modality)

Description

example

[optimizer,metric] = imregconfig(modality) creates optimizer and metric configurations that you pass to imregister to perform intensity-based image registration. imregconfig returns optimizer and metric with default settings to provide a basic registration configuration.

Examples

collapse all

Read two 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');

View the misaligned images.

imshowpair(fixed, moving,'Scaling','joint')

Create the optimizer and metric, setting the modality to 'multimodal' since the images come from different sensors.

[optimizer, metric] = imregconfig('multimodal')
optimizer = 
  registration.optimizer.OnePlusOneEvolutionary

  Properties:
         GrowthFactor: 1.050000e+00
              Epsilon: 1.500000e-06
        InitialRadius: 6.250000e-03
    MaximumIterations: 100
metric = 
  registration.metric.MattesMutualInformation

  Properties:
    NumberOfSpatialSamples: 500
     NumberOfHistogramBins: 50
              UseAllPixels: 1

Tune the properties of the optimizer to get the problem to converge on a global maxima and to allow for more iterations.

optimizer.InitialRadius = 0.009;
optimizer.Epsilon = 1.5e-4;
optimizer.GrowthFactor = 1.01;
optimizer.MaximumIterations = 300;

Perform the registration.

movingRegistered = imregister(moving, fixed, 'affine', optimizer, metric);

View the registered images.

figure
imshowpair(fixed, movingRegistered,'Scaling','joint')

Input Arguments

collapse all

Image capture modality describes how your images have been captured, specified as either 'monomodal' (with similar brightness and contrast) or 'multimodal' (with different brightness or contrast).

Output Arguments

collapse all

Optimization configuration, returned as a RegularStepGradientDescent or OnePlusOneEvolutionary optimizer object. To learn more about the creation and properties of optimizer objects, see registration.optimizer.RegularStepGradientDescent and registration.optimizer.OnePlusOneEvolutionary.

Metric configuration describes the image similarity metric to be optimized during registration, returned as a MeanSquares or MattesMutualInformation metric object. To learn more about the creation and properties of metric objects, see registration.metric.MeanSquares and registration.metric.MattesMutualInformation.

More About

collapse all

Monomodal

Monomodal images have similar brightness and contrast. The images are captured on the same type of scanner or sensor.

Multimodal

Multimodal images have different brightness and contrast. The images can come from two different types of devices, such as two camera models or two types of medical imaging modalities (like CT and MRI). The images can also come from a single device, such as a camera using different exposure settings, or an MRI scanner using different imaging sequences.

Tips

  • If you adjust the optimizer or metric parameters, the registration results can improve. For example, if you increase the number of iterations in the optimizer, reduce the optimizer step size, or change the number of samples in a stochastic metric, the registration improves to a point, at the expense of performance.

Introduced in R2012a

Was this topic helpful?