Advertisement
wandrake

Untitled

Oct 15th, 2014
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. int* somme = new int[dmin-dmax];
  2. int dispe[imax][jmax];
  3.  
  4. for (int i = 0; i < imax; ++i) {
  5.     for (int j = 0; j < jmax; ++j) {
  6.         for (int d = dmin; d < dmax; ++d) {
  7.             int sum = 0;
  8.             for (int wi = -3; wi <= 3; ++wi) {
  9.                 for (int wj = -3; wj <= 3; ++wj) {
  10.                     sum += roba(mat1[i+wi][j+wj], mat2[i+wi][j+wj+d]);
  11.                 }
  12.             }
  13.             somme[d] = sum;
  14.         }
  15.         dispe[i][j] = min(somme);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement