freealise commited on
Commit
beaad43
1 Parent(s): 3986a18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -575,8 +575,8 @@ def draw_mask(l, t, v, d, evt: gr.EventData):
575
 
576
 
577
  def findNormals():
578
- global masks
579
- d_im = cv2.imread(masks[frame_selected]).astype(np.uint8)
580
  zy, zx = np.gradient(d_im)
581
  # You may also consider using Sobel to get a joint Gaussian smoothing and differentation
582
  # to reduce noise
 
575
 
576
 
577
  def findNormals():
578
+ global depths
579
+ d_im = cv2.cvtColor(cv2.imread(depths[frame_selected]).astype(np.uint8), cv2.COLOR_RGB2GRAY)
580
  zy, zx = np.gradient(d_im)
581
  # You may also consider using Sobel to get a joint Gaussian smoothing and differentation
582
  # to reduce noise