Read and Write image using openCV in Arabic.

 



import library# import cv2 read image as it#
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

Popular posts from this blog