Module imagingbook.common
Class BilateralFilterScalarSeparable
java.lang.Object
imagingbook.common.filter.generic.GenericFilter
imagingbook.common.filter.generic.GenericFilterScalarSeparable
imagingbook.common.filter.edgepreserving.BilateralFilterScalarSeparable
- All Implemented Interfaces:
BilateralF
,ProgressReporter
public class BilateralFilterScalarSeparable
extends GenericFilterScalarSeparable
implements BilateralF
Scalar and separable version of the Bilateral filter as proposed in [1]. On color images, this filter is applied separately to each color component. The filter uses Gaussian domain and range kernels and can be applied to all image types. See Sec. 17.2 of [2] for additional details.
[1] C. Tomasi and R. Manduchi, "Bilateral Filtering for Gray and Color Images", Proceedings of the 1998 IEEE
International Conference on Computer Vision, Bombay, India.
[2] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer
(2022).
- Version:
- 2021/01/01
-
Nested Class Summary
Nested classes/interfaces inherited from interface imagingbook.common.filter.edgepreserving.BilateralF
BilateralF.Parameters
-
Field Summary
Fields inherited from class imagingbook.common.filter.generic.GenericFilterScalarSeparable
doX, doY
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected float
doPixelX
(PixelPack.PixelSlice source, int u, int v) Applies a 1D filter operation in x-direction.protected float
doPixelY
(PixelPack.PixelSlice source, int u, int v) Applies a 1D filter operation in y-direction.Methods inherited from class imagingbook.common.filter.generic.GenericFilterScalarSeparable
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
-
BilateralFilterScalarSeparable
public BilateralFilterScalarSeparable() -
BilateralFilterScalarSeparable
-
-
Method Details
-
doPixelX
Description copied from class:GenericFilterScalarSeparable
Applies a 1D filter operation in x-direction. This method must be implemented by concrete sub-classes. This method is invoked beforeGenericFilterScalarSeparable.doPixelY(PixelSlice, int, int)
. 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:
doPixelX
in classGenericFilterScalarSeparable
- Parameters:
source
- 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
-
doPixelY
Description copied from class:GenericFilterScalarSeparable
Applies a 1D filter operation in y-direction. This method must be implemented by concrete sub-classes. This method is invoked afterGenericFilterScalarSeparable.doPixelX(PixelSlice, int, int)
. 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:
doPixelY
in classGenericFilterScalarSeparable
- Parameters:
source
- 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
-