diff options
author | leochanj105 <leochanj@live.unc.edu> | 2020-10-19 23:09:30 -0400 |
---|---|---|
committer | leochanj105 <leochanj@live.unc.edu> | 2020-10-20 02:40:39 -0400 |
commit | f618466c25d43f3bae9e40920273bf77de1e1149 (patch) | |
tree | 460e739e2165b8a9c37a9c7ab1b60f5874903543 /SD-VBS/benchmarks/multi_ncut/src/c/segment.h | |
parent | 47ced4e96bbb782b9e780e8f2cfc637b2c21ff44 (diff) |
initial sd-vbs
initial sd-vbs
add sd-vbs
sd-vbs
Diffstat (limited to 'SD-VBS/benchmarks/multi_ncut/src/c/segment.h')
-rw-r--r-- | SD-VBS/benchmarks/multi_ncut/src/c/segment.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/SD-VBS/benchmarks/multi_ncut/src/c/segment.h b/SD-VBS/benchmarks/multi_ncut/src/c/segment.h new file mode 100644 index 0000000..73ed8de --- /dev/null +++ b/SD-VBS/benchmarks/multi_ncut/src/c/segment.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /******************************** | ||
2 | Author: Sravanthi Kota Venkata | ||
3 | ********************************/ | ||
4 | |||
5 | #ifndef SEGMENT | ||
6 | #define SEGMENT | ||
7 | |||
8 | #include "sdvbs_common.h" | ||
9 | |||
10 | typedef struct | ||
11 | { | ||
12 | float w; | ||
13 | int a, b; | ||
14 | } edge; | ||
15 | |||
16 | typedef struct | ||
17 | { | ||
18 | int rank; | ||
19 | int p; | ||
20 | int size; | ||
21 | } uni_elt; | ||
22 | |||
23 | typedef struct | ||
24 | { | ||
25 | uni_elt *elts; | ||
26 | int num; | ||
27 | }universe; | ||
28 | |||
29 | /* use imRef to access image data. */ | ||
30 | #define imRef(im, x, y) (im->data[y*im->width+x]) | ||
31 | |||
32 | I2D *segment_image(I2D *im, float sigma, float c, int min_size, int *num_ccs, | ||
33 | int* segments, edge* edges, | ||
34 | F2D* imageOut, F2D* tempOut, I2D* kernel, F2D* edgeWeights, F2D* in, I2D* ind, | ||
35 | universe* u, | ||
36 | I2D* output); | ||
37 | universe *segment_graph(int num_vertices, int num_edges, edge *edges, float c, F2D* edgeWeights, F2D* in, I2D* ind, | ||
38 | universe* u); | ||
39 | void join(universe* u, int x, int y); | ||
40 | int find(universe* u, int x); | ||
41 | float diff(F2D *r, int x1, int y1, int x2, int y2); | ||
42 | |||
43 | |||
44 | #endif | ||
45 | |||
46 | |||