Crates.io | agcwd |
lib.rs | agcwd |
version | 0.3.1 |
source | src |
created_at | 2022-01-14 11:37:13.999984 |
updated_at | 2022-01-23 03:31:33.795684 |
description | Image contrast enhancement library based on the AGCWD algorithm |
homepage | https://github.com/sile/agcwd |
repository | https://github.com/sile/agcwd |
max_upload_size | |
id | 513820 |
size | 45,866 |
A Rust implementation of the AGCWD algorithm.
AGCWD is described in the paper "Efficient Contrast Enhancement Using Adaptive Gamma Correction With Weighting Distribution".
Here is a live demo of enhancing images from your camera in real-time.
A Rust code snippet to enhance an RGB image:
// An example image containing 2 RGB pixels.
let mut pixels = vec![0, 1, 2, 3, 4, 5];
let agcwd = agcwd::Agcwd::new(0.5);
agcwd.enhance_rgb_image(&mut pixels);
You can apply AGCWD to a PNG image by executing the following command:
$ cargo run --example enhance-png /path/to/image.png --output-path