Skip to content

Commit

Permalink
Benchmarks gauss NEON
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Oct 5, 2024
1 parent 8000291 commit ade0ee4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 16 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rayon = "1.10.0"

[dev-dependencies]
criterion = "0.5.1"
opencv = { version = "0.93.1", default-features = false, features = ["imgcodecs", "imgproc"] }
opencv = { version = "0.93.1", default-features = false, features = ["imgcodecs", "imgproc", "clang-runtime"] }

[[bench]]
name = "gauss"
Expand Down
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ cargo add libblur

```rust
let blurred = gaussian_blur_image(
img,
61,
0.,
EdgeMode::Clamp,
GaussianPreciseLevel::INTEGRAL,
ThreadingPolicy::Adaptive,
img,
61,
0.,
EdgeMode::Clamp,
GaussianPreciseLevel::INTEGRAL,
ThreadingPolicy::Adaptive,
)
.unwrap();

blurred
.save_with_format("blurred.jpg", ImageFormat::Jpeg)
.unwrap();
Expand Down Expand Up @@ -245,14 +246,14 @@ By the nature of this filter the more spatial sigma are the faster method is.

```rust
fast_bilateral_filter(
src_bytes,
& mut dst_bytes,
dimensions.0,
dimensions.1,
kernel_size,
spatial_sigma,
range_sigma,
FastBlurChannels::Channels3,
src_bytes,
& mut dst_bytes,
dimensions.0,
dimensions.1,
kernel_size,
spatial_sigma,
range_sigma,
FastBlurChannels::Channels3,
);
```

Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,15 @@ fn main() {

let motion_kernel = generate_motion_kernel(225, 15.);

filter_2d_rgb_fft::<u8, f32, f32>(
filter_2d_rgb(
&bytes,
&mut dst_bytes,
ImageSize::new(dimensions.0 as usize, dimensions.1 as usize),
&motion_kernel,
KernelShape::new(225, 225),
EdgeMode::Clamp,
Scalar::new(255.0, 0., 0., 255.0),
ThreadingPolicy::Adaptive,
)
.unwrap();

Expand Down

0 comments on commit ade0ee4

Please sign in to comment.