Skip to content
Snippets Groups Projects
Commit 4fd574b0 authored by Daniel Maier's avatar Daniel Maier
Browse files

deriche: mse

parent d1308bc8
No related branches found
No related tags found
No related merge requests found
......@@ -70,12 +70,12 @@ void calc_error(int w, int h,
float *accurate = &_binary_data_bin_start;
float *test = &(imgOut[0][0]);
/* calculate the mean squared error */
for(i = 0; i < w*h; i++) {
err += fabs(accurate[i] - test[i])/accurate[i];
err += (accurate[i] - test[i])*(accurate[i] - test[i]);
}
err /= w*h;
printf("err is %f\n", err);
printf("error: %f\n", err);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment