Create an Optimizer and Metric for Intensity-Based Image Registration
你可以通过一个图像相似性度量和一个选择imizer technique toimregister
. An image similarity metric takes two images and returns a scalar value that describes how similar the images are. The optimizer you pass toimregister
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 toimregister
, but some pairs are better suited for some image classes. Refer to the table for help choosing an appropriate starting point.
Capture Scenario | Metric | Optimizer |
---|---|---|
Monomodal | MeanSquares |
RegularStepGradientDescent |
Multimodal | MattesMutualInformation |
OnePlusOneEvolutionary |
Useimregconfig
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 withimregister
, seeRegister Multimodal MRI Images.