POV-Ray : Newsgroups : povray.unofficial.patches : Mega-POV Post-Processing Request : Re: Mega-POV Post-Processing Request Server Time
2 Sep 2024 14:20:48 EDT (-0400)
  Re: Mega-POV Post-Processing Request  
From: Glen Berry
Date: 24 Apr 2000 13:47:47
Message: <nm8EOXFTD8R+DNvuTiKVKnuQNAlg@4ax.com>
On Mon, 24 Apr 2000 07:29:58 -0500, Mark Gordon <mtg### [at] mailbagcom>
wrote:

>The textbook example of a scene that is affected by this is a daytime
>interior with large windows.  Using conventional photography, it's
>pretty much impossible to make the room look the way the human eye
>perceives it.  If you adjust for the actual lighting in the room, the
>outside looks too bright.  If you adjust for the lighting of the outside
>as seen through the window, the inside looks too dark.  The only
>workarounds involve lighting tricks: add more light to the interior, or
>wait until twilight so the ambient light levels are better balanced.

There is a technique used in traditional photgraphic printing called
"unsharp masking." This is *not* to be confused  with the same term as
applied to Photoshop. The term used in Photoshop refers to a method of
manipulating an image's sharpness. What I ame going to describe, is a
method to control the tonal range or contrast of an image - not a
sharpness adjustment.

When printing color slides onto photographic paper, the slide usually
has a much larger dynamic range than the paper. The result is that
highlights tend to wash out, and shadows can turn into solid black.

The first step to correct this, is to prepare an intentionaly
blurred, B&W *negative* copy of the slide. This negative copy is
processed to be very low in contrast, with no areas of the negative
allowed to go pure black. In other words, it's a very "thin," and
transparent negative image.

Next, the original color slide and this blurred negative copy are
sandwiched together in perfect registration (their images are
perfectly over-lapped.) This combination is then printed to the photo
paper.

The result is that the contrast range of the two sandwiched images is
less than the contrast range of the original color slide. In areas
where the slide is more transparent, the negative compensates by being
more dense.

The reason for blurring the negative is to avoid artifacts that might
be created on sharp edges in the original photo. Artifacts could also
appear around each individual grain or dye-cloud in the image. The
blurring avoids this as well.

I think a similar method could be implemented as a post-process effect
in POV-Ray. 

 1) Take the raw, unclipped image and create a monochrome RGB copy.  

 2) Convert the copy to a "negative" image. 

 3) Blur the negative somewhat heavily. 

 4) Adjust the density range of the negative to prevent any values
from being too dark (this is done by setting the "black-point" to a
very high value and rescaling all the values in the negative.)

 5) Combine the images together and subtract the negative from the
positive.

 6) Convert this floating point image to the final color space
desired, ie 24bit color. Optionally, one could also apply "film curve"
type effects at this stage.

This should have the effect of reducing the highlight areas that would
have otherwise recorded as a washed-out area of white.

********************

I hope that everyone can follow my explanation. Perhaps I should refer
to the process as "Reverse Unsharp Masking," to avoid confusion with
the Photoshop plugin. (The "reverse" aspect coming from creating a
"reversed" or negative image during the process.) Perhaps we can
simply refer to it as RUM in the future?

Let me know what you think. All comments are appreciated.

Thanks,
Glen Berry


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.