2 releases

Uses old Rust 2015

0.1.1 Apr 9, 2020
0.1.0 Sep 15, 2017

#420 in Images

Download history 27/week @ 2023-12-15 23/week @ 2023-12-22 36/week @ 2023-12-29 27/week @ 2024-01-05 24/week @ 2024-01-12 21/week @ 2024-01-19 38/week @ 2024-01-26 37/week @ 2024-02-02 23/week @ 2024-02-09 75/week @ 2024-02-16 60/week @ 2024-02-23 57/week @ 2024-03-01 80/week @ 2024-03-08 43/week @ 2024-03-15 43/week @ 2024-03-22 109/week @ 2024-03-29

280 downloads per month
Used in 4 crates

MIT license

195KB
470 lines

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.


lib.rs:

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 very 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);

No runtime deps