Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2dArray FilterImage(2dArray image, 2dArray filter_mask,
- int image_width, int image_height, int filter_width, int filter_height) {
- int a= (filter_width-1)/2;
- image Output;
- spiegele filter_mask;
- //first 2 for picture
- for(int j=a;j<image_heighth;j++){
- for(int i=a;i<image_width;i++){
- //last 2 for filter_mask
- for(l=0;l<filter_heigth;l++){
- for(k=0;k<filter_width;k++){
- Output[j][i]=output[j][i]+(filter[l][k]*image[j-a+l][i-a+k]);
- }}}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement