Ask Your Question
1

Camara doesn't work in OpenCV

asked 2013-02-21 05:22:20 -0600

jessica gravatar image

Hi! I have tried to use OpenCV's samples that use camara, but it didn't work. I tested my webcam with the program Cheese and it's OK. I have installed some packeges too:

sudo apt-get install libtbb2 libtbb-dev sudo apt-get install libavformat-dev libwscale-dev

After that I rebuild my OpenCV in this way: cmake-gui I selected "BUILD_EXAMPLES" I clicked in "Configure" I clicked in "Generate"

Unfutunally, anything working. I'm testing the sample bgfg_segm. I can use the video but the camara. What can I do?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-02-21 05:43:17 -0600

  1. OpenCV supports video camera access through V4l, V4l2 and gstreamer. Check that some of them are enabled in cmake before library build.

  2. There is simple sample starter_video.cpp that takes file name or device number (0, 1, etc) from command line and show its content in a window. It helps you to check camera.

edit flag offensive delete link more

Comments

The options V4I and gstreamer are already checked. I couldn't find the option V4L2. I builded the sample satarter_video but the message below has shown: Failed to open a video device or video file! I tried with number 0,1,2 and nothing worked.

jessica gravatar imagejessica ( 2013-02-25 10:11:06 -0600 )edit

Question Tools

Stats

Asked: 2013-02-21 05:22:20 -0600

Seen: 201 times

Last updated: Feb 21 '13