Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image flickers when loaded into ImageViewer

Hi,

How do you reduce/eliminate flicker when loading images into CWIMAQViewer? I am loading images (~500) into CWIMAQViewer sequentially and performing some particle analysis on each of the images. I have noliced too much flicker as I am loading the images. How do I reduce the flicker?

 

Thanks,

Ekramul

0 Kudos
Message 1 of 6
(4,127 Views)

Hi Ekramul:

 

First off, what exactly do you mean by flicker?  Are you talking about the viewer temporarily going blank as the new image is loaded?  This may or may not be expected behavior but some more information would be helpful. 

 

What are you programming in, is this LabVIEW, a .NET language, or what?  How fast are you loading the images, as fast as possible?  Also, what size of images are you loading?  Are these images a couple thousand pixels square?

 

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,106 Views)

Hi Alex, 

 

Let me answer one by one:

 

1. I am using .Net c#

2. I would like to load as fast as I can,but, currently I have a 30ms delay between each load.

3. Images are 640x480 (interlaced)

 

The each image I do the following:

1. Load image 

2. Apply threshold

3. Resample the images with the populated field (even or odd) and discard the emply field

4. Do particle analysis to find particles in ROI

5. Save the report

6. Load the next image and continue

 

When the new image is loaded, I can see the transition as a flicker. You may say the viewer is going blank momentarily as new images are loaded. I would like to to see a smooth transition is possible.

 

Hope this clears the problem.

 

Thanks in advance.

 

Ekramul  

 

 

 

0 Kudos
Message 3 of 6
(4,100 Views)

I am guessing you are using the same image for analysis and display.  When you load a new image, this image is grayscale.  Occasionally the screen will get updated with this image (automatic process you can't get around).  After analysis, you display the binary image.  The flicker is the grayscale image occasionally being displayed.

 

The solution to this problem is to create a second display image.  Copy the analysis results image to the display image right before you display the display image.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 6
(4,090 Views)

Another option is to put the display control into "Snapshot" mode. In this mode the display is synchronously updated at the moment the dataflow passes the image to the control. Of course this will cause the image data to be copied into the control at that point, possibly slowing down your loop rate.

 

Eric

0 Kudos
Message 5 of 6
(4,082 Views)

Hi alex,

another approach is to:

  • load the image into CWIMAQViewer1
  • copy the image into new CWIMAQimage object
  • perform the required processing
  • display the result on CWIMAQViewer2

If you are not inetested in displaying the original raw image, you may read the image into an CWIMAQimage object, perform the analysis and display the result on CWIMAQViewer1
Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 6 of 6
(4,066 Views)