freealise commited on
Commit
aa63800
1 Parent(s): f6ef0c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -197,12 +197,12 @@ def pano_depth_to_world_points(depth, scale):
197
 
198
  pts3d = [[0,0,0]]
199
  uv = [[0,0]]
200
- for i in range(0,2):
201
- for j in range(0,2):
202
- rnd_lon = 0 #(np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
203
- rnd_lat = 0 #(np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
204
- d_lon = (i/2 + rnd_lon) * np.pi*2 / depth.shape[1]
205
- d_lat = (j/2 + rnd_lat) * np.pi / depth.shape[0]
206
  lon = lon.flatten() + d_lon
207
  lat = lat.flatten() + d_lat
208
 
@@ -217,8 +217,8 @@ def pano_depth_to_world_points(depth, scale):
217
  pts3d = np.concatenate((pts3d, pts), axis=0)
218
  uv = np.concatenate((uv, uvs), axis=0)
219
  print(f'i: {i}, j: {j}')
220
- j = j+1
221
- i = i+1
222
 
223
  return [pts3d, uv]
224
 
 
197
 
198
  pts3d = [[0,0,0]]
199
  uv = [[0,0]]
200
+ for i in range(-0.25, 0.75):
201
+ for j in range(-0.25, 0.75):
202
+ #rnd_lon = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
203
+ #rnd_lat = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
204
+ d_lon = i * np.pi*2 / depth.shape[1]
205
+ d_lat = j * np.pi / depth.shape[0]
206
  lon = lon.flatten() + d_lon
207
  lat = lat.flatten() + d_lat
208
 
 
217
  pts3d = np.concatenate((pts3d, pts), axis=0)
218
  uv = np.concatenate((uv, uvs), axis=0)
219
  print(f'i: {i}, j: {j}')
220
+ j = j+0.5
221
+ i = i+0.5
222
 
223
  return [pts3d, uv]
224