From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real-time image average

Hi All,

I’m trying to realize some real-time image averaging using LabVIEW VDM. The idea is to take a background image (by averaging X images) and then for real-time image averaging we create an array with fixed length for Y last images in order to calculate the sum of those images in a cycle and then divide all this by Y.

I tried to create a VI for this but it doesn't work properly.

Do you have an idea why or how is it possible to realize this algorithm correctly?    

 

Thank you in advance for your help!

 

My example is in the attachment.

 

Gor       

0 Kudos
Message 1 of 2
(2,087 Views)

Images are very different than typical labview wires, they are essentially pointers to memory spaces If you want to do a average of the last Y images, You should preallocate Y image spaces, to store these values and keep track of the index you wish to average.  You can always convert to arrays and treat them like typical labview arrays but this comes at a big performance penalty. 

 

I would implement the images with a circular buffer approach for keeping track of next image to copy to.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 2
(2,079 Views)