CVB++ 15.0
Cvb::Foundation::AddNoise Namespace Reference

Namespace for collection of noise-generating functions from the Foundation package. More...

Functions

std::unique_ptr< ImageAddUniformNoise (const Image &image, double lowest, double highest, int seed)
 Add noise with uniform distribution to an image. More...
 
std::unique_ptr< ImageAddGaussNoise (const Image &image, double mean, double stdDev, int seed)
 Add noise with Gaussian distribution to an image. More...
 

Detailed Description

Namespace for collection of noise-generating functions from the Foundation package.

Remarks
CMake users: Link to imported target CVB::CvbFoundationAddNoise

Function Documentation

◆ AddGaussNoise()

std::unique_ptr< Image > AddGaussNoise ( const Image image,
double  mean,
double  stdDev,
int  seed 
)
inline

Add noise with Gaussian distribution to an image.

Parameters
[in]imageImage to add the noise to.
[in]meanMean value of the gaussian distribution.
[in]stdDevStandard deviation of the gaussian distribution.
[in]seedSeed value for the pseudo random number generator.
Returns
Result image with added noise.
Exceptions
Anyexception derived from std::exception including CvbException.

Pixel values that exceed the image's value range are saturated at the minimum and maximum value.

◆ AddUniformNoise()

std::unique_ptr< Image > AddUniformNoise ( const Image image,
double  lowest,
double  highest,
int  seed 
)
inline

Add noise with uniform distribution to an image.

Parameters
[in]imageImage to add the noise to.
[in]lowestLower bound of the uniform distribution.
[in]highestUpper bound of the uniform distribution.
[in]seedSeed value for the pseudo random number generator.
Returns
Result image with added noise.
Exceptions
Anyexception derived from std::exception including CvbException.

Pixel values that exceed the image's value range are saturated at the minimum and maximum value.