Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Pre rec on acquisition

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.

Well, when i create a motion detection algorithm similar to this:



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??

Thanks! Smiley Happy
0 Kudos
Message 1 of 10
(4,312 Views)

 


it's possible, when the camera detect the motion, register on file avi about 5 or 6 seconds before the motion started

 

 

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..

0 Kudos
Message 2 of 10
(4,308 Views)

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.

 

0 Kudos
Message 3 of 10
(4,300 Views)

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!

0 Kudos
Message 4 of 10
(4,300 Views)
mmmm how to create an imege array buffer for this??
0 Kudos
Message 5 of 10
(4,284 Views)

victoria00 wrote:
mmmm how to create an imege array buffer for this??

 

Something like that:

 

array.png

 

Andrey.

0 Kudos
Message 6 of 10
(4,282 Views)
Thanks a lot, tomorrow i will try this solution!! 🙂
0 Kudos
Message 7 of 10
(4,281 Views)
well... i have create the array of images... but how to copy the image acquired into the array??
0 Kudos
Message 8 of 10
(4,254 Views)

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.

0 Kudos
Message 9 of 10
(4,230 Views)

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

0 Kudos
Message 10 of 10
(4,223 Views)