Multiple USB Cameras

Discussion in 'General Discussion' started by jaeg, Jul 3, 2014.

  1. jaeg

    jaeg Member

    Joined:
    Oct 22, 2013
    Messages:
    62
    Likes Received:
    0
    Sorry if this is in the wrong place.

    I'm trying to use stereo vision in OpenCV however I've hit a snag. I'm guessing that since the USB ports are on the same bus when I try to activate the second camera it gives:
    Code:
    libv4l2: error turning on stream: No space left on device
    VIDIOC_STREAMON: No space left on device
    Similar situation happens when I open the Webcam Utility program twice each one set to a different camera.

    I'm unsure if there is any obscure Linux magic to fix this issue.

    Thanks!
     
  2. mikelangeloz

    mikelangeloz Member

    Joined:
    Jul 9, 2013
    Messages:
    129
    Likes Received:
    1
    It's better to see which /dev/video number are assigned to each camera. This way you should be use both cameras...
    So, let's see. First connect one camera, then the other (system should be already on).

    Then type:
    Code:
    dmesg | tail
    Paste output here
     
  3. jaeg

    jaeg Member

    Joined:
    Oct 22, 2013
    Messages:
    62
    Likes Received:
    0
    One is dev/video3 and the other is dev/video4
     
  4. jaeg

    jaeg Member

    Joined:
    Oct 22, 2013
    Messages:
    62
    Likes Received:
    0
    I can get one camera working at a time but not both.

    Finally got time to run dmesg here's the output:

    They typically load up as video3 and video4. So likewise in openCV I use 3 and 4 for the camera index numbers.


    I tried
    Code:
    rmmod uvcvideo
    modprobe uvcvideo quirks=128
    But was met with:
    ERROR: module uvcvideo does not exist in /proc/modules
     

    Attached Files:

  5. jaeg

    jaeg Member

    Joined:
    Oct 22, 2013
    Messages:
    62
    Likes Received:
    0
    After running lsusb I noticed that there are two buses. Is bus 1 J24?

    In other words the primary USB, WIFI, etc seems to be on bus 2 while lsusb shows that there is a bus 1. So I'm hoping bus 1 is the third USB port. If that's the case getting the adapter would fix the bandwidth issue of the webcam since (from what I've read) 1 camera can take about 60% of the bus bandwidth.
     
  6. jaeg

    jaeg Member

    Joined:
    Oct 22, 2013
    Messages:
    62
    Likes Received:
    0
    For future knowledge: Third usb port is on Bus 2. No idea what bus 1 is used for.
     
  7. anders

    anders New Member

    Joined:
    Jul 14, 2014
    Messages:
    1
    Likes Received:
    0
    From my experience I think your intuition is correct: it's a bandwidth problem. Can you try using gvucview or something similar to reduce the resolution and/or framerate enough to get it working?
     
  8. jaeg

    jaeg Member

    Joined:
    Oct 22, 2013
    Messages:
    62
    Likes Received:
    0
    I did. The webcams can not go into a small enough resolution in the MJPG format to work together. Some lower res cameras will be needed.
     
  9. jonathan

    jonathan New Member

    Joined:
    Jul 15, 2014
    Messages:
    3
    Likes Received:
    0
    Hello, how can i recognize a webcam trough my udoo quad, i cannot open it.

    Please help me
     
  10. jaeg

    jaeg Member

    Joined:
    Oct 22, 2013
    Messages:
    62
    Likes Received:
    0
    It'll depend on the webcam. Not all work with Linux.
     
  11. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    Waht jaeg said. It has to be a UVC compatible camera. What I've found is that most Logitechs (since they got bought by microsoft) are NOT UVC.

    Basically if it says it requires Windows, you're screwed. If it says it works on Mac, you're good to go (Mac's also require UVC.)
     

Share This Page