Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -195,16 +195,16 @@ def pano_depth_to_world_points(depth, scale):
|
|
195 |
lat = np.linspace(0, np.pi, depth.shape[0])
|
196 |
lon, lat = np.meshgrid(lon, lat)
|
197 |
|
198 |
-
i =
|
199 |
-
j =
|
200 |
pts3d = [[0,0,0]]
|
201 |
uv = [[0,0]]
|
202 |
-
while i <
|
203 |
-
while j <
|
204 |
rnd_lon = 0 #(np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
205 |
rnd_lat = 0 #(np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
206 |
-
d_lon = (i + rnd_lon) * np.pi*2 / depth.shape[1]
|
207 |
-
d_lat = (j + rnd_lat) * np.pi / depth.shape[0]
|
208 |
lon = lon.flatten() + d_lon
|
209 |
lat = lat.flatten() + d_lat
|
210 |
|
@@ -218,8 +218,8 @@ def pano_depth_to_world_points(depth, scale):
|
|
218 |
|
219 |
pts3d = np.concatenate((pts3d, pts), axis=0)
|
220 |
uv = np.concatenate((uv, uvs), axis=0)
|
221 |
-
j = j+
|
222 |
-
i = i+
|
223 |
|
224 |
return [pts3d, uv]
|
225 |
|
|
|
195 |
lat = np.linspace(0, np.pi, depth.shape[0])
|
196 |
lon, lat = np.meshgrid(lon, lat)
|
197 |
|
198 |
+
i = 0
|
199 |
+
j = 0
|
200 |
pts3d = [[0,0,0]]
|
201 |
uv = [[0,0]]
|
202 |
+
while i < 2:
|
203 |
+
while j < 2:
|
204 |
rnd_lon = 0 #(np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
205 |
rnd_lat = 0 #(np.random.rand(depth.shape[0]*depth.shape[1]) - 0.5) / 8
|
206 |
+
d_lon = (i/2 + rnd_lon) * np.pi*2 / depth.shape[1]
|
207 |
+
d_lat = (j/2 + rnd_lat) * np.pi / depth.shape[0]
|
208 |
lon = lon.flatten() + d_lon
|
209 |
lat = lat.flatten() + d_lat
|
210 |
|
|
|
218 |
|
219 |
pts3d = np.concatenate((pts3d, pts), axis=0)
|
220 |
uv = np.concatenate((uv, uvs), axis=0)
|
221 |
+
j = j+1
|
222 |
+
i = i+1
|
223 |
|
224 |
return [pts3d, uv]
|
225 |
|