tags:

views:

918

answers:

4

Hi, I'm currently trying to use OpenCV (using the Processing library). However, when I try to run any examples (either the Processing ones or the C ones included with OpenCV), I see nothing but black instead of input from the camera. The camera's LED indicator does turn on.. has anyone had the same problem? is my camera somehow incompatible with openCV? It's an Acer Crystal Eye...

Thanks,

A: 

I have had the same problem, with the same webcam. Can you post what OS are you using and what version of OpenCV? My way of solving this was rather mysterious, but it finally worked when I used the opencv package provided by Ubuntu.

alkar
A: 

HI ,

I also have the same problem

I have tried this with

1) Win XP / SP3 2) Windows Vista ( Home Premium ) x64

Please find the code below . Please help me

// Capture the Image from the webcam CvCapture *pCapturedImage = cvCreateCameraCapture(0);

// Get the frame IplImage *pSaveImg = cvQueryFrame(pCapturedImage);

// Save the frame into a file cvSaveImage("test.jpg". ,pSaveImg); // A JPG FILE IS BEING SAVED // OF 6KB , BUT IT IS BLACK

I get a black image .

Sujay Ghosh
A: 

I had somewhat same problem on Ubuntu. I downloaded a code from here: http://www.rainsoft.de/projects/pwc.html It does an extra step before starting to get frames(i think setting FPS). Worth a try, the code is easy to read and works with non-philips cams.

Atilla Filiz
A: 

OpenCV 2.1 still has a few problems with 64bits OS. You can read this topic on the subject.

If you're looking for working/compilable source code that shows how to use the webcam, check this out.

Let us know if it helped you.

karlphillip