fffiloni commited on
Commit
2d673d7
·
1 Parent(s): d222798

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -77,8 +77,10 @@ def warpImage(im, vx, vy, cast_uint8=True):
77
  Y = np.linspace(1, height1, height1)
78
  xx, yy = np.meshgrid(x, y)
79
  XX, YY = np.meshgrid(X, Y)
80
- XX = XX + vx
81
- YY = YY + vy
 
 
82
  mask = (XX < 1) | (XX > width2) | (YY < 1) | (YY > height2)
83
  XX = np.clip(XX, 1, width2)
84
  YY = np.clip(XX, 1, height2)
 
77
  Y = np.linspace(1, height1, height1)
78
  xx, yy = np.meshgrid(x, y)
79
  XX, YY = np.meshgrid(X, Y)
80
+ #XX = XX + vx
81
+ XX = np.concatenate([XX, vx])
82
+ #YY = YY + vy
83
+ YY = np.concatenate([YY, vy])
84
  mask = (XX < 1) | (XX > width2) | (YY < 1) | (YY > height2)
85
  XX = np.clip(XX, 1, width2)
86
  YY = np.clip(XX, 1, height2)