Calculates foreground mask using histograms.
IppStatus ippiForegroundHistogram_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pMask, int maskStep, IppiSize roiSize, IppFGHistogramState_8u_C1R* pState);
IppStatus ippiForegroundHistogram_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pMask, int maskStep, IppiSize roiSize, IppFGHistogramState_8u_C3R* pState);
The function ippiForegroundHistogram is declared in the ippcv.h It operates with ROI (see Regions of Interest in Intel IPP).
This foreground/background segmentation algorithm processes the sequence of images and trains statistical models for foreground and background pixels for this sequence. The algorithm applies the model to each image, classifies its pixels as belonging to the foreground or background of the scene, and then updates the model with the image data. Figure “Foreground/Background Segmentation Using Histogram Model” shows the scheme of the algorithm using the statistical histogram model for each pixel [Li03]. The function ippiForegroundHistogram applies the histogram statistical model to the image pSrc, and sets pixels of pMask image corresponding to the background pixels of the pSrc to zero, and foreground pixels - to non-zero value. Then the statistical model is updated by the function ippiForegroundHistogramUpdate.
The function ippiForegroundHistogram can process images with roiSize that is not greater than roiSize specified in the function ippiForegroundHistogramInitAlloc.
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 or maskStep is less than roiSize.width * < pixelSize>. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.