Update app.py
Browse files
app.py
CHANGED
@@ -68,6 +68,7 @@ def warpImage(im, vx, vy, cast_uint8=True):
|
|
68 |
function to warp images with different dimensions
|
69 |
'''
|
70 |
print(f"WARP IM INPUT SHAPE: {im.shape}")
|
|
|
71 |
height2, width2, nChannels = im.shape
|
72 |
print(f"WARP vx INPUT SHAPE: {vx.shape}")
|
73 |
height1, width1 = vx.shape
|
@@ -88,7 +89,7 @@ def warpImage(im, vx, vy, cast_uint8=True):
|
|
88 |
|
89 |
warpI2 = np.zeros((height1, width1, nChannels))
|
90 |
for i in range(nChannels):
|
91 |
-
f = interp2d(x, y, im[:, :, i], '
|
92 |
foo = f(X, Y)
|
93 |
foo[mask] = 0.6
|
94 |
warpI2[:, :, i] = foo
|
|
|
68 |
function to warp images with different dimensions
|
69 |
'''
|
70 |
print(f"WARP IM INPUT SHAPE: {im.shape}")
|
71 |
+
|
72 |
height2, width2, nChannels = im.shape
|
73 |
print(f"WARP vx INPUT SHAPE: {vx.shape}")
|
74 |
height1, width1 = vx.shape
|
|
|
89 |
|
90 |
warpI2 = np.zeros((height1, width1, nChannels))
|
91 |
for i in range(nChannels):
|
92 |
+
f = interp2d(x, y, im[:, :, i], 'linear')
|
93 |
foo = f(X, Y)
|
94 |
foo[mask] = 0.6
|
95 |
warpI2[:, :, i] = foo
|