Spaces:
Starting
Starting
Update app.py
Browse files
app.py
CHANGED
@@ -235,7 +235,7 @@ def pano_depth_to_world_points(depth):
|
|
235 |
lon = lon.flatten()
|
236 |
lat = lat.flatten()
|
237 |
|
238 |
-
pts3d = [[
|
239 |
uv = [[1,1]]
|
240 |
for i in range(0, 1): #(0,2)
|
241 |
for j in range(0, 1): #(0,2)
|
@@ -310,17 +310,19 @@ def get_mesh(image, depth, blur_data, loadall):
|
|
310 |
#mesh.append(trimesh.PointCloud(verts, colors=clrs))
|
311 |
#mesh[len(mesh)-1].merge_vertices(digits=0)
|
312 |
ln = []
|
313 |
-
|
|
|
314 |
for i in range(0, gdepth.shape[1]):
|
315 |
for j in range(0, gdepth.shape[0]):
|
316 |
if gdepth[j][i] < 255:
|
317 |
ln.append(k)
|
|
|
318 |
k=k+1
|
319 |
j=j+1
|
320 |
i=i+1
|
321 |
|
322 |
el = trimesh.path.entities.Line(ln)
|
323 |
-
mesh.append(trimesh.path.path.Path3D(entities=[el], vertices=verts, colors=[
|
324 |
mesh_n.append(str(fnum))
|
325 |
|
326 |
#theta = locations[fnum]["heading"] / 180 * np.pi
|
|
|
235 |
lon = lon.flatten()
|
236 |
lat = lat.flatten()
|
237 |
|
238 |
+
pts3d = [[0,0,0]]
|
239 |
uv = [[1,1]]
|
240 |
for i in range(0, 1): #(0,2)
|
241 |
for j in range(0, 1): #(0,2)
|
|
|
310 |
#mesh.append(trimesh.PointCloud(verts, colors=clrs))
|
311 |
#mesh[len(mesh)-1].merge_vertices(digits=0)
|
312 |
ln = []
|
313 |
+
cr = []
|
314 |
+
k = 1
|
315 |
for i in range(0, gdepth.shape[1]):
|
316 |
for j in range(0, gdepth.shape[0]):
|
317 |
if gdepth[j][i] < 255:
|
318 |
ln.append(k)
|
319 |
+
cr.append(clrs[k])
|
320 |
k=k+1
|
321 |
j=j+1
|
322 |
i=i+1
|
323 |
|
324 |
el = trimesh.path.entities.Line(ln)
|
325 |
+
mesh.append(trimesh.path.path.Path3D(entities=[el], vertices=verts, colors=[cr]))
|
326 |
mesh_n.append(str(fnum))
|
327 |
|
328 |
#theta = locations[fnum]["heading"] / 180 * np.pi
|