How to get full size image which is transformed by warp function

Johannes Schönberger jschoenberger at demuc.de
Mon Jun 17 15:44:56 EDT 2013


Hi,

Have a look at the code of the `skimage.transform.rotate` function in `skimage/transform/_warps.py`. The code in there is applicable to arbitrary transformations.

Johannes Schönberger

Am 17.06.2013 um 20:01 schrieb Yongda Chen <yongda.chen at gmail.com>:

> I am trying to do geometric transformation with warp in scikit-image, but I cannot get the full size transformed image which has different image size to original image. Even after setting up output_shape parameter, it still lost part of image which is transformed to negative coordinates.
> My question is how to get full size transformed image when doing affine transform, projective transform with warp function?
> Following is the example code I am working on
> 
> import matplotlib.pyplot as plt
> import skimage.transform import *
> import skimage import data
> import numpy as np
> 
> checkboard = data.checkboard()
> tform = AffineTransform(rotation = np.pi/6)
> checkborad_transformed = warp(checkboard, tform, output_shape=(400,400))
> fig = plt.figure()
> plt.imshow(checkboard_transformed, cmap = plt.cm.gray)
> 
> 
> 
> Thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups "scikit-image" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  




More information about the scikit-image mailing list