#convolution #image #analysis #kernel

convolve-image

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

5 releases (breaking)

0.4.0 May 3, 2024
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

#68 in Multimedia

Download history 252/week @ 2024-04-08 471/week @ 2024-04-29

723 downloads per month
Used in image-dwt

Apache-2.0

22KB
556 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