Page 1 of 1
Standard "unit" for -evaluate Gaussian-noise[SOLVED]
Posted: 2013-09-12T17:17:53-07:00
by Toki
Hi everybody,
I'm using -evaluate Gaussian-noise to add noise to some images like this:
Code: Select all
convert ./woman_blonde.tif -evaluate Gaussian-noise 5 ./woman_blonde_50.tif
And this works fine, it adds the noise and I can control the amount of noise added.
Problem is I'm unsure what exactly the 5 in
does.
What is 5? Does it mean 5%?
In gimp you can add Gaussian blur, they control the intensity of it by having a standard deviation that ranges from 0 - 50. does ImageMagick use something similar?
Thanks,
Yathindu
Re: Standard "unit" for -evaluate Gaussian-noise
Posted: 2013-09-12T17:51:27-07:00
by fmw42
It is a gain or attenuation factor for noise amplitude. It is the same as using -attenuate 5 +noise Gaussian.
http://www.imagemagick.org/script/comma ... p#evaluate
http://www.imagemagick.org/script/comma ... #attenuate
http://www.imagemagick.org/script/comma ... .php#noise
http://www.imagemagick.org/Usage/canvas/#random
So 1 is the equivalent of 100% in GIMP, I would presume. So if you want to halve the amplitude in IM it would 0.5 and in GIMP it would be 50%, I presume. But it is just a relative factor. Base amplitude in each may not be equivalent. So you may not get the exact same amplitude of noise in the corresponding cases.
Also note there is in IM -seed, which sets the seed for the randomness. If you want a reproducible result, you should set some seed value otherwise, you will get a different seed value by default if it is left off.
see
http://www.imagemagick.org/script/comma ... s.php#seed
Re: Standard "unit" for -evaluate Gaussian-noise
Posted: 2013-09-12T19:24:53-07:00
by Toki
Thanks for the quick reply. I didn't know about seed.
Problem is when I try:
Code: Select all
convert ./foo.tif -evaluate Gaussian-noise 1 ./fooNoise.tif
The generated image has no noise visible at all.
foo.tif -
fooNoise.tif -
However, if I use
Code: Select all
convert ./foo.tif -evaluate Gaussian-noise 2 ./fooNoise.tif
:
fooNoise.tif -
Now there a little bit of noise visible.
It doesn't seem that 1 is the maximum noise. If it matters foo.tif has a pixel depth of 1.
Re: Standard "unit" for -evaluate Gaussian-noise
Posted: 2013-09-12T19:37:32-07:00
by fmw42
It doesn't seem that 1 is the maximum noise. If it matters foo.tif has a pixel depth of 1.
It is not. You can increase or decrease the value. "Maximum noise" must be an error or it has been changed since that documentation.
Re: Standard "unit" for -evaluate Gaussian-noise
Posted: 2013-09-12T19:39:13-07:00
by snibgo
"1" certainly isn't the maximum. For Gaussian noise, I use the rule of thumb that 100 totally obscures the image. So it's a bit like a percentage, although visually it isn't linear.
Re: Standard "unit" for -evaluate Gaussian-noise
Posted: 2013-09-12T19:43:33-07:00
by Toki
Thanks for the clarification guys!