Guest User

Untitled

a guest
Oct 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. int c1, c2, c3;
  2. for(i=1;i<SIZE-1;i++) {
  3. c1 = img[i-1][0] + img[i-1][1] + img[i-1][2];
  4. c2 = img[i][0] + img[i][1] + img[i][2];
  5. for(j=1;j<SIZE-1;j++) {
  6. c3 = img[i+1][0] + img[i+1][1] + img[i+1][2];
  7. res[i][j]= (c1 + c2 + c3) / 9;
  8. c1 = c2;
  9. c2 = c3;
  10. }
  11. }
Add Comment
Please, Sign In to add comment