In this study, a hyperspectral imaging–based machine learning framework was developed and evaluated to classify different nitrogen fertilizer levels in cucumber leaves (cv.
Nitrogen treatments consisted of 30%, 60%, and 90% additional nitrogen applied to a nutrient solution with a base concentration of 2 g L⁻¹.
To enhance signal quality and examine the influence of spectral preprocessing on class separability, three preprocessing techniques—Savitzky–Golay filtering, Multiplicative Scatter Correction (MSC), and Gaussian normalization—were applied exclusively to the training dataset and subsequently transferred to the independent test set.
Three machine learning algorithms, including Support Vector Machine (SVM), Linear Discriminant Analysis (LDA), and Decision Tree (DT), were evaluated using a 75/25 training–testing split along with five-fold cross-validation for model optimization.
These findings highlight the strong potential of integrating hyperspectral imaging with SVM for accurate discrimination of nitrogen levels and for supporting efficient nutrient management in crop production systems.
Nitrogen is one of the most essential macronutrients for plant growth, and its improper management can reduce fertilizer use efficiency while causing significant economic and environmental consequences. In this study, a hyperspectral imaging–based machine learning framework was developed and evaluated to classify different nitrogen fertilizer levels in cucumber leaves (cv. Super Arshiya-F1). Nitrogen treatments consisted of 30%, 60%, and 90% additional nitrogen applied to a nutrient solution with a base concentration of 2 g L⁻¹. Seventy-two hours after treatment application, a total of 300 leaves were collected from the treated plants, and hyperspectral images were acquired in the spectral range of 400–1100 nm, producing 327 spectral bands for each sample. To enhance signal quality and examine the influence of spectral preprocessing on class separability, three preprocessing techniques—Savitzky–Golay filtering, Multiplicative Scatter Correction (MSC), and Gaussian normalization—were applied exclusively to the training dataset and subsequently transferred to the independent test set. Three machine learning algorithms, including Support Vector Machine (SVM), Linear Discriminant Analysis (LDA), and Decision Tree (DT), were evaluated using a 75/25 training–testing split along with five-fold cross-validation for model optimization. The results demonstrated that SVM consistently achieved the highest classification performance across all scenarios. The best results were obtained without preprocessing and with Gaussian normalization, both reaching an overall accuracy of 94%, an F1-score of approximately 0.94, and a ROC–AUC exceeding 0.98. In contrast, LDA showed moderate performance, while DT yielded the lowest classification accuracy. These findings highlight the strong potential of integrating hyperspectral imaging with SVM for accurate discrimination of nitrogen levels and for supporting efficient nutrient management in crop production systems.