Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

AddRandGauss

Generates random samples with Gaussian distribution and adds them to an image data.

Syntax

IppStatus ippiAddRandGauss_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp<datatype> mean, Ipp<datatype> stDev, unsigned int* pSeed);

Supported values for mod:

8u_C1IR 16u_C1IR 16s_C1IR 32f_C1IR
8u_C3IR 16u_C3IR 16s_C3IR 32f_C3IR
8u_C4IR 16u_C4IR 16s_C4IR 32f_C4IR
8u_AC4IR 16u_AC4IR 16s_AC4IR 32f_AC4IR

Include Files

ippi.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pSrcDst

Pointer to the source and destination image ROI.

srcDstStep

Distance in bytes between starts of consecutive lines in the source and destination image.

roiSize

Size of the image ROI in pixels.

mean

The mean of the Gaussian distribution.

stDev

The standard deviation of the Gaussian distribution.

pSeed

The initial seed value for the pseudo-random number generator.

Description

This function operates with ROI (see Regions of Interest in Intel IPP).

The function generates samples with Gaussian distribution that have the mean value mean and standard deviation stdev and adds them to a source image ROI pointed to by pSrcDst.

The resulting pixel values that exceed the image data range are saturated to the respective data-range limits. To obtain an image which contains pure noise with Gaussian distribution, call ippiAddRandGauss using a source image with zero data as input.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if pSrcDst or pSeed pointer is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or negative value.

ippStsStepErr

Indicates an error condition if srcDstStep has a zero or negative value.