Outils pour utilisateurs

Outils du site


issue83:g_mic_inpaint

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.

Nicholas a travaillé tant qu'il a dû être hospitalisé ce mois-ci et sera de retour le mois prochain.

Une chose pour laquelle GIMP est bien connu, c'est ses filtres. Considérez-les comme des greffons de Photoshop. Un filtre de GIMP qui est incroyablement puissant, bien qu'il ne soit pas encore très connu, il me semble, est G'MIC. Acronyme de « GREYC’s Magic for Image Computing (Magie de GREYC pour le traitement d'image) », il est livré avec une quantité incroyable de filtres, parmi lesquels les déformations, dégradations, détails, émulsions photographiques, motifs, rendus, réparations et même une section pour les filtres encore en test. Dans ce petit exemple, je vais vous parler de la fonction Inpaint. Cela vous permet de masquer une zone que Inpaint corrigera pour vous.

Installation

Allez sur: http://gmic.sourceforge.net/gimp.shtml et téléchargez le fichier approprié (32/64 bits). Décompactez le fichier téléchargé sur votre répertoire d'extensions de GIMP (généralement c'est /home/.gimp2.8/plug-ins ou à peu près, donc vous devrez peut-être afficher les fichiers cachés pour trouver le dossier .gimp2.8). Maintenant, lorsque vous démarrez GIMP et cliquez sur le menu « filtres », vous devriez voir G'MIC à la fin de la liste.

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!

Utilisation

Lorsque vous avez ouvert une photo (dans GIMP), utilisez l'outil crayon (pas le pinceau) pour recouvrir les parties de la photo que vous souhaitez qu'Inpaint supprime. J'ai commencé avec la photo ci-dessus.

J'ai décidé de tester Inpaint en regardant s'il pouvait enlever la bande rouge et blanche. J'ai simplement colorié par dessus avec l'outil crayon en rouge vif (rouge pur, pas de vert ni bleu), comme indiqué sur la page précédente (image du bas).

Ensuite, j'ai ouvert G'MIC (filtres> G'MIC), cliqué sur Repair, puis sur « Inpaint (Patch Based) » :

Dans les paramètres par défaut, j'ai augmenté la taille du patch à 15 et celle de la marge de recherche (Lookup) à 22. Puis j'ai cliqué sur OK et j'ai attendu. Il faut quand même pas mal de puissance de calcul pour le faire, alors c'est le moment de prendre un thé ou un café.

Et en bas à gauche on voit le résultat final.

Est-il parfait ? Non. Est-ce plus rapide et plus facile à utiliser que l'outil de clonage ? Certainement !

J'ai choisi cette photo exprès car je pensais que peut-être la grille serait mal corrigée, mais Inpaint a bien fonctionné. Il y a quelques morceaux de la grille où ce n'est pas parfait, mais je vous laisse voir si vous pouvez les repérer.

G'MIC a littéralement des douzaines de filtres géniaux inclus, jouez donc avec !

issue83/g_mic_inpaint.txt · Dernière modification : 2014/09/11 10:10 de auntiee