Hello there,
There has been a lot of time since my last message on this forum, sorry about that.
I've been actually very busy implementing a new "cool" filter in the G'MIC plug-in for GIMP (among other things!).
And I've reached a point where it has become usable enough to be announced here.
So here I am !
Pre-requisites: The filter requires latest development version of the plug-in (so, a recent
1.6.8_pre should be good). You can pick it
at the usual download page if you are interested :
http://gmic.eu/gimp.shtml(should be available for Windows and Linux at least).
What the filter does ?This is a new
inpainting filter, so it basically reconstructs missing regions in your images. Regions are user-defined by marking the corresponding pixels with a single flat color (Red #FF0000 is the default). The algorithm tries then to copy/paste pieces of "valid'" image pixels into the holes to fill in.
There was already a quite good reconstruction filter in G'MIC to do this job (located in
Repair / Inpaint [patch-based]), so consider the new filter as a different alternative. The new filter is parallelized, so if you have multiple CPU cores, it should make them warm up a little bit!
How to use the inpainting filter ?Considering you have the latest version of the plug-in, using the filter is quite simple. Just 'refresh' the filters first (by pressing the update button located under the filter list), just in case (I'm regularly improving it since a few days). Then fill the pixels you want to reconstruct with a single flat color (beware, disable
Anti-aliasing in selections, or use the pencil tool with a
Hard-brush to get rid of unwanted color shades). Then, open G'MIC plug-in, and select filter
Repair / Inpaint [multi-scale]. It should look like this (here I'm trying to remove the eiffel tower from a photograph).
There are only few filter parameters to set, but you have to experiment a little bit with them, because finding good parameters depend on the size of the region you want to remove, the resolution of your image, etc. You can also enable a preview window that pops up when the filter is running, which show the algorithm working in real-time, reconstructing the image scale by scale.
Click OK, and wait a little bit (depends on the number of cores your machine has, mine has 24 cores, so I wait only for a few seconds
).
And you get this (I show the result as an animated .gif to better illustrate how parts have been reconstructed) :
The algorithm implemented here should be very close to the one available in Photoshop (named "Content-Aware Filling"). Of course, not exactly the same (we don't have the Photoshop sources to compare), but pretty close, as it is based on the same kind of reconstruction techniques.
Of course, the G'MIC implementation of this algorithm is open-source.
Additional results:I repost here some results I've already posted on the Google+ page of G'MIC. They illustrate what kind of things we can do with this new algorithm.
That looks quite good to me.
You can also uses this filter to "expand" complex textures a little bit:
Well that's it ! I'd be interested by feedback on this filter.
Of course, sometimes it completely messes up with the reconstruction (be aware that reconstructing unknown image pixels is a very ill-posed problem with no perfect solutions known to date), but I have the impression it works quite well in most of the cases.
Just let me know what you think about it !
I've also done a small video that shows how it runs live (but as the filter has been already updated, the video is not up-to-date
)
I'm preparing a new filter to be included in G'MIC, that should be based on the same kind of algorithm for something a bit different.
I'll tell you more when it is ready !