MFlenses — новая жизнь в цифровую эпоху
MFLenses 2026

Форум объективов с ручной фокусировкой

Исследуйте мир старых объективов через заметки о ремонте, реальные тестовые снимки и подробные архивные темы с множеством изображений.

Исследуйте мир старых объективов через заметки о ремонте, реальные тестовые снимки и подробные архивные темы с множеством изображений.
В центре внимания

Место для партнёра на главной странице форума.

Measuring & Quantifying Contrast?
Предыдущая тема :: Следующая тема  


Reply

Something I've been wondering about, since we are all so keen on comparing contrast of different lenses...

Say you have two images of the same scene, one of which for whatever reason has "higher contrast". Perhaps one was with a lens hood and one was not.. or perhaps they are from two different lenses... or even the same lens in a controlled studio environment before & after cleaning. Either way, assume that the exposures and all other variables are otherwise identical.

I know that a person can look at the images and subjectively say "Image 'B' has more contrast"... or even look at the histograms and find the wider distribution and objectively make the same statement.

But can this difference be quantified? Question


How is it measured? EV? Stops? Some other unit? A ratio? Can you take two images, and algorithmically determine that " 'Image B' has 22.8749% more contrast than 'Image A' ", or express the difference in units?


Going one step further, is it possible to make separate measurements (and separate comparisons) of local contrast vs. global contrast, and express the results in meaningful "scientific" quantities?

Question


Reply

Densitometry?

http://en.wikipedia.org/wiki/Densitometry

Not sure how you measure it on digital files though...


Reply

Assuming the histogram is entirely within camera sensor range, I "see" less contrasty lens does not produce as black blacks as a lens with higher contrast, sometimes (always?) due to "light pollution" of internal lens reflections -- more contrast means blacker blacks. (all this imho of course!)


Reply

siriusdogstar писал(а):
Assuming the histogram is entirely within camera sensor range, I "see" less contrasty lens does not produce as black blacks as a lens with higher contrast, sometimes (always?) due to "light pollution" of internal lens reflections -- more contrast means blacker blacks. (all this imho of course!)


How white whites are also matters.

In other words, darker the shadows and lighter the highlights are, more contrast has the picture.


Reply

ludoo писал(а):
Densitometry?
http://en.wikipedia.org/wiki/Densitometry
Not sure how you measure it on digital files though...

Good thought. You can certainly do all kinds of "measurements" very easily on digital images, as you know the RGB values for each pixel, and you know the maximum representable ranges based on the file formats. The thing that gets me caught is that contrast seems to be a characteristic of the measurements, and not a measurement itself... and at that point, I have no idea how you express it!


vulko писал(а):
siriusdogstar писал(а):
Assuming the histogram is entirely within camera sensor range, I "see" less contrasty lens does not produce as black blacks as a lens with higher contrast, sometimes (always?) due to "light pollution" of internal lens reflections -- more contrast means blacker blacks. (all this imho of course!)


How white whites are also matters.
In other words, darker the shadows and lighter the highlights are, more contrast has the picture.

I agree completely with both of you. The only slight catch I can think of is that sometimes the subjectively more contrasty image can have darker whites than the less contrasty image... because just like internal reflections can illuminate dark areas, they can also add light to already light areas.

So I think contrast has more to do with the shape of the distribution of the results of many samples, and not as much to do with the absolute extremes. I could probably write out a formula that gives a progressive weighting to sample pairs in a histogram, with higher values the further apart the samples are, and sums everything up and normalizes the value against the limits of the file type's data storage... but is that all there is to it, and if so, why hasn't anyone done it? Question

Expressing local contrast would seem to be a much harder problem... or perhaps an easier problem with an order of magnitude more calculations? Question


Reply

Well, when I asked for 'proof' digital sensors capture more dynamic range than film I was shown:

http://www.clarkvision.com/imagedetail/dynamicrange2/

which leads to:

http://www.astropix.com/PFA/SAMPLE1/SAMPLE1.HTM

and

http://www.astropix.com/PFA/SAMPLE3/SAMPLE3.HTM

(also look at other sample chapters such as http://www.astropix.com/PFA/SAMPLE4B/SAMPLE4B.HTM )

(I'm almost convinced Smile)


Reply

Shall we define the term"contrast" first? Different people may have different understanding of the term.

Understanding Lens Contrast And the Basics of MTF
http://www.luminous-landscape.com/tutorials/understanding-series/lens-contrast.shtml


Reply

It is also VERY important to separate the two phenomena of "contrast" and "contrast transfer function". They are not the same thing, and very few ever understand what an MTF-chart really means for this very reason. How we "experience" lens contrast transfer is very dependent on the main contrast frequencies of the scene we're trying to depict. But more of this later some time...

a "Contrast" as most people think of it is very easy to understand and measure quantitatively: It's just the Ev difference between two measured levels of light energy.
But the true definition of an optical/energy "Contrast" equals:

(High energy level - Low energy level)
------------------------------------------------ = Contrast
(High energy level + Low energy level)

this gives that 0.999 is a VERY high contrast, and 0.1 is a very low contrast.

a "Contrast Transfer Function" isn't that simple... To get that right you divide the output contrast with the input contrast, getting a percentage or quotient answer. Slightly shortened that looks like this:

(I1 + I2) * (O1 - O2)
-------------------------- = Contrast Transfer Function
(I1 - I2) * (O1 + O2)

-And this is the basis of the "Y" axis of an MTF graph.


If a lens has "less contrast" than another lens (assuming that the captures are processed with EXACTLY the same parameters), this can mean one of many things! It can mean that:
*The overall global contrast is low (global flare, or low figures at the 5-10lp/mm mark)
*The scene contains lots of high frequency, high contrast material at an lp/mm point where the lens is weaker in contrast transfer than the other.

Which it is, and which of those two is most usually impacting your scene depends on the scene and the amount of fine detail with high contrast it contains. Global flare is a great equalizer, lowering contrast at all frequencies - this (as long as it isn't too bad) is recoverable with a simple "levels" or "exposure/blackpoint" correction in post. A lens can have low global contrast and very high resolution capabilities....
A lens with better global contrast, and exactly the same resolution capability might be experienced as being "less sharp" - even though it isn't...! Why is this? Give it some thought! -As you don't "give" the lens any overall/glovbal contrast boost by levels or BP/exposure corrections, medium/high frequency contrast stays at a lower level than the global contrast - you think the lens is "less sharp, but more contrasty".

Low contrast lenses contaminate the darker regions with random light = random noise. At some point this effect gets overwhelming, and then you loose DR (shadow detail gets overwhelmed by contamination noise). When you loose enough DR, your impression of sharpness also lessens, as there are fewer regions for the lens to be "sharp" in...

The equations above apply to sinsusoidal patterns, most often used with log/sin testcharts, the charts with increasing frequency b/w sinewaves. A very much easier/quicker way to get an overview of the lens capabilities is to use FFT transforms of sharp edge transitions - this enables you to get the same amount of data from a simple straight edge as you would need an entire log/sin chart to do otherwise. This means that you can sample many points (many edges) in the lens' field simultaneously... ImaTest and my own software uses this method.

To put it short: The word "contrast" is very complex. A lens' contrast transfer varies with detail frequency, and our visual experience of the projection of a lens, a picture, depends very much on how different frequencies relate to eachother in "transfered contrast". This relation is ALSO complex, as it does not always correlate to measured numbers... Mostly due to our own differing PP techniques, but also from psychovisual impact differences.

And judging a normal picture, with exposure curves and colour profiles applied (don't EVER think that what you see in the jpg is "camera colour"...) is almost an impossible task, unless you have a quite large experience of doing just that. To name just ONE example, a normal exposure curve compresses the lowermost three Ev's of scene/input information into ONE Ev in the output/picture. How do you judge the contrast transfer here?