text_plain_output_1.png
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cropped = gray[120:, :]
blurred = cv2.GaussianBlur(cropped, (5, 5), 0)
from matplotlib import cm
fig = plt.figure(figsize=(16, 4))
ax = plt.subplot(1, 4, 1)
ax.imshow(image)
ax.set_title('original image')
ax = plt.subplot(1, 4, 2)
ax.imshow(gray, cmap=cm.binary_r)
ax.set_axis_off()
ax.set_title('grayscale image')
ax = plt.subplot(1, 4, 3)
ax.imshow(cropped, cmap=cm.binary_r)
ax.set_axis_off()
ax.set_title('cropped image')
ax = plt.subplot(1, 4, 4)
ax.imshow(blurred, cmap=cm.binary_r)
ax.set_axis_off()
ax.set_title('blurred image')