File Exchange

image thumbnail

Automatic Image Registration

version 1.0 (3.13 KB) by

Using mutual information for users with no access to IP toolbox.

9 Ratings



View License

Functions for aligning images by rotation and translation:
MI2 - calculating Mutual information
joint_h - calculating Joint histogram

Mutual information is calculated using joint histogram calculation between two images.

rotate_image.m function by Ohad Gal is used. DO NOT FORGET DOWNLOAD THE FILE:

Users having access to IP toolbox can download which uses IMROTATE function and has an option to crop the image to save computation time.

For each angle of rotation all translation parameters are checked.

NOTE - the images must have correct relative sizes with respect to each other (no resizing is incorporated in this registration)

Please e-mail if you have problems!

Comments and Ratings (11)

Error in im_reg_MI (line 61)
J = rotate_image(angle(k),image2); %rotated cropped IMAGE2
pls send me to correct code

zhiwei Li

Can send code to me? Thank you, I want to use in the use of the thesis


i hane this error

Error using .*
Integers can only be combined with integers of the same class, or scalar doubles.

Error in rotate_image (line 112)
out_image_m(out_points_span) = ...

Error in im_reg_MI (line 61)
    J = rotate_image(angle(k),image2); %rotated cropped IMAGE2

Error in test_registration (line 16)
 [h,im_matched, theta,II,J]=im_reg_MI(I, I2, 15, 5);

i use this code to use urs

[x y] = uigetfile('*.jpg','Select the image');
I=imread([y x]);

figure,imshow(I),title('1 image ');
 [x y] = uigetfile('*.jpg','Select the image');
I2=imread([y x]);

figure,imshow(I2),title('2 image ');
% cpselect(I, I2)
 [h,im_matched, theta,II,J]=im_reg_MI(I, I2, 15, 5);


Pearl (view profile)

phuc thanh

faiza kari

qq aa

Mikidache ABDOU

Xin Kang

Xiangsheng Zhu


ahmad yaghooby

MATLAB Release
MATLAB 6.5 (R13)

Inspired by: Rotate Image

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video