RetouchPRO

Go Back   RetouchPRO > Technique > Photo Compositing
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photo Compositing Collage, montage, masking, selections, combining, etc.

Masking Diffucult hair

Reply
 
Thread Tools
  #1  
Old 04-24-2006, 08:28 AM
tb5821 tb5821 is offline
Member
 
Join Date: May 2005
Posts: 87
Masking Diffucult hair

Alright guys I have tired everything i can think of but just cant seem to get a good mask here with the hair....

http://www.silverscreencreations.com/images/hair.jpg
Reply With Quote top
  #2  
Old 04-24-2006, 11:06 AM
bart_hickman's Avatar
bart_hickman bart_hickman is offline
Senior Member
 
Join Date: Nov 2005
Location: Oregon, USA
Posts: 479
That's pretty tiny, but this one is tough along her upper left hair--the background is varied and the contrast is poor. I used the extract filter along her right side because it's real easy. I used a quick polygonal lasso with feathering on her left shoulder. Then I used a fairly typical masking method with a defringing step for her left hair (I'm talking her left side). The image is noisy and poor contrast, so the mask doesn't come out so great so I use a charcoal brush to erase or smudge the mask as needed to smooth things out and make it look good. Sometimes a little bit of cloning or color brushing on the fringe areas helps with decontaminating--I didn't a very small amount of that too. Did a pretty quick job and I don't know how good you really need it--could take a couple extra steps to preserve more of the wispies from her left hair--probably 10-15 minutes more time (as it is, it took about 20 minutes). A larger original would also simplify wispy preservation.

Bart
Attached Images
File Type: jpg extract-hair.jpg (22.5 KB, 103 views)
Reply With Quote top
  #3  
Old 04-24-2006, 11:58 AM
tb5821 tb5821 is offline
Member
 
Join Date: May 2005
Posts: 87
Thanks for the reply, here is a better quality image...

http://www.silverscreencreations.com/images/hair2.tga
Reply With Quote top
  #4  
Old 04-24-2006, 12:57 PM
tb5821 tb5821 is offline
Member
 
Join Date: May 2005
Posts: 87
Quote:
Originally Posted by bart_hickman
That's pretty tiny, but this one is tough along her upper left hair--the background is varied and the contrast is poor. I used the extract filter along her right side because it's real easy. I used a quick polygonal lasso with feathering on her left shoulder. Then I used a fairly typical masking method with a defringing step for her left hair (I'm talking her left side). The image is noisy and poor contrast, so the mask doesn't come out so great so I use a charcoal brush to erase or smudge the mask as needed to smooth things out and make it look good. Sometimes a little bit of cloning or color brushing on the fringe areas helps with decontaminating--I didn't a very small amount of that too. Did a pretty quick job and I don't know how good you really need it--could take a couple extra steps to preserve more of the wispies from her left hair--probably 10-15 minutes more time (as it is, it took about 20 minutes). A larger original would also simplify wispy preservation.

Bart
I'm afraid I'm going to need some more detailed steps, I just cant seem to get those wispy hairs......
Reply With Quote top
  #5  
Old 04-25-2006, 07:10 AM
bart_hickman's Avatar
bart_hickman bart_hickman is offline
Senior Member
 
Join Date: Nov 2005
Location: Oregon, USA
Posts: 479
I need a feel for what it is you're having trouble with. Are you familiar with the Russel Brown advanced masking tutorial here (scroll to the bottom to find it.)

http://www.russellbrown.com/tips_tech.html

I follow basically the same procedure here except I create contrast between foreground and background a bit differently and I do an extra step to remove background contamination from the edges of the hair (aka defringing). However, if the new background will be somewhat similar in color and brightness to the old background or if the new background is busy enough, you can often skip defringing.

Fig1 shows the layer stack I use to get the greyscale mask. I put it all into a group so I can turn it all on and off for brief looks at the original. At the bottom of the group is the original image. Then next layer is a color sample taken from the door on her right--the blend mode is difference. This will make an image that is black in that part of the background. The next layer up is a channel mixer set to 33/33/33/monochrome. This translates the color contrast into greyscale contrast. The top layer in the group is a curve layer that I just use to amplify (sometimes attenuate) the greyscale result so the foreground has just the right amount of contrast. Fig 1b shows how the curve looked in this case.

I like this particular method because it utilizes the information all three color channels to create distinction between foreground and background.

You repeat this procedure a few more times for the different background colors around her head--you don't have to do EVERY color, just general color regions is good enough. The curve is readjusted each time. When I'm done, it looks like Fig2. Notice the right side of the hair mask (her left side) is sort of chunky-looking. This is due to very low contrast between her hair and the background--ie., that difference was amplified and so the noise gets amplified too. Worry about that later.

Fig 3 shows how it looks with this mask applied to the original image and a white background added underneath. I just found a stiple brush and used it to do a bit of smudging on the mask until the hair wisps look a bit smoother. That result is Fig 4.

That's about it except her left hair is showing fringing from the dark background which makes it look a bit unnaturally dark on the white background. This can be partly fixed by simply adjusting the exposure of the girl to match the background. It can also be fixed directly. Let me know if you need this fixed as well. I'm not quite sure if I'm answering your question!

To see the figure numbers, hover your mouse over the attachment thumbnails to see the filename which has the figure numbers in it.

Bart
Attached Images
File Type: jpg fig1_contrastgroup.jpg (30.8 KB, 47 views)
File Type: jpg fig1b_contrastcurve.jpg (23.6 KB, 28 views)
File Type: jpg fig2_mask1_v1.jpg (20.0 KB, 37 views)
File Type: jpg fig3_splotchy.jpg (43.7 KB, 23 views)
File Type: jpg fig4_smudge_mask.jpg (42.9 KB, 44 views)

Last edited by bart_hickman; 04-25-2006 at 07:15 AM.
Reply With Quote top
  #6  
Old 04-25-2006, 04:39 PM
tb5821 tb5821 is offline
Member
 
Join Date: May 2005
Posts: 87
Quote:
Originally Posted by bart_hickman
I need a feel for what it is you're having trouble with. Are you familiar with the Russel Brown advanced masking tutorial here (scroll to the bottom to find it.)

http://www.russellbrown.com/tips_tech.html

I follow basically the same procedure here except I create contrast between foreground and background a bit differently and I do an extra step to remove background contamination from the edges of the hair (aka defringing). However, if the new background will be somewhat similar in color and brightness to the old background or if the new background is busy enough, you can often skip defringing.

Fig1 shows the layer stack I use to get the greyscale mask. I put it all into a group so I can turn it all on and off for brief looks at the original. At the bottom of the group is the original image. Then next layer is a color sample taken from the door on her right--the blend mode is difference. This will make an image that is black in that part of the background. The next layer up is a channel mixer set to 33/33/33/monochrome. This translates the color contrast into greyscale contrast. The top layer in the group is a curve layer that I just use to amplify (sometimes attenuate) the greyscale result so the foreground has just the right amount of contrast. Fig 1b shows how the curve looked in this case.

I like this particular method because it utilizes the information all three color channels to create distinction between foreground and background.

You repeat this procedure a few more times for the different background colors around her head--you don't have to do EVERY color, just general color regions is good enough. The curve is readjusted each time. When I'm done, it looks like Fig2. Notice the right side of the hair mask (her left side) is sort of chunky-looking. This is due to very low contrast between her hair and the background--ie., that difference was amplified and so the noise gets amplified too. Worry about that later.

Fig 3 shows how it looks with this mask applied to the original image and a white background added underneath. I just found a stiple brush and used it to do a bit of smudging on the mask until the hair wisps look a bit smoother. That result is Fig 4.

That's about it except her left hair is showing fringing from the dark background which makes it look a bit unnaturally dark on the white background. This can be partly fixed by simply adjusting the exposure of the girl to match the background. It can also be fixed directly. Let me know if you need this fixed as well. I'm not quite sure if I'm answering your question!

To see the figure numbers, hover your mouse over the attachment thumbnails to see the filename which has the figure numbers in it.

Bart
Thanks so much!! it worked pretty good after a few tries, although I would like to directly fix the fringing, what is the best way to go about it?
Reply With Quote top
  #7  
Old 04-26-2006, 01:02 AM
bart_hickman's Avatar
bart_hickman bart_hickman is offline
Senior Member
 
Join Date: Nov 2005
Location: Oregon, USA
Posts: 479
Quote:
Originally Posted by tb5821
Thanks so much!! it worked pretty good after a few tries, although I would like to directly fix the fringing, what is the best way to go about it?
I'm going to describe the method that is by far the easiest to understand and explain (I swear I'll do a tutorial on this someday!) First, let's look at how I construct the basic mask extraction (no defringing yet) in the layer stackup--figure 1.

I like to containerize things into groups. So you see I have a group called "Result" which contains the entire final image--keeps it separate from all of my mask creation stuff I described in my previous post. Because it's in a group, I can quickly flip it on and off to compare with the original so I can see how I'm doing. Inside that group is another group called "Extract Group" and I have applied my mask (call it mask 1) to that group so that everything I put in that group gets masked (you'll see why that's handy in a minute.) For now, all it has is the original image. Under that group is the new background which is just plain white.

Now it's time to remove the dark fringe. Create a new blank layer above the original as shown in fig 2. Now, do the following steps:

1. Ctrl-click the mask thumbnail on the extract group--this generates a selection (marching ants) from the mask
2. Go to menu "select->modify->contract". Choose 4 pixels.
3. Go to menu "select->feather". Choose 1
4. Go to menu "select->inverse".
4. Select the blank layer thumbnail (called "defringe" in fig2).
5. Click the create mask button in the layer palette--this puts your selection into a mask.

You've created a second mask (call it mask 2) that is like the first except it is inverted and the object silhouette is shrunken and has some extra feathering. The combination of mask 2 and mask 1 effectively creates a fringe mask--everything you paint on that blank layer will be constrained to the fringe area near the edges of the hair. The layer stackup should now look like fig 3.

What happens next is incredibly variable, but for this simple case, I just used the clone tool (be sure to check "sample all layers"). Sample some hair, then paint on the fringe areas. You are simply covering the dark fringe with color from the body of the hair. The double mask allows you to be real sloppy--if you have a steady artistic hand, you could probably do without mask 2 for this simple case. The result is shown in fig 4 (white background) and fig 5 (black background). It looks just as good on any other color/texture/photo background.

Note that sometimes the exposure of the object simply doesn't look right with the new background. In such cases, just put a curve adjust layer at the top of the extract group. In this case you now have Mask 1 applied to three layers and so the benefit of the group is more obvious.

For complex scenarios, I might process and blend the defringe area (blur/highpass) in a way that allows me to alter the overall color and brightness of the fringe while keeping the original texture (this in itself could be a short tutorial, so I won't get into it here.) In this case, it didn't matter--simple cloning or even just brushing works.

At this point, it's a good idea to try the result on different backgrounds to make sure it looks good, but I think you'll find it looks natural on all backgrounds. If it doesn't, you can do a bit more cloning or painting or possibly even redo mask 2 with different amounts of contracting and feathering. With practice, you'll understand how to set these values.

For the benefit of Elements users, you can get along without groups by using clipping masks. It's more time consuming, but then what'd ya expect for 70 bucks?! . Paintshop Pro users can apply the method directly with little translation.

And that's it! Long-winded explanation for a pretty simple method. I call it and all similar methods the "two-mask method."

Bart
Attached Images
File Type: jpg fig1_extractstack.jpg (24.2 KB, 20 views)
File Type: jpg fig2_extractstack2.jpg (27.6 KB, 20 views)
File Type: jpg fig4_resultwhite.jpg (42.3 KB, 26 views)
File Type: jpg fig5_resultblack.jpg (43.8 KB, 35 views)
File Type: jpg fig3_extractstack3.jpg (31.7 KB, 18 views)

Last edited by bart_hickman; 04-26-2006 at 01:09 AM.
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo Compositing


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Masking Hair (link) Doug Nelson Non-RetouchPRO Resources 7 05-16-2011 01:14 PM
Help ! Problem with Masking Technique wolverine Photo Compositing 3 11-07-2006 09:48 AM
Bad hair day ... !! Jiger Image Help 26 08-11-2005 08:39 AM
Hair Masking jaz Photo Compositing 5 12-02-2002 09:51 AM
Masking Hair using Apply Image DannyRaphael Photo Compositing 4 07-20-2002 08:57 PM


All times are GMT -6. The time now is 05:02 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved