MasteringOpenCV / code

Code for the book "Mastering OpenCV with Practical Computer Vision Projects" by Packt Publishing 2012.
Other
2.72k stars 1.64k forks source link

Could't grap the next frame ! #22

Closed DangThu closed 10 years ago

DangThu commented 10 years ago

I used the laptop with an integrated web camera. When i run the program, it reported "Couldn't grap the next camera frame", the window showing image from camera apeared then disappeared immediatly. I plug another web camera to connect with laptop by the USB. But the same error occured. How can i fix this problem ?

shervinemami commented 10 years ago

For the Cartoonizer desktop code in chapter 1 or for the Face Recognition code in chapter 8, you can just pass the camera number as the first argument (instead of the default of 0) when you run the program, such as: facerec 1 (Also try the values 2 and -1 if that doesnt work on your computer)

DangThu commented 10 years ago

Thanks for your help. It works ! :)