IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

initialization of an image with random values generated using a normal law More...

IPSDKIPLUTILITY_API void ipsdk::imaproc::util::gaussianRandomImg (const ipsdk::imaproc::attr::GaussianParameterConstPtr &pInGaussianParameter, const image::ImagePtr &pOutImg)
 wrapper function for initialization of an image with random values generated using a normal law More...
 

Detailed Description

initialization of an image with random values generated using a normal law

This algorithm allows to fill an image with random sampled values. The pixel intensities follow a normal law defined by the given mean and standard deviation stored in an ipsdk::imaproc::attr::GaussianParameter attribute.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InGaussianParameter [Input] Parameters describing a Gaussian X
ipsdk::imaproc::attr::OutImg [Output] image for processing operation X

Global Rule description

Global rule description for algorithm :
ipsdk::processor::none ()

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLUtility as util

Code Example

# create an image
img = PyIPSDK.createImage(PyIPSDK.eImageBufferType.eIBT_UInt8, 510, 509)
# create a gaussian random image with a given mean and a given standard deviation
mean = 100
stdDev = 25
util.gaussianRandomImg(PyIPSDK.createGaussianParameter(mean, stdDev), img)

Example of C++ code :

Example informations

Associated library

IPSDKIPLUtility

Header file

Code Example

// creation of an input image
ImageGeometryPtr pImageGeometry = geometry2d(imageBufferType, sizeX, sizeY);
boost::shared_ptr<MemoryImage> pImg(boost::make_shared<MemoryImage>());
pImg->init(*pImageGeometry);
// Define the Gaussian parameters
GaussianParameterPtr pGaussianParameter = createGaussianParameter(fMean, fStdDev);
// initialize image content with random values in specified range
gaussianRandomImg(pGaussianParameter, pImg);
See also
GaussianRandomImgLvl1
GaussianRandomImgLvl2
GaussianRandomImgLvl3

Function Documentation

◆ gaussianRandomImg()

IPSDKIPLUTILITY_API void ipsdk::imaproc::util::gaussianRandomImg ( const ipsdk::imaproc::attr::GaussianParameterConstPtr pInGaussianParameter,
const image::ImagePtr pOutImg 
)

wrapper function for initialization of an image with random values generated using a normal law

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure