Spaces:
No application file
No application file
Update pyp.py
Browse files
pyp.py
CHANGED
|
@@ -29,7 +29,7 @@ while True:
|
|
| 29 |
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
|
| 30 |
|
| 31 |
# Threshold to detect black line
|
| 32 |
-
_, thresh = cv2.threshold(gray, 100,
|
| 33 |
|
| 34 |
# Take bottom part of the frame (region of interest)
|
| 35 |
roi = thresh[int(thresh.shape[0]*0.7):, :]
|
|
|
|
| 29 |
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
|
| 30 |
|
| 31 |
# Threshold to detect black line
|
| 32 |
+
_, thresh = cv2.threshold(gray, 100, 265, cv2.THRESH_BINARY_INV)
|
| 33 |
|
| 34 |
# Take bottom part of the frame (region of interest)
|
| 35 |
roi = thresh[int(thresh.shape[0]*0.7):, :]
|