2 graphcut- a graphcut implementation based on the Boykov Kolmogorov algorithm
4 Part of the swftools package.
6 Copyright (c) 2007,2008,2009 Matthias Kramm <kramm@quiss.org>
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef __graphcut_h__
22 #define __graphcut_h__
26 typedef signed int weight_t;
27 #define MAX_WEIGHT 0x07ffffff
29 typedef struct _halfedge halfedge_t;
30 typedef struct _node node_t;
31 typedef struct _graph graph_t;
51 graph_t* graph_new(int num_nodes);
52 halfedge_t*edge_new(node_t*from, node_t*to, weight_t forward_weight, weight_t backward_weight);
53 weight_t graph_maxflow(graph_t*graph, node_t*pos1, node_t*pos2);
54 void graph_delete(graph_t*);