www.gusucode.com > 声音的处理有:LPC,FFT,共振峰,频谱源码程序 > siganlandsystemusingMatlab/SSUM/filters/video/ghost.m
clear all close all file='office320_02'; codec='Cinepak'; M=aviread(strcat(file,'.avi')); w = fspecial('gaussian',15,0.2); for i = 2:size(M,2) im1 = rgb2gray(M(i).cdata); im2 = rgb2gray(M(i-1).cdata); im3 = mynorm(double(im1)-double(im2)); [image2,map] = gray2ind(im3,128); N(i)=im2frame(image2,map); end N(1)=N(2); fname = strcat(file,'_sub.avi'); movie2avi(N,fname,'COMPRESSION',codec,'QUALITY',50);