auto image registration takes too long

10 views (last 30 days)
What: I have a reference image R. I want to align my other images based on R. The images have the same size, shape (rectangular), and color (gray scale).
Problem: I have tried using imregister() and imregcorr(), both in a for loop, where each time, I read an image, apply the function, and then imwrite() the result to the same image path. This process is taking around 1 minute per image, which I aim to improve.
Notes: I have read both documentations and made sure that my images are gray-scale and of type single before registering. The main difference between R and other images are just rotation and lighting (to align with R, the other images usually have to flip 90 or 180 degrees)
What you can help with: How can I speed up the alignment process? I am looking to perform a faster image auto-alignment. Help is appreciated.

Accepted Answer

Matt J
Matt J on 24 Mar 2021
Edited: Matt J on 24 Mar 2021
You should do an initial test of the different 90/180 degree flip combinations to see which re-orientation best agrees with the fixed image. Then feed the best pre-flipped image as your moving image to imregister, so that the registration code doesn't have to do as much iterative work.
Also, you could downsample your images and use imregtform() to estimate the rotation based on fewer samples.
  1 Comment
Ian Lee
Ian Lee on 25 Mar 2021
Interesting... would give it a try. Thanks Matt for your help!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!