I try to run the example of Chapter 12 in "Computer vision - Das Praxisbuch", but I have no luck! I tried several cams in several applications (trackingapp, calibrationapp, camera app) but IVT only found one Webcam (no matter which combination). Other programms like videograbbers, Skype are able to show the second one. What can I do?
sorry for the late answer. It depends on the kind of camera and camera module you are using. For Windows those applications per default use the module CVFWCapture (Video for Windows), which currently doesn't support multiple cameras. You would have to modify that class. But be aware that the cameras won't be synchronized over the USB bus in general.
CLinux1394Capture supports multiple cameras, as does CDragonflyCapture.
A simple workaround is if you want to make some experiments: Take a static scene, use the CaptureApp to store a snapshot of the left and right camera (while not moving the camera), and then use the class CBitmapCapture to load the stereo image pair. In the examples, you can just replace the line in which the constructor of CVFWCapture is called.
If you want to use the CCalibrationApp the same way you have to modify it accordingly and remove the "% 20" condition in OpenCVCalibrationAlgorithm so that each image is accepted (and not only every 20th).
I have done several experiments in the last days:
First I wrote I little programm in OpenCV. It displays two cameras simultanious. So I guess it is no hardware/driver problem.
Then I read through VFCapture.h (*.cpp). I found no indication, that a second Cam is supported. So I looked at the other capture moduls. OpenGLCapture seems zu suppot two camers. But I was not able to implement it in the CalibrationApp.
the third idea: I tryed to implement my OpenCV capture in the IVT Calibration. But at this point my knowledge is too small.
I trying to so implement CDragonFlycapture. but I have two problems:
the file pgrflycapture.h is missing. I downloaded it on:
is this the right one?
Second problem is to call the CDragonFlyCapture.
I tried this way
int COrganizer::Run(CVideoCaptureInterface::VideoMode mode)
printf("error: could not open camera1\n");
and so on...
The first parameter of CDragonFlyCapture is 1 (according to CVideoCaptureInterface it means e640x480 for the VideoMode) But it is not accepted! Why?
the problem is solved.
I wrote a new OpenCVCapture. Now I am able to use two USB-Webcams
first of all: You can use the CDragonFlyCapture module only if you own a Dragonfly camera (or similar) from PointGrey. The file pgrflycapture.h is part of their driver API.
Happy to hear that you solved the problem by writing a new COpenCVCapture. Would you want to contribute it to the IVT?
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.