Delete an object in a photo using GIMP

A tutorial for removing objects (or people) by recreating a part of the background they hide in a photo, with the Resynthesizer plugin.

Using Photoshop, you can delete objects in an image automatically, without any drawing work. Just circle the object and use the "fill with background" command. The same can be done with The Gimp for actually longer (it is possible that the same algorithm was reused).

This plugin "re-synthesizes the background," it restores it from the same elements in the same photo. So it can recreate the sky, the lawn or even more complex views from a sample taken in the picture.

For information on the role of commands, see the Resynthesizer tutorial.

We will apply the tutorial using the same photos as the Photoshop video demo.

Use Resynthesizer in Script-Fu

1. Upload an image

2. Select Lasso Region

We want to remove the left tree at the top .

3. Click Script-Fu -> Enable -> Smart Delete Selection

A window opens. Set the radius and click OK.

4. here's the final image

Use Map -> Resynthesize filter

This command is required to select a model that restores the background.

1. Upload an image

2. Select a sample

Part of the image in the lower right corner is framed by the selection tool.
Then we make a cut and insert it into a new image. No need to save it.

3. Select object to delete

To remove the road, it is delimited by a lasso.

4. Click Filter -> Map -> Resynthesize

The window opens:

The texture source is a sample taken from the image.
It is also used as an Input map.
The Output map uses the original photo.

5. Here's the final picture

Loading
Color channel problem

In some cases, you may receive the following error message:

The input and output maps must have the same number of color channels. 

This is a message from the plugin, and it comes from the fact that the uploaded photo you want to edit has an internal format different from the image created by The Gimp as a sample.
To delete this message, you must:

  1. Select the entire photo (ctrl-a).
  2. Copy (ctrl-c).
  3. Insert into new image (shift-ctrl-v).

Then operate on two images created by The Gimp, a copy of the photo and a sample.