LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overlay on video acquisition USB vs 1394 vs Cameralink

I have developed an application that draws an overlay onto video coming from a USB camera.  The software development assumes that the overlay is persistent over multiple acquired images until IMAQ Clear Overlay is called.  The documentation for NI Vision is unclear as to whether an overlay should be persistent; and I had assumed that for live video; i only had to draw the overlay one-time; rather than redraw it every frame.  Since then i have upgraded to a cameralink camera/framegrabber and it appears that overlays on live video require drawing the overlay everyframe.  This seems like quite a nuisance and a waste of processor time.  Does anyone know if it's possible to hack the acquire.vi so that the overlay is preserved when a new image is acquired?  or if the overlay is supposed to be preserved or not?

thanks,
-j
0 Kudos
Message 1 of 7
(3,654 Views)
Good afternoon Twelvepbrs,
 
The overlay is not designed to be persistent in NI Vision.  I am currently looking into some possible workarounds and something else that maybe we can try.  Just out of curiousity, are you creating a new memory space (buffer) for each frame of the video that you are bringing in, are you using the same memory space each frame?
 
I thank you in advance for your patience, and I'll post back as soon as I can figure something out!
 
Respectfully,
0 Kudos
Message 2 of 7
(3,641 Views)
Jeffrey,
My current workaround involves using two buffers.  After acquisition is performed using the first buffer, "IMAQ Copy Overlay" copies the preserved overlay from the second buffer into the first buffer.  I assume this is at least a little faster than having to redraw the overlay every frame.
0 Kudos
Message 3 of 7
(3,640 Views)
Hello Twelvepbrs,
 
I spoke with my R&D guys, and here's the deal.  The method that you are using to to handle video overlays is the best method available, at this time.  Upon each grab, it clears the overlays and then writes the image to the buffer. 
 
I apologize for any inconvenience that this may cause you! 
 
Respectfully,
0 Kudos
Message 4 of 7
(3,626 Views)
Any word on whether native video overlay will happen any time soon? Also, any example code you'd be able to provide for those trying to do the same thing? This code is what I've come up with but it seems to me from the previous post like there's only one instance of 'copy overlay'...let me know if this looks right.

Message Edited by lanmat on 09-01-2006 06:51 PM

Download All
0 Kudos
Message 5 of 7
(3,565 Views)
Lanmat,

As of the newest version of Vision, which is 8.20, this functionality has not been incorporated!  From the images that you attached, everything looks great!
0 Kudos
Message 6 of 7
(3,524 Views)
For those also attempting to do video overlay, just a warning: if there already is an overlay in the destination image, copy overlay adds the overlay to whatever overlay is already thereand will linearly increase the amount of memory taken up by the image with each successive call. So be sure to use "clear .overlay" on the buffer image before copying the source overlay. That seems to work well.
0 Kudos
Message 7 of 7
(3,519 Views)