# Image Filtering in CTAnalyzer

CTAnalyzer currently offers five options for the filtering of greyscale images. They are available as Plug-Ins in the Custom Processing menu of CTAn. Two user-defined parameters are common to all of them: the selection of application in 2D or 3D space and the definition of a Radius. The latter relates to the size of the region in which the filtering is performed, commonly referred as the kernel size.

### Gaussian blur:

It is probably the most well-known and most commonly used filter of recent times. The application of a Gaussian blur is typically done with the aim of reducing noise. This in term may better allow us to segment phases in reconstructed images and generate quantitative information. The general form of the Gaussian filter in 2D is given by:

where σ denotes the standard deviation. In CTAnalyzer this parameter is defined by the radius R. The kernel size reflects the truncation of the normalized Gaussian function, and is chosen empirically as a compromise between speed and accuracy. In CTAnalyzer this truncation value is set at 3R.

### Median:

As could be suspected from its name, the median filter replaces the brightness value of a given pixel by the median value of the brightness within a given support. The radius R defines the size of the square kernel. Similar to the Gaussian blur it is mainly used for noise reduction, it however can be better at preserving edges.

### Uniform:

The uniform filter outputs an image based on local averaging of the input where all the values of the square kernel have the same weight. It hence offers a cruder way of reducing noise than the two previous filters but is mathematically less complex than the latter.

### Kuwahara:

The recognition and separation of edges plays a crucial role in image processing. The Kuwahara filter has an important attribute to preserve edges under smoothing, hence it being called an edge-preserving filter. It does this by considering both the mean brightness and variance in four sub-regions around the pixel in the kernel. By selecting the region with lowest variance the edges of phases can be preserved.