Monday, March 5, 2012

Some crude image averaging

In “Dealing with noise in an image” I speculated that image averaging would be a simple way to reduce the effect of random noise. Well some time opened up in my schedule, so I gave it a go.

First, I decided that rather than use (image 1 + image 2)/2 I would have to use (image 1)/2 + (image 2)/2. The reason for this is that I wasn’t sure how my processor/software would handle adding two bright pixels together. Seventy-five plus seventy-seven would work, but what when I got to 200 plus 204?

Next, I grabbed a set of “identical” images like that shown below. I’m placing “identical” in parentheses because close examination shows that while the object, exposure and lens settings remain unchanged, the actual pixel values vary slightly frame-to-frame.

Then I added a simple line profile tool (the red line in the picture.) Over four images the grayscale range (lowest to highest) varied from 168 to 178. In other words, along this short line the gray values changed by 10 over four images.

Next, I used (image 1)/2 + (image n)/2 to produce an average image and applied the same edge tool. Over the three resulting images, (I ignored image 1 added to itself,) the grayscale range varied from 171 to 176. In other words, I had halved the effect of noise in the image.

Well that’s my interpretation. Would anyone care to throw in their two cents?



Anonymous said...

Can you share all the images

Anonymous said...

Why not just use a library that can handle pixel values beyond 255?

All problems solved.