PDA

View Full Version : using flash with membuffer collection



dpat12
May 23, 2008, 11:43:34
I want to snap flashed image with membuffercollection. problem is after i send flash signal i try to snap the images in free running camera . i get images in first buffer and some times in second buffer . Item is moving web so i just want to grab 1 frame from the image i.e even or odd once i know in which buffer it is i can do even odd saperation

is it possible that i can get it in some specific buffer only ie. 1 or 2
or how i should find out that which is the bright image and which is the dull lmage .

dq.putFlash(1);
//MicroSleep(5);
MicroSleep(8);
pSink->snapImages(IMG_BUFF);
//MicroSleep(10);
MicroSleep(5);
dq.putFlash(0);

Stefan Geissler
May 23, 2008, 12:06:48
Hi,

yes, there is a solution. First of all, do following somewhere at start of your code:

Grabber::setPauseLive Method


bGrabber->setPauseLive( true );

Then enhance your code:


dq.putFlash(1);
//MicroSleep(5);
MicroSleep(8);
bGrabber->setPauseLive( false);
pSink->snapImages(2);
bGrabber->setPauseLive( true);
//MicroSleep(10);
MicroSleep(5);
dq.putFlash(0);


If you use an analogue camera and a FireWire converter, then you can use the half hight video format,e g. 640*240, then you will receive the fields separately.

dpat12
May 27, 2008, 09:23:51
Thanks for that i tried that it works sometimes but still it misses flash 7 out of 10 times . i also tried to do half height i.e 768x288 with that i can get single field but flash is missing in most of the capture as my flash time is for single field i get black images for no flashed fields .

by doing half height it means that it is throwing out the other field and that flash might be in that field .

Stefan Geissler
May 27, 2008, 09:28:34
Hello,

If the flash is missing, then I guess, the wait time for the flash is too short. I do not know what "MicroSleep(8);" does, but if it waits for 8 milli seconds, I would suggest to wait for 40 milliseconds (25 fps), to be sure you camera exposed a new image.

dpat12
May 27, 2008, 09:43:44
MicroSleep(8) is sleep for 8 microsecond . i have to wait 40 milisecond and then execute snapimages

Stefan Geissler
May 27, 2008, 09:58:32
8 microscond is very short, thus you do not know, which picture is exposed by the camera.