imregconfig

Configurations for intensity-based registration

Syntax

  • [optimizer,metric] = imregconfig(modality) example

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

expand all

Create Optimizer and Metric Configurations to Register Images Captured on the Same Device

Load the images into the workspace and display them.

fixed  = imread('pout.tif');
moving = imrotate(fixed, 5, 'bilinear', 'crop');
imshowpair(fixed, moving,'Scaling','joint');

Create the optimizer and metric. The two images in this example were captured on the same device, so we'll set the modality to'monomodal'.

 [optimizer, metric]  = imregconfig('monomodal')
optimizer = 

  registration.optimizer.RegularStepGradientDescent

  Properties:
    GradientMagnitudeTolerance: 1.000000e-04
             MinimumStepLength: 1.000000e-05
             MaximumStepLength: 6.250000e-02
            MaximumIterations: 100
            RelaxationFactor: 5.000000e-01

metric = 

  registration.metric.MeanSquares

  This class has no properties.

Pass optimizer and metric to imregister to perform the registration.

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

View the registered images

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

Input Arguments

expand all

modality — Image capture modality'monomodal' | 'multimodal'

Image capture modality describes how your images have been captured, specified as either 'monomodal' (captured on the same device) or 'multimodal' (captured on different devices).

Output Arguments

expand all

optimizer — Optimization configurationoptimizer object

Optimization configuration describes the method for optimizing the similarity metric, returned as one of the optimizer objects, registration.optimizer.RegularStepGradientDescent or registration.optimizer.OnePlusOneEvolutionary

metric — Metric configurationmetric object

Metric configuration describes the image similarity metric to be optimized during registration, returned as one of the metric objects, registration.metric.MeanSquares or registration.metric.MattesMutualInformation.

More About

expand all

Monomodal

Images captured on the same device. Monomodal images have similar brightness ranges.

Multimodal

Images captured on different devices. Multimodal images usually have different brightness ranges.

Tips

  • Your registration results can improve if you adjust the optimizer or metric settings. 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.

Was this topic helpful?