* second dimension = height
* fourth dimension = time
*/
-int colorize_prepare(struct colorize *col, int alloc)
+int colorize_prepare(struct colorize *col, int quick, int alloc)
{
int dimensions[4];
int ww, hh, kk, last_kk, d, temp, z;
}
/* generate sparse multigrid */
last_kk = kk = col->k;
- printf("-> prepare sparse grid");
+ if (!quick)
+ printf("-> prepare sparse grid");
for (d = 0, ww=col->w, hh=col->h; d < col->max_depth; d++, ww=(ww+1)>>1, hh=(hh+1)>>1) {
/* create temporary arrays
* copy fist array to level 0 or shrink previous level
*/
- printf(" #%d(w=%d h=%d k=%d)", d, ww, hh, kk); fflush(stdout);
+ if (!quick)
+ printf(" #%d(w=%d h=%d k=%d)", d, ww, hh, kk); fflush(stdout);
dimensions[0] = ww;
dimensions[1] = hh;
dimensions[2] = last_kk;
}
darrayDestroy(luminance);
luminance = NULL;
- printf("\n");
+ if (!quick)
+ printf("\n");
dimensions[0] = col->w;
dimensions[1] = col->h;
int pixles, j;
double *value_ptr, *init_ptr, *mark_ptr;
- printf(" #%d(%s)", c, feat_names[c-1]); fflush(stdout);
+ if (!quick)
+ printf(" #%d(%s)", c, feat_names[c-1]); fflush(stdout);
/* apply component
* - copy component into value array (level 0), otherwise 0
* - use maked colors for init array, otherwise use 0
col = *_col;
}
- rc = colorize_prepare(col, alloc);
+ rc = colorize_prepare(col, quick, alloc);
if (rc < 0)
goto error;
darray_t **flows_xy;
};
-int colorize_prepare(struct colorize *col, int alloc);
+int colorize_prepare(struct colorize *col, int quick, int alloc);
int colorize_solve(struct colorize *col, int quick, char **feat_names);
void colorize_free(struct colorize *col);