Simple matlab code for 2D and 3D image registration using the diffeomorphic log-demons algorithm
Code is provided in order to help the understanding of the Demons algorithm - Any comment or improvement is welcome
For a regular grid (image) we can use this exponential map but for irregular grid(point cloud/mesh) how we can proceed? Can we proceed with simple addition?
you DO know that it doesn't work for the basic circle to C case? it works only so much as it does _something_ - but it's nowhere near any sensible registration for any pair of images even simple ones that should be easy. thanks for the effort in any case.
Can I know about expfield function exponentiating vector field?
I have read some literature but I don't know how to calculate exponential field. So I don't understand the function.
I am confused that I can not get the same result showing in Fig. 6 ( Classical Circle to C registration example)
Please let me know what changes should be incorporated to work on RGB images.
Some details should be changed for my purpose, and thanks.
I'm running the 2D demons. I'm confused about findupdate.m. In findupdate.m, your code computes the gradient of the moving image or float image. As far as I have learnt from literature, gradient of fixed image are used in the expression for u. I'm not quite clear about this.
@tianyu - You are raising an interesting point - There is a difference between Displacement field != Transformation (zero displacement leads to an identity matrix)
Typically, the identity matrix is added when computing the Jacobian determinant
See also this thread (from the itk code): http://www.cmake.org/Bug/bug_relationship_graph.php?bug_id=7327&graph=dependency&orientation=vertical (code is now including additional comments, perhaps this would help others)
@Herve LomBaert: And I don't think the code is wrong.But I can't get the same result showing in the paper.This makes me very upset.
@Herve LomBaert: Thank you for your reply.I have read many papers about the diffeomorphic Log-Demons.As you know,if the registration is diffeomorphic,so the Jacobian determinant of deformation must be positive.But,running your code,I find the determinant sometimes is negative.
@tianyu - Indeed, this is the Log-domain Diffeomorphic version, the deformation field is defined as the exponential map of a velocity field via expfield() - (velocity field != deformation field - More details on the associated literature on the Diffeomorphic Log-Demons)
Is it Diffeomorphic Image Registration?I do not think the Jacobi determinant of the transformation field is positive.
@Hg: in image registration, you have to know how to deal with the boundaries of the images. A common choice is to have them fixed. So, in order not to over-regularize nor violate the diffeomorphism, a band of zeros is added during optimization.
May I know the purpose of the piggyback function? Where can I find the explanation for the algorithm used in the code other than the paper included in the package?
Fix in 2D (adding comments regarding Jacobian computation)
cleanup in sample files
Create scripts with code, output, and formatted text in a single executable document.