LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

merge overlay save grayscale AVI

I am looking for a method to embed textual information into the frames of a image acquisition and save the images to file for playback and analysis.   Using image overlay works to overlay the text and display the frames on the screen. To have this information visible during playback it seems one needs to merge the overlays before saving each frame to the disk.  Is there no way around this because the merge operation seems to be computationally expensive, and takes too long so that the image acquisition slows down to about 1fps from 100fps.

 

Attached is the main code I'm working on for the image capture.

0 Kudos
Message 1 of 5
(2,970 Views)

AzimJ,

   There are a couple of options on this but first of all what hardware are you using?

 

The two options are as follows: 1. You can buffer the video then merge with the overlays 2. If the video is too long to buffer, you can save all of it, then process it after acquisition is done.

 

Do these options make sense?

 

Regards from Texas,

Ben J.
National Instruments
Applications Engineer
Message 2 of 5
(2,944 Views)

Ben J,

 

Thanks for your reply.  Your two options do make sense to me theoretically.  I suppose option 2 is the straight forward way since the write to AVI can save the overlay data as frame data.  As for buffering the video, I am not exactly sure how to go about that since I thought that was what I was doing with the queue in the producer-consumer loops.  Is there any documentation I should read to enlighten me.

 

Azim

0 Kudos
Message 3 of 5
(2,941 Views)

Azim,

   Here is some information on buffering:

NI-IMAQ Memory Allocation

http://digital.ni.com/public.nsf/allkb/12058725173C3F048625680B004DAC7C

 

What Does IMAQ Create VI Do, and Why is it Important?

http://digital.ni.com/public.nsf/allkb/DB2A2FBE5342B9B0862572D40077D457

 

My recommendation though would be post processing after saving. The reason for this is that the processing of the images is slower than the production of the images and eventually memory will fill up. For management's sake it is more scalable to save and then process.

 

Regards from Austin,

Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 5
(2,928 Views)

Ben,

 

Thanks for the references.  I think you are right in post processing.  In the meantime, I am incorporating counters and timers so that frames can be easily corrillated with data collected from the DAQ card.

 

Azim

0 Kudos
Message 5 of 5
(2,916 Views)