# Dynamic Range and Image Contrast

Please explain the terms: dynamic range, and image contrast, and the difference between these two.

Also, how can these two be understood by seeing an image by naked eye for the sake of understanding.

Based on the initial comments on this post, I am trying to add a few lines from the textbook which probably will provide the necessary context behind this question.

Sometimes, the range of values spanned by the gray scale is referred to as the dynamic range, a term used in different ways in different fields. Here, we define the dynamic range of an imaging system to be the ratio of the maximum measurable intensity to the minimum detectable intensity level in the system. As a rule, the upper limit is determined by saturation and the lower limit by noise, although noise can be present also in lighter intensities.

The dynamic range establishes the lowest and highest intensity levels that a system can represent and, consequently, that an image can have. Closely associated with this concept is image contrast, which we define as the difference in intensity between the highest and lowest intensity levels in an image.

For the context, I have been following the textbook Digital Image Processing, 4th Edition, Gonzalez and Woods, pp. 69.

• This question is really something that asks us to write yet another book on digital image processing. This is too broad, and it feels like you're trying to make us do your learning homework, which doesn't work, because you in the end will need to read the same amount of texts. Please ask a specific question! – Marcus Müller Oct 6 '19 at 9:43
• I don’t have the 4th edition but do have the 1st edition (where did Winz go?) someplace not handy, but i do recall the text covered human vision. film, and CCD, the concepts you ask to explain like dynamic range depends a lot on the context. your question is overly broad – user28715 Oct 6 '19 at 15:32

I would say, in general, that Dynamic Range is a property of the measuring device while contrast is a property of the signal measures assuming it is withing the Dynamic Range of the measuring device.

Let's have an example.
Imagine our dynamic range is measures as 8 bits system (We can derive that from having a sensor with ~48 [dB] DR).
So we have values in the range $$[0, 255]$$.

Let's assume we measured 2 different scenes, one spans values in the range $$[4, 232]$$ while the other in the range $$[120, 130]$$.

So we have a sensor with Dynamic Range of 48 [dB] and the 1st image has high contrast (Big ratio between the high value and the low) while the 2nd image has low contrast.

For instance, the following code in MATLAB:

mA = repmat(linspace(4, 232, 200) / 255, [200, 1]);
mB = repmat(linspace(120, 130, 200) / 255, [200, 1]);

subplot(1, 2, 1); imshow(mA); title('High Contrast'); subplot(1, 2, 2); imshow(mB); title('Low Contrast');


Yielded this result:

the upper limit is determined by saturation and the lower limit by noise"

One nice abstraction to Pixel in CCD / CMOS is a bucket.
The light is like rain and the output value - Amount of rain in the bucket.
So when the bucket is full, saturated, we define it as white. Let's say the bucket can hold 256 drops. So if the bucket is full it means at least 256 drops fell into it )Some might spill over).
The minimum number of Drops which we can measure is 1 drop. So we have 256 / 1 DR -> 8 Bit of DR.

When an appreciable number of pixels in an image have a high dynamic range, we can expect the image to have high contrast. Conversely, an image with low dynamic range typically has a dull, washed-out gray look

Just as can be seen in the figure from MATLAB, when we have saturates buckets, which are white ans we have almost dry buckets (Black) we have high contrast.
Yet if all buckets are filled with similar amount of rain the image indeed looks dull as can be seen.

• Thanks @Royi. I understood the concept of dynamic range and contrast. As per the text in my original question, what exactly is the meaning of this: "the upper limit is determined by saturation and the lower limit by noise"? – flamingo_stark Oct 8 '19 at 10:38
• Also, in the textbook it is written, "When an appreciable number of pixels in an image have a high dynamic range, we can expect the image to have high contrast. Conversely, an image with low dynamic range typically has a dull, washed-out gray look". Please explain this. – flamingo_stark Oct 8 '19 at 10:41
• I updated the answer. I think now you have full answer on all you asked. – Royi Oct 8 '19 at 13:40
• I +1 you now. So you should have. – Royi Oct 8 '19 at 17:56