-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmask.h
75 lines (69 loc) · 2.13 KB
/
mask.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
// This program is free software: you can use, modify and/or redistribute it
// under the terms of the simplified BSD License. You should have received a
// copy of this license along this program. If not, see
// <http://www.opensource.org/licenses/bsd-license.html>.
//
// Copyright (C) 2018, Thibaud Briand <[email protected]>
// Copyright (C) 2015, Javier Sánchez Pérez <[email protected]>
// Copyright (C) 2014, Nelson Monzón López <[email protected]>
// All rights reserved.
#ifndef MASK_H
#define MASK_H
/**
*
* Compute the gradient with central differences
*
*/
void gradient(
double *input, //input image
double *dx, //computed x derivative
double *dy, //computed y derivative
int nx, //image width
int ny, //image height
int nz //number of color channels in the image
);
/**
*
* Compute the gradient estimator
* dx = d * k^t * I
* dy = k * d^t * I
* where * denotes the convolution operator
*
*/
void gradient_robust (double *input, //input image
double *dx, //computed x derivative
double *dy, //computed y derivative
int nx, //image width
int ny, //image height
int nz, //number of color channels in the image
int gradientType //type of gradient
);
/**
*
* Prefiltering of an image compatible with the gradient
* I <-- k * k^t * I
* where * denotes the convolution operator
*
*/
void prefiltering_robust (
double *I, //input/output image
int nx, //image width
int ny, //image height
int nz, //number of color channels in the image
int gradientType //type of gradient
);
/**
*
* Convolution with a Gaussian kernel
*
*/
void gaussian (
double *I, //input/output image
int xdim, //image width
int ydim, //image height
int zdim, //number of color channels in the image
double sigma, //Gaussian sigma
int bc = 1, //boundary condition
int precision = 5 //defines the size of the window
);
#endif