瀏覽代碼

* edd.c: output E_fast as well.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2647 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 年之前
父節點
當前提交
18fd8276bd
共有 1 個檔案被更改,包括 7 行新增2 行删除
  1. +7
    -2
      examples/edd.c

+ 7
- 2
examples/edd.c 查看文件

@@ -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);


Loading…
取消
儲存