freealise commited on
Commit
cc5b526
1 Parent(s): 3714f10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -222,8 +222,8 @@ def pano_depth_to_world_points(depth):
222
  latitude : -pi/2 to pi/2
223
  """
224
 
225
- mask = cv2.inRange(depth[int(depth.shape[0]/8*7):depth.shape[0]-1, 0:depth.shape[1]], 192, 255)
226
- depth[int(depth.shape[0]/8*7):depth.shape[0]-1, 0:depth.shape[1]][mask>0] = 192
227
  depth[depth.shape[0]-1:depth.shape[0], 0:depth.shape[1]] = 255
228
 
229
  # Convert depth to radius
@@ -304,13 +304,13 @@ def get_mesh(image, depth, blur_data, loadall):
304
  #texture = trimesh.visual.TextureVisuals(uv=uv, image=image, material=material)
305
  #mesh.visual = texture
306
 
307
- scene = trimesh.Scene(mesh)
308
  print('mesh - ok')
309
 
310
  # Save as glb
311
  glb_file = tempfile.NamedTemporaryFile(suffix='.glb', delete=False)
312
  glb_path = glb_file.name
313
- scene.export(glb_path)
314
  print('file - ok')
315
  return glb_path
316
 
 
222
  latitude : -pi/2 to pi/2
223
  """
224
 
225
+ mask = cv2.inRange(depth[int(depth.shape[0]/8*6.5):depth.shape[0]-1, 0:depth.shape[1]], 160, 255)
226
+ depth[int(depth.shape[0]/8*6.5):depth.shape[0]-1, 0:depth.shape[1]][mask>0] = 160
227
  depth[depth.shape[0]-1:depth.shape[0], 0:depth.shape[1]] = 255
228
 
229
  # Convert depth to radius
 
304
  #texture = trimesh.visual.TextureVisuals(uv=uv, image=image, material=material)
305
  #mesh.visual = texture
306
 
307
+ #scene = trimesh.Scene(mesh)
308
  print('mesh - ok')
309
 
310
  # Save as glb
311
  glb_file = tempfile.NamedTemporaryFile(suffix='.glb', delete=False)
312
  glb_path = glb_file.name
313
+ mesh.export(glb_path)
314
  print('file - ok')
315
  return glb_path
316