Skip to main content

morphological_gradient

Function morphological_gradient 

Source
pub fn morphological_gradient(
    img: &[u8],
    nrows: usize,
    ncols: usize,
    k: usize,
) -> Vec<u8> ⓘ
Expand description

(2k+1)x(2k+1) max - min gradient with in-bounds neighborhoods only (skimage rank filters ignore out-of-image samples — verified against skimage/filters/rank/core_cy.pyx::_core, which skips out-of-bounds positions via is_in_mask). k = 1 is the 3x3 gradient.