Hello!
I’m building this http://forum.openframeworks.cc/t/stitching-many-cameras-together-for-ofxopencv-blob-analysis/8157/0
My only problem is I cannot get more than two cameras working at the same time. I have three identical Microsoft LifeCam HD-5000 webcams with their firmwares and software up-to-date and they all work fine when I call them one by one. But when I call three, the last one always fails and it is not a hardware problem (I checked).
Any help would be greatly appreciated!
In the testApp.h I have this:
ofVideoGrabber vidGrabber_[3];
ofxCvColorImage colorImg_[3];
In the setup() I have this:
for (int devicenumber= 0; devicenumber< 3 ; devicenumber++){
vidGrabber_[devicenumber].setDeviceID(devicenumber);
vidGrabber_[devicenumber].initGrabber(640,360);
colorImg_[devicenumber].allocate(640,360);
}
In the update() I have this:
for (int devicenumber= 0; devicenumber< 3 ; devicenumber++){
bool bNewFrame = false;
vidGrabber_[devicenumber].grabFrame();
bNewFrame = vidGrabber_[devicenumber].isFrameNew();
if (bNewFrame){
colorImg_[devicenumber].setFromPixels(vidGrabber_[devicenumber].getPixels(),640,360);
colorImg_[devicenumber].updateTexture();
}
}
And the following is the console ouput. As you can see Device 2 (the third) fails at “ERROR: Could not start graph”. It also happens to fail while it is loading and not running either update() or draw().
[tt]
***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****
SETUP: Setting up device 0
SETUP: Microsoft LifeCam HD-5000
SETUP: Couldn’t find preview pin using SmartTee
SETUP: Default Format is set to 640 by 480
SETUP: trying format RGB24 @ 640 by 360
SETUP: Capture callback set
SETUP: Device is setup and ready to capture.
***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****
SETUP: Setting up device 1
SETUP: Microsoft LifeCam HD-5000
SETUP: Couldn’t find preview pin using SmartTee
SETUP: Default Format is set to 640 by 480
SETUP: trying format RGB24 @ 640 by 360
SETUP: Capture callback set
SETUP: Device is setup and ready to capture.
***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****
SETUP: Setting up device 2
SETUP: Microsoft LifeCam HD-5000
SETUP: Couldn’t find preview pin using SmartTee
SETUP: Default Format is set to 640 by 480
SETUP: trying format RGB24 @ 640 by 360
SETUP: Capture callback set
ERROR: Could not start graph
SETUP: Disconnecting device 2
SETUP: freeing Grabber Callback
ERROR - Could not pause pControl
SETUP: freeing Renderer
SETUP: freeing Capture Source
SETUP: freeing Grabber Filter
SETUP: freeing Grabber
SETUP: freeing Control
SETUP: freeing Media Type
SETUP: removing filter Microsoft LifeCam HD-5000…
SETUP: filter removed Microsoft LifeCam HD-5000
SETUP: freeing Capture Graph
SETUP: freeing Main Graph
SETUP: Device 2 disconnected and freed
OF: OF_LOG_ERROR: error allocating a video device
OF: OF_LOG_ERROR: please check your camera with AMCAP or other software
[/tt]