Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. 2dArray FilterImage(2dArray image, 2dArray filter_mask,
  2. int image_width, int image_height, int filter_width, int filter_height) {
  3. int a= (filter_width-1)/2;
  4. image Output;
  5. spiegele filter_mask;
  6. //first 2 for picture
  7. for(int j=a;j<image_heighth;j++){
  8.  
  9. for(int i=a;i<image_width;i++){
  10. //last 2 for filter_mask
  11.  
  12. for(l=0;l<filter_heigth;l++){
  13. for(k=0;k<filter_width;k++){
  14.  
  15. Output[j][i]=output[j][i]+(filter[l][k]*image[j-a+l][i-a+k]);
  16. }}}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement