|
|
@@ -37,7 +37,7 @@ int main(int argc, char *argv[]) |
|
|
|
{ |
|
|
|
double sigma = 1.2, precision = 0.001, step = 2.; |
|
|
|
double best = 1., fx = -1., fy = -1., bfx = 0., bfy = 0.; |
|
|
|
double e, e0; |
|
|
|
double e, e0, e1; |
|
|
|
pipi_image_t *img, *gauss, *dither, *tmp; |
|
|
|
int dx, dy; |
|
|
|
|
|
|
@@ -61,6 +61,11 @@ int main(int argc, char *argv[]) |
|
|
|
e0 = pipi_measure_rmsd(gauss, tmp); |
|
|
|
pipi_free(tmp); |
|
|
|
|
|
|
|
/* Compute the fast error */ |
|
|
|
tmp = pipi_gaussian_blur_ext(dither, sigma, sigma, 0.16, 0.26); |
|
|
|
e1 = pipi_measure_rmsd(gauss, tmp); |
|
|
|
pipi_free(tmp); |
|
|
|
|
|
|
|
/* Compute displacement */ |
|
|
|
while(step > precision) |
|
|
|
{ |
|
|
@@ -85,7 +90,7 @@ int main(int argc, char *argv[]) |
|
|
|
step = step * 2 / Z; |
|
|
|
} |
|
|
|
|
|
|
|
printf("E: %g E_min: %g dx: %g dy: %g\n", e0, best, fx, fy); |
|
|
|
printf("E: %g E_fast: %g E_min: %g dx: %g dy: %g\n", e0, e1, best, fx, fy); |
|
|
|
|
|
|
|
pipi_free(dither); |
|
|
|
pipi_free(gauss); |
|
|
|