Defect Detection is one of the most important parts of Automatic Identification and Data transmission. Quick Response code (QRcode) is one of the most popular types of two-dimensional barcodes. It isachallenge to detect defect of various QRcode images efficiently and accurately. In this paper, we propose the procedure byaserial of carefully designed preprocessing methods. The defect detection procedure consists of QRcode identification, QRcode reconstruction, perspective transformation, image binarization, morphological operation, image matching, and Blob analysis. By these steps, we can detect defect of different types of QRcode images. The experiment results show that our method has stronger robustness and higher efficiency. Moreover, experiment results on QRcode images show that the prediction accuracy of proposed method reaches 99.07%with an average execution time of 6.592 ms. This method can detect defect of these images in real time.