Opencv cant access camera connected through video capture device

asked 2014-02-11 22:06:19 -0600

Nish gravatar image

updated 2014-02-12 02:21:00 -0600

berak gravatar image

I have a analog camera connected to EasyCap video capture device. When I run a basic code which opens webcam video using OPENCV, I can access my in-built webcam but not the other analog camera.

How would you connect any other camera (FPV, IR, etc) to the PC such that OPENCV can access it.

Thanks.

edit retag flag offensive close merge delete

Comments

Can you post your code please?

prakharmohan gravatar imageprakharmohan ( 2014-02-17 21:49:49 -0600 )edit

I am having the same issue seeing as the guy who posted for help never replied, I will post my code:

include <opencv\cv.h>

include <opencv\highgui.h>

using namespace cv;

int main(){ Mat img; cvCaptureFromCAM(1);

while (true) { cam >> img; Mat edges; cvtColor(img, edges, CV_BGR2GRAY);

Canny(edges, edges, 30, 60);

imshow("window", edges);
waitKey(1);

} return 0; }

So that works with my webcam, and when I plug in the EasyCap it no longer works. Thanks for your help.

awidaai gravatar imageawidaai ( 2014-03-01 13:15:38 -0600 )edit

I have the same issue issue. Any joy on this?

Andries gravatar imageAndries ( 2014-03-06 02:14:45 -0600 )edit

@Andries it might be that OpenCV is not compatible, you might want to ping the contributors, ask on the irc channel and visit the mailing list. Tell me if it helps.

prakharmohan gravatar imageprakharmohan ( 2014-03-07 03:37:35 -0600 )edit