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 |
_, binary_map = cv2.threshold(intensity_map, 255, 0, cv2.THRESH_BINARY)
|
59 |
|
60 |
# Overlay the labels on the blended image
|
|
|
55 |
# Create an empty label map for ranking based on area
|
56 |
label_map = np.zeros_like(colorized_img)
|
57 |
|
58 |
+
intensity_map = cv2.cvtColor(colorized_img, cv2.COLOR_BGR2GRAY)
|
59 |
+
|
60 |
_, binary_map = cv2.threshold(intensity_map, 255, 0, cv2.THRESH_BINARY)
|
61 |
|
62 |
# Overlay the labels on the blended image
|