AVT mako GIGE cameras into openCv
Hi all, I am attempting to stream a stereo camera rig, made up of 2 x AVT Gige cameras, through into openCv::Mat format, for processing. Using the PvApi, I am able to connect to one at a time using a standard VideoCapture.
int main()
{
VideoCapture cameraLeft(1 + CV_CAP_PVAPI);
//VideoCapture cameraRight(0 + CV_CAP_PVAPI);
Mat frameLeft;
Mat frameRight;
while (true) {
cameraLeft >> frameLeft;
imshow("frameLeft", frameLeft);
//cameraRight >> frameRight;
//imshow("frameRight", frameRight);
int key = waitKey(10);
if (key == 27) {
break;
}
}
return 0;
}
With those sections commented out, it runs fine. BUT as soon as I uncomment:
VideoCapture cameraRight(0 + CV_CAP_PVAPI);
I only see partial images, as if the data is getting corrupted. How can i stream two cameras at the same time here?
Thanks.
dropping the packet size helps, but it is still laggy. I take this to mean that my ethernet setup is not up to the task.
Did you enable jumbo packaging on your network interface? IF not then it will limit the amount of data that can get buffered at once. If you tell me your OS I can guide you to the correct location for setting this!
Also keep in mind that for a moving stereo rig, you will have to trigger your cameras using trigger cables to ensure that both images are taken at exactly the same time. If you simply use videocapture than the capture will be sequential and will thus only work good for stereo reconstruction in a fixed non moving object setup.
jumbo packaging? i did not! I am on windows 7 64. Thanks a lot!
also, re: triggering... Can I slave one camera to the other? Or do i need an external trigger device of some kind?
Hi Steven, I have opened a new question about triggering, if you have time, I would very much appreciate your feedback. Thanks! http://answers.opencv.org/question/86...