1 |
struct fresize_struct { |
2 |
|
3 |
int method; |
4 |
|
5 |
int nsub; |
6 |
|
7 |
int hwidth; |
8 |
|
9 |
float *ker,*kerx,*kery; |
10 |
|
11 |
}; |
12 |
|
13 |
|
14 |
|
15 |
int init_fresize_sample( |
16 |
|
17 |
struct fresize_struct *pars, |
18 |
|
19 |
int nsub // Distance between sampled points |
20 |
|
21 |
); |
22 |
|
23 |
|
24 |
|
25 |
int init_fresize_bin( |
26 |
|
27 |
struct fresize_struct *pars, |
28 |
|
29 |
int nsub // Binsize |
30 |
|
31 |
); |
32 |
|
33 |
|
34 |
|
35 |
int init_fresize_boxcar( |
36 |
|
37 |
struct fresize_struct *pars, |
38 |
|
39 |
int hwidth, // Half width of boxcar. Full is 2*hwidth+1. |
40 |
|
41 |
int nsub // Distance between sampled points |
42 |
|
43 |
); |
44 |
|
45 |
|
46 |
|
47 |
int init_fresize_gaussian( |
48 |
|
49 |
struct fresize_struct *pars, |
50 |
|
51 |
float sigma, // Shape is exp(-(d/sigma)^2/2) |
52 |
|
53 |
int hwidth, // Half (truncation) width of kernel. Full is 2*hwidth+1. |
54 |
|
55 |
int nsub // Distance between sampled points |
56 |
|
57 |
); |
58 |
|
59 |
|
60 |
|
61 |
int free_fresize( |
62 |
|
63 |
struct fresize_struct *pars |
64 |
|
65 |
); |
66 |
|
67 |
|
68 |
|
69 |
int fresize( |
70 |
|
71 |
struct fresize_struct *pars, // Must have been initialized by init_fresize_XXX |
72 |
|
73 |
float *image_in, |
74 |
|
75 |
float *image_out, |
76 |
|
77 |
int nxin, // Size of input image |
78 |
|
79 |
int nyin, // Size of input image |
80 |
|
81 |
int nleadin, // Leading dimension of input image. nleadin>=nxin |
82 |
|
83 |
int nxout, // Size of xin, yin and image_out |
84 |
|
85 |
int nyout, // Size of xin, yin and image_out |
86 |
|
87 |
int nleadout, // Leading dimension. nlead>=nx |
88 |
|
89 |
int xoff, // Offset in x direction |
90 |
|
91 |
int yoff, // Offset in y direction |
92 |
|
93 |
float fillval // Value to use if outside area |
94 |
|
95 |
); |
96 |
|
97 |
|
98 |
|
99 |
int fsample( |
100 |
|
101 |
float *image_in, |
102 |
|
103 |
float *image_out, |
104 |
|
105 |
int nxin, |
106 |
|
107 |
int nyin, |
108 |
|
109 |
int nleadin, |
110 |
|
111 |
int nxout, |
112 |
|
113 |
int nyout, |
114 |
|
115 |
int nleadout, |
116 |
|
117 |
int nsub, |
118 |
|
119 |
int xoff, |
120 |
|
121 |
int yoff, |
122 |
|
123 |
float fillval |
124 |
|
125 |
); |
126 |
|
127 |
|
128 |
|
129 |
int fbin( |
130 |
|
131 |
float *image_in, |
132 |
|
133 |
float *image_out, |
134 |
|
135 |
int nxin, |
136 |
|
137 |
int nyin, |
138 |
|
139 |
int nleadin, |
140 |
|
141 |
int nxout, |
142 |
|
143 |
int nyout, |
144 |
|
145 |
int nleadout, |
146 |
|
147 |
int nsub, |
148 |
|
149 |
int xoff, |
150 |
|
151 |
int yoff, |
152 |
|
153 |
float fillval |
154 |
|
155 |
); |
156 |
|