Browse Source

drobne modyfikacje

master
Piotr Dergun 8 years ago
parent
commit
17481a4b73
1 changed files with 4 additions and 11 deletions
  1. +4
    -11
      DergunPiotr-WaskoDominik/zad4/gauss_omp.cpp

+ 4
- 11
DergunPiotr-WaskoDominik/zad4/gauss_omp.cpp View File

@ -15,7 +15,9 @@ int main(int argc, char *argv[])
int i,j,k,l,m,n;
TTiming tt;
char *endptr;
int sumka_r, sumka_g, sumka_b;
int suma_wag = 0;
int ratio[RX][RY] =
{
{1, 4, 7, 4, 1},
@ -45,7 +47,6 @@ int main(int argc, char *argv[])
exit(1);
}
int suma_wag = 0;
for (i=0; i<RX; ++i)
for (j=0; j<RY; ++j)
suma_wag += ratio[i][j];
@ -58,18 +59,12 @@ int main(int argc, char *argv[])
{
cerr << "File " << argv[2] << " does not exist" << endl;
exit(1);
}
Mat img_out;
img_out.create(img.rows, img.cols, img.type());
int sumka_r, sumka_g, sumka_b;
//#pragma omp parallel for default(shared)
tt.Begin();
//#pragma omp parallel for default(shared)
#pragma omp parallel for private(i, j, k, l, m, n, sumka_r, sumka_g, sumka_b)
for (i=0; i<img.rows; ++i)
{
@ -101,8 +96,6 @@ int main(int argc, char *argv[])
img_out.at<Vec3b>(i, j).val[1] = sumka_g / suma_wag;
img_out.at<Vec3b>(i, j).val[2] = sumka_r / suma_wag;
}
//cout << img_out.at<Vec3b>(i, j)[0].val[0];
}
}
long elapsed = tt.End();

Loading…
Cancel
Save