Gimp batch mode with gmic

For photo work, I use Aurora HDR 2019 and Gimp. Within Gimp, I use the GMIC plugin a great deal, as it has the best noise reduction and hot pixel reduction.

The one big weakness of Gimp is lack of batch mode. You cannot record some action on an individual image, then save that action and apply it to a group of images.

And I do a lot of work on groups of images.

There is a heavy duty script processing engine in gimp, but I find it inaccessible. And I’m a programmer! The basic problem is that I am a lazy programmer and I really don’t need another language unless I really need another language.

Well there is BIMP for batch Gimp operation.

I’ve done practically no BIMP. The basic operations that BIMP provides I can can do in Irfanview.

Well I found myself needing to remove the hot pixels of a few hundred photos. The gmix function is remove_hotpixels. But this is the first time I have seen this documentation and the example is confusing. After reading this I thought I needed to write:

+remove_hotpixels _mask_size=3, _threshold=10,

And I tried many many options and nothing worked.

However, some of the simpler commands worked, so I knew it was just a matter of finding the right syntax.

This post is to record what worked. The image below shows the successful Bimp settings. (Except the input field would not expand.)

The function name is plug-in-gmic-qt

The input layer is something besides 0 (holy crap, that just generated out with no changes whatsoever and was a real pita to figure out)

The output mode is 0. Maybe some other options work but 0 works.

The command line string is “remove_hotpixels 3 10“, where 3 is the mask size and 10 is the threshold.

Don’t use a “plus” or “minus”. Don’t name your arguments

Well that is it so far. Another inch of knowledge.

Gimp ‘dust and scratches’ filter

Photoshop (and Elements) has a terrific filter called Dust and Scratches. It looks for dots and curves on the image that are clearly noise, then removes them. This comes from dust on your lenses or on the photos you’re scanning, etc. An invaluable tool for all image cleanup work.

No such thing in the Gimp world. Search for gimp + dust + scratches and you either find the despeckle filter (which is useless, ime), or references to some 3rd-party plugin which was never compiled for windows.

The best tool I know of comes from the G’MIC plugin for Gimp. This is a must-have tool for many reasons (e.g., making lady’s portrait skin look soft and smooth), but the Remove Hot pixels option under the Repair subset is essentially the same thing as the Dust and Scratches of Photoshop.

I have not read the technical documentation, but the controls are simple: Mask size is the number of pixels at which to consider something being a “hot pixel”. Too low and you miss pixels. Too high and you lose detail in the image. Threshold is the amount of difference to require for something to be considered “hot”. Too high and you won’t change anything. Too low and you change too much. A standard approach is to start with mask size and threshold at minimum, then increase mask size until you fix all/most of the errors, then increase threshold until you stop screwing up everything else. Tip: As this is a compromise, leave the big scratches for manual work: Use the Clone and Healing tools instead.

Here is an example of a BEFORE ==> AFTER.

UPDATE: January 2016

As of the latest G’MIC plugin for Gimp, this effect has been moved to “Repair -> Remove hot pixels”

Also, try the “Repair -> Iain’s noise reduction”