Skip to content
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

mode is ignored in transform_img #26

Open
maweigert opened this issue Jan 20, 2017 · 3 comments
Open

mode is ignored in transform_img #26

maweigert opened this issue Jan 20, 2017 · 3 comments

Comments

@maweigert
Copy link

Currently, the mode parameter is ignored in transform_img, i.e. the following

from scipy.misc import ascent
import scipy.ndimage.interpolation as ndii

im = ascent()
out1 = imreg_dft.transform_img(im, tvec=[100,100], mode="reflect")
out2 = ndii.shift(im, [100,100], mode ="reflect")

is not behaving as expected from the docs.

Possible solutions
a) to update the docstring reflecting that
b) to rewrite the utils.embed_to function to include padding with the correct mode (which is what I do right now, see that gist)

cheers and thanks for the package!

@matejak
Copy link
Owner

matejak commented Jan 23, 2017

Thank you for your point, I will review it and incorporate into the code later this week.
If you would like to create a pull request and therefore become a part of the "official" imreg_dft contributors, I will be honored.

@maweigert
Copy link
Author

Sure, I can do that.
btw, is there any rational for the magic padding number of 1.2 here?

@matejak
Copy link
Owner

matejak commented Jan 23, 2017

Great!
Regarding the magical coeff of 1.2, I vaguely recall that I have considered a good idea to have some kind of a buffer before transformations. There may, of course, be a better way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants