In this study, we have developed a prototype of the automatic defects detection system for capsule inspection using the computer vision techniques. The subjects for inspection are empty hard capsules of various sizes which are made of gelatine. To inspect both sides of a capsule, 2-stage recognition is performed. Features we have used are various lengths of a capsule, area, linearity, symmetricity, head curvature and so on. Decision making is performed based on average value which is computed from 20 good capsules in training and permission bounds in factories. Most of time-consuming process for feature extraction is computed by hardware to meet the inspection speed of more than 20 capsules/sec. The main logic for control and arithmetic computation is implemented using EPLD for the sake of easy change of design and reduction in time for developement. As a result of experiment, defects on size or contour of binary images are detected over 95%. Because of dead zone in imaging system, detection ratio of defects on surface, such as bad joint, chip, speck, etc, is lower than the former case. In this case, detection ratio is 50-85%. Defects such as collet pinch and mashed cap/body seldom appear in binary image, and detection ratio is very low. So we have to process the gray-level image directly in partial region.