Method Create
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Create(int, double, bool)
Creates KNN Background Subtractor
public static BackgroundSubtractorKNN Create(int history = 500, double dist2Threshold = 400, bool detectShadows = true)
Parameters
historyintLength of the history.
dist2ThresholddoubleThreshold on the squared distance between the pixel and the sample to decide whether a pixel is close to that sample. This parameter does not affect the background update.
detectShadowsboolIf true, the algorithm will detect shadows and mark them. It decreases the speed a bit, so if you do not need this feature, set the parameter to false.