Read and Write image using openCV in Arabic.
img = cv2.imread('lena.jpg', -1 #0 for gray scale , 1 for color , -1 for alpha channel show image# | |
cv2.imshow('image', img) specify a wait key from keyboard# | |
k = cv2.waitKey(0) & 0xFF | |
if k == 27: #esc in keyboard | |
cv2.destroyAllWindows() #close the window | |
elif k == ord('s'): #if order is s save the image | |
cv2.imwrite('lena_copy.png', img) #write image in your pc | |
cv2.destroyAllWindows() # close the window
data i used #====================================================# if you faced any issue contact me via what's app : +201210894349 or facebook |
Comments
Post a Comment
I hope you have benefited from this blog, and if you have any question, feel free to leave it here.