I have had success with generating random noise images in previous version 6.3.7.x, but I am having trouble with IM 6.3.8-6 Q16 on Mac OS X Tiger.
When I do:
convert logo: -colorspace Gray +noise Random logo_random.png
I get a totally black image.
when I do
convert logo: -colorspace Gray +noise Uniform logo_uniform.png
or
convert logo: -colorspace Gray +noise Gaussian logo_gaussian.png
I see an image but it is visually no different from
convert logo: -colorspace Gray logo_gray.png
compare -metric rmse logo_gray.png ogo_uniform.png null:
gives a small error, but it is not visually perceptive.
Also Anthony's example:
convert -size 100x100 xc: +noise Random random.png
and
convert -size 100x100 xc: -fx 'rand()' random_fx.png
also produce a totally visual black image and not what he shows on his examples page.
As a further question, is there any way to control the statistics of the random noise levels, e.g. values nominally range from 0 to 1, but what if I want it to vary only from .3 to .7. Can this be controlled with any advanced SET option?
Thanks.
Possible bug in +noise random
Re: Possible bug in +noise random
You ran across a transient bug that is fixed in the latest release. We strengthened random number generation when we introduced enciphered pixels but also introduced a bug which has been fixed in the latest release, 6.3.8-10.
Why not use '(0.4*rand()+0.3)' in your -fx expression?is there any way to control the statistics of the random noise levels, e.g. values nominally range from 0 to 1, but what if I want it to vary only from .3 to .7. Can this be controlled with any advanced SET option?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible bug in +noise random
Yes that would work for random noise (but fx is slower than +noise). But how do I handle that for Uniform or Gaussian noise or any other type that you have in +noise? Are there any advanced user settings for +noise that would accommodate that? Alternately, how would one produce uniform or gaussian noise with -fx?Why not use '(0.4*rand()+0.3)' in your -fx expression?
Re: Possible bug in +noise random
Currently there is no user controls for random noise. Adding control to random noise is already on our To-Do list.