How can I apply a filter to data
Filter a1 a2 a3
a4 a5 a6
a7 a8 a9
Data b1 b2 b3 b4 ...
bn bn+1 bn+2 bn+3 ...
So that the filter is centred (about a5) onto a value of the data at the start b1 and multiplied together. The surrounding points a1, a2, a3, a4, a6, a7, a8, a9 map to the relational points of the data and multiply the points of the data b2, bn, bn+1. They would then be summated and would then replace the original value b1 into a new set of data.
The filter would then move to point b2 and continue the same process.
Mathematically for each point
The code I require must travel through each value of the data (b) and create the new value mathematically creating a new image, or set of data.
Examples of data and filter I may use (data may vary in size)