emilios commited on
Commit
0aa9785
1 Parent(s): b5073e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -19,7 +19,8 @@ def inference(img):
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
 
 
19
  #out = img * mask
20
 
21
  #out = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY ) # grayscale
22
+ out = cv2.adaptiveThreshold(img,255,cv.ADAPTIVE_THRESH_GAUSSIAN_C, cv.THRESH_BINARY,11,2)
23
+
24
  #kernel = cv2.getStructuringElement(cv2.MORPH_RECT, kernelSize)
25
  #opening = cv2.morphologyEx(gray, cv2.MORPH_OPEN, kernel)
26