Hello, McSka:
You need attach a USB keyboard to Jetson board, and run the openCV test program in the terminator with your keyboard, and keep the ‘video’ window as current active window. Then waitKey can get the key press event from your USB keyboard.
If you run the opencv app from terminal like SSH client, this will not work.
On my PC when I hit ‘q’ the program will be immediately interrupted, it is not necessary to hit also ‘return’, while on the TX1 even if I hit ‘q’ and then ‘return’ nothing happens.
I am using a keyboard, and I am aware that it is necessary to keep the “video” window as current active window. Anyway if you say that it does not work running the app fromm SSH I need to change direction. I start a new thread, thank you very much
Perhaps it is requiring a type cast. Because of other character encodings (such as UTF-8 or UTF-16) this function uses “int” as type. Many of the character handling functions also use “int”. However, ‘q’ is type const char. Try comparing to something like “static_cast(‘q’)” (I haven’t tried it, you may get the compiler complaining about const, in which case reinterpret_cast might work…YMMV).