MVOS_HSI: A Python Library for Preprocessing Agricultural Crop Hyperspectral Data
Authors: Rishik Aggarwal, Krisha Joshi, Pappu Kumar Yadav, Jianwei Qin, Thomas F. Burks, Moon S. Kim
Organizations: Machine Vision and Optical Sensor (MVOS) Lab, Dept. of Agricultural and Biosystems Engineering, South Dakota State University, Brookings, SD 57007, USA · USDA/ARS Environmental Microbial and Food Safety Laboratory, Beltsville, MD 20705, USA · Department of Agricultural and Biological Engineering, University of Florida, Gainesville, FL 32611, USA
Hyperspectral imaging (HSI) allows researchers to study plant traits non-destructively. By capturing hundreds of narrow spectral bands per pixel, it reveals details about plant biochemistry and stress that standard cameras miss. However, processing this data is often challenging. Many labs still rely on loosely organized collections of lab-specific MATLAB or Python scripts, which makes workflows difficult to share and results difficult to reproduce. MVOS_HSI is an open-source Python library that provides an end-to-end workflow for processing leaf-level HSI data. The software handles everything from calibrating raw ENVI files to detecting and clipping individual leaves based on multiple vegetation indices (NDVI, CIRedEdge and GCI). It also includes tools for data augmentation to create training-time variations for machine learning and utilities to visualize spectral profiles. MVOS_HSI can be used as an importable Python library or run directly from the command line. The code and documentation are available on GitHub. By consolidating these common tasks into a single package, MVOS_HSI helps researchers produce consistent and reproducible results in plant phenotyping
Figures & tables
Nr.
Code metadata description
Metadata
C1
Current code version
v0.2.1
C2
Permanent link to code/repository used for this code version
https://github.com/MVOSlab-sdstate/mvos_hsi
C3
Permanent link to Reproducible Capsule
N/A
C4
Legal Code License
MIT License
C5
Code versioning system used
git
C6
Software code languages, tools, and services used
Python 3.x; NumPy, SciPy, Matplotlib
Table 1: Code Metadata for MVOS_HSI
Figure 1: MVOS_HSI end-to-end workflow for leaf-level hyperspectral preprocessing.
Figure 2: Example leaf segmentation and clipping workflow using a vegetation index (e.g., NDVI) and objective thresholding (Otsu).
Figure 3: Example spectral profiles produced by MVOS_HSI plotting utilities, enabling comparison of spectral profiles across multiple leaf samples.
Department of Information Technology Siddhartha Academy of Higher Education Vijayawada, Andhra Pradesh 521108, India · Department of Computer Science and Engineering Vellore Institute of Technology Bhopal, Madhya Pradesh 466114, India · Department of Computer and Information Sciences Indira Gandhi National Open University New Delhi 110068, India +1
Institute of Applied Sciences and Intelligent Systems (ISASI), CNR, 73100 Lecce, Italy · Dept. of Engineering for Innovation, University of Salento, 73100 Lecce, Italy · VSC Laboratory, Department of Electronics and Automation, University of Biskra, Biskra, Algeria +4