当前位置:网站首页>【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码
【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码
2022-04-23 20:06:00 【Matlab科研工作室】
1 简介
为解决视频帧目标跟踪中的尺度变化导致的目标跟踪发生跟丢的问题,提出一种自适应跟踪窗口的处理方法,利用下一帧的估计位置与当前帧目标位置的差值作为检测量,自适应调整跟踪窗口,实现目标的有效检测和跟踪.实验结果表明:该方法能有效降低目标跟丢的概率,预防目标的误跟踪,适应目标尺度变化.
2 部分代码
% extracts the center (cc,cr) and radius of the largest blobfunction [stats,N,flag,foremm]=extract(Imwork,Imback,index)%,fig1,fig2,fig3,fig15,index)cc = 0;cr = 0;flag = 0;[MR,MC,Dim] = size(Imback);%Imwork(:,:,1),Imwork(:,:,2),Imwork(:,:,3),分别是图像的RGB值,%程序的目的是提取两幅图R,G,B三个通道的差值大于10的部分(二值化)% subtract background & select pixels with a big differencefore = zeros(MR,MC);fore = imabsdiff(Imwork,Imback);%进行二值化,去除图像噪声Im2=im2bw(fore,80/255);%对图像进行膨胀操作foremm = bwmorph(Im2,'dilate',4); %2 time% select largest objectlabeled = bwlabel(foremm,4); %标注二进制图像中已连接的部分。stats = regionprops(labeled,['basic']); %获取label的图形属性 %使用字符串'basic',则属性:'Area','Centroid'和'BoundingBox'将被计算[N,W] = size(stats);if N < 1returnend% do bubble sort (large to small) on regions in case there are more than 1id = zeros(N); % N为检测到的目标的个数for i = 1 : Nid(i) = i;endfor i = 1 : N-1for j = i+1 : Nif stats(i).Area < stats(j).Areatmp = stats(i);stats(i) = stats(j);stats(j) = tmp;tmp = id(i);id(i) = id(j);id(j) = tmp;endendend% make sure that there is at least 1 big regionif stats(1).Area < 100returnend%selected = (labeled==id(1));flag = 1;return
3 仿真结果



4 参考文献
[1]李妍妍, 田瑞娟, 张弦弦. 一种基于帧差法结合Kalman滤波的运动目标跟踪方法[J]. 兵工自动化, 2019, 38(4):4.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
版权声明
本文为[Matlab科研工作室]所创,转载请带上原文链接,感谢
https://matlabzhushou.blog.csdn.net/article/details/124367293
边栏推荐
- Devops integration - environment variables and building tools of Jenkins service
- 本地调用feign接口报404
- IIS数据转换问题16bit转24bit
- Fundamentals of programming language (2)
- antd dropdown + modal + textarea导致的textarea光标不可被键盘控制问题
- 高效的串口循环Buffer接收处理思路及代码2
- Mfcc: Mel frequency cepstrum coefficient calculation of perceived frequency and actual frequency conversion
- Go modules daily use
- No, some people can't do the National Day avatar applet (you can open the traffic master and earn pocket money)
- FFT物理意义: 1024点FFT就是1024个实数,实际进入fft的输入是1024个复数(虚部为0),输出也是1024个复数,有效的数据是前512个复数
猜你喜欢

山东大学软件学院项目实训-创新实训-网络安全靶场实验平台(八)

程序设计语言基础(2)

如何在BNB鏈上創建BEP-20通證

Project training of Software College of Shandong University - Innovation Training - network security shooting range experimental platform (VII)

Project training of Software College of Shandong University - Innovation Training - network security shooting range experimental platform (V)
![[numerical prediction case] (3) LSTM time series electricity quantity prediction, with tensorflow complete code attached](/img/73/ba9fb872aa279405204c411c18f348.png)
[numerical prediction case] (3) LSTM time series electricity quantity prediction, with tensorflow complete code attached

LeetCode异或运算

Garbage collector and memory allocation strategy

Class loading process of JVM

Lottery applet, mother no longer have to worry about who does the dishes (assign tasks), so easy
随机推荐
记录:调用mapper报空指针;<foreach>不去重的用法;
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
如何在BNB鏈上創建BEP-20通證
nc基础用法
CVPR 2022 | QueryDet:使用级联稀疏query加速高分辨率下的小目标检测
Efficient serial port cyclic buffer receiving processing idea and code 2
nc基础用法3
Project training of Software College of Shandong University - Innovation Training - network security shooting range experimental platform (V)
Go three ways to copy files
[webrtc] add x264 encoder for CEF / Chromium
Comment créer un pass BEP - 20 sur la chaîne BNB
C语言的十六进制printf为何输出有时候输出带0xFF有时没有
Openharmony open source developer growth plan, looking for new open source forces that change the world!
Is meituan, a profit-making company with zero foundation, hungry? Coupon CPS applet (with source code)
【webrtc】Add x264 encoder for CEF/Chromium
Mfcc: Mel frequency cepstrum coefficient calculation of perceived frequency and actual frequency conversion
MFCC: Mel频率倒谱系数计算感知频率和实际频率转换
DevOps集成-Jenkins 服务的环境变量和构建工具 Tools
Distinction between pointer array and array pointer
[numerical prediction case] (3) LSTM time series electricity quantity prediction, with tensorflow complete code attached