|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Two USB Cameras
We're trying to connect 2 USB cameras to the roborio, and would like to process the images from one, and stream the other to the driver station. We have the streaming working with mjpg-streamer. However, when we try to get images from the other camera, we get an "internal error" (IMAQdxError -1074360319). I'm fairly sure we are accessing the correct camera, because we get a "camera already in use error" otherwise.
The image processing camera is a LifeCam hd-3000, though the streaming camera is something different at t the moment. |
|
#2
|
||||
|
||||
|
Re: Two USB Cameras
I was told at an event that the only camera that is tested and confirmed to work is the LifeCam. Anything else, and you're on your own.
|
|
#3
|
||||
|
||||
|
Re: Two USB Cameras
Does the 2nd camera show up in the RoboRIO dashboard?
|
|
#4
|
|||
|
|||
|
Re: Two USB Cameras
The other camera does show up, but it is listed as two devices on the webdashboard, which could be the problem. We may just wait until we can get another LifeCam.
|
|
#5
|
||||
|
||||
|
Re: Two USB Cameras
Could you post a screenshot of the web dashboard?
|
|
#6
|
|||
|
|||
|
Re: Two USB Cameras
What resolutions and framerates are you trying to get from the two cameras? You may be maxing out the USB bandwidth.
|
|
#7
|
|||
|
|||
|
Re: Two USB Cameras
I don't have access to the webdashboard at the moment, and won't for a few days, but on USB it shows the LifeCam labeled cam0, the second camera labeled cam1, and again the second camera labeled something like USB0::####::####::NI-VISA-1005::2::RAW, where # is a number or letter that I don't remember.
Both cameras work fine by themselves, but using them together causes an error. We aren't maxing out the bandwidth, because the error occurs when we call NIVision.IMAQdxOpenCamera(), before any image data is passed to the roboRIO. |
|
#8
|
|||
|
|||
|
Re: Two USB Cameras
If I recall correctly, the USBCamera class is implemented as a singleton, and as a result you can't use two cameras in any intuitive way. There's a chance I'm wrong on that, but I recall my team messing around with it and looking at the source code and I believe that was the takeaway. I remember there was a hacky way here on CD not too long ago though. I found it easier to just use an IP Camera and USB camera instead of two USBs, but I'm pretty sure there is a way.
|
|
#9
|
|||
|
|||
|
Re: Two USB Cameras
According to this post, the error occurs when opening the second camera will use more than the allowable USB bandwidth:
https://www.chiefdelphi.com/forums/s...8&postcount=32 I guess I'll try decreasing resolution and FPS once I have access to the robot again. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|