#Help me fact check my analogy for dynamic vs contrast (image processing)

41 messages · Page 1 of 1 (latest)

subtle mantle
#

Hello!
I'm trying to memorize the difference between dynamic vs contrast and just want to make sure my mental model is correct. Digital images have different channels for color, depending on the imaging format these might be called differently, but overall I know them typically as chroma vs luminance information. Luminance being the grayscale values of an image, which our visual cortex perceives as brightness, while chroma are the different color channels. I know that sometimes you also have alpha, but let's assume no transparency channel for the moment.

Now the difference between dynamic and contrast of an image: The best analogy I can come up with is pixel art. For each channel, you're working with a limited palette of values (i.e. an 8 bit channel encodes 2^8 possible values for each pixel). If your image is not taking advantage of the whole color palette, i.e. it only uses a subset of all possible values, the dynamic of the image decreases. I.e. you chose to only use a 4 bit palette, even though you have values in the range of 2^8 available to encode information.

Contrast is somewhat similar, but instead describes the distribution of all possible values. If my image is perfectly lit, the entire range of my color palette should be present and there should be no gaps or massive spikes (for example from over- or under exposure). Idealle the histogram for an image with good contrast should be linear).

#

My analogy might be a little bad but I'll try to give examples:

#

The above is a parrot in 8 bit grayscale

#

The same parrot in 2 bit grayscale

fresh musk
#

By "dynamic", do you mean dynamic range?

subtle mantle
#

I think so, I'm translating this from my native language, but yes

#

compared to above, the below image has a much reduced dynamic range, since the color palette was reduced. but colors for the new palette were chosen in a uniform manner, so the contrast shouldn't have changed significantly

#

well in this example it might have, due to the massive reduction in color

#

this is an example from a textbook, where it shows reduced contrast. the left image also uses only a subset of the available palette, but as opposed to dynamic where color values are chosen in a uniform fashion from the originating palette, here the color values are very close to each other, causing reduced contrast on the elft

#

*left

#

does that make sense? in reality a histogram could obviously be a mix of the two

fresh musk
#

It seems that dynamic range and contrast are closely related

#

Or possibly the same thing

#

Wikipedia has a concise definition

The dynamic range of a display refers to range of luminosity the display can reproduce, from the black level to its peak brightness. The contrast of a display refers to the ratio between the luminance of the brightest white and the darkest black that a monitor can produce.

#

But that's for a display, not an image

subtle mantle
#

yes, but you can have a high contrast with a reduced dynamic range

#

the contrast in these images is rather high 😄 but their dynamic range is the lowest you can get, two values

fresh musk
#

Are you sure that dynamic range is necessarily related to gamut size (I'm not)? I know HDR monitor marketing tend to conflate these concepts

#

HDR monitors have a higher peak brightness and larger gamut (something larger than sRGB) in general

subtle mantle
#

but this is more about image processing, i.e measuring if an image is correctly exposed

fresh musk
#

@brittle aspen probably knows

subtle mantle
fresh musk
#

Gamut (or rather knowing what color space you're operating in) matters in image creation too

#

It matters a lot when you're outputting to the monitor and need to know certain things about it to create a better image

#

and it matters even more when you're outputting to HDR monitors with different gamuts and peak brightness

subtle mantle
#

for input, idk you'd probably calibrate your camera sensor against a known backdrop and once you've done that you have that one gamut to work off of

fresh musk
#

There are also some color space considerations within the renderer itself, but those are less clear to me (rendering in different color spaces brings new trade offs)

subtle mantle
#

some naive techniques include binarization or tone mapping, usually you're more interested in the relative degree of information loss as opposed to absolute/aesthetic loss

fresh musk
#

Yeah I'm not familiar with image analysis I'm afraid, so that's why I (tried to) call an expert frog_sweat

brittle aspen
# subtle mantle Hello! I'm trying to memorize the difference between dynamic vs contrast and jus...

Not sure about this.
Luma/chroma is just a different way to encode an image than RGB channels. As you say, "grayscale" luma & then two color offset channels (not actual colors but how far from grey they are). Broadly, you use luma/chroma because you can split the resolutions (4:2:0 encoding is eg 4K luma with 1080p for both chroma channels, so we can encode brightness per-pixel but color offsets only per 2x2 block).
A flat histogram is not an ideal - it's just an even distribution of whatever it shows (brightness levels if that's a histogram of the luma channel). The thing you look for from the histogram is if there is obvious clipping (peak at the ends, showing that a lot of values got bundled up together at the limit) or lack of contrast (doesn't use the entire range despite being an image that should have both very light & dark areas - not all images do: you don't want to artificially drag a night-time scene to contain whites if there were no light sources, it should be generally quite dark as the artistic intent).
Dynamic range is saying how much darker the bottom of the luma range is to the top. We talk in camera terms of stops (doublings) for the bracket between the darkest and lightest captured elements without them clipping. So if I want to capture a direct sun (millions of times brighter than the shadow) then obviously I need a huge range or to accept clipping.

brittle aspen
# subtle mantle the contrast in these images is rather high 😄 but their dynamic range is the lo...

This is not dynamic range. I'd say spread or dispersion (not sure of terminology in this area but that's some solid language for talking about data clumping) or even limited palette (as you used above) - we complain of posterization (when you break smooth gradients into bands) in video/photo editing & use a decontouring filter to reverse this (might be the language you're looking for, but not usually exactly used to note that black/white images lack grayscale/many-values).

brittle aspen
# subtle mantle yeah i think gamut in this analogy would be display specific, since in digital i...

Images are encoded to a gamut. They may not specify this (same as images often don't specify how bright their peak white value actually is) but it's core to correctly rendering the image on a range of displays or printing mediums to know what gamut it encodes (and quite a few image formats have at leas the option to include gamut info).
When I make photos for printing, I use an AdobeRGB gamut to master the pictures because that's designed to be less-bad when converting from screen gamuts to CMYK print gamuts. I encode this into the photo so the printer knows that when I say "the greenest green" I mean a very certain value (not actually the same value at DCI-P3 gamut & very different to sRGB value for "the most green").
Nothing is absolute, it's all relative to the gamut (it was mastered for).

#

If you're trying to write an auto-contrast or auto-exposure (that family of functions from Photoshop/Lightroom etc) then knowing what the gamut of the image is meant to be will be quite important. You could, without considering that, stretch an image to the point where everything looks wrong (flesh tones have to be kept in a certain area to look "fleshy", blowing the saturation up makes everything look very amateur so turns off professionals - a lot of cheap consumer kit pushes up saturation to "pop" and so this is associated with low quality automated processing).

#

One thing you might to do get English terminology is just poke around in Lightroom etc.
See what sliders do (is this a local contrast function? a global saturation tool? a saturation tool that tries to hold flesh tones & lower saturations stable while moving others?) & what they're grouped under in the labelling. eg https://www.infratechcivil.com/pages/lightroom-clarity-vibrance