emilios commited on
Commit
b5073e3
·
verified ·
1 Parent(s): 0dbf7df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -18,7 +18,8 @@ def inference(img):
18
  #mask = np.dstack([mask, mask, mask]) / 255
19
  #out = img * mask
20
 
21
- out = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY )
 
22
  #kernel = cv2.getStructuringElement(cv2.MORPH_RECT, kernelSize)
23
  #opening = cv2.morphologyEx(gray, cv2.MORPH_OPEN, kernel)
24
 
 
18
  #mask = np.dstack([mask, mask, mask]) / 255
19
  #out = img * mask
20
 
21
+ #out = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY ) # grayscale
22
+ out = cv2.threshold(img, 120, 255, cv2.THRESH_TRUNC)
23
  #kernel = cv2.getStructuringElement(cv2.MORPH_RECT, kernelSize)
24
  #opening = cv2.morphologyEx(gray, cv2.MORPH_OPEN, kernel)
25