I'm trying to do basic video capture from a webcam. I got this very basic code from this opencv blog and I'm compiling it with
g++ `pkg-config --cflags opencv` test2.cpp `pkg-config --libs opencv`
And when I run it, it shows me these messages
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
but it does run. However, the program is supposed to exit when the esc key is pressed. Because of this line
if(waitKey(30) == 27)
But it does not. I tried changing it in the program, to some other key, like 'q', but it still doesn't work when I run the program.
if(waitKey(30) == 'q')
While running, it seems that waitkey() just isn't responding.
EDIT : waitKey() works. When I copied it, for some reason it became waitkey(). However, the invalid argument messages are still being shown