Creates KNN Background Subtractor
bs = cv.BackgroundSubtractorKNN()
bs = cv.BackgroundSubtractorKNN('OptionName', optionValue, ...)
Options
- History Length of the history. default 500
- Dist2Threshold Threshold 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. default 400.0
- DetectShadows If 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. default true