So yesterday I was going over photos from my daughter’s birthday party. In one shot, my sister-in-law was holding up one of my 3 month olds and trying to hide.
I was trying to figure out the best, non-tedious way to remove her. First, I tried the clone tool. But since there are shadows on the walls, it ended up looking wrong and obvious. Then I tried the healing brush. That didn’t work because it was a large thing I was trying to remove. (It ended up mostly working, but then bringing in parts of the baby’s clothes, tabletcloth, etc)
What I ended up doing was using the clone first to get rid of her and then healing to even out the tone. I ended up with this:
It’s not perfect, particularly if you’re looking for it. But it is more acceptable than either of the other two methods I used. Is there something that would have worked better? I don’t know if it would have worked because of the baby on the left side, but would Photoshop’s content-aware-fill have done it? If so, does GIMP have an equivalent?
I have a kind-of workflow that might be helpful for this. It was mostly from when I made a bouncing baby image of my daughter:
The problem is that you’ll pretty much need to do this manually. There’s not easy shortcut.
There are plugins like Resynthesizer + the Heal Selection helper script, but in this case they might not be much help as you have a hard boundary you are trying to heal against (so it will try to sample around it, which will look weird — as you’ve already seen in your own experiments with the Heal brush I’ll bet).
You’ll basically want to shift the background to cover your area of interest (sister-in-law) while matching the fall-off/gradient on the back wall. The problem is that the gradient is non-linear, and curves a little bit (sort of in the direction I’ve indicated):
You’ll need to rebuild the background wall texture to match this gradient fall off so that it looks good. This isn’t too hard if you duplicate the layer and shift it roughly along that path.
The best path forward I think is to basically:
Open your base image.
Duplicate the layer.
Add a layer mask to the top layer. (White, full opacity).
Roughly paint black to erase parts of the area to remove - no need to be exact just yet.
I’ve temporarily hidden the layer underneath so you can see where I’ve roughed-in the mask.
Now, use the Move tool, set it to “Move the active layer”, and move the lower layer until the gradient looks good in your transparent area.
At this point, you can use the Heal brush to clean up the transitions, and more carefully walk along the edges of your mask to make it more refined (a combination of a sort-of soft brush and a ton of patience).
I think it’s easier to just create a video to demonstrate what I mean. So I did. I hope you don’t mind (it’s unlisted - so people will normally only find it by coming here):
From my experience neither of those tools will work all that well in this case. They are good at making up plausible things. But in clear cases like this it’s fairly obvious how the wall should look.
If you have a tripod handy next time, just take two shots, one with the baby + support + one without either of them and blend them later using layer masks.
Assuming you don’t have them I’d still take that approach.
Duplicate the base layer. The new copy is your foreground. Add a layer mask and mask off the part you want to have removed. The scissors and paths tools are helpful for this.
Next you need to remove the large object on the background layer. But because you already masked out the foreground you can be fairly sloppy. In this case I’d try a wavelet decompose which breaks down the problem even more. Roughly fix up the residual layer using the clone tool + smudge, heal brush etc. You can even blur it a bit afterwards. This is easy because there is no (high frequency) ‘detail’ in the residual layer. On the detail layers you can then just use the clone brush in a fairly careless manner because you won’t have to deal with the (low frequency) gradients anymore. After than create a new layer from visible and finish up the bleed you probably got along edges using the clone tool. I did a very quick very hacky attempt at that:
Another way could be to paint it out in Krita or Gimp.
Make a new layer and colorpick the basic backgroundcolor with a not so hard brush. Paint largely over.
Then colorpick the colors from the wall around the kid (in this case the darker ones) and blend them in, till its seamless.
After the tones are right just mask the kid and the table, so that they are visible again.
Or
Grab first a section of the texture from above over the shoulder, put it on another layer, over the object you want get rid of.
Then you have a good starting point to paint and blend it like discribed above.
edit: Just saw Pats video where he just did the texture grabbing.
Its easier than it looks discribed by me, and works good on such textureless backgrounds.
@Jonas_Wagner - if I’d planned to do it ahead of time, I’d have done the two shots thing. It’s actually one of the first things I ever did with photoshop. And it really does make things so much easier, as you point out.
I’m intrigued at your wavelet idea as I remember reading something like that in Pat David’s tutorial for realistic wrinkle removal in portraits. I was following along pretty well until this part:
“After than create a new layer from visible and finish up the bleed you probably got along edges using the clone tool.”
So, I guess this is a layer creation that gives you the benefit of a merge while retaining the layers?
@patdavid Thank you for making the video. Although your instructions were very clear - no doubt from experience in writing for this site and your own blog, the video helps make sure I can understand exactly what you’re doing. At the end for cleaning up the wall edges you mention using the heal brush. Out of curiosity, does the heal brush work across all layers or do I need to merge the layers first?
@Tobias although it appears those are not the best methods here, thanks for listing them so that I know about them for the future.
[quote=“djotaku, post:7, topic:932”]
So, I guess this is a layer creation that gives you the benefit of a merge while retaining the layers?
[/quote]Yes. It basically merges the visible layers into a new layer. In this context it reverses the wavelet decomposition. You can do this by right clicking on a layer and then new from visible.
One last time - I realized you never used the heal brush. So I moved it around a bit more and ended up with a perfect edit. (well, not pixel perfect in that I could probably have been a bit more careful in my layer mask, but much better)
@Mondayman Yeah. The point wasn’t to make it look like Sam could sit by himself. I just found my sister-in-law’s shoulder super distracting. It would have been better for her to just stand and hold him.
@patdavid Wow, you created that wonderful community, you are participating in interviews, did a GIMP website redesign and technical overhaul, you are writing articles, you are always helping people using F/LOSS photography software, here and everywhere on the web and now you are even creating videos demonstrating your tips? And I am sure I forgot a lot. And you have a private life. You have a couple of twin brothers, right? I’m pretty sure, the other explanation would be that you are an alien living in your own spacetime and so your day lasts more than 72 earth hours. Aliens don’t sleep, right?
(Not that not most of the dev’s of all this great software we are talking about have to be aliens as well for the same reason, but this video made me write this post, a humble try to say “thank you”, to you and to all those “aliens” out there.)