Page 1 of 1

Freehand Masking

Posted: August 8th, 2016, 11:36 pm
by Marpel
Image 7360 x 4912.

If I use the freehand masking tool when the image is "expanded" to the size of the screen, then review the mask at 1:1, the mask (even in gentle curves) exhibits obvious "jaggies" or "stair steps" and straight lines. If, however, I first zoom into the image at 1:1 and freehand, the curves of the mask are much smoother.

Unfortunately, I need to mask out a number of objects in a number of images and the objects are so close in colour/tone to the background that the other masking tools are less than adequate. However, to do the masking at 1:1 is extremely tedious and slow (mask a small area, complete the "circle" to join the mask, move the mask a small bit, then repeat etc).

Question is: Is there a way to freehand at a the expanded view, that does not produce these jagged edges?

Marv

Re: Freehand Masking

Posted: August 9th, 2016, 6:35 am
by jsachs
If the edges if the region are smooth, the Spline mask tool may work better than the freehand tool. This connects a series of control points with a smooth curve and lets you adjust the control points before applying the mask. As usual, you can refine the mask by adding or subtracting regions.

Re: Freehand Masking

Posted: August 12th, 2016, 11:36 pm
by Marpel
Jonathan,

Thanks for the suggestion. I tried the Spline mask tool, however, the edges of the objects that I wish to mask are not smooth enough to make good use of this tool (and as I have had little experience with it, I find it is like a balloon, squeeze one side and the other pops out - I find it a bit counter-intuitive, and takes some practice), hence my queries on the freehand tool.

Marv

Re: Freehand Masking

Posted: August 13th, 2016, 6:47 am
by jsachs
The trick to using the spline tool is to refine the result successively by shift-clicking between control points to add new ones. If you create enough control points along the edge you should be able to follow any reasonably smooth curve.

Other than that, the other way to deal with rough edges is the mask paint tool using the Apply To Similar Pixels (Track) option and adjusting the threshold as necessary depending on the contrast between the subject and background.

I'm not sure what you have tried already, but if you post a small sample I might be able to suggest a method that would work.

Re: Freehand Masking

Posted: August 13th, 2016, 10:17 am
by davidh
Marpel,
the Similar Pixels (Track) of the mask paint tool suggested by Jonathan is a very powerfull method for masking quite easily group of pixels even down to indidual ones on edges. I have been using it extensively when restauring old fotos: ragged and jaggied edges of stains, discolorations, cracks, etc. In fact I use it exclusively on all complex edges when colors are close to each other. You only need to zoom enough and than play with the threshold. Once you get used to it, you might find it is also quite fast.

David

Re: Freehand Masking

Posted: August 15th, 2016, 10:50 pm
by Marpel
Thanks David and Jonathan.

I am familiar with the Similar Pixels and have used it quite a bit on other images. However, the images I am dealing with currently have a couple of issues that make this tool and the Spline a bit tedious.

On some parts of the image the edges blend subtly to the background (to the point where it is almost imperceptible to the eye) and there are also areas where the changes in colour/tone are dramatic between very small portions of the areas I wish to mask. So to get the subtle gradation correct with the Similar Pixels, the threshold has to be quite minimal the closer the centre of the tool is to the edge of what should be masked as opposed to what shouldn't be. Then the adjacent area may be quite dramatic and the tool does not pick up all the differences within its radius, so there is a constant need to change radius and/or threshold or click multiple times within a small area. This makes it quite tedious for a 7360 x 4912 sized image. As well, the border areas are varied and inconsistent so the Spline is not very efficient.

I have well over a dozen abstract watercolour images that have been photographed, all with the above traits, that I am trying to mask out certain areas of on each, so initially thought I would be better off just free-handing the mask, until I discovered the dramatic jagged edges as described in my first post and to zoom well into the image to reuse those jaggies and cover the entire image this way is very time-consuming.

Marv

Re: Freehand Masking

Posted: August 16th, 2016, 8:13 am
by jsachs
No, the freehand tool is not anti-aliased so it's edges will always be rough.

Re: Freehand Masking

Posted: August 16th, 2016, 1:36 pm
by Marpel
Thanks Jonathan.

Although as mentioned before, the "roughness" of the edges of the freehand tool is dependent on the zoom factor when using the tool. The more the view is zoomed in, the less pronounced the roughness, or jaggies.

Cheers,

Marv