freealise commited on
Commit
8aeafad
1 Parent(s): 9fbdfd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -222,14 +222,8 @@ def pano_depth_to_world_points(depth):
222
  latitude : -pi/2 to pi/2
223
  """
224
 
225
- i = depth.shape[0]-5
226
- kernel = np.ones((depth.shape[1],1),np.float32)/depth.shape[1]
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())