Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Overlays blinking

I have an application with lots of stuff going on. I have a couple images being acquired through an analog in board. I want to put several overlays on the image. When the user pushes one button he gets two lines in cross hairs that were calculated earlier in the program. When he pushes another button he gets a circle. two more buttons allow calculates the centroid, then overlays two more lines in a new cross hairs, and a newly calculated circle. So A common operation might have two lines and a circle overlayed. The circle is overlayed as points. It seems like no matter what I try the overlays bling off periodically. I put a pause in the loop to allow some dwell time after the overlays are put in. What am I doing wrong, what is the trick to getting several overlays, without the annoying blinking?

 

 

0 Kudos
Message 1 of 3
(3,371 Views)

I assume you are doing the following:

Acquire image

add overlays

display image

loop

 

The problem is the image display tends to display the current version of the image, even if it has changed since you sent it to the display.  Acquiring a new image clears all the overlays, so sometimes if the display is updated a little while after the image is sent to it, it will display the newly acquired image without any overlays. 

 

The solution is to turn on snapshot in the display.  Right click on the display window and check "Snapshot".  This will make a copy of the image whenever you send it to the display, and display the copy.  This way you can make further changes to the image (like acquiring a new image) without messing up the display.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 3
(3,368 Views)

Thanks Bruce,

 

Turns out I am not doing exactly that. I am acquiring in one loop and doing overlays in a seperate loop. This is because I am doing some calculations that are time critical, I put those in the acquisition loop, and other stuff i put in the overlay loop (simultaneous while loops) . So what I did is created a second image variable. 

 

So now I use 'overlay image' to;

1) calculate stuff,

2) overlay stuff,

3)then I added a slight pause so that the current overlay stays on the screen for a moment ,

4)then I use 'copy image' to put the 'acquisition image' onto the 'overlay image' .

 

Meanwhile the acquisition loops runs at its own speed. 

 

I will look into your suggestion because it seems like I may be able to eliminate the timed pause, allowing my overlay loop to run that much faster, thanks. 

0 Kudos
Message 3 of 3
(3,347 Views)