Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -197,12 +197,12 @@ def pano_depth_to_world_points(depth, scale):
|
|
197 |
|
198 |
pts3d = [[0,0,0]]
|
199 |
uv = [[0,0]]
|
200 |
-
for i in range(0,
|
201 |
-
for j in range(0,
|
202 |
-
rnd_lon =
|
203 |
-
rnd_lat =
|
204 |
-
d_lon =
|
205 |
-
d_lat =
|
206 |
lon = lon.flatten() + d_lon
|
207 |
lat = lat.flatten() + d_lat
|
208 |
|
@@ -217,8 +217,8 @@ def pano_depth_to_world_points(depth, scale):
|
|
217 |
pts3d = np.concatenate((pts3d, pts), axis=0)
|
218 |
uv = np.concatenate((uv, uvs), axis=0)
|
219 |
print(f'i: {i}, j: {j}')
|
220 |
-
j = j+
|
221 |
-
i = i+
|
222 |
|
223 |
return [pts3d, uv]
|
224 |
|
|
|
197 |
|
198 |
pts3d = [[0,0,0]]
|
199 |
uv = [[0,0]]
|
200 |
+
for i in range(-0.25, 0.75):
|
201 |
+
for j in range(-0.25, 0.75):
|
202 |
+
#rnd_lon = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
203 |
+
#rnd_lat = (np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
204 |
+
d_lon = i * np.pi*2 / depth.shape[1]
|
205 |
+
d_lat = j * np.pi / depth.shape[0]
|
206 |
lon = lon.flatten() + d_lon
|
207 |
lat = lat.flatten() + d_lat
|
208 |
|
|
|
217 |
pts3d = np.concatenate((pts3d, pts), axis=0)
|
218 |
uv = np.concatenate((uv, uvs), axis=0)
|
219 |
print(f'i: {i}, j: {j}')
|
220 |
+
j = j+0.5
|
221 |
+
i = i+0.5
|
222 |
|
223 |
return [pts3d, uv]
|
224 |
|