OpenCV 使用背景减法方法

 

https://www.w3cschool.cn/opencv/opencv-2v342ebv.html

 

高斯混合模型

https://zhuanlan.zhihu.com/p/28108751

https://blog.csdn.net/hotboyboy/article/details/88652385

https://blog.csdn.net/jinshengtao/article/details/26278725?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase

 

CV :: BackgroundSubtractorMOG2

virtual void cv::BackgroundSubtractorMOG2::apply (InputArray image,
OutputArray fgmask,  double learningRate = -1 )	
# Python:
fgmask	=	cv.BackgroundSubtractorMOG2.apply(	image[, fgmask[, learningRate]]	)

参数介绍:

Parameters

imageNext video frame. Floating point frame will be used without scaling and should be in range [0,255].
fgmaskThe output foreground mask as an 8-bit binary image.
learningRateThe value between 0 and 1 that indicates how fast the background model is learnt. Negative parameter value makes the algorithm to use some automatically chosen learning rate. 0 means that the background model is not updated at all, 1 means that the background model is completely reinitialized from the last frame.

 learningRate : 0到1之间的值表示学习背景模型的速度。 负参数值使算法使用一些自动选择的学习速率。 0表示完全不更新背景模型,1表示从最后一帧完全重新初始化背景模型。

 

 是否检测阴影

历史记录的长度

 

在像素和模型之间的平方马氏距离上确定背景模型是否能很好地描述像素。
此参数不影响背景更新。

 

def createBackgroundSubtractorMOG2(history=None, varThreshold=None, detectShadows=None): # real signature unknown; restored from __doc__
    """
    createBackgroundSubtractorMOG2([, history[, varThreshold[, detectShadows]]]) -> retval
    .   @brief Creates MOG2 Background Subtractor
    .   
    .   @param history Length of the history.
    .   @param varThreshold Threshold on the squared Mahalanobis distance between the pixel and the model
    .   to decide whether a pixel is well described by the background model. This parameter does not
    .   affect the background update.
    .   @param 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.
    """
    pass

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值