Short Description

Provides a selection of spatial, separable and customizable filters in 1D and 2D, with OpenCL implementation if supported.

Team: Bio Image Analysis Unit
Institution: Institut Pasteur
Website: http://icy.bioimageanalysis.org

Documentation

Filtering is one of the most classical operation in image processing, and consists in adjusting (or replacing) pixel values depending on other pixel values in their local neighborhood. The extent of the neighborhood is defined in pixels by the size of the kernel. The size of the kernel should always be smaller than the size of the image! For instance, for a Gaussian blur (separable filter) of sigma x = 5, sigma y = 5 and sigma z = 2, the size of the kernel will be 25x25x4. Thus the image cannot be smaller than 25 in x and y and 4 in z. Filters can be used for instance to reduce image noise or enhance specific structures of interest.

This toolbox lets you apply a large range of filters on your image or sequence. The calculations run in multiple threads to maximize computation speed, and will also run on GPU on supported workstations and laptops via the OpenCL library. The filters are split in the following 3 categories: classic 2D filters, separable and 1D filters, and selection filters.

Classic 2D filters

These filters are applied by classical 2D convolution operation, i.e., for each pixel, a 2D neighborhood is computed and convolved with the chosen 2D filter via point-wise multiplication, followed by a final sum (and normalization if applicable) to compute the resulting pixel value.

Note that this process may be slow for large kernels, however computations are greatly accelerated thanks to the built-in OpenCL (GPU) capabilities.

Here is a list of available classic 2D filters:

  • Laplace
  • Prewitt (along X and Y)
  • Sobel (along X and Y)
  • Kirsch (along the 8 common directions)
  • Gabor
  • Custom (values can be manually set)
  • From a template sequence (useful for filters imported from e.g. other software)

Separable and 1D filters

1D filters are a particular case of the previous 2D filters, in the sense that they are defined by a single line of values and therefore can be convolved along one specific direction of space (X, Y or Z).

Separable filters are a special optimized construction of 2D (actually nD) filters which can be applied by convolving the input with a 1D filter along each image dimension sequentially. The outcome is a much higher computational efficiency, since 1D convolution is faster to compute. Note however that not all 1D filters have the separability property, and not all nD filters can be split into a separable convolution

Here is a list of available separable and 1D filters:

  • Gradient (this is not a separable operation, i.e. a different result is created for each selected direction)
  • Gaussian (this is a separable operation)
  • Custom (with user defined values, and an option to indicate if the filter is a separable one)

Selection filters

These filters are particular in the sense that they generally cannot be applied via a mathematical convolution. Their goal is to replace the current pixel value by computing various statistics from the local neighborhood.

Here is a list of available selection filters:

  • Maximum: replaces each pixel by the maximum value in its neighborhood
  • Local maxima: replaces each pixel by 1 if it is a maximum value in its neighborhood, and 0 otherwise (the output is binary)
  • Mean: replaces each pixel by the average value in its neighborhood
  • Median: replaces each pixel by the median value in its neighborhood
  • Remove outliers: if a pixel is more than 2 standard deviations away from the neighborhood’s mean, it is replaced by the mean of the neighborhood without the current value, considered as an outlier according to Chauvenet’s rule.
  • Standard deviation: replaces each pixel by the standard deviation of its neighborhood
  • Variance: replaces each pixel by the variance of its neighborhood

Resources needing this

One review on “Filter Toolbox

Leave a Review

Leave a review
Cancel review
View full changelog
Close changelog

Changelog

  • Version 4.4.2.0 • Released on: 2020-06-17 11:00:00
    Download
    Description:

    Fixed unhandled exception: When convolution kernel is larger than image size

  • Version 4.4.1.0 • Released on: 2019-10-28 16:00:00
    Download
    Description:

    Fixed Selection filters to make them work with new Image Cache - Stephane

  • Version 4.4.0.0 • Released on: 2019-01-22 12:44:32
    Download
    Description:

    Updated to make it work when Image Cache is enabled (Icy 2.0) - Stephane

  • Version 4.3.4.0 • Released on: 2016-06-09 14:02:01
    Download
    Description:

    Added a static access for the Gaussian filter (useful for scripting) - Stephane

  • Version 4.3.3.0 • Released on: 2014-07-15 18:16:04
    Download
    Description:

    Improved multi-threading

  • Version 4.3.2.0 • Released on: 2014-02-24 12:01:39
    Download
    Description:

    Preserve metadata in selection filters

  • Version 4.3.1.0 • Released on: 2014-01-27 16:15:29
    Download
    Description:

    Fixed issue in separable convolution (standalone plugin)

  • Version 4.3.0.0 • Released on: 2013-07-12 13:24:49
    Download
    Description:

    * Re-structured graphical interface
    * Fixed issue causing non-separable 1D kernels to be applied separably

  • Version 4.2.0.0 • Released on: 2013-07-12 10:43:14
    Download
    Description:

    New selection filter: remove outliers (finds values that are more that 2 standard deviations above or below the window mean, and replace them by the window mean without the outlier)

  • Version 4.1.2.0 • Released on: 2013-01-30 11:00:40
    Download
    Description:

    Fixed error when exiting the plug-in and no OpenCL is enabled.

  • Version 4.1.1.0 • Released on: 2013-01-16 15:30:56
    Download
    Description:

    Fixed memory-leak in Convolution1D (was creating too many threads and never shutting them down)

  • Version 4.1.0.0 • Released on: 2012-10-31 11:10:52
    Download
    Description:

    Catch all OpenCL-related errors and fall back to default CPU mode in case of failure. OpenCL errors are still sent to the console for debugging purposes.

  • Version 4.0.0.1 • Released on: 2012-10-25 10:47:13
    Download
    Description:

    Catch OpenCL out of memory exception

  • Version 4.0.0.0 • Released on: 2012-10-16 15:19:56
    Download
    Description:

    * Multi-threaded implementation of most filters (if not in OpenCL mode)
    * New SelectionFilter block

  • Version 3.2.0.1 • Released on: 2012-09-24 18:15:56
    Download
    Description:

    Block "Gaussian Filter" was missing from the last update

  • Version 3.2.0.0 • Released on: 2012-09-21 18:53:24
    Download
    Description:

    New feature: convolve a sequence with another sequence (2D only)
    New feature: non-linear filters (currently median and variance). Uses multiple CPUs to speed up the processing.

  • Version 3.1.0.1 • Released on: 2012-07-10 11:28:26
    Download
    Description:

    Adjust gaussian filter output name

  • Version 3.0.1.0 • Released on: 2012-06-29 12:43:47
    Download
    Description:

    * Updated to Vars 1.2 (native arrays)
    * Error message when the input is not set

  • Version 3.0.0.0 • Released on: 2012-06-21 13:13:17
    Download
    Description:

    Support for Blocks programming.
    First available block: gaussian filter

  • Version 2.1.0.0 • Released on: 2012-04-12 13:55:31
    Download
    Description:

    New: ConvolutionException class to englobe potential errors

  • Version 2.0.5.3 • Released on: 2012-03-30 14:55:28
    Download
    Description:

    Throw adequate exception if kernel size is too large for the filtered image

  • Version 2.0.5.2 • Released on: 2012-02-23 14:32:07
    Download
    Description:

    New build using the Vars library

  • Version 2.0.5.1 • Released on: 2012-02-20 13:02:56
    Download
    Description:

    Updated to EzPlug 1.6.4.1

  • Version 2.0.5.0 • Released on: 2011-12-01 14:29:03
    Download
    Description:

    * catch error when no convolution direction is given (non-openCL case)

  • Version 2.0.4.0 • Released on: 2011-11-15 21:45:21
    Download
    Description:

    * updated to icy.type.DataType
    * caught error on OpenCL loading

  • Version 2.0.3.0 • Released on: 2011-07-15 14:18:33
    Download
    Description:

    Adjusted interface behavior when dealing with 3D data

  • Version 2.0.2.0 • Released on: 2011-05-19 17:18:24
    Download
    Description:

    fixed a NullPointerException occurring in 1D convolution for non-double type images. Apparently this bug only occurs when the plugin is called via code by another plugin.

  • Version 2.0.1.1 • Released on: 2011-04-26 13:43:13
    Download
    Description:

    Minor revision of the previous bugfix for non-OpenCL systems

  • Version 2.0.1.0 • Released on: 2011-04-24 07:30:12
    Download
    Description:

    fixed bug causing the plugin not to load properly on a non OpenCL-enabled system

  • Version 2.0.0.0 • Released on: 2011-04-21 16:26:13
    Download
    Description:

    Major update:
    - Improved interface
    - OpenCL support
    - Supports user-defined kernels in 1D/2D

  • Version 1.0.2.0 • Released on: 2011-03-25 17:29:05
    Download
    Description:

    Adapted to latest ICY update:
    - Fixed intensity rescale bug
    - Removed deprecated code

  • Version 1.0.1.0 • Released on: 2011-03-04 16:26:15
    Download
    Description:

    added method to retrieve the kernel data as a double array

  • Version 1.0.0.3 • Released on: 2011-02-28 13:44:37
    Download
    Description:

    Fixed remaining import issue

  • Version 1.0.0.2 • Released on: 2011-02-18 14:55:46
    Download
    Description:

    same as 1.0.0.1

  • Version 1.0.0.1 • Released on: 2011-02-18 10:57:12
    Download
    Description:

    adjusted buildpath to point to ICY's ArrayMath utility class

  • Version 1.0.0.0 • Released on: 2011-02-17 19:48:22
    Download