-3
if cv2.waitKey(20) & 0xFF ==27:

Can anybody tell me the working of this this code in python

  • & 0xFF removes the high value bits of a value >= 256. 27 is the 8 bit value of a fixed pressed key, maybe the ESC key. – Micka Nov 08 '22 at 11:58

1 Answers1

0

The waitKey() function waits for the specified millisecond and then returns the code for the key pressed or -1 if no key was pressed.

https://stackoverflow.com/a/67356778/14237825

avztemeleq
  • 19
  • 7