java.lang.Object
imagingbook.common.filter.linear.Kernel2D
imagingbook.common.filter.linear.GaussianKernel2D
This class represents a 2D filter kernel.
- Version:
- 2022/09/10
-
Constructor Summary
ConstructorsConstructorDescriptionGaussianKernel2D
(double sigma) Constructor with common sigma for x/y.GaussianKernel2D
(double sigmaX, double sigmaY) Constructor with individual sigmas for x/y. -
Method Summary
Modifier and TypeMethodDescriptionstatic float[][]
makeGaussKernel2D
(double sigmaX, double sigmaY) Creates and returns a 2D Gaussian filter kernel large enough to avoid truncation effects.static float[][]
makeGaussKernel2D
(double sigmaX, double sigmaY, boolean normalize) Creates and returns a 2D Gaussian filter kernel large enough to avoid truncation effects.
-
Constructor Details
-
GaussianKernel2D
Constructor with individual sigmas for x/y.- Parameters:
sigmaX
- sigma for XsigmaY
- sigma for Y
-
GaussianKernel2D
Constructor with common sigma for x/y.- Parameters:
sigma
- common sigma for X/Y
-
-
Method Details
-
makeGaussKernel2D
Creates and returns a 2D Gaussian filter kernel large enough to avoid truncation effects. The associated array is odd-sized in both dimensions. The returned kernel is normalized.- Parameters:
sigmaX
- the width (standard deviation) of the Gaussian in x-directionsigmaY
- the width (standard deviation) of the Gaussian in y-direction- Returns:
- the Gaussian filter kernel
-
makeGaussKernel2D
Creates and returns a 2D Gaussian filter kernel large enough to avoid truncation effects. The associated array is odd-sized in both dimensions. The returned kernel is optionally normalized.- Parameters:
sigmaX
- the width (standard deviation) of the Gaussian in x-directionsigmaY
- the width (standard deviation) of the Gaussian in y-directionnormalize
- set true to normalize the kernel- Returns:
- the Gaussian filter kernel
-