From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Procrustes Analysis without Reflection
Date: Thu, 10 Jul 2008 18:29:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 56
Message-ID: <g55kdg$omj$>
References: <> <g09nco$6f1$> <g0anam$kor$> <g55807$io8$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1215714544 25299 (10 Jul 2008 18:29:04 GMT)
NNTP-Posting-Date: Thu, 10 Jul 2008 18:29:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:478692

"Qasim " <> wrote in message <g55807$io8
> I am trying to understand exactly what is done in Matlab's
> PROCRUSTES.  From your reply, it seems that given two sets
> of points, it first assumes that the center of rotation is
> at the mean of each set, which reduces the problem to just
> finding the rotation matrix using SVD.  I am dealing with a
> more general problem in which I cannot assume that the sets
> of points are symmetrical around the mean.  In that case,
> the mean assumption would lead to grossly inaccurate
> estimates of the rotation matrix.  In the general problem,
> the center-of-rotation vector just adds N unknowns to an
> N-dim shape.  In principle given a succession of rotating
> shapes plus random noise (i.e. more than N samples), it
> should be possible to simultaneously estimate the
> center-of-rotation and the rotation matrix.  Is there any
> way to do this simply in Matlab using a variant of
> PROCRUSTES, or do I need to work this all out by myself?
> Thanks
> QZ

  I'm afraid my wordage in this thread back in May 13 may have been 
misleading, Qasim.  Matlab's 'procrustes' does NOT assume that the mean 
points of the two sets are coincident.  Its first step is to translate one set in 
such a way that these do become coincident.

  The original poster, Rizwindu, wished to align two sets of data in the same 
way as 'procrustes' does, except that a possible reflection should be avoided.  
It was not to provide a reflection even if that would furnish a better match.  I 
know of no way of forcing 'procrustes' to do that, so my endeavor in 
answering this question was to show how one could achieve this goal without 
using 'procrustes'.

  The three steps one would need to use would be 1) translate one of the sets 
so that their mean points are coincident, 2) find the best fitting rotation of 
one set about that common mean point so as to match the other set, and 3) 
provide the best rescaling relative to this mean point.  I went through 1) and 
3) rather hastily because it is step 2) that is the most difficult.  I explained 
how step 2) could be modified in such a way as to prevent any reflection 

  As I outlined the procedure, for convenience I actually assumed that both 
sets would have been translated so that their mean points lay at a common 
origin, but this is very easy to do.  You simply subtract each set's mean point 
vector from each of its points so that its new mean then lies at the origin.  It 
is fairly easy to show that any least squares solution must involve a 
translation that matches the two mean points followed by a rotation about 
that common mean point.

  However the hard part is finding the correct rotation.  If you have any 
specific questions about that material I sent in May, please don't hesitate to 

Roger Stafford