Expand description
§Scan Colors
A Rust crate for analyzing fountain pen ink colors from digital photographs.
This library provides calibrated color measurement by:
- Detecting and rectifying paper/card surfaces
- Estimating illuminant and applying white balance correction
- Isolating ink swatches from background
- Extracting representative colors with confidence metrics
§Example
use inkswatch_colorscan::{analyze_swatch, ColorResult};
use std::path::Path;
let result = analyze_swatch(Path::new("photo.jpg"))?;
println!("Lab: {:?}, Hex: {}", result.lab, result.hex);Re-exports§
pub use error::AnalysisError;pub use error::Result;pub use config::PipelineConfig;
Modules§
- calibration
- White balance and color calibration module
- color
- Color analysis and conversion module
- config
- Configuration structures for the inkswatch_colorscan analysis pipeline.
- constants
- Calibration constants and reference values for color analysis
- detection
- Paper and swatch detection module
- error
- Error types for the inkswatch_colorscan library.
- exif
- EXIF metadata extraction module
- image_
loader - Unified image loading with support for multiple formats
Structs§
- Color
Result - Complete color analysis result with perceptual and display representations
- Debug
Output - Debug output containing intermediate processing images
Functions§
- analyze_
swatch - Analyze a fountain pen ink swatch from an image file
- analyze_
swatch_ debug - Analyze a fountain pen ink swatch with debug output (using default config)
- analyze_
swatch_ debug_ with_ config - Analyze a fountain pen ink swatch with configuration and debug output
- analyze_
swatch_ first_ with_ config - Analyze using the swatch-first approach
- analyze_
swatch_ with_ method - Analyze a fountain pen ink swatch with a specified extraction method