#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... | |
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.
cv::gpu::GMG_GPU::GMG_GPU | ( | ) |
Validate parameters and set up data structures for appropriate frame size.
frameSize | Input frame size |
min | Minimum value taken on by pixels in image sequence. Usually 0 |
max | Maximum value taken on by pixels in image sequence. e.g. 1.0 or 255 |
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.
frame | Input frame |
fgmask | Output mask image representing foreground and background pixels |
learningRate | determines how quickly features are “forgotten” from histograms |
stream | Stream for the asynchronous version |
void cv::gpu::GMG_GPU::release | ( | ) |
Releases all inner buffers.
float cv::gpu::GMG_GPU::backgroundPrior |
Prior probability that any given pixel is a background pixel. A sensitivity parameter.
float cv::gpu::GMG_GPU::decisionThreshold |
Value above which pixel is determined to be FG.
float cv::gpu::GMG_GPU::learningRate |
Set between 0.0 and 1.0, determines how quickly features are "forgotten" from histograms.
int cv::gpu::GMG_GPU::maxFeatures |
Total number of distinct colors to maintain in histogram.
int cv::gpu::GMG_GPU::numInitializationFrames |
Number of frames of video to use to initialize histograms.
int cv::gpu::GMG_GPU::quantizationLevels |
Number of discrete levels in each channel to be used in histograms.
int cv::gpu::GMG_GPU::smoothingRadius |
Smoothing radius, in pixels, for cleaning up FG image.
bool cv::gpu::GMG_GPU::updateBackgroundModel |
Perform background model update.