RandomGaussianImage2d
Creates a new two-dimensional image with random values that have a Gaussian distribution.
Access to parameter description
RandomGaussianImage2d creates an image with random values that follow a Gaussian distribution of a given mean and standard deviation.
The output image intensity values are generally included in the range $[Mean-4.5\times\sigma ~..~ Mean+4.5\times\sigma]$.
Where $Mean$ and the standard deviation $\sigma$ are input parameters of the algorithm.
The type of the output image is set by an enumerate as detailed in the Data Type Management section.
See also
Access to parameter description
RandomGaussianImage2d creates an image with random values that follow a Gaussian distribution of a given mean and standard deviation.
The output image intensity values are generally included in the range $[Mean-4.5\times\sigma ~..~ Mean+4.5\times\sigma]$.
Where $Mean$ and the standard deviation $\sigma$ are input parameters of the algorithm.
The type of the output image is set by an enumerate as detailed in the Data Type Management section.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > randomGaussianImage2d( RandomGaussianImage2d::OutputType outputType, int32_t imageSizeX, int32_t imageSizeY, double mean, double standardDeviation, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype. random_gaussian_image_2d( output_type = RandomGaussianImage2d.OutputType.UNSIGNED_INTEGER_8_BIT, image_size_x = 1024, image_size_y = 1024, mean = 80, standard_deviation = 20, output_image = None )
This function returns outputImage.
// Function prototype. public static IOLink.ImageView RandomGaussianImage2d( RandomGaussianImage2d.OutputType outputType = ImageDev.RandomGaussianImage2d.OutputType.UNSIGNED_INTEGER_8_BIT, Int32 imageSizeX = 1024, Int32 imageSizeY = 1024, double mean = 80, double standardDeviation = 20, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
imageSizeX |
The X size in pixels of the output image. | Int32 | >=1 | 1024 | |||||||||||||||||
imageSizeY |
The Y size in pixels of the output image. | Int32 | >=1 | 1024 | |||||||||||||||||
outputType |
The output image data type.
|
Enumeration | UNSIGNED_INTEGER_8_BIT | ||||||||||||||||||
mean |
The mean intensity of the output distribution. | Float64 | Any value | 80 | |||||||||||||||||
standardDeviation |
The standard deviation. | Float64 | >0 | 20 | |||||||||||||||||
outputImage |
The output image. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
image_size_x |
The X size in pixels of the output image. | int32 | >=1 | 1024 | |||||||||||||||||
image_size_y |
The Y size in pixels of the output image. | int32 | >=1 | 1024 | |||||||||||||||||
output_type |
The output image data type.
|
enumeration | UNSIGNED_INTEGER_8_BIT | ||||||||||||||||||
mean |
The mean intensity of the output distribution. | float64 | Any value | 80 | |||||||||||||||||
standard_deviation |
The standard deviation. | float64 | >0 | 20 | |||||||||||||||||
output_image |
The output image. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
imageSizeX |
The X size in pixels of the output image. | Int32 | >=1 | 1024 | |||||||||||||||||
imageSizeY |
The Y size in pixels of the output image. | Int32 | >=1 | 1024 | |||||||||||||||||
outputType |
The output image data type.
|
Enumeration | UNSIGNED_INTEGER_8_BIT | ||||||||||||||||||
mean |
The mean intensity of the output distribution. | Float64 | Any value | 80 | |||||||||||||||||
standardDeviation |
The standard deviation. | Float64 | >0 | 20 | |||||||||||||||||
outputImage |
The output image. | Image | null |
Object Examples
RandomGaussianImage2d randomGaussianImage2dAlgo; randomGaussianImage2dAlgo.setOutputType( RandomGaussianImage2d::OutputType::UNSIGNED_INTEGER_8_BIT ); randomGaussianImage2dAlgo.setImageSizeX( 256 ); randomGaussianImage2dAlgo.setImageSizeY( 256 ); randomGaussianImage2dAlgo.setMean( 80.0 ); randomGaussianImage2dAlgo.setStandardDeviation( 20.0 ); randomGaussianImage2dAlgo.execute(); std::cout << "outputImage:" << randomGaussianImage2dAlgo.outputImage()->toString();
random_gaussian_image_2d_algo = imagedev.RandomGaussianImage2d() random_gaussian_image_2d_algo.output_type = imagedev.RandomGaussianImage2d.UNSIGNED_INTEGER_8_BIT random_gaussian_image_2d_algo.image_size_x = 256 random_gaussian_image_2d_algo.image_size_y = 256 random_gaussian_image_2d_algo.mean = 80.0 random_gaussian_image_2d_algo.standard_deviation = 20.0 random_gaussian_image_2d_algo.execute() print( "output_image:", str( random_gaussian_image_2d_algo.output_image ) )
RandomGaussianImage2d randomGaussianImage2dAlgo = new RandomGaussianImage2d { outputType = RandomGaussianImage2d.OutputType.UNSIGNED_INTEGER_8_BIT, imageSizeX = 256, imageSizeY = 256, mean = 80.0, standardDeviation = 20.0 }; randomGaussianImage2dAlgo.Execute(); Console.WriteLine( "outputImage:" + randomGaussianImage2dAlgo.outputImage.ToString() );
Function Examples
auto result = randomGaussianImage2d( RandomGaussianImage2d::OutputType::UNSIGNED_INTEGER_8_BIT, 256, 256, 80.0, 20.0 ); std::cout << "outputImage:" << result->toString();
result = imagedev.random_gaussian_image_2d( imagedev.RandomGaussianImage2d.UNSIGNED_INTEGER_8_BIT, 256, 256, 80.0, 20.0 ) print( "output_image:", str( result ) )
IOLink.ImageView result = Processing.RandomGaussianImage2d( RandomGaussianImage2d.OutputType.UNSIGNED_INTEGER_8_BIT, 256, 256, 80.0, 20.0 ); Console.WriteLine( "outputImage:" + result.ToString() );