Conventional diagnostic methods for glaucoma primarily rely on non-dynamic fundus images and often analyze features such as the optic cup-to-disc ratio and abnormalities in specific retinal locations like the macula and fovea. However, hyperspectral imaging techniques focus on detecting alterations in oxygen saturation within retinal vessels, offering a potentially more comprehensive approach to diagnosis. This study explores the diagnostic potential of hyperspectral imaging for glaucoma by introducing a novel hyperspectral imaging conversion technique. Digital fundus images are transformed into hyperspectral representations, allowing for a detailed analysis of spectral variations. Spectral regions exhibiting differences are identified through spectral analysis, and images are reconstructed from these specific regions. The Vision Transformer (ViT) algorithm is then employed for classification and comparison across selected spectral bands. Fundus images are used to identify differences in lesions, utilizing a dataset of 1291 images. This study evaluates the classification performance of models using various spectral bands, revealing that the 610–780 nm band outperforms others with an accuracy, precision, recall, F1-score, and AUC-ROC all approximately at 0.9007, indicating its superior effectiveness for the task. The RGB model also shows strong performance, while other bands exhibit lower recall and overall metrics. This research highlights the disparities between machine learning algorithms and traditional clinical approaches in fundus image analysis. The findings suggest that hyperspectral imaging, coupled with advanced computational techniques such as the ViT algorithm, could significantly enhance glaucoma diagnosis. This understanding offers insights into the potential transformation of glaucoma diagnostics through the integration of hyperspectral imaging and innovative computational methodologies.