Algorithm of Barcode Printing Defect Detection Based on Region and Skeleton Features of Image
Barcode is widely used in commodity circulation.In order to improve the accuracy and efficiency of barcode quality inspection,an algorithm of barcode printing defect detection based on region and skeleton features of image is pro-posed.After the camera collects the barcode image,it uses the template to match and locate the barcode,and carries out image correction according to the affine transformation parameters.Then,through threshold segmentation,connected do-main,closed operation and other processing,the barcode ROI area is obtained.Finally,using the minimum circumscribed rectangle length feature of the region,the rectangle degree feature of the region,and the skeleton feature to successively detect the stripes,identify the defect location and put it in the new region.The production site test shows that the detec-tion success rate of this scheme is 99.2%,and the average time is 51.98 ms.Experimental simulation data also verify that the proposed algorithm is applicable to images from different angles.Compared with other methods,the algorithm in this paper has advantages in recognition accuracy,running speed and robustness,and achieves better detection results.