import matplotlib.image as image
import matplotlib.pyplot as plt
img_ = image.imread('2y5c.jpg')
plt.imshow(img_)
img_ = img.copy()
img_[img_[:, :, 0] < 150] = 0
img_[img_[:, :, 0] >= 150] = 255
plt.imshow(img_)
import matplotlib.image as image
import matplotlib.pyplot as plt
img_ = image.imread('2y5c.jpg')
plt.imshow(img_)
img_ = img.copy()
img_[img_[:, :, 0] < 150] = 0
img_[img_[:, :, 0] >= 150] = 255
plt.imshow(img_)