Hi Nicolas
On Wed, Sep 19, 2012 at 4:10 AM, Nicolas Barthe <lordnio101(a)gmail.com> wrote:
> I'm trying to use scikits-image to apply an homography to a color image.
You should see a factor 2 or so speedup in the latest version of
skimage. On my older machine, with the following code, I get roughly
0.3 seconds. Do you require a nearer to real-time response? If you
switch of bi-linear interpolation, you can shave off another 25% or
so.
Regards
Stéfan
from skimage import transform
import numpy as np
import datetime
image = np.random.random((1280, 720, 3))
(x_scale,y_scale)=(1.05,1.1)
(x_skew,y_skew)=(0.31e-3,0)
S = np.array([[x_scale, 0, 0],
[0, y_scale, 0],
[x_skew, y_skew, 1]])
p = transform.ProjectiveTransform(S)
t1 = datetime.datetime.now()
transform.warp(image, inverse_map=p.inverse)
t2 = datetime.datetime.now()
print t2 - t1