GaussianBlur
GaussianBlur can be used to blur the input image using a gaussian kernel with a specified kernel size and standard deviation.
using Augmentor
using ImageShow, ImageCore
img_in = testpattern(RGB, ratio=0.5)
mosaicview(
img_in,
augment(img_in, GaussianBlur(3)),
augment(img_in, GaussianBlur(5, 2.5));
fillvalue=colorant"white", nrow=1, npad=10
)References
Augmentor.GaussianBlur — TypeGaussianBlur <: ColorOperationDescription
Blurs an image using a Gaussian filter.
Usage
GaussianBlur(k, [σ])Arguments
k:IntegerorAbstractVectorofIntegerthat denote the kernel size. It must be an odd positive number.σ: Optional.RealorAbstractVectorofRealthat denote the standard deviation. It must be a positive number. Defaults to0.3 * ((k - 1) / 2 - 1) + 0.8.
Examples
using Augmentor
img = testpattern()
# use exactly k=3 and σ=1.0
augment(img, GaussianBlur(3, 1.0))
# pick k and σ randomly from the specified ranges
augment(img, GaussianBlur(3:2:7, 1.0:0.1:2.0))This page was generated using DemoCards.jl and Literate.jl.