P_GMM

所属分类:图形图像处理
开发工具:Visual C++
文件大小:2691KB
下载次数:117
上传日期:2010-12-07 13:01:05
上 传 者625
说明:  用于背景差分的高斯混合建模,实现运动目标检测,c++源码可编译执行
(Difference of Gaussian mixture for the background model for moving object detection, c++ source code can be compiled implementation)

文件列表:
P_GMM\pgmm\11.bmp (384054, 2010-11-17)
P_GMM\pgmm\Debug\pgmm.bsc (3605504, 2010-11-28)
P_GMM\pgmm\Debug\pgmm.exe (307262, 2010-11-28)
P_GMM\pgmm\Debug\pgmm.ilk (439936, 2010-11-28)
P_GMM\pgmm\Debug\pgmm.pch (6393684, 2010-11-28)
P_GMM\pgmm\Debug\pgmm.pdb (828416, 2010-11-28)
P_GMM\pgmm\Debug\P_GMM.obj (21528, 2010-11-28)
P_GMM\pgmm\Debug\P_GMM.sbr (0, 2010-11-28)
P_GMM\pgmm\Debug\ReadBMP.obj (17869, 2010-11-28)
P_GMM\pgmm\Debug\ReadBMP.sbr (0, 2010-11-28)
P_GMM\pgmm\Debug\test.obj (24349, 2010-11-28)
P_GMM\pgmm\Debug\test.sbr (0, 2010-11-28)
P_GMM\pgmm\Debug\vc60.idb (214016, 2010-11-28)
P_GMM\pgmm\Debug\vc60.pdb (151552, 2010-11-28)
P_GMM\pgmm\pgmm.dsp (4512, 2010-11-21)
P_GMM\pgmm\pgmm.dsw (516, 2010-11-21)
P_GMM\pgmm\pgmm.ncb (66560, 2010-11-28)
P_GMM\pgmm\pgmm.opt (49664, 2010-11-28)
P_GMM\pgmm\pgmm.plg (1552, 2010-11-28)
P_GMM\pgmm\P_GMM.CPP (19405, 2010-11-28)
P_GMM\pgmm\P_GMM.H (3037, 2010-11-28)
P_GMM\pgmm\ReadBMP.cpp (3856, 2010-11-28)
P_GMM\pgmm\ReadBMP.h (677, 2010-11-28)
P_GMM\pgmm\test.cpp (1805, 2010-11-28)
P_GMM\pgmm\Debug (0, 2010-11-28)
P_GMM\pgmm (0, 2010-11-28)
P_GMM (0, 2010-11-21)

2.P_GMM: 参数: const int K= 5; //number of gaussian components (typically 3- const double STD_THRESHOLD= 2.5; //positive deviation threshold const int WIN=200; //200 frames; const double ALPHA= 0.005; //learning rate (between 0 and 1) const double BACKGROUND_THRESHOLD= 0.7; //threshold sum of weights for background test const double SIGMA_INIT = 30; //initial standard deviation const double WEIGHT_INIT=0.05; 2.1.每个点的第一个高斯分布初值为:权值和匹配数为1,均值为像素值,方差为var_init point[n].value[0].weight = 1; //the first value seen has weight one point[n].value[0].match_sum = 1; for( m = 0; m <3; m++) { point[n].value[0].var[m] = var_init; point[n].value[0].mean[m] = static_cast(ImagData[p + m]); } 其他分布初值为:方差为var_init,其他设为0 point[n].value[t].weight = 0; point[n].value[t].match_sum = 0; for( m = 0; m < 3; m++) { point[n].value[t].var[m] = var_init; point[n].value[t].mean[m] = 0; } 2.2.匹配标准为: ((xt-ut)(xt-ut)的和)<((variance的和)*std_threshold*var_threshold);将该点归为某个高斯分布 2.3.更新策略: 当帧数小于窗口大小时L(200张): w=1/N*(q-w)+w, q表示是否匹配,当匹配时q为1,否则为0;N是匹配点数之和,各n=match_sum的和 有点匹配i时: p=1/n[i],u[i]=u+p(x-u),d=d+p((x-u)^2-d); d表示方差 不匹配时:将该点加入到最后一个高斯分布中去(因为以降序排序了) w[i]=n[i]/N; 最后一个高斯参数:match_sum=1,d=d0,u=xt,其他高斯的方差,均值不变 当帧数大于等于窗口大小L时: 更新:w=1/L*(q-w)+w, 有点匹配i时: p=1/(w*L),u[i]=u+p(x-u),d=d+p((x-u)^2-d); d表示方差 不匹配时:将该点替换最后一个高斯分布(因为以降序排序了) 最后一个高斯参数:w=1/N; match_sum=1,d=d0,u=xt,N是匹配点数之和,各n=match_sum的和;其他高斯的方差,均值不变 2.4.判断背景高斯 排序:w/D^(1/2) ,D是d的和,三原色 求条件发生的最小权值数n:W>th. W表示n个w之和 若点在n个高斯分布中有匹配的,则该点被认为是背景点。

近期下载者

相关文件


收藏者