The attached demo code may be helpful. Note that it doesn't check for
convergence, and iterates for a fixed number of iterations.
Occasionally, because of the effects of discretely sampling the data,
the solution can jump around slightly.
As ever, when registering images, there's a trade off between the
matching and regularisation terms. For this code, the matching term
is the sum of squares difference, and the trade off probably needs
optimising by changing the settings.
prm = [0 1 1 0.01 0.05 0.0002];
The first element indicates the form of regularisation used (zero
indicates elasticity). The second two terms are supposed to indicate
pixel sizes. You should note that my the code for this is not quite
right - but it works OK for square pixels. I will fix this at some
point. Then the next three values encode the hyper-parameters of the
regularisation. If your image data is has larger values (or more
noise) than that in the demo, you'll need to increase these values
accordingly. The first of the thee penalises length changes (a Lam'e
parameter for elasticity). The second penalises area changes (2nd
Lam'e parameter). The third one should be small, and penalises
absolute displacements.
Best regards,
-John
On 5 July 2011 19:08, Zhijun Zhang <[log in to unmask]> wrote:
> Dear all:
>
> I want to have a test of 2D DARTEL functions with my 2D images,
> is there an example to
> do this? I have found the dartel2.m in the toolbox->dartel directory,
> but I do not know how to run it.
> Thank you very much.
>
> regards,
> Alex
>
|