-
Notifications
You must be signed in to change notification settings - Fork 1
/
proto.h
223 lines (201 loc) · 3.41 KB
/
proto.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
void cg(
mesh_struct *mesh,
matrix_int_crs_struct *splat_matrix,
int *blur_matrix[5],
double *Cn_matrix,
int *Cs_matrix,
double lambda,
int *dep_arr,
double *con_arr,
double *b,
double *x,
int n,
double epsilon
);
void compute_A_x(
mesh_struct *mesh,
matrix_int_crs_struct *splat_matrix,
int *blur_matrix[5],
double *Cn_matrix,
int *Cs_matrix,
double lambda,
double *con_arr,
double *v_arr,
double *A_v_arr
);
void compute_confidence_map(
int width,
int height,
int *ref_arr,
int *dep_arr,
double sigma_s,
double sigma_r,
int num_iterations,
double *con_arr
);
void compute_depth_confidence(
int *image_arr,
int *depthmap_arr,
int width,
int height,
int radius,
double gamma_p,
double gamma_c,
double sigma,
double *conf_arr
);
void compute_preconditioner(
mesh_struct *mesh,
matrix_int_crs_struct *splat_matrix,
int *blur_matrix[5],
double *Cn_matrix,
int *Cs_matrix,
double lambda,
double *con_arr,
double *M1_arr
);
void domain_transform_recursive_filter(
int width,
int height,
int *image_arr,
double sigma_s,
double sigma_r,
int num_iterations,
int *joint_image_arr,
int *filter_image_arr
);
void domain_transform_recursive_filter_dmag9b(
int width,
int height,
double *inp_arr,
double sigma_s,
double sigma_r,
int num_iterations,
int *joint_image_arr,
double *out_arr
);
void gradient_x(
int width,
int height,
double *image,
double *gradient
);
void gradient_y(
int width,
int height,
double *image,
double *gradient
);
void fast_bilateral_solver(
int width,
int height,
int *ref_arr,
int *dep_arr,
double *con_arr,
int *out_arr,
int sample_rate_spatial,
int sample_rate_range,
double lambda,
int hash_table_size,
int n
);
void hash_table_get_vert(
arrayHeader *hash_table,
int hash_table_size,
mesh_struct *mesh,
int grid_size[5],
int inp_grid_cell_ind[5],
int *ptr_vert
);
void hash_table_insert_vert(
arrayHeader *hash_table,
int hash_table_size,
mesh_struct *mesh,
int grid_size[5],
int vert
);
void mesh_create_vert(
mesh_struct *mesh,
int grid_cell_ind[5],
int *ptr_vert
);
void mesh_free(
mesh_struct *mesh
);
void mesh_new(
mesh_struct **ptr_mesh
);
void mesh_vert_get_data(
mesh_struct *mesh,
int vert,
int grid_cell_ind[5]
);
void normalize_image(
double *inp_arr,
int *out_arr,
int size
);
void pcg(
mesh_struct *mesh,
matrix_int_crs_struct *splat_matrix,
int *blur_matrix[5],
double *Cn_matrix,
int *Cs_matrix,
double lambda,
int *dep_arr,
double *con_arr,
double *b,
double *x,
int n,
double epsilon
);
void robust_bilateral_solver(
int width,
int height,
int *ref_arr,
int *dep_arr,
double *inp_con_arr,
int *out_arr,
int sample_rate_spatial,
int sample_rate_range,
double lambda,
int hash_table_size,
int n,
double sigma_gm,
int n_irls
);
void stereo_build_Cn_Cs_matrix(
int *image_arr,
int width,
int height,
mesh_struct *mesh,
matrix_int_crs_struct *splat_matrix,
int *blur_matrix[5],
double **ptr_Cn_matrix,
int **ptr_Cs_matrix
);
void stereo_create_verts(
int *image_arr,
int width,
int height,
int sample_rate_spatial,
int sample_rate_range,
int hash_table_size,
mesh_struct **ptr_mesh,
matrix_int_crs_struct **ptr_splat_matrix,
int *blur_matrix[5]
);
void transformed_domain_recursive_filter_horizontal(
int width,
int height,
double *I[3],
double *D,
double sigma
);
void transformed_domain_recursive_filter_vertical(
int width,
int height,
double *I[3],
double *D,
double sigma
);