PWP's Composite-Blend transform & RGB Gamma's

Moderator: jsachs

den
Posts: 861
Joined: April 25th, 2009, 6:33 pm
What is the make/model of your primary camera?: Canon EOS-350D/Fuji X100T
Location: Birch Bay near Blaine, WA USA

PWP's Composite-Blend transform & RGB Gamma's

Post by den »

An interesting discussion is currently ongoing on the DPR Retouching forum titled:
Photoshop "Blend RGB Colors Using Gamma:1" at
http://forums.dpreview.com/forums/read. ... e=36017517.

The OP's results are reproducible using PWP's Composite transform in Blend mode. Illustrated below are the results when a 75% toned RGB Input image is 100% blended with a 75% tone complimentary CMY Overlay image using a mask and differing gammas.

Illustration 1: blend gamma = 2.22
RGBGammaBlend_2.22.jpg
RGBGammaBlend_2.22.jpg (27.79 KiB) Viewed 6431 times
Illustration 2: blend gamma = 1.00 [change the Input and Overlay images from 2.22 to 1.00 gamma images, blend, and then change the resulting blended image back to 2.22 gamma]
RGBGammaBlend_1.00.jpg
RGBGammaBlend_1.00.jpg (29.24 KiB) Viewed 6431 times
So which is the preferential image? Do you trust your eyes?... or the math?

It should probably be noted that for photo realistic images, the likelyhood that large solid colored image areas would be 100% blended with adjoining large solid complimentary colored image areas is remote! ... but possibly a nuiance exists none-the-less... and perhaps a preference when constructing virtual mattes/frames with PWP [or performing other 'graphic' techniques.
MikeG
Posts: 243
Joined: April 25th, 2009, 4:36 pm
What is the make/model of your primary camera?: Panasonic G1
Location: Sydney, Australia

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by MikeG »

Den,

Please explain how the 75% tone is achieved, and how the mask used in the composite transform is generated.
I think I get the rest.

Thanks, Mike.
den
Posts: 861
Joined: April 25th, 2009, 6:33 pm
What is the make/model of your primary camera?: Canon EOS-350D/Fuji X100T
Location: Birch Bay near Blaine, WA USA

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by den »

Hi Mike....

(A) To construct PWP's default gamma 2.22 RGB Input image, click on New: (a) set preference dimensions; (b) click on the 'color' square, select 'red', and move the vertical slider down until R=75; and (c) click OK. Open the Crop/AddBorder transform: (a) add a right side border the same width as the 'red' image; (b) click on the 'color' square, select 'green', move the vertical slider down until G=75, and click Apply; (c) change the Crop/AddBorder Input image to the 'RG' image and add a right side 'blue' border as you did the green; and (d) click OK.... fini! Similarly construct the CMY image with the same pixel dimensions for each of the colors as the RGB image.

(B) To construct the mask: (a) click on the RGB Input image and open the Mask Tool; stretch a 'rectangle' across the middle of the image, lower-left Apply-Add, then lower-left Apply a Blur, and click OK. Add text to the mask image with the Text transform.

Input, Overlay, and Input Mask images should look something like this:
RGBGammaBlend_images.jpg
RGBGammaBlend_images.jpg (22.36 KiB) Viewed 6321 times
den
Posts: 861
Joined: April 25th, 2009, 6:33 pm
What is the make/model of your primary camera?: Canon EOS-350D/Fuji X100T
Location: Birch Bay near Blaine, WA USA

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by den »

The Composite-Blend transform dialog:
RGBGammaBlend_composite.jpg
RGBGammaBlend_composite.jpg (26.82 KiB) Viewed 6313 times
couman
Posts: 82
Joined: April 25th, 2009, 8:44 am

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by couman »

Or, for perhaps a simpler way to generate the complement,
1. Generate the RGB rectangle as described by Den
2. Click on "new" and generate a new white rectangle of the same size
3. Open the filter dialogue with the white image as input and the RGB as overlay
4. Check the complement box and hit OK
Bob Coutant
den
Posts: 861
Joined: April 25th, 2009, 6:33 pm
What is the make/model of your primary camera?: Canon EOS-350D/Fuji X100T
Location: Birch Bay near Blaine, WA USA

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by den »

BobC -- a very neat way to obtain the CMY Overlay image -- thank you.

Perhaps one other comment will help... ...why a 75% tone [191] image illustration rather than a 100% tone [255] Red-Cyan example that the DPR forum's OP used: Changing a 100% toned/color image whose Gamma is 2.22 to 1.00 will have no visible change but the 99% tones/colors or less will visibly 'darken' when this change is made and will visibly 'lighten' when the Gamma is changed back to 1.00... hence a 75% tone/color illustration was used for the PWP illustration.

Also... something that may be of interest is another Gamma 1.00 nuance consideration that occurs with Resize-ing as previously discussed on this message board here: http://www.dl-c.com/board/viewtopic.php?f=4&t=240
MikeG
Posts: 243
Joined: April 25th, 2009, 4:36 pm
What is the make/model of your primary camera?: Panasonic G1
Location: Sydney, Australia

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by MikeG »

Thank you Den, and Bob, I've now managed to reproduce the effect. I did remember the earlier discussion - and that the Gray/Gamma Adjust function had caused me conceptual difficulties, so thanks, Den, for providing the link to that discussion. Maybe now that I've read it another couple of time it will stick!
I'm delighted to have learned some neater way of doing things and once I've fully aborbed those and the Gamma Adjust theory then, perhaps, I can move away from the trees and be able to see the wood - ie the thrust of the initial post rather than how the examples were constructed.
Thanks, Mike.
tomczak
Posts: 1431
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by tomczak »

As useful as synthetic examples are, is there an example of an actual photograph for which gamma transformation before blending makes any practical difference?
Maciej Tomczak
Phototramp.com
den
Posts: 861
Joined: April 25th, 2009, 6:33 pm
What is the make/model of your primary camera?: Canon EOS-350D/Fuji X100T
Location: Birch Bay near Blaine, WA USA

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by den »

My experience is that the 'RGB Gamma1 blending' is a more important consideration when one creates "virtual images" such as mattes, frames, portrait backgrounds, etc... or other 'graphics' ...posters, calanders, annoucements... etc.

For photo realistic image processing, the 'RGB Gamma1 blending' is subtle as to be 'invisible' to the eye...
...except perhaps in the case where multiple images are stiched together for panorama's... one would want the best blending possible at the stiched edges or...
...at the common edges when compositing at 100% image areas from one image to replace at 100% image areas of another image.
Dieter Mayr
Posts: 453
Joined: April 24th, 2009, 11:47 am
What is the make/model of your primary camera?: Nikon D700
Location: Salzburg / Austria

Re: PWP's Composite-Blend transform & RGB Gamma's

Post by Dieter Mayr »

Den wrote: "So which is the preferential image? Do you trust your eyes?... or the math?"

Im playing with this and thinking of it while now, but i'm still not sure what woudl be the perfect blend in this case.
With blending the original 75% images it gives in the neutral region between the color and its complemet a value of 75% / 2 = 37.5 % neutral grey
Mathematical correct, but too dark for the eye, in my opinion.
Changing the Gamma to 1 darkens the 75% colors down to 53.1% which gives a neutral grey of 26.6% then, resettet to Gamma 2.22 results in a gery value of 55%.
All this is mathematically correct and can be proofed by measuring the actual images.
I think i would prefer the Gamma 1 version, even though it seem to be too bright for my opinion.

But what should one expect when blending a pure color of 75% with its complementary color and 50% Overlay Amout (which gives the neutral grey as result)?
For my eyes, it would be something a little darker then the Gamma 1 result.
Transfering not to Gamma 1 but to Gamma 1,4 and back gives a resulting grey of 48%, and that come close to what i would call pleasant to my eyes.

Here is the result with Gamma = 1,4.
Gamma14.png
Gamma14.png (2.19 KiB) Viewed 5955 times
So i think its worth to play a little with the Gamma settings.
Dieter Mayr
Post Reply