ECC image alignment algorithm (image registration)

This is a Matlab implementation of the ECC image alignment (image registration) algorithm.
8.9K Downloads
Updated 10 Dec 2017

View License

This is a Matlab implementation for the forwards additive version of the ECC image alignment algorithm based on the paper "G.D. Evangelidis, E.Z. Psarakis, Parametric Image Alignment using Enhanced Correlation Coefficient Maximization", IEEE Trans. on PAMI, vol. 30, no. 10, 2008. ECC algorithm is a direct (gradient-based) image registration algorithm. Due to gradient information, it achieves high accuracy in parameter estimation (i.e. subpixel accuracy). Its performance is invariant to global illumination changes in images since it considers the correlation coefficient (zero-mean normalized cross correlation) as an objective function.
The algorithm takes as input two unregistered images (input image, template image) and estimates the 2D geometric transformation, that, applied to the input image, provides a warped image registered to the template one. The current implementation includes a pyramid-based framework thus compensating large displacements. For even larger displacements or strong geometric distortions, ECC may need an appropriate initialization. This can be done either by feature matching or through an exhaustive search scheme for a coarse alignment.
The user can enable the pyramid-based implementation as well as choose the type of transformation (translation, euclidean, affine, homography), the number of iteration per level and the initialization transformation (optional). In order to see an example, run the demos. For more details take a look at the help of ecc.m and/or at the above mentioned paper.

Inverse-compositional version of ECC can be found at the Image Alignment Toolbox (https://sites.google.com/site/imagealignment/)

Cite As

Georgios Evangelidis (2024). ECC image alignment algorithm (image registration) (https://www.mathworks.com/matlabcentral/fileexchange/27253-ecc-image-alignment-algorithm-image-registration), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.14.0.0

Image Alignment Toolbox link has been updated
Inverse-compositional ECC algorithm is available

1.13.0.0

a bug in pamam_update function is fixed

1.12.0.0

1) The code is updated and deals better with partially overlapped images.
2) A new demo demonstrates the alignment with partial overlap
3) Bugs for euclidean alignment have been fixed

1.11.0.0

ECC deals with Euclidean transformation (rotation+translation). The user can enable any of the following transformations: translation, euclidean, affine, homography

1.9.0.0

Bugs in demo file have been fixed.

1.8.0.0

1) The algorithm deals with translation transform as well

2) Some compatibility problems with recent versions of Matlab have been resolved

1.7.0.0

1) The main function also accepts color (RGB) images. 2) minor bugs are fixed

1.6.0.0

bugs fixed

1.5.0.0

Some minor bugs have been resolved. Note that in this updated version,
warp initialization is the original affine or homography matrix and
diagonal elements are not the distance from unit. This might cause a
kind of confusion to users.

1.1.0.0

Revised description

1.0.0.0