目标检测中背景建模方法

来源:互联网 发布:太阳能 知乎 编辑:程序博客网 时间:2024/06/08 01:49
      

'Levenberg-Marquardt'

options = optimset('Algorithm','levenberg-marquardt',...

   'Display','off','TolX',0.001,'TolFun',0.001);

pid = lsqnonlin(@tracklsq, pid0, [], [], options);

 

 

opts=optimset('Algorithm','interior-point'); 

options=optimset ('Display','iter','TolX',1e-25,'TolFun',1e-25,'LargeScale','off','MaxIter',2,'MaxFunEvals',inf);    

 

options:包含算法控制参数的结构  设定(或显示)控制参数的命令为Optimset,有以下一些用法: Optimset //显示控制参数  optimset optfun //显示程序'optfun的控制参数 opt=optimset //控制参数设为[](即缺省值  opt=optimset(optfun)// 设定为程序'optfun的控制参数缺省值 Opt=optimset('par1',val1,'par2',val2,...) Opt=optimset(oldopts,'par1',val1,...) opt=optimset(oldopts,newopts)  可以设定的参数比较多,对lsqnonlinlsqcurvefit,常用的有以下一些参数: Diagnostics 是否显示诊断信息( 'on' 'off)  Display 显示信息的级别('off' , 'iter' , 'final'notify) LargeScale 是否采用大规模算法( 'on' 'off)缺省值为on  MaxIter 最大迭代次数 TolFun 函数计算的误差限 TolX 决策变量的误差限  Jacobian 目标函数是否采用分析Jacobi矩阵('on' 'off) MaxFunEvals 目标函数最大调用次数  LevenbergMarquardt 搜索方向选用LM(‘on’), GN(‘off’,缺省值)  

 

2 LargeScale = 'off' and
LevenbergMarquardt = 'off
在以后的版本可能被替代,这是给出警告;
2、为弥补,在使用Gauss-Newton algorithm可以设置一下
'trust-region-reflective'
'levenberg-marquardt'

options = optimset('LargeScale','off','LevenbergMarquardt','on');

3 liqnonlin:

  [x,resnorm, r esidual,exitflag, output,lambda,jacobian]=lsqnonlin(…)
说明:x返回解向量;resnorm返回x处残差的平方范数值:sum(fun(x).^2)residual返回x处的残差值fun(x)lambda返回包含x处拉格朗日乘子的结构参数;jacobian返回解x处的fun函数的雅可比矩阵。
lsqnonlin默认时选择大型优化算法。Lsqnonlin通过将options.LargeScale设置为’off’来作中型优化算法。其采用一维搜索法。

 

LSQNONLIN implements two different algorithms: trust region reflective and Levenberg-Marquardt. Choose one via the option Algorithm: for instance, to  choose Levenberg-Marquardt, set OPTIONS = optimset('Algorithm','levenberg-marquardt'),  and then pass OPTIONS to LSQNONLIN. 

 

 

%%%%%% options = optimset('largescale','off','levenbergmarquardt','on');%%%过时失效

    %%%%%%  options = optimset('Algorithm','Levenberg-Marquardt','TolFun',1e-25); 存在问题 

%%%%% options = optimset('Algorithm','Levenberg-Marquardt');存在问题

 

    options = optimset('Algorithm','levenberg-marquardt','Display','off');%%%可行

 

%%%%未处理的

options=optimset('Algorithm','Levenberg-Marquardt','LargeScale','off');

目标检测中背景建模方法 总结

计算机视觉论坛

http://www.cvchina.net/forum.php?mod=viewthread&tid=5162

原文引自:Ronny的博客:

http://www.cnblogs.com/ronny/archive/2012/04/12/2444053.html
最近一直在做前景检测方面的研究,刚开始主要是做一些工程性的应用,为了解决工程方面的问题,下了不少功夫,也看了不少最近国内外的文章。一直想做个总结,拖着拖着,终究却写成这篇极不成功的总结。      背景建模或前景检测的算法主要有:
1. Single Gaussian (单高斯模型)
Real-time tracking of the human body
2. 混合高斯模型(Mixture of Gaussian Model
An improved adaptive background mixture model for real-time tracking with shadow detection
3. 滑动高斯平均(Running Gaussian average---Single Gaussian
Real-time tracking of the human body
对于单高斯和混合高斯估计大家都熟悉,这里不再累述(混合高斯在现有的背景建模算法中应该算是比较好的,很多新的算法或改进的算法都是基于它的一些原理的不同变体,但混合高斯算法的缺点是计算量相对比较大,速度偏慢,对光照敏感);
4. 码本 (CodeBook)
Real-time foreground–background segmentation using codebook model
Real-time foreground-background segmentation using a modified codebook model
对与Codebook算法,曾经做过实验,效果还可以,后来也有多种变体,没有进一步的进行研究,但算法对光照也敏感);
5. 自组织背景检测( SOBS-Self-organization background subtraction)
A self-Organizing approach to background subtraction for+visual surveillance
对于自组织背景建模算法即SOBS算法,该算法对光照有一定的鲁棒性,但MAP的模型比输入图片大,计算量比较大,但是可以通过并行处理来解决算法的速度问题,可以进行尝试;
6. 样本一致性背景建模算法 (SACON)
A consensus-based method for tracking
A consensus-based method for tracking-Modelling background scenario and foreground appearance
SACON-Background subtraction based on a robust consensus method
SACON算法是基于统计的知识,代码实现过,并做过实验,效果还可以,但没有进一步的分析;
7. VIBE算法
vibe
ViBe-A Universal Background Subtraction
VIBE算法是B哥的一个大作,网上有现成的算法可用,但已申请了专利,用于做研究还是可以的,该算法速度非常快,计算量比较小,而且对噪声有一定的鲁棒性,检测效果不错;
8. 基于颜色信息的背景建模方法(Color)
A statistical approach for real-time robust background subtraction and shadow detection
基于颜色信息的背景建模方法,简称Color算法,该算法将像素点的差异分解成Chromaticity差异和Brightness差异,对光照具有很强的鲁棒性,并有比较好的效果,计算速度也比较快,基本可以满足实时性的要求,做了许多视频序列的检测,效果比较理想;
9. 统计平均法
10. 中值滤波法( Temporal Median filter)
Automatic congestion detection system for underground platform
Detecting moving objects,ghost,and shadows in video streams
统计平均法和中值滤波法,对于这两个算法,只对统计平均法做了实现,并进行了测试,算法的应用具有很大的局限性,只能算是理论上的一个补充;
11. W4方法
W4.pdf
W4算法应该是最早被用于实际应用的一个算法,这个大家可以去查看相关的资料,这里不再细说;
12. 本征背景法
A Bayesian computer vision system for modeling human interactions
本征背景法没实现过,看很多文献有讲解,然后该算法又是基于贝叶斯框架,本人一直对贝叶斯框架不感冒,理论上很Perfect,实际应用就是Shit(无意冒犯贝氏粉丝,如有冒犯,请绕路,勿吐口水);
13. 核密度估计方法
Non-parametric model for background subtraction
最后就是核密度估计算法,该算法应该是一个比较鲁棒的算法,可以解决很多算法参数设置方面的问题,无需设置参数应该是算法的一大优势。

个人观点:SOBSColorVIBESACONPDF等可以进行深入的了解,特别是近年来出现的Block-basedRegion-BasedFeatures-Based、基于层次分类或层次训练器的算法可以进行深入的研究。
推荐一篇综述文章:Evaluation of Background Subtraction Techniques for Video Surveillance
再推荐一个网站:http://www.changedetection.net/

 

 

0 0