Jump to content
You must now use your email address to sign in [click for more info] ×

Removing White Background


Recommended Posts

Hi,

 I am little bit frustrated with masking the white background in affinity photo, so I came to ask for help here.

I have an image(s) 18mpx with model (hips and above) and I am trying removing the white background (I have pure white background).

I found the best way for the body shape to use the pen tool but it is way too slow (ok I have about 40 images I need to remove the background from).

So I tried thinks like background removal, color range selection, flood tool with lots of settings... and everything resulted in lost of background bud the shape was saw like (not smooth at all). When I smoothed and shrinked the selection it helped a little but nothing close to the pen cut.

And then - the Refine selection for head and hair. I do not mind that at the end it has some whitish semitransparent rims/area around hair ends, but fighting the semitransparent areas with foreground and background is nightmare - you edit one place with background and it add automatically something new to it behind the edge etc. (sure i can do some of it later with editing mask, but the edges with hair and hairs I do not want to do pixel by pixel). I can fix the hair itself by darkening it, using Clone ets. but the areas of the glow will be there and also look unnatural (I can cut some of it with masking for sure).

I am adding several image to see what I mean - 100% crops: 1 - original, 2 - saw like cut,  3 and 4 - background taken, smooth, shrinked, 5 - semitransparent within refine selection, 6 - results of refine selection.

Probably I do everything wrong, but I have not found any tutorial that works this way (or better say - showing, how to fix it). So please, do you have any help to poor myself?

Currenty I have some reasonable result within 40-60 minutes per image, so if there could be something that speeds the process 

Any helpful help is payed saves me to get old too soon.

 

Regards

 Jiri

 

 

1.png

2.png

3.png

4.png

5.png

6.png

Link to comment
Share on other sites

You're not alone! I've tried & tried to get good sharp & yet smooth cut edges with the other selection tools to no avail. I don't know how many times I watched the selection tutorials. I finally decided the pen tool is the way to go in order to achieve the edges I want. That being said though, I do use the selection brush tool some and then finish it up with the pen tool. I was just really pleased to discover how well the pen tool worked, saves me hours of work! :29_smirk:

Hopefully someone can help you out!

Link to comment
Share on other sites

Without the image, it's difficult to find a solution.

If you need to do this with 40 images, perhaps an easy solution would be to use 1 layer with the image with "erase white paper" at the bottom, and another of this image with enough feather in the selection that those white borders disappear.

Link to comment
Share on other sites

4 and 6 minutes.

I'll post later the AP files, not time for upload huge files, I need to go to work :S

photos.zip

Details :

Most of the time is spend using the selection brush in a smaller size than needed, perhaps, and processing the reffine selection on my not too performant PC.

1. Dupplicate layer.

2. Apply erase white paper on the bottom layer.

3. Selection brush on the top layer, reffine selection to selection.  Shrink selection -1. Add a mask.

Link to comment
Share on other sites

Hi HVDB Photography!

Thanks! For this type images (dark dress) its very nice, smooth and quick. I would add to your process (for case someone is reading it):

This process leaves a white rim around the body so it can be easily fixed: separate the head, and shrink the selection/mask of rest with -1% (if you apply it to whole, you will loose some hair). 

For the second image it cannot be applied (white jersey). 

However much lifetime saved with this on similar images. Big Thanks!

Jiri

Link to comment
Share on other sites

Hi Wosven!

 I tried your steps. However once I open the Refine selection dialog (and after its first analyses) the "glow" around lots of area on the body appears - did you remove them in the mask manually? Without Refine the edge wont be smooth (tried that). So looking forward to your files/words... the result look promising and time as well ;)

 

Jiri

7.png

Link to comment
Share on other sites

@princatko Hi,

Here the files, I mainly adjusted the one on white background for the hairs, and completely forget to check the masks —as can be seen with rhis screenshot! — but the selections weren't bleeding like yours. Try to modify some parameters in the reffine panel.

We don't need a perfect selection, the outside is covered with the layer without "white paper", this one is only to have the inside on white background easily. If there's a little bit transparency on some hairs, it should feel more natural on another colour, since usually this colour appears in the hairs.

2019-09-05_220358_cr.png.4049cf2ecdb1637f8497c4de518f04bb.png Speed = errors :P

 

The channels can be effective, especially when working in CMYK, when needing to select the sky: using the yellow channel help a lot. It's not helpfull with hairs or faces that contains a lot of subtle colours, unless you need to correct a bad picture with red faces! I use less this technique in AP since I don't find it as easy than with another app.a

Link to comment
Share on other sites

Hi Wosven!

 The files cannot be opened - they both ends with an error: " The file appears to be truncated (shorter than expected)."

But as you wrote, the messing with Ramp parameter helped with the "glow". But I have quite a lot semitransparent spots around the inner edge, so I would love to see the files and what you have done (and I missed) - and I still do not have similar or same questions.

Do you think that this could work also on some long and messy hair (same picture set I mean)? (not everyone has such clean one)

Jiri

 

Link to comment
Share on other sites

Unchecking "Matte edges" gives a cleaner edge on the body section.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

Hi firstdefence!

Turning off Matte edges makes the edge "saw like" and thats a thing I would like to solve here (or one of things). I give it a several try - add new layer, shrink it, smooth it. Everything resulted in a need to go around whole body and still fix the semi transparent area (now is smaller) + fix some white area after smoothing (if applied).

It is quick way to remove some of the semitransparent areas but it is not quick(er) solution.

But worth to mention it, it can save some time for sure.

Jiri

Link to comment
Share on other sites

On 9/4/2019 at 6:06 PM, princatko said:

Currenty I have some reasonable result within 40-60 minutes per image, so if there could be something that speeds the process 

Have you tried running one of your images through the paid version of https://www.remove.bg

It will cost you £1.79 to find out how well it works (for a one-off image) but if it does as good as a job as Affinity it may be worth signing up for one of their much cheaper subscription plans. 

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

Hi!

 And sure, probably some will expect this question - once I have the body part done, then comes the hair. The simple one as in previous examples are simple (to fix if necessary). But what about more complex hair? Messing with Refine tool  (Border 0 - 10%, Ramp 0 to -30%) I got this as a best result. It really works on light backgrounds but more darker more disgusting it get (and sure it looks nice on transparent background as in any tutorial). If you would like to play with it, the original file is here - https://www.icloud.com/iclouddrive/0JxVwmzKOeCP1pKu7pcaCg0nA#_PP_1476

Please, any ideas in this final step?

Jiri

9.png

10.png

11.png

Link to comment
Share on other sites

Hi carl123!

Thanks to pointing this out.

 I tried it with this last image. The result is quick but worthless - there are even same issues I/we are trying to solve here (look at edge all over the body). The result is much worst but much faster. It would be super if it works perfectly :) I would immediately sign in.

Jiri

Link to comment
Share on other sites

On 9/6/2019 at 12:57 AM, princatko said:

And this is what I mean by inner semitransparent areas.

Jiri

You can paint these semitransparent inner areas away when you use the paint brush on the mask itself. You can 'paint in' with white and 'paint out' with black.

It may be a little bit of work but my experience is that you'll get nice, sharp if necessary, results.

Affinity Photo - Affinity Designer - Affinity Publisher | macOS Sonoma (14.2) on 16GB MBP14 2021 with 2.4 versions

Link to comment
Share on other sites

Hi @Wosven!

I check the file, and I have a question - have you touch the mask after the Refine edge? Because I was not able to get similar result like yours.

But I found one way how to get better than good result with your idea:

I just take head and body separately. So then when refining the body edge, I can be quite aggressive with smoothing - I went up to 10px, and then I fixed just few curved areas - fixing itself is like 3-4minutes, and the result is I would say almost perfect. The Erase white paper give the space for quick solving (does not need to be super precise).

Also if this is kept for head then with some few edits it help to remove the semitransparent ears (etc.) and so the focus can be just on hair.

So after all this image is then really like 8-10 minutes, and that's gigasuper :) Thank you a lot!

And if I may, do you have any thought about that more complex hair?

Jiri

_PP_1254.jpg

Link to comment
Share on other sites

8 hours ago, princatko said:

have you touch the mask after the Refine edge?

No, I didn't, that's why there some errors, like the "Y" and the ">", and some part on the arms.

This isn't enough for complexe hair… that's always a pain to do. With those, perhaps doing a selection from the channel, and using this selection and a black brush on the mask can help. But if the hair and the background a in similar tones, it's nearly impossible to do. At least for me :S

Link to comment
Share on other sites

@Wosven Ok, thanks! Yeah, I am compering several methods to have some not so bad results. How nice is to have bold men :), right?

 

Now, I have suitable and I would say quick enough result of cutting out the body from white background. Hair is another issue but that was not my original request, and we can leave it for long winter nights (or someone else to go through).

Now, I am not so disappointed anymore, so for that ... Thanks you all for helping me getting better!

SOLUTION

For someone who just read the title and skipped here for solution. It goes like this:

1. base layer - applied Erase white paper filter

2. second layer (the body selection) quick selection with Refine edge - play with the Border, Smooth and Ramp settings (e.g. in this case Border 2%, Smooth 10px, Ramp -22%), touch hair with the Refine brush. After applying Refine edge, clear the background pieces brought back by smoothing.

3. next layers are for hair (you want find the solution for complex hair here)

This should take you about 10 minutes to have nice cut of body (and in some cases of head too) on this I would say middle size images with these simple portraits.

Jiri

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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.