We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbcc281 commit 50f56dbCopy full SHA for 50f56db
episodes/08-connected-components.md
@@ -777,7 +777,9 @@ the area by indexing the `object_areas` with the label values in `labeled_image`
777
778
```python
779
object_areas = np.array([objf["area"] for objf in ski.measure.regionprops(labeled_image)])
780
-object_areas = np.insert(0,1,object_areas)
+# prepend zero to object_areas array for background
781
+object_areas = np.insert(0, obj=1, values=object_areas)
782
+# create image where the pixels in each object are equal to that objects area
783
colored_area_image = object_areas[labeled_image]
784
785
fig, ax = plt.subplots()
0 commit comments