14 int x, y, max_x, max_y;
17 for (y = w * 2; y < max_y; y += w) {
18 for (
x = 2;
x < max_x;
x++) {
19 img_out[
x + y] = (2 * img_in[
x + y - 2 - w - w] +
20 4 * img_in[
x + y - 1 - w - w] +
21 5 * img_in[
x + y - w - w] +
22 4 * img_in[
x + y + 1 - w - w] +
23 2 * img_in[
x + y + 2 - w - w] +
24 4 * img_in[
x + y - 2 - w] +
25 9 * img_in[
x + y - 1 - w] +
26 12 * img_in[
x + y - w] +
27 9 * img_in[
x + y + 1 - w] +
28 4 * img_in[
x + y + 2 - w] +
29 5 * img_in[
x + y - 2] +
30 12 * img_in[
x + y - 1] +
32 12 * img_in[
x + y + 1] +
33 5 * img_in[
x + y + 2] +
34 4 * img_in[
x + y - 2 + w] +
35 9 * img_in[
x + y - 1 + w] +
36 12 * img_in[
x + y + w] +
37 9 * img_in[
x + y + 1 + w] +
38 4 * img_in[
x + y + 2 + w] +
39 2 * img_in[
x + y - 2 + w + w] +
40 4 * img_in[
x + y - 1 + w + w] +
41 5 * img_in[
x + y + w + w] +
42 4 * img_in[
x + y + 1 + w + w] +
43 2 * img_in[
x + y + 2 + w + w]) / 159;
48 int main(
int argc,
char **argv) {
50 float (*in)[n*n], (*out)[n*n];
54 fprintf(stderr,
"Usage: %s size data_file\n", argv[0]);
void gaussian_noise_reduce(int w, int h, float img_in[w *h], float img_out[w *h])
int main(int argc, char **argv)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...