| Printing defects often occur in the process of document printing,including paper damage,wrinkles,ink leakage,text tilt,unclear text and so on.For a single or a small number of paper,manual detection method is usually used,but in the printing industry,it is often necessary to detect a large number of printed documents.The traditional manual detection method has shortcomings such as lag,low efficiency and high cost.The existing defect detection of printed documents based on image processing is prone to the interference of external environment,such as lighting,image input equipment,etc.,resulting in low accuracy of printing defect detection,which cannot be widely used in practice.Therefore,it is of great significance to develop an automatic defect detection algorithm based on image recognition.Print documents may appear different scales and different characteristics of the defect,so a quality of a printed document detection algorithm is put forword.This algorithm is divided into three parts to print documents defect detection,print documents paper defect detection algorithm respectively,skew and offset printing text detection algorithm,print sharpness detection algorithm.This paper has done valuable research work in these three aspects to solve the problem of defect detection of printed documents.Firstly,an improved Res Net defect detection algorithm for printed paper is proposed in this paper.In order to eliminate the interference of different shapes and backgrounds,the algorithm first extracts and corrects the edges of the printed document image,so as to realize the image preprocessing.By adding channel attention mechanism to the original residual network Res Net34 to improve the learning ability of the network and adding Dropout layer to solve the over-fitting phenomenon,the improved Res Net34 network is obtained,and then the global defects of paper are classified through the improved Res Net34 network.The experimental results show that the classification accuracy of the improved Res Net34 network is3.02% higher than that of the original Res Net34 network.Secondly,aiming at the problem of overall tilt or offset of printing content,a printing content tilt detection algorithm based on linear programming and printing content offset detection algorithm based on projection method is proposed.Print content tilt detection is to combine image binarization and linear programming to get the tilt of each line of text,and then judge whether the whole print content is tilted by counting the tilt of the whole paper.Print offset detection is to get the upper and lower boundaries and left and right boundaries of text by projection method,and then get the upper and left margins.Experimental results show that the skew and offset detection is effective.Finally,aiming at the problem that the printed text is not clear,a printed text sharpness detection algorithm based on twin neural network are proposed.The algorithm firstly split a single character by the horizontal projection and vertical projection method,and then evaluate the consistency in the character images to determine whether a single character definition of qualified based on the twin neural network,lastly to count the clarity of all characters on the paper to determine whether the text is not clear as a whole or partly.Experimental results show that the proposed algorithm can not only detect the global and detail defects of printed documents simultaneously,but also reduce the interference of experimental environment and other external factors,and achieve satisfactory detection results,which has good practical value.Based on the printed text defect detection algorithm proposed,a printed document quality detection system is developed in this paper.The system combines Py Qt to construct the interface,uses QSS to design the interface,and uses Python language to realize the development of various functions in the interface.The system consists of toolbar,main window and status bar.The main window contains the query area,the key area and the result display area.The system mainly includes shooting,detection,statistics,query and other functions,which can realize automatic detection and query of printed documents,and is expected to be applied in practice in the future. |