Crates.io | libdebayer-sys |
lib.rs | libdebayer-sys |
version | 0.2.0 |
source | src |
created_at | 2024-09-09 17:36:03.528328 |
updated_at | 2024-09-16 15:53:14.438987 |
description | unsafe sys crate to the libdebayer C library |
homepage | https://github.com/saronic-technologies/libdebayer |
repository | https://github.com/saronic-technologies/libdebayer/tree/main/rust/libdebayer-sys |
max_upload_size | |
id | 1369547 |
size | 8,149 |
A CUDA accelerated debayering library with C/C++ and Rust support.
nix develop
This enters a dev shell with all of the necessary build dependencies.
This is a simple C API that wraps the underlying CUDA kernels. The C API assumes the images are already in GPU memory. libdebayer implements 3 debayering algorithms:
This provides a higher level C++ API that performs cudaMemcpy's from
host to device. An example of how to use this library is in
benchmark/cpp
.
This provides a higher level Rust API with TryFrom
traits to go from
an OpenCV Mat
to a debayered Mat
. An example of how to use this
library is in rust/examples/test_benchmark.rs
. This test benchmark
is identical to the benchmark/cpp
program.
nix develop
cd rust
KODAK_FOLDER_PATH="<path-to-benchmark-kodak-files>" cargo run --example test_benchmark
libdebayer is benchmarked against OpenCV and NPP (Nvidia Performance
Primitives). To run the benchmark for the Malvar 2004 implementation
run the following: nix run .#kodak_benchmark_cpp
Example output from OpenCV-EA:
Example output from NPP (Nvidia Performance Primitives):
Example output from our Malvar 2004 CUDA kernel:
Example outputs from our Menon 2007 CUDA kernel: