Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to solve TA = BT
Date: Mon, 19 Jan 2009 18:02:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <gl2f6r$91v$1@fred.mathworks.com>
References: <gkkqeh$idk$1@fred.mathworks.com> <gl29kl$qn5$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232388123 9279 172.30.248.35 (19 Jan 2009 18:02:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 19 Jan 2009 18:02:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:512524


"Matt " <mjacobson.removethis@xorantech.com> wrote in message <gl29kl$qn5$1@fred.mathworks.com>...
> .......
> In addition to what Roger said, T has 6 degrees of freedom, so if n>6, it is likely that the above system of equations will be overdetermined. So, I'm assuming that what you want is some sort of least squares solution
> 
> (1)  min.  sum_i || T*Ai-Bi*T ||^2   
> 
> If you parameterized T in terms of angles and translations, you could solve this using fmincon(), althrough you would want a good initial guess of T as insurance against local minima.
> .......

  Even with n = 1, it is overdetermined in that sense, Matt.  The equality

 T*A = B*T

for a single A and B amounts to 12 linear equations to satisfy by itself (ignoring the bottom rows which are always identically equal to [0 0 0 1].)  That is why I said that A and B have to abide by rather stringent conditions for solutions to exist.  In fact, requiring sa = sb (in my earlier notation) represents three constraints and va*ua = vb*ub makes three more, thus leaving six degrees of freedom out of the original twelve for T.  This becomes all the more true for n > 1.

  Pinpress's wordage seemed to me to suggest that the Ai and Bi affine transformations arose from some kind of actual measurements that pertained to a real translation plus rotation that was known to exist, and it was only necessary to determine from these measurements just what it was.

  With reference to the least squares approach, I think you meant 'fminunc'.  There would be no constraints in that case with the six parameters - any Euler angles and any displacements are valid cases to be considered in the minimization process.

Roger Stafford