sthoduka / imreg_fmt

Image registration based on the Fourier-Mellin transform
https://sthoduka.github.io/imreg_fmt/
GNU General Public License v3.0
98 stars 22 forks source link

Can it be accelerated? #14

Open zhenhuamo opened 6 months ago

zhenhuamo commented 6 months ago

Can the running speed be further optimized? Running efficiency is too slow

sthoduka commented 6 months ago

How long does it take, and what is the size of the image? Are you setting the build type to Release?

zhenhuamo commented 6 months ago

Release mode 658*641 image 500ms.

sthoduka commented 6 months ago

Thanks for the info. Unfortunately, I'm not sure how to speed it up beyond that.

sthoduka commented 6 months ago

one small improvement might be to use separate threads to perform FFT on the two images here. This would mean initializing two forward_plan_ objects.

sthoduka commented 6 months ago

you might see a slight improvement by adding the following flags here

target_compile_options(imreg_fmt PUBLIC -mavx2 -mfma)

zhenhuamo commented 6 months ago

Thank you very much for your help, but I found a problem. When I differentiate the matched image with the reference image, sometimes it does not match.

sthoduka commented 6 months ago

There's another issue (#13) where we were discussing a similar problem. The program does not find the correct transformation for certain image sizes. I'm not yet sure why. Have you tried with the Python tool if you get the correct results?