Font Size: a A A

Inkjet Code Defect Detection Based On Image Processing

Posted on:2022-02-03Degree:MasterType:Thesis
Country:ChinaCandidate:D M LaiFull Text:PDF
GTID:2518306551483064Subject:Control Engineering
Abstract/Summary:PDF Full Text Request
As an important part of the quality and safety of daily life products such as food and medicine,the code of anti-counterfeiting and date code of canned goods directly affects the health and safety of the people.Therefore,the quality and correctness of anti-counterfeiting and date of production are particularly important.But the existing methods of the defects detection of code spraying generally have the following problems: first,when the characters have small spacing and slight adhesion,it is easy to lead to the segmentation or wrong segmentation.Second,the accuracy of the defect identification is not high,and there are many missed inspection,so it is difficult to recognize the slant and distortion of the code spraying area.Third,the deep learning method is used for defect detection.Because of the large network,the training model and defect detection time is more,and the difference between positive and negative sample data sets has a great impact on the training of the detection model.In addition,the hardware requirements of the detection equipment are high,which is not suitable for industrial production scenarios.In view of the above problems,the relevant algorithms are studied,and the relevant algorithms are improved to detect the character defects of the code spraying.The specific work is as follows:(1)The device of collecting the character image of the can code spraying is built,and the high quality image acquisition of the character is realized.The image is enhanced,filtered and ROI region is acquired.The mathematical morphology of the characters,the tilt correction of the characters and the accurate segmentation of the character region are carried out.Through the above operation,the image noise reduction is realized,and the character is enhanced,which is convenient for the subsequent single character segmentation.(2)The paper studies the algorithm of vertical projection segmentation.In view of the current situation that the vertical projection method cannot deal with the problem of too small space between characters and slight adhesion between characters,an improved vertical projection method is proposed to segment characters.Through comparing the calculated character width threshold,it determines whether to segment the characters twice.And a detailed algorithm is designed for the selection of the secondary segmentation points.The location with the least number of projection pixels is selected as the secondary segmentation point in a certain interval,and the better results are obtained.(3)The character recognition is realized by feature extraction of the segmented characters.In view of the feature redundancy,the characters with important semantics are extracted,including character area,character outline circumference,horizontal character pixels of character center point coordinate,number of characters in vertical direction of character center point coordinate,etc.In to solve the problem of poor classifier effect,the extracted features are sent to PSO elm for classification model training to realize character recognition.In this process,the influence of PSO optimization elm parameters on classification results is studied.The best parameters are selected to identify the character jet,and the better character recognition results are obtained.Finally,the information of the can code is detected correctly.(4)A new method for measuring the defects of bottle filling bottle is proposed to improve YOLOv3 neural network model,such as training of inkjet defect detection,serious time consuming and the difference between positive and negative samples.Firstly,the image is preprocessed and labeled by collecting the normal and abnormal code spraying images in the bottle of the industrial camera.Then the labeled data set is sent to the improved YOLOv3 neural network for training.The network is trained by using giou loss and focal Loss improved the original YOLOv3 loss function,reduced the influence of positive and negative sample imbalance on model training,and modified feature extraction network.Darknet-53 was replaced with mobilenet-v3,which reduced network complexity and reduced training and detection time.Finally,the image of the bottle filling and the code injection of the tank to be tested is sent to the trained model to detect the defects.In addition,the MaskRCNN network is studied and applied to the defect detection of inkjet printing.This paper studies the improvement of its network architecture relative to faster r-cnn,and realizes the defect detection and defect region segmentation of inkjet coding through it,which can get better defect detection results,but its detection time is relatively large,so it is not suitable for real-time industrial application.The experimental results show that the improved vertical projection method has achieved good results in the case of slight adhesion and too small character spacing.The accuracy of segmentation is 97.4%.The improved YOLOv3 algorithm is better than the feature extraction classification,character segmentation and template matching based defect detection algorithm.The detection accuracy of YOLOv3 algorithm is 98.20%,which has good robustness.The detection efficiency is also better than the complex deep neural network,the average detection time is 70 ms,and the detection efficiency is higher.
Keywords/Search Tags:Coding Defect, Image preprocessing, Improved vertical projection algorithm, PSO-ELM, Dataset imbalance, YOLOv3, MobileNet-v3, MaskRCNN
PDF Full Text Request
Related items