Contrast Mask like Lightzone Log Out | Topics | Search
Moderators | Register | Edit Profile

Digital Light & Color Message Boards » Picture Window Support » Archive through November 27, 2006 » Contrast Mask like Lightzone « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Lars Tore Gustavsen
Member
Username: Lt_gustavsen

Post Number: 66
Registered: 12-2004
Posted on Monday, October 23, 2006 - 04:11 pm:   Edit Post Delete Post

I planned to post a bug report, but I decided to post it as a contrast mask workflow. I guess something like this have been here before, but I guess it's not to bad to post it anyway.

Short version for developers: I think there is a bug in the soft light blend mode, when the overlay is 8 bit and the input is 48. This is in the composite transformation on PW 3.5.10, so maybe it's already fixed in 4.0?

Long version.
First of all. According to Norman Koren there is better way to to contrast masking. And I guess he is right. Second something wrong with the upload attachment function, (yes, I have enabled popups), so I have posted all the images on another server.

Awhile ago I tried Lightzone. One of the largest wow factor in that program is a tool called “contrast mask”. I tried to do the same in picture window, since I like to understand what I am doing. Here is a sample workflow.

Lightzone, contrast mask tool
http://www.mulebakken.net/div/cm/cm.jpg

Open a image.
http://www.mulebakken.net/div/cm/for.jpg

Select the mask utility. This can be done with the normal transformations to. But the mask tool is quick. Start the curve tool. Apply a reverse gamma curve. This is the gamma slider in lightzone.
http://www.mulebakken.net/div/cm/curve.jpg

Apply a blur radius. This is the blur radius in lightzone. Select the OK or apply to crate the mask.
http://www.mulebakken.net/div/cm/blur.jpg

Select the start image and the composite transformation. Select the mask as overlay and operation to “soft light” or be more creative.

Enable the preview and adjust overlay amount to taste. This is the opacity slider in lightzone.
http://www.mulebakken.net/div/cm/composite.jpg



The mask
http://www.mulebakken.net/div/cm/mask.jpg


after
http://www.mulebakken.net/div/cm/after.jpg

And here is the bug with a 48 bit input image.
bug
http://www.mulebakken.net/div/cm/bug.jpg


More about soft blending
http://www.ronbigelow.com/articles/blend3/blend3.htm

More about radius and gamma settings
http://www.vinberg.nu/pages/contrast_masking.htm
And a sample workflow from scanned large format slides.
http://www.8x10.se/pages/contrast_control_in_lightzone.htm


Regards
Lars Tore Gustavsen
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 86
Registered: 03-2006
Posted on Thursday, October 26, 2006 - 04:40 am:   Edit Post Delete Post

Lars... thank you for posting this and the references... I learned something from it and your example image using an inverse gamma curve mask with Composite-SoftLight blending was rather ingenious.

As a refinement and utilizing some additional PWP capabilities... if you leave the MaskTool active you can easily change the blur amount with an 'undo' or the 'curve+blur' with a 'none' and have an extra set of control with the mask's white/black sliders...

scrn1
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert W. Coutant
Member
Username: Couman

Post Number: 129
Registered: 01-2005
Posted on Thursday, October 26, 2006 - 12:57 pm:   Edit Post Delete Post

Lars/Den,
I'm obviously missing something. As you know from some of my other posts, I'm a fan of using the soft light blend transformation. However, when I compare this "inverse gamma" approach with Den's shadow recovery method (a variant of the 3-tone), I get better looking results with the shadow recovery (blurred 60% tone mask plus S&V adjustment in color curves). In particular, I get better definition in the background mountain range and slightly better lightness and saturation in the foreground. If I use the 60% shadow mask in the soft light transformation, I get an image that is midway between the other two (lower saturation). IMO, the best version of this image results from using the inverse gamma mask plus the color curves transformation.
Bob C.
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 87
Registered: 03-2006
Posted on Thursday, October 26, 2006 - 01:29 pm:   Edit Post Delete Post

BobC... you are correct that perhaps Lar's image example needs more correction than what Composite-SoftLight blending will allow for the foreground shadows.... hence the name 'soft' perhaps....

Where substantial shadow recovery is needed something stronger as you experienced is needed...
...for example, here is a 2Tone Range adjustment for the image followed with some 'dappling' comparisons....left=ori; center=SoftLight blend; and right = 2ToneRange Adj + 'dapple'

scrn2
For images with near perfect contrast and brightness, the SoftLight filter blending adds that little bit more... what would really make the SoftLight filter perfect is if one could adjust ExposureCompensation for the subtract/additive filter blending as you can select for the individual filter modes when using the Filter transform...
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 88
Registered: 03-2006
Posted on Thursday, October 26, 2006 - 01:44 pm:   Edit Post Delete Post

Also, I think that Lar's point is showing us how to achieve an equivalent PWP Lightzone contrast masking technique and not necessarily the ultimate image enhancement to his sample image....

Lar's suggested PWP workflow works very well for the "www_8x10_se" Lightzone image... the resulting PWP image closely matches the author's final image...at least in my experiments where Composite-SoftLight blending was used... but again, using tone range masks with Color Curves achieve more aggressive and to me preferred final image results.....
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert W. Coutant
Member
Username: Couman

Post Number: 130
Registered: 01-2005
Posted on Thursday, October 26, 2006 - 03:13 pm:   Edit Post Delete Post

Thanks Den. It does seem that Lars' mask is very similar to the 2-tone mask, but with a little more detail. I'm going to continue to compare the two approaches with other images to get a better generalization. [I save my preferred curves (brightness and color curves), so reproducing results is easy.]
Bob C.
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 89
Registered: 03-2006
Posted on Thursday, October 26, 2006 - 03:56 pm:   Edit Post Delete Post

BobC... you have the 'key'...

Whether its Lightzone's 'gamma curve+blur'; NKoren's 'BrightnessCurve+blur'; or the '2ToneRangeAdjments' where the blur is part of the masking sequence...

The reality is that the masks will essentially be the same for a given image... then once the mask is created, one has to decide how to achieve preference enhancement..

Composite, Brightness Curve, Color Curves, or Filter transforms or in combination if using PWP...

All inaccordance with one's understanding and the 'flavor of the moment'...

Is not imaging 'Grand'! ?
Top of pagePrevious messageNext messageBottom of page Link to this message

Phil Kempster
New member
Username: Kempster

Post Number: 2
Registered: 10-2006
Posted on Thursday, October 26, 2006 - 08:50 pm:   Edit Post Delete Post

"Is not imaging 'Grand'!" I could not agree more!

It's just great that there are so many different ways to get 'almost' the same result in PWP. I'm
learning so much about the hidden depths of the program. (Well 'hidden' to me!) from these posts.

Thanks guys, you are the BEST.
Phil
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert W. Coutant
Member
Username: Couman

Post Number: 131
Registered: 01-2005
Posted on Thursday, October 26, 2006 - 09:27 pm:   Edit Post Delete Post

Well Den, close, but not exactly the same. probably close enough that the consequences can't readily be seen. I'm sure that my S&V color curves for the 2-tone treatment of Lars' image are not exactly the same as yours, but the only way I can tell the difference between your product and mine is to measure with the readout tool. I think Lars has the "key" -- understanding what you want and how the various PWP tools work, and then choosing your most comfortable workflow. [It's always good to explore new ways too -- just to make sure.]
Bob C.
Top of pagePrevious messageNext messageBottom of page Link to this message

Eric Vogel
Member
Username: Evogel

Post Number: 71
Registered: 08-2005
Posted on Friday, October 27, 2006 - 01:39 am:   Edit Post Delete Post

I tried this technique on a 48bit TIFF. The preview looked good but as Lars suggests, the result seemed quite different from the preview.
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 90
Registered: 03-2006
Posted on Friday, October 27, 2006 - 10:34 am:   Edit Post Delete Post

BobC... you are such a gentleman.... and I apologize...

It was incorrect of me to lump the '2ToneRangeAdj' masks with the type of masks generated by a 'gamma curve+blur' and a 'BrightnessCurve+blur'.

The former is suitable for aggressive image changes such as changes to the isolated tone range black/white points and the later are more suitable for the 'softer' curve/filter changes that will be applied globally to an image.
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 91
Registered: 03-2006
Posted on Friday, October 27, 2006 - 11:43 am:   Edit Post Delete Post

...the 'bug'...

I was able to confirm Lars' and Eric's observations regarding 48-bit color images and Composite-SoftLight blending transformations using PWP3.5.0.10...

'Preview' is okay; 24-bit color transformed image is okay; but 48-bit color transformed image has atypical pixels in places
Top of pagePrevious messageNext messageBottom of page Link to this message

Kiril Sinkel
Member
Username: Ksinkel

Post Number: 450
Registered: 08-2002
Posted on Friday, October 27, 2006 - 12:33 pm:   Edit Post Delete Post

Den,

Could you send me the images or other details, so I can look into this. My e-mail is ksinkel@dl-c.com.

Thanks,

Kiril
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 92
Registered: 03-2006
Posted on Friday, October 27, 2006 - 04:50 pm:   Edit Post Delete Post

Kiril... email has been sent.
Top of pagePrevious messageNext messageBottom of page Link to this message

Lars Tore Gustavsen
Member
Username: Lt_gustavsen

Post Number: 67
Registered: 12-2004
Posted on Sunday, October 29, 2006 - 03:53 pm:   Edit Post Delete Post

I have been really interesting to follow this thread. There have been many nice advise. Thank you all.

I have discovered that Lighhtzone have replaced the “contrast mask” transformation with something called “tonemapper”. It is very similar to the “contrast mask” tool, but they have added on details slider. On the radius slider the radius goes from 100-500.
tonemapper

If you use the same settings on “contrast mask” and “tone mapper” with the details on 0, I get the same results as before. I have tried to find out who I can simulate the “details” slider, but I have very limited success so far.
I have posted some output from ligthzone here if anyone are interested. It's a shoot from a few weeks ago om my way home from work. Everyone is free to use.



Here is my original image.
Tif or jpg
http://www.mulebakken.net/div/lz/orginal.jpg
http://www.mulebakken.net/div/lz/orginal.tif (3.5 mb)

Settings radius 140, gamma 2,2 opacity 100

Lightzone details 0 (this is the same as the “contrast mask” image.
http://www.mulebakken.net/div/lz/lz-r140-g22-d0.jpg
The mask
http://www.mulebakken.net/div/lz/lz-r140-g22-d0-mask.jpg

Lightzone detail 0.5
http://www.mulebakken.net/div/lz/lz-r140-g22-d05.jpg
the mask
http://www.mulebakken.net/div/lz/lz-r140-g22-d05-mask.jpg

Lightzone details 1
http://www.mulebakken.net/div/lz/lz-r140-g22-d1.jpg
the mask
http://www.mulebakken.net/div/lz/lz-r140-g22-d1-mask.jpg

Here is my attempt.

1.open original
2.extract lightness channel
3.gray – brightness curve. Add inverse gamma curve, hit apply create image 1. clikk opt “invert” and ok and create image 2.
4.on image 1, add gausian blur 128, and create image 3
5.on image 2 , select composite transformation-blend mode. As overlay select image 3. and use overlay amount around 90%.

My resulting mask.
http://www.mulebakken.net/div/lz/pw-curve-mask05.jpg

I need more contrast and details in this. Actually it is not very usable If anyone have a better idea I guess many here are interested to learn.

Regards
Lars Tore Gustavsen
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 96
Registered: 03-2006
Posted on Wednesday, November 01, 2006 - 04:24 pm:   Edit Post Delete Post

Please see my posting here:
http://www.dl-c.com/cgi-bin/discus/show.cgi?tpc=2&post=19408#POST19408

and the web page linked therein.

Lars... I can temporarily upload a 100% jpg quality resulting image if it is of interest. I really did not keep track of the workflow specifics...

A ToneMapper1-like mask for the Overlay in the Composite-SoftLight transform can be generated by:

Subtractive filtering in the Filter transform, a selected 'darkening' gamma curve mask with its inverse gamma curve + selected blur. The Filtering transform's ExposureComp setting determines 'detail'. Adjust amounts to preference.
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 104
Registered: 03-2006
Posted on Tuesday, November 14, 2006 - 10:00 am:   Edit Post Delete Post

As things have been a bit slow on the message board recently, I have been visiting/participating in DP Review's retouching forum and had a chance to try this image solution approach on one of the images there.

The request and original image:
http://forums.dpreview.com/forums/read.asp?forum=1006&message=20862496

The PWP solution:
http://forums.dpreview.com/forums/read.asp?forum=1006&message=20864346

The Explanation:
http://forums.dpreview.com/forums/read.asp?forum=1006&message=20864997

If there is further interest, I can detail this approach more thoroughly...

It does have its nuances and takes some practice...

It is also interesting to see how the PS solutions compare...

Please note: that the posted images on the above links may expire after a time period [mine will be removed from the server in 30 days] but the text will remain...
Top of pagePrevious messageNext messageBottom of page Link to this message

Eric Vogel
Member
Username: Evogel

Post Number: 74
Registered: 08-2005
Posted on Tuesday, November 14, 2006 - 11:50 am:   Edit Post Delete Post

Den

Nicely done! Of course we would like you to detail it.

Eric
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 105
Registered: 03-2006
Posted on Friday, November 17, 2006 - 10:52 pm:   Edit Post Delete Post

Eric and Others....

A PWP Contrast Masking method that essentially duplicates LightZone's ToneMapper1 plus additional control is described in a tutorial workflow located here:
http://www.ncplus.net/~birchbay/tutorials/contrast_mask/index.htm

An inverted, blurred 'darkening' gamma curve contrast mask:
img4

is used with the Composite-SoftLight and Color Curves transforms to enhance the mid-tones/shadows of an 'expose to the right' image, where highlights were not to be clipped:
img2img3

If you have questions ask... while there are simpler and more straight forward ways to essentially achieve the same results... there are nuances with this approach that are better than just ColorCurves/Masks alone as the image's own tone map helps keep changes more within the bounds of photo reality...
Top of pagePrevious messageNext messageBottom of page Link to this message

Maciej Tomczak
Member
Username: Tomczak

Post Number: 311
Registered: 08-2004
Posted on Saturday, November 18, 2006 - 02:05 am:   Edit Post Delete Post

Den, I noticed that you use unblurred tonal mask for the imput image - doesn't it defeat the purpose of blurring the tonal mask that you use with soft light composite (i.e. preserving local contrast based on pixel proximity while bringing up shadows, and not only their value - Margulis article)? Cheers.
Maciej Tomczak
www.phototramp.com
Top of pagePrevious messageNext messageBottom of page Link to this message

den
Member
Username: Den

Post Number: 106
Registered: 03-2006
Posted on Saturday, November 18, 2006 - 08:50 am:   Edit Post Delete Post

The initial unblurred tonal mask is needed to adjust the blurred mask regions so that needed image details will be retained in the region of the blur as the SoftLight filter with an inverse contrast mask without 'detail' will loose contrast near 50% tone values...

Its black/white slider amounts along with the Filter transform's ExposureCompensation setting determines this detail and also will control the contrast in the transition gradient so that noticeable and/or objectionable halos/auras do not develop.

The suggested Gamma curve = [0,0], [50,20], [100,100] seems to be relatively generic for most images.

The amount of Blur is a matter of artristy. Factors affecting its amount include image overall pixel dimensions, specific pixel image areas to be changed, and the amount of desired change to be made.

The amount of Detail is best selected on the basis of image areas that should not be changed when using SoftLight... use the Readout Tool to adjust these mask areas to approximately 50% tone values.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert W. Coutant
Member
Username: Couman

Post Number: 132
Registered: 01-2005
Posted on Sunday, November 19, 2006 - 08:52 am:   Edit Post Delete Post

Thanks den -- I now see where my preconceived notions were leading me astray. In his "Tip of the Week", Bob Johnson has presented another variation on this theme. See:
http://www.earthboundlight.com/phototips.html
Bob C.

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration