Defect detection is a critical issue for the quality control of dropping pills, which is a special dosage form of traditional Chinese Medicine. Machine vision is a non-destructing testing technology and cost-effective with high accuracy that can be used to predict the detects of both interior and exterior of the sample by employing the camera. In this research, a machine vision system for inspecting quality of the Xuesaitong dropping pills (XDPs) that include non-spherical, abnormal sizes and colors was developed to evaluate the appearance quality of XDPs rapidly and accurately. Firstly, 270 images of XDPs containing qualified and three different types of defects were collected. Subsequently, the processing of the XDPs images were carried out. Finally, Three defecting categories classification models were developed and compared based on contour and color features. The experimental results showed that the Random Forest outperformed all the explored models and the classification accuracy for non-spherical, abnormal sizes and colors reached 98.52%, 100.00% and 100.00%, respectively. In summary, the method established in this research is scientific, reliable, fast and accurate, which has great application potential and can provide technical support for the automatic defect detection of dropping pills.