BackgroundSubtractorKNN Class |
Namespace: OpenCvSharp
The BackgroundSubtractorKNN type exposes the following members.
| Name | Description | |
|---|---|---|
| AllocatedMemory |
Gets or sets a memory address allocated by AllocMemory.
(Inherited from DisposableObject.) | |
| AllocatedMemorySize |
Gets or sets the byte length of the allocated memory
(Inherited from DisposableObject.) | |
| CvPtr |
Native pointer of OpenCV structure
(Inherited from DisposableCvObject.) | |
| DataHandle |
Gets or sets a handle which allocates using cvSetData.
(Inherited from DisposableObject.) | |
| DetectShadows |
Returns the shadow detection flag.
If true, the algorithm detects shadows and marks them. See createBackgroundSubtractorKNN for details.
| |
| Dist2Threshold |
Gets or sets the threshold on the squared distance between the pixel and the sample.
The threshold on the squared distance between the pixel and the sample to decide whether a pixel is close to a data sample.
| |
| Empty |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
(Inherited from Algorithm.) | |
| History |
Gets or sets the number of last frames that affect the background model.
| |
| IsDisposed |
Gets a value indicating whether this instance has been disposed.
(Inherited from DisposableObject.) | |
| IsEnabledDispose |
Gets or sets a value indicating whether you permit disposing this instance.
(Inherited from DisposableObject.) | |
| KNNSamples |
Returns the number of neighbours, the k in the kNN.
K is the number of samples that need to be within dist2Threshold in order to decide that that
pixel is matching the kNN background model.
| |
| NSamples |
Gets or sets the number of data samples in the background model
| |
| ShadowThreshold |
Gets or sets the shadow threshold.
A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in
the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel
is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiara,
*Detecting Moving Shadows...*, IEEE PAMI,2003.
| |
| ShadowValue |
Gets or sets the shadow value.
Shadow value is the value used to mark shadows in the foreground mask. Default value is 127.
Value 0 in the mask always means background, 255 means foreground.
|
| Name | Description | |
|---|---|---|
| AllocGCHandle |
Pins the object to be allocated by cvSetData.
(Inherited from DisposableObject.) | |
| AllocMemory |
Allocates the specified size of memory.
(Inherited from DisposableObject.) | |
| Apply |
the update operator that takes the next video frame and returns the current foreground mask as 8-bit binary image.
(Inherited from BackgroundSubtractor.) | |
| Create |
Creates KNN Background Subtractor
| |
| Dispose |
Releases the resources
(Inherited from DisposableObject.) | |
| Dispose(Boolean) |
Releases the resources
(Inherited from DisposableObject.) | |
| DisposeManaged |
Releases managed resources
(Overrides DisposableObjectDisposeManaged.) | |
| DisposeUnmanaged |
releases unmanaged resources
(Inherited from DisposableCvObject.) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| Finalize |
Destructor
(Inherited from DisposableObject.) | |
| GetBackgroundImage |
computes a background image
(Inherited from BackgroundSubtractor.) | |
| GetDefaultName |
Returns the algorithm string identifier.
This string is used as top level xml/yml node tag when the object
is saved to a file or string.
(Inherited from Algorithm.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| NotifyMemoryPressure |
Notifies the allocated size of memory.
(Inherited from DisposableObject.) | |
| Read |
Reads algorithm parameters from a file storage
(Inherited from Algorithm.) | |
| Save |
Saves the algorithm to a file.
In order to make this method work, the derived class must
implement Algorithm::write(FileStorage fs).
(Inherited from Algorithm.) | |
| ThrowIfDisposed |
If this object is disposed, then ObjectDisposedException is thrown.
(Inherited from DisposableObject.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| Write |
Stores algorithm parameters in a file storage
(Inherited from Algorithm.) |
| Name | Description | |
|---|---|---|
| ptr |
Data pointer
(Inherited from DisposableCvObject.) |