Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible to replace foreground with background?
#3
(12-04-2017, 10:10 AM)gimper Wrote: I'm new; this is my first message.

I'm new to GIMP, but I'm learning everyday.

My question is: 

Is it possible to cut out the foreground of an image and replace the cut out area with a continuation of the background in such a way that the new image looks flawless and continuous?

If the background is just one simple color, this would be easy.

Similarly, if the background is a simple repeating pattern, then this would also be easy.

But what if the background is not simple?

Here's a concrete example of what I mean:

Let's say I take a photo of my friend standing in front of a wooded area with trees and the sky in the background and the green grass at his feet and everything else you would expect to see at the woods.

I can easily cut out my friend's image from the photo.

But is it possible to fill in the empty space where my friend's image was with a continuation of the background in such a way that the resulting image looks as if my friend were never there to begin with?


Basically, three methods:

  1. You find an unobstructed area of the picture that is big enough to cover the friend, you make a selection, use Select>Feather to smooth the edges, copy/paste move the resulting "floating selection" above your friend and "Layer>Anchor".
  2. It the friend is masking a texture (grass, tree, sand...) you can use the "Clone" tool Clone . Ctrl-click on the source, then paint over the friend. The tool will pick texture data from the source and copy over the friend. If you do this with a smooth/fuzzy brush, it won't be too visible.
  3. In-painting: this uses smart code to "invent" missing texture by looking at the picture surrounding the subject to remove. Two different implementations:
    • The "resynthesizer" plugin, explained/demoed here.
    • The in-painting function in the more general GMIC plugin, explained/demoed here.
Reply


Messages In This Thread
RE: Possible to replace foreground with background? - by Ofnuts - 12-04-2017, 01:14 PM

Forum Jump: