shireenchand commited on
Commit
5982270
·
1 Parent(s): 8e31345

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def depthMap(imgL,imgR):
15
  stereoMatcher.setSpeckleWindowSize(45)
16
  disparity = stereoMatcher.compute(imgL,imgR)
17
  depth_map = np.zeros_like(disparity, dtype=np.float32)
18
- depth_map[disparity_map > 0] = 0.1 * 500 / disparity[disparity > 0]
19
  gray = plt.get_cmap('gray')
20
  disparity = disparity - np.min(disparity)
21
  disparity = disparity / np.max(disparity)
 
15
  stereoMatcher.setSpeckleWindowSize(45)
16
  disparity = stereoMatcher.compute(imgL,imgR)
17
  depth_map = np.zeros_like(disparity, dtype=np.float32)
18
+ depth_map[disparity > 0] = 0.1 * 500 / disparity[disparity > 0]
19
  gray = plt.get_cmap('gray')
20
  disparity = disparity - np.min(disparity)
21
  disparity = disparity / np.max(disparity)