#image #convolution #analysis #kernel

convolve-image

一个用于在任意尺寸可分离核上执行图像卷积操作的轻量级库

5个版本 (破坏性更新)

0.4.0 2024年5月3日
0.3.0 2024年4月30日
0.2.0 2024年4月29日
0.1.0 2024年4月9日
0.0.0-保留2024年4月8日

#124 in 多媒体

每月45次下载
image-dwt中使用

Apache-2.0

22KB
556 代码行

使用可分离核进行图像卷积

本项目提供使用任意大小可分离核对图像进行卷积的实现。该库旨在提供快速实现,除了image-rs之外没有其他依赖。

用法

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);
}

安装

要在Rust项目中使用此库,请将以下内容添加到您的Cargo.toml文件中

[dependencies]
convolve-image = "0.1.0"

依赖

~0–760KB
~15K SLoC