1

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:

  1. Create a 5x5 window
  2. Consider 4 directions (vertical, horizontal, diagonal left, diagonal right) from the center pixel (5 pixels in each direction)
  3. Calculate weighted difference and take the minimum value
  4. Minimum value is compared to a threshold value:
    if value > threshold: it is noise pixel
    else: it is not noise pixel
  5. Calculate standard deviation of the 5 pixels in each direction
  6. Giving extra weight to the direction in which the standard deviation is smallest, the weighted median is computed
  7. The noisy pixel is replaced with this median value
  8. Move window throughout the image
  9. 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.

4

1 に答える 1

0

どうやら、このフィルターはまだ ImageJ プラグインとして実装されていません。残念ながら、あなたがリンクした出版物にはソースも見つかりませんでした. 作成者にコードを直接尋ねない限り、公開された説明に基づいて自分でフィルターを実装する必要があります。

ImageJ プラグイン ページにリストされている他のフィルターの実装 (およびソース) から始めることができます。ExtendedPlugInFilterインターフェイスを実装することをお勧めします。

または、フィジーに含まれる汎用画像処理ライブラリであり、将来のImageJ2のコア モデルであるImgLibの使用を検討する必要があります。フィジー メーリング リスト (fiji@fiji.sc) でさらにヘルプを得ることができます。

于 2013-06-17T16:26:23.713 に答える