• 大小: 1KB
    文件类型: .rar
    金币: 2
    下载: 2 次
    发布日期: 2021-03-11
  • 语言: Matlab
  • 标签: 目标检测  vibe  

资源简介

一种改进的VIBE运动目标检测算法,属于背景差分法,能对不同环境的目标进行检测,能消除鬼影。

资源截图

代码片段和文件信息

clearclc;
% [filenamepathname] = uigetfile(‘*.avi‘‘choose the video name:‘);%选择视频
video = mmReader(‘34.avi‘);
height = video.Height;
width = video.Width;
tom = zeros(heightwidth);
%参数
Numframes = video.NumberOfframes;
cardinality = 2;%基数
r = 20;%给定半径
n = 20;

%
%初始化 %%%取前20帧作为模型初始化
sample = zeros(heightwidthn);

for  nn = 1 : 40
    imrgb = read(videonn);
    imgray = rgb2gray(imrgb);
    video_dis = imgray;
    if(rem(nn2)==0)
    sample(::nn/2) = imgray;  
    end
end
bg = padarray(sample[1 1]‘replicate‘);

%随机跟新
% sd = zeros(heightwidth);
% r = zeros(heightwidth);
for f = 41 : Numframes
    imageRGB = read(videof);
    imageRGB1 = read(videof-1);
    imageRGB2 = read(videof-2);
    imageRGB3 = read(videof-3);
    imageRGB4 = read(video

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5530  2016-11-22 16:23  vibe_tom.m

----------- ---------  ---------- -----  ----

                 5530                    1


评论

共有 条评论