How to register high resolution images of same modality?

13 vues (au cours des 30 derniers jours)
Aditya Misra
Aditya Misra le 27 Avr 2022
Commenté : Aditya Misra le 27 Avr 2022
I have two large tif images (~35000x37000) in grayscale and i'm having trouble registering them. Because of the large resolution, I initially tried downsampling them by a factor of 16, performing intensity-based registration using imregister, and then applying the transform to the original high-resolution image. The issue is I'm unsure how to take into account the scaling factor into the transform matrix.
Another approach I tried was to binarize the images and then perform phase correlation registration, but that had led to an out-of-memory problem. I also tried doing the imregister on the original full-resolution images but it didn't complete quickly (>4 hours). I'd appreciate any suggestions or advice.

Réponses (1)

Jan
Jan le 27 Avr 2022
If you image is stored in double format, it uses 10 GB of RAM. On a 64 GB machine this should work. So is installing more RAM an option?
"The issue is I'm unsure how to take into account the scaling factor into the transform matrix." - this is much easier to answer, if you post the corresponding code.
  1 commentaire
Aditya Misra
Aditya Misra le 27 Avr 2022
So I do have a 64 GB machine. These are uint16 images. It doesn't occupy much space until I begin imregcorr or imregtform, at which point most of the RAM is taken up. When I performed imregcorr on the full size (i.e. not downsampled) binarized images, it ran out of memory.
As for code, here's what I did. Looking at the screenshot of the overlay, it's not exactly registered so any feedback would be great!
% These are binarized versions of the images, which I downsampled by factor
% of 4 using the nearest method
im_movingB = imresize(im_movingB,1/4,'nearest');
im_fixedB = imresize(im_fixedB,1/4,'nearest');
% Then I begin to perform phase correlation based registration.
tic
tformEstimate = imregcorr(im_movingB,im_fixedB);
toc
% Here I take the transform matrix and multiply the translation by the
% downsampling scale factor
tformEst_new = tformEstimate;
tformEst_new.T(3,1:2) = tformEst_new.T(3,1:2)*4;
% I then apply the scaled transform to the original, non-binarized moving
% images
im_movingR = imwarp(im_moving,tformEst_new,'OutputView',imref2d(size(im_fixed)));
% I then overlay and check the alignment.
imshowpair(im_fixed,im_movingR,'falsecolor')

Connectez-vous pour commenter.

Catégories

En savoir plus sur Geometric Transformation and Image Registration dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by