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

Mean_StdDev

Computes the mean and standard deviation of image pixel values.

Syntax

Case 1: Operation on one-channel data

IppStatus ippiMean_StdDev_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize, Ipp64f* pMean, Ipp64f* pStdDev);

Supported values for mod:

8u_C1R

16u_C1R

32f_C1R

Case 2: Masked operation on one-channel data

IppStatus ippiMean_StdDev_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u* pMask, int maskStep, IppiSize roiSize, Ipp64f* pMean, Ipp64f* pStdDev);

Supported values for mod:

8u_C1MR

16u_C1MR

32f_C1MR

Case 3: Operation on multi-channel data

IppStatus ippiMean_StdDev_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize, int coi, Ipp64f* pMean, Ipp64f* pStdDev);

Supported values for mod:

8u_C3CR

16u_C3CR

32f_C3CR

Case 4: Masked operation on multi-channel data

IppStatus ippiMean_StdDev_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u* pMask, int maskStep, IppiSize roiSize, int coi, Ipp64f* pMean, Ipp64f* pStdDev);

Supported values for mod:

8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files

ippcv.h

Domain Dependencies

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

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

Parameters

pSrc

Pointer to the source image ROI.

srcStep

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

pMask

Pointer to the mask image.

maskStep

Distance in bytes between starts of consecutive lines in the mask image.

roiSize

Size of the source ROI in pixels

coi

Channel of interest (for color images only); can be 1, 2, or 3.

pMean

Pointer to the computed mean of pixel values.

pStdDev

Pointer to the computed standard deviation of pixel values in the image.

Description

This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the mean and standard deviation of pixel values in the ROI of the source image pSrc. In the mask mode, the computation is done over pixels selected by nonzero mask values. In the multi-channel mode, the mean is computed for a single channel of interest specified by coi. If any of the parameters pMean or pStdDev is not required, the zero pointer is to be passed to the corresponding parameter.

Return Values

ippStsNoErr

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

ippStsNullPtrErr

Indicates an error when pSrc or pMask pointer is NULL.

ippStsSizeErr

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

ippStsStepErr

Indicates an error condition if srcStep or maskStep is less than roiSize.width * <pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if steps for floating-point images cannot be divided by 4.

ippStsCOIErr

Indicates an error when coi is not 1, 2, or 3.