summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/mser/src/c/mser.h
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/benchmarks/mser/src/c/mser.h')
-rw-r--r--SD-VBS/benchmarks/mser/src/c/mser.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/SD-VBS/benchmarks/mser/src/c/mser.h b/SD-VBS/benchmarks/mser/src/c/mser.h
new file mode 100644
index 0000000..8876311
--- /dev/null
+++ b/SD-VBS/benchmarks/mser/src/c/mser.h
@@ -0,0 +1,83 @@
1/********************************
2Author: Sravanthi Kota Venkata
3********************************/
4
5#ifndef _MSER_
6#define _MSER_
7
8#define sref(a,i) a->data[i]
9
10#include "sdvbs_common.h"
11#define NMER_MAX 756
12
13typedef int val_t;
14
15typedef struct
16{
17 int width;
18 int data[];
19}iArray;
20
21typedef struct
22{
23 int width;
24 unsigned int data[];
25}uiArray;
26
27typedef struct
28{
29 int width;
30 long long int unsigned data[];
31}ulliArray;
32
33#define MIN(a,b) (a<b)?a:b
34#define MAX(a,b) (a>b)?a:b
35
36typedef int unsigned idx_t ;
37typedef long long int unsigned acc_t ;
38
39/* pairs are used to sort the pixels */
40typedef struct
41{
42 val_t value ;
43 idx_t index ;
44} pair_t ;
45
46/* forest node */
47typedef struct
48{
49 idx_t parent ; /**< parent pixel */
50 idx_t shortcut ; /**< shortcut to the root */
51 idx_t region ; /**< index of the region */
52 int area ; /**< area of the region */
53#ifdef USE_RANK_UNION
54 int height ; /**< node height */
55#endif
56} node_t ;
57
58/* extremal regions */
59typedef struct
60{
61 idx_t parent ; /**< parent region */
62 idx_t index ; /**< index of root pixel */
63 val_t value ; /**< value of root pixel */
64 int area ; /**< area of the region */
65 int area_top ; /**< area of the region DELTA levels above */
66 int area_bot ; /**< area of the region DELTA levels below */
67 float variation ; /**< variation */
68 int maxstable ; /**< max stable number (=0 if not maxstable) */
69} region_t ;
70
71int script_mser();
72I2D* mser(I2D* I, int in_delta,
73 iArray* subs_pt, iArray* nsubs_pt, iArray* strides_pt, iArray* visited_pt, iArray* dims,
74 uiArray* joins_pt,
75 region_t* regions_pt,
76 pair_t* pairs_pt,
77 node_t* forest_pt,
78 ulliArray* acc_pt, ulliArray* ell_pt,
79 I2D* out);
80
81#endif
82
83