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

transform_img clips image, doesn't have option to specify output size #32

Open
bsugerman opened this issue Feb 8, 2018 · 2 comments
Open

Comments

@bsugerman
Copy link

I noticed that transform_img clips the output image to the same size as the input image, and it would be very useful if one could specify an option for an output-image size or a suitable flag so the entire input image was shown after applying the transformation. For example, I need to find the shift and rotations to geometrically register images, but I am then scaling them up (zooming in) by some factor and combining them together to produce an enhanced, larger image (this is the initial step for super-resolution).

skimage allows this with e.g. warp(). Could you consider adding such a feature?

@SebastianHD
Copy link

SebastianHD commented Sep 9, 2019

I'm also surprised that this does not exists. The transform_img function does return "The transformed img, may have another i.e. (bigger) shape than the source" which indicates that this is a possibility, but there seems to be no flag to control it. Right now I'm resorting to first creating a padded image to give to tranform_img function.

@matejak
Copy link
Owner

matejak commented Sep 10, 2019

This is actually the right approach. The constant image dimensions are important wrt the DFT, so in order to prevent unwanted clipping, one has to have a buffer made of padding. I think that making images twice as large is safe enough. A big difference in scale is not something that DFT will cope with easily.

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

3 participants