VAT  3.0
Video Analysis Tool
Classes | Public Member Functions | Public Attributes | Protected Attributes | List of all members
BackgroundSubtractorLBSP Class Referenceabstract

#include <BackgroundSubtractorLBSP.h>

Inheritance diagram for BackgroundSubtractorLBSP:
BackgroundSubtractorPAWCS

Classes

struct  PxInfoBase
 

Public Member Functions

 BackgroundSubtractorLBSP (float fRelLBSPThreshold, size_t nLBSPThresholdOffset=0)
 full constructor
 
virtual ~BackgroundSubtractorLBSP ()
 default destructor
 
virtual void initialize (const cv::Mat &oInitImg)
 (re)initiaization method; needs to be called before starting background subtraction
 
virtual void initialize (const cv::Mat &oInitImg, const cv::Mat &oROI)=0
 (re)initiaization method; needs to be called before starting background subtraction
 
virtual void apply (cv::InputArray image, cv::OutputArray fgmask, double learningRate=0)=0
 primary model update function; the learning param is used to override the internal learning speed (ignored when <= 0)
 
virtual cv::Mat getROICopy () const
 returns a copy of the ROI used for descriptor extraction
 
virtual void setROI (cv::Mat &oROI)
 sets the ROI to be used for descriptor extraction (note: this function will reinit the model and return the usable ROI)
 
void setAutomaticModelReset (bool)
 turns automatic model reset on or off
 

Public Attributes

int m_nDebugCoordX
 
int m_nDebugCoordY
 
std::string m_sDebugName
 
cv::FileStorage * m_pDebugFS
 

Protected Attributes

cv::Mat m_oROI
 background model ROI used for LBSP descriptor extraction (specific to the input image size)
 
cv::Size m_oImgSize
 input image size
 
size_t m_nImgChannels
 input image channel size
 
int m_nImgType
 input image type
 
const size_t m_nLBSPThresholdOffset
 LBSP internal threshold offset value, used to reduce texture noise in dark regions.
 
const float m_fRelLBSPThreshold
 LBSP relative internal threshold (kept here since we don't keep an LBSP object)
 
size_t m_nTotPxCount
 total number of pixels (depends on the input frame size) & total number of relevant pixels
 
size_t m_nTotRelevantPxCount
 
size_t m_nFrameIndex
 current frame index, frame count since last model reset & model reset cooldown counters
 
size_t m_nFramesSinceLastReset
 
size_t m_nModelResetCooldown
 
size_t m_anLBSPThreshold_8bitLUT [UCHAR_MAX+1]
 pre-allocated internal LBSP threshold values LUT for all possible 8-bit intensities
 
size_t * m_aPxIdxLUT
 internal pixel index LUT for all relevant analysis regions (based on the provided ROI)
 
PxInfoBasem_aPxInfoLUT
 internal pixel info LUT for all possible pixel indexes
 
const int m_nDefaultMedianBlurKernelSize
 default kernel size for median blur post-proc filtering
 
bool m_bInitialized
 specifies whether the algorithm is fully initialized or not
 
bool m_bAutoModelResetEnabled
 specifies whether automatic model resets are enabled or not
 
bool m_bUsingMovingCamera
 specifies whether the camera is considered moving or not
 
cv::Mat m_oLastColorFrame
 copy of latest pixel intensities (used when refreshing model)
 
cv::Mat m_oLastDescFrame
 copy of latest descriptors (used when refreshing model)
 
cv::Mat m_oLastFGMask
 the foreground mask generated by the method at [t-1]
 

Detailed Description

Local Binary Similarity Pattern (LBSP)-based change detection algorithm (abstract version/base class).

For more details on the different parameters, see P.-L. St-Charles and G.-A. Bilodeau, "Improving Background Subtraction using Local Binary Similarity Patterns", in WACV 2014, or G.-A. Bilodeau et al, "Change Detection in Feature Space Using Local Binary Similarity Patterns", in CRV 2013.

This algorithm is currently NOT thread-safe.


The documentation for this class was generated from the following files: