Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 =
|
|
|
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)
|