Search

CN-121998965-A - Nameplate printing defect detection method and system based on image segmentation

CN121998965ACN 121998965 ACN121998965 ACN 121998965ACN-121998965-A

Abstract

The invention provides a method and a system for detecting printing defects of a nameplate based on image segmentation, wherein the method comprises the steps of collecting an image of the surface of the nameplate, and carrying out distortion correction and brightness homogenization pretreatment; the method comprises the steps of generating a pixel-level segmentation mask by utilizing a semantic segmentation network, carrying out template registration and calculating deformation field vectors and registration difference images based on segmentation results, carrying out defect region extraction and type recognition on the difference images, calculating defect area, position and severity scores and carrying out quality judgment.

Inventors

  • HUANG ZILIANG
  • ZHANG WENJIAN

Assignees

  • 东莞市维运电子五金科技有限公司

Dates

Publication Date
20260508
Application Date
20260209

Claims (10)

  1. 1. The method for detecting the printing defects of the nameplate based on the image segmentation is characterized by comprising the following steps of: The method comprises the steps of performing image acquisition and preprocessing, namely deploying an industrial camera at a station of a production line, acquiring an image of the surface of a nameplate under the condition of a constant light source, sequentially performing distortion correction processing and brightness homogenization processing on the image of the surface of the nameplate to obtain a preprocessed image, wherein the distortion correction processing comprises compensation correction on radial distortion and tangential distortion based on camera calibration parameters, and the brightness homogenization processing comprises self-adaptive brightness compensation based on brightness statistics of a local area of the image; Inputting the preprocessed image into a semantic segmentation network, extracting multi-scale features of the preprocessed image through an encoder of the semantic segmentation network to generate a multi-scale feature pyramid, performing cross-layer feature fusion and upsampling reconstruction on the multi-scale feature pyramid through a decoder of the semantic segmentation network, and outputting a pixel level segmentation mask, wherein the pixel level segmentation mask comprises classification marking information of a nameplate pattern region, a text region and a color block region; The template registration contrast step is carried out, namely a standard template image corresponding to the current nameplate is obtained, a spatial correspondence between the preprocessed image and the standard template image is established based on a pixel-level segmentation mask, a deformation field vector is calculated to represent the local displacement of the preprocessed image relative to the standard template image, after the preprocessed image is spatially transformed and aligned according to the deformation field vector, pixel differences between the aligned preprocessed image and the standard template image are calculated, and a registration difference image is generated; Performing defect identification classification, namely performing threshold segmentation and connected domain analysis on the registration difference map, extracting defect areas with obvious differences, performing feature extraction on each defect area, matching with a preset defect type template, and determining a defect type label; And executing quantitative evaluation and judgment, namely calculating the defect area and position coordinates of each identified defect area, calculating severity scores according to the defect area, the defect type and the defect position, comparing and judging according to the severity scores and the product quality standard, and outputting detection result data and defective product rejection signals.
  2. 2. The method for detecting printing defects of a nameplate based on image segmentation according to claim 1, wherein the distortion correction processing comprises performing inverse mapping correction of radial distortion and tangential distortion on each pixel coordinate of the surface image of the nameplate based on a camera internal reference matrix and distortion coefficients obtained by calibration in advance, wherein the range of the radial distortion coefficients is-0.3 to 0.3, and the range of the tangential distortion coefficients is-0.1 to 0.1.
  3. 3. The method for detecting printing defects on a nameplate based on image segmentation as set forth in claim 1, wherein the luminance uniformizing process includes dividing the preprocessed image into a plurality of local areas, calculating an average luminance value of each local area, calculating a luminance compensation amount based on a difference between a global average luminance and the local average luminance, and performing luminance compensation on each local area to achieve luminance uniformization of the entire image, wherein the local area has a size of 32 pixels by 32 pixels to 128 pixels by 128 pixels.
  4. 4. The method of claim 1, wherein the encoder comprises a cascade structure of a plurality of convolution layers and a pooling layer, each convolution layer performs feature extraction using a convolution kernel of 3 times 3, the pooling layer performs feature downsampling using a maximum pooling of 2 times 2, the number of layers of the encoder is 4 to 6, and the number of feature channels increases from 64 to 512 layer by layer.
  5. 5. The method for detecting printing defects of a nameplate based on image segmentation according to claim 1, wherein the generating of the multi-scale feature pyramid comprises the steps of storing a feature map at each downsampling level of an encoder to form a feature pyramid from a shallow layer to a deep layer, wherein the shallow layer feature map retains space detail information, the deep layer feature map contains semantic abstract information, and the layer number of the feature pyramid corresponds to the downsampling times of the encoder.
  6. 6. The method for detecting the printing defect of the nameplate based on the image segmentation according to claim 1, wherein the cross-layer feature fusion comprises the steps of splicing or element-by-element addition fusion of the upsampled features of the current level and the encoder features of the corresponding level in the multi-scale feature pyramid at each upsampled level of the decoder, and feature integration is performed through a convolution layer after the fusion, wherein the cross-layer feature fusion adopts a jump connection mode to realize information transfer between the encoder and the decoder.
  7. 7. The method for detecting printing defects on a nameplate based on image segmentation according to claim 1, wherein calculating deformation field vectors comprises dividing a preprocessed image and a standard template image into a plurality of local windows respectively, calculating displacement offset between the preprocessed image and the standard template image for each local window, and solving the deformation field vectors which minimize registration errors through an iterative optimization algorithm, wherein the local windows are 16 pixels by 16 pixels to 64 pixels by 64 pixels, and the convergence threshold of iterative optimization is 0.01 pixel.
  8. 8. The method for detecting printing defects of a nameplate based on image segmentation according to claim 1, wherein the identification of the overprinting offset comprises judging the overprinting offset according to the statistical characteristics of the deformation field vector, and judging that the overprinting offset defect exists in a specific printing area when the deformation field vector presents an overall translation trend in the area and the translation amount exceeds a set threshold, wherein the judgment threshold of the overprinting offset is 0.1mm to 0.5mm.
  9. 9. The method for detecting the printing defects of the nameplate based on the image segmentation according to claim 1, wherein the defect types comprise printing leakage, printing multiple, overprinting offset, ink splashing, color deviation, pattern blurring and pinhole bubbles, the calculation of the severity score comprises the steps of carrying out weighted summation calculation according to defect areas, defect type weights and defect position weights, wherein the greater the defect areas are, the higher the score is, the defect score weights of key areas of the nameplate are higher than the edge areas, the severity score ranges from 0 to 100 minutes, and the defective products are judged when the severity score exceeds a set quality threshold.
  10. 10. A graphic segmentation-based plate printing defect detection system for implementing the method of any one of claims 1 to 9, the system comprising: The image acquisition module is arranged at a production line station, is provided with an industrial camera and a constant light source and is used for acquiring an image of the surface of the nameplate; The image preprocessing module is connected with the image acquisition module and is used for carrying out distortion correction processing and brightness homogenization processing on the surface image of the nameplate and outputting a preprocessed image; The semantic segmentation module is connected with the image preprocessing module, is configured with a semantic segmentation network and is used for carrying out multi-scale feature extraction and cross-layer feature fusion on the preprocessed image and outputting a pixel-level segmentation mask; The template registration module is connected with the semantic segmentation module and is used for carrying out space alignment on the preprocessed image and the standard template image based on the pixel-level segmentation mask, and calculating a deformation field vector and a registration difference map; The defect identification module is connected with the template registration module and is used for carrying out defect region extraction and defect type identification on the registration difference map and outputting a defect region and a defect type label; the quantitative evaluation module is connected with the defect identification module and used for calculating the defect area, the position coordinates and the severity score, judging the qualification according to the product quality standard and outputting the detection result data and defective product rejection signals.

Description

Nameplate printing defect detection method and system based on image segmentation Technical Field The invention relates to the technical field of computer vision and industrial detection, in particular to a method and a system for detecting printing defects of a nameplate based on image segmentation. Background The plastic nameplate and the hardware nameplate are widely applied to the fields of electronic products, household appliances, automobile parts, industrial equipment and the like, and patterns, characters and color blocks printed on the surfaces of the plastic nameplate and the hardware nameplate directly influence the appearance quality and brand image of the products. In the nameplate production process, various defects are easily generated in the printing process, including missing printing, multiple printing, overprinting offset, ink splashing, color deviation, pattern blurring, pinhole bubbles and the like, the appearance of a product is affected by the defects, and the product function identification is unclear when serious, so that the use experience of a user is affected and even potential safety hazards are caused. At present, the printing quality detection of the nameplate mainly depends on a manual visual inspection mode, and a detector observes the surface of the nameplate through naked eyes to judge whether printing defects exist and classify the printing defects. However, the manual visual inspection has obvious technical bottlenecks that firstly, the manual inspection efficiency is low, the production requirements of large batches and high speed are difficult to meet, the single inspection time is generally different from a few seconds to tens of seconds, secondly, the manual inspection is greatly influenced by subjective factors of inspection staff, missing inspection and false inspection are easy to occur, especially for small defects such as missing printing and overprinting offset, the human eyes are difficult to accurately identify and quantitatively evaluate, furthermore, the visual fatigue of inspection staff is caused by long-time visual inspection operation, the inspection accuracy is further reduced, and in addition, a large number of inspection staff are required to be configured for manual quality inspection of large-batch products, and the labor cost is high. In the prior art, the Chinese patent application with publication number of CN119722674A discloses a high-precision printing quality detection method and system. According to the technical scheme, an image sensor is adopted to collect a printing image, the gray printing image is obtained through boundary segmentation and gray processing, a two-stage registration method of pixel transition sampling and pixel interval sampling is adopted, the image to be detected and a standard template are subjected to pixel-level registration check, and finally defect type matching is performed through a defect matcher to output printing quality data. The technical scheme improves the automation level of printing quality detection to a certain extent, but has the defects that firstly, color information is lost by adopting gray processing, the detection capability of color deviation defects is limited, secondly, pixel transition sampling and separation sampling still belong to a pixel level registration method essentially, understanding of semantic information of a printing area is lacking, feature differences of different printing elements such as patterns, characters and color blocks are difficult to distinguish, thirdly, the calculation complexity of the two-stage registration method is higher, the registration precision is greatly influenced by sampling step length, and fourthly, the defect matcher has limited adaptability to novel defects by adopting a rule matching mode. Therefore, a technology for intelligently detecting the printing defects of the nameplate with high precision and high efficiency is needed to solve the technical problems of insufficient detection precision, missing semantic understanding, poor adaptability and the like in the prior art. Disclosure of Invention The invention provides a nameplate printing defect detection method and a nameplate printing defect detection system based on image segmentation, which are used for solving the technical problems of insufficient printing defect detection precision, lack of semantic level understanding capability, poor adaptability and the like in the prior art. The invention provides an image segmentation-based nameplate printing defect detection method, which comprises the steps of executing image acquisition and preprocessing steps, deploying an industrial camera at a production line station, acquiring a nameplate surface image under a constant light source condition, sequentially carrying out distortion correction processing and brightness homogenization processing on the nameplate surface image to obtain a preprocessed image, executing a semantic segmentation step, i