Masking is the ART of removing sections of a picture - for getting a cutout of a person separate from their background, for example.
 

Remember the watchword:  click on the thumbs to see a bigger version - or do "open in new window" to get it side by side with the text.

Here's an excellent Masking intro tutorial by Beth Smarr - a frequent contributor to abmx-h and abpts-f, and a truly gifted artist:

Intro to Masking - a Word file - 822k

Subject:  Re: QuasiQuestion: For PSP Users
Date:  Fri, 19 Oct 2001 22:07:55 GMT
From:  pixTrix@alienDollarland.com (pixTrix)
Newsgroups:  alt.binaries.pictures.nude.celebrities.fake
Quasi,

There are several methods you can implement for cutting out this kind of hair and the following instructions pertain to APS5.5. However, this will also work in aps6, and very likely in PSP5 and aps3.0.  ...but I don't remember if the High Pass filter was in aps3.0 or not.. Nevertheless, you might try this HighPass technique in PSP to see if it works. Unfortunately, I really cannot help much with PSP because I've never used it and am not familiar with its interface.

1. Open your editing software and load your HS.
2. Goto the Channels Palette and make the Red Channel active by clicking *once* on it. Now your on screen image turns into a black & white image, not really, but you are only looking at the Red channel now...therefore the image appears to be in B&W. (See image #1 on the attached sample)

3. Duplicate the Red Channel (in the channels palette) and then make the *copy* active by clicking on it. The copy of the red channel is automatically named and it is probably something like 'Alpha 1.' 
4. On the menubar select:  Filter\Other\HighPass and set the radius to 10 pixels, then press OK.  (see image #2)

5. Open the Levels dialog box (Ctrl+L) and set the following:  Input Levels: 110    1.00    155    Click OK. (see image #3)
6.Take a (hard-edged) solid_black brush and paint in all the gray area that surrounds the perimeter of the hair. (see image #4)

7. Take the magic wand and click once in the black area that you just painted.  (you are still working on Alpha 1 Channel)
8. Save the selection as a new channel. It will be named something like Alpha 2 and look like image #5.

9. Deselect everything (Ctrl+D) and then Invert the channel by pressing Ctrl+I. (see image #6)
10. Load the mask by making sure Alpha 2 is active, and then Ctrl+click on the Alpha 2 Channel.  btw, you just made a couple of masks in case you didn't know it!   LOL

11. Now that the Alpha 2 Channel is loaded, go up to the top of the channels palette and click once on the RGB channel. (This action will turn RGB back on, giving the image its color, AND the marching ants are still in parade formation).  LOL
12. Change over to the Layers Palette and *Layer Via Copy* the HS from the Background Layer onto its own layer. This layer will now contain only the head + hair pixels while the original black background is now transparent. You might have to turn off the eyeball on the Background layer in order to tell that the new HS layer has a transparent background. If everything turned out right, it will be transparent. 

You're done. All that's left is to cleanup the stray black pixels and then 'dragNdrop' the HS cutout onto your BS. Although sometimes moving the HS over to the BS before you clean it up is helpful in saving some time. Especially if the background colors are similar between the original HS background and the BS background.

This is only a quick description of 'one method' of creating a 'hair cutout.' Your individual results will vary according to how efficiently you adopt and implement the methodology. And as with all things digital... your results get faster and better, the more you practice with it, but you already knew that.  hehehhh...

On image #7, the original HS, I've positioned a white background (in place of the original black BG) so you get an idea how effective this technique really is. And as you can tell with the HS against a white BG, it still needs cleaning up as there are still plenty of black pixels in the outline that need removing. These can be removed easily (not necessarily a fast process, but it's easy) by zooming in very close and Shift-click erasing with a brush.

Subject:  Masking hair - the neato info for Paint Shop Pro users
Date:  Thu, 27 Dec 2001 02:30:36 -0800
From:  Cheri Stryker <macha@dancingbones.org>
To:  alt.binaries.multimedia.xena-herc
Now, I'm gonna include the instructions I got from a REALLY AWESOME DUDE who works for Jasc, and is a regular answer guy on the comp.graphics.apps.paint-shop-pro newsgroup.  Name of Kris Zaklika.  By the way, if you use Paint Shop, it is very advised to read this group periodically, or post a "Help!" when you need it.  They love to help.

------------------------
Here's something you can try with the image you posted. The trick is to prepare a version of the image in which the edge of the hair contrasts very strongly with the background. Once you have such an image you can use it to make a mask or selection for your original image to eliminate the background. I've not spent very much time on this but the following should give you the main idea:

1. Take your image and promote it to a layer. This is so that you will later be able to see the background as transparent and put a layer under it with a different background color to check the results of your work.
2. Do Colors > Split Channel > Split To CMYK. You will see that in the black image the hair is almost black while the background is light grey. However, the background is not very uniform. In the cyan image the hair is still quite dark but the background is a rather uniform light grey. We are going to use the cyan image to construct a mask. Close the magenta, yellow and black images without saving.
3. To increase the contrast in the cyan image, duplicate the layer and set the blend mode for the duplicate layer to Overlay. (Toggle the visibility of the top layer on and off to see what this does). Now duplicate the top layer again also setting its blend mode to overlay.
4. Do a Layers > Merge Visible on the three layers above.
5. We need the background to be completely white so do Colors > Histogram Functions > Histogram Adjustment. Use Luminosity and press Reset. Then set the High Clip Limit to 244.
6. In making a mask where the background is invisible but the hair is visible we need to have the background black and the hair white. Do Colors > Negative Image to achieve this.
7. Now we are going to make a mask from this processed cyan image and transfer it to your original image from step 1 via the alpha channel. First do Masks > New > From Image.  (Source is This Window and Create mask is from Source Luminance). Next do 
Masks > Save To Alpha Channel.
8. Click on the title bar of the image from step 1 and do Masks > Load From Alpha Channel. Make sure Available Documents shows the name of your processed cyan image from step 7. Select the mask and press OK.

9. Now you'll see the flyaway hair nicely outlined but, inside the hair, the face is missing. We'll fix that very easily by doing Mask > Edit. Go over the missing area with the Eraser Tool and using the right mouse so it unerases. When you think you've unerased all the interior, toggle Mask > Edit.
10. Do Layers > New Raster Layer and drag it under the layer you have just been working on. With this new layer active flood fill it with something like R 0, G 192, B 0 and preview how your flyaway hair looks over this new background.  If necessary do Mask > Edit and unerase on the upper layer wherever the green shows through where it shouldn't because you missed those bits in step 9.

I've played enough with it to know that you don't need to mess with the Alpha channel, like he mentions in step 7.  You can simply leave your black and white pic open, switch to the original pic, do the Mask - New - From Image, and the source will be the name of the black and white shot (cyan 1, if you're following along with the same pic, step by step) which should show up in the drop down menu.  Much easier for me than involving something I don't really understand, and don't see the need for if I can do it another, easier way.  I do highly recommend following this step by step, with the picture here, at least once.  Once you walk through it, it'll seem ridiculously easy.  And here's the steps. 

Original shot: 
The Mask: 
The final cut-out: 

Subject:  Re: Resurrection Wall
Date:  Wed, 11 Apr 2001 19:47:00 +0100
From:  "Michael Quick" <mike@mquick.freeserve.co.uk>
Newsgroups:  alt.binaries.multimedia.xena-herc
Well, I cheat!

Add a layer mask, and simply paint around the head on the mask with a very large paintbrush, set to soft edge, set to black, about 200 pixels in diameter.

It helps in Photoshop if you drag the image window larger than the actual image, thus creating a 'zone' around the actual image you're working on (Photoshop doesn't enlarge the image to fit the larger window, it just adds 'grey space' around it).

Otherwise you can't get the large brush far enough away from the hair.   I'm just trying to get the very edge of the brush close to the hair.   As mentioned previously I also add a radial gradient fill to the layer mask, centred on the face of the character, thus gradually merging the image onto the background.

I personally don't like hard edged cut outs, almost none of my walls have them.

Incidentally, I suspect Artemis meant 'enlarge' rather than 'enhance'.   I assume she enlarges the image to 500 or 600% and then simply erases the background between the hair manually.   You can do the same with a layer mask, which is more flexible.

Add the layer mask, pick a very small black hard edged brush, zoom in lots <g> and simply paint out the background.   If you accidentally paint out part of the foreground, just switch colour back to white and paint it back in!   You can freely switch back and forth between black and white to remove or add to the image.

Subject:  Re: Resurrection Wall
Date:  Wed, 11 Apr 2001 22:35 +0100 (BST)
From:  philla@cix.co.uk (Penny Hill)
Newsgroups:  alt.binaries.multimedia.xena-herc
 (TekGoNos) wrote:

> Welcome to the club :-)

> Anyone else want to join the we-hate-masking-hair-club?

Well, way back when (just over a year ago, actually <g>) Starman posted me some excellent advice about working on hair, which I've followed ever since.  I tend to use the eraser, but I think it works with layer masks (Corel 

calls them 'clip' masks btw) equally well.  Basically you work down to a smooth edge round the hair then reduce the eraser/brush to a single pixel and use that to quickly work into the lighter areas and the fly away edges.  Then feather the image.  It takes a little practice, but once you've got the hang of it, it gives an effective finish.

And believe me, when you're working on Iolaus's curly mop, you want the result to be effective! <g>

Subject:  Re: Rescue of Deianeira wall - x43896-w-halk_1.jpg
Date:  Sun, 22 Jul 2001 21:24:25 +0100
From:  "Tane" <tane@NOSPAMsfisher66.fsnet.co.uk>
Newsgroups:  alt.binaries.multimedia.xena-herc
<snip>

> With GIMP, you can choose different shaped brushes and use them on the eraser tool--that is how I made most of them...there is a whole collection of circular brushes--some are "fuzzy" and some have a "hard" edge.  Using the "fuzzy" ones will give a faded out effect, and the "hard" ones will give a cut-out effect, so I guess it depends on which brush is used in GIMP.

    Yeah, you can set 'hardness' in PSP too, I always tend to work with the more 'fuzzy' effects, and change the size of the brush rather than the hardness - that way you can get a hard (yet smooth-looking) edge to whatever it is you're working on, does that make sense?

> One question...I've heard people use the term "masks".  Are masks the same thing as an alpha channel?  In GIMP, the er...two-dimensional array that tells what parts of the image are transparent is called the alpha channel, from how I saw it used in a sentance, masks seemed to be the same thing.
 

    Masks = alpha channel.  Pretty much.  There are different terms for the same thing, depending on which software you use.  For example in Picture Publisher, you can edit the Alpha Channel, but in PSP it's all done with Masking.  Basically they all allow you to alter the levels of transparency for a particular 'layer.

> I kept things in different layers...so I could probably fix some of the problems.  I know the far left image has the white lines around it... I think that was because I just used the "color to alpha" filter, and didn't trace around it, but just deleted the trees with the eraser tool.  It was the last component, and I guess I was getting impatient.

    Experimenting is the best way to learn, and just think of what you have learned already, after this one image!  Keeping things in different layers is perhaps the best way of working on a image, that way you can always come back and alter it...  but my philosophy is pretty much 'when a wall is done, it's done'!  Some others like to go back and make changes, I prefer to learn from each wall and then move onto the next one... it all depends on the way you work...

    I also use the eraser to go around the subjects of my layers, and clean up the edges (this is where the 'small fuzzy brush' comes into it) - it's just practice, really.  The more you do it, the tighter you'll get to the edges, and the cleaner they will become.

> > and I have a lot of respect for people who use other, perhaps more limited software because it seems to me that it's a lot harder to do that.
>
> I'm not so sure that GIMP is limited, just my mouse abilities and my patience that need work :)

    Patience, that's definately a trait worth having.  Although with time, and practice, you'll find that things get easier - you'll develop a working style, and the more you do it the more your walls will end up looking the way you thought of them in your minds eye.

 Did you ever see our ZeroTech competition where people made walls out of the most simple software they had (no layers, etc) some people made some amazing stuff with just MSPaint!!!

> Don't tempt me!!! <eg>  I might just have to make a graphics scripting language and use it to edit my captures ;)
>
> i=load "gab_cap.ppm"
> deinterlace i even
> crop i 6,0 750x480
> vertical_strech i 563
> colortoalpha i blue
> nova i 700,50 10 purple
> remove_clothes i
> store i "gab_yummy.jpg"

   Hehehe...  that's the cheating way of smartening up caps!  I have to work on mine by hand!!  Not fun when your reception isn't very good and there's loads of noise within the image ;-)

> But then I haven't learned script_fu either (it's scripting for the GIMP)...it probably does the same type of thing.  ::Wondering if  there is a good tutorial for script_fu::  I guess I'll have to take a better look in gimp.org <eg>

    The more tutorials you can find, on anything graphics related, the better.  There are many people out there with tips and hints to share!

 
Back to Picture Improvement To main Hints 'n Tips page Forward to Text

Or, you could go back, to the main Xena page.

Got something to say?  Whyn't you write? webmail@dancingbones.org

Quoted text copyright their original authors on the date indicated.
All original text and photos Copyright 2002 C. Stryker
Images of Xena, Hercules and other characters, property of USA Networks, Renaissance Pictures, and Xena the Warrior Princess, and Hercules, the Legendary Journeys