【滤波跟踪】基于随机有限集的多目标跟踪算法附matlab代码

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法  神经网络预测 雷达通信  无线传感器

信号处理 图像处理 路径规划 元胞自动机 无人机

⛄ 内容介绍

多目标跟踪(MTT)技术作为多源信息融合领域内最重要的技术之一,已经在民用和军事领域中被广泛应用.随机有限集理论为多目标跟踪问题提供了一种工程友好型的数学工具。详细介绍了RFS理论框架下的三种近似最优贝叶斯滤波器:概率假设密度(PHD)、势PHD(CPHD)和多目标多伯努利(Me MBer)滤波器、cbmember过滤器、广义标记多贝努利滤波器、“lmb”标记的多贝努利滤波器、“jointglmb”广义标记多贝努利滤波器、“jointlmb”标记的多贝努利滤波器,并对多者的研究进展进行了详细描述和对比。每个滤波器下分别实现线性高斯模型的“gms”高斯混合解、非线性模型的ekf解、非线性模型的ukf解、非线性模型的smc解​。​

⛄ 部分代码

function model= gen_model

% basic parameters

model.x_dim= 5;   %dimension of state vector

model.z_dim= 2;   %dimension of observation vector

model.v_dim= 3;   %dimension of process noise

model.w_dim= 2;   %dimension of observation noise

% dynamical model parameters (CT model)

% state transformation given by gen_newstate_fn, transition matrix is N/A in non-linear case

model.T= 1;                         %sampling period

model.sigma_vel= 5;

model.sigma_turn= (pi/180);   %std. of turn rate variation (rad/s)

model.bt= model.sigma_vel*[ (model.T^2)/2; model.T ];

model.B2= [ model.bt zeros(2,2); zeros(2,1) model.bt zeros(2,1); zeros(1,2) model.T*model.sigma_turn ];

model.B= eye(model.v_dim);

model.Q= model.B*model.B';

% survival/death parameters

model.P_S= .99;

model.Q_S= 1-model.P_S;

% birth parameters (LMB birth model, single component only)

model.T_birth= 1;         %no. of LMB birth terms

model.L_birth(1)=1;                                                             %no of Gaussians in birth term 1

model.r_birth(1)=0.01;                                                          %prob of birth

model.w_birth{1}(1,1)= 1;                                                       %weight of Gaussians - must be column_vector

model.m_birth{1}(:,1)= [ 0.1; 0; 0.1; 0; 0.01];                                 %mean of Gaussians

model.B_birth{1}(:,:,1)= diag([ 100; 10; 100; 10; 1 ]);                         %std of Gaussians

model.P_birth{1}(:,:,1)= model.B_birth{1}(:,:,1)*model.B_birth{1}(:,:,1)';      %cov of Gaussians

% observation model parameters (noisy r/theta only)

% measurement transformation given by gen_observation_fn, observation matrix is N/A in non-linear case

model.D= diag([ 2*(pi/180); 10 ]);      %std for angle and range noise

model.R= model.D*model.D';              %covariance for observation noise

% detection parameters

model.P_D= .98;   %probability of detection in measurements

model.Q_D= 1-model.P_D; %probability of missed detection in measurements

% clutter parameters

model.lambda_c= 20;                             %poisson average rate of uniform clutter (per scan)

model.range_c= [ -pi/2 pi/2; 0 2000 ];          %uniform clutter on r/theta

model.pdf_c= 1/prod(model.range_c(:,2)-model.range_c(:,1)); %uniform clutter density

⛄ 运行结果

⛄ 参考文献

[1]廖小云. 基于随机有限集的多目标跟踪算法研究[D]. 西安工业大学, 2016.

[2]董青, 胡建旺, 吉兵. 基于随机有限集的多目标跟踪算法综述[J]. 飞航导弹, 2019(3):6.

❤️ 关注我领取海量matlab电子书和数学建模资料

❤️部分理论引用网络文献,若有侵权联系博主删除

  • 0
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
以下是一个简单的基于Matlab实现的粒子滤波跟踪算法代码。这个例子是用来跟踪一个运动的目标。 ```matlab % 初始化 num_particles = 1000; particles = repmat(struct('x',0,'y',0,'w',0),1,num_particles); for i=1:num_particles particles(i).x = rand*640; particles(i).y = rand*480; particles(i).w = 1/num_particles; end % 读取视频帧 video_file = 'video.avi'; video = VideoReader(video_file); % 循环处理帧 while hasFrame(video) frame = readFrame(video); % 计算每个粒子的权重 for i=1:num_particles % 计算粒子在图像上的位置 x = particles(i).x; y = particles(i).y; % 计算粒子的颜色直方图 hist = imhist(rgb2gray(frame(y-4:y+4,x-4:x+4,:))); % 计算粒子的权重 particles(i).w = corr(hist',target_hist'); end % 重采样 new_particles = repmat(struct('x',0,'y',0,'w',0),1,num_particles); for i=1:num_particles r = rand; c = 0; for j=1:num_particles c = c + particles(j).w; if c >= r new_particles(i) = particles(j); break; end end end particles = new_particles; % 移动粒子 for i=1:num_particles particles(i).x = particles(i).x + randn*10; particles(i).y = particles(i).y + randn*10; end % 显示结果 imshow(frame); hold on; for i=1:num_particles plot(particles(i).x,particles(i).y,'b.'); end hold off; drawnow; end ``` 这个例子中,我们使用一个简单的颜色直方图来描述目标的特征,然后用Pearson相关系数来计算每个粒子与目标的匹配程度。我们使用重采样来避免粒子退化问题,并且在移动粒子时引入了一些随机扰动。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

matlab科研助手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值