OpenCV webcam error

Hey guys,

I’ve been learning CUDA and OpenCV at the same time to learn GPUCV later on.

However I’ve faced a problem that I can’t solve and can’t find it’s answer on other forums. I’ve previously posted here and know that most linux users here have a lot of knowledge and would respond me with a great answer.

So here’s the problem.

I’ve complied some OpenCV sample code and I want it to run on my webcam, but the terminal doesn’t show any pop up windows from the highgui.

Basically I type this:

./Face_tracking /dev/video0

and the terminal doesn’t show me an error message, it just stays there processing , while my Logitech webcam green light goes on, but then no window comes out, and I can’t really tell whats happening.

On the other hand, when I type in this:

./Face_tracking avividexample.avi

It opens up normally and I can use the facetracking code on a saved .avi file. But I wan’t to use it real-time with my webcam.

Strange thing is that Cheese and amsn detect my webcam, but Camorama doesn’t.

Curiously when I type in


I get this error:

bash: /dev/video0: Permission denied

: lsusb does detect my LogitechE1000 webcam.

Is there anything I’m missing?? Suggestions?

Sorry if this isn’t exactly an OpenCV forum, but I really need help from guys what know about linux.