Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Masking fine hair to remove background ...

457 views
Skip to first unread message

Mike Trainor

unread,
Mar 15, 2013, 8:12:05 PM3/15/13
to

I used GIMP a littel bit a couple years back and am now rediscovering
it. I have a question about retaining fine image details while
removing the background.

There are many fine tutorials showing a variety of methods for
doing it. But, in practice, I come up a problem due to the
limitations of resolutions. Fine detail, like a single strand of hair
are not easy to isloate as the colour of the background bleeds
in due to the pixelization. Though 'visible' at normal inage size,
when one blows it up, there is no set of pixels that do NOT
contain a bit of the background.

How does one deal with this? I suppose, one can paint in
the colour of the hair along the mixed colour pixels to get
rid of the background contribution to those pixels.

Would be interested as how the pros approach this!

I have highly magnified images of printed patterns from
which I would like to remove the paper partk. The
edges of the patterns are difficult to deal with ...
the only way I can think of dealing with it is the
painting procedure.

Thanks ..

MT

Paolo Gibellini

unread,
Mar 18, 2013, 7:19:33 AM3/18/13
to
> How does one deal with this? I suppose, one can paint in
> the colour of the hair along the mixed colour pixels to get
> rid of the background contribution to those pixels.
Usually one works by enabling a mask and drawing the hairs in the mask.
Paolo

Mike Trainor

unread,
Mar 23, 2013, 7:11:23 PM3/23/13
to
Thanks. That is what I feared. A lot of work ....
I guess that one can try to keep those pixels, but the background
contribution to the colour will mess things up. Better to just get
rid of that kind of stuff for practical purposes, I guess.

Paolo Gibellini

unread,
Mar 25, 2013, 4:32:19 AM3/25/13
to
>Mike Trainor on date 24/03/2013 0.11 wrote:
> Thanks. That is what I feared. A lot of work ....
> I guess that one can try to keep those pixels, but the background
> contribution to the colour will mess things up. Better to just get
> rid of that kind of stuff for practical purposes, I guess.
>
Some people uses "hairy" brushes for this purposes.
Paolo

Paolo Gibellini

unread,
Mar 25, 2013, 7:51:50 AM3/25/13
to

chris

unread,
Mar 26, 2013, 4:48:03 AM3/26/13
to
masking fine hair is also a problem for me so thanks a lot for the links
Paolo.




"Paolo Gibellini" <p.gib...@gmail.com> wrote in message
news:kipdok$dus$1...@speranza.aioe.org...

Mike Trainor

unread,
Mar 30, 2013, 10:03:59 AM3/30/13
to
On Mon, 25 Mar 2013 12:51:50 +0100, Paolo Gibellini
<p.gib...@gmail.com> wrote:

>A few tutorials for Gimp or Photoshop:

Thanks.
Had seen most of them for I googled quite a bit!

>http://www.gimpusers.com/tutorials/mask-hair-strands
>http://easytweaks.wordpress.com/2011/04/15/how-to-extract-hair-from-background-using-gimp/

Had seen these two and used both. The contrast between the hair helps,
but the problem of some of the background coming through in the second
one (grays) and editing the imperfections is the hard part (Step 11)
that cannot be avoided, I guess. Also, the very high contrast in
the starting picture helps.
Black against white does help! This is new to me as I looked only for
GIMP pages.

>http://planetphotoshop.com/selecting-frizzy-hair.html

This one in interesting. I will try it out. I need to work out the
equivalent of the 'Extract' in GIMP.

>http://photoshopcontest.com/tutorials/9/masks.html

Now, this is good! There is not much contrast between the
hair and the background. Will look into it. I had not come
across this page before.


>Hope it helps,
> Paolo

Yes! Thanks.

mt

rich

unread,
Mar 31, 2013, 4:50:06 AM3/31/13
to
<snip>
>
>>http://photoshopcontest.com/tutorials/9/masks.html
>
> Now, this is good! There is not much contrast between the hair and the
> background. Will look into it. I had not come across this page before.
>
That is just using the PS equivalent of the quick mask. Select -> Toggle
quick Mask

Sometimes the only way but it does involve a lot of work

quote Use very small , soft brushes for thin hairs, unquote

Once you have the selection, various ways to go, make into a mask, save
as a channel.

chris

unread,
Apr 2, 2013, 3:03:22 PM4/2/13
to
"Mike Trainor" wrote

>
>>> How does one deal with this? I suppose, one can paint in
>>> the colour of the hair along the mixed colour pixels to get
>>> rid of the background contribution to those pixels.
>>Usually one works by enabling a mask and drawing the hairs in the mask.
>>Paolo
>

found some video's on youtube

http://www.youtube.com/watch?v=AnbxtMCHKV0

http://www.youtube.com/watch?v=2V_07KjT-VY

http://www.youtube.com/watch?feature=endscreen&v=LCfw-Jk0m3Y&NR=1

looks great and easy, but I have to try it first.
But learning this method will help me a lot anyway.


Paolo Gibellini

unread,
Apr 3, 2013, 4:29:14 AM4/3/13
to
>chris on date 02/04/2013 21.03 wrote:
> found some video's on youtube
>
> http://www.youtube.com/watch?v=AnbxtMCHKV0
>
> http://www.youtube.com/watch?v=2V_07KjT-VY
>
> http://www.youtube.com/watch?feature=endscreen&v=LCfw-Jk0m3Y&NR=1
>
> looks great and easy, but I have to try it first.
> But learning this method will help me a lot anyway.
>
>
Nice tutorials.
The first one is very simple to use and although the use of the clone
tool could lead to a loss of precision, you can get good results.
Thank you for sharing them.
Paolo

Mike Trainor

unread,
Apr 6, 2013, 2:10:36 PM4/6/13
to
Chris, In the end, I realized that one cannot mask all the details.
Fine image details, like single strands may be smaller than a pixel
of the original capturing device and so it may contain a colour that
is not just the hair colour, but also a bit of the background (say,
blue sky).

Now, it appars that one is stuck. If you keep the pixel, you are
going to get some of the blue. If you do not, well, you loose it.
So, if you are going to put it against another background colour,
you may pretty much have to give up on that level of detail.

The process in

http://www.gimpusers.com/tutorials/mask-hair-strands

is really very good. But on a closer look, I realized that even though
many incredible details survived, an entire lock of hair, is gone!
(Upper left in the processed picture, on a line connecting the tip of
her nose and her riight eye). I guess that part of the hair could not
be turned white enough for masking.

But, I am now pretty convinced that the kind of detail I was looking
at cannot be masked properly as the background is mixed up with
the pixel containg the image.

mt
year

chris

unread,
Apr 8, 2013, 6:57:45 AM4/8/13
to
"Mike Trainor" wrote

> Now, it appars that one is stuck. If you keep the pixel, you are
> going to get some of the blue. If you do not, well, you loose it.
> So, if you are going to put it against another background colour,
> you may pretty much have to give up on that level of detail.

yep, that's the problem.

> The process in
>
> http://www.gimpusers.com/tutorials/mask-hair-strands
>
> is really very good. But on a closer look, I realized that even though
> many incredible details survived, an entire lock of hair, is gone!
> (Upper left in the processed picture, on a line connecting the tip of
> her nose and her riight eye). I guess that part of the hair could not
> be turned white enough for masking.

well, maybe the hair has survived it almost but the sparkling of her
eyes is gone. Overall the colours are not as bright anymore.
I have to cut the head without the hair from the original
picture and paste it in the result to get a more acceptable result.
That's for me more important then missing that lock.

> But, I am now pretty convinced that the kind of detail I was looking
> at cannot be masked properly as the background is mixed up with
> the pixel containg the image.

I tried the magic wand with a lot of settings to try to completely delete
the backgroud or the eraser which allowed me to slowly remove the
background pixels pixel by pixel but that's very time consuming and don't
give me the nice detailed results I hoped for.

The masking method works a lot faster and I'm happy with the results.
I get better results this way.
You always can ask the maker of the picture if he/she has a version
without any background ;-) but that's no serious option.

You already wrote it "the background is mixed up with the image".
But if you don't blow up your pictures to poster size most of the time
only you know it's not perfect.

Never used it, but you can treat the result with the healing tool for
wrinkles and the burn tool for the hair.
The first results aren't promissing for me so far.

Trial and error, a lot of spare time, and hoping I remember what I
did when I get a result I'm happy with.
Happy, not perfect!



Mike Trainor

unread,
Apr 8, 2013, 8:25:39 AM4/8/13
to
On Mon, 8 Apr 2013 12:57:45 +0200, "chris" <no...@nono.nope> wrote:

>"Mike Trainor" wrote
>
>> Now, it appars that one is stuck. If you keep the pixel, you are
>> going to get some of the blue. If you do not, well, you loose it.
>> So, if you are going to put it against another background colour,
>> you may pretty much have to give up on that level of detail.
>
>yep, that's the problem.
>
>> The process in
>>
>> http://www.gimpusers.com/tutorials/mask-hair-strands
>>
>> is really very good. But on a closer look, I realized that even though
>> many incredible details survived, an entire lock of hair, is gone!
>> (Upper left in the processed picture, on a line connecting the tip of
>> her nose and her riight eye). I guess that part of the hair could not
>> be turned white enough for masking.
>
>well, maybe the hair has survived it almost but the sparkling of her
>eyes is gone. Overall the colours are not as bright anymore.
>I have to cut the head without the hair from the original
>picture and paste it in the result to get a more acceptable result.
>That's for me more important then missing that lock.

Interesting! As one is painting the face, etc. in, all that should
come out exactly as the original. I can understand that there
may be shifts in the part of image where the "white' part of
the mask was obtained by using filters, etc., but the part
painted in with a brush should be 100% opaque and so should
be the same as the original.

>I tried the magic wand with a lot of settings to try to completely delete
>the backgroud or the eraser which allowed me to slowly remove the
>background pixels pixel by pixel but that's very time consuming and don't
>give me the nice detailed results I hoped for.

It cannot, for the reason I gave -- there are pixels that are neither
pure image or pure background.

>You already wrote it "the background is mixed up with the image".
>But if you don't blow up your pictures to poster size most of the time
>only you know it's not perfect.

Agreed. And a person who has not seen the original is not going
know (unless he/she is a super-expert in this kind of analysis).

thanks

mt

Mike Trainor

unread,
Apr 8, 2013, 8:29:35 AM4/8/13
to
I came across all of them and tried the first one. Works good
on some images and did a reasonable job of mine. As the
microscope was using back illumination, I have pretty good
contrast.

Like the first one best. (Great accent, too!)


0 new messages