Spaces:
Starting
Starting
Update app.py
Browse files
app.py
CHANGED
@@ -222,14 +222,8 @@ def pano_depth_to_world_points(depth):
|
|
222 |
latitude : -pi/2 to pi/2
|
223 |
"""
|
224 |
|
225 |
-
|
226 |
-
|
227 |
-
avgs = cv2.filter2D(depth,-1,kernel)
|
228 |
-
while i>=2:
|
229 |
-
if avgs[i-1][0] < avgs[i][0] and avgs[i-1][0] < avgs[i-2][0]:
|
230 |
-
print(i-1)
|
231 |
-
break
|
232 |
-
i=i-1
|
233 |
|
234 |
# Convert depth to radius
|
235 |
radius = (255 - depth.flatten())
|
|
|
222 |
latitude : -pi/2 to pi/2
|
223 |
"""
|
224 |
|
225 |
+
mask = cv2.inRange(depth, 225, 255)
|
226 |
+
depth[mask>0] = 224
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
# Convert depth to radius
|
229 |
radius = (255 - depth.flatten())
|