0

I have been trying to use my logitech camera using:

CvCapture* capture = cvCaptureFromCAM(1);

My laptop already have a built-in camera and it's working fine I'm using openCV 2.3 in Visual Studio 2010 All sources i'm finding are using libraries for VS 2008 I don't think that they work for 2010 (I've tried one before) Is there anyway to do it?

Yuck
  • 49,664
  • 13
  • 105
  • 135
user1347945
  • 493
  • 2
  • 7
  • 11
  • It looks like C. C++ would be something like `cv::VideoCapture cap(1);` – juanchopanza Apr 23 '12 at 13:04
  • Ummm, I don't know if this works. But can you provide me with a simple example to test it? I'm relatively a beginner at openCV – user1347945 Apr 23 '12 at 13:26
  • possible duplicate of [OpenCV Capture from external camera](http://stackoverflow.com/questions/10248201/opencv-capture-from-external-camera) – karlphillip Apr 23 '12 at 13:32
  • I doubt it will help, but I put something [here](http://pastebin.com/i0Kb2xNv). But I use linux and I can figure out what is going on at the OS level, although for my logitech camera I didn't have to do anything special. – juanchopanza Apr 23 '12 at 13:34
  • @karlphillip it is a possible duplication, I've seen that one before posting (stackoverflow has a very nice search engine when you type the title) however, that question had several different circumstances as well as it didn't help me much :) – user1347945 Apr 23 '12 at 19:38

1 Answers1

0

What is the reference of your logitech camera ? Here is a list of compatible camera tested with opencv.

Eric
  • 2,301
  • 3
  • 23
  • 30
  • could it be the camera itself? I thought that the method i'm using cannot be used for cameras connected via USB – user1347945 Apr 23 '12 at 13:33
  • 1
    VideoCapture::VideoCapture(int device) -- device = id of the opened video capturing device (i.e. a camera index). If there is a single camera connected, just pass 0. – Eric Apr 23 '12 at 13:35