i have an array of pixel data. x,y value of each pixel is known.
I have to find the sum of nxn pixels around the given pixel(including the pixel)
that is for the pixel at (x,y). 3x3 sum will be
This calculation should be dynamic, that is for any nxn , the sum should be computed.
i would like to know the way to go abt doing this.