上传者: suncj1
|
上传时间: 2019-12-21 18:54:59
|
文件大小: 4KB
|
文件类型: m
混合高斯背景建模matlab程序
source = mmreader('walkman.avi');
frameQYT=get(source,'NumberOfFrames');
% ----------------------- frame size variables -----------------------
fr = read(source,1); % 读取第一帧作为背景
fr_bw = rgb2gray(fr); % 将背景转换为灰度图像
fr_size = size(fr); %取帧大小
width = fr_size(2);
height = fr_size(1);
fg = zeros(height, width);
bg_bw = zeros(height, width);