Hick
Hick

Reputation: 36374

How to make USB camera work in Open CV in C #?

videoCapture = highgui.CvCreateCameraCapture(0);

This is the code that I am using to get the camera capture . Though its working for the laptop webcam , it is not working for a camera connected from USB .

This is the C# wrapper I am using..

Upvotes: 0

Views: 1085

Answers (1)

Chris O
Chris O

Reputation: 5037

I recently had difficulties getting OpenCV to read from anything beyond the 'first' webcam, just couldn't get it to work (though I did not debug the OpenCV libraries themselves, I was looking for a quick solution). I ended up using DirectShow capture which did work capturing video from both sources. You might want to try using DirectShow.NET to get the video capture to work on your external webcam.

Upvotes: 1

Related Questions