freealise commited on
Commit
7210b32
1 Parent(s): 29006f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -191,8 +191,8 @@ def pano_depth_to_world_points(depth):
191
  # Convert depth to radius
192
  radius = 255 - depth.flatten()
193
 
194
- lon = np.linspace(-np.pi, np.pi, depth.shape[0])
195
- lat = np.linspace(-np.pi/2, np.pi/2, depth.shape[1])
196
 
197
  lon, lat = np.meshgrid(lon, lat)
198
  lon = lon.flatten()
@@ -221,7 +221,7 @@ def get_mesh(image, depth):
221
  # colors are the RGB values of the image
222
 
223
  verts = pts3d.reshape(-1, 3)
224
- triangles = create_triangles(image.shape[1], image.shape[0])
225
  print('triangles - ok')
226
  colors = image.reshape(-1, 3)
227
  mesh = trimesh.Trimesh(vertices=verts, faces=triangles, vertex_colors=colors)
 
191
  # Convert depth to radius
192
  radius = 255 - depth.flatten()
193
 
194
+ lon = np.linspace(0, np.pi*2, depth.shape[0])
195
+ lat = np.linspace(0, np.pi, depth.shape[1])
196
 
197
  lon, lat = np.meshgrid(lon, lat)
198
  lon = lon.flatten()
 
221
  # colors are the RGB values of the image
222
 
223
  verts = pts3d.reshape(-1, 3)
224
+ triangles = create_triangles(image.shape[0], image.shape[1])
225
  print('triangles - ok')
226
  colors = image.reshape(-1, 3)
227
  mesh = trimesh.Trimesh(vertices=verts, faces=triangles, vertex_colors=colors)