A 2D affine transform would use 6 parameters, rather than 7: a 2x2
matrix to encode rotations, zooms and shears, and a 2x1 vector for
translations.
Best regards,
-John
On 18 March 2011 05:05, Siddharth Srivastava <[log in to unmask]> wrote:
> Dear list users,
> I am currently trying to understand the implementation in
> spm_affreg, and
> to make matters simple, I tried to work out a 2D version of the registration
> procedure. I struck a roadblock, however...
>
> The function make_A creates part of the design matrix. For the 3D case, the
> 13 parameters
> are encoded in columns of A1, which then is used to generate AA + A1' A1. AA
> is 13x13, and everything
> works. For the 2D case, however, there will be 7+1 parameters( 2
> translations, 1 rotation, 2 zoom, 2 shears and 1 intensity scaling).
> The A1 matrix for 2D, then, will be (in make_A)
> A = [x1.*dG1 x1.*dG2 ...
> x2.*dG1 x2.*dG2 ...
> dG1 dG2 t];
>
> which is (number of sampled points) x 7. The AA matrix (in function costfun)
> is 8x8
> so, which is the parameter I am missing in modeling a 2D example? I hope I
> have got the number of parameters
> right for the 2D case? Is there an extra column that I have to add to A1 to
> make the rest of the matrix computation
> consistent?
>
> Thanks for the help
>
|