freealise commited on
Commit
3b5d5e3
1 Parent(s): 010a3dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -205,13 +205,13 @@ def pano_depth_to_world_points(depth, scale):
205
  for j in range(0, 2):
206
  #rnd_lon = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
207
  #rnd_lat = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
208
- d_lon = i/4 * np.pi*2 / depth.shape[1]
209
- d_lat = j/4 * np.pi / depth.shape[0]
210
 
211
  # Convert to cartesian coordinates
212
- x = radius * np.cos(lon + d_lon) * np.sin(lat + d_lat)
213
- y = radius * np.cos(lat + d_lat)
214
- z = radius * np.sin(lon + d_lon) * np.sin(lat + d_lat)
215
 
216
  pts = np.stack([x, y, z], axis=1)
217
  uvs = np.stack([lon, lat], axis=1)
 
205
  for j in range(0, 2):
206
  #rnd_lon = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
207
  #rnd_lat = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
208
+ d_lon = lon + i/2 * np.pi*2 / depth.shape[1]
209
+ d_lat = lat + j/2 * np.pi / depth.shape[0]
210
 
211
  # Convert to cartesian coordinates
212
+ x = radius * np.cos(d_lon) * np.sin(d_lat)
213
+ y = radius * np.cos(d_lat)
214
+ z = radius * np.sin(d_lon) * np.sin(d_lat)
215
 
216
  pts = np.stack([x, y, z], axis=1)
217
  uvs = np.stack([lon, lat], axis=1)