-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discrete Fourier transform registration (subpixel translation correction) #231
base: master
Are you sure you want to change the base?
Conversation
Adding DFT registration functions
…itive valued images.
Potentially quite cool. But I deliberately haven't read through the code yet, because of license concerns: the Matlab code you linked to doesn't seem to come with a license. Unless you can get the authors to apply an MIT or BSD license to their work, I don't think I can accept this in Images. |
On hold. I contacted the authors, and adding a license -- after some code modifications -- is part of their plans in a not too far future. |
Has the license issue been solved yet? |
No, the matlab code is still without license... The alternative would be to recode from the description in the paper (not translating their code). As a first step we can add simple phase correlation (without the subpixel part). I'll try to do it when I get a chance. |
I don't think you can do it. By looking at the Matlab code, you're effectively "tainted". Someone else will have to pick it up. |
I sent an email to the senior author of the paper and asked for the clarification of the license for the Matlab code. He told me that he doesn't know anything about Matlab licensing, but pointed me to a Python version, which has a modified BSD license. I guess this can be merged to master now? |
Is the author of the python code the same as the author of the matlab code? From a legal perspective, it doesn't really matter if there is other code out there based on the same paper; what matters is the license of whatever code was used as the foundation for this work. Someone could start from scratch and implement something based on the python code, if the matlab license situation does not resolve. |
Just looked at the python code. It stated that it was ported from the Matlab code. I don't know who the author of the python code is. But the senior author of the original paper believes the license for the python code is fine. |
upon my urging, the original matlab code is now BSD licensed by the author of the manuscript describing the algorithm: so i think we can go ahead and merge this. |
As my understanding is that Images.jl is really more for primitives I reorganized the code and put it together as a small package here : https://github.com/romainFr/subpixelRegistration.jl The changes -- compared to the original version -- allow to run the registration on arrays of arbitrary size (for example if one wants to register image volumes over time). As far as my testing goes, it works with Images or Arrays. |
Image registration is a big topic, and I confess I'm sort of inclined to make it a separate package. I see that's what @romainFr has done. Seem OK to others? Perhaps we could host it on JuliaImages, just so it's easier to find? |
+1 for making |
I doubt we are ever going to merge this, can we close this PR? |
Something I needed at some point that might be useful to more people. It's taken from Guizar & al (Manuel Guizar-Sicairos, Samuel T. Thurman, and James R. Fienup, "Efficient subpixel image registration algorithms," Opt. Lett. 33, 156-158 (2008)) and (very) inspired by the matlab code provided by the authors.
Function
subpixelshift(img,rowShift,colShift)
translates an image by the given amount.dftReg(imgser,[ref,ufac,align])
performs the registration ofimgser
to a referenceref
(by default the first frame ofimgser
). Either returns an array of registration parameters (by default), or the registered image (ifalign==true
).usfac
is the upsampling factor (10 by default). FinallyalignFromDft
performs the registration given an array of registration parameters.This doesn't work with color images for now.
As a side-note, this would also work for rotations by transforming the image to polar coordinates beforehand.