资源简介
包含2012年MIT关于欧拉放大算法的论文及matlab实现代码
代码片段和文件信息
% amplify_spatial_Gdown_temporal_ideal(vidFile outDir alpha
% level fl fh samplingRate
% chromAttenuation)
%
% Spatial Filtering: Gaussian blur and down sample
% Temporal Filtering: Ideal bandpass
%
% Copyright (c) 2011-2012 Massachusetts Institute of Technology
% Quanta Research Cambridge Inc.
%
% Authors: Hao-yu Wu Michael Rubinstein Eugene Shih
% License: Please refer to the LICENCE file
% Date: June 2012
%
function amplify_spatial_Gdown_temporal_ideal(vidFileoutDiralphalevel ...
flfhsamplingRate chromAttenuation)
[~vidName] = fileparts(vidFile);
outName = fullfile(outDir[vidName ‘-ideal-from-‘ num2str(fl) ...
‘-to-‘ num2str(fh) ...
‘-alpha-‘ num2str(alpha) ...
‘-level-‘ num2str(level) ...
‘-chromAtn-‘ num2str(chromAttenuation) ‘.avi‘]);
% Read video
vid = VideoReader(vidFile);
% Extract video info
vidHeight = vid.Height;
vidWidth = vid.Width;
nChannels = 3;
fr = vid.frameRate;
len = vid.NumberOfframes;
temp = struct(‘cdata‘ zeros(vidHeight vidWidth nChannels ‘uint8‘) ‘colormap‘ []);
startIndex = 1;
endIndex = len-10;
vidOut = VideoWriter(outName);
vidOut.frameRate = fr;
open(vidOut)
% compute Gaussian blur stack
disp(‘Spatial filtering...‘)
Gdown_stack = build_GDown_stack(vidFile startIndex endIndex level);
disp(‘Finished‘)
% Temporal filtering
disp(‘Temporal filtering...‘)
filtered_stack = ideal_bandpassing(Gdown_stack 1 fl fh samplingRate);
disp(‘Finished‘)
%% amplify
filtered_stack(:::1) = filtered_stack(:::1) .* alpha;
filtered_stack(:::2) = filtered_stack(:::2) .* alpha .* chromAttenuation;
filtered_stack(:::3) = filtered_stack(:::3) .* alpha .* chromAttenuation;
%% Render on the input video
disp(‘Rendering...‘)
% output video
k = 0;
for i=startIndex:endIndex
k = k+1
temp.cdata = read(vid i);
[rgbframe~] = frame2im(temp);
rgbframe = im2double(rgbframe);
frame = rgb2ntsc(rgbframe);
filtered = squeeze(filtered_stack(k:::));
filtered = imresize(filtered[vidHeight vidWidth]);
filtered = filtered+frame;
frame = ntsc2rgb(filtered);
frame(frame > 1) = 1;
frame(frame < 0) = 0;
writeVideo(vidOutim2uint8(frame));
end
disp(‘Finished‘)
close(vidOut);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 8092708 2017-11-28 10:43 欧拉放大\Eulerian Video Magnification for Revealing Subtle Changes in the World.pdf
目录 0 2018-09-19 20:05 欧拉放大\EVM_Matlab\
文件 2633 2013-03-04 11:17 欧拉放大\EVM_Matlab\amplify_spatial_Gdown_temporal_ideal.m
文件 5123 2013-03-04 11:17 欧拉放大\EVM_Matlab\amplify_spatial_lpyr_temporal_butter.m
文件 3797 2018-09-17 16:18 欧拉放大\EVM_Matlab\amplify_spatial_lpyr_temporal_ideal.m
文件 4917 2018-09-17 15:12 欧拉放大\EVM_Matlab\amplify_spatial_lpyr_temporal_iir.m
文件 495 2013-03-04 11:17 欧拉放大\EVM_Matlab\blurDnClr.m
文件 517 2013-03-04 11:17 欧拉放大\EVM_Matlab\blurUpClr.m
文件 1841 2018-09-16 11:17 欧拉放大\EVM_Matlab\build_GDown_stack.m
文件 1804 2013-03-04 11:17 欧拉放大\EVM_Matlab\build_Lpyr_stack.m
文件 105 2013-03-04 11:17 欧拉放大\EVM_Matlab\ChangeLog.txt
文件 730 2013-03-04 11:17 欧拉放大\EVM_Matlab\create_mask.m
目录 0 2018-09-19 20:05 欧拉放大\EVM_Matlab\data\
文件 1839450 2018-09-15 10:08 欧拉放大\EVM_Matlab\data\baby.mp4
文件 5091781 2018-09-15 10:13 欧拉放大\EVM_Matlab\data\baby2.mp4
文件 1639646 2018-09-17 09:36 欧拉放大\EVM_Matlab\data\face.mp4
文件 2002507 2018-09-17 09:37 欧拉放大\EVM_Matlab\data\wrist.mp4
文件 1190 2013-03-04 11:17 欧拉放大\EVM_Matlab\ideal_bandpassing.m
文件 62 2013-03-04 11:17 欧拉放大\EVM_Matlab\install.m
文件 17296 2013-03-04 11:17 欧拉放大\EVM_Matlab\LICENSE.pdf
文件 132 2013-03-04 11:17 欧拉放大\EVM_Matlab\make.m
目录 0 2018-09-19 20:05 欧拉放大\EVM_Matlab\matlabPyrTools\
文件 309 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\binomialFilter.m
文件 1731 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\blur.m
文件 1364 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\blurDn.m
文件 1931 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\buildGpyr.m
文件 2632 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\buildLpyr.m
文件 2713 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\buildSCFpyr.m
文件 2187 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\buildSCFpyrLevs.m
文件 3256 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\buildSFpyr.m
文件 1891 2013-03-04 11:17 欧拉放大\EVM_Matlab\matlabPyrTools\buildSFpyrLevs.m
............此处省略265个文件信息
- 上一篇:跳一跳辅助_matlab版本
- 下一篇:基于BP神经网络的语音情感识别系统
评论
共有 条评论