emilios commited on
Commit
c76f78d
·
verified ·
1 Parent(s): 8addde4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -22,7 +22,8 @@ def inference(img):
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 = cv2.threshold(blur,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
 
26
 
27
 
28
  #kernel = cv2.getStructuringElement(cv2.MORPH_RECT, kernelSize)
 
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)