OpenCV  2.4.13.7
Open Source Computer Vision
cv::gpu::GMG_GPU Class Reference

#include <gpu.hpp>

Public Member Functions

 GMG_GPU ()
 
void initialize (Size frameSize, float min=0.0f, float max=255.0f)
 
void operator() (const GpuMat &frame, GpuMat &fgmask, float learningRate=-1.0f, Stream &stream=Stream::Null())
 
void release ()
 Releases all inner buffers. More...
 

Public Attributes

int maxFeatures
 Total number of distinct colors to maintain in histogram. More...
 
float learningRate
 Set between 0.0 and 1.0, determines how quickly features are "forgotten" from histograms. More...
 
int numInitializationFrames
 Number of frames of video to use to initialize histograms. More...
 
int quantizationLevels
 Number of discrete levels in each channel to be used in histograms. More...
 
float backgroundPrior
 Prior probability that any given pixel is a background pixel. A sensitivity parameter. More...
 
float decisionThreshold
 Value above which pixel is determined to be FG. More...
 
int smoothingRadius
 Smoothing radius, in pixels, for cleaning up FG image. More...
 
bool updateBackgroundModel
 Perform background model update. More...
 

Detailed Description

Background Subtractor module. Takes a series of images and returns a sequence of mask (8UC1) images of the same size, where 255 indicates Foreground and 0 represents Background. This class implements an algorithm described in "Visual Tracking of Human Visitors under Variable-Lighting Conditions for a Responsive Audio Art Installation," A. Godbehere, A. Matsukawa, K. Goldberg, American Control Conference, Montreal, June 2012.

Constructor & Destructor Documentation

§ GMG_GPU()

cv::gpu::GMG_GPU::GMG_GPU ( )

Member Function Documentation

§ initialize()

void cv::gpu::GMG_GPU::initialize ( Size  frameSize,
float  min = 0.0f,
float  max = 255.0f 
)

Validate parameters and set up data structures for appropriate frame size.

Parameters
frameSizeInput frame size
minMinimum value taken on by pixels in image sequence. Usually 0
maxMaximum value taken on by pixels in image sequence. e.g. 1.0 or 255

§ operator()()

void cv::gpu::GMG_GPU::operator() ( const GpuMat frame,
GpuMat fgmask,
float  learningRate = -1.0f,
Stream stream = Stream::Null() 
)

Performs single-frame background subtraction and builds up a statistical background image model.

Parameters
frameInput frame
fgmaskOutput mask image representing foreground and background pixels
learningRatedetermines how quickly features are “forgotten” from histograms
streamStream for the asynchronous version

§ release()

void cv::gpu::GMG_GPU::release ( )

Releases all inner buffers.

Member Data Documentation

§ backgroundPrior

float cv::gpu::GMG_GPU::backgroundPrior

Prior probability that any given pixel is a background pixel. A sensitivity parameter.

§ decisionThreshold

float cv::gpu::GMG_GPU::decisionThreshold

Value above which pixel is determined to be FG.

§ learningRate

float cv::gpu::GMG_GPU::learningRate

Set between 0.0 and 1.0, determines how quickly features are "forgotten" from histograms.

§ maxFeatures

int cv::gpu::GMG_GPU::maxFeatures

Total number of distinct colors to maintain in histogram.

§ numInitializationFrames

int cv::gpu::GMG_GPU::numInitializationFrames

Number of frames of video to use to initialize histograms.

§ quantizationLevels

int cv::gpu::GMG_GPU::quantizationLevels

Number of discrete levels in each channel to be used in histograms.

§ smoothingRadius

int cv::gpu::GMG_GPU::smoothingRadius

Smoothing radius, in pixels, for cleaning up FG image.

§ updateBackgroundModel

bool cv::gpu::GMG_GPU::updateBackgroundModel

Perform background model update.


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