Skip to content

add_noise_whiteadd_noise_whiteAddNoiseWhiteAddNoiseWhiteadd_noise_whiteadd_noise_whiteπŸ”—

Short descriptionπŸ”—

add_noise_whiteadd_noise_whiteAddNoiseWhiteAddNoiseWhiteadd_noise_whiteadd_noise_white β€” Add noise to an image.

SignatureπŸ”—

add_noise_white( image Image, out image ImageNoise, real Amp )add_noise_white( Image : ImageNoise : Amp : )void AddNoiseWhite( const HObject& Image, HObject* ImageNoise, const HTuple& Amp )static void HOperatorSet.AddNoiseWhite( HObject image, out HObject imageNoise, HTuple amp )def add_noise_white( image: HObject, amp: float ) -> HObject

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

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

HImage HImage::AddNoiseWhite( double Amp ) const

HImage HImage.AddNoiseWhite( double amp )

DescriptionπŸ”—

add_noise_whiteAddNoiseWhite adds noise to the image Imageimageimage. The noise is white noise, equally distributed in the interval [-Ampampamp,Ampampamp]. 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" of set_systemSetSystem for information on the used random seed.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

ParametersπŸ”—

Imageimageimage (input_object) (multichannel-)image(-array) β†’ object (byte / int2 / uint2 / real)object (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)HImage (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)Hobject (byte / int2 / uint2 / real)

Input image.

ImageNoiseimageNoiseimage_noise (output_object) (multichannel-)image(-array) β†’ object (byte / int2 / uint2 / real)object (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)HImage (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)Hobject * (byte / int2 / uint2 / real)

Noisy image.

Number of elements: ImageNoise == Image

Ampampamp (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum noise amplitude.

Default: 60.060.0
Suggested values: 1.0, 2.0, 5.0, 10.0, 20.0, 40.0, 60.0, 90.01.0, 2.0, 5.0, 10.0, 20.0, 40.0, 60.0, 90.0
Value range: 0.0 ≀ 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)
(C)
read_image(&Image,"fabrik")\;
disp_image(Image,WindowHandle)\;
add_noise_white(Image,&ImageNoise,90.0)\;
disp_image(ImageNoise,WindowHandle)\;

ResultπŸ”—

add_noise_whiteAddNoiseWhite 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>). If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Alternatives

add_noise_distributionAddNoiseDistribution

See also

add_noise_distributionAddNoiseDistribution, noise_distribution_meanNoiseDistributionMean, gauss_distributionGaussDistribution, sp_distributionSpDistribution

ModuleπŸ”—

Foundation