01-29-2010 05:12 AM
01-29-2010 05:46 AM
I am not getting this. Do you want to save the avi file? When should it get saved? If i understand correctly. You can store the entire length and retain/save only the portion that you want..
01-29-2010 08:14 AM
victoria00 wrote:
Hi!
I have a little problem...
I need to create a software with labview and an IEEE394 camera for video acqisition in motion detection and in another work.
...
i write the motion detection on avi file... my question is: it's possible, when the camera detect the motion, register on file avi about 5 or 6 seconds before the motion started??
Also you need Time Machine 🙂
But it possible. What you need is circular buffer for 5-6 seconds. For example if your camera deliver 30 fps, then 200 frames will be enough (also check available memory on your PC). The easiest way is array of images.
Parallel with motion detection write image to this buffer (first, second, and so on up to 199, then first again). When motion detected, just check which last image was written to the buffer and extract all necessary previous images. Some programming work is required (especially for parallel acquisition during writing avi). Theoretically you can try to use internal buffer of IMAQdx (in the example above you have created 10 images), but here I'm not sure
In additional take a note, that in your motion detector the only pairs are compared. Image 1 with Image 2 then Image 3 with Image 4, and so on and you have half fps rate.
Andrey.
01-29-2010 08:15 AM
yes, i want register the avi file when the camera detect motion but i must register in the avi file from 5 second before start the motion (with use the frame in the buffer i think) to end of motion detection!
01-29-2010 10:05 AM
01-29-2010 10:28 AM
victoria00 wrote:
mmmm how to create an imege array buffer for this??
Something like that:
Andrey.
01-29-2010 10:36 AM
01-30-2010 06:30 AM
02-01-2010 04:19 AM
victoria00 wrote:
well... i have create the array of images... but how to copy the image acquired into the array??
I suppose that is what andrey has explained. Just replace the imaq create with the output of your grab/acquire.
02-01-2010 04:57 AM
Hi Victoria,
as Andrey suggested, you could use a couple of parallel loops in a producer/consumer structure: you can find an example here.
In the producer loop you can acquire the images and send them to the buffer in the producer loop using the structure described in the example.
Serena