tformfwd() ?

Posted on 2008-10-20
Last Modified: 2013-11-25

I have a set of 3 point pairs. A point is defined like:

    pt = { x, y, scale, rotation }

I want to find the affine transformation that maps the 3 points to their point matches. Is there any way to do this in matlab? I know there is the tformfwd() function which looked promising but I don't know if it can handle a 3rd and 4th parameter attached to each point (scale and rotation). Any thoughts?

Question by:DJ_AM_Juicebox
LVL 27

Expert Comment

ID: 22792985
I am not really an expert in matlab, but I can try to help. What do you mean by point matches?

Accepted Solution

SyfAldeen earned 500 total points
ID: 22895724
Yes, you are quite right. maketform and tformfwd are the suitable functions to find and validate the affine transformation. However, you can't use them when your points are represented in this form. You can use the function below to convert your points to the proper form.

function [x y] = applytrans(p)

%   applytrans converts points from pt = { x, y, scale, rotation }

%                     to equivalent pt = { x, y}

%   By applying the scale and rotation transformation to original x, y.

%   For example:

%   A =[

%     1.0000    2.0000    3.0000    3.1416;

%     5.0000    6.0000    7.0000    1.5708;

%     4.0000    3.0000    1.0000   -1.5708;

%   ];


%   [x y]=applytrans(A)


%   Gives

%   x =

%    -3.0000

%   -42.0001

%     3.0000

%   y =

%    -6.0000

%    34.9998

%    -4.0000





Open in new window


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wordsWithoutList  challenge 24 99
My project did see openJDK that I installed. What could be the problem 7 124
How To Loop - Python 19 80
Normalised finishing position 2 44
Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! How to Know You are Making a Difference at EE In August, 2013, one …
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now