returns a version of image that is aligned with the reference image ref.


gives the result of aligning each of the imagei with the reference image ref.


uses image1 as the reference image.

Details and Options

  • ImageAlign[image1,image2] finds a transformation of image2 that registers it with image1 and returns the result of applying this transformation to image2.
  • ImageAlign works with arbitrary 2D and 3D images.
  • Resulting images have the same dimensions as the reference image.
  • The following options can be specified:
  • BackgroundAutomaticbackground value
    MethodAutomaticalignment method to use
    TransformationClassAutomaticgeometrical relation between images
  • Possible settings for the Method option are:
  • Automaticautomatically choose a suitable method
    "Keypoints"use corresponding keypoints
    {"Keypoints",method}use an ImageCorrespondingPoints method
    "MeanSquareGradientDescent"minimize the mean square distance of corresponding pixels
    "Fourier"Fourier-based registration
    "FourierBlurInvariant"blur invariant Fourier-based registration
  • With the default setting TransformationClass->Automatic, ImageAlign attempts to find the simplest possible transformation.
  • Possible transformations in order of increasing complexity are:
  • "Translation"translation only
    "Rigid"translation and rotation
    "Similarity"translation, rotation, and scaling
    "Affine"linear transformation and translation
    "Perspective"linear fractional transformation


open all close all

Basic Examples  (2)

Align a part of an image with the full image:

Click for copyable input

Align two 3D volumes:

Click for copyable input

Scope  (2)

Options  (11)

Applications  (3)

Properties & Relations  (2)

Introduced in 2010
Updated in 2017