freealise commited on
Commit
61ea50f
1 Parent(s): b8fb53d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -237,8 +237,8 @@ def pano_depth_to_world_points(depth, location):
237
  for j in range(0, 1): #(0,2)
238
  #rnd_lon = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
239
  #rnd_lat = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
240
- d_lon = lon + i/2 * np.pi*2 / depth.shape[1] + location["heading"] / 180 * np.pi
241
- d_lat = lat + j/2 * np.pi / depth.shape[0] + location["pitch"] / 180 * np.pi
242
 
243
  # Convert to cartesian coordinates
244
  x = radius * np.cos(d_lon) * np.sin(d_lat) + location["lat"]
@@ -296,8 +296,7 @@ def get_mesh(image, depth, blur_data, loadall):
296
 
297
  #mesh = trimesh.Trimesh(vertices=verts, faces=triangles, vertex_colors=colors)
298
  mesh.append(trimesh.PointCloud(verts, colors=clrs))
299
- #trimesh.constants.tol.merge = 0.0;
300
- #mesh[len(mesh)-1].merge_vertices()
301
  #material = trimesh.visual.texture.SimpleMaterial(image=image)
302
  #texture = trimesh.visual.TextureVisuals(uv=uv, image=image, material=material)
303
  #mesh.visual = texture
 
237
  for j in range(0, 1): #(0,2)
238
  #rnd_lon = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
239
  #rnd_lat = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
240
+ d_lon = lon + i/2 * np.pi*2 / depth.shape[1] #+ location["heading"] / 180 * np.pi
241
+ d_lat = lat + j/2 * np.pi / depth.shape[0] #+ location["pitch"] / 180 * np.pi
242
 
243
  # Convert to cartesian coordinates
244
  x = radius * np.cos(d_lon) * np.sin(d_lat) + location["lat"]
 
296
 
297
  #mesh = trimesh.Trimesh(vertices=verts, faces=triangles, vertex_colors=colors)
298
  mesh.append(trimesh.PointCloud(verts, colors=clrs))
299
+ mesh[len(mesh)-1].merge_vertices()
 
300
  #material = trimesh.visual.texture.SimpleMaterial(image=image)
301
  #texture = trimesh.visual.TextureVisuals(uv=uv, image=image, material=material)
302
  #mesh.visual = texture