Menu Close

Resynthesizer Plugin – Gimp’s Prequel to Photoshop CS5’s Content Aware Fill

Content Aware Fill Using Gimp's Resynthesizer Plugin

Road Testing Gimp’s Resynthesizer Plugin

Comparison of Peformance in Windows XP and Ubuntu Linux

A Brilliant Plugin – When it Works

Summary

UPDATE: You may find the installation instructions in this new article helpful for Windows installation.

The resynthesizer plugin provides similar tools to Adobe Photoshop’s content aware fill as seen in Adobe’s demo.

The resynthesizer plugin is no longer maintained by it’s author, Dr Paul Harrison, but is freely available under a GNU GPL open source licence.

The plugin allows you to fill a selection with the surrounding texture – removing imperfections or any unwanted object.

When tested under Ubuntu Linux and Windows XP, the plugin was unreliable, but when it did work it worked very well – you can see the kind of results that you can get in Ubuntu in the video below. The Windows XP implementation had a bug that made the plugin essentially unusuable.

A search at the gimp plugin repository uncovered a fix, that provided an alternative implementation of the plugin, called “Heal Selection” which worked amazing well.

Content Aware Fill Using Gimp's Resynthesizer Plugin

Ubuntu Linux and Resynthesizer

Installing Resynthesizer in Ubuntu is a piece of cake: the instruction required is:

sudo apt-get install gimp-resynthesizer

Resynthesizer is found under the Filter menu – Filters ► Map ► Resynthesizer.

There is a menu which allows a range of options. And a tab which allows for tweaks.

Gimp Resynthesizer Plugin Main Menu

The tweaks menu proved useful – during testing, moving the Neighbourhood Size and Search Thoroughness options to the far right – (highest levels) produced best results. On the other hand lowering the Sensitivity to Outliers option to the lowest value seemed the best choice.

Gimp Resynthesize Plugin Tweak Menu

You can see the basic achievement of this plugin in the video above. It produces extremely good results with small selections – even if there is a slight gradient from one end to the other in the selection.

Where there is a quite deep gradient the plugin produces reasonable results, but the larger the selection that needs to be deleted, the more likely you are to get what I would term a ‘patchwork quilt’ effect, rather than a smooth flowing texture. This is visible in the video where some of the larger boats are deleted.

The video shows a very tough test for Resynthesizer – the boats interact with their background by casting shadows and reflections and by disturbing the water’s surface. Resynthesizer copes with this test surprisingly well, but the results are only really completely acceptable with relatively small selections.

Another test involved removing the spots off a cow – here Resynthesizer was a disappointment – with very small spots it produced excellent results, with larger areas it threw in textures from bizarre sources – replacing cow with grass. Sometimes this was barely noticeable and at other times it was truly surreal.

Gimp Resynthesizer Test - Original Image

Gimp Resynthesizer on Ubuntu Linux

No amount of changing the options and tweaks produced a reliable outcome.

A second option that Resynthesizer provides is found under Filters ► Enhance ► Smart Remove Selection. This option suffers from the same unreliability as the standard Resynthesizer option.

Windows and Resynthesizer

Installing Resynthesizer on Windows XP requires you to unzip the windows Resynthesizer package in to the plugins and scripts folders of your gimp installation. As with Linux, the main Resynthesizer options are found under Filters ► Map ► Resynthesizer

This version of Resynthesizer is broken and nearly always produces bizarre results. The texture which fills the selection is typically taken from the top of the image.

I was unable to find a fix for this problem but a very useful patch which replaces the Smart Remove Selection in Ubuntu did produce very good results in both Windows XP and Ubuntu

Gimp’s Heal Selection in Windows and Ubuntu Linux

Heal Selection is a script which is placed in the usual script folder in Windows and the Gimp 2.6 folder in Ubuntu. (Installation instructions can be at the gimp registry page above and it is worth stressing that the version of the script in the shared Gimp 2.0 folder needs to be deleted for the patch to work.)

Gimp Resynthesizer Heal Selection Menu

Heal Selection can be found under Filters ► Enhance ► Heal Selection. First a word of warning. When this was succesfully installed on Ubuntu, it broke the principal Resynthesize filter under the Map menu. Does this matter? Yes. Heal Selection produced very good results. But when faced with any kind of gradient – as in the sailing boat image used in the video above, it did not fare at all well. Horses for courses.

What was amazing about the Heal Selection option was that it not only tackled difficult areas that the main Map Resynthesizer filter failed on, but it did a very good job when faced with ridiculously difficult tasks. Take a look at the image below and see how the black spot along the cow’s neck has been removed. Not only did it successfully remove this large selection, but it added shading where you would expect to see it.

Gimp Resynthesizer Test - Original Image

Gimp Heal Selection on Windows XP

Next, take a look at these images. Heal selection removed the shadow and the replacement matches the surrounds perfectly.

Gimp Heal Selection on Windows XP

Gimp Heal Selection on Windows XP

On both Windows and Ubuntu – the results for Heal Selection were sometimes really quite impressive, and most importantly the bug which affects the other implementations of Resynthesizer did not appear to affect Heal Selection.

The limitation of Heal Selection can be seen in the following sailing boat image below. The following was done on a Windows XP machine, but the results with Ubuntu were not much different.

Gimp Heal Selection Test - Sailing Boats Image

Gimp Heal Selection Test - Sailing Boats Image

So recommendation? Install Resynthesizer and Heal Selection on Windows and limit your use of the plugin to Heal Selection – you won’t be disappointed. If you have Ubuntu the same applies, but don’t delete the original smart-remove.scm file completely, just move it from the shared Gimp 2.0 scripts folder and keep a copy. Returning it to the same folder will give you access to the original Filters ► Map ► Resynthesizer filter with it’s superior content fill capability when you are dealing with gradients… but watch out for those bugs!