1. Introduction

Today ultrasound and magnetic resonance imaging are essential tools for noninvasive medical diagnosis. One of the fundamental problems in this field is speckle noise,
which is a major limitation on image quality especially in ultrasound imaging. The presence of the speckle noise affects image interpretation by human and the accuracy of
computer-assisted diagnostic techniques. Low image quality is an obstacle for effective feature extraction, analysis, recognition and quantitative measurements.

2. Diffusion filter characteristics

The key point in effective speckle noise removing is balance between speckle suppression and feature preservation. Diffusion filter is an effective technique for goal achievement.
Behind this development is solution of partial differential equation (PDE) of transient permeability for 2D domain. Due to its nonlinear nature and adaptive anisotropy the filter
has excellent both speckle reduction and detail preserving properties. This advanced version of the filter has embedded space control feature that allows to reduce blur produced
by diffusion — fig. 1.

Effective realization of the diffusion algorithm allows using of the filter for real-time image processing in medical and industrial devices.

3. Diffusion filter versus median filter

Another widely used despeckle technique is median filter. The advantage of the median filter is its simplicity and algorithmic straightforwardness.
But due to its nonadaptive nature it deteriorates not only speckles but details as well. In fig. 2 we show the results of despeckling by median filter
for the same ultrasound image. Compare result with the output of the diffusion filter in fig. 1.

a.

b.

c.

Fig. 2. Despeckling by median filter: ultrasound image after first (a), second (b) and third (c) passes.

4. Application in image editing

Diffusion filter could be used in color image editing for image quality improvement and noise removing. In fig. 3 you can see an original color image
with details of interest highlighted.

Pay attention to the excellent edge preserving characteristics of the filter. It is of interest to compare diffusion filter with mean, or average one (fig. 5)
which brings much more blur into the image while softening image colors.

threshold — tolerance value of filter space control feature, brings additional nonlinearity into diffusion based on local space information.

6. Effect of space control feature

As was mentioned above space control feature reduces blur produced by diffusion. To estimate effect of the space control compare images in fig. 6
with corresponding ones in fig. 1. Images in fig. 6 were produced by filter with the same settings but disabled space control.

7. Diffusion filter demo

Filter demo application can load 24-bit bitmaps files of up to 128×128 size. If the image exceeds the size it will be truncated. To process an image start
the application and load bitmap — fig. 8.

Fig. 8. Diffusion filter demo application.

Choose Set >> Preferences or click Preferences button in toolbar and set filter parameters — fig. 9.
For instance, you can set filter Time step to 0.2, Isotropy to 10, Sensitivity to 0.7,
enable Space control, set its Threshold value to 10 and set number of Iterations to 7.
Click OK to confirm your settings.

Fig. 9. Diffusion filter preferences dialog.

Time step times the number of Iterations defines the overall diffusivity progress in time, thus in our case
dimensionless time T=0.2×7=1.4. For the same overall time the smaller time step gives more accurate result. So you can get the same diffusion
setting Time step to 0.7 and number of Iterations to 2, which gives again T=0.7×2=1.4,
but the result will be less accurate. Now click F-button in toolbar or choose Set >> Filter to process image.

Use B-button in toolbar or Set >> Background menu item to set appropriate background for your image.
If your image is grayscale one you can check Monochrome mode check-box in Preferences dialog to speed up diffusion filtering.

8. Available options and modifications

For diffusion filter library available the following options and modifications.