Allocates memory and initializes a state structure for foreground/background segmentation using Gaussian mixtures.
IppStatus ippiForegroundGaussianInitAlloc_8u_C1R(const Ipp8u* pSrc, int srcStep, IppiSize roiSize, IppFGGaussianModel* pModel, IppFGGaussianState_8u_C1R** ppState);
IppStatus ippiForegroundGaussianInitAlloc_8u_C3R(const Ipp8u* pSrc, int srcStep, IppiSize roiSize, IppFGGaussianModel* pModel, IppFGGaussianState_8u_C3R** ppState);
The function ippiForegroundGaussianInitAlloc is declared in the ippcv.h It operates with ROI (see Regions of Interest in Intel IPP).
This function allocates memory, initializes the state structure for the foreground and background modeling by Gaussian mixtures and returns the pointer ppState to it. This structure is used by the function ippiForegroundGaussian that detects foreground pixels and updates the statistical model for the segmentation.
The Gaussian mixture statistical model is defined by following fields of pModel structure:
numGauss |
Number of components in the Gaussian mixture for each frame (usually, 3-5). |
priorBack |
Minimum prior probability of the background. |
updBGProb |
Speed of updating of parameters of selected mixture component (0.5 > updBGProb > 0). |
winSize |
Number of last frames affecting model parameter update (100-200). |
numFrame |
Number of background frames for adjustment of shadows searching. Only for 3-channels images. |
detectionRate |
Speed of shadows searching. Only for 3-channels images (0 > detectionRate > 1). |
brightnessDistortion |
Lower bound of the normalized brightness distortion for shadows. Only for 3-channels images (0 > brightnessDistortion > 1). |
shadowBG |
Flag of shadows searching. If shadowBG is 1, then pixels belonging to colored shadows are marked as background, otherwise they may be included in foreground areas. Only for 3-channels images (0,1). |
The Gaussian mixture statistical model models each background pixel by a Gaussian mixture with a small number of components numGauss [Kadew01]. Most important components with sum of weights greater than priorBack are used to model the background. Mixture components are updated while processing each new frame. The learning speed of the component that matches a background pixel is defined by updBGChange. All mixture parameters are then updated using statistics from last winSize frames. If shadowBG is set to 1, then the search of colored shadows is performed for three-channel images. In this case foreground pixels, that are detected as shadow, are marked as background pixels.
The structure can be used to process image whose width and height are equal to or less than corresponding fields of roiSize.
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 is less than roiSize.width * < pixelSize>. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.