资 源 简 介
clear,clc,close all;
% compute the background image
Imzero = zeros(240,360,3);
video=aviread("SampleVideo.avi");
Im = double(cat(4,video(1:2:end).cdata))/255;
clear video
% Convert to RGB to GRAY SCALE image.
nFrames = size(Im,4);
Imzero = Im(:,:,:,1);
for i = 2:5
Imzero = Im(:,:,:,i)+Imzero;
end
Imback = Imzero