This research explored the efficacy of machine learning techniques, specifically the Bagging meta-estimator, in the classification of rice grain images. Utilizing a dataset composed of 45,000 images of Arborio, Basmati, and Jasmine rice varieties, a 5-fold cross-validation was employed to evaluate the model's performance. The results were highly promising, with the model consistently achieving over 96% in accuracy, precision, recall, and F1-score across all folds, indicating its robustness and reliability. The study confirmed that ensemble learning techniques could significantly improve the classification accuracy over single classifier systems in agricultural applications. The findings offer a significant contribution to automated agricultural processes, suggesting that machine learning can greatly enhance the efficiency and precision of rice variety classification. These results pave the way for further research into the integration of such models into agricultural quality control and provide a foundation for the exploration of advanced image processing and deep learning techniques for improved performance. Future research directions include expanding the model to encompass a wider variety of crops and integrating additional data modalities to refine classification accuracy further. Practical applications should explore the incorporation of this technology into existing agricultural systems to maximize the benefits of automation in quality control.