Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ if uploaded_image:
|
|
54 |
intensity_map = cv2.cvtColor(colorized_img, cv2.COLOR_BGR2GRAY)
|
55 |
|
56 |
# Threshold the intensity map to create a binary mask
|
57 |
-
_, binary_map = cv2.threshold(intensity_map,
|
58 |
|
59 |
# Find contours in the binary map
|
60 |
contours, _ = cv2.findContours(binary_map, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
|
|
|
54 |
intensity_map = cv2.cvtColor(colorized_img, cv2.COLOR_BGR2GRAY)
|
55 |
|
56 |
# Threshold the intensity map to create a binary mask
|
57 |
+
_, binary_map = cv2.threshold(intensity_map, 255, 0, cv2.THRESH_BINARY)
|
58 |
|
59 |
# Find contours in the binary map
|
60 |
contours, _ = cv2.findContours(binary_map, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
|