Spatial Filtering Help



Hello I am looking for help with writing a Matlab function.
I need a function that can take in an image of M x N
dimensions and filter it with any filter of size A x B.

The main problem that stops me from figuring this out is
because the filter can be any size.

I know for every location M x N of the original image I need
to place the origin (middle of the filter) and multiply all
overlaying coordinates. So I will need to use some logic like

g(M,N) = w(-1,-1)f(M-1,N-1) + w(-1,0)f(M-1,N) + … +
w(0,0)f(M,N) + … + w(1,0)f(M+1,N) + w(1,1)f(M+1,N+1)

I can not figure this out if any one could supply a function
to do this or just give their advise it would be much
appreciated.

Thanks in advanced.
.



Relevant Pages

  • Re: filtering specific pixels
    ... >>> but the resultant image from the canny filter is a binary ... >>> on those pixels only in my original image, ... >> What we are doing here is any pixel which is far away from your ...
    (comp.soft-sys.matlab)
  • Re: filtering specific pixels
    ... >> i have an original image, of which i used a canny edge detector ... >> but the resultant image from the canny filter is a binary ... > What we are doing here is any pixel which is far away from your ...
    (comp.soft-sys.matlab)
  • Re: filtering specific pixels
    ... > i have an original image, of which i used a canny edge detector on. ... > filtered image, then command the filter to do 3x3 average filtering ... What we are doing here is any pixel which is far away from your lines ...
    (comp.soft-sys.matlab)
  • Re: Size of Gaussian filter for best subsampling
    ... believe that, rather than subsample the original image, it is better to low-pass filter the image and subsample the filtered image. ... First question, is this correct? ... how do I choose the proper standard deviation and extent of the Gaussian filter if I want to subsample by any given factor? ...
    (sci.image.processing)
  • Re: filtering specific pixels
    ... > 1) Take a copy of your image and apply your 3x3 filter to the lot. ... > Gaussian with a few pixels standard deviation. ... > 3) Take your original image and your filtered version of your image ... > undertake a graceful transition between the original pixel, ...
    (comp.soft-sys.matlab)