forked from acceleration-magnification/sources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.m
executable file
·87 lines (62 loc) · 3.1 KB
/
main.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
%%% Author: Dr. Seyran Khademi.
%%% Code rewritten from Yichao Zhang.
%%% Date: July 2017.
addpath(fullfile('third', 'matlabPyrTools'));
addpath(fullfile('third', 'matlabPyrTools', 'MEX'));
addpath(fullfile('third', 'phaseCorrection'));
%%% Synehtic ball video %%%%%%%%%%%%%%%%%%%%%%%%%%
% Bulding the parameters for video to be processes
[vid_in,params] = setparameters('syn_ball', '.avi', fullfile('data','raw_vid'), fullfile('data','result_vid'),10/3,5,'DOG');
% Spatial Decomposition -> Kernel Generation -> Convolution -> Phase Correction -> Motion Magnification
motionamp(vid_in,params);
% After generating video, clean everything.
clear all
clc
%%% Cat toy video %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bulding the parameters for video to be processes
[vid_in,params] = setparameters('cat_toy','.mp4', 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
%%% Gun shot video %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bulding the parameters for video to be processes
[vid_in,params] = setparameters('gun_shot','.mp4',fullfile('data','raw_vid'),fullfile('data','result_vid'),8,8,'DOG');
% Spatial Decomposition -> Kernel Generation -> Convolution -> Phase Correction -> Motion Magnification
motionamp(vid_in,params);
% After generating video, clean everything.
clear all
clc
%%% Parkinson I video %%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bulding the parameters for video to be processes
[vid_in,params] = setparameters('parkinson1','.mp4',fullfile('data','raw_vid'),fullfile('data','result_vid'),3,8,'INT');
% Spatial Decomposition -> Kernel Generation -> Convolution -> Phase Correction -> Motion Magnification
motionamp(vid_in,params);
% After generating video, clean everything.
clear all
clc
%%% Parkinson II video %%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bulding the parameters for video to be processes
[vid_in,params] = setparameters('parkinson2','.mp4',fullfile('data','raw_vid'),fullfile('data','result_vid'),3,8,'INT');
% Spatial Decomposition -> Kernel Generation -> Convolution -> Phase Correction -> Motion Magnification
motionamp(vid_in,params);
% After generating video, clean everything.
clear all
clc
%%% Bottle video %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bulding the parameters for video to be processes
[vid_in,params] = setparameters('bottle_moving','.mp4',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
%%% Eye video %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bulding the parameters for video to be processes
[vid_in,params] = setparameters('eye_raw','.mp4',fullfile('data','raw_vid'),fullfile('data','result_vid'),2.5,15,'DOG');
% Spatial Decomposition -> Kernel Generation -> Convolution -> Phase Correction -> Motion Magnification
motionamp(vid_in,params);
% After generating video, clean everything.
clear all
clc