Hello,
i want to use my firewire-camera with opencv, to retrieve
live pictures. this is my code, put the output is everytime
"failed."
can you help me?
(the camera is pluged into the firewire port)
IplImage* image_1 = 0; // camera image
// Main
int main(int argc, char **argv) {
// cam procs
CvCapture* capture = 0;
usleep(500);
// create window
cvNamedWindow("CAM_WINDOW",1);
capture = cvCaptureFromCAM(-1);
// I also tested:
// capture = cvCaptureFromCAM(0);
usleep(500);
if (capture) {cout<<"lets go ";}
else {cout<<"failed ";}
}
i want to use my firewire-camera with opencv, to retrieve
live pictures. this is my code, put the output is everytime
"failed."
can you help me?
(the camera is pluged into the firewire port)
IplImage* image_1 = 0; // camera image
// Main
int main(int argc, char **argv) {
// cam procs
CvCapture* capture = 0;
usleep(500);
// create window
cvNamedWindow("CAM_WINDOW",1);
capture = cvCaptureFromCAM(-1);
// I also tested:
// capture = cvCaptureFromCAM(0);
usleep(500);
if (capture) {cout<<"lets go ";}
else {cout<<"failed ";}
}
链接已复制
1 回复
Hi, there is comments from our expert
It seems that the code is run on Linux.
Make sure that the latest version from CVS is used (that provides much video capturing support than beta 4).
Install libdc1394 and libraw1394, then configure and build OpenCV.
If it still does not work, probably, some extra initialization and color conversion code should be added to cvcap_dc1394.cpp.
Regards,
Vladimir
