Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Image Processing - Mathematics' topicStudent Support Forum > General > "Image Processing - Mathematics"

Next Comment >Help | Reply To Topic
Author Comment/Response
Simon Parry
03/04/99 2:47pm

How can I apply a filter to data
ie
Filter   a1 a2 a3
   a4 a5 a6
   a7 a8 a9

Data   b1 b2 b3 b4 ...
   bn bn+1 bn+2 bn+3 ...   
   ...etc

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
T[f(x,y)]=(1/n)[f(x-1,y-1)+f(x-1,y)+f(x-1,y+1)+f(x+1,y-1)+f(x+1,y+1)+f(x,y)+f(x+1,y)+f(x,y+1)]

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)

Source={{0,0,0,0,0},{0,7,7,7,0},{0,7,15,7,0},{0,7,7,7,0},{0,0,0,0,0}}

Filter=(1/9){{1,1,1},{1,-8,1},{1,1,1}}

URL: ,

Subject (listing for 'Image Processing - Mathematics')
Author Date Posted
Image Processing - Mathematics Simon Parry 03/04/99 2:47pm
Re: Image Processing - Mathematics P.J. Hinton 03/10/99 10:46pm
Next Comment >Help | Reply To Topic