Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -205,13 +205,13 @@ def pano_depth_to_world_points(depth, scale):
|
|
205 |
for j in range(0, 2):
|
206 |
#rnd_lon = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
207 |
#rnd_lat = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
208 |
-
d_lon = i/
|
209 |
-
d_lat = j/
|
210 |
|
211 |
# Convert to cartesian coordinates
|
212 |
-
x = radius * np.cos(
|
213 |
-
y = radius * np.cos(
|
214 |
-
z = radius * np.sin(
|
215 |
|
216 |
pts = np.stack([x, y, z], axis=1)
|
217 |
uvs = np.stack([lon, lat], axis=1)
|
|
|
205 |
for j in range(0, 2):
|
206 |
#rnd_lon = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
207 |
#rnd_lat = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
208 |
+
d_lon = lon + i/2 * np.pi*2 / depth.shape[1]
|
209 |
+
d_lat = lat + j/2 * np.pi / depth.shape[0]
|
210 |
|
211 |
# Convert to cartesian coordinates
|
212 |
+
x = radius * np.cos(d_lon) * np.sin(d_lat)
|
213 |
+
y = radius * np.cos(d_lat)
|
214 |
+
z = radius * np.sin(d_lon) * np.sin(d_lat)
|
215 |
|
216 |
pts = np.stack([x, y, z], axis=1)
|
217 |
uvs = np.stack([lon, lat], axis=1)
|