Вопрос

My objective is to enhance 8 bit images to 16 bit ones. In other words, I want to increase the dynamic range of an 8 bit image. And to do that, I can sequentially take multiple images of 8 bit with fixed scene and fixed camera. To simplify the issue, let's assume they are grayscale images

Intuitively, I think I can achieve the goal by

  1. Multiplying two 8 bit images

    resimage = double(img1) .* double(img2)

  2. Averaging specified number of 8 bit images

    resImage = mean(images,3)

assuming images(:,:,i) contains ith 8 bit image.

After that, I can make the resulting image to 16 bit one.

resImage = uint16(resImage)

But before testing these methods, I wonder there is another way to do this - except for buying 16 bit camera, or literature for this subject might be better.

UPDATE: As comments below display, I got great information on drawbacks of simple averaging above and on image stacks for the enhancement. So it may be a good topic to study after all. Thank all for your great comments.

Это было полезно?

Решение

This question appears to relate to increasing the Dynamic Range of an image by integrating information from multiple 8 bit exposures into a 16 bit image. This is related to the practice of capturing and combining "image stacks" in astronomical imaging among other fields. An explanation of this practice and how it can both reduce image noise, and enhance dynamic range is available here:

http://keithwiley.com/astroPhotography/imageStacking.shtml

The idea is that successive captures of the same scene are subject to image noise, and this noise leads to stochastic variation of the pixel values captured. In the simplest case these variations can be leveraged by summing and dividing i.e. mean averaging the stack to improve its dynamic range but the practicality would depend very much on the noise characteristics of the camera.

Другие советы

You want to sum many images together, assuming there is no jitter and the camera is steady. Accumulate a large sum and then divide by some amount.

Note that to get a reasonable 16-bit image from an 8 bit source, you'd need to take hundreds of images to get any kind of reasonable result. Note that jitter will distort edge information and there is some inherent noise level of the camera that might mean you are essentially 'grinding metal'. In a practical sense, you might get 2 or 3 more bits of data from image summing, but not 8 more. To get 3 bits more would require at least 64 images (6 bits) to sum. Then divide by 8 (3 bits), as the lower bits are garbage.

Rule of thumb is to get a new bit of data, you need the squared(bits) of images, so 3 bits (8) means 64 images, 4 bits would be 256 images, etc.

Here's a link that talks about sampling:

http://electronicdesign.com/analog/understand-tradeoffs-increasing-resolution-averaging

"In fact, it can be shown that the improvement is proportional to the square root of the number of samples in the average."

Note that SNR is a log scale so equating it to bits is reasonable.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top