Spaces:
Running
Running
Update app.py
Browse files
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(
|
195 |
-
lat = np.linspace(
|
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[
|
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)
|