Jump to content

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

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Using channels could be an option ...

 


Affinity Photo  1.7.3.481   - Beta 1.8.0.486

Windows 10 Home  1903 (build 18362.418) - 64 bit processor - AMD A4-5000 APU with Radeon HD Graphics  1.50GHz - RAM 8,00 GB
Calibrated Monitor (Datacolor Spyder5 Pro)

 

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

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


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo & Publisher - Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials - FeedbackInstagram & Flickr

Share this post


Link to post
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

Share this post


Link to post
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. 


Due to the fact that Boris Johnson is now our Prime Minister, punctuation, spelling and grammar will never be worried about ever again.  We now have far bigger problems to be concerned about.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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 10.14 Catalina on MBP13 2013 | macOS 10.15 Mojave on MBP13 2017

Share this post


Link to post
Share on other sites

Hi!

@HVDB Photography Does it work on a black color? Mine hair cut :) works great on light colors too, but not so nice on dark ones.

@RNKLN Thanks for your input. Sure hand masking is an option for that (but in this case it would be almost same time as masking it with paint brush on the beginning ;)

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | 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.