Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/filter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,14 @@ where
/// ```
#[must_use = "the function does not modify the original image"]
pub fn laplacian_filter(image: &GrayImage) -> Image<Luma<i16>> {
filter_clamped(image, kernel::FOUR_LAPLACIAN_3X3)
filter_clamped(image, kernel::LAPLACIAN_3X3)
}

#[must_use = "the function does not modify the original image"]
#[cfg(feature = "rayon")]
#[doc = generate_parallel_doc_comment!("laplacian_filter")]
pub fn laplacian_filter_parallel(image: &GrayImage) -> Image<Luma<i16>> {
filter_clamped_parallel(image, kernel::FOUR_LAPLACIAN_3X3)
filter_clamped_parallel(image, kernel::LAPLACIAN_3X3)
}

#[cfg(test)]
Expand Down
8 changes: 2 additions & 6 deletions src/kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,5 @@ pub const ROBERTS_HORIZONTAL_2X2: Kernel<'static, i32> = Kernel::new(&[1, 0, 0,
/// The roberts vertical 3x3 kernel.
pub const ROBERTS_VERTICAL_2X2: Kernel<'static, i32> = Kernel::new(&[0, 1, -1, -0], 2, 2);

/// The 4-connectivity laplacian 3x3 kernel.
pub const FOUR_LAPLACIAN_3X3: Kernel<'static, i16> =
Kernel::new(&[0, 1, 0, 1, -4, 1, 0, 1, 0], 3, 3);
/// The 8-connectivity laplacian 3x3 kernel.
pub const EIGHT_LAPLACIAN_3X3: Kernel<'static, i16> =
Kernel::new(&[1, 1, 1, 1, -8, 1, 1, 1, 1], 3, 3);
/// The laplacian 3x3 kernel.
pub const LAPLACIAN_3X3: Kernel<'static, i16> = Kernel::new(&[0, 1, 0, 1, -4, 1, 0, 1, 0], 3, 3);
Loading