annotate Meerwald/cmp_dct.c @ 4:9cf6ec970448 v0.5

mention filter param.
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Tue, 14 Aug 2007 21:13:11 +0200
parents be303a3f5ea8
children f83ef905a63d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
1 #include "wm.h"
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
2 #include "dct.h"
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
3 #include "gray.h"
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
4 #include "pgm.h"
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
6 char *progname;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
7
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
8 void usage(void) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
9 fprintf(stderr, "usage: %s [-h] [-m n] [-o file] [-pP] -i file file\n\n", progname);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
10 fprintf(stderr, "\t-h\t\tprint usage\n");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
11 fprintf(stderr, "\t-i file\t\toriginal image file\n");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
12 fprintf(stderr, "\t-m n\t\tmultiplication factor (default 16)\n");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
13 fprintf(stderr, "\t-o file\t\toutput file\n");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
14 fprintf(stderr, "\t-p\t\tprint PSNR, RMS and MSE\n");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
15 fprintf(stderr, "\t-P\t\tonly print PSNR, RMS and MSE, no difference image\n");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
16 exit(0);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
17 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
18
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
19 int main(int argc, char *argv[]) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
20
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
21 FILE *in = stdin;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
22 FILE *out = stdout;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
23 FILE *orig = NULL;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
24
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
25 gray **input_image;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
26 gray **orig_image;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
27 double **input_dcts;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
28 double **orig_dcts;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
29 gray **output;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
30
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
31 char output_name[MAXPATHLEN] = "(stdout)";
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
32 char input_name[MAXPATHLEN] = "(stdin)";
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
33 char orig_name[MAXPATHLEN];
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
34
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
35 int in_cols, in_rows, in_format;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
36 gray in_maxval;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
37 int orig_cols, orig_rows, orig_format;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
38 gray orig_maxval;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
39 int cols, rows, format;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
40 gray maxval;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
41 int col, row;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
42
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
43 int no_orig = 0;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
44 int c;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
45
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
46 double error = 0.0;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
47 int print_psnr = 0;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
48 int print_psnr_only = 0;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
49 int m = 16;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
50
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
51 progname = argv[0];
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
52
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
53 pgm_init(&argc, argv); wm_init();
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
54
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
55 while ((c = getopt(argc, argv, "h?i:m:o:pP")) != EOF) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
56 switch (c) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
57 case 'h':
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
58 case '?':
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
59 usage();
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
60 break;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
61 case 'i':
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
62 if (!strcmp(optarg, "-")) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
63 no_orig = 1;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
64 strcpy(orig_name, "(zero)");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
65 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
66 else {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
67 if ((orig = fopen(optarg, "rb")) == NULL) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
68 fprintf(stderr, "%s: unable to open original image file %s\n", progname, optarg);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
69 exit(1);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
70 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
71 strcpy(orig_name, optarg);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
72 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
73 break;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
74 case 'm':
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
75 m = atoi(optarg);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
76 if (m <= 0) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
77 fprintf(stderr, "%s: multiplication factor %d out of range\n", progname, m);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
78 exit(1);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
79 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
80 break;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
81 case 'o':
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
82 if ((out = fopen(optarg, "wb")) == NULL) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
83 fprintf(stderr, "%s: unable to open output file %s\n", progname, optarg);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
84 exit(1);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
85 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
86 strcpy(output_name, optarg);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
87 break;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
88 case 'p':
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
89 print_psnr = 1;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
90 break;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
91 case 'P':
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
92 print_psnr_only = 1;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
93 break;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
94 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
95 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
96
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
97 argc -= optind;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
98 argv += optind;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
99
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
100 if (argc > 1) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
101 usage();
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
102 exit(1);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
103 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
104
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
105 if (argc == 1 && *argv[0] != '-')
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
106 if ((in = fopen(argv[0], "rb")) == NULL) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
107 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
108 exit(1);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
109 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
110 else
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
111 strcpy(input_name, argv[0]);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
112
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
113 if (!orig && !no_orig) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
114 fprintf(stderr, "%s: original image file not specified, using zero image\n", progname);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
115 strcpy(orig_name, "(zero)");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
116 no_orig = 1;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
117 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
118
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
119 pgm_readpgminit(in, &in_cols, &in_rows, &in_maxval, &in_format);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
120
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
121 if (!no_orig) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
122 pgm_readpgminit(orig, &orig_cols, &orig_rows, &orig_maxval, &orig_format);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
123
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
124 if (in_cols != orig_cols || in_rows != orig_rows) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
125 fprintf(stderr, "%s: input image %s does not match dimensions of original image %s\n", progname, input_name, orig_name);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
126 exit(1);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
127 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
128 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
129
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
130 cols = in_cols;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
131 rows = in_rows;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
132 format = in_format;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
133 maxval = in_maxval;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
134
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
135 input_image = pgm_allocarray(cols, rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
136 orig_image = pgm_allocarray(cols, rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
137
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
138 init_dct_NxN(cols, rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
139 input_dcts = alloc_coeffs(cols, rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
140 orig_dcts = alloc_coeffs(cols, rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
141 output = alloc_grays(cols, rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
142
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
143 if (no_orig) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
144 for (row = 0; row < rows; row++) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
145 pgm_readpgmrow(in, input_image[row], cols, maxval, format);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
146 bzero(orig_image[row], sizeof(gray) * cols);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
147 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
148 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
149 else {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
150 for (row = 0; row < rows; row++) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
151 pgm_readpgmrow(in, input_image[row], cols, maxval, format);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
152 pgm_readpgmrow(orig, orig_image[row], cols, maxval, format);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
153 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
154 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
155
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
156 fclose(in);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
157 if (!no_orig)
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
158 fclose(orig);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
159
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
160 fdct_NxN(input_image, input_dcts);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
161 fdct_NxN(orig_image, orig_dcts);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
162
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
163 for (row = 0; row < rows; row++)
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
164 for (col = 0; col < cols; col++) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
165 error += sqr(input_dcts[row][col] - orig_dcts[row][col]);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
166 output[row][col] = PIXELRANGE(fabs(input_dcts[row][col] - orig_dcts[row][col]) * m);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
167 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
168
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
169 if (!print_psnr_only) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
170 pgm_writepgminit(out, cols, rows, maxval, 0);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
171 for (row = 0; row < rows; row++)
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
172 pgm_writepgmrow(out, output[row], cols, maxval, 0);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
173
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
174 fclose(out);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
175 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
176
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
177 pgm_freearray(input_image, rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
178 pgm_freearray(orig_image, rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
179 free_coeffs(input_dcts);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
180 free_coeffs(orig_dcts);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
181 free_grays(output);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
182
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
183 if (print_psnr || print_psnr_only) {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
184 double mse = error / (double) (cols * rows);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
185 double rmse = sqrt(mse);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
186 double psnr = 20.0 * log(255.0 / rmse) / log(10.0);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
187 FILE *print = print_psnr_only ? out : stderr;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
188 if (mse > 0.0)
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
189 fprintf(print, "PSNR: %lf dB\n", psnr);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
190 else
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
191 fprintf(print, "PSNR: inf\n");
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
192 fprintf(print, "RMS: %lf\n", rmse);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
193 fprintf(print, "MSE: %lf\n", mse);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
194 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
195
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
196 exit(0);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
197 }

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.