Last time I've tried on skimage I think that I didn't do really understand
how it works. As you seem pretty confident, I take a little time to study
it. As I often switch between OpenCV and skimage I've performed the
coordinate interpolation using both methods. I've also used the
scipy.interpolation.griddata which is the only one that I figure out to
As usual OpenCV is 6x faster but skimage perform good even with 4096x4096
I just create a disk and transform it in ellipse using warping function.
For Ndimage, you can find an example of geometric_transform, but it doesn't
work for me, map_coordinate is not suited for a full image mapping.
I'm pretty sure both ndimage and scikit-image can handle larger images than
> that. Did you see these fail in practice?
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send an email to firstname.lastname@example.org.
To view this discussion on the web, visit
For more options, visit https://groups.google.com/d/optout.
import numpy as np
import scipy.interpolate as ip
import scipy.ndimage as nd
from skimage.transform import warp
Y,X = np.meshgrid(range(0,Size_x), range(0,Size_y))
# Creation of a dummy image
# Displacement and transformation creation
Xi=X+U # compression
Yi=Y+V # elongation
# griddata from interpolate
## Need delaunay triangulation that consume a lot of memory don't go over 1024x1024 ...
Imgi_griddata = ip.griddata(points,value , (Xi,Yi), method='linear')
print("Griddata time : %f"%(time.time()-t0))
print("Skimage warp time : %f"%(time.time()-t0))
print("OpenCV remap time : %f"%(time.time()-t0))
## ndimage interpolation tools
# Does not work on my PC
#def shift_func(output_coordinates, s0, s1):
#return (output_coordinates + s0, output_coordinates + s1)
#imgi_nd=nd.geometric_transform(Img,shift_func,extra_arguments = (U, V))
#print("Ndimage time : %d"%(time.time()-t0))