Keywords: air bearing surface, head gimbal assembly, defect detection, machine vision, region of interestIn this paper, we present a newly adapted machine vision method and a practical low-cost machine vision sensor for defect classification of the air bearing surfaces (ABSs) of a hard disk drive, which controls the flying height of the recording heads moving above a disk in operation. A defective ABS can cause poor reading and writing performance; hence, it is necessary to verify its integrity before assembling it into the final product. The proposed sensor system was designed and implemented to detect defects by an effective combination of image segmentation and block matrix techniques as well as classifying them using an expert system under dark-and bright-field conditions. Our system processes subregions of interest and sub-blocks in parallel so that they can take advantage of multiple processor cores. From the trial runs, the small fractional error and low average processing time suggested that our proposed system is effective and can be used in an industrial assembly line.