Visual inspection on the surface of components is a main application of machine vision. Visual inspection finds its application in identifying defects such as scratches, cracks bubbles and measurement of cutting tool wear and welding quality. Machine learning approach to machine vision helps in automating the design process of machine vision systems. This approach involves image acquisition, preprocessing, feature extraction and classification. Study shows a library of features, and classifiers are available to classify the data. However, only the best combination of them can yield the highest classification accuracy. In this study, images with different known conditions were acquired, preprocessed, and histogram features were extracted. The classification accuracies of C4.5 classifier algorithm and Naïve Bayes algorithm were compared, and results are reported. The study shows that C4.5 algorithm performs better. © 2010 Elsevier Ltd. All rights reserved.