add_noise_whiteadd_noise_whiteAddNoiseWhiteAddNoiseWhiteadd_noise_white (Operator)

Name

add_noise_whiteadd_noise_whiteAddNoiseWhiteAddNoiseWhiteadd_noise_white — Add noise to an image.

Signature

add_noise_white(Image : ImageNoise : Amp : )

Herror add_noise_white(const Hobject Image, Hobject* ImageNoise, double Amp)

Herror T_add_noise_white(const Hobject Image, Hobject* ImageNoise, const Htuple Amp)

void AddNoiseWhite(const HObject& Image, HObject* ImageNoise, const HTuple& Amp)

HImage HImage::AddNoiseWhite(double Amp) const

static void HOperatorSet.AddNoiseWhite(HObject image, out HObject imageNoise, HTuple amp)

HImage HImage.AddNoiseWhite(double amp)

def add_noise_white(image: HObject, amp: float) -> HObject

Description

add_noise_whiteadd_noise_whiteAddNoiseWhiteAddNoiseWhiteadd_noise_white adds noise to the image ImageImageImageimageimage. The noise is white noise, equally distributed in the interval [-AmpAmpAmpampamp,AmpAmpAmpampamp]. The resulting gray values are clipped to the range of the corresponding pixel type.

The random noise is generated using the C function “drand48”. See the parameter 'seed_rand'"seed_rand""seed_rand""seed_rand""seed_rand" of set_systemset_systemSetSystemSetSystemset_system for information on the used random seed.

Execution Information

Parameters

ImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject (byte / int2 / uint2 / real)

Input image.

ImageNoiseImageNoiseImageNoiseimageNoiseimage_noise (output_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject * (byte / int2 / uint2 / real)

Noisy image.

Number of elements: ImageNoise == Image

AmpAmpAmpampamp (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Maximum noise amplitude.

Default: 60.0

Suggested values: 1.0, 2.0, 5.0, 10.0, 20.0, 40.0, 60.0, 90.0

Value range: 0.0 ≤ Amp Amp Amp amp amp

Minimum increment: 0.001

Recommended increment: 10.0

Example (HDevelop)

read_image(Image,'fabrik')
dev_display (Image)
add_noise_white(Image,ImageNoise,90)
dev_display (ImageNoise)

Example (C)

read_image(&Image,"fabrik");
disp_image(Image,WindowHandle);
add_noise_white(Image,&ImageNoise,90.0);
disp_image(ImageNoise,WindowHandle);

Example (HDevelop)

read_image(Image,'fabrik')
dev_display (Image)
add_noise_white(Image,ImageNoise,90)
dev_display (ImageNoise)

Example (HDevelop)

read_image(Image,'fabrik')
dev_display (Image)
add_noise_white(Image,ImageNoise,90)
dev_display (ImageNoise)

Result

add_noise_whiteadd_noise_whiteAddNoiseWhiteAddNoiseWhiteadd_noise_white returns 2 ( H_MSG_TRUE) if all parameters are correct. If the input is empty the behavior can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Alternatives

add_noise_distributionadd_noise_distributionAddNoiseDistributionAddNoiseDistributionadd_noise_distribution

See also

add_noise_distributionadd_noise_distributionAddNoiseDistributionAddNoiseDistributionadd_noise_distribution, noise_distribution_meannoise_distribution_meanNoiseDistributionMeanNoiseDistributionMeannoise_distribution_mean, gauss_distributiongauss_distributionGaussDistributionGaussDistributiongauss_distribution, sp_distributionsp_distributionSpDistributionSpDistributionsp_distribution

Module

Foundation