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