LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overlays disappear when sending video over TCP/IP after adding Overlay to video captured using NI-Vision

Solved!
Go to solution
Solution
Accepted by topic author constructionworker

@constructionworker wrote:


it partially works, the overlays remain visible, but I get an image that changes by itself (like non-fast flickering) between the portion scaled with the ''resample'' and the default video size.


Often forgotten that the IMAQ Images handled in LabVIEW by reference and not by value. As result you can easily get kind of race conditions when displaying occurred in parallel with image processing.

 

For example:

 

flickering-snippet.png

on the upper loop both displays referred to the same image and when the size gets changed from iteration to iteration, then they reflect these changes and flicker (more or less - it depends on your CPU/GPU).

The easiest way to avoid this is additional buffering - on the lower loop the screen buffer keep the same image from iteration to iteration and as result display will not flicker. You can get more control with "Refresh Image" method and "Snapshot" property of the IMAQ Display, but usually adding screen buffer for display is sufficient in most cases.

 

0 Kudos
Message 11 of 12
(330 Views)

 


@Andrey_Dmitriev wrote:

@constructionworker wrote:


it partially works, the overlays remain visible, but I get an image that changes by itself (like non-fast flickering) between the portion scaled with the ''resample'' and the default video size.


Often forgotten that the IMAQ Images handled in LabVIEW by reference and not by value. As result you can easily get kind of race conditions when displaying occurred in parallel with image processing.

 

For example:

 

flickering-snippet.png

on the upper loop both displays referred to the same image and when the size gets changed from iteration to iteration, then they reflect these changes and flicker (more or less - it depends on your CPU/GPU).

The easiest way to avoid this is additional buffering - on the lower loop the screen buffer keep the same image from iteration to iteration and as result display will not flicker. You can get more control with "Refresh Image" method and "Snapshot" property of the IMAQ Display, but usually adding screen buffer for display is sufficient in most cases.

 


Thank you for your help.

The idea of rebuffering the image wasn't bad. my problem is solved.

0 Kudos
Message 12 of 12
(322 Views)