PDA

View Full Version : Stereo sequence capture



Divyang
January 16, 2005, 23:24:15
Hi,

We are working on a computer vision application and would like to capture a stereo pair using the DFG/SV1 frame grabber (assuming the two cameras will be using a common sync input).

The stereo pair will be monochrome (8 bits) and the mininum size we would like is 256 x 360.

First, we want to know if this is possible with the DFG/SV1 grabber?

If so, do we create two Grabber and two image buffers?

Thanks,

Divyang M.

Stefan Geissler
January 17, 2005, 09:03:38
Hello,

First off all, you need two DFG/SV1 boards, one for each connected camera.

To use two grabbers and image buffers, you just declare



DShowLib::Grabber m_Grabber_1;
DShowLib::Grabber::tMemBufferCollectionPtr m_pMemBuffColl_1;

DShowLib::Grabber m_Grabber_2;
DShowLib::Grabber::tMemBufferCollectionPtr m_pMemBuffColl_2;


Alternatively you can handle the grabber objects in an array:


DShowLib::Grabber m_Grabber[2];
DShowLib::Grabber::tMemBufferCollectionPtr m_pMemBuffColl[2];

divyang
January 17, 2005, 16:24:33
Hi,

Thanks for the reply.

Since there are 2x composite inputs, can't I connect a camera each?
If not, then why (just curious as to why there are two inputs)?

I was going through the thread titled "Two Frame Grabbers" (which is 3~4 threads below this) and from there I thought it is possible with a single frame grabber. I assume the DFG/1394-1 box is only to convert to 1394 format since the user wanted to capture large images (but I may be completely wrong here as I am new to cameras and capturing images).

And if I use two frame grabbers then how do I go about synchronizing the inputs from the two grabbers? I was wondering if there is a sample code available?

Thanks,
Divyang M.

Stefan Geissler
January 18, 2005, 11:44:01
Hello



Since there are 2x composite inputs, can't I connect a camera each?
If not, then why (just curious as to why there are two inputs)?

It is not possible to use two cameras parallel on the grabber.

If more than one camera is connected to the grabber, an application can
use all cameras only in sequence. This done by switching from one input channel to the next. Therefore, the grabber has two composit inputs and one SVHS input.




I was going through the thread titled "Two Frame Grabbers" (which is 3~4 threads below this) and from there I thought it is possible with a single frame grabber. I assume the DFG/1394-1 box is only to convert to 1394 format since the user wanted to capture large images (but I may be completely wrong here as I am new to cameras and capturing images).

The DFG/1394-1 does the same like the DFG/SV1: It digitizes video and sends it through FireWire to the computer. The DFG/SV1 is directly build in in the computer.




And if I use two frame grabbers then how do I go about synchronizing the inputs from the two grabbers? I was wondering if there is a sample code available?

You can not synchronize the grabbers, you must synchronize the cameras. But i must say, i have never tried to synchronize analogue cameras.

I suggest to use FireWire DCam cameras like DMK 21BF04 or Sony DCam cameras, that have an external trigger input. You can send these cameras a trigger impulse and they will expose just one image. This image is send to the computer. If you have to software grabber objects waiting for the images, you can be sure, you received images that have been exposed at the same point of time. After your software has processed the images, you engage the next trigger impulse.

divyang
January 19, 2005, 16:48:35
Hi,

Thanks for your reply.

I've installed 2 frame grabbers and I'm able to capture image pairs.
I've still to figure out to synchronize the images as I am using analogue cameras.

--Divyang

Stefan Geissler
January 19, 2005, 18:02:46
Hello,

you may use the tsMediaSampleDesc that comes to with the MemBuffer::getSampleDesc(). You can compare the times in the tsMediaSampleDesc of the images from your two grabbers, to find the two Membuffers with the shortest time difference. May be this is a suitable way to find synchronized images. I did not test this on my own.