1

I'm working on a program (python 2.7.12 ,opencv) in which I am using waitkey to train characters/digits, In my code-

result = cv2.waitKey(0)  

here cv2.waitkey works well for all the characters that have got an ASCII value of range 0 to 255 or more(I guess),but when I press any bangla character (i.e অ,ই,উ,ক etc using avro or bijoy keyboard software) instead of these characters '?' is stored in result variable.

And if I check like this- "if cv2.waitKey(1) & 0xFF == ord('অ')" it results out-"TypeError: ord() expected a character, but string of length 3 found".How to handle these unichars using waitKey?

Chiro Odhora
  • 67
  • 1
  • 4

1 Answers1

0

Please have a look here. It seems that you can solve your problems with the help of the ord() function: Using other keys for the waitKey() function of opencv

Community
  • 1
  • 1
Ukimiku
  • 608
  • 1
  • 6
  • 13
  • I've checked this before,it looks good for space,RightKey,DownKey etc but does not even work for any Bangla/Hindi character@Ukimiku – Chiro Odhora Nov 03 '16 at 00:16