Hussein El-Hadidy commited on
Commit ·
8a8b504
1
Parent(s): 7dd59f1
Updated Varible Amgiuity
Browse files
SkinBurns_Segmentation.py
CHANGED
|
@@ -59,8 +59,8 @@ def segment_skin_burns(image_path, output_path='segmented_image.png'):
|
|
| 59 |
(burn_cluster + 1) % 3: [0, 1, 0], # Green for healthy skin
|
| 60 |
(burn_cluster + 2) % 3: [0, 0, 1]} # Blue for background
|
| 61 |
|
| 62 |
-
for cluster,
|
| 63 |
-
segmentation_map[labels == cluster] =
|
| 64 |
|
| 65 |
# Save the segmented image
|
| 66 |
plt.imsave(output_path, segmentation_map)
|
|
|
|
| 59 |
(burn_cluster + 1) % 3: [0, 1, 0], # Green for healthy skin
|
| 60 |
(burn_cluster + 2) % 3: [0, 0, 1]} # Blue for background
|
| 61 |
|
| 62 |
+
for cluster, colour in colors.items():
|
| 63 |
+
segmentation_map[labels == cluster] = colour
|
| 64 |
|
| 65 |
# Save the segmented image
|
| 66 |
plt.imsave(output_path, segmentation_map)
|