File Exchange

image thumbnail

weighted median filter

version 1.0 (1.48 KB) by

weighted median filter using weighted mask.

2 Downloads

Updated

View License

Weighted Median Filter:
It is same as median filter, only difference is the mask is not empty. It will having some weight (or values) and averaged.
The steps to perform weighted median filtering are as follows:
1) Assume a 3x3 weighted mask.
2) Place the mask at the left hand corner.
3) After convolution (multiplication), Arrange the 9 pixels in ascending or descending order.
4) Chose the median from these nine values.
5) Place this median at the centre.
6) Move the mask through out the image

Comments and Ratings (5)

swati

swati (view profile)

i dont think it is weighted median filter

swati

swati (view profile)

i dont think it is weighted median filter

Dennis Robert

The code calculates the product of the matrix elements with their corresponding weights in the W matrix? This is not how weighted median should be calculated.

Thorben

That is not a weighted median as commonly defined. See here: http://www.eecis.udel.edu/~arce/teaching/ELEG833/files/pdf/Essencial%20Guide%20WMF.pdf

Qiao Liyong

MATLAB Release
MATLAB 7.7 (R2008b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today