emilios commited on
Commit
6bdaa8c
·
verified ·
1 Parent(s): c76f78d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -20,10 +20,11 @@ def inference(img):
20
 
21
  gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY ) # grayscale
22
  #out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,133,9)
23
- out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,333,3)
 
24
  #out = cv2.dilate(out,(5,5))
25
  #out = blur = cv.GaussianBlur(img,(5,5),0)
26
- out = cv2.threshold(out,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
27
 
28
 
29
  #kernel = cv2.getStructuringElement(cv2.MORPH_RECT, kernelSize)
 
20
 
21
  gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY ) # grayscale
22
  #out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,133,9)
23
+ #out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,333,3)
24
+ out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,21,1)
25
  #out = cv2.dilate(out,(5,5))
26
  #out = blur = cv.GaussianBlur(img,(5,5),0)
27
+ #out = cv2.threshold(out,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
28
 
29
 
30
  #kernel = cv2.getStructuringElement(cv2.MORPH_RECT, kernelSize)