1.cp2tform函数
tform=cp2tform(moivepoint,fixedPoint,transformType).
transformType=”nonreflective similarity” ,moivepoint到fixedPoint只有点平移,旋转,大小变化。两点之间的联系平行,并是直线。
最后用tform,在tformfwd进行空间变换。
2.[u, v] = tformfwd(Data{i}.tf2meanshape{1}, shape_residual(:, 1)’, shape_residual(:, 2)’);
转换shape_residual从the image coordinate到meanshape coordinate 。
3.bsxfun(@minus,….)是两个矩阵分别相减。
@times是两个矩阵元素分别相乘。
@rdivide是相除
@plus是相加
4tic;A=[1,2;3,4];B=[5,6;7,8]; x=A/B,toc
求中间程序计算的时间。