Module imagingbook.common
Class KuwaharaFilterScalar
java.lang.Object
imagingbook.common.filter.generic.GenericFilter
imagingbook.common.filter.generic.GenericFilterScalar
imagingbook.common.filter.edgepreserving.KuwaharaFilterScalar
- All Implemented Interfaces:
KuwaharaF
,ProgressReporter
Scalar version of a Kuwahara-type filter, similar to the filter described in [1]. It structures the filter region into five overlapping, square subregions (including a center region) of size (r+1) x (r+1). See Sec. 17.1 of [2] for additional details.
[1] F. Tomita and S. Tsuji. Extraction of multiple regions by smoothing in selected neighborhoods. IEEE Transactions
on Systems, Man, and Cybernetics 7, 394–407 (1977).
[2] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer
(2022).
- Version:
- 2021/01/02
-
Nested Class Summary
Nested classes/interfaces inherited from interface imagingbook.common.filter.edgepreserving.KuwaharaF
KuwaharaF.Parameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected float
doPixel
(PixelPack.PixelSlice plane, int u, int v) This method defines the steps to be performed for a single image pixel and must be implemented by any concrete sub-class.Methods inherited from class imagingbook.common.filter.generic.GenericFilterScalar
reportProgress, runPass
Methods inherited from class imagingbook.common.filter.generic.GenericFilter
abort, applyTo, applyTo, applyTo, closeFilter, getDepth, getHeight, getPass, getProgress, getWidth, initFilter, initPass, passesRequired, reportProgress
-
Constructor Details
-
KuwaharaFilterScalar
public KuwaharaFilterScalar() -
KuwaharaFilterScalar
-
-
Method Details
-
doPixel
Description copied from class:GenericFilterScalar
This method defines the steps to be performed for a single image pixel and must be implemented by any concrete sub-class. The source data are passed as aPixelPack.PixelSlice
container, which holds the scalar values of one image component. The methodPixelPack.PixelSlice.getVal(int, int)
should be used to read individual pixel values. These data should not be modified but the (float) result of the single-pixel calculation must be returned.- Specified by:
doPixel
in classGenericFilterScalar
- Parameters:
plane
- the scalar-valued data for a single image componentu
- the current x-positionv
- the current y-position- Returns:
- the result of the filter calculation for this pixel
-