freealise commited on
Commit
1c5cdce
·
verified ·
1 Parent(s): 5cc7c56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -127,8 +127,9 @@ def infer(url_in,interpolation,fps_output,resize_n,winsize,o_flow):
127
  hi = np.array([16,16,16])
128
  mask_f = cv2.inRange(diff_f, lo, hi)
129
  mask = cv2.inRange(diff, lo, hi)
130
- rgb[mask>0 and mask_f==0] = (255,255,255)
131
- next_rgb[mask>0 and mask_f==0] = (255,255,255)
 
132
  cv2.imwrite(frame, rgb)
133
  cv2.imwrite(next_frame, next_rgb)
134
 
 
127
  hi = np.array([16,16,16])
128
  mask_f = cv2.inRange(diff_f, lo, hi)
129
  mask = cv2.inRange(diff, lo, hi)
130
+ m = cv2.bitwise_and(mask_f, mask)
131
+ rgb[m>0] = (255,255,255)
132
+ next_rgb[m>0] = (255,255,255)
133
  cv2.imwrite(frame, rgb)
134
  cv2.imwrite(next_frame, next_rgb)
135