在官方示例中,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
呵呵

一些相关的方法就不解释了。

2、vision.BlobAnalysis

原理:computes statistics for connected regions in a binary image. (将连通的区域连起来,作为识别的那个移动物体);

输入输出参数:

Use the step syntax below with input binary image, BW, blob analysis object, H, and any optional properties. The step method computes and returns statistics of the input binary image depending on the property values specified. The order of the returned values when there are multiple outputs are in the order they are described below:

输出:区域的面积、中心点、外面的框框。
[AREA,CENTROID,BBOX] = step(H,BW) returns the area, centroid and the bounding box of the blobs when the AreaOutputPort, CentroidOutputPort and BoundingBoxOutputPort properties are set to true. These are the only properties that are set to true by default. If you set any additional properties to true, the corresponding outputs follow the AREA,CENTROID, and BBOX outputs.

输入参数有很多个,这里不一一解释,后面用到再详细说。

可设置的属性:

AreaOutputPort,CentroidOutputPort,BoundingBoxOutputPort

默认为true,表示会输出[AREA,CENTROID,BBOX]

MajorAxisLengthOutputPort,MinorAxisLengthOutputPort,OrientationOutputPort,EccentricityOutputPort,

EquivalentDiameterSquaredOutputPort,ExtentOutputPort,PerimeterOutputPort,LabelMatrixOutputPort

一些计算结果的输出,默认为false

OutputDataType,默认double,设置输出数据的格式,包括: double, single, or Fixed point

Connectivity,默认8,设置哪些像素点是连接的,可选4和8。你懂的,一个小正方形周围有8个小正方形。

MaximumCount,默认50,解释:

Maximum number of labeled regions in each input image(每幅图中最大的区域个数,也就是识别到的运动物体个数)

MinimumBlobArea,默认0,解释:

Minimum blob area in pixels(区域最小面积,占多少个像素?)

MaximumBlobArea,默认为最大的整型数intmax('uint32')

Maximum blob area in pixels(区域占的最大面积,单位像素)

以上两个属性可以控制识别到的区域大小,把不想识别到的筛选出去。

ExcludeBorderBlobs,默认false

Exclude blobs that contain at least one border pixel
Set this property to true if you do not want to label blobs that contain at least one border pixel.

排除掉有边界的区域。

MATLAB 物体识别算法说明:vision.ForegroundDetector, vision.BlobAnalysis的更多相关文章

  1. 手把手教你使用LabVIEW OpenCV dnn实现物体识别(Object Detection)含源码

    前言 今天和大家一起分享如何使用LabVIEW调用pb模型实现物体识别,本博客中使用的智能工具包可到主页置顶博客LabVIEW AI视觉工具包(非NI Vision)下载与安装教程中下载 一.物体识别 ...

  2. C#中调用Matlab人工神经网络算法实现手写数字识别

    手写数字识别实现 设计技术参数:通过由数字构成的图像,自动实现几个不同数字的识别,设计识别方法,有较高的识别率 关键字:二值化  投影  矩阵  目标定位  Matlab 手写数字图像识别简介: 手写 ...

  3. 基于MATLAB的人脸识别算法的研究

    基于MATLAB的人脸识别算法的研究 作者:lee神 现如今机器视觉越来越盛行,从智能交通系统的车辆识别,车牌识别到交通标牌的识别:从智能手机的人脸识别的性别识别:如今无人驾驶汽车更是应用了大量的机器 ...

  4. DeepID人脸识别算法之三代(转)

    DeepID人脸识别算法之三代 转载请注明:http://blog.csdn.net/stdcoutzyx/article/details/42091205 DeepID,目前最强人脸识别算法,已经三 ...

  5. DeepID人脸识别算法之三代

    DeepID人脸识别算法之三代 转载请注明:http://blog.csdn.net/stdcoutzyx/article/details/42091205 DeepID,眼下最强人脸识别算法.已经三 ...

  6. 【YOLOv5】LabVIEW+YOLOv5快速实现实时物体识别(Object Detection)含源码

    前言 前面我们给大家介绍了基于LabVIEW+YOLOv3/YOLOv4的物体识别(对象检测),今天接着上次的内容再来看看YOLOv5.本次主要是和大家分享使用LabVIEW快速实现yolov5的物体 ...

  7. 3D物体识别的如果检验

    3D物体识别的如果验证 这次目的在于解释怎样做3D物体识别通过验证模型如果在聚类里面.在描写叙述器匹配后,这次我们将执行某个相关组算法在PCL里面为了聚类点对点相关性的集合,决定如果物体在场景里面的实 ...

  8. ROS kinetic + Realsens D435i + ORK + LINEMOD 物体识别

    1. ORK 网址:https://wg-perception.github.io/object_recognition_core/ ORK (Object Recognition Kitchen) ...

  9. ADAS可行驶区域道路积水反光区域的识别算法

    ADAS可行驶区域道路积水反光区域的识别算法 Water logging area reflecting recognition algorithm for ADAS 1. 工程概要 1.1  概述: ...

随机推荐

  1. 挂羊头卖狗肉蓄意欺骗读者——谭浩强《C程序设计(第四版)》中所谓的“按照C99”(二)

    挂羊头卖狗肉蓄意欺骗读者——谭浩强<C程序设计(第四版)>中所谓的“按照C99”(二) 在<谭C>p4:“本书的叙述以C99标准为依据”,下面从C89到C99的主要变化方面来看 ...

  2. 设置Ubuntu 14.04右键终端的方法

    设置Ubuntu 14.04右键终端的方法如下: 首先要安装一个包,即可在右键里面添加一个"打开终端"的菜单. sudo apt-get install nautilus-open ...

  3. dr.wondr博士随笔之三星某古董智能机GTXXXX 的取证恢复一例

    大家好!欢迎来到我dr.wonde博士的微博! 这是dr.wonde的第一篇微博,不足之处,还请见谅. 今天dr.wonde给你们带来不可能的数据恢复任务之三星非智能机古董机GT-E1088C 的恢复 ...

  4. 引用参数,值参数,ref,out

    1,一个参数只有在引用的时候才能改变其值,这是一种情况 2,一个参数在引用后要永久的改变其值(可以用返回参数的形式) 3,多个参数在引用后要永久的改变其值或者多个参数中的部分(返回参数就适合了,因为只 ...

  5. python学习之安装模块

    安装pip下载python模块 yum -y install python-pip pip install pandas (pandas要安装的模块名) 默认使用的官方python源,这个在国内访问很 ...

  6. HDU 4947 GCD Array 容斥原理+树状数组

    GCD Array Time Limit: 11000/5500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total ...

  7. nRF52系列来袭,Nordic的低功耗蓝牙方案大有可为

      坐落在北欧的挪威不像他的邻居芬兰那样,可以先后依靠NOKIA和愤怒的小鸟在世界科技界享有盛名.在一般人看来,挪威除了一个逐渐式微的Opera浏览器以外,并没有更多拿得出手的科技企业.而事实证明这只 ...

  8. C++用PostMessage模拟按钮点击

    有时我们可能会在某个程序中用到模拟按钮点击事件. 本文中的例子在MFC程序中调试通过,duilib的没试过,还需探索 不多说,上代码: #include "stdafx.h" #i ...

  9. Unicode 与(UTF-8,UTF-16,UTF-32,UCS-2)

    Unicode是什么? Unicode源于一个很简单的想法:将全世界所有的字符包含在一个集合里,计算机只要支持这一个字符集,就能显示所有的字符,再也不会有乱码了. U+597D = 好 597D 是1 ...

  10. 学习mongo系列(六)limit(munber),skip(number)

    > db.user.find().pretty(){ "_id" : ObjectId("56946fba3a18f4867aecbcd1"), &quo ...