>I am really impressed by the new set of image processing operations >in Mathematica 9. I am, however, having trouble defining my own >operations, and one of the things I do very frequently in another >system, is neighborhood operations. I would like to do these things >in Mathematica,and would like so help:
>How do I define a function that takes an Image, and performs >operations, say, on a 3x3 nbdh for all pixels. I would like to use >the functional programming paradigm. Filter is one such operation. I >would love to see how Mathematica does it internally, but I am not >able to find it.
There are a many ways within Mathematica to manipulate images using a function based on any desired neighborhood for pixels within that image.
Probably the function you want to use is ImageConvolve or a related function such as ImageCorrelate.
If these are too high level, i.e., you want to manipulate the image data directly, then there are functions like ListConvolve or ListCorrelate. Both ListConvolve and ListCorrelate allow you to specify arbitrary functions to operate on array elements (pixels).