emilios commited on
Commit
320f7da
1 Parent(s): c6d3f67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,8 +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 ) # grayscale
22
- out = cv2.adaptiveThreshold(img,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,31,3)
23
 
24
 
25
  #kernel = cv2.getStructuringElement(cv2.MORPH_RECT, kernelSize)
 
18
  #mask = np.dstack([mask, mask, mask]) / 255
19
  #out = img * mask
20
 
21
+ gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY ) # grayscale
22
+ out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,31,3)
23
 
24
 
25
  #kernel = cv2.getStructuringElement(cv2.MORPH_RECT, kernelSize)