It is currently Fri Apr 26, 2024 5:17 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: How to remove the background from hair
PostPosted: Sat Jul 02, 2011 11:22 am  (#1) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
This is a text tutorial on how to remove the background from hair made from Jolie's video by the same name.
www.youtube.com Video from : www.youtube.com


We will be using Layer Mask, Clone tool and the burn tool.

Ok, we will start by opening an image. I am using the same one that is in the tutorial because it is a nice one.

Image
Right click on your layer image and click add alpha channel
- Duplicate layer. On this layer (the top one) colors > curves. Use settings in image below.
Image
Play around with the curves until you get the background as white as you can get it, click OK
Same Layer > colors > desaturate > Luminosity > click OK (check image below)

Image

The layer mask will show everything that is white, the layer mask will shine through. Everything that is black in the layer mask will be masked. We want the face to shine through so we go to colors > invert > now her hair is white and her face is black.
Go to the paint brush tool, :brush make FG color white, Paint her face and neck white. Now paint all the gray areas of the hair white.
Go to the bottom layer > right click > add layer mask > white (full capacity) click add.. (check image below)

Image
Click on top layer > edit > cut click on the layer mask > edit > paste.
A floating selection will be created in your layer dialog. Click on the anchor floating layer item below, so now you have created a layer mask (image below)

Image
Make a new layer, fill with black and put it at the bottom of the stack. When you turn on this layer and zoom in, :zoom you will see the gray areas still in the hair. We want to get rid of those.
To fix this, you can use the clone tool :clone to clone the edges.
Click on the image layer, not the mask (image below)

Image
Ctrl click on a bit of hair, paint over the gray areas. (If it is too dark or too light, ctrl-click on a different area of the hair.
Take you time cloning. Zoom in again to see if you can see anymore background (the gray areas)
You can also use your burn tool :burn instead of, or in addition to cloning you can use this tool to fix the residual gray/blue from the background.

Image

_________________
Image


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: How to remove the background from hair
PostPosted: Sat Jul 02, 2011 11:38 am  (#2) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Nice job, Molly!

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Sat Jul 02, 2011 3:49 pm  (#3) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4047
Thumbs up, Molly. Good job! :bigthup :jumpclap :clap

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Sat Jul 02, 2011 5:07 pm  (#4) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
thanx "O" and Mahv.....

I would love to see some results from you talented people. :teeth

_________________
Image


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Mon Jul 04, 2011 11:43 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2011
Posts: 395
Location: Indianapolis, IN
I used this tutorial before with fairly good results! I have a photo were the subject was flashed lit well but the background is darker.

What would have to change to follow the same steps in the tutorial?

This is my ugly mug from a number of years ago, although not to far in the distant past! :hehe

My Test Subject

Thanks for the help!

_________________
"That which does not kill us makes us stronger." ~ Friedrich Nietzsche


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Mon Jul 04, 2011 11:55 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
I need to try this again. I tried it a year or so ago and it didn't work very well for me. Mostly because I don't have pics that have a plan background which makes it hard to get the contrast needed, and also because doing the cloning looks awful when I try it. .


Last edited by 2-ton on Mon Jul 04, 2011 12:24 pm, edited 1 time in total.

Top
 Post subject: Re: How to remove the background from hair
PostPosted: Mon Jul 04, 2011 12:22 pm  (#7) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Go to Bing and type in hair, or beautiful hair etc and it will come up with hundreds... There are some nice ones of Carry Underwood, her hair is fantastic......
http://www.bing.com/images/search?q=car ... &form=QBIR

_________________
Image


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Mon Jul 04, 2011 1:00 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2011
Posts: 395
Location: Indianapolis, IN
Uh, question wasn't answered. I'm interested on what to do if the background is dark and the subject is well lit.

2-ton wrote:
I need to try this again. I tried it a year or so ago and it didn't work very well for me. Mostly because I don't have pics that have a plan background which makes it hard to get the contrast needed, and also because doing the cloning looks awful when I try it. .


I agree sir. A non-planned background is way harder. Then again maybe I'm expecting quicker results then the work needed.

_________________
"That which does not kill us makes us stronger." ~ Friedrich Nietzsche


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Mon Jul 04, 2011 1:36 pm  (#9) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Were you able to make a better contrast using the curves too?

_________________
Image


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Mon Jul 04, 2011 2:38 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
I think my main problem is that I am trying to use lower resolution pics, a high res pic would make it a lot easier to get the fine hairs around the edges of the hair. Somewhere there is a high-pass method. I think a combo of both methods would work best.


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Mon Jul 04, 2011 3:14 pm  (#11) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4047
One way I defeat dark backgrounds is to desaturate the image with lightness, do an auto levels, and then perform Colors/Curves on the image until I have maximum lightness of the subject's outline (body and hair) WITHOUT blending into the background. Once I have that, I create a thick black outline around my subject (be careful not to blacken out the hair portion). When I am happy with my black outline, I run Colors/Threshold to fine tune the outline further. Now you can select the outline with the magic wand and fill with white, invert the selection and fill the background with black. This reads like its a lot of steps, but its a basic method in creating a black and white mask.

And since its being used as a mask, you can make adjustments (only two colors to worry about) directly on the image mask, without affecting the actual image.

Image

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Mon Jul 04, 2011 3:17 pm  (#12) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Looks good Mahv...

_________________
Image


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Thu Jul 07, 2011 8:40 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2011
Posts: 395
Location: Indianapolis, IN
Thanks mahvin!

Although I may have made 'me' just a bit to white. Hardest part was defining the bold black background since the background was really dark to start with. But I accomplished what I set out for!

On a side question is that pencil sketch of you a filter/plugin or was it drawn? I an see a signature in the lower right corner so I'm guessing drawn. I was trying to pencil sketch myself but I just really don't like the results.

_________________
"That which does not kill us makes us stronger." ~ Friedrich Nietzsche


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Thu Jul 07, 2011 11:42 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
That is an awesome tutorial by Jolie
It's a great way for folks to learn about the threshold tool, curves, and levels.You can do much more with those 3 tools than people realize.

For instance smoothing sharp fonts with the levels tool. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Thu Jul 07, 2011 12:21 pm  (#15) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4047
Your entire body should be white, your background black, because a mask basically says, "show me everything white, and make everything black, transparent" this way you can change the entire background behind you, with ease.

MrBiggz wrote:
On a side question is that pencil sketch of you a filter/plugin or was it drawn? I an see a signature in the lower right corner so I'm guessing drawn. I was trying to pencil sketch myself but I just really don't like the results.


That was drawn by Ramon, who was featuring his new contest. He's a great guy and excellent artist. Also created GIMP Paint Studio, also featured on his blog:

http://www.ramonmiranda.com/2011/05/wee ... ahvin.html

There are also several pencil sketch methods that work great, some were converted to scripts. I prefer the manual method as it gives me greater control of the output. I'm not sure if it's posted as a tutorial on Gimp Chat, but I did one for Paint Shop Pro, years ago. The same process can be converted to GIMP, easily.

Duplicate your image, on the copy, desaturate it with lightness.

Do an auto-level on the copy (Colors/Levels).

Duplicate the copied layer, and on that copy, invert it (Colors/Invert) then change the layer mode to Dodge.

On the inverted layer, run Gaussian blur of 15px. (Edit/Copy visible)

Then Edit/Paste Image as/New Layer.

You can lower the blur amount (thins the lines) or raise the blur amount (thickens lines).

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: How to remove the background from hair
PostPosted: Thu Jul 07, 2011 1:02 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2011
Posts: 395
Location: Indianapolis, IN
Ah! Ok! Thanks for the info! I'm far from an artist. I got trouble drawing a box. =|

I'll give that method a try too! Cheers!

_________________
"That which does not kill us makes us stronger." ~ Friedrich Nietzsche


Top
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) AI Remove image background(use rembg)

49

No new posts Attachment(s) Use of Fuzzy Select tool to remove white background from black text

2

No new posts Attachment(s) Remove white background but keep white inner

6

No new posts Attachment(s) How I Created The Hair In My Sketch Portraits

9

No new posts Attachment(s) New filter using Gimp&Gmic: PAINT with HAIR LOCKS

26



* Login  



Powered by phpBB3 © phpBB Group