Class TschumperleDericheFilter

java.lang.Object
imagingbook.common.filter.generic.GenericFilter
imagingbook.common.filter.edgepreserving.TschumperleDericheFilter
All Implemented Interfaces:
TschumperleDericheF, ProgressReporter

This class implements the Anisotropic Diffusion filter described in [1]. It is based on an earlier C++ (CImg) implementation (pde_TschumperleDeriche2d.cpp) by the original author, made available under the CeCILL v2.0 license (http://www.cecill.info/licences/Licence_CeCILL_V2-en.html). See Sec. 17.3.5 of [2] for additional details.

[1] D. Tschumperle and R. Deriche, "Diffusion PDEs on vector-valued images", IEEE Signal Processing Magazine, vol. 19, no. 5, pp. 16-25 (Sep. 2002).
[2] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

Version:
2022/09/09 added zero-gradient check
  • Constructor Details

  • Method Details

    • initFilter

      protected void initFilter(PixelPack source, PixelPack target)
      Description copied from class: GenericFilter
      This method is called once at the start of the filter execution. It does nothing by default. Concrete filter classes should override this method, e.g., for setting up temporary data structures.
      Overrides:
      initFilter in class GenericFilter
      Parameters:
      source - the image source data
      target - the image target data
    • runPass

      protected void runPass(PixelPack source, PixelPack target)
      Description copied from class: GenericFilter
      This method performs one pass of the filter, it must be implemented by a sub-class. There is usually no need for a custom filter class to override this method.
      Specified by:
      runPass in class GenericFilter
      Parameters:
      source - the image source data
      target - the image target data
    • passesRequired

      protected final int passesRequired()
      Description copied from class: GenericFilter
      Returns the necessary number of passes, which may change during execution of the filter. The value 1 is returned by default. Multi-pass filters must override this method. The filter terminates as soon as the requested number of passes is reached. This this method can be used to terminate filter execution once some desired state has been reached (e.g., convergence). See also GenericFilter.getPass().
      Overrides:
      passesRequired in class GenericFilter
      Returns:
      the required number of filter passes
    • closeFilter

      protected void closeFilter()
      Description copied from class: GenericFilter
      This method is called once when the filter terminates. It does nothing by default. Concrete filter classes should override this method if needed.
      Overrides:
      closeFilter in class GenericFilter