Re: when should I pad image before filtering?

From: Martin Leese (please_at_see.Web.for.e-mail.INVALID)
Date: 03/28/05

  • Next message: bear: "2D generalized Voronoi-Diagram on binary image"
    Date: Sun, 27 Mar 2005 17:33:58 -0700
    To: lucy <losemind@yahoo.com>
    
    

    lucy wrote:
    > "lucy" <losemind@yahoo.com> wrote in message
    > news:d20avh$p2b$1@news.Stanford.EDU...
    >
    >>I am always confused by the padding for image filtering.
    >>
    >>I have an 270x230 "image" and is to be filtered with a 250x250 "filter".

    The bit in the middle is almost correct. The rest
    of the output image will be wrong. Whether this is
    a problem for you depends on why you are doing this.

    ...
    >>When do we choose which option?

    They are all wrong. You use the one which is least
    wrong, and which that is depends on your input image
    and what you seek to achieve with it.

    > Strange. I really don't understand this:
    >
    > what happens if I have a 270x230 image convolved with a
    > 600x600 filter using Matlab function?

    Try it and see.

    > what happens if I have a 270x230 image convolved with a 100 x 100 filter
    > using the same matlab function?

    Try it and see.

    > Are these results still correct?

    "Still" correct; what makes you think any of this
    is correct?

    > I understand the small case: if an image 270x230 convolved with a 3x3
    > filter, I understand, the image will have false values on its 4 side 1pixel
    > width boundary. All other values should be correct value...

    Yep. The large filter case is no different (except
    that it is larger).

    Regards,
    Martin

    -- 
    Regards,
    Martin Leese
    E-mail: please@see.Web.for.e-mail.INVALID
    Web: http://members.tripod.com/martin_leese/
    

  • Next message: bear: "2D generalized Voronoi-Diagram on binary image"

    Relevant Pages

    • Re: when should I pad image before filtering?
      ... >I am always confused by the padding for image filtering. ... > I have made sure that the sum of all filter coefficients sum to be 1. ... 600x600 filter using Matlab function? ...
      (sci.image.processing)
    • Spatial Filtering Help
      ... Hello I am looking for help with writing a Matlab function. ... dimensions and filter it with any filter of size A x B. ... I know for every location M x N of the original image I need ...
      (comp.soft-sys.matlab)
    • Re: analog bandpass filter
      ... using matlab to a filterto remove noise. ... anyone send me the coding for the filter? ... subject the signal to the filter in matlab.(the signal is sampled at ... You might like to check out the Matlab function 'fdatool' to help you ...
      (comp.dsp)
    • filter
      ... the difference equation, similar to the MATLAB function 'filter'. ... than returning the filtered vector, I would like the output to be the filter itself, ...
      (comp.soft-sys.matlab)
    • Re: Rookie having problems with some filter code. Any help?
      ... This doesn't seem to match your output image so perhaps you are adding the filter result to the input pixel value. ... with a 4 in the middle, this would be a Laplacian but now it is a sum of the Laplacian and the center pixel. ...
      (sci.image.processing)