bug in upscaling count computation, workaround

This commit is contained in:
Tonton Th 2019-09-17 11:43:06 +02:00
parent b0fe0091d4
commit 9f5d5e2763
2 changed files with 9 additions and 1 deletions

View File

@ -305,6 +305,7 @@ t_final = fimg_timer_get(0);
fprintf(stderr, "pid %d : elapsed %g s -> %.2f fps\n", getpid(),
t_final, (double)nbre_capt / t_final);
#if SAVE_AS_CUMUL
if (to_gray) {
if (verbosity) fputs("converting to gray\n", stderr);
@ -313,6 +314,11 @@ if (to_gray) {
// save cumul to file
if (verbosity) fprintf(stderr, "saving to '%s'\n", outfile);
if (upscaling) { /* nasty workaround */
cumul.count /= 4;
}
foo = fimg_save_as_pnm(&cumul, outfile, 1);
// free buffers

View File

@ -45,7 +45,9 @@ for (y=0; y<h; y++) {
}
}
modz++;
modz++; /* next displacment index */
d->count++; /* one more frame in the accumulator */
return -1;
}