Page 1 of 1

What does k == 27 mean and do in this code?

Posted: Fri Jul 08, 2022 6:16 am
by answerhappygod
What does k == 27 mean and do in this code?
What Does K 27 Mean And Do In This Code 1
What Does K 27 Mean And Do In This Code 1 (28.39 KiB) Viewed 47 times
import cv2 img cv2.imread('lena.jpg',0) print (img) cv2.imshow('image', img) k=cv2.waitkey (0) if k == 27: cv2.destroyAllWindows() elif kord('s'): cv2.imwrite('lena_copy.jpg',img) cv2.destroyAllWindows()