Outils pour utilisateurs

Outils du site


issue83:g_mic_inpaint

Ceci est une ancienne révision du document !


TITRE / G'MIC inPaint

Nicholas has worked himself into a hospital bed this month, and will be back next month.

One thing that GIMP is well known for is its filters. Think of them as Photoshop plugins. One GIMP filter that is incredibly powerful – yet not so well known, it seems – is G’MIC. Meaning ‘GREYC’s Magic for Image Computing,’ it comes with an incredible amount of filters covering deformations, degradations, details, film emulsion, patterns, rendering, repair, and even a section for filters still in testing. In this quick example, I’ll talk about the Inpaint feature. This allows you to mask an area which Inpaint will fix for you.

Installing

Go to: http://gmic.sourceforge.net/gimp.shtml and download the appropriate file (32/64 bit). Unarchive the download to your GIMP plugin directory (this is usually /home/.gimp2.8/plug-ins or thereabouts, so you may need to show hidden files to find the .gimp2.8 folder). Now, when you start GIMP and click the ‘filters’ menu, you should see G’MIC at the bottom of the list.

Using

When you have a photo loaded (in GIMP), you use the pencil tool (not the paintbrush) to cover the parts of the photo you want Inpaint to remove. I started with the photo shown above.

I decided to test Inpaint by seeing if it could remove the red and white tape. I simply drew over it with the pencil tool using bright red (pure red, no green or blue) as shown on the previous page (bottom image).

Next, I opened G’MIC (filters > G’MIC), clicked REPAIR, then ‘Inpaint (Patch Based)’:

From the default settings I raised the Patch Size setting to 15 and the Lookup Size to 22. After that I clicked OK and waited. It does take a fair bit of computational power to do this, so now is the time to grab a tea/coffee.

And below left is the final result.

Is it perfect? No. Is it quick and easier than using the cloning tool? Definitely!

I purposely chose this photo as I thought maybe the railings would catch it out, but InPaint worked fine. There are a couple of bits on the railings where it isn’t perfect, but I’ll let you see if you can spot them.

G’MIC has literally dozens of great filters in it so have a play around with them!

issue83/g_mic_inpaint.1399824989.txt.gz · Dernière modification : 2014/05/11 18:16 de andre_domenech