Skip to content

Commit a9dda00

Browse files
committed
histogram interpretation
1 parent 2b4a521 commit a9dda00

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

episodes/07-thresholding.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,16 @@ plt.xlim(0, 1.0)
348348
![](fig/maize-root-cluster-histogram.png){alt='Grayscale histogram of the maize root image'}
349349

350350
The histogram has a significant peak around 0.2, and a second,
351-
smaller peak very near 1.0.
351+
shallower peak near 0.6.
352352
Thus, this image is a good candidate for thresholding with Otsu's method.
353353
The mathematical details of how this works are complicated (see
354354
[the scikit-image documentation](https://scikit-image.org/docs/dev/api/skimage.filters.html#threshold-otsu)
355355
if you are interested),
356356
but the outcome is that Otsu's method finds a threshold value between
357357
the two peaks of a grayscale histogram.
358+
Note there is a third peak very close to 1.0 which corresponds to the white label and disk on the
359+
left hand side of the image. It would be a good idea to crop the image to remove these white pixels
360+
before calculating the Otsu threshold but for now we will continue without doing this.
358361

359362
The `ski.filters.threshold_otsu()` function can be used to determine
360363
the threshold automatically via Otsu's method.

0 commit comments

Comments
 (0)