@@ -118,6 +118,7 @@ episode.
118
118
# create a histogram of the blurred grayscale image
119
119
histogram, bin_edges = np.histogram(blurred_image, bins=256, range=(0.0, 1.0))
120
120
121
+ fig, ax = plt.subplots()
121
122
plt.plot(bin_edges[0:-1], histogram)
122
123
plt.title("Grayscale Histogram")
123
124
plt.xlabel("grayscale value")
@@ -223,6 +224,7 @@ plt.show()
223
224
> > image = skimage.io.imread("data/shapes-02.jpg", as_gray=True)
224
225
> > histogram, bin_edges = np.histogram(image, bins=256, range=(0.0, 1.0))
225
226
> >
227
+ > > fig, ax = plt.subplots()
226
228
> > plt.plot(bin_edges[0:-1], histogram)
227
229
> > plt.title("Graylevel histogram")
228
230
> > plt.xlabel("gray value")
@@ -323,6 +325,7 @@ blurred_image = skimage.filter.gaussian(gray_image, sigma=1.0)
323
325
324
326
# show the histogram of the blurred image
325
327
histogram, bin_edges = np.histogram(blurred_image, bins=256, range=(0.0, 1.0))
328
+ fig, ax = plt.subplots()
326
329
plt.plot(bin_edges[ 0:-1] , histogram)
327
330
plt.title("Graylevel histogram")
328
331
plt.xlabel("gray value")
@@ -670,6 +673,7 @@ data/trial-293.jpg,0.13607895611702128
670
673
> > gray_image = skimage.color.rgb2gray(image)
671
674
> > blurred_image = skimage.filters.gaussian(gray_image, sigma=1.0)
672
675
> > histogram, bin_edges = np.histogram(blurred_image, bins=256, range=(0.0, 1.0))
676
+ > > fig, ax = plt.subplots()
673
677
> > plt.plot(bin_edges[0:-1], histogram)
674
678
> > plt.title("Graylevel histogram")
675
679
> > plt.xlabel("gray value")
0 commit comments