fffiloni commited on
Commit
41e00e5
1 Parent(s): 1b82f9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -78,16 +78,16 @@ def warpImage(im, vx, vy, cast_uint8=True):
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)
87
 
88
  warpI2 = np.zeros((height1, width1, nChannels))
89
  for i in range(nChannels):
90
- f = interp2d(x, y, im[:, :, i], 'linear')
91
  foo = f(X, Y)
92
  foo[mask] = 0.6
93
  warpI2[:, :, i] = foo
 
78
  xx, yy = np.meshgrid(x, y)
79
  XX, YY = np.meshgrid(X, Y)
80
  #XX = XX + vx
81
+ XX = np.concatenate([XX, vx], axis = 0)
82
  #YY = YY + vy
83
+ YY = np.concatenate([YY, vy], axis = 0)
84
  mask = (XX < 1) | (XX > width2) | (YY < 1) | (YY > height2)
85
  XX = np.clip(XX, 1, width2)
86
  YY = np.clip(XX, 1, height2)
87
 
88
  warpI2 = np.zeros((height1, width1, nChannels))
89
  for i in range(nChannels):
90
+ f = interp2d(x, y, im[:, :, i], 'cubic')
91
  foo = f(X, Y)
92
  foo[mask] = 0.6
93
  warpI2[:, :, i] = foo