Image processing custom filter 7 by 7

Posted by ladiesMan217 on Stack Overflow See other posts from Stack Overflow or by ladiesMan217
Published on 2012-04-15T05:25:07Z Indexed on 2012/04/15 5:29 UTC
Read the original article Hit count: 172

Lets say I have a 7 by 7 neighborhood around a pixel that looks like this

 1  2  3  4  5  6  7  
 8  9 10 11 12 13 14
 15 16 17 18 19 20 21
 22 23 24 25 26 27 28
 29 30 31 32 33 34 35
 36 37 38 39 40 41 42
 43 44 45 46 47 48 49

and I wanna filter the above by replacing the pixel p by the average of those pixels whose value lie in the range -10<=p_value <=10.

I am new to image processing and I think in this case p_value is 25 and around 25 that are many pixel values in that range but don't exactly know to construct a convolution filter out of it.

© Stack Overflow or respective owner

Related posts about image-processing

Related posts about filter