You are here

Clean CCD Noise

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
cleanccdnoise.scm2.68 KB

This script helps fix noise found in digital camera pictures.


G'MIC must be installed! When this script calls up the G'MIC plug-in, select Bilateral Filter with default settings.

There seems to be some confusion as to what all this script does... So here's a short description of the procedure:

  • Duplicates the active layer
  • Calls G'MIC plug-in (requiring user to select the Bilateral Filter with default settings, then OK'ing)
  • This layer is duplicated (saved for later)...
  • The layer is subtracted from a copy of the original layer and ran through curves-spline to increase the contrast at the lowest end
  • Finally, this layer acts as a alpha mask for the original copied layer (from above)

The subtracted mask tempers dark spots found in browns (wood, some skin, etc). This is found with red / green highlights in the brown to begin with.... I believe.

Version 1.1 (2009 July 06)

  • Tempered darkening noise found in browns (wood)

Feedback welcome!

The script is located in "<Image> / Script-Fu / Enhance / Clean CCD Noise"

Code License: 
GIMP Version: 
Scripting Engine: 


GIMP-Error: Execution error for 'Clean CCD Noise':

Error: Invalid number of arguments for plug-in-gmic (expected 5 but received 3)

well, just to be here, for lazy penguins ... if you stomp over this error this means that you are a very lazy person and changed

(gmic RUN-INTERACTIVE inImage subtract)


(plug-in-gmic RUN-INTERACTIVE inImage subtract)


(plug-in-gmic RUN-INTERACTIVE inImage subtract 0 "")

like is should be!

and why is not working with gmic standalone executable!? not sure because even if i have one, changing back plug-in-gmic to gmic and subtract 0 "") to subtract) i get same error:

Error: eval: unbound variable: gmic

but i have a standalone, console gmic executable!

which gmic


and from console is working:

gmic [gmic] No commands, options or data provided (type 'gmic -h' to get help).

anyway no real problem because from gimp, gmic_gimp plugin and cleanccdnoise.scm script is working just fine ...

I don't understund if you have problems or you just explain how solve hypotetical problems!
If the first gimp script may call any gimp plugin, including here other scripts but i doubt that may call standalone programs.

To wildly simplify the concept you may call with a script what is initialized when gimp loads, ...and so NOT other indipendent program as command line gmic

no, problem is solved now, i list here my solutions only to be easy to find my solutions ...

Does not work under Windows either. Not tried under Linux yet.
The G'mic plugin executable is called gmic_gimp under Linux and gmic_gimp.exe under Windows. So I suppose you cannot call it with "gmic", except if an alias has been defined somewhere (by the way, I found a gmic.exe in my plugins folder, maybe the command-line version, dated 2010/3/8 (?), but the plugin does not work with it either.
I tried to edit the script and write gmic_gimp, then the complete path without success.
The idea of a G'mic wrapper is not so bad, if it allows to launch G'mic with customized parameters, for instance. By the way, why not use the command-line (not plugin) version I had mistakenly copied in my plug-ins directory, if possible? You should ask David Tschumperlé. I suppose in that case, the user would not have to select G'mic settings. The only drawback would be console opening while G'mic is operated.

Using GIMP 2.6.7 and the latest release of G'MIC on Vista 64 bit.

I used the default setting as suggested and it actually added noise to my picture (or it could be that by removing a certain range of color it made other colors more prominent in the image). Which left me wondering if there is any control over which colors are sorted out.

Why not just call the function right up from G'MIC instead of having to hunt it down in enhancements? Or is that even possible?

Where did you install G'mic? Is it the plug-in version?

I have it installed in my Users folders.

GIMP 2.6.7

"Execution error for 'Clean CCD Noise':"
"Error: eval: unbound variable: gmic

It would be nice if the description of exactly what the script does was fleshed out in a little more detail--it isn't totally clear to me what the last few steps are doing. Thanks.

Do you have GMIC installed ?

My G'mic plug-in is in my user dir. Maybe yours is in your Gimp dir?


Subscribe to Comments for "Clean CCD Noise"