Page 1 of 1

Possible bug in +noise random

Posted: 2008-02-19T21:59:04-07:00
by fmw42
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.

Re: Possible bug in +noise random

Posted: 2008-02-20T07:25:17-07:00
by magick
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.
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?
Why not use '(0.4*rand()+0.3)' in your -fx expression?

Re: Possible bug in +noise random

Posted: 2008-02-20T11:09:09-07:00
by fmw42
Why not use '(0.4*rand()+0.3)' in your -fx expression?
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?

Re: Possible bug in +noise random

Posted: 2008-02-20T11:11:07-07:00
by magick
Currently there is no user controls for random noise. Adding control to random noise is already on our To-Do list.