#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. | |
Public Attributes | |
| int | maxFeatures |
| Total number of distinct colors to maintain in histogram. | |
| float | learningRate |
| Set between 0.0 and 1.0, determines how quickly features are "forgotten" from histograms. | |
| int | numInitializationFrames |
| Number of frames of video to use to initialize histograms. | |
| int | quantizationLevels |
| Number of discrete levels in each channel to be used in histograms. | |
| float | backgroundPrior |
| Prior probability that any given pixel is a background pixel. A sensitivity parameter. | |
| float | decisionThreshold |
| Value above which pixel is determined to be FG. | |
| int | smoothingRadius |
| Smoothing radius, in pixels, for cleaning up FG image. | |
| bool | updateBackgroundModel |
| Perform background model update. | |
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.
| 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.
| 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 |
| stream | Stream for the asynchronous version |
Releases all inner buffers.
Total number of distinct colors to maintain in histogram.
Set between 0.0 and 1.0, determines how quickly features are "forgotten" from histograms.
Number of frames of video to use to initialize histograms.
Number of discrete levels in each channel to be used in histograms.
Prior probability that any given pixel is a background pixel. A sensitivity parameter.
Value above which pixel is determined to be FG.
Smoothing radius, in pixels, for cleaning up FG image.
Perform background model update.