From: Zoltan on
Hi all,

I ran into a problem, which is partly related to matlab, but it means a hard task to me. It is due to the fact that I'm not a linear algebra expert at all.

There are two 3D MR images, let's say X and Y, which need to be registered via affine transformations. Former computations showed some correspondences between the images, so I have an estimated collection of pairings (x,y), where x is a voxel in X and y is a voxel in Y. I should use these pairings to estimate transformation A.
The images are composed of n voxels and if i=1,...,n then I have n (x_i,y_i) pairings and I should minimize the distances of the pairings with the least trimmed squares method to obtain the proper A affine transformation matrix.
Something like this:
A_j+1 = arg min SUMMA || A_j.x_i - y_i ||
It is an iterative stuff, means that a former affine transformation (A_j) is applied to x_i, and its distance from y_i needs to be minimized. At the first step of the iteration A_0 is the identity. Here I know the coordinates of x_i and y_i and A_j () is also known. The matlab question is about the use of the ltsregres function, which can be found in LIBRA package. How should I organize or transform these known information to execute the desired optimization?
I hope that I managed to explain my problem clearly.:)
Thanks in advance.

Zoli