title: Active Shape Models: matching model points to target points
body: <p>I have a question regarding Active Shape Models. I am using the paper of T. Coots (which can be found <a href="http://www.face-rec.org/algorithms/AAM/app_models.pdf" rel="nofollow noreferrer">here</a>.)</p>
  
  <p>I have done all of the initial steps (Procrustes Analysis to calculate mean shape, PCA to reduce dimensions) but am stuck on fitting.</p>
  
  <p>This is the situation I am in now: I have calculated the mean shape with points <strong>X</strong> and have also calculated a new set of points <strong>Y</strong> that <strong>X</strong> should move to, to better fit my image.</p>
  
  <p>I am using the following algorithm, which can be found on page 23 of the paper previously linked:</p>
  
  <hr>
  
  <p><img src="https://i.stack.imgur.com/T361x.png" alt="enter image description here"></p>
  
  <hr>
  
  <p>To clarify: <img src="https://i.stack.imgur.com/OBzLO.png" alt=""> is the mean shape calculated with Procrustes Analysis, and the <img src="https://i.stack.imgur.com/zoYtE.png" alt=""> is the matrix containing the eigenvectors calculated with PCA.</p>
  
  <p>Everything goes well up to step 4. I can calculate the pose parameters and invert the transformation onto the points <strong>Y</strong>.</p>
  
  <p>However, in stap 5, something strange happens. Whatever the pose parameters are calculated in stap 3 and applied in stap 4, stap 5 always results in almost exactly the same vector <strong>y'</strong> with very low values (one of them being 1.17747114e-05 for example). (So whether i calculated a scale of 1/10 or 1000, <strong>y'</strong> barely changes).</p>
  
  <p>This results in the algorithm always converging to the same value of <strong>b</strong>, and thus in the same output shape <strong>x</strong>, no matter what the input set of target points <strong>Y</strong> are that I want the model points <strong>X</strong> to match with.</p>
  
  <p>This sure is not the goal of the algorithm... Could anyone explain this strange behaviour? Somehow, projecting my calculated vector <strong>y</strong> in <em>step 5</em> into the "tangent plane" does not take into account any of the changes made in <em>step 4</em>.</p>
  
  <hr>
  
  <p>Edit: I have some more reasoning, though no explanation or solution. If, in <em>step 5</em>, i manually set <strong>y'</strong> to consist only of zeros, then in <em>step 6</em>, <strong>b</strong> is equal to the matrix of <strong>eigenvectors multiplicated with the meanshape</strong>. And this results in the same b I always get (since <strong>y'</strong> is always a vector with very low values). </p>
  
  <p>But these eigenvectors are calculated from the meanshape using PCA... So what's expected, is that no change should take place, right?</p>
  
  <hr>