how to use fast_homography ?

Schönberger Johannes hannesschoenberger at gmail.com
Thu Sep 20 00:46:42 EDT 2012


Hi, what version of skimage do you use?

Johannes Schönberger

Am 19.09.2012 um 13:10 schrieb Nicolas Barthe <lordnio101 at gmail.com>:

> Hello,
> 
> I'm trying to use scikits-image to apply an homography to a color image.
> 
> Here's my sample script:
> 
> from skimage import data, transform, io
> from skimage.util import img_as_float
> import numpy, Image
> from scipy import ndimage
> 
> img = Image.open("test.jpg")
> data = numpy.asarray(img)
> 
> (x_scale,y_scale)=(1.05,1.1)
> (x_skew,y_skew)=(0.31e-3,0)
> 
> S = numpy.array([[x_scale, 0, 0],
>               [0, y_scale, 0],
>               [x_skew, y_skew, 1]])
> 
> t1 = datetime.datetime.now()
> data = transform.homography(data, S)
> img = Image.fromarray(data)
> img.show()
> 
> The function transform.homography takes about 0.5 second on my core i7 pc to apply the homography on a 1280x720 color image... Is there a way to improve the performance ?
> 
> I tried to use "fast_homography" instead of "homography" but I got a "ValueError: Buffer has wrong number of dimensions (expected 2, got 3)" error and I couldn't get it work...
> 
> Thanks for your help!
> 
> Nicolas.




More information about the scikit-image mailing list