if cv2.waitKey(1) & 0xFF == ord('q'): can some one explain me this part & 0xFF == ord('q') .i understand it is used to detect when q is press but what is 0xff and ord
Asked
Active
Viewed 75 times
0
-
Does this answer your question? [How cv2.waitKey(1) & 0xff == ord('q') works?](https://stackoverflow.com/questions/57690899/how-cv2-waitkey1-0xff-ordq-works) – HansQ Jun 10 '22 at 10:28
-
The value returned by waitKey is masked such that only the least significant 8 bits are used in the comparison – DarkKnight Jun 10 '22 at 10:29
-
1@HansQ I have marked that question as a duplicate of the earlier question that I linked – jonsca Jun 10 '22 at 10:32
-
1@AlbertWinestein and that's been a pointless operation since 2016 – Christoph Rackwitz Jun 10 '22 at 11:06