08-08-2009 07:32 PM
Hello,
I am streaming data from a Firewire camera to an ImageViewer using this NI example:
C:\Documents and Settings\All Users\Documents\National Instruments\NI-IMAQdx\Examples\dotNET\Grab
For the life of me, I can't figure out how to draw a line on the live video feed and have it persist.
I know I can draw a line on the default overlay because when I click a button, the buttonhandler draws a line to the imageViewer1.Image.Overlays.Default object and I can see it flash on the screen and then disappear. I'm assuming the next image in the imagestream is somehow overwriting the overlay.
I tried copying the default overlay like so, but it didn't work:
// Grab the next image
uint bufNum;
Overlay curOverlay = imageViewer1.Image.Overlays.Default;
MainSession.Grab(imageViewer1.Image, true, out bufNum);
curOverlay.CopyTo(imageViewer1.Image);
Can anyone point me in the right direction?
Thanks,
Neville
08-09-2009 02:04 PM
Overlays work on a per image basis. Instead, you should use an ROI, which is linked to the display window.
There is probably some command that will set the ROI for the display window.
Bruce
08-22-2009 12:39 PM
Hello Bruce,
Thanks for the tip. I've got the line displaying on live video via an ROI.
How do I draw text on live video? Do I use an ROI somehow or an overlay?
Thanks,
Neville