You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: episodes/07-thresholding.md
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -347,14 +347,27 @@ plt.xlim(0, 1.0)
347
347
348
348
{alt='Grayscale histogram of the maize root image'}
349
349
350
-
The histogram has a significant peak around 0.2 and then a broader "hill" around 0.6 followed by a smaller peak near 1.0. Looking at the grayscale image, we can identify the lower peak at 0.2 as the background and the larger pixel values as the foreground, but it is not so obvious what the threshold should be.
350
+
The histogram has a significant peak around 0.2 and then a broader "hill" around 0.6 followed by a
351
+
smaller peak near 1.0. Looking at the grayscale image, we can identify the lower peak at 0.2 as the
352
+
background and the broader peak as the foreground.
351
353
Thus, this image is a good candidate for thresholding with Otsu's method.
352
354
The mathematical details of how this works are complicated (see
but the outcome is that Otsu's method finds a threshold value between the two peaks of a grayscale histogram which might correspond well to the foreground and background depending the data and application.
357
+
but the outcome is that Otsu's method finds a threshold value between the two peaks of a grayscale
358
+
histogram which might correspond well to the foreground and background depending on the data and
The histogram of the maize root image may prompt questions from learners about the interpretation of the peaks and the broader region around 0.6. The focus here is on the separation of background and foreground pixel values. We note that Otsu's method does not work well for the image with the shapes used earlier in this episode, as the foreground pixel values are more distributed. These examples could be augmented by a discussion of unimodal, bimodal, and multimodal histograms. While these points can lead to fruitful discussions, the text in this episode attempts to reduce cognitive load and deliberately simplifies the discussion.
362
+
363
+
The histogram of the maize root image may prompt questions from learners about the interpretation
364
+
of the peaks and the broader region around 0.6. The focus here is on the separation of background
365
+
and foreground pixel values. We note that Otsu's method does not work well
366
+
for the image with the shapes used earlier in this episode, as the foreground pixel values are more
367
+
distributed. These examples could be augmented by a discussion of unimodal, bimodal, and multimodal
368
+
histograms. While these points can lead to fruitful discussions, the text in this episode attempts
369
+
to reduce cognitive load and deliberately simplifies the discussion.
@@ -674,6 +687,7 @@ The `&` operator above means that we have defined a logical AND statement. This
674
687
Knowing how to construct this kind of logical operation can be very helpful in image processing. The University of Minnesota Library's [guide to Boolean operators](https://libguides.umn.edu/BooleanOperators) is a good place to start if you want to learn more.
0 commit comments