0
votes

I coded Median image filters in Matlab. As we know we can code median filter with different window size. I have some confusion regarding it.

My query is :

The inside pixels will filter with 3X3 window . But how will we filter the edge pixel of four corner of image.

for example:

enter image description here.

The yellow box in figure will filter middle pixel valued 100. But what window we select when we are filtered or check the right side pixel 104 as the right side of this pixel will be out of range.

Should we do not filter the edge of whole image.

I hope I cleared my doubt.

Thank You.

Looking for positive response.

1

1 Answers

0
votes
  • Constant value border: Applies a padding of a constant value for the whole border. If padded with zero value called zero padding.
  • Replicated border: The border will be replicated from the pixel values at the edges of the original image.

I will suggest to replicate the border then apply median filter.