image registration using mutual information

i am trying to do image registration between 2 (natural scene) grayscale images using similarity transform and the mutual information similarity metric.
I started by trying to repeat the results from the following (ITK Forum) link : Simple image registration running the code of registration example #7 on the 2 bottle images given in the link.
so far i run the code successfully using the MeanSquares similarity metric.
however using MattesMutualInformation metric (with the exact same code) i failed to reach good registration results.

following is the algorithm output (after 500 iterations) and the input images as well as the transformed result image.

0.876671 -0.41851
0.41851 0.876671
Offset: [57.864, -18.4414]
Center: [97.6345, 116.739]
Translation: [-3.03366, 8.02229]
0.92897 0.443476
-0.443476 0.92897
Singular: 0
Angle = 0.445393
Scale =0.971444


will appreciate your help with this issue.
Thanks, Omer :slight_smile: .

1 Like

Welcome to the community Omer!

Mutual Information is designed for multi-modality registration, such as CT-MRI or visible light-infrared etc. It is less good for registering images of the same modality. But if you insist on using it, try increasing the number of histogram bins.

Hi Dženan,
Thanks for the quick answer :slight_smile:
we touched upon the bottles example just as a way to familiarise ourselves with ITK registration methods.
our original problem is trying to register 2 medical images (from 2 cameras with different optical settings and image quality) using ITK.
We have successfully accomplished this using MATLAB (using similarity and mutual information) but are having a hard time emulating the results using ITK.
We tried to follow the code of with minor modifications
(mainly replacing the translation transform by similarity), and obtained poor results.
We would appriciate any help and would be happy to provide the 2 images either by mail or directly here.
again thanks, Omer

If you provide your images here, more people will have a chance to help you.

attached are my input images and the Matlab derived similarity transform (using mutual information). also adding the transformed images using Matlab’s imwarp function.
we would like to obtain similar result using ITK with the same settings (similarity transform and mutual information) , any help would be appreciated.
Thanks, Omer :slight_smile:

resulting similarity transform using Matlab was:
0.7120 0.1054 0
-0.1054 0.7120 0
40.1383 10.0875 1.0000

scale = 0.7198
angle = 8.4221

input moving image:
endGray.bmp (26.1 KB)

input fixed image:
colGray.bmp (26.1 KB)

also adding the transformed image (using Matalb’s imwarp):
res.bmp (723.6 KB)

have you figure it out ? , cause i’m having a similar problem