-static double image_sig_inertia_scale[3] = { 3, 1, 0.3 };
-
-struct block {
- u32 area; /* block area in pixels (usually 16) */
- u32 l, u, v; /* average Luv coefficients */
- u32 lh, hl, hh; /* energies in Daubechies wavelet bands */
- u32 x, y; /* block position */
- struct block *next;
-};
-
-struct region {
- u32 l, u, v;
- u32 lh, hl, hh;
- u32 sum_l, sum_u, sum_v;
- u32 sum_lh, sum_hl, sum_hh;
- u32 count;
- u64 w_sum;
- struct block *blocks;
-};
-
-static inline uns
-dist(uns a, uns b)
-{
- int d = a - b;
- return d * d;
-}
-
-#ifdef LOCAL_DEBUG
-static void
-dump_segmentation(struct region *regions, uns regions_count, uns cols, uns rows)
-{
- uns size = (cols + 1) * rows;
- byte buf[size];
- bzero(buf, size);
- for (uns i = 0; i < regions_count; i++)
- {
- byte c = (i < 10) ? '0' + i : 'A' - 10 + i;
- for (struct block *b = regions[i].blocks; b; b = b->next)
- buf[b->x + b->y * (cols + 1)] = c;
- }
- for (uns i = 0; i < rows; i++)
- log(L_DEBUG, "%s", &buf[i * (cols + 1)]);
-}
-#endif