Spaces:
Sleeping
Sleeping
Update pilecaps_adr.py
Browse files- pilecaps_adr.py +2 -4
pilecaps_adr.py
CHANGED
|
@@ -226,10 +226,8 @@ def preprocessold(img,number):
|
|
| 226 |
er1=cv2.erode(er1,kernel, iterations=3) #thicken
|
| 227 |
# er1=cv2.dilate(er1,kernel, iterations=1) #thicken
|
| 228 |
# er1=cv2.dilate(er1,kernel, iterations=1) #thicken
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
else:
|
| 232 |
-
ret3, thresh = cv2.threshold(er1, 220, 255, cv2.THRESH_BINARY_INV) #`140 - 141
|
| 233 |
return thresh
|
| 234 |
|
| 235 |
|
|
|
|
| 226 |
er1=cv2.erode(er1,kernel, iterations=3) #thicken
|
| 227 |
# er1=cv2.dilate(er1,kernel, iterations=1) #thicken
|
| 228 |
# er1=cv2.dilate(er1,kernel, iterations=1) #thicken
|
| 229 |
+
ret3, thresh = cv2.threshold(er1, 254, 255, cv2.THRESH_BINARY_INV )
|
| 230 |
+
|
|
|
|
|
|
|
| 231 |
return thresh
|
| 232 |
|
| 233 |
|