change the way that interations are performed at colorize algorithm
[colorize.git] / lib / colorize.h
1 #ifndef ___COLORIZE_H___
2 #define ___COLORIZE_H___
3
4 struct colorize {
5         /* input stuff */
6         const darray_t *image;
7         const darray_t *image_mark;
8         const darray_t *flow;
9         const darray_t *flow_i;
10         int inner_iter;
11         int outer_iter;
12         double target_residual_change;
13         int scalexyz;
14
15         /* internal stuff */
16         int w, h, k, comp, max_depth;
17         unsigned char **nb_list;
18         darray_t **values;
19         darray_t **marks;
20         darray_t *init;
21         darray_t **flows;
22         darray_t **flows_i;
23         darray_t **flows_xy;
24 };
25
26 int colorize_prepare(struct colorize *col, int quick, int alloc);
27 int colorize_solve(struct colorize *col, int quick, char **feat_names);
28 void colorize_free(struct colorize *col);
29
30 int colorize(const darray_t *image, const darray_t *image_mark, const darray_t *flow, const darray_t *flow_i, int inner_iter, int outer_iter, double target_residual_change, int quick, int scalexyz, char **feat_names, struct colorize **_col);
31 #endif