Add noise to an image.
add_noise2 adds noise to the image Image. The noise is white noise, equally distributed in the interval [-Amp,Amp], and is generated by using the C function ``drand48'' with an initial time dependent seed. Resulting gray values are clipped to the range [0,255].
Image (input_object) |
image(-array) -> object : byte |
Input image. |
ImageNoise (output_object) |
image(-array) -> object : byte |
Noisy image. | |
Number of elements: ImageNoise == Image |
Amp (input_control) |
real -> real |
Maximum noise amplitude. | |
Default value: 60.0 | |
Suggested values: 1.0, 2.0, 5.0, 10.0, 20.0, 40.0, 60.0, 90.0 | |
Range of values: 1.0 <= Amp <= 1000.0 | |
Minimum increment: 1.0 | |
Recommended increment: 10.0 | |
Restriction: Amp > 0 |
read_image(:Image:'fabrik':) > disp_image(Image:::) > add_noise2(Image,ImageNoise:90::) > disp_image(ImageNoise:::).
add_noise2 returns TRUE if all parameters are correct. If the input is empty the behaviour can be set via set_system(::'no_object_result',<Result>:). If necessary, an exception is raised.
add_noise1, noise_distribution_mean, gauss_distribution, sp_distribution