Machine Intelligence Laboratory

Cambridge University Department of Engineering

Dr Graham Treece, Department of Engineering


wxDicom Documentation

Image processing controls

These controls are all associated with how the current image is processed and interpolated to create the actual displayed image. They can be displayed or hidden by pressing the 'Image processing' button in the control area on the right. The display image updates automatically when any of these controls are changed.

The operations are always applied in the same order: sub-sampling, then filtering, then zooming and interpolating, then taking the gradient (if required), then thresholding (if required).

The Bitonic filter is described in a paper:

G. M. Treece. The bitonic filter: linear filtering in an edge-preserving morphological framework. IEEE Transactions on Image Processing, Vol. 25, No. 11, pp. 5199-5211, November 2016.

And is also available as a technical report at https://www.repository.cam.ac.uk/handle/1810/252987

Sub-sampling
This deliberately sub-samples the original image to a resolution lower by the factor given in this slider. This is mainly useful for demonstrating the effects of interpolation on images.
Colour space
This determines what colour space (for coloured images) the processing and interpolation are performed in. It also determines how the colour along a selected line (shift left-click) is displayed, as follows:
RGB colour space
The three colour components are red, green and blue, exactly as displayed.
HSL colour space
The colour components represent hue, saturation and lightness.
YUV colour space
The colour components are luminance, red chroma and blue chroma.
CIE XYZ colour space
The colour components are a form of normalised red, green and blue.
CIE L*a*b colour space
The colour components are lightness, red/green, and yellow/blue.
CIE L*c*h colour space
The colour components are lightness, chroma and hue.
Filter type
This determines how the image is filtered, with options as follows:
No filtering
Just display the original image.
Mean filter
A mean filter applied over whatever mask has been selected, with radius given by the filter range.
Gaussian filter
A Gaussian filter with standard deviation given by 0.65 times the filter range, and applied over the range +/- two standard deviations. These values are designed to result in a similar blur as the mean filter when the filter range slider is set to the same value.
Median filter
A median filter applied over whatever mask has been selected, with radius given by the filter range.
Opening filter
A morphologial opening, using the selected mask as the structuring element, with radius given by the filter range.
Closing filter
A morphologial closing, using the selected mask as the structuring element, with radius given by the filter range.
OCCO filter
A morphologial opening-closing averaged with a closing-opening, using the selected mask as the structuring element, with radius given by the filter range.
Grain filter
A self-dual area filter which will eliminate any components (grains) which have area less then a square with half-length given by the filter range.
OCCO levelling
A self-dual levelling based on reconstruction, with a mask based on an OCCO filter as above.
Gaussian levelling
A self-dual levelling based on reconstruction, with a mask based on a Gaussian filter as above.
Bitonic filter
An edge-preserving Bitonic filter, with extent given by the filter range, and the centile specified by the filter parameter. The blur is similar to a Gaussian, but edge preservation is better than a Median. Set the centile to zero if you want to preserve isolated impulses (salt and pepper noise) in the data, or to about 4 for optimal performance in most cases.
Image-guided filter
An image-guided filter with physical extent given by the filter range, but also has a data extent, i.e. how similar the data values should be in order to combine them.
Anisotropic filter
A directional Gaussian filter which has a shape and orientation determined by the local anisotropy in the image. The extent is determined by the filter range, but the amount of anisotropy can also be adjusted.
Filter range
The extent of the filters as defined above, where the filter width is two times the filter range plus one.
Filter centile / data range / anisotropy
If enabled, this controls the centile for any filters involving morphological operations, or the data range for the image-guided filter, or the extent of anisotropy for the anisotropic filter.
Filter mask
The selection mask which is used to determine what local pixels are involved in the filtering process, particularly for morphological operations. Not all the following options are used for all the types of filters:
Use circular mask
Circular selection.
Use square mask
Square selection.
Use cross mask
Horizontal-vertical cross selection.
Use line mask
Line selection, with orientation given by the following slider.
Use multiple lines
Multiple orientation line selections, using structurally varying morphology.
Use ellipse mask
Ellipse selection, with orientation given by the following slider.
Use multiple ellipses
Multiple orientation ellipse selections, using structurally varying morphology.
Use area attribute
Instead of using a mask of fixed shape, filter depending on the number of connected pixels. In this case the area is given by the square of (two times the filter range plus 1).
Mask orientation
Orientation, if the line or ellipse mask is chosen from the above options.
Filter iterations
If this slider is greater than one, then the filter above will be sequentially applied to the data multiple times.
Level of detail
If this slider is set to zero, the filters above are applied in the usual manner. If it is greater than zero, some of the difference between the initial image and filtered result is added back to the filtered image. If the slider is 10 this returns the original image, but for larger values, and using filters which tend to blur the image, the result is to accentuate small details in the image without changing the background levels.
High-pass filter
Checking this box will display the difference between the filtered output and the original image.
Interpolation
This controls what interpolation technique is used to form the zoomed display image:
No interpolation
Only a single pixel in the display image is set for each pixel in the original image, with everything else left blank. This is good for showing where the actual data is, and also why interpolation is always required.
Nearest Neighbour
Display pixels are set to the value of the nearest original pixel, which is an interpolant (it passes through the original data) but with not even C0 (value) continuity. This is useful for revealing the actual size of the original pixels.
Bi-linear
Bi-linear interpolation between original data, which is an interpolant with C0 continuity.
Cubic B spline
Piecewise cubic B-splines, which only approximate (do not necessarily pass through) the original data, but are very smooth with C2 (second derivative, or curvature) continuity.
Cubic Catmull-Rom spline
Another piecewise spline, which is an interpolant, but only has C1 (gradient) continuity. This tends to emphasise edges a bit more, but can overshoot the data.
Cubic Mitchell-Netravali spline
A reasonable balance between the previous two splines.
Lanczos (sinc) interpolation
This would represent 'ideal' interpolation if the range was infinite, but here is truncated to the nearest four samples in any direction.
Gradient
Checking this box will display the gradient of the data. If no line is defined (see ), the magnitude of the maximum gradient is shown. If a line is defined, the gradient is calculated and displayed in that direction. Use the 'windowing' (right mouse button) to adjust the contrast.
Level
If this is checked, the slider controls the level at which the image is thresholded. For colour images, each channel is thresholded separately, and they are set to maximum (255) if they are each above the threshold. For greyscale images, data above the threshold is coloured magenta.