Gradient tool as a mask function

Moderator: jsachs

Post Reply
MikeG
Posts: 243
Joined: April 25th, 2009, 4:36 pm
What is the make/model of your primary camera?: Panasonic G1
Location: Sydney, Australia

Gradient tool as a mask function

Post by MikeG »

I may well be missing something but I think that it would be handy to have a gradient tool as one of the mask making tools so that it could be used interactively.
Or is there a way of doing this already?
Mike.
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: Gradient tool as a mask function

Post by Dieter Mayr »

Mike,

You can create a gradient, exact same pixel size as the image to work on and 8 bit BW, load that in the Mask tool and process it further.
Dieter Mayr
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: Gradient tool as a mask function

Post by MikeG »

Thanks, Dieter, certainly a help but without the ability to alter the angle of the gradient, or its start and end point.
Mike.
HanSch
Posts: 64
Joined: May 20th, 2009, 12:30 pm
What is the make/model of your primary camera?: Pentax K5, Pentax K3 Mk. iii
Location: Venlo, Netherlands
Contact:

Re: Gradient tool as a mask function

Post by HanSch »

I'm not sure that I understand what you mean, Mike. You can easily alter start or end point in the gradient transformation, or its angel, or the grey value of the start and end point.
But if you want to use it as a mask: not in interaction with your base image, though.
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: Gradient tool as a mask function

Post by MikeG »

Well, I use the Gradient tool is to correct make lighting more even across an image. I create a gradient using, generally, these settings: Type:Linear, Operation:Fill
This creates a black and white image which I use a a mask in the Brightness Curve transformation. Now the ways available to interact with the gradient mask are limited to the existing mask tools. I was thinking that if the Mask facility had a built in Gradient tool then perhaps the start and end points used to create the gradient (and also the slope of the line) could be interactively varied while assessing the preview of the output of the brightness curve.
Please let me know if the above is still unclear.
Mike.
den
Posts: 856
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: Gradient tool as a mask function

Post by den »

Mike... while you cannot change the angle of a linear Fill gradient with the following suggestion, you can change its black/white transitions...

(1) click or open the starting image...
(2) open the Gradient transform, creating a preference angled [could also be the default horizontal or vertical] black to white linear Fill gradient. Click OK to create the 8bit BW gradient image. For example: black at the image's upper left corner and white at the lower right corner...
step(2) gradient image.jpg
step(2) gradient image.jpg (16.03 KiB) Viewed 5819 times
(3) open the Mask Tool - Brightness Curve and apply a preference start and stop diagonal curve to the gradient image. Leave the Mask Tool 'active'. For example: a mask BrokenLine curve = 0,0; 25,0; 75,100; 100;100 will move the black point from its corner 25% of the way and the same for the white point.
Mask Tool BrokenLine curve.jpg
Mask Tool BrokenLine curve.jpg (45.85 KiB) Viewed 5822 times
step(3) active mask.jpg
step(3) active mask.jpg (16.32 KiB) Viewed 5816 times
(4) click on the starting image and open a preference transform selecting the step(3) mask. As the step(3) mask is 'active', its black and white points can be changed with a Mask Tool Undo and a re-APPLY with a different BrokenLine curve. Transform Mask Amount black and white sliders can also used to a preference... for full effect leave mask black at 0 and mask white at 100.

Hope this is of help... ...den...
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: Gradient tool as a mask function

Post by Dieter Mayr »

Mike,

My workflow to even out the brightness of a backround with a gradient:
Creating a new image the same size as the image to work on.
Opening the Gradient transformation with the original image as input image.
With the Gradinet Transformation set to Operation: Filter the gradient can be adjusted in the angle, starting points and in it's strenght (with the Amount slider) till the background is evenly bright.
The switching the Input image to the new created blank image and creating the mask BW image with OK.
Open the Mask Transformation on the original image and load the gradient mask, now it can be processed (cutting out the foreground, for example) and with the finished mask then the image can be processed as desired.

Hope it helps.
Dieter Mayr
jsachs
Posts: 4226
Joined: January 22nd, 2009, 11:03 pm

Re: Gradient tool as a mask function

Post by jsachs »

You don't need to use Mask -- you can use the Gradient transformation to even out the brightness of an image interactively as follows:

1) Select your image, then start the Gradient transformation and set the type to Linear

2) Set the operation to Filter if you want to darken the lighter parts of the image or Subtractive Filter if you want to lighten the darker parts

3) To set the angle and starting and ending points of the gradient, drag the control points labeled 1 and 2 on the input image to the desired locations. If necessary, you can zoom out and manually resize the input image window to allow dragging control point outside of the image area.

4) To adjust the amount of lightening or darkening, set the colors on the color line at the bottom of the Gradient dialog box by double clicking on the upper part of the color line near one of the numbered control points. For Filter, you will want a range from white (no change) to light gray (some darkening); for Subtractive Filter you will want a range from black (no change) to dark gray (some lightening).

5) For more control, shift click on the color line to create additional control points and then set their colors - you can also click the lower part of the color line to adjust the transition between the control points on either side.

If you prefer, you can click on Opt and select Curve instead of Line and specify the brightness by creating a curve of the desired shape. As with the color line, you can create additional points on the curve by shift-clicking on the graph and you can adjust brightnesses by dragging the control points around.

You can always go back and adjust the locations of the first and last control points on the input image or the gray levels at the various control points until you get the effect you want.

The same technique also works for other types of gradient such as Oval.
Jonathan Sachs
Digital Light & Color
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: Gradient tool as a mask function

Post by MikeG »

Thank you, Dieter and Den for your ideas.
And thank you Jonathan for - for me at least - a revelation. For the first time I feel that I've got the start of on understanding of the full power of the gradient transform. I've experimented a little and will investigate more extensively - after breakfast!
Mike.
Post Reply