1 diff -ur animal-0.15.0/animal/distmaps.c animal-0.15.0.ok/animal/distmaps.c
2 --- animal-0.15.0/animal/distmaps.c 2006-11-29 03:25:29.000000000 +0100
3 +++ animal-0.15.0.ok/animal/distmaps.c 2008-04-17 14:20:24.000000000 +0200
5 * squared distance transform.
6 *----------------------------------------------------------------------------*/
8 +static bool edt_maurer_2D_from_1D(ImgPUInt32 *im);
11 edt_maurer2003(ImgPUInt32 *im)
13 char *fname="edt_maurer2003";
16 - inline bool edt_maurer_2D_from_1D(ImgPUInt32 *im);
25 +static bool maurer_voronoi_edt_2D(ImgPUInt32 *im, puint32 *im_row, int *g, int *h);
28 edt_maurer_2D_from_1D(ImgPUInt32 *im)
31 int i1, *g, *h; // same naming as in the paper
32 char *fname="edt_maurer_2D_from_1D";
33 - inline bool maurer_voronoi_edt_2D(ImgPUInt32 *im, puint32 *im_row, int *g, int *h);
35 unsigned ncols = im->cols;
36 unsigned nrows = im->rows;
41 -inline bool remove_edt(int du, int dv, int dw,
42 - int u, int v, int w);
44 +remove_edt(int du, int dv, int dw,
45 + int u, int v, int w)
47 + // 11 integer expressions
51 + return ( (c * dv - b * du - a * dw) > (a * b * c) );
56 maurer_voronoi_edt_2D(ImgPUInt32 *im, puint32 *im_row, int *g, int *h)
58 int l, i, ns, tmp0, tmp1, tmp2, r,c;
64 -remove_edt(int du, int dv, int dw,
65 - int u, int v, int w)
67 - // 11 integer expressions
71 - return ( (c * dv - b * du - a * dw) > (a * b * c) );
76 * ========================================
77 * ----------------------------------
79 * proc. of 5th Int. Conf. Mathematical Morphology and its Applications to
80 * Image and Signal Processing, 2000
82 +static bool edt_meijster_2D_from_1D(ImgPUInt32 *im);
85 edt_meijster2000(ImgPUInt32 *im)
87 char *fname="edt_meijster2000";
90 - inline bool edt_meijster_2D_from_1D(ImgPUInt32 *im);
96 #define meijster_f(x,i, im_value) ( ( (x) - (i))*((x) - (i) ) + (im_value) )
100 edt_meijster_2D_from_1D(ImgPUInt32 *im)
102 char *fname="edt_meijster_2D_from_1D";