LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Faster way to averaging images (imaqdx)

Solved!
Go to solution

Hi,

 

I am looking for a quicker way to average images. I take each pixel and add its intensity value, then divide it by the number of images at the end and convert it back to an image.

It currently takes 3s to average 10 images which is not ideal for real time.

Is there a better way of implementing this?

 

Yours sincerely

Adnan Sharief

Download All
0 Kudos
Message 1 of 5
(3,271 Views)

Hi Adnan,

 

How large are these images? If processing speed is an issue, have you tried compressing them? Depending on the image size, three seconds doesn't seem like an unreasonable amount of time (consider the size of the array being passed around that loop). Aside from that, I don't know that there's a more streamlined way to accomplish what you're trying to do.

Andy H.
National Instruments
0 Kudos
Message 2 of 5
(3,236 Views)

Hi MegaHertz,

 

With the current camera im using the images are 1288 x 964 pixels. The reason 3 seconds is too long is because I am using the camera to take pictures of a chemical reaction and a lot of things can happen in three seconds, would you know of any way at all to reduce this time?

 

Thank you,

Adnan

0 Kudos
Message 3 of 5
(3,230 Views)

Add some more timing points, i dont think it's the math that takes the most part, but would guess at IMAQ.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 5
(3,226 Views)
Solution
Accepted by topic author adnan.s

Hi Yamaeda,

 

Thanks for the suggestion, it was the IMAQ vis that were causing it to run slowly. I figured out that the high level IMAQdx "Snap" takes around 350ms to execute, whereas the low level "Get Image" vi only takes about 30ms, I managed to implement this just fine and i have attached the solution. It now only takes around 300ms to average 10 images 😄

 

Thanks again for all the help,

Adnan Sharief 

0 Kudos
Message 5 of 5
(3,220 Views)