01-17-2011 09:52 PM
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
Solved! Go to Solution.
01-18-2011 01:39 PM
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.
01-18-2011 02:51 PM
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
01-18-2011 02:58 PM
Add some more timing points, i dont think it's the math that takes the most part, but would guess at IMAQ.
/Y
01-18-2011 03:36 PM
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