java.lang.Object
imagingbook.common.filter.generic.GenericFilter
imagingbook.common.filter.generic.GenericFilterScalar
imagingbook.common.filter.nonlinear.ScalarMedianFilter
- All Implemented Interfaces:
ProgressReporter
Ordinary (scalar) median filter for color images implemented by extending the GenericFilter
class. Color
images are filtered individually in all channels. See Sec. 15.2.1 of [1] for details.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2020/12/31
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescription -
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
-
ScalarMedianFilter
public ScalarMedianFilter() -
ScalarMedianFilter
-
-
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
-