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 similarity metric.

imregister supports two similarity metrics:

  • Mattes mutual information

  • Mean squared error

In addition, imregister supports two techniques for optimizing the image metric:

  • One-plus-one evolutionary

  • Regular step gradient descent

You can pass any combination of metric and optimizer to imregister, but some pairs are better suited for some image classes. Refer to the table for help choosing an appropriate starting point.

Use 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 with imregister, see Register Multimodal MRI Images.

See Also