File Exchange

image thumbnail

Picture Transformation Finder

version 1.0 (1.92 KB) by

This function finds the transformation matrix of two images.



View License

%%The purpose of this function is to find the transformation matrix between
%%two images
%%How it works:
%%This function first detects all of the "corners" in the two pictures.
%%Then the function estimates the transformational matrix between the two
%%pic1 = The first JPEG image
%%pic2 = The second JPEG image.
%%pts1: the corner points on pic1
%%pts2: the corner points on pic2
%%tform: This is the transformational matrix from pic1 to pic2
%%The images should be of relative objects in order for the
%%transformational matrix to have any meaning. Also please do not be too
%%harsh in the comments, this is my first computer vision toolbox function
%%and my first parallel computation toolbox function. Please note that if
%%you do not have the parallel computation tool, all you need to do is get
%%rid of the spmd construct but keep the statements. You will also need to get
%%rid of pts1 = points1{1} and pts2 = points2{2} and rename the points1 and
%%points2 to pts1 and pts2 respectfully.
%%Version: 1.0 $ $Date: 7-Oct-2011
%%@author Alexander James Wallar

If you use this function to find the transformation from one image to the same image, you will get a matrix closely resembling the identity matrix

Comments and Ratings (1)

It always returns (even if you input same image as pic1 and pic2):

Undefined variable points2.

Error in picTransformation (line 56)
pts2 = points2{2};

MATLAB Release
MATLAB 7.10 (R2010a)

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

» Watch video

Win prizes and improve your MATLAB skills

Play today