⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 weight.m

📁 粒子滤波全套源代码
💻 M
字号:
function w=weight(p,q,sita)
% given the standard deviaton sita, and the Bhattacharyya distacne d of two
% color hisgrams(one of them is the target's, the other is the sample's),
% the function return the sample's coresponding weight.
% This weighting data is the base for the tracking algorithem
m=512;
simi=0;
for i=1:1:m;
 simi=simi+(p(i)*q(i))^0.5;
end
d=(1-simi)^0.5;

w=(1/(sita*(2*pi)^0.5))*exp(-(d^2)/(2*sita^2));
%w=simi;   %更有利于理想实验,不同背景的为零

return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -