Create an Optimizer and Metric for Intensity-Based Image Registration
You can pass an image similarity metric and an optimizer technique to
imregister. An image similarity metric takes two images and returns a scalar
value that describes how similar the images are. The optimizer you pass to
imregister defines the methodology for minimizing or maximizing the
imregister supports two similarity metrics:
Mattes mutual information
Mean squared error
imregister supports two techniques for optimizing the
Regular step gradient descent
You can pass any combination of metric and optimizer to
but some pairs are better suited for some image classes. Refer to the table for help choosing
an appropriate starting point.
imregconfig to create the default metric and
optimizer for a capture scenario in one step. For example, the following command returns the
optimizer and metric objects suitable for registering monomodal images.
[optimizer,metric] = imregconfig('monomodal');
Alternatively, you can create the objects individually. This enables you to create alternative combinations to address specific registration issues. The following code creates the same monomodal optimizer and metric combination.
optimizer = registration.optimizer.RegularStepGradientDescent(); metric = registration.metric.MeanSquares();
Getting good results from optimization-based image registration can require modifying
optimizer or metric settings. For an example of how to modify and use the metric and optimizer
imregister, see Register Multimodal MRI Images.