资源简介
混合高斯背景建模,利用该方法建立动态视频中运动背景建模,得到较好效果
代码片段和文件信息
% This m-file implements the mixture of Gaussians algorithm for background
% subtraction. It may be used free of charge for any purpose (commercial
% or otherwise) as long as the author (Seth Benton) is acknowledged.
clear all
% source = aviread(‘C:\Video\Source\traffic\san_fran_traffic_30sec_QVGA‘);
source = aviread(‘E:\刘博士\运动分析\my_video_datasets\多人\f01.avi‘);
% ----------------------- frame size variables -----------------------
fr = source(1).cdata; % read in 1st frame as background frame
fr_bw = rgb2gray(fr); % convert background to greyscale
fr_size = size(fr);
width = fr_size(2);
height = fr_size(1);
fg = zeros(height width);
bg_bw = zeros(height width);
% --------------------- mog variables -----------------------------------
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6057 2010-05-20 15:50 mixture_of_gaussians.m
----------- --------- ---------- ----- ----
6057 1
评论
共有 条评论