Jump to content

Cleaning the background of a picture


Recommended Posts

Hello everyone,

 

Newbie here so please bear with me if the question is basic.

 

Using PDN 4.1.3

Did read the FAQ, Popular Feature requests and online help.

Also searched the forum and Plugins section.

Maybe my word choice is not appropriate...

 

Just think that it's a "behind the keyboard" problem...

?

 

What I am doing:

As the title say I am currently cleaning the background of pictures for a collage.

Magic wand takes cares of about everything easely.

Purely white background pictures helps a lot.

 

My problem:

Subects in my picture has long, fluffy hair.

Lot's of "white background" get's in there.

 

I can zoom in and Magic Wand white spots individually but it's time consuming.

Did try the "Recolor" tool to get white replaced with... Nothing.

No success.

 

Question:

Any way I can select portion of the hair and ask PDN to replace white with nothing?

Other than zooming in and do it manually with the Magic Wand?

 

All help will be appreciated.

 

 

-----

Nice piece of software.

?

Link to comment
Share on other sites

Hello @K272 and welcome to the forum :)

 

There is a Plugin that you may want to try:

 

https://forums.getpaint.net/topic/26533-stray-pixel-remover/

 

 

How to install Plugins can be found here.

 

 

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

Hi @Pixey,

 

Thank you for the reply.

 

Unfortunately the "Stray Pixel Remover" plugin removes pixels surrounded by transparent ones.

 

Plugin intro:

When I use the magic wand, some pixels aren't deleted.

The plugin deletes them, if they are surrounded by transparent pixels.

 

In my case the white areas are surrounded by other colors, those of the hair.

Need a tool or process to replace the white pixels by transparent pixels.

Kind of a selective eraser if I can say so.

 

Will continue to search the forum.

 

Link to comment
Share on other sites

I already have all of Boltbait plugins installed.

Just don't see what Remove Dust does.

?

 

HSV Eraser looks very interesting.

I will explore.

 

Reading the HSV Eraser topic got me to Grim Color Reaper and Cut Color.

Grim Color Reaper was updated by Kill Color Keeper.
 

HSV Eraser, Kill Color Keeper, Cut Color.

I have plenty to play with and test.

 

Remove Dust...

I need to try & understand the plugin.

Reading reading...

 

Thank's for the notes to both of you.

Appreciated.

 

Link to comment
Share on other sites

XMario's Cut Color plugin is the one to try I think but I doubt with fine detail like hair you are going to get it to look perfect.

 

Cut Color can remove colour as background. I've tried it recently on a very irregular title logo for a video game I wanted to cut out. It had a white background but the logo itself also had pale, almost white elements too and the wizard tool simply couldn't discriminate between that and the background. I tried creating high contrast b/w negative masks (an age old photographic technique) but it was still far from satisfactory.

 

However the Cut Color plugin with the tolerance setting at minimum worked better. Not perfect either as it left a very ragged edge around everything, but it cleaned up reasonably well with an anti-aliasing tool. Put it against a dark background it does look like a still from one of those old films which used a running matte to mix studio and location footage. Fine detail, particularly hair, was always a problem with that technique too but against a light background, which is what I wanted it for, it was good enough at the final image size I was using.     

IHaveNoName.png

Link to comment
Share on other sites

Quote

However the Cut Color plugin with the tolerance setting at minimum worked better.

 

Still testing Cut Color, HSV Eraser and Kill Color Keeper.

 

Each one is interesting in his own way "if I select the part of the picture to be processed".

I can easely live with having to select hair to get it free of white background spots.

 

Up to now Kill Color Keeper (RGB at 255 and tolerance to 20) is the one giving me the best "easy" results.

No selection, I process the whole picture to remove the white background.

Get's the hair free of white spots at the same time.

 

But then... Does it affect the subject colors in any matter?

Not from what I see but I'm still testing.

 

Guess I'm lucky that my subjects does not have pure white clothes.

?

 

-----

HSV Eraser has too many options for the newbie I am.

Hue, Saturation, Value and RGB tolerance...

I am guess working.

 

Need to do some reading to understand allt of this.

 

Cheers!

Link to comment
Share on other sites

1 hour ago, K272 said:

But then... Does it affect the subject colors in any matter?

Not from what I see but I'm still testing.

 

The only ill effect, if any, would probably be that some of the nearly-white colors in the subject will be made semi-transparent. In Pratyush's example, you can see that in the second image, where the witch's legs are made partially transparent.

 

A method to deal with this is to first duplicate the image into a lower layer, then use the Magic Wand (with a somewhat high tolerance), the Eraser, and other such tools to over-erase the background section, being careful not to erase the nearly-white areas of the subject that might be affected by Kill Color Keeper, but otherwise removing both the background and the edge of the subject. Now apply the plugin to the upper layer. The lower layer will fill in the partially-erased regions. Merge the layers.

Link to comment
Share on other sites

Quote

some of the nearly-white colors in the subject will be made semi-transparent

 

Yep, saw that at 1000 zoom with Kill Color Keeper.

Gee... Semi-transparent skin on the arms...

 

Cut Color leaves "strange spots" here and there...

Saw that when putting the picture on a dark red background.

 

I'm currently testing your first suggestion @MJW.

For now HSV Eraser gives a nice result with lasso selection.

 

Just need to understand what I'm doing.

Current settings I am using:

@HSVEraser.jpg.25d4fb991efb71aa2221adfcaf1ed30a.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Cheers!

 

Edited by K272
Link to comment
Share on other sites

Quote

Now apply the plugin to the upper layer. The lower layer will fill in the partially-erased regions. Merge the layers.

 

In such cases I copy - paste from the original picture, same zoom, then work on that small portion of the picture.

Slowly finding my way around it.

 

Quote

it's usually best to set Portion of Non-Erased Color to Preserve to 1.00

 

Noted, thanks!

 

Edited by K272
Link to comment
Share on other sites

Hi again,

 

Still clearing background of pictures...

Getting better at it I must say.

 

Sometimes I just need to clear some edges by hand.

At least the human eye is still a necessity.

?

 

Out of selecting individual dots and then inverting the selection (Ctrl+I) to delete the background I just can't seem to be able to clean edges correctly.

At least not without leaving semi-transparent dots behind.

 

Is there a way to tell the Eraser to be a "good little eraser"?

Not to leave semi-transparent dots at the edges?

Did try with a hardness of 100%.

 

Rectangle and other shapes for selection are just not a fit for my need.

Lasso selection also leaves semi-transparent dots and is not as nice a result as an eraser touch.

 

Any suggestion will be appreciated.

 

Regards.

 

Edited by K272
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...