瀏覽代碼

* Add simple raster FS displacement study.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/research@2275 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam 16 年之前
父節點
當前提交
91d2a5f6a1
共有 1 個檔案被更改,包括 15 行新增5 行删除
  1. +15
    -5
      2008-displacement/main.c

+ 15
- 5
2008-displacement/main.c 查看文件

@@ -561,9 +561,10 @@ static void usage(char *argv[])
{
fprintf(stderr, "Usage: %s <mode> [ARGS...]\n", argv[0]);
fprintf(stderr, "Allowed modes:\n");
fprintf(stderr, " -1 <src1> <src2> raster FS displacement study on blends of src1 and src2\n");
fprintf(stderr, " -2 <src> quick (a,b,c,d) ED kernel analysis on src\n");
fprintf(stderr, " -3 <src> exhaustive (a,b,c,d) ED kernel analysis on src\n");
fprintf(stderr, " -1 <src> raster FS displacement study on src\n");
fprintf(stderr, " -2 <src1> <src2> raster FS displacement study on blends of src1 and src2\n");
fprintf(stderr, " -3 <src> quick (a,b,c,d) ED kernel analysis on src\n");
fprintf(stderr, " -4 <src> exhaustive (a,b,c,d) ED kernel analysis on src\n");
}

int main(int argc, char *argv[])
@@ -595,6 +596,15 @@ int main(int argc, char *argv[])
switch(mode)
{
case 1:
{
float *dest = ed(src, false, 7, 0, 1, 3, 5, 0, 0, 0, 0, 0, 0, 0);
study(src, dest, 1.2, 0.001);
free(dest);
free(src);
}
break;

case 2:
{
float *src2, *dest, *tmp;

@@ -617,8 +627,8 @@ int main(int argc, char *argv[])
}
break;

case 2:
case 3:
case 4:
{
float *dest, *tmp, *tmp2;
int a, b, c, d, e;
@@ -656,7 +666,7 @@ int main(int argc, char *argv[])
printf("K = %d,%d,%d,%d ", a2, c2, d2, e2);

dest = ed(src, false, a2, 0, b2, c2, d2, e2, 0, 0, 0, 0, 0, 0);
if(mode == 2)
if(mode == 3)
{
tmp = gauss(src, mat0);
tmp2 = gauss(dest, mat0);


Loading…
取消
儲存