You are here : matlabImage Processingimregister

imregister() - Image Processing

moving_reg = imregister(moving,fixed,transformType,optimizer,metric) transforms
the 2-D or 3-D image, moving, so that it is registered
with the reference image, fixed. Both moving and fixed images
must be of the same dimensionality, either 2-D or 3-D. transformType is
a character string that defines the type of transformation to perform. optimizer is
an object that describes the method for optimizing the metric and metric is
an object that defines the quantitative measure of similarity between
the images to optimize. Returns the aligned image, moving_reg.[moving_reg,R_reg]
= imregister(moving,Rmoving,fixed,Rfixed,transformType,optimizer,metric) 
transforms the spatially referenced image 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 resolution of moving and fixed.___ = imregister(___,Name,Value) specifies
additional options with one or more Name,Value pair
arguments.


Syntax

moving_reg = imregister(moving,fixed,transformType,optimizer,metric) example[moving_reg,R_reg]
= imregister(moving,Rmoving,fixed,Rfixed,transformType,optimizer,metric)___ = imregister(___,Name,Value)


Example

Register Two MRI Images Obtained Using Different ProtocolsRead the MRI images.fixed  = dicomread('knee1.dcm');
moving = dicomread('knee2.dcm');View the misaligned images.imshowpair(fixed, moving,'Scaling','joint');
Create a configuration suitable for registering images
from the different sensors. [optimizer, metric] = imregconfig('multimodal')
optimizer = 

  registration.optimizer.OnePlusOneEvolutionary

  Properties:
         GrowthFactor: 1.050000e+00
              Epsilon: 1.500000e-06
        InitialRadius: 6.250000e-03
    MaximumIterations: 100

metric = 

  registration.metric.MattesMutualInformation

  Properties:
    NumberOfSpatialSamples: 500
     NumberOfHistogramBins: 50
              UseAllPixels: 1Tune the properties of the optimizer to get the problem
to converge on a global maxima and to allow for more iterations.optimizer.InitialRadius = 0.009;
optimizer.Epsilon = 1.5e-4;
optimizer.GrowthFactor = 1.01;
optimizer.MaximumIterations = 300;Perform the registration.movingRegistered = imregister(moving, fixed, 'affine', optimizer, metric);View registered images.figure
imshowpair(fixed, movingRegistered,'Scaling','joint');


Output / Return Value


Limitations


Alternatives / See Also


Reference