-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.cpp
49 lines (43 loc) · 1.3 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <omp.h>
#include <string>
#include <vector>
#include <ostream>
#include <random>
#include <chrono>
#include <stdio.h>
#include <unistd.h>
#include <fstream>
#include <opencv2/opencv.hpp>
#include <colornet.h>
int main(int argc, char** argv)
{
int opt = 0;
char *in_fname = NULL;
char *out_fname = NULL;
while ((opt = getopt(argc, argv, "i:o:")) != -1) {
switch(opt){
case 'i':
in_fname = optarg;
printf("\nInput option value=%s", in_fname);
break;
case 'o':
out_fname = optarg;
printf("\nOutput option value=%s", out_fname);
break;
case '?':
if (optopt == 'i'){
printf("\nMissing input file name");
} else if (optopt == 'o') {
printf("\nMissing output file name");
} else {
printf("\nInvalid option received");
printf("\nUsage: COLOR_GAN -i input file name -o output file name");
}
break;
}
}
char *argv_my[] = {"bw_imge", in_fname, NULL };
main_colorization(2, argv_my);
printf("\nFinal");
return 0;
}