Directional Weighted Median Filter (Image processing)

I need to implement a directional weighted median filter in Java to remove random impulse noise. I have no idea how/where to start. The algorithm is as per below:

  • Create a 5x5 window
  • Consider 4 directions (vertical, horizontal, diagonal left, diagonal right) from the center pixel (5 pixels in each direction)
  • Calculate weighted difference and take the minimum value
  • Minimum value is compared to a threshold value:
    if value > threshold: it is noise pixel
    else: it is not noise pixel
  • Calculate standard deviation of the 5 pixels in each direction
  • Giving extra weight to the direction in which the standard deviation is smallest, the weighted median is computed
  • The noisy pixel is replaced with this median value
  • Move window throughout the image
  • Iterate steps 8 to 10 times
  • Can anybody point me in the right direction how I should go about implementing this? Any examples or implemented codes will be highly appreciated. I am using ImageJ, so any plugin that has implemented this filter (or a variation of it) will be very helpful. Thanks.


    Apparently, this filter hasn't been implemented as an ImageJ plugin yet. Unfortunately, I also couldn't find any source in the publication you've linked to. Unless you directly ask the authors for their code, you'll have to implement the filter yourself, based on the published description.

    You can start from implementations (and sources) of other filters listed at the ImageJ plugins page. I'd suggest to implement the ExtendedPlugInFilter interface.

    Alternatively, you should consider using ImgLib , the generic image processing library included in Fiji and being the core model of future ImageJ2. You can get further help on the Fiji mailing list (fiji@fiji.sc).

    链接地址: http://www.djcxy.com/p/79606.html

    上一篇: 如何使用python从图像中去除盐和胡椒的噪音?

    下一篇: 定向加权中值滤波器(图像处理)