码迷,mamicode.com
首页 > 编程语言 > 详细

MATLAB 物体识别算法说明:vision.ForegroundDetector, vision.BlobAnalysis

时间:2015-10-12 22:44:15      阅读:1276      评论:0      收藏:0      [点我收藏+]

标签:

在官方示例中,Motion-Based Multiple Object Tracking和Using Kalman Filter for Object Tracking都使用了下面两个算法进行物体的识别

1、vision.ForegroundDetector

原理:The ForegroundDetector System object compares a color or grayscale video frame to a background model to determine whether individual pixels are part of the background or the foreground. It then computes a foreground mask. By using background subtraction, you can detect foreground objects in an image taken from a stationary camera.

将每一帧和一个背景帧进行对比,判断每个像素点是属于背景,还是属于罩子(罩子就是不属于背景的意思)。通过这种对比,就能识别出后面帧中运动的物体。适用范围:一个固定的摄像头所拍摄的视频。

算法:Gaussian mixture models (GMM).,呵呵,又是高斯。

使用方法见官方文档、示例。

参数,也是最重要的部分:

AdaptLearningRate,默认true,解释:

Enables the object to adapt the learning rate during the period specified by the NumTrainingFrames property. When you set this property to true, the object sets the LearningRate property to 1/(current frame number). When you set this property to false, the LearningRate property must be set at each time step.

很简单,就是设置要不要Learning。

NumTrainingFrames,默认150,解释:

用于训练背景模型的帧数,前面讲过,通过和这个背景模型对比来识别运动的物体。注意:这些数目的帧是指视频开头的部分。

LearningRate,默认0.005,解释:

Learning rate for parameter updates(说不上来,自己理解吧。)

Specify the learning rate to adapt model parameters. This property controls how quickly the model adapts to changing conditions. Set this property appropriately to ensure algorithm stability.(控制背景模型的更新速度,同时该参数影响算法的稳定性)
When you set AdaptLearningRate to true, the LearningRate property takes effect only after the training period specified by NumTrainingFrames is over.

(这个参数在初始的学习帧数,也就是上一个参数完毕后,才开始生效)
When you set the AdaptLearningRate to false, this property will not be available. This property is tunable.

MinimumBackgroundRatio,默认0.7,解释:

Threshold to determine background model
Set this property to represent the minimum of the apriori probabilities for pixels to be considered background values. Multimodal backgrounds can not be handled, if this value is too small.

一个像素被认为是属于背景的最小先验概率。

NumGaussians,默认5,解释:

Number of Gaussian modes in the mixture model(高斯大神的数量?大神保佑我)
Specify the number of Gaussian modes in the mixture model. Set this property to a positive integer. Typically this value is 3, 4 or 5. Set this value to 3 or greater to be able to model multiple background modes.(貌似是越大越好?然后更利于处理多背景的情况)

InitialVariance,解释:

Variance when initializing a new Gaussian mode
呵呵

 

MATLAB 物体识别算法说明:vision.ForegroundDetector, vision.BlobAnalysis

标签:

原文地址:http://www.cnblogs.com/wrajj/p/4872992.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!