Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
type | in | Type of distribution | |
Allowed: | String - see below | ||
Default: | 'normal' | ||
pars | in | Parameters of distribution | |
Allowed: | Numeric vector | ||
Default: | [0,1] | ||
region | in | Region of interest | |
Allowed: | Region tool | ||
Default: | Whole image | ||
zero | in | Zero image first ? | |
Allowed: | T or F | ||
Default: | F |
This function adds noise to the image. You may zero the image first before the noise is added if you wish.
The noise can be drawn from one of many distributions, which are also available in the randomnumbers tool.
For each distribution, you must supply the type via the type argument (minimum match is active) and parameters via the pars argument. Each distribution type is described in detail in the randomnumbers tool. Briefly:
- im1 := imagemaketestimage() - im1.addnoise(type='normal', pars=[0.5, 1], zero=T) - im1.statistics() NORMAL: Starting image::statistics NORMAL: Selected bounding box [1, 1] to [113, 76] NORMAL: Creating new statistics storage lattice of shape [9] NORMAL: NORMAL: Number points = 8.588000e+03 Sum = 4.258988e+03 NORMAL: Flux density = 1.972103e+02 Jy NORMAL: Mean = 4.959231e-01 NORMAL: Variance = 9.983749e-02 Sigma = 3.159707e-01 NORMAL: Rms = 5.880184e-01 NORMAL: NORMAL: Minimum value -6.234988e-01 at [4, 39] (00:00:27.733, +00.00.12.000) NORMAL: Maximum value 1.664114e+00 at [105, 11] (23:59:33.867, -00.05.24.000) NORMAL: NORMAL: Finished image::statistics 0.07 real 0.03 user 0 system T
A test image is created, zeroed, and noise of mean
0.5 and variance 1 from a normal distribution added.