Update app.py
Browse files
app.py
CHANGED
@@ -55,6 +55,8 @@ if uploaded_image:
|
|
55 |
# Create an empty label map for ranking based on area
|
56 |
label_map = np.zeros_like(colorized_img)
|
57 |
|
|
|
|
|
58 |
# Overlay the labels on the blended image
|
59 |
font = cv2.FONT_HERSHEY_SIMPLEX
|
60 |
contours, _ = cv2.findContours(binary_map, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
|
|
|
55 |
# Create an empty label map for ranking based on area
|
56 |
label_map = np.zeros_like(colorized_img)
|
57 |
|
58 |
+
_, binary_map = cv2.threshold(intensity_map, 255, 0, cv2.THRESH_BINARY)
|
59 |
+
|
60 |
# Overlay the labels on the blended image
|
61 |
font = cv2.FONT_HERSHEY_SIMPLEX
|
62 |
contours, _ = cv2.findContours(binary_map, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
|