1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! Hyperspectral Imaging Analysis
//!
//! This module provides a comprehensive toolkit for hyperspectral image analysis
//! including spectral unmixing, preprocessing, and classification.
//!
//! # Module Structure
//!
//! | Sub-module | Description |
//! |------------|-------------|
//! | [`unmixing`] | Endmember extraction (VCA, N-FINDR, SISAL) and abundance estimation (UCLS, NCLS, FCLS) |
//! | [`preprocessing`] | Noise reduction (MNF), whitening, band removal, radiometric correction |
//! | [`classification`] | Pixel classification (SAM, SID, SCM, MSD) and accuracy metrics |
//!
//! # Quick Start
//!
//! ```rust,no_run
//! use scirs2_ndimage::hyperspectral::{
//! unmixing::{HyperspectralImage, vertex_component_analysis, abundance_estimation_fcls},
//! preprocessing::{minimum_noise_fraction, radiometric_correction, RadiometricCalibration},
//! classification::{sam_classifier, abundance_map_to_class},
//! };
//! use ndarray::Array2;
//!
//! // Synthetic 100-pixel, 20-band image.
//! let data = Array2::<f64>::ones((100, 20));
//! let img = HyperspectralImage::new(data);
//!
//! // Extract 3 endmembers via VCA.
//! let endmembers = vertex_component_analysis(&img, 3).unwrap();
//!
//! // Estimate FCLS abundances.
//! let delta = 10.0;
//! let abundances = abundance_estimation_fcls(&img, &endmembers, delta).unwrap();
//!
//! // Hard classification.
//! let class_map = abundance_map_to_class(&abundances, 0.3).unwrap();
//! ```
// ── Re-exports ──────────────────────────────────────────────────────────────
// Core data structure.
pub use HyperspectralImage;
// Endmember extraction.
pub use ;
// Abundance estimation.
pub use ;
// Preprocessing.
pub use ;
// Classification.
pub use ;