This is a Go port of Stackblur algorithm created by Mario Klingemann.
Stackblur is a compromise between Gaussian blur and Box blur, but it creates much better looking blurs than Box blur and it is ~7x faster than Gaussian blur.
First, install Go, set your GOPATH, and make sure $GOPATH/bin is on your PATH.
$ export GOPATH="$HOME/go"
$ export PATH="$PATH:$GOPATH/bin"
Next build the binary file.
$ go get -u github.com/esimov/stackblur-go/cmd
The provided CLI example supports the following flags:
$ stackblur --help
Usage of stackblur:
Radius (default 20)
The command below will generate the blurred version of the source image.
$ stackblur -in image/sample.png -out image/output.png -radius 10
The cli command supports a -gif flag, which if set as true it visualize the bluring process by outputting the result into a gif file.
The API is very simple: you have to expose an image file and a blur radius to the Process function.
This project is under the MIT License. See the LICENSE file for the full license text.