leptonica 0.4.0

Rust port of Leptonica image processing library
Documentation
//! leptonica-filter - Image filtering operations
//!
//! This crate provides image filtering operations including:
//!
//! - Convolution with arbitrary kernels
//! - Blur operations (box blur, Gaussian blur)
//! - Edge detection (Sobel, Laplacian)
//! - Image enhancement (sharpening, unsharp masking, emboss)
//! - Bilateral filtering (edge-preserving smoothing)
//! - Rank filtering (median, min, max filters)
//! - Adaptive mapping (background normalization, contrast normalization)

pub mod adaptmap;
pub mod bilateral;
pub mod block_conv;
pub mod convolve;
pub mod edge;
pub mod enhance;
mod error;
pub mod kernel;
pub mod rank;
pub mod runlength;
pub mod windowed;

pub use error::{FilterError, FilterResult};
pub use kernel::Kernel;

// Re-export commonly used functions
pub use adaptmap::{
    BackgroundNormOptions, ContrastNormOptions, EdgeFilterType, FlexNormOptions,
    apply_inv_background_gray_map, apply_inv_background_rgb_map, apply_variable_gray_map,
    background_norm, background_norm_flex, background_norm_gray_array,
    background_norm_gray_array_morph, background_norm_morph, background_norm_rgb_arrays,
    background_norm_rgb_arrays_morph, background_norm_simple, background_norm_to_1_min_max,
    clean_background_to_white, contrast_norm, contrast_norm_simple, convert_to_8_min_max,
    extend_by_replication, fill_map_holes, get_background_gray_map, get_background_gray_map_morph,
    get_background_rgb_map, get_background_rgb_map_morph, get_foreground_gray_map,
    get_inv_background_map, global_norm_no_sat_rgb, global_norm_rgb, smooth_connected_regions,
    threshold_spread_norm,
};
pub use bilateral::{
    bilateral, bilateral_exact, bilateral_gray, bilateral_gray_exact, block_bilateral_exact,
    make_range_kernel,
};
pub use block_conv::{blockconv, blockconv_accum, blockconv_gray, blockconv_gray_unnormalized};
pub use convolve::{
    add_gaussian_noise, blockrank, blocksum, box_blur, census_transform, convolve, convolve_color,
    convolve_gray, gaussian_blur,
};
pub use edge::{
    EdgeOrientation, EdgeSide, emboss, get_edge_profile, laplacian_edge, measure_edge_smoothness,
    sharpen, sobel_edge, two_sided_edge_filter, unsharp_mask, unsharp_masking_fast,
    unsharp_masking_gray_fast,
};
pub use enhance::{
    DynamicRangeScale, TrcLut, color_shift_rgb, contrast_trc, contrast_trc_masked,
    contrast_trc_pix, darken_gray, equalize_trc, equalize_trc_pix, gamma_trc, gamma_trc_masked,
    gamma_trc_pix, gamma_trc_with_alpha, half_edge_by_bandpass, max_dynamic_range,
    measure_saturation, modify_brightness, modify_hue, modify_saturation, mult_constant_color,
    mult_matrix_color, trc_map, trc_map_general, unsharp_masking, unsharp_masking_gray,
};
pub use rank::{
    MinMaxOp, max_filter, median_filter, min_filter, rank_filter, rank_filter_color,
    rank_filter_gray, rank_filter_with_scaling, scale_gray_min_max, scale_gray_rank_cascade,
    scale_gray_rank2,
};
pub use runlength::{
    RunDirection, find_horizontal_runs, find_max_horizontal_run_on_line, find_max_runs,
    find_max_vertical_run_on_line, find_vertical_runs, make_msbit_loc_tab,
    runlength_membership_on_line, runlength_transform,
};
pub use windowed::{
    WindowedStatsResult, mean_square_accum, windowed_mean, windowed_mean_square, windowed_stats,
    windowed_variance,
};