Improving on the resolution of the CheeseCam

On the left, is a piece of a cheesecam image that has been magnified (by pixel replication) by a factor of four. On the right, is the same piece that has undergone some significant processing to improve the resolution.

The process is not a simple smoothing or sharpening or any sort of convolution. What I have done is taken 20 pictures of the same thing and averaged them. Due to the inherent noise in the system (and the world), none of the 20 pictures are identical. By using the differences between the 20 pictures, you can learn about pixels in between the usual pixels as well as values that contain more than the usual number of bits.

Each image is scaled and smoothed (this is intended to simulate interpolation of the new pixels), then averaged. To average, I multiply each image by 1/N and add them together. Unfortunately, multiplying by 1/N causes loss of accuracy in 8 bits so I first extended the pixels to 16 bits.

To do this I used the following script:

ppmmake 0,0,0 320 320 | pnmdepth 65535 > in.ppm ppmmake 0.05,0.05,0.05 320 320 | pnmdepth 65535 > /tmp/fract.ppm for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 do echo doing image $i djpeg ch$i.jpg | pnmdepth 65535 | pnmscale 4 | pnmsmooth2 | pnmsmooth2 | pnmarith -multiply - /tmp/fract.ppm | pnmarith -add - in.ppm > out.ppm mv out.ppm in.ppm ls -l in.ppm done rm /tmp/fract.ppm

The results are not as impressive as I had hoped for. One would think that taking 20 pictures would allow a significant improvement but I think the actual resolution increase is something less than a factor of 2.

I chose this image to play with because I could not read the words in the second and third line. I thought it was a reasonable goal to be able to read them but I am still unable to read the third line. The second line turned out to be pretty obvious once I started looking at it closer.

But still, I have tried to accomplish the same thing by using various despeckle, smoothing, and sharpening operations. I still believe that the methods I have used here are far superior to anything those single image operations can do.

Improving the resolution of an Axis 205 webcam

Here's another attempt. My brother, John, had a webcam in his front window for a day and I decided to try this processing again. You can look at an original image or an averaged image. This is the result of 32 images that were scaled by four, smoothed and averaged together. I shrunk it back down for the above images, and it kind of looks like the smoothing process may have been more than necessary, since the shrunk image actually appears blurry to me. Also, since the shadows move and the trees wave, those are understandably blurred.

Here's a comparison of a tiny chunk from the trash barrell in each image.
OriginalAveraged
Here's an even smaller chunk showing the wheels from the trash barrell.
OriginalAveraged


Paul Chamberlain