Ask Your Question
0

VideoCapture with VC500

asked 2012-11-06 12:34:25 -0500

jerdman gravatar image

updated 2012-11-06 12:35:55 -0500

I am trying to use a Diamond VC500 usb device to capture video using OpenCV 2.4.2 in Windows 7 Ultimate, programming in c++ in Visual Studio 2010.

So far, I have the following code:

    CvCapture* cap = cvCaptureFromCAM(camIndex);
if(!cap){
    std::cout << "Camera not open!\n";
    return -1;
}

cv::namedWindow("camera", 1);
cv::Mat frame;
while(true){
    frame = cvQueryFrame(cap);
    cv::imshow("camera", frame);
    if(cv::waitKey(30) >= 0)
        break;
}

It does just what it is supposed to, continuously capture video, but I can't choose the camera device that I want.

-1, 0, and CV_CAP_ANY all go straight to the built in Apple iSight camera (dual booting on an iMac). Values 1..10 give me a light gray screen. I've tested the VC500 and I've captured video with the software it comes with, I just can't get it to work with opencv.

edit retag flag offensive close merge delete

Comments

Any good news about it? Thanks.

guypld gravatar imageguypld ( 2014-09-01 00:11:41 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-11-24 11:12:28 -0500

ZHT gravatar image

Have you tried disabling every other camera (including webcam) on your computer and then run the code?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2012-11-06 12:34:25 -0500

Seen: 414 times

Last updated: Nov 24 '14