On Mon, 5 Jul 2004 19:57:12 +0200, "Pjotr Wedersteers" wrote:
"Don" wrote in message
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.
If I see this correctly, curves is exactly the tool for this. If you put a marker at 150 and lift that to 200 (check input & output numbers) you will have expanded the 0-150 region to 0-200 at the cost of the 150 - 255 region, which now resides in the 200-255 region. I tried it and the resulting curve is not too extreme. Of course it all depends a lot on the picture whether the result is nice...
That's what I have been doing, but I observed that (due to inherent nature of curves) this results in uneven (non-linear) distribution of the dynamic range at either side of the point.
In this particular example, if I compare the two histograms the "after" histogram of the 0-200 is not simply a uniformly stretched out version of the "before" histogram of the 0-150. Instead, one side is stretched out more than the other.
To overcome this, I've created "linear curves" (my name) where instead of a single curve, I have two straight lines, one going from 0 to 200, and the other from 200 to 255. (I use a little VB program I wrote to generate AMP files.)
As I write over in "alt.graphics.photoshop" I'm now trying to figure out the ramifications of this. I suspect that, in the end, I want a smooth transition which curves create and just have to accept the non-linear nature of the rest of the histogram.
Is there something else you want to achieve then ?
The thing that prompted me was to be able to increase image contrast without clipping.
In the above example, let's say that 0-150 contains a nice histogram "mountain" while the range 150-255 is a flat line. That "flat line" are the highlights which conventionally would be clipped because they are a relatively small portion of the overall image.
For example, employing the usual 0.3% to 0.5% clipping, anything over about 200 would be clipped (or re-scanned with boosted analog gain).
By using dynamic range compression/expansion I can expand 0-150 into 0-200 and compress 150-255 into 200-255, resulting in a image where no clipping has taken place. True, the contrast of the highlights is decreased somewhat but all the gradation is still there. However, the contrast of the 0-150 (now 0-200) has been increased considerably.
Don.