from matplotlib import pyplot as plt | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
img = cv2.imread('lena.jpg', -1) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
cv2.imshow('image', img) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
plt.imshow(img) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
plt.xticks([]), plt.yticks([])#ticks | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
plt.show()#show | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
cv2.waitKey(0) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
cv2.destroyAllWindows()#close window
==========================================
secod code
|
Comments
Post a Comment
I hope you have benefited from this blog, and if you have any question, feel free to leave it here.