Module imagingbook.common
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface imagingbook.common.filter.edgepreserving.TschumperleDericheF
TschumperleDericheF.Constants, TschumperleDericheF.Parameters
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method is called once when the filter terminates.protected void
initFilter
(PixelPack source, PixelPack target) This method is called once at the start of the filter execution.protected final int
Returns the necessary number of passes, which may change during execution of the filter.protected void
This method performs one pass of the filter, it must be implemented by a sub-class.Methods inherited from class imagingbook.common.filter.generic.GenericFilter
abort, applyTo, applyTo, applyTo, getDepth, getHeight, getPass, getProgress, getWidth, initPass, reportProgress, reportProgress
-
Constructor Details
-
TschumperleDericheFilter
public TschumperleDericheFilter() -
TschumperleDericheFilter
-
-
Method Details
-
initFilter
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 classGenericFilter
- Parameters:
source
- the image source datatarget
- the image target data
-
runPass
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 classGenericFilter
- Parameters:
source
- the image source datatarget
- the image target data
-
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 alsoGenericFilter.getPass()
.- Overrides:
passesRequired
in classGenericFilter
- Returns:
- the required number of filter passes
-
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 classGenericFilter
-