Add noise to an image.
add_noise_white 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. The resulting gray values are clipped to the range of the corresponding pixel type.
|
Image (input_object) |
(multichannel-)image(-array) -> object : byte / int2 / uint2 |
| Input image. | |
|
ImageNoise (output_object) |
(multichannel-)image(-array) -> object : byte / int2 / uint2 |
| 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 | |
| Typical 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,WindowHandle) add_noise_white(Image,ImageNoise,90) disp_image(ImageNoise,WindowHandle).
add_noise_white returns 2 (H_MSG_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 handling is raised.
add_noise_white is reentrant and automatically parallelized (on tuple level, channel level, domain level).
add_noise_distribution, noise_distribution_mean, gauss_distribution, sp_distribution
Foundation