Compressing/Expanding dynamic range

PE
Posted By
phoney.email
Jul 5, 2004
Views
343
Replies
5
Status
Closed
I’d like to arbitrarily compress/expand different areas of dynamic range. Best explained with the histogram.

Let’s say I’d like to expand the range 0-150 to span 0-200, and conversely, compress the dynamic range 150-255 into 200-255.

In other words, imagine a marker at 150. I’d like to be able to move that marker to 200 expanding/compressing relevant portions of dynamic range as needed.

In a (weird, inverse) way the gamma slider in Levels does that, but not only is it "reverse logic" but it’s limited to a single point and it’s also a fixed point.

I’ve been playing around with curves with some success but was just wondering if anyone else has any thoughts on this.

Don.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

TD
The Doormouse
Jul 5, 2004
(Don) wrote:

I’ve been playing around with curves with some success but was just wondering if anyone else has any thoughts on this.

Curves is the way to go.

The Doormouse


The Doormouse cannot be reached by e-mail without her permission.
MR
Mike Russell
Jul 5, 2004
Don wrote:
I’d like to arbitrarily compress/expand different areas of dynamic range. Best explained with the histogram.

Let’s say I’d like to expand the range 0-150 to span 0-200, and conversely, compress the dynamic range 150-255 into 200-255.
In other words, imagine a marker at 150. I’d like to be able to move that marker to 200 expanding/compressing relevant portions of dynamic range as needed.

In a (weird, inverse) way the gamma slider in Levels does that, but not only is it "reverse logic" but it’s limited to a single point and it’s also a fixed point.

I’ve been playing around with curves with some success but was just wondering if anyone else has any thoughts on this.

Don – you’re talking about curves. Curvemeister lets you drop a marker on a curve, just as you describe, and you can watch it ride up and down as you move the curve around.

Check out the demo. I’m about to add one idea (hex channel display) that came up in one of your discussions.


Mike Russell
www.geigy.2y.net
N
nomail
Jul 5, 2004
Don wrote:

I’d like to arbitrarily compress/expand different areas of dynamic range. Best explained with the histogram.

Let’s say I’d like to expand the range 0-150 to span 0-200, and conversely, compress the dynamic range 150-255 into 200-255.
In other words, imagine a marker at 150. I’d like to be able to move that marker to 200 expanding/compressing relevant portions of dynamic range as needed.

In a (weird, inverse) way the gamma slider in Levels does that, but not only is it "reverse logic" but it’s limited to a single point and it’s also a fixed point.

I’ve been playing around with curves with some success but was just wondering if anyone else has any thoughts on this.

This is very simple to do in Curves. Just click anywhere on the curve, so you’ll get ‘input’ and ‘output’ values below. Next, type 150 as input and 200 as output. Click again for the next marker, etc.


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.nl/
PE
phoney.email
Jul 6, 2004
On Mon, 05 Jul 2004 06:27:38 GMT, "Mike Russell" wrote:

I’d like to arbitrarily compress/expand different areas of dynamic range. Best explained with the histogram.
….
I’ve been playing around with curves with some success but was just wondering if anyone else has any thoughts on this.

Don – you’re talking about curves. Curvemeister lets you drop a marker on a curve, just as you describe, and you can watch it ride up and down as you move the curve around.

Check out the demo. I’m about to add one idea (hex channel display) that came up in one of your discussions.

Ah, the AMP files, right? Actually , that’s what I have done here as well. I wrote a quick-and-dirty VB routine to generate arbitrary curves.

One thing I’ve been playing with are "linear curves" (my name) whereby instead of, say, lifting a point to create a curve, I generate two straight lines, from 0 to the point, and then from the point to 255. What prompted me to do this was that I observed that in some extreme cases, using curves would cause clipping in the highlights. I would then "tame" such curves by using additional points to flatten them out so they don’t clip. And then I went a step further and just generated "linear curves".

The reasons why I got into this in the first place is that I wanted to increase image contrast without clipping. In the above example, the range 0-150 contains a nice fat, histogram "mountain" while the range 150-255 "flatlines". Conventionally (using 0.3%-0.5% defaults) this flatline would be about halved by clipping (or re-scanning with boosted analog gain). By using the above method I "shrink" the highlights’ dynamic range maintaining all data – albeit with somewhat reduced contrast – while at the same time sufficiently increasing contrast of the rest of the image.

I’m still playing with all this, but I think I’m noticing that AMPs don’t appear to be as exact as "real" curves. I wonder if that’s because AMP curves use integer math (implicitly, because the definitions are simple 8-bit integers) while real curves use floating point as the curve is (presumably) internally defined as a formula and then applied with maximum accuracy to each point in the image.

Don.
PE
phoney.email
Jul 6, 2004
On Mon, 5 Jul 2004 12:55:29 +0200, (Johan W.
Elzenga) wrote:

Don wrote:

I’d like to arbitrarily compress/expand different areas of dynamic range. Best explained with the histogram.

Let’s say I’d like to expand the range 0-150 to span 0-200, and conversely, compress the dynamic range 150-255 into 200-255.
In other words, imagine a marker at 150. I’d like to be able to move that marker to 200 expanding/compressing relevant portions of dynamic range as needed.

In a (weird, inverse) way the gamma slider in Levels does that, but not only is it "reverse logic" but it’s limited to a single point and it’s also a fixed point.

I’ve been playing around with curves with some success but was just wondering if anyone else has any thoughts on this.

This is very simple to do in Curves. Just click anywhere on the curve, so you’ll get ‘input’ and ‘output’ values below. Next, type 150 as input and 200 as output. Click again for the next marker, etc.

The "problem" (actually an observation) is that curves do not modify dynamic range in a linear fashion but introduce an amount of "distortion" i.e. one side of the dynamic range is compressed/extended more than the other. That’s why I have been playing around with "linear curves" (please see my previous message to Mike).

Since this is still "work in progress" I’m not yet clear what implications these "linear curves" have on the point itself i.e. in real curves there is a smooth transition between dynamic ranges on either side of the point, while with "linear curves" (in theory, at least) this would be a drastic switch from one dynamic range to the other.

As I say, I’m not entirely clear what the overall implications of this are. Maybe I (and I suspect I do) want this "distortion" which makes the transition smooth and accept the non-linear nature of the rest of the curve.

But, as other of my messages show, I like to dwell on these arcane things… ;o)

Don.

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections