LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling sub vi & using image overlay

Solved!
Go to solution

   Hi,

 

     I'm trying to make a simple VI for an NTSC video camera using NI Vision & the PCI-1411 framegrabber.

I have successfully been able to display live video with the attached VI.

 

     Two questions :

 

*  my field camera VI calls another VI, running precise timestamp. As a stand-alone VI it works, but when I call it, the timstamp indicator of my front panel never updates. Observing Highlight Execution, it looks like the sub VI is in progress (a green arrow) but the value is never actually output. Why ?

 

*  In the main VI, I created a simple overlay, "hi". When I run in live video, this overlay is seen as an occassional flicker. When live video is OFF, the overlay is indeed present. Am I seeing the inability of the code to keep up writing  "hi" as the video is being displayed ? If so, is there a better way to introduce this overlay so it will be continously visible when in live video ?

 

  Any help would be greatly appreciated !

 

ak

Download All
0 Kudos
Message 1 of 6
(2,835 Views)

- Well, the first problem is because of the fact that the subVI that you are running needs to run in it's own while loop (thread). Remember, LabVIEW is dataflow programming, so once a node finishes execution, it will be done. The while loop runs continuously, so the image acquisition keeps going.

- I really don't know why the second problem occurs.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 6
(2,827 Views)

   Yes, thanks ! The subVI issue is resolved (I simply changed this subVI to execute only once & then called it inside the mainVI while loop). I'm now using the timestamp from this subVI as the text for image overlay.

 

   The 2nd issue still remains  - even though the timestamp indicator on the front panel does update real time, I do not see this on the live video. In highlighted execution mode, I do see the overlay update with the video, so it seems to work fine a t lower video speeds.

<><>    It seems that the IMAQ Overlay Text VI doesn't have time to overlay as the highspeed video is being acquired.

How can I fix this ?

 

See attached updated VIs. 

 

 

ak 

Download All
0 Kudos
Message 3 of 6
(2,801 Views)

How about simply using a string indicator that is positioned over the IMAQ image?

 

Tips:

  • If you use error in/error out clusters for your timestamp VI then you don't need to use the sequence frame.
  • Your local variable for the "live video" Boolean is not necessary. Read the control directly there, and use a wire branch to control the loop terminal condition.
  • I would suggest using a checkbox Boolean control rather than a toggle switch and 2 string indicators (which you don't need anyway as you can use free labels on a front panel).
0 Kudos
Message 4 of 6
(2,797 Views)

  Thanks for the tips - I don't program often enough to get good...

 

The problem with the string indicator is I would like to save the video with the overlay as an AVI.

 

Attached is a better program doing the same things - viewing or recording. Still can't observe the overlay real time nor does the saved AVI video contain the overlay.

 

 

ak 

Download All
0 Kudos
Message 5 of 6
(2,783 Views)
Solution
Accepted by topic author cig438

  I figured out how to make the overlay both continously viewable in a video stream & recordable in an AVI.

I needed to use Merge Overlay immediately after Overlay Text. Now it works fine !

 

 

ak 

0 Kudos
Message 6 of 6
(2,776 Views)