Crate inkswatch_colorscan

Crate inkswatch_colorscan 

Source
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§

ColorResult
Complete color analysis result with perceptual and display representations
DebugOutput
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