Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def preprocess(image):
|
|
14 |
# Convert RGB image to grayscale using OpenCV
|
15 |
gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
|
16 |
# blur = cv2.GaussianBlur(gray, (3,3),6)
|
17 |
-
blur = cv2.bilateralFilter(gray,
|
18 |
threshold_img = cv2.adaptiveThreshold(blur,255,1,1,11,2)
|
19 |
return threshold_img
|
20 |
|
|
|
14 |
# Convert RGB image to grayscale using OpenCV
|
15 |
gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
|
16 |
# blur = cv2.GaussianBlur(gray, (3,3),6)
|
17 |
+
blur = cv2.bilateralFilter(gray,6,3,3)
|
18 |
threshold_img = cv2.adaptiveThreshold(blur,255,1,1,11,2)
|
19 |
return threshold_img
|
20 |
|