Ahmad Khoirul Umam, Lilik Eka Radiati, Fitri Utaminingrum, Dimas Firmanda Al Riza
Milk quality plays a central role in determining dairy processing efficiency, product safety, and market value, with high-grade milk commanding premium prices. Conventional laboratory-based evaluations, including microbiological and physicochemical tests, provide accurate results but are time-consuming, costly, and impractical for real-time assessment at the farm level. Recent advances in computer vision and artificial intelligence (AI) offer non-destructive and rapid alternatives for food quality monitoring; however, applications specifically targeting raw milk remain underexplored. This study proposes a texture-based image analysis system to classify raw cow milk quality. A total of 1008 milk images were collected under controlled lighting conditions and categorized into three classes: (1) good quality with normal appearance, (2) non- defective but exhibiting abnormal opacity or thickness, and (3) defective samples with visible clots, sediment, or discoloration. Texture features were extracted using the Gray Level Co-occurrence Matrix (GLCM) at four pixel distances (1- 4) and orientations (0, 45, 90, 135). Extracted parameters included contrast, correlation, homogeneity, dissimilarity, and energy. To reduce computational complexity, only the most relevant features were selected. Classification was conducted using a Decision Tree model, with the best performance achieved at pixel distance 3 and orientation 0, yielding an accuracy of 81.68%. Statistical testing confirmed no significant differences across parameter variations, while confusion matrix analysis validated classification reliability across all categories. The results demonstrate the feasibility of combining GLCM-based texture features with decision tree models for rapid, non-destructive milk quality evaluation. This approach has strong potential for integration into precision dairy farming, although early-stage spoilage detection remains challenging. © The Authors, published by EDP Sciences, 2025.
Faculty of Animal Science, Universitas Brawijaya, Malang, 65145, Indonesia; Faculty of Computer Science, Universitas Brawijaya, Malang, 65145, Indonesia; Faculty of Agricultural Technology, Universitas Brawijaya, Malang, 65145, Indonesia