Azzera filtri
Azzera filtri

How to improve imregister for rigid 3D image registration of very small images?

14 visualizzazioni (ultimi 30 giorni)
I have 3D image stacks of a dendrite over time and want to register every image stack to the first one of the series. I found the function imregister and want to use it, but the resulting alignment is not very well. Please find two example images and a registration attempt attached. The images are created using two-photon microscopy.
I played around with the parameters but I feel like I can do this forever and I still have Mean-Squared Errors around 380. The images are also quite small, voxel size of 0.007 microns in X&Y and 0.6 microns in Z; image size = 512x512x22. The 3D array has values from 0-255.
So I wanted to ask for some experience/tips in choosing parameters especially for such an image size, or if you spot any error in my code. How should I proceed?
Here is my code
fixed = get3DImage(<fixedImage>); %returns 3D array containing my image, uint8
moving = get3DImage(<movingImage>);
Rfixed = imref3d(size(fixed),0.000007,0.000007,0.0006); %Pixel extent in world parameters
Rmoving = imref3d(size(moving),0.000007,0.000007,0.0006);
[optimizer, metric] = imregconfig('monomodal');
optimizer.MaximumStepLength = 6.25e-05;
optimizer.MinimumStepLength = 0.9e-05;
optimizer.MaximumIterations = 1000;
movingRegistered = imregister(moving,Rmoving, fixed, Rfixed, 'rigid', optimizer, metric);
Any help appreciated! Thanks

Risposta accettata

Matt J
Matt J il 15 Lug 2018
Modificato: Matt J il 15 Lug 2018
I recommend that you use imregtform instead, since it will output the transformation as a result, instead of just the registered image. I also recommend that you use the 'InitialTransformation' option to initialize the registration with the immediately preceding registration result in the series. Assuming the motion is gradual over time, this will make it easier for the solver to deal with very large displacements relative to the fixed image.
Finally, are you sure that a 'rigid' motion model is a good one for dendrites? I thought the only biological tissue that moved rigidly was bone, but then again I'm not a biologist.
  11 Commenti
Matt J
Matt J il 20 Lug 2018
The three Eigenvectors form the rows of a rotation matrix whose Euler angle (or Tait-Bryan angle?) decomposition gives Orientation. How that decomposition works is something you probably understand better than anyone else, since you explained how it works here.
But I don't see why you would need to analyze things in terms of angles. If E1 and E2 are the 3x3 eigenvector matrices of Image 1 and Image 2, then they will be related by a rotation matrix R
E1*R=E2
which you can just solve for by matrix algebra,
R=E1.'*E2
Hello Matlab
Hello Matlab il 22 Lug 2018
Aaah, now I see that connection! One matrix multiplication is indeed easier than rotating manually by the angles. Especially when axes are unclear.
Now I use a transformation object (rotation matrix from eigenvectors and weighted centroids diff for translation) as Initial Transformation. Mean-Square Errors are still pretty high, though, and the registered images not euqally aligned. This will take a little longer
You helped me a lot, Matt, thank you.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by