Severe contrast enhancements: on 45% rule — and cats

Started Jun 28, 2013 | Discussions thread
Senior MemberPosts: 1,670Gear list
Re: Severe contrast enhancements: on 45% rule — and cats
In reply to ilza, Jun 29, 2013

ilza wrote:

There are 3 ways to perform global contrast enhancement/attenuation (or, what is the same, “apply a curve” to an image):

  1. The most stupid one: apply the curve separately to R,G,B channels. This leads to significant color shifts. IIUC, this is what Gimp is doing.
  2. Split the image into Brightness+Chromaticity components, apply the curve to the brightness, keeping Chromaticity as it was. (This still leads to unnatural colors.) I expect that most of reasonable image manipulation programs work this way. If brightness is actually luminosity, this means that the curve is applied to max(R,G,B), then the other two of RGB channels are changed proportionally.
  3. Do as in the first variant, then take Brightness-Hue-Saturation, and replace the hue by its initial value. I've heard that Capture One works this way. This still leads to unnatural colors. This is equivalent to applying the curve to the min/max of RGB, then tuning the intermediate value so that the hue is preserved.

Obviously, one can rewrite the second variant as: apply curves to R,G,B, then keep the new brightness, and put back the old saturation and hue. Likewise, the third variants keeps the new brightness and saturation, and keeps old hue.

Then there are the ways invented by the tone mapping people. (Recall that tone mapping is the procedure opposite to what is called HDR in popular culture: they take a natural [hence high dynamic range] image, and want to decrease the contrast in such a way that the image continues to look natural).

For example, look what is done to saturation by the last paragraph of Section 5 of Gradient Domain High Dynamic Range Compression. I tried to understand what kind of effect they want to create by this, remembering that the dynamic range is strongly reduced in what is done by the rest of their algorithm. My conclusion was that essentially, the saturation becomes the weighted geometric mean of the initial saturation, and the saturation after applying algorithm separately to R,G,B.

After this conclusion, one can apply the latter method of working with saturation to other algorithm of manipulation of contrast. So I started to do experiments applying curves naively, then restoring hue and trying mixes of the new saturation with the initial one.

My conclusions? Arithmetic mean works better than geometric one, and the correct weight of the initial saturation is 45%. In GIMP, one can easily do it the following way:

  • Triplicate the layer;
  • (optional) call two top layers “saturation” and “hue”;
  • change their ‘Mode’ accordingly;
  • set opacity of the “saturation” layer to 45%;
  • apply curve (or Levels) to the lowest layer.

So this is the “45% rule”. Which brings us to cats.

Many people already know the wonders of “find a cat” challenges; if you do not, I will try not to spoil the fun. There are plenty of them googlable; here is one (sorry, I could not find a proper attribution):

Find a cat here.

1. open in camera raw and assign a color profile - for the web sRGB is the obvious choice.

2. adjust grey point, exposure, white point, black point.

3. open in photoshop to make final adjustments.

4. save for web

I tried to emphasize the cat while keeping the file looking like a photograph.

Myself, I’m in the category of people who can’t find it in 10min (even after seeing the place it is in highlighted, and arrows going to ears/eyes/etc). So I decide that it is a good candidate to check contrast enhancement algorithms. Here is the result of smart upscaling and 3× contrast enhancement (with 45% rule): Enhanced Cat (I did promise to have no spoilers!).

After seeing this, I do not have any problem to recognize the cat on the initial image. Unfortunately, when I tried it on a couple of people, it does not help them to find the cat… But at least, they had no doubts when pointed into the correct place on the image.

So my questions:

  • Do you know better algorithms to treat colors while doing severe contrast manipulations?
  • Can you enhance the contrast of the cat image so that it helps people find a cat there?
  • Do you have any ideas how would one try to do something similar with local contrast manipulations?
 tom60634's gear list:tom60634's gear list
Olympus OM-D E-M5
Reply   Reply with quote   Complain
Post (hide subjects)Posted by
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark post MMy threads
Color scheme? Blue / Yellow