Skip to content

Fast (linear time) implementation of the Gaussian Blur algorithm in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

fschutt/fastblur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastblur

Fast (linear time) implementation of the Gaussian Blur algorithm in Rust. Original taken from http://blog.ivank.net/fastest-gaussian-blur.html

Usage

The image is assumed to be an RGB image with three channels. This should change in the future, so you can blur as many channels as you want. Still WIP.

#[dependencies]
fastblur = { git = "https://github.com/fschutt/fastblur" }
use fastblur::gaussian_blur;

// data is a Vec<[u8;3]> - 3 items for R, G and B.
// This format will probably change.
gaussian_blur(&mut data, width, height, 10.0);

NOTE: This is not "the fastest" Gaussian blur. It currently takes 8ms - but it is independent of the blur size. A regular Gaussian blur depends on the size of the blur. At a 3px blur, the example from the imageproc library needs 4ms. At a 10px blur, it already needs 28ms. And so on. This library always needs 8ms, no matter of the size of the blur.

License

Licensed under either of

at your option.

About

Fast (linear time) implementation of the Gaussian Blur algorithm in Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages