#image #convolution #analysis #kernel

convolve-image

A small library to perform convolution operations on images with arbitrarily-sized separable kernels

4 releases (breaking)

new 0.3.0 Apr 30, 2024
0.2.0 Apr 29, 2024
0.1.0 Apr 9, 2024
0.0.0-reserved Apr 8, 2024

#91 in Multimedia

Download history 76/week @ 2024-04-02 176/week @ 2024-04-09

252 downloads per month
Used in image-dwt

Apache-2.0

15KB
319 lines

Image Convolution Using Separable Kernel

This project provides an implementation convolution on images using separable kernels of arbitrary size. The library is aimed to provide a fast implementation with 0 dependencies other than image-rs.

Usage

use convolve_image::convolve::Convolution;
use convolve_image::kernel::SeparableKernel;

fn convolve_image() {
    let image = image::open("./sample.jpg").unwrap();
    let image = image.to_rgb32f();
    image.convolve(SeparableKernel::new([1. / 4., 1. / 2., 1. / 4.]), 1);
}

Installation

To use this library in your Rust project, add the following to your Cargo.toml file:

[dependencies]
convolve-image = "0.1.0"

Dependencies

~0–2.8MB
~14K SLoC