Code covered by the BSD License  

Highlights from
Corresponding Points through MDL

image thumbnail
from Corresponding Points through MDL by Dirk-Jan Kroon
Minimum Description Length optimization of PCA model for 2D/3D ASM model building

AffineGradient2D( UpdateAffine,mappingdata,options)
function [U,Ux] = AffineGradient2D( UpdateAffine,mappingdata,options)

nData=length(mappingdata);
x=zeros(options.nLandmarks*2,nData);
for j=1:nData
    xy=MapCircle2Object(CircleAlpha,mappingdata); 
    x(:,j)=xy(:);
end


if(nargout>1)
    [DL,DLd]=SVD_DL(x);

    U=DL;
    Dx=DLd.*xd;
    Ux=zeros(options.nLandmarks,nData);
    for j=1:nData, 
        Ux(:,j)=sum(reshape(Dx(:,j),options.nLandmarks,2),2); 
    end
    
    Ux=Ux(:);
else
    DL=SVD_DL(x);
    U=DL;
end

   

Contact us