climage 0.1.0

Rust implementation of image processing library with OpenCL.
Documentation
  • Coverage
  • 4.76%
    1 out of 21 items documented0 out of 0 items with examples
  • Size
  • Source code size: 166.54 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.03 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 44s Average build duration of successful builds.
  • all releases: 44s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • neka-nat/climage
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • neka-nat

climage

Rust implementation of image processing library with OpenCL.

Core feature

  • Use ocl crate
  • Implemented algorithms
    • Convert gray scale
    • Gaussian blur
    • Horizontal/Vertical flip
    • Bilateral filter

Getting started

use climage;
use climage::ImageProc;

fn main() {
    let context = climage::ClContext::default();
    let mut blur = climage::GaussianBlur::new(&context, 2);
    let img = climage::ClImageBuffer::from_readonly_host_image(
        &context,
        image::open("examples/lenna.png").unwrap().into_rgba8(),
    );
    let mut out = climage::ClImageBuffer::from_writeonly_host_image(
        &context,
        image::ImageBuffer::<image::Rgba<u8>, Vec<u8>>::new(img.dimensions().0, img.dimensions().1),
    );
    blur.build_kernel(&img, &mut out).run();
    let mut out_img =
        image::ImageBuffer::<image::Rgba<u8>, Vec<u8>>::new(out.dimensions().0, out.dimensions().1);
    out.data.read(&mut out_img).enq().unwrap();
    out_img.save("examples/lena_blur.png").unwrap();
}

Run example

cargo run --release --example gaussian_blur