-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.cpp
35 lines (28 loc) · 796 Bytes
/
main.cpp
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
#include "final.h"
ostringstream err;
/************************************************
main
************************************************/
int main(int argc, char *argv[]) {
try {
if (argc < 2){
err << "No video file has been selected." << endl;
help();
throw err.str();
}
if (argc > 2 ){
err << "Too many arguments." << endl;
help();
throw err.str();
}
processVideo(argv[1]);
} catch (string error) {
cout << "Error:\t" << error << endl;
return -1;
}
return 0;
}
void help(){
err << "Use:\t./detectScenes ../data/xxx.mp4" << endl;
err << "Ex:\t./detectScenes ../data/icedCoffee.mp4" << endl;
}