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中使用
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