1 | /* -------------------------*/ |
---|
2 | /* --- ecc_rosenfield.h --- */ |
---|
3 | /* ------------------------ */ |
---|
4 | |
---|
5 | #ifndef _ECC_ROSENFELD_H_ |
---|
6 | #define _ECC_ROSENFELD_H_ |
---|
7 | |
---|
8 | //#include "def.h" |
---|
9 | ////#include "nrc.h" |
---|
10 | //#include "util.h" |
---|
11 | //#include "ecc_common.h" |
---|
12 | |
---|
13 | #ifdef __cplusplus |
---|
14 | #pragma message ("C++") |
---|
15 | extern "C" { |
---|
16 | #endif |
---|
17 | |
---|
18 | uint32 FindRoot(uint32 *T, uint32 e); |
---|
19 | void SetRoot(uint32 *T, uint32 e, uint32 r); |
---|
20 | uint32 Find(uint32 *T, uint32 e); |
---|
21 | |
---|
22 | uint32 Union0(uint32 *T, uint32 ei, uint32 ej); |
---|
23 | uint32 Union1(uint32 *T, uint32 ei, uint32 ej); |
---|
24 | uint32 Union2(uint32 *T, uint32 ei, uint32 ej); |
---|
25 | uint32 Union4(uint32 *T, uint32 e1, uint32 e2, uint32 e3, uint32 e4); |
---|
26 | |
---|
27 | uint32 updateTable_Rosenfeld (uint32 *T, uint32 e, uint32 epsillon); |
---|
28 | uint32 updateTable_Features_Rosenfeld(uint32 *T, uint32 e, uint32 epsillon, RegionStats *Stats); |
---|
29 | |
---|
30 | void Flatten(uint32 *T, int ne); |
---|
31 | int FlattenL(uint32 *T, int ne); |
---|
32 | |
---|
33 | uint32 solveTable_Rosenfeld( uint32 *T, uint32 ne); |
---|
34 | uint32 solvePackTable_Rosenfeld(uint32 *T, uint32 ne); |
---|
35 | |
---|
36 | uint32 solveTable_Features_Rosenfeld (uint32 *T, uint32 ne, RegionStats *Stats); |
---|
37 | uint32 solvePackTable_Features_Rosenfeld(uint32 *T, uint32 ne, RegionStats *Stats); |
---|
38 | |
---|
39 | |
---|
40 | void solveTableE_Rosenfeld_Montanvert(uint32 *T, uint32 ne); |
---|
41 | void solveTableA_Rosenfeld_Montanvert(uint32 *T, uint32 ne); |
---|
42 | void solveTable_Rosenfeld_Montanvert (uint32 *T, uint32 ne); |
---|
43 | |
---|
44 | // --------------------------- |
---|
45 | // -- line-labeling ---------- |
---|
46 | // --------------------------- |
---|
47 | |
---|
48 | uint32 lineLabeling_Rosenfeld_UF_Org1_4C(uint8 **X, int i, int width, uint32 **E, uint32 *T, uint32 ne, uint32 nemax); |
---|
49 | uint32 lineLabeling_Rosenfeld_UF_Org1_8C(uint8 **X, int i, int width, uint32 **E, uint32 *T, uint32 ne, uint32 nemax); |
---|
50 | |
---|
51 | uint32 lineLabeling_Rosenfeld_UF_Org2_4C(uint8 **X, int i, int width, uint32 **E, uint32 *T, uint32 ne, uint32 nemax); |
---|
52 | |
---|
53 | uint32 lineLabeling_Rosenfeld_UF_Org3_4C(uint8 **X, int i, int width, uint32 **E, uint32 *T, uint32 ne, uint32 nemax); |
---|
54 | uint32 lineLabeling_Rosenfeld_UF_Org3_8C(uint8 **X, int i, int width, uint32 **E, uint32 *T, uint32 ne, uint32 nemax); |
---|
55 | |
---|
56 | // ---------------------------- |
---|
57 | // -- image-labeling ---------- |
---|
58 | // ---------------------------- |
---|
59 | uint32 Rosenfeld_UF_Org1_4C_pass1(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 nemax, RegionStats *Stats); |
---|
60 | uint32 Rosenfeld_UF_Org1_8C_pass1(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 nemax, RegionStats *Stats); |
---|
61 | |
---|
62 | uint32 Rosenfeld_UF_Org2_4C_pass1(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 nemax, RegionStats *Stats); |
---|
63 | |
---|
64 | uint32 Rosenfeld_UF_Org3_4C_pass1(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 nemax, RegionStats *Stats); |
---|
65 | uint32 Rosenfeld_UF_Org3_8C_pass1(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 nemax, RegionStats *Stats); |
---|
66 | |
---|
67 | // ----------------------------------------- |
---|
68 | // -- interface labeling function ---------- |
---|
69 | // ----------------------------------------- |
---|
70 | uint32 Rosenfeld_UF_Org1_4C(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 *A, uint32 nemax, RegionStats *Stats); |
---|
71 | uint32 Rosenfeld_UF_Org1_8C(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 *A, uint32 nemax, RegionStats *Stats); |
---|
72 | |
---|
73 | uint32 Rosenfeld_UF_Org2_4C(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 *A, uint32 nemax, RegionStats *Stats); |
---|
74 | |
---|
75 | uint32 Rosenfeld_UF_Org3_4C(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 *A, uint32 nemax, RegionStats *Stats); |
---|
76 | uint32 Rosenfeld_UF_Org3_8C(uint8 **X, int height, int width, uint32 **E, uint32 *T, uint32 *A, uint32 nemax, RegionStats *Stats); |
---|
77 | |
---|
78 | #ifdef __cplusplus |
---|
79 | } |
---|
80 | #endif |
---|
81 | |
---|
82 | #endif /* _ECC_ROSENFELD_H_ */ |
---|