Expand description
SIMD-accelerated thresholding operations
This module provides high-performance image thresholding and binarization using SIMD instructions. Thresholding is fundamental for segmentation, feature extraction, and image preprocessing.
§Supported Operations
- Binary Thresholding: Simple threshold with two output values
- Adaptive Thresholding: Local threshold based on neighborhood
- Otsu’s Method: Automatic threshold selection
- Multi-level Thresholding: Multiple threshold values
- Range Thresholding: Keep values within a range
- Hysteresis Thresholding: Two-level threshold with connectivity
§Performance
Expected speedup over scalar: 6-12x for thresholding operations
§Example
use oxigdal_algorithms::simd::threshold::{binary_threshold, otsu_threshold};
use oxigdal_algorithms::error::Result;
fn example() -> Result<()> {
let data = vec![128u8; 1000];
let mut output = vec![0u8; 1000];
binary_threshold(&data, &mut output, 100, 255, 0)?;
Ok(())
}Functions§
- adaptive_
threshold_ gaussian - Apply adaptive threshold using Gaussian-weighted mean
- adaptive_
threshold_ mean - Apply adaptive threshold using local mean
- binary_
threshold - Binary threshold with custom output values
- hysteresis_
threshold - Hysteresis thresholding (two-level threshold with connectivity)
- multi_
threshold - Multi-level thresholding
- otsu_
threshold - Calculate optimal threshold using Otsu’s method
- threshold_
range - Range threshold - keep values within [low, high]
- threshold_
to_ zero - Binary threshold to zero
- threshold_
truncate - Truncate threshold - cap values at threshold