二值化Thresholding
from imutils import * #载入图片,并以灰度显示 image = imread('image/coins.jpg') show(image) gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) plt.imshow(gray,'gray') plt.axis('off') plt.show()
from imutils import * #载入图片,并以灰度显示 image = imread('image/coins.jpg') show(image) gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) plt.imshow(gray,'gray') plt.axis('off') plt.show()