06-15-2010 08:22 AM
Hello all,
I am trying to average 25 images per sec to display averaged image in an image control for improving measurements in my interferometer set up. I have attched the vi in LabVIEW 8.2 version.
I know that i can extract specified images once they are configured before start fo the acquisition using IMAQdx get image. The IMAQ compare vi can be used to average two images. But in case when i want to average say 10-50 images per sec, looks like i can create array of images first and then add all of them and devide with total image number.
The problem in my code is i am trying to average (processed) subtracted images. Just stuck up with implimenting the process. By the way The camera frame rate is 25fps. So i want to display an averaged image to avoid errors or fluctuations in intensity.
Regards
Viswanath
06-25-2010 04:01 AM
Hi Viswanath,
There is an example in the LabVIEW Example finder to do exactly this. Go to Help > Find Examples and search for "Average" There should be an example file there called "Image Averaging Example"
I hope this solves your problem.
Kind regards,
06-25-2010 07:25 AM
Hi, Viswanath,
The "image averaging example" shows the basics of image averaging - you should just add all images and divide to number of the images. For preserving 25 FPS you will need "ring buffer" where you can hold your images and accumulator. Let's say - you need 25 images to average. So, the first 25 frames will fill the buffer, and every incoming image will be added to accumulator. Now you have image #26. You need to subtract oldest image from accumulator, then replace this image in ring buffer, then add newest image to accumulator and divide it to 25 - its your averaged image. Do it for each incoming frame. With this algorithm you need one subtraction operation, one addition and one division (plus conversion and copy) per each frame. This can be done with 25 FPS. If your image is 8 bit image, then you can avoid division operation if your accumulator will be 16 bit.
Andrey.