ForegroundHistogramUpdate

Updates histogram statistical model for foreground segmentation.

Syntax

IppStatus ippiForegroundHistogramUpdate_8u_C1R(const Ipp8u* pSrc, int srcStep, const Ipp8u* pMask, int maskStep, Ipp8u* pRef, int refStep, IppiSize roiSize, IppFGHistogramState_8u_C1R* pState);

IppStatus ippiForegroundHistogramUpdate_8u_C3R(const Ipp8u* pSrc, int srcStep, const Ipp8u* pMask, int maskStep, Ipp8u* pRef, int refStep, IppiSize roiSize, IppFGHistogramState_8u_C3R* pState);

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 ROI of the foreground mask image.
maskStep
Distance in bytes between starts of consecutive lines in the foreground mask image.
pRef
Pointer to the ROI of the source and destination reference background mask image.
refStep
Distance in bytes between starts of consecutive lines in the reference background mask image.
roiSize
Size of the source and destination image ROI in pixels.
pState
Pointer to the segmentation state structure.

Description

The function ippiForegroundHistogramUpdate is declared in the ippcv.h It operates with ROI (see Regions of Interest in Intel IPP).

This function updates the histogram statistical model using pSrc image and foreground mask pMask. Between calls of the function ippiForegroundHistogram and ippiForegroundHistogramUpdate functions, the mask image pMask is generally processed to delete foreground and background outlier pixels. When the model is updated, it is ready to process the next image.

This function uses the reference background image pRef that is initialized during the first call of the function. This image is updated after each call of the function ippiForegroundHistogramUpdate.

The function ippiForegroundHistogram can process images with roiSize that is not greater than roiSize specified in the function ippiForegroundHistogramInitAlloc.

Return Values

ippStsNoErr

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

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

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

ippStsStepErr

Indicates an error condition if one of the srcStep, maskStep, or refStep is less than roiSize.width * < pixelSize>.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.