Intensity-based image registration
transforms the 2-D or 3-D grayscale image, moving_reg
= imregister(moving
,fixed
,transformType
,optimizer
,metric
)moving
, so that it
is registered with the reference image, fixed
.
transformType
defines the type of transformation to
perform. metric
defines the quantitative measure of similarity
between the images to optimize. optimizer
describes the method
for optimizing the metric. The function returns the registered image,
moving_reg
.
[
transforms the spatially referenced image moving_reg
,R_reg
]
= imregister(moving
,Rmoving
,fixed
,Rfixed
,transformType
,optimizer
,metric
)moving
so that it is
registered with the spatially referenced image fixed
.
Rmoving
and Rfixed
are spatial
referencing objects that describe the world coordinate limits and the resolution of
moving
and fixed
.
___ = imregister(___,
specifies additional options with one or more name-value pair arguments.Name,Value
)
Both imregtform
and
imregister
use the same underlying registration
algorithm. imregister
performs the additional step of
resampling moving
to produce the registered output image
from the geometric transformation estimate calculated by
imregtform
. Use imregtform
when
you want access to the geometric transformation that relates
moving
to fixed
. Use
imregister
when you want a registered output
image.
Create an optimizer
and metric
with
the imregconfig
function before
calling imregister
. Getting good results from
optimization-based image registration usually requires modifying optimizer or
metric settings for the pair of images being registered. The
imregconfig
function provides a default configuration
that should only be considered a starting point. 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. See the output of
imregconfig
for more information on the different
parameters that you can modify.
If the spatial scaling of your images differs by more
than 10%, resize them with imresize
before
registering them.
Use imshowpair
or imfuse
to visualize the results of registration.
You can use imregister
in an
automated workflow to register several images.
When you have spatial referencing information about the image to be
registered, specify the information to imregister
using
spatial referencing objects. This helps imregister
converge
to better results more quickly because scale differences can be taken into
account.