diff --git a/test_historgram.py b/test_historgram.py index 68462eb..261dc40 100644 --- a/test_historgram.py +++ b/test_historgram.py @@ -5,13 +5,12 @@ def plot_histogram(image): im = cv2.imread(image) - # print("im type: ", type(im)) vals = im.mean(axis=2).flatten() counts, bins = np.histogram(vals, range(257)) plt.bar(bins[:-1] - 0.5, counts, width=1, edgecolor='none') plt.xlim([-0.5, 255.5]) plt.savefig('test.JPEG') - #plt.show() + plt.show() @@ -26,10 +25,6 @@ def plot_histogram_rgb(image): img_one_ch = 'app/static/imagenet_subset/n01443537_goldfish.JPEG' -# print(img_one_ch) -# print(type(img_one_ch)) plot_histogram(img_one_ch) -# img_rgb = 'app/static/imagenet_subset/n01443537_goldfish.JPEG' -# plot_histogram_rgb(img_rgb)