| Nowadays,no matter the printing industry controlled by the state,such as RMB printing and cigarette label printing,or the flexible packaging industry,such as daily chemicals and books,which dominate the market because of their delicacy,or the label industry,such as batteries,drugs and food,which carry important information on the surface,cannot do without printing test.The effects of print detection directly and indirectly affect our lives.In terms of printing detection,the traditional colorimetric method and density method are too dependent on artificial subjective factors,which cannot meet the industrial testing speed and precision.The continuous updating and development of image processing and vision sensing technology have made machine vision technology mature and widely used in various industrial inspection fields.At the same time,the use of machine vision technology also provides scientific and effective guarantee for printing quality inspection.At the same time,domestic enterprises mostly rely on imported foreign printing and testing equipments,and the huge expenditure and open source cases in the domestic market are so rare.These factors hinder the development of China’s printing industry to a certain extent.Based on the lack of manual detection and the status quo of domestic printing detection,this paper starts with the self-adhesive printed matter in the daily chemical industry,designs and builds a set of online testing platform for printing defect from linear array cameras,light sources,lenses,PCs and motion control.Mainly by detecting stickers printed matter whether there is a printing defect geometry(printing,misting,knives,silk,etc.),size measurement whether meet the tolerance requirements,OCR to zero defect detection area,sums up some printing testing general technical train of thought,the purpose is to provide some help to engaged in printing detection counterparts.Firstly,the experimental test platform was designed and built,and the image acquisition was completed by using the motion control board plus the PU timing belt and the line scan camera.Image processing analyzes the characteristics of image registration algorithms such as gray positioning,geometric positioning and geometric transformation,and compares the advantages and disadvantages of gray positioning and geometric positioning.In this paper,double template geometry is used for image registration.Then,the template method and the layered method defect detection method are introduced.The similarities and differences between the regional background subtraction and the image background subtraction methods are analyzed and compared in the halcon and the former is used to complete the defect detection.Finally,the general process of Blob analysis,measurement and OCR recognition technology is introduced in the key technologies adopted by the project.Finally,the software interface development was completed by Halcon and C#,which realized the detection of shape defects and dimensional defects of printed materials and identified the OCR characters in the defect-free area. |