In this paper, we focus on pretesting to find the gap mura defects before the injection of liquid crystal into the cell of a thin-film-transistor liquid-crystal display panel. An optical interference pattern sensing method for inspection of the gap mura defects is used. We propose automatic quantization of mura panel defects in terms of the crossing points of the interference pattern. By doing so, panels with unacceptable gap mura could be sorted out simply by a binary classification, which facilitates automated visual inspection. The advantages of using this method include that it allows for pretesting before the injection of liquid crystal, meaning that defective panels can be found before the next process step and the wastage of liquid crystal materials can be avoided. The yield rate and manufacturing process efficiency can be improved and the inspection time can be shortened from 20 s by human inspection to less than 2 s by automatic inspection. Experiment results show that the proposed method offers improved performance for gap mura detection.