2

There is a nice tool provided by Adobe for removing bacgrounds for photos, https://express.adobe.com/tools/remove-background. I have tested it with portrait photos meant for documents, and it works very well. Can this process be reproduced with GIMP in a way this is almost exactly as automatic as on the Adobe's webpage?

EDIT

after the "Foregound select" answer. I have tried the Select foreground tool. Still it seems that ccexpress does much better work. First photo shows CCexpress result (automatic) and the second shows gimp results. I have painted on the hair comb that has been included. It seems to me inclusion is too aggressive as large part of the background gets included. Or one has to be more pixel-perfect. If you think better job is possble - please tell.

With blue background both are "not ready" but CCexpress is much closed to the desired end result. In more realistic case: I want to have some light background and I shot the photo with some gray background (like a wall), I would say that CCexpress work is likely passable.

2
  • Tried the "Foreground select" tool?
    – xenoid
    Mar 8, 2022 at 8:03
  • Yes, but the tool on adobe webpage is more automatic and it yields better results. If the border between hair and the background is out of focus, the Adobe tool would resolve that with partial transparency. The Gimp would introduce sharp cutoff.
    – lacek
    Mar 9, 2022 at 9:04

1 Answer 1

1

There's no way to fully automate this in GIMP, but there is fairly quick and easy method that is semi-automatic. User input is required though, it's not a one button fix. However, it shouldn't take more than a minute.

Here's a brief rundown on using the Foreground Select tool in GIMP. It seems like a lot of steps, but it's not really hard at all.

  1. Select the Foreground Select tool in the toolbox enter image description here

  2. Using the tool, click around the subject to make a very rough polygonal selection around the subject

  3. Press Enter

  4. Using the same tool, now paint roughly on the foreground, making sure to paint over all the different areas of colour. You can increase or decrease the size of the tool using the [ and ] keys.

  5. In the Foreground Select popup, hit the Preview option

  6. If it looks good, hit Select in the popup, if any bits are is missing, paint on them.

  7. In the Layers panel, hit the Add a Mask button

  8. In the Add a Layer Mask dialog choose the option that says Initiate Layer Mask to: "Selection"

An example

enter image description here

Note: Auto or semi-automatic selections typically work best on rather simple/plain bacgkrounds. If there's more detail in the background, it can make it more difficult to get a good mask. You may need to edit the mask manually if doesn't quite work properly.

4
  • I have edited my post to show my previous attempt. CCexpress seems much batter if border between object and background is blurred.
    – lacek
    Mar 9, 2022 at 9:30
  • Not sure I can replicate that problem. Here's one I tried. I don't have the same photo, but it's similar. The mask is good - almost perfect. Maybe just tighten up the selecting a bit. In the Foreground Select tool options you can also choose a different engine. This one was made with the Matting Levin engine.
    – Billy Kerr
    Mar 11, 2022 at 15:23
  • It could be that your original has a background that isn't very conducive to this technique. Can you share it?
    – Billy Kerr
    Mar 11, 2022 at 15:33
  • I have to censor it a little bit, as the model is 1 year old. I will respond :)
    – lacek
    Mar 19, 2022 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.