@@ -325,10 +325,10 @@ plt.axis("off")
325
325
326
326
If you are using an old version of Matplotlib you might get a warning
327
327
` UserWarning: Low image data range; displaying image with stretched contrast. `
328
- or just see a visually blank image
328
+ or just see a visually empty image.
329
329
330
330
What went wrong?
331
- When you hover over the blank image,
331
+ When you hover over the image,
332
332
the pixel values are shown as numbers in the lower corner of the viewer.
333
333
You can see that some pixels have values different from ` 0 ` ,
334
334
so they are not actually all the same value.
@@ -343,7 +343,7 @@ print("min:", np.min(labeled_image))
343
343
print (" max:" , np.max(labeled_image))
344
344
```
345
345
346
- Examining the output can give us a clue why the image appears blank .
346
+ Examining the output can give us a clue why the image appears empty .
347
347
348
348
``` output
349
349
dtype: int32
@@ -777,9 +777,9 @@ the area by indexing the `object_areas` with the label values in `labeled_image`
777
777
778
778
``` python
779
779
object_areas = np.array([objf[" area" ] for objf in ski.measure.regionprops(labeled_image)])
780
- # prepend zero to object_areas array for background
780
+ # prepend zero to object_areas array for background pixels
781
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
782
+ # create image where the pixels in each object are equal to that object's area
783
783
colored_area_image = object_areas[labeled_image]
784
784
785
785
fig, ax = plt.subplots()
0 commit comments