This work provides a method for reducing dimensionality using a median-based discriminatory analysis, which considers the adverse impact on the class mean caused by outliers, referred to as an enhanced linear discriminant analysis (ELDA). ELDA is based on a point-to-median distance, used as a measure metric to describe the within-class and between-class median scatter. The standard LDA algorithm may not be effective when the class distribution is uneven, and the limited sample size for inequality datasets and outliers persists. To address all issues, the proposed ELDA method is applied for cashew leaf disease identification on the cashew crop disease database (CCDDB), and it is more accurate at identifying and classifying cashew leaf illnesses in different sets of training and testing samples on three datasets. Research exhibits greater accuracy on CCDDB with 97.7%, on image database of plant disease symptoms dataset with 99.8%, and on dataset for crop pest and disease detection with 81.7%.