forked from acceleration-magnification/sources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.m
28 lines (23 loc) · 1.1 KB
/
demo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
%%% Author: Dr. Seyran Khademi.
%%% Code rewritten from Yichao Zhang.
%%% Date: July 2017.
% Input:
% video_name - name of the input video.
% video_extension - the video extension.
% Output:
% data/result_vid/video_name/im_write - motion magnified video frames
% data/result_vid/video_name.avi - motion magnified video file
function demo(video_name, video_extension)
% Add project paths
addpath(fullfile('third', 'matlabPyrTools'));
addpath(fullfile('third', 'matlabPyrTools', 'MEX'));
addpath(fullfile('third', 'phaseCorrection'));
% Bulding the parameters for video to be processes
%[vid_in,params] = setparameters(video_name, video_extension, fullfile('data','raw_vid'), fullfile('data','result_vid'), 10/3,5, 'DOG');
[vid_in,params] = setparameters(video_name, video_extension, fullfile('data','raw_vid'), fullfile('data','result_vid'), 4, 8, 'INT');
% Spatial Decomposition -> Kernel Generation -> Convolution -> Phase Correction -> Motion Magnification
motionamp(vid_in,params);
% After generating video, clean everything.
clear all
clc
end