Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GaussianBlur ¶
GaussianBlur applies a Gaussian blur filter to an image, creating a smooth blurring effect. The algorithm uses separable 1D convolutions for horizontal and vertical passes, which is significantly more efficient than a direct 2D convolution. Processing is done in parallel to maximize performance on multi-core systems.
Parameters:
- img: The source image to be blurred (image.Image interface)
- level: The blur intensity, ranging from 0 (no blur) to 30 (maximum blur) Higher values create a stronger blur effect but may impact performance
Returns:
- image.Image: A new image with the blur effect applied
Note: The level parameter is automatically clamped to the valid range [0, 30].
func Median ¶ added in v0.3.1
Median applies a median blur filter to an image. The median filter works by replacing each pixel with the median value from its surrounding neighborhood, which effectively removes noise while preserving edges in the image.
Parameters:
- img: The source image to be processed
- box: Size of the filter kernel (square matrix), valid range 3-30. Larger values create stronger blurring effects but increase processing time. Values outside this range will be clamped.
Returns:
- image.Image
Note: The implementation uses parallel execution to improve performance on multi-core systems.
Types ¶
This section is empty.