A printed matter defect online detection method and system based on visual recognition
Patent Information
- Application Number
- CN202610988692.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-09-29
AI Technical Summary
[0003]现阶段,现有方法多以印后图像作为主要判断依据,通常未对同一纸基承印材料在印刷前已有的纤维纹理、压痕纹理、底色突变和纸面污点进行单件化记录;在纸面状态复杂时,这些既有特征容易在印后图像中表现为疑似缺陷,导致误报警、误剔除和错误的印刷参数调整;同时,高速输送还会引起偏摆、滑移和局部错位,使纸面干扰与印后偏差难以准确对应
[0042]1、通过获取纸基待检测承印材料的印前基底图像,并形成单件基底干扰图,使得纤维纹理、压痕纹理、底色突变和纸面污点能够在印刷前被记录,从而解决了现有技术中仅依据印后图像判断缺陷,容易将纸基固有状态误认为印刷缺陷的问题。
Smart Images

Figure CN122841307A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printing inspection technology, specifically to an online method and system for detecting defects in printed materials based on visual recognition. Background Technology
[0002] As packaging printing, label printing, paper box color printing, and commercial invoice printing develop towards higher speeds, continuous processes, and reduced manpower, online defect detection technology for printed materials is gradually shifting from manual sampling to automatic detection based on visual recognition. Online defect detection for printed materials typically uses industrial cameras to acquire post-printed images and compares these images with standard layout images or qualified samples to identify defects.
[0003] Currently, existing methods mostly rely on post-printing images as the primary basis for judgment, and typically do not record the fiber texture, indentation texture, background color abrupt changes, and paper surface stains that already exist on the same paper substrate before printing. When the paper surface condition is complex, these existing features are easily manifested as suspected defects in the post-printing images, leading to false alarms, false rejections, and incorrect printing parameter adjustments. At the same time, high-speed transport can also cause swaying, slippage, and local misalignment, making it difficult to accurately correspond paper surface interference with post-printing deviations. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the technical solution of this invention is as follows:
[0005] A visual recognition-based online defect detection method for printed materials includes the following steps:
[0006] S1. Obtain the pre-press substrate image formed upstream of the printing unit and the post-press image formed downstream of the printing unit for the paper-based substrate to be tested, as well as the standard printing layout corresponding to the current printing task, and establish substrate tracking information for associating the pre-press substrate image and the post-press image. The substrate tracking information includes the substrate tracking number and the transport displacement information.
[0007] S2. Register the standard printed layout image to the post-printed image, and based on the expected ink coverage area, expected blank background area and expected image outline in the standard printed layout image, form a preliminary inspection deviation map in the post-printed image. The preliminary inspection deviation map includes areas with insufficient ink coverage, abnormally connected background areas and outline offset areas, and each deviation area has a deviation source label.
[0008] S3. Extract substrate features that can characterize the paper surface state before printing from the pre-press substrate image to form a single-piece substrate interference map. Based on the substrate tracking information and the boundary position of the paper substrate to be detected in the pre-press substrate image and the post-press image, register the single-piece substrate interference map to the same position in the post-press image.
[0009] S4. In the initial inspection deviation map, the deviation area that matches the single-piece substrate interference map is marked as the substrate-related deviation area. The areas with insufficient ink coverage, abnormal background connectivity, and contour offset areas other than the substrate-related deviation area are identified as false printing defects, excess ink spot defects, and contour geometric defects, respectively. The newly added printing defect detection results are generated. The rejection control instructions are generated based on the substrate-related deviation area and the newly added printing defect detection results. The printing operation control instructions are generated based on the newly added printing defect detection results.
[0010] Furthermore, in S1, the substrate tracking number is generated by the arrival trigger signal upstream of the printing unit, and the transport displacement information is formed by the encoder pulse sequence corresponding to the substrate tracking number;
[0011] The pre-press substrate image, post-press image, standard printed layout image, and encoder pulse sequence are written into the same single-piece inspection record.
[0012] Furthermore, in S2, when the standard printed layout is registered to the post-printed image, the overall position and orientation of the standard printed layout relative to the post-printed image are first determined based on the layout positioning marks in the standard printed layout.
[0013] Then, the offset of the printing material is corrected based on the boundary corner points of the paper-based printing material to be tested in the post-printing image, and the local page offset is corrected based on the graphic feature points in the post-printing image.
[0014] Furthermore, in S2, the initial inspection deviation map includes an ink coverage deviation layer, a background contamination deviation layer, and a contour geometry deviation layer;
[0015] The desired ink coverage area, desired blank background area, and desired image / text outline in the standard printed layout are respectively mapped to the printed image;
[0016] In the image region corresponding to the desired ink coverage area, the image region with ink coverage intensity lower than the desired coverage intensity is written into an ink coverage deviation layer;
[0017] In the image region corresponding to the expected blank background region, the image region where a new connected component appears is written into the background contamination deviation layer;
[0018] In the image region corresponding to the desired graphic contour, the image region where the actual graphic edge is normally offset relative to the desired graphic contour is written into the contour geometry deviation layer;
[0019] The image areas written into the ink coverage deviation layer, background contamination deviation layer, and contour geometry deviation layer are all associated with deviation source labels and layout coordinates.
[0020] Furthermore, in S3, the single-piece substrate interference map includes a fiber texture interference layer, an indentation texture interference layer, a background color abrupt change interference layer, and a paper surface stain interference layer for writing substrate features;
[0021] The fiber texture interference layer records the texture direction and texture density of the fiber texture region;
[0022] The indentation texture interference layer records the center line and period of the indentation texture area;
[0023] The background color mutation interference layer records the direction and magnitude of grayscale mutations in the background color mutation region.
[0024] The paper stain interference layer records the regional outline and grayscale distribution of the paper stain area;
[0025] Each substrate interference region in the single-piece substrate interference diagram corresponds to the paper coordinates in the pre-press substrate image.
[0026] Furthermore, in S3, registering the single-piece substrate interference map to the same position in the printed image includes: determining the initial displacement of the single-piece substrate interference map relative to the transport direction of the printed image based on the encoder pulse sequence;
[0027] The leading edge position, side position, and boundary tilt angle of the paper-based substrate to be tested are obtained in the pre-printing substrate image and the post-printing image, respectively, and the initial displacement in the conveying direction is corrected accordingly.
[0028] When the indentation texture region has a stable indentation period, the registration position after boundary correction is locally aligned based on the phase difference of the indentation period in the pre-printed substrate image and the post-printed image to obtain the same piece position; when the indentation texture region does not have a stable indentation period, the registration position after boundary correction is locally aligned based on the graphic feature points in the post-printed image and the contour of the substrate interference region in the single-piece substrate interference image to obtain the same piece position.
[0029] Furthermore, in S4, a substrate matching calculation is performed on the deviation area in the initial inspection deviation diagram and the substrate interference area in the single-piece substrate interference diagram.
[0030] Basis matching calculation involves weighting positional overlap, contour similarity, grayscale distribution similarity, and texture orientation consistency to obtain the basis matching value;
[0031] When the base matching value reaches the first base matching threshold corresponding to the interference layer to which the base interference region to which the matching is located belongs, the corresponding deviation region is marked as the base-associated deviation region.
[0032] Furthermore, in S4, the base association deviation area has a base association quality score, which is determined based on the area of the base association deviation area, the deviation source label corresponding to the base association deviation area, the base matching value corresponding to the base association deviation area, and the layout area weight.
[0033] The review risk score is determined based on the quality score of the basis correlation and the deviation intensity of the basis correlation deviation zone. When the review risk score reaches the review risk threshold, the basis correlation deviation zone is written into the review candidate zone.
[0034] After excluding the substrate-related deviation area, the image area that remains in the ink coverage deviation layer forms a false printing defect; the image area that remains in the background contamination deviation layer forms an excess ink spot defect; and the image area that remains in the contour geometry deviation layer forms a line bending defect.
[0035] The severity of the printing defect is determined based on the ink coverage loss rate and the weight of the printing area.
[0036] The severity of the excess ink spot defect is determined based on the area of newly added connected components, the number of newly added connected components, and the weight of the page area.
[0037] The severity of line bending defects is determined based on the normal offset, the continuous length of the offset, and the weight of the page area.
[0038] Furthermore, in S4, the rejection control command is generated according to the rejection trigger time, which is determined based on the distance between the post-printing image acquisition position and the rejection mechanism, the conveying speed of the paper-based printing substrate to be inspected, and the response delay of the rejection mechanism.
[0039] The rejection control command is determined by the substrate-associated quality score, the review candidate area, the severity of the false print, the severity of the ink spot, and the severity of the line curvature according to a preset rejection threshold rule. The printing operation control command is determined by the severity of the false print, the severity of the ink spot, and the severity of the line curvature according to a preset operation control threshold rule, and includes an ink supply adjustment command, a cleaning mechanism start command, and a correction adjustment command.
[0040] A visual recognition-based online defect detection system for printed materials includes a single-piece image acquisition module, a layout deviation detection module, a substrate interference modeling module, and a defect diversion control module.
[0041] The beneficial effects of this invention are as follows:
[0042] 1. By acquiring a pre-press substrate image of the paper-based printing material to be tested and forming a single-piece substrate interference map, fiber texture, indentation texture, background color abrupt change and paper surface stains can be recorded before printing. This solves the problem in the prior art that defects are judged based solely on post-press images, which easily leads to mistaking the inherent state of the paper substrate for printing defects.
[0043] 2. By using the tracking information of the printing material and the boundary position of the paper substrate to be tested, the single-piece substrate interference map is registered to the same position in the post-printing image, so that the pre-printing paper surface features can establish an accurate correspondence with the post-printing deviation area, thereby solving the problem that substrate interference is difficult to accurately eliminate after the high-speed paper conveying causes swaying, slippage and local misalignment in the existing technology.
[0044] 3. By matching the deviation area in the initial inspection deviation diagram with the single-piece substrate interference diagram, and distinguishing the substrate-related deviation area from the false printing defect item, the excess ink spot defect item, and the line bending defect item, the existing interference of the paper substrate and the newly added defects in the current printing can be separated, thereby solving the problems of false rejection, false alarm and erroneous triggering of printing operation control in the existing technology. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the online detection hardware layout of the present invention;
[0046] Figure 2 This is a schematic diagram of the printing material tracking information and single-piece inspection record of the present invention. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] Example 1
[0049] Please see Figure 1 and Figure 2 This invention provides an online defect detection method for printed materials based on visual recognition, comprising the following steps:
[0050] S1. Obtain the pre-press substrate image formed upstream of the printing unit and the post-press image formed downstream of the printing unit for the paper-based substrate to be tested, as well as the standard printing layout corresponding to the current printing task, and establish substrate tracking information for associating the pre-press substrate image and the post-press image. The substrate tracking information includes the substrate tracking number and the transport displacement information.
[0051] S2. Register the standard printed layout image to the post-printed image, and based on the expected ink coverage area, expected blank background area and expected image outline in the standard printed layout image, form a preliminary inspection deviation map in the post-printed image. The preliminary inspection deviation map includes areas with insufficient ink coverage, abnormally connected background areas and outline offset areas, and each deviation area has a deviation source label.
[0052] S3. Extract substrate features that can characterize the paper surface state before printing from the pre-press substrate image to form a single-piece substrate interference map. Based on the substrate tracking information and the boundary position of the paper substrate to be detected in the pre-press substrate image and the post-press image, register the single-piece substrate interference map to the same position in the post-press image.
[0053] S4. In the initial inspection deviation map, the deviation area that matches the single-piece substrate interference map is marked as the substrate-related deviation area. The areas with insufficient ink coverage, abnormal background connectivity, and contour offset areas other than the substrate-related deviation area are identified as false printing defects, excess ink spot defects, and contour geometric defects, respectively. The newly added printing defect detection results are generated. The rejection control instructions are generated based on the substrate-related deviation area and the newly added printing defect detection results. The printing operation control instructions are generated based on the newly added printing defect detection results.
[0054] In this embodiment, the online inspection scenario for corrugated paper packaging printing is applied. The paper substrate to be inspected passes sequentially along the conveying direction through the pre-press image acquisition position, the printing unit, the post-press image acquisition position, and the rejection mechanism. The pre-press image acquisition position is equipped with a first industrial camera and a first strip light source, and the post-press image acquisition position is equipped with a second industrial camera and a second strip light source. An alignment sensor is installed upstream of the printing unit, and an encoder is installed on the conveying roller. The first industrial camera, the second industrial camera, the alignment sensor, and the encoder are all communicatively connected to the image processing industrial control computer. The acquisition width of both the first and second industrial cameras covers the effective printing area of the paper substrate to be inspected. The conveying displacement resolution of the encoder is set to 0.05 mm / pulse. The image processing industrial control computer pre-stores the standard printing layout image corresponding to the current printing task. The standard printing layout image includes the desired ink coverage area, the desired blank background area, and the desired graphic outline.
[0055] It should be noted that all values in this embodiment and all embodiments are exemplary parameters used to illustrate the specific implementation process of this embodiment, and are not intended to limit the scope of protection of this invention. Without departing from the technical concept of this invention, those skilled in the art can make adaptive adjustments to the above exemplary parameters according to the surface texture characteristics of the printing material, the accuracy requirements of the printed image, the image acquisition resolution, the conveying speed, and the response time of the rejection mechanism.
[0056] When the leading edge of the paper-based substrate to be inspected reaches the prepress image acquisition position upstream of the printing unit, the positioning sensor generates a positioning trigger signal. The image processing industrial control computer generates a substrate tracking number based on the positioning trigger signal. The first industrial camera acquires the prepress substrate image of the paper-based substrate to be inspected, and the encoder synchronously records the encoder pulse sequence from the prepress image acquisition position to the postpress image acquisition position. When the paper-based substrate to be inspected passes through the printing unit and reaches the postpress image acquisition position, the second industrial camera acquires the postpress image. The image processing industrial control computer writes the substrate tracking number, the prepress substrate image, the postpress image, the standard printing layout, and the encoder pulse sequence into the same single-piece inspection record, thereby forming substrate tracking information used to associate the prepress substrate image and the postpress image.
[0057] Among them, the printing material tracking information refers to the data set used to confirm the correspondence between the same paper-based printing materials to be tested in the upstream and downstream of the printing unit. It includes at least the printing material tracking number and the transport displacement information. Its function is to avoid incorrectly associating the pre-press substrate images and post-press images of different papers, and to ensure the authenticity of "single-piece comparison" from the data source.
[0058] The image processing industrial control computer performs lens distortion correction, brightness equalization, and paper boundary extraction on the post-printed image. Then, based on the page positioning marks in the standard printed page layout, it determines the initial position and orientation of the standard printed page layout relative to the post-printed image. Next, it corrects the initial position and orientation based on the paper boundary corner points in the post-printed image, and corrects local page offsets based on the graphic corner points, barcode edges, and text stroke endpoints in the post-printed image, thereby registering the standard printed page layout to the post-printed image. After registration, the desired ink coverage area, desired blank background area, and desired graphic outline in the standard printed page layout are mapped to their corresponding positions in the post-printed image, so that the standard page coordinates and the post-printed image coordinates have a unified calculation benchmark.
[0059] When generating the initial inspection deviation map, the image processing industrial control computer calculates the actual ink coverage intensity within the image region corresponding to the desired ink coverage area. When the actual ink coverage intensity is less than 18% of the desired coverage intensity and the continuous area is greater than 0.18 mm², the image region is written into the insufficient ink coverage area and assigned an ink coverage deviation label. New connected components are detected within the image region corresponding to the desired blank background area. When the grayscale difference between the new connected component and the background grayscale mean exceeds 2.6 times the background grayscale standard deviation and the connected area is greater than 0.12 mm², the image region is written into the background abnormal connected region and assigned a background contamination deviation label. The actual image / text edges are extracted within the image region corresponding to the desired image / text contour. When the normal offset of the actual image / text edge relative to the desired image / text contour is greater than 0.09 mm and the continuous offset length is greater than 1.4 mm, the image region is written into the contour offset region and assigned a contour geometric deviation label. The initial inspection deviation map is formed by the insufficient ink coverage area, the background abnormal connected region, and the contour offset region.
[0060] The initial deviation map refers to the deviation expression result obtained after registering the standard printed image to the post-printed image. It is not the final defect result, but rather a structured record of areas with insufficient ink coverage, abnormally connected background areas, and contour offset areas as candidate deviations. Its function is to transform complex post-printed images into calculable objects with deviation source labels, providing a unified data entry point for subsequent substrate interference diversion.
[0061] The image processing industrial control computer extracts substrate features from the pre-press substrate image. First, multi-directional filtering is used to obtain the fiber texture response map, and the region with the response intensity exceeding the fiber texture threshold and having a continuous main direction is identified as the fiber texture region. Then, the gray-level periodic response is calculated along the conveying direction, and the dark texture region with the periodic stability reaching the indentation stability threshold is identified as the indentation texture region. Subsequently, local mean difference is used to obtain the background color change region, and the paper surface stain region is obtained by using the connected domain boundary closure and gray-level stability. The fiber texture region, indentation texture region, background color change region, and paper surface stain region are all written into the single-piece substrate interference map with paper coordinates, region mask, region contour, gray-level descriptor, texture direction descriptor, and confidence field. The corresponding interference layer where no effective substrate features are detected is retained as an empty layer.
[0062] A single-piece substrate interference map refers to individualized substrate reference data established for the paper surface state that already exists before printing on the same paper substrate to be tested. It can be composed of substrate features such as fiber texture, indentation texture, background color abrupt change, and paper surface stains. Its function is to distinguish it from traditional fixed background templates or average background templates, so that the system can identify "visual interference that already exists on this paper itself".
[0063] When registering the single-piece substrate interference map to the same position in the post-printing image, the image processing industrial control computer calculates the initial displacement of the paper substrate to be tested in the conveying direction from the pre-printing image acquisition position to the post-printing image acquisition position based on the encoder pulse sequence and encoder displacement resolution. Then, the leading edge position, side position and boundary tilt angle of the paper substrate to be tested in the pre-printing substrate image and the post-printing image are obtained respectively, and the initial displacement in the conveying direction is corrected accordingly. For corrugated paper with stable indentation texture, the indentation period phase difference of the indentation texture area in the pre-printing substrate image and the post-printing image is further compared, and the registration position after boundary correction is locally corrected according to the indentation period phase difference, thereby obtaining the same position of the single-piece substrate interference map in the post-printing image.
[0064] In the absence of stable indentation texture or when the indentation texture is covered by post-printing ink and cannot form a reliable phase difference, the image processing industrial control computer prioritizes local isotopic correction using graphic feature points in the post-printing image, the outline of the paper stain area, and the direction of high-confidence fiber texture. Specifically, within the local search range after boundary correction, a high-confidence base interference area is selected as an auxiliary corresponding point, and the same position is obtained by local affine transformation or bilinear mesh correction.
[0065] During the baseline correlation and splitting process, the image processing industrial control computer matches each deviation region in the initial deviation map with the baseline interference region located at the same position in the single-piece baseline interference map, and calculates the baseline matching value M. The baseline matching value M is obtained by weighting the positional overlap degree P, contour similarity C, gray-level distribution similarity G, and texture direction consistency T according to preset weights. The preset weights can be a general weight configuration or a layered weight configuration called according to the interference layer to which the baseline interference region to be matched belongs. When a general weight configuration is used, M = 0.35P + 0.25C + 0.20G + 0.20T In the deviation region corresponding to the desired ink coverage area, if the ink coverage causes the grayscale distribution similarity G to be unstable, the weight of G is reduced and the released weight is allocated to P and C. When the substrate interference region participating in the matching belongs to the fiber texture interference layer, indentation texture interference layer, background color mutation interference layer and paper surface stain interference layer, the first substrate matching threshold is set to 0.74, 0.78, 0.72 and 0.80 respectively. When the substrate matching value reaches the first substrate matching threshold corresponding to the interference layer to which the substrate interference region participating in the matching belongs, the corresponding deviation region is marked as the substrate associated deviation region.
[0066] The substrate-related deviation area refers to the deviation area in the initial inspection deviation map that has a matching relationship with the single-piece substrate interference map in dimensions such as position, outline, gray scale distribution, and texture direction. Its function is to divert inherent problems of the paper substrate from newly added defects in printing, and to avoid incorrectly attributing the paper's own stains, indentations, and uneven background color to ink supply, cleaning, or correction abnormalities.
[0067] The image processing industrial control computer identifies areas with insufficient ink coverage (excluding the substrate correlation deviation area) as blank printing defects, abnormal connected background areas (excluding the substrate correlation deviation area) as redundant ink dot defects, and contour offset areas (excluding the substrate correlation deviation area) as line bending defects. Based on these defects, it generates new printing defect detection results. Among them, blank printing defects record the ink coverage loss rate, loss area, and location on the printing plate; redundant ink dot defects record the area, number, and location on the printing plate; and line bending defects record the normal offset, continuous offset length, and location on the printing plate.
[0068] The newly added printing defect detection results refer to the detection results formed by the remaining areas of insufficient ink coverage, abnormal background connectivity, and contour offset areas after excluding the substrate-related deviation area. Its function is to ensure that subsequent printing operation control commands are only driven by newly added problems in the actual printing process, thereby reducing incorrect machine adjustments, incorrect cleaning, and incorrect corrections.
[0069] The image processing industrial control computer generates rejection control instructions based on the substrate correlation deviation area and the detection results of newly added printing defects. Specifically, when the substrate correlation deviation area is located in a key area of the barcode area, text recognition area, or trademark area and the substrate correlation quality score reaches the rejection level, the rejection trigger time is calculated and a rejection control instruction is output to the rejection mechanism. When any of the defects, such as false printing defects, excess ink spot defects, and line bending defects, reaches the rejection level, the rejection trigger time is calculated and a rejection control instruction is output to the rejection mechanism. The rejection trigger time is determined based on the distance between the post-printing image acquisition position and the rejection mechanism, the conveying speed of the paper substrate to be inspected, and the response delay of the rejection mechanism. The substrate correlation quality score is determined based on the area of the substrate correlation deviation area, the weight of the area where it is located, and the substrate matching value.
[0070] The image processing industrial control computer also generates printing operation control commands based on the detection results of newly added printing defects. Specifically, when at least 6 out of 20 consecutive paper-based printing materials to be inspected have a false printing defect in the same ink supply area with a severity exceeding the ink supply adjustment threshold, an ink supply adjustment command is generated; when at least 5 out of 20 consecutive paper-based printing materials to be inspected have an excess ink spot defect with a severity exceeding the cleaning start threshold, a cleaning mechanism start command is generated; when at least 4 out of 20 consecutive paper-based printing materials to be inspected have a line bending defect with a severity exceeding the correction adjustment threshold, a correction adjustment command is generated. The printing operation control commands are not triggered separately by the substrate-related deviation area, thereby avoiding the erroneous feedback of paper surface stains, indentations, and background color changes that already exist on the paper-based printing materials before printing as printing unit anomalies.
[0071] Example 2
[0072] Please refer to Figure 1 and Figure 2 Specifically: In S1, the substrate tracking number is generated by the arrival trigger signal upstream of the printing unit, and the transport displacement information is formed by the encoder pulse sequence corresponding to the substrate tracking number;
[0073] The pre-press substrate image, post-press image, standard printed layout image, and encoder pulse sequence are written into the same single-piece inspection record.
[0074] In this embodiment, based on Embodiment 1, the method for establishing the tracking information of the printing material is further explained; when the leading edge of the paper-based printing material to be detected passes the positioning sensor upstream of the printing unit, the positioning sensor sends a positioning trigger signal to the image processing industrial control computer. The image processing industrial control computer generates a tracking number of the printing material with the current printing task number and the incrementing sequence number, and records the current pulse value of the encoder corresponding to the positioning trigger signal as the starting pulse value.
[0075] After generating the printing material tracking number, the image processing industrial control computer triggers the first industrial camera to acquire the pre-press substrate image and writes the pre-press substrate image into the cache record corresponding to the printing material tracking number. During the continued conveying of the paper-based printing material to be inspected, the encoder continuously outputs encoder pulses. The image processing industrial control computer records the encoder pulse sequence, which starts from the initial pulse value and is bound to the printing material tracking number, as the conveying displacement information.
[0076] When the cumulative transport displacement corresponding to the encoder pulse sequence reaches the calibrated distance between the pre-press image acquisition position and the post-press image acquisition position, the image processing industrial control computer calls the cache record corresponding to the tracking number of the printing material and triggers the second industrial camera to acquire the post-press image. After the acquisition is completed, the image processing industrial control computer writes the pre-press substrate image, the post-press image, the standard printing plate image corresponding to the current printing task, and the encoder pulse sequence into the same single-piece detection record, so that the pre-press image data, post-press image data, and transport displacement data of the same paper substrate to be tested have a unique correspondence.
[0077] In this embodiment, the single-item detection record includes at least the substrate tracking number, the pre-press substrate image file address, the post-press image file address, the standard printing layout file address, the starting pulse value, the post-press acquisition pulse value, and the encoder pulse sequence. For example, if the substrate tracking number of a certain paper-based substrate to be detected is A-000238, the starting pulse value is 125604, and the post-press acquisition pulse value is 137482, then the encoder pulse sequence corresponding to A-000238 is the pulse data between 125604 and 137482. The image processing industrial control computer determines the transport displacement of the paper-based substrate to be detected between the pre-press image acquisition position and the post-press image acquisition position based on this.
[0078] Example 3
[0079] Please refer to Figure 1 and Figure 2 Specifically: In S2, when the standard printed layout is registered to the post-printed image, the overall position and orientation of the standard printed layout relative to the post-printed image are first determined based on the layout positioning marks in the standard printed layout.
[0080] Then, the offset of the printing material is corrected based on the boundary corner points of the paper-based printing material to be tested in the post-printing image, and the local page offset is corrected based on the graphic feature points in the post-printing image.
[0081] In S2, the initial inspection deviation map includes an ink coverage deviation layer, a background contamination deviation layer, and a contour geometry deviation layer;
[0082] The desired ink coverage area, desired blank background area, and desired image / text outline in the standard printed layout are respectively mapped to the printed image;
[0083] In the image region corresponding to the desired ink coverage area, the image region with ink coverage intensity lower than the desired coverage intensity is written into an ink coverage deviation layer;
[0084] In the image region corresponding to the expected blank background region, the image region where a new connected component appears is written into the background contamination deviation layer;
[0085] In the image region corresponding to the desired graphic contour, the image region where the actual graphic edge is normally offset relative to the desired graphic contour is written into the contour geometry deviation layer;
[0086] The image areas written into the ink coverage deviation layer, background contamination deviation layer, and contour geometry deviation layer are all associated with deviation source labels and layout coordinates.
[0087] In this embodiment, based on Embodiments 1 and 2, the process of registering the standard printing plate image to the post-printing image and generating the initial inspection deviation image is further explained. The threshold, weight coefficient, size and quantity parameters listed in this embodiment are used to illustrate a specific feasible method. Those skilled in the art can make adaptive adjustments according to camera resolution, printing accuracy, substrate type and production line process tolerance.
[0088] The standard printing layout is generated from the digital layout file of the current printing task. The digital layout file is pre-marked with layout positioning marks, expected ink coverage areas, expected blank background areas, and expected graphic outlines. The layout positioning marks include positioning color blocks located near the four corners of the layout, barcode bounding boxes, text reference stroke endpoints, and trademark outline corner points. After reading the standard printing layout, the image processing industrial control computer establishes a layout coordinate system and obtains the pixel equivalent between the image coordinate system and the layout coordinate system in advance based on the camera calibration board. The pixel equivalent is used to convert the pixel distance in the printed image into the actual layout distance.
[0089] When determining the overall position and orientation of the standard printed layout relative to the post-printed image, the image processing industrial control computer first reads the layout coordinates of each layout positioning mark from the standard printed layout, and then extracts the actual positioning features corresponding to the layout positioning marks from the post-printed image. Among them, the positioning color block is determined by color threshold segmentation and minimum bounding rectangle to determine the actual color block center; the barcode bounding box is determined by edge detection and straight line intersection calculation to determine the actual boundary corner point; the text reference stroke endpoints are determined by skeletonization processing and endpoint search to determine the actual stroke endpoints; and the trademark outline corner points are determined by outline curvature extreme value search to determine the actual outline corner points. The image processing industrial control computer uses the layout coordinates of the above-mentioned layout positioning marks as the first reference point set and the image coordinates of the actual positioning features extracted from the post-printed image as the second reference point set.
[0090] The image processing industrial control computer calculates the initial affine transformation matrix based on the first and second reference point sets. The initial affine transformation matrix is used to characterize the overall translation, overall rotation angle, and overall scaling of the standard printed layout image relative to the printed image. In this embodiment, the image processing industrial control computer first uses the least squares method to solve the initial affine transformation matrix, and then calculates the residual of each set of reference points after mapping by the initial affine transformation matrix. When the residual of a certain set of reference points is greater than 0.18mm, the set of reference points is discarded as abnormal reference points and the initial affine transformation matrix is solved again. 0.18mm is obtained by statistically analyzing the camera pixel equivalent, the edge extraction error of the positioning color block, and the layout positioning fluctuation in the qualified samples. Its function is to avoid the overall registration result being misaligned when local ink stains obscure the positioning marks.
[0091] When correcting the offset of the printing material based on the boundary corner points of the paper-based printing material in the post-printed image, the image processing control computer first performs background segmentation on the post-printed image to obtain a paper area mask. Then, it performs edge tracking on the paper area mask to obtain the leading edge, trailing edge, and two side edges of the paper-based printing material. Subsequently, it calculates the intersection of adjacent edge lines as boundary corner points and determines the boundary tilt angle based on the angle between the leading edge line and the horizontal baseline of the image. When the boundary tilt angle reaches 0.12°, the image processing control computer performs offset correction on the initial affine transformation matrix based on the boundary corner points. The 0.12° is determined by the paper conveying offset statistics in qualified samples and the coordinate error of the edge area of the printing plate. When the boundary tilt angle is less than 0.12°, the mapping error is usually less than the actual size corresponding to one detection pixel. When the boundary tilt angle reaches 0.12°, the edges of the desired ink coverage area and the desired blank background area will show systematic misalignment that can affect the deviation judgment.
[0092] When correcting local layout offsets based on graphic feature points in the post-printed image, the image processing industrial control computer extracts graphic feature points from the post-printed image after offset correction. Graphic feature points include the endpoints of text strokes, the intersections of barcode edges, the turning points of graphic outlines, and the inner corners of trademarks. The image processing industrial control computer searches for standard graphic feature points corresponding to the above graphic feature points in the standard printed layout image and calculates the local offset vector between each set of corresponding feature points. When the average offset of no less than 5 sets of corresponding feature points in the same local area reaches 0.06mm, a grid correction unit is established in that local area, and bilinear interpolation correction is performed on the coordinate transformation relationship after offset correction based on the local offset vector. 0.06mm is jointly determined by normal local overprinting fluctuations in the standard sample, camera resolution, and repeatability error of graphic edge extraction. Its function is to correct only the local offsets that are sufficient to affect the writing position of the offset layer, avoiding over-correction caused by individual edge noise.
[0093] After determining the overall position and orientation, correcting the printing material sway, and correcting local page offsets, the image processing industrial control computer obtains the final coordinate transformation relationship. Based on the final coordinate transformation relationship, it maps the desired ink coverage area, desired blank background area, and desired image / text outline in the standard printing page layout to the post-printed image. The desired ink coverage area forms an ink detection mask after mapping, the desired blank background area forms a background detection mask after mapping, and the desired image / text outline forms a outline detection baseline after mapping. The ink detection mask, background detection mask, and outline detection baseline all carry page coordinates, image coordinates, and corresponding printing task numbers for subsequent initial inspection deviation map layering.
[0094] When generating the initial inspection deviation map, the image processing industrial control computer sets the initial inspection deviation map as a multi-layer data structure including an ink coverage deviation layer, a background contamination deviation layer, and a contour geometry deviation layer. Each deviation layer includes a region mask field, a page coordinate field, an image coordinate field, a deviation area field, a deviation intensity field, and a deviation source label field. The deviation source label field is used to distinguish whether the deviation area originates from insufficient ink coverage, added ink in the background, or contour position offset, so that the corresponding matching rules can be adopted for different deviation sources when matching the subsequent single-piece substrate interference map.
[0095] When forming the ink coverage deviation layer, the image processing industrial control computer calculates the actual ink coverage intensity K in the image area corresponding to the ink detection mask. The actual ink coverage intensity K is determined by the normalized color density D, normalized saturation S, and normalized grayscale contrast R. Among them, D is obtained by the ratio between the target color channel density of the ink area in the printed image and the target color channel density of the corresponding ink area in the qualified standard sample; S is obtained by the ratio between the HSV color space saturation of the ink area in the printed image and the HSV color space saturation of the corresponding ink area in the qualified standard sample; and R is obtained by the ratio between the grayscale difference between the ink area and the adjacent blank background area in the printed image and the corresponding grayscale difference in the qualified standard sample. D is used to reflect the actual ink coverage, S is used to reflect the ink color saturation, and R is used to reflect the visible contrast of the ink relative to the paper background.
[0096] In this embodiment, the actual ink coverage intensity K satisfies K=0.50D+0.30S+0.20R. The above weighting coefficients are determined by the calibration sample set, which includes standard samples with qualified printing quality and defect samples with manual marking of false printing defects. The image processing industrial control computer calculates the distinguishing contribution of D, S and R to the manually reviewed ink coverage status. The statistical results show that D has the highest distinguishing contribution to false printing defects, followed by S. R is easily affected by changes in the paper background color and has a low contribution. Therefore, the weights of D, S and R are set to 0.50, 0.30 and 0.20, respectively, so that the actual ink coverage intensity K reflects the actual ink coverage first, while retaining the auxiliary role of color saturation and background contrast in false printing identification.
[0097] When determining areas with insufficient ink coverage, the image processing control computer first statistically analyzes the coverage intensity distribution of the expected ink coverage area from qualified standard samples, and uses the average coverage intensity of the corresponding area of the qualified standard samples as the expected coverage intensity. Then, it statistically analyzes the decrease in the defect area relative to the expected coverage intensity in manually labeled false printing defect samples. When the actual ink coverage intensity K is more than 18% lower than the expected coverage intensity, the false printing area and the qualified ink area have stable distinguishability. In order to avoid isolated false detections caused by paper fiber burrs and single-pixel imaging noise, the continuous area threshold is set to 0.18 mm² based on the camera pixel equivalent and the minimum visible false printing area. Therefore, when the actual ink coverage intensity in the image area corresponding to the expected ink coverage area is more than 18% lower than the expected coverage intensity and the continuous area reaches 0.18 mm², the image area is written into the ink coverage deviation layer and assigned an ink coverage deviation label.
[0098] When forming the background contamination deviation layer, the image processing industrial control computer calculates the mean background gray value μ and the standard deviation of background gray value σ in the image area corresponding to the background detection mask. The mean background gray value μ and the standard deviation of background gray value σ are jointly determined by the blank background area of the current batch of paper base to be tested printing material and the unprinted paper base calibration sample. When the difference between the gray value of a certain pixel and the mean background gray value μ reaches 2.6σ, the pixel has a significant deviation from the normal background color fluctuation of the paper surface. Using 2.6σ as the background anomaly extraction threshold can preserve the tolerance of the natural unevenness of the paper base color, fiber texture and lighting noise, and avoid directly writing the normal paper surface texture into the background contamination deviation layer.
[0099] When identifying abnormal connected regions in the background, the image processing industrial control computer performs connected component analysis on abnormal pixels reaching 2.6σ, and calculates the area, color density, and boundary closure of each connected component. When the area of a certain connected component reaches 0.12 mm... 2 When the color density is higher than that of the corresponding background area, the connected region is written into the background contamination deviation layer and a background contamination deviation label is assigned. The 0.12mm² area is determined based on the post-printing image acquisition resolution, the minimum identifiable ink dot diameter, and the results of manual verification. Connected regions smaller than this area mainly correspond to fiber dark spots, local reflection changes, and camera noise. Connected regions larger than this area and with increased color density are more consistent with the appearance characteristics of excess ink dots.
[0100] When forming the contour geometric deviation layer, the image processing industrial control computer first establishes a contour detection neighborhood based on the standard line width W corresponding to the contour detection baseline. The width of the contour detection neighborhood is set to 1.5W and not less than 0.30mm. Here, 1.5W is used to cover the normal printing edges, slight misregistration deviations, and possible offset ranges of line curvature. 0.30mm is used to ensure that fine lines, fine text, and small font sizes have sufficient edge search range. The above neighborhood width is jointly determined by the normal edge fluctuation range in qualified standard samples and the line offset distribution in defective samples, so that the actual graphic edges can be stably extracted and the background ink dots far from the expected graphic contours are reduced from entering the contour geometric deviation judgment.
[0101] In the process of judging contour geometric deviation, the image processing industrial control computer extracts the actual image and text edges in the contour detection neighborhood and calculates the normal offset of the actual image and text edges from the contour detection baseline. The normal offset is the distance of the actual edge point along the normal direction of the contour detection baseline relative to the contour detection baseline. The continuous offset length is the length of adjacent actual edge points that continuously meet the offset condition in the contour tangent direction. In the calibration samples, the normal fluctuation of the normal edge of qualified samples is mainly concentrated within 0.05mm, the slight acceptable offset is mainly below 0.08mm, and the defective samples judged by manual as curved lines usually reach more than 0.09mm. When the continuous offset length exceeds 1.4mm, the visual visibility is significantly enhanced. Therefore, the normal offset threshold is set to 0.09mm and the continuous offset length threshold is set to 1.4mm. When the actual image and text edge undergoes the above-mentioned normal offset relative to the expected image and text contour, the image area is written into the contour geometric deviation layer and assigned a contour geometric deviation label.
[0102] To ensure that the initial deviation map can be directly used in the subsequent single-piece substrate interference map matching step, the image processing industrial control computer generates a unique deviation number for each deviation area when writing the ink coverage deviation layer, background contamination deviation layer, and contour geometry deviation layer. The unique deviation number is bound to the printing material tracking number, deviation source label, plate coordinates, image coordinates, area mask, deviation area, and deviation intensity. The plate coordinates indicate the position of the deviation area in the standard printed plate image, the image coordinates indicate the position of the deviation area in the post-printed image, and the deviation source label is used to indicate that the deviation area comes from the corresponding deviation layer among the ink coverage deviation layer, background contamination deviation layer, and contour geometry deviation layer.
[0103] In a specific test of this embodiment, four positioning color block centers, four barcode boundary corner points, six character stroke endpoints, and three trademark outline corner points were extracted from the post-printing image corresponding to the paper-based printing material with tracking number A-000238. Based on the above actual positioning features, the image processing industrial control computer calculated that the overall rotation angle of the standard printed layout image relative to the post-printing image was 0.31°, the horizontal translation was 1.26mm, and the vertical translation was 0.84mm. After boundary corner point sway correction, the sway angle of the printing material was corrected from 0.31° to 0.07°. After local correction of the graphic feature points, the local average offset of the layout was reduced from 0.11mm to 0.04mm.
[0104] Based on the above registration results, the image processing industrial control computer generates an initial inspection deviation map from the printed image. Among them, the ink coverage deviation layer writes three areas with insufficient ink coverage, with areas of 0.24mm², 0.39mm², and 0.21mm², respectively; the background contamination deviation layer writes two abnormal connected background areas, with areas of 0.16mm² and 0.28mm², respectively; and the contour geometry deviation layer writes one contour offset area with a maximum normal offset of 0.13mm and a continuous offset length of 2.2mm. The above six deviation areas are all written with corresponding deviation source labels, page coordinates, and image coordinates, and are used as input data for subsequent matching with the single-piece substrate interference map.
[0105] Example 4
[0106] Please refer to Figure 1 and Figure 2 Specifically: In S3, the single-piece substrate interference map includes a fiber texture interference layer, an indentation texture interference layer, a background color abrupt change interference layer, and a paper surface stain interference layer for writing substrate features;
[0107] The fiber texture interference layer records the texture direction and texture density of the fiber texture region;
[0108] The indentation texture interference layer records the center line and period of the indentation texture area;
[0109] The background color mutation interference layer records the direction and magnitude of grayscale mutations in the background color mutation region.
[0110] The paper stain interference layer records the regional outline and grayscale distribution of the paper stain area;
[0111] Each substrate interference region in the single-piece substrate interference diagram corresponds to the paper coordinates in the pre-press substrate image.
[0112] In S3, registering the single-piece substrate interference map to the same position in the printed image includes: determining the initial displacement of the single-piece substrate interference map relative to the transport direction of the printed image based on the encoder pulse sequence;
[0113] The leading edge position, side position, and boundary tilt angle of the paper-based substrate to be tested are obtained in the pre-printing substrate image and the post-printing image, respectively, and the initial displacement in the conveying direction is corrected accordingly.
[0114] Based on the phase difference of the indentation period in the pre-printed substrate image and the post-printed image, the registration position after boundary correction is locally aligned to obtain the same position.
[0115] In this embodiment, based on Embodiments 1 to 3, the process of generating a single-piece substrate interference map and the process of registering the single-piece substrate interference map to the same position in the printed image are further explained. The filtering direction, window size, response threshold, distance parameter, angle parameter and sample data involved in this embodiment are all exemplary parameters used to illustrate the specific implementation process. Without departing from the technical concept of this invention, those skilled in the art can make adaptive adjustments according to the surface roughness of the paper base material, image acquisition resolution, lighting method, conveying speed and printing accuracy requirements.
[0116] Before generating the single-piece substrate interference map, the image processing industrial control computer first performs dark field correction, brightness equalization, lens distortion correction, and paper area cropping on the pre-press substrate image. Among them, dark field correction is used to subtract camera dark current and fixed pattern noise, brightness equalization is used to reduce the brightness attenuation caused by the bar light source at the edge of the field of view, lens distortion correction is used to make the image coordinates consistent with the actual position on the paper, and paper area cropping is used to remove the conveyor belt background area outside the paper substrate to be tested.
[0117] The image processing industrial control computer establishes a paper coordinate system in the pre-processed pre-press substrate image. The paper coordinate system takes the intersection of the front edge and the left edge as the origin, the width direction of the paper substrate to be tested as the X-axis, and the conveying direction of the paper substrate to be tested as the Y-axis. The image pixel coordinates are converted into paper coordinates according to the pixel equivalent obtained by camera calibration, so that each substrate interference area in the single substrate interference image has corresponding paper coordinates.
[0118] The single-piece substrate interference map is stored using a multi-layer data structure. The multi-layer data structure includes a fiber texture interference layer, an indentation texture interference layer, a background color abrupt change interference layer, and a paper surface stain interference layer. Each interference layer includes a layer identifier, a region number, a region mask, paper coordinates, a bounding rectangle, a confidence level, and a feature description field. The region mask is used to represent the pixel range of the substrate interference region in the pre-printed substrate image. The paper coordinates are used to represent the actual position of the substrate interference region on the paper substrate to be tested. The confidence level is used to represent the reliability of the substrate interference region belonging to the corresponding interference layer. The feature description field is used to write the proprietary features corresponding to the interference layer.
[0119] When forming the fiber texture interference layer, the image processing industrial control computer uses a multi-directional Gabor filter bank to enhance the texture of the pre-printed substrate image. The directional angles of the multi-directional Gabor filter bank include 0°, 30°, 60°, 90°, 120° and 150°. The filtering scale is set to 3 to 7 pixels according to the average width of the fiber texture in the unprinted paper base sample. The image processing industrial control computer calculates the Gabor response energy in each direction in each local window and takes the direction with the largest response energy as the candidate fiber texture direction.
[0120] The image processing industrial control computer further calculates the gray-level gradient distribution within the candidate fiber texture region and determines the texture direction of the fiber texture region based on the main extension direction of the gray-level gradient within the local window. The texture direction is used to characterize the extension direction of the fiber texture on the paper surface, and the texture direction is written into the feature description field of the fiber texture interference layer in the form of an angle.
[0121] The image processing industrial control computer performs binarization and thinning processing on the candidate fiber texture region to obtain the fiber texture skeleton; then, according to the camera pixel equivalent, the pixel length of the fiber texture skeleton is converted into the physical length, and the physical length is correlated with the physical area of the candidate fiber texture region to obtain the fiber texture distribution density per unit area. The distribution density is written as the texture density of the fiber texture region into the fiber texture interference layer.
[0122] When the orientation consistency of the candidate fiber texture region reaches 0.65 and the Gabor response energy is 1.8 times higher than the average background texture energy of the unprinted paper base sample, the image processing control computer writes the candidate fiber texture region into the fiber texture interference layer. The 0.65 and 1.8 times values are obtained by statistically analyzing the normal fiber texture continuity and background texture energy of the same batch of unprinted paper base samples, and are used to avoid mistakenly writing lighting noise and random dark patterns into the fiber texture interference layer.
[0123] When forming the indentation texture interference layer, the image processing industrial control computer counts the grayscale profile along the conveying direction of the paper substrate to be tested, and uses bandpass filtering to remove low-frequency background color changes and high-frequency imaging noise; the continuous dark valley values in the filtered grayscale profile correspond to the candidate regions of the indentation texture, and the image processing industrial control computer performs skeletonization processing and straight line fitting on the candidate regions of the indentation texture to obtain the center line of the indentation.
[0124] The image processing industrial control computer extracts multiple grayscale profiles along the direction perpendicular to the center line of the indentation and performs autocorrelation analysis on each grayscale profile. When a stable repeating peak appears in the autocorrelation result, the spatial distance corresponding to the adjacent repeating peak is taken as the candidate indentation period, and the median of multiple candidate indentation periods is taken as the indentation period of the indentation texture region. The indentation period is used to represent the repeating interval of adjacent indentation textures in the paper space.
[0125] When the distance between adjacent indentation center lines fluctuates less than 12% of the average distance, and the angle between the indentation direction and the indentation direction in the same batch of corrugated paper calibration samples is less than 8°, the image processing industrial control computer will write the corresponding area into the indentation texture interference layer; 12% and 8° are obtained by statistical analysis of the indentation cycle stability and indentation direction stability of the same batch of paper base printing material to be tested, and are used to exclude the situation where ordinary fiber dark lines are mistakenly identified as indentation textures.
[0126] When forming the background color mutation interference layer, the image processing industrial control computer uses a sliding window to calculate the local grayscale mean in the pre-press substrate image. The sliding window size is set to 0.5mm×0.5mm according to the camera resolution and the scale of the paper background color change. When the difference in grayscale mean between adjacent windows reaches 2.4 times the standard deviation of the normal background color fluctuation of the same batch of unprinted paper base samples, the corresponding position is determined as the candidate region for background color mutation.
[0127] The image processing industrial control computer calculates the gray-level gradient vector for the candidate regions of background color change, and uses the direction of the gray-level gradient vector as the direction of gray-level change in the background color change region. The image processing industrial control computer also counts the maximum and minimum gray-level average values in the candidate regions of background color change, and uses the difference between the two as the gray-level change amplitude. The direction of gray-level change is used to represent the spatial direction of the background color change on the paper, and the gray-level change amplitude is used to represent the strength of the background color change.
[0128] The 2.4 standard deviation is determined by the distribution of grayscale differences between the natural background color fluctuations and manually marked background color abrupt changes in the unprinted paper-based calibration samples; this threshold serves to preserve the true background color abrupt changes and reduce pseudo-abrupt areas caused by minor uneven lighting and fine paper fiber lines.
[0129] When forming the paper surface stain interference layer, the image processing industrial control computer first establishes a paper surface background model based on the unprinted paper base calibration sample. The paper surface background model includes the background gray mean, background gray standard deviation and background color density range. Then, the connected regions that deviate from the paper surface background model are extracted from the pre-printed substrate image.
[0130] When the difference between the gray value of a certain connected region and the mean gray value of the background reaches 2.5 times the standard deviation of the background gray value, and the area of the connected region reaches 0.10 mm², the image processing industrial control computer determines the connected region as a candidate region for paper stains. The 2.5 times the standard deviation of the background gray value is used to distinguish between normal texture fluctuations on the paper and obvious stains. The 0.10 mm² is determined based on the camera pixel equivalent and the minimum area of manually visible stains and is used to exclude isolated noise points.
[0131] For candidate areas of paper stains, the image processing industrial control computer uses a contour tracking algorithm to obtain the region contour and calculates the mean gray level, gray level variance, gray level histogram and mean color density within the region. The region contour and gray level distribution are jointly written into the paper stain interference layer. The region contour is used to represent the geometric shape of the paper stain, and the gray level distribution is used to represent the brightness and darkness characteristics of the paper stain. The combination of the two can distinguish between the original stains on the paper and the newly added ink spots after printing in the subsequent substrate matching.
[0132] After the above four interference layers are generated, the image processing industrial control computer numbers the base interference regions in each interference layer and establishes an association index for overlapping regions within the same paper coordinate range. When a region has both background color change features and paper stain features, the image processing industrial control computer retains the feature records of the region in the background color change interference layer and the paper stain interference layer respectively, and establishes an association index through the same paper coordinates so that the features of the corresponding interference layer can be called in the future according to the different deviation source labels.
[0133] When registering the interference map of a single substrate to the same position in the post-printed image, the image processing industrial control computer first determines the initial displacement of the conveying direction based on the encoder pulse sequence recorded in Example 2. Specifically, the image processing industrial control computer reads the encoder pulse count value at the time of acquisition of the pre-printed substrate image, then reads the encoder pulse count value at the time of acquisition of the post-printed image, and determines the number of encoder pulses added between the two acquisition times.
[0134] Since the encoder displacement resolution represents the conveying distance of the paper substrate to be tested for each encoder pulse, the image processing industrial control computer converts the number of encoder pulses added between two acquisition times into the actual conveying distance; then it compares the actual conveying distance with the calibrated distance between the pre-printing image acquisition position and the post-printing image acquisition position, and the difference between the two is used as the initial displacement compensation amount of the single substrate interference map relative to the post-printing image in the conveying direction.
[0135] In a specific test of this embodiment, the encoder displacement resolution is 0.05 mm / pulse, the calibrated distance between the pre-print image acquisition position and the post-print image acquisition position is 1500.00 mm, the encoder pulse count at the time of pre-print substrate image acquisition is 125604, and the encoder pulse count at the time of post-print image acquisition is 155611. The image processing industrial control computer determines that 30007 encoder pulses have been added between the two acquisition times and converts them into an actual conveying distance of 1500.35 mm. Since the actual conveying distance is 0.35 mm more than the calibrated distance, 0.35 mm is used as the initial displacement compensation amount in the conveying direction.
[0136] After determining the initial displacement in the conveying direction, the image processing industrial control computer performs an initial translation of the single-piece substrate interference map based on the initial displacement in the conveying direction. This initial translation moves the paper coordinates of each substrate interference area in the single-piece substrate interference map to the theoretical paper position of the corresponding paper substrate to be tested in the post-printed image, providing an initial correspondence basis for subsequent boundary correction.
[0137] During boundary correction, the image processing industrial control computer obtains the leading edge position, side position, and boundary tilt angle of the paper substrate to be tested from the pre-printing substrate image and the post-printing image, respectively. Specifically, a paper area mask is first obtained through background segmentation, and then the leading edge line and side line are obtained by edge tracking of the paper area mask. Subsequently, the leading edge position, side position, and boundary tilt angle are obtained by least squares linear fitting.
[0138] When the position of the front edge differs between the pre-printed substrate image and the post-printed image, the image processing control computer corrects the position of the single-piece substrate interference map in the transport direction accordingly; when the position of the side edge differs between the pre-printed substrate image and the post-printed image, the image processing control computer corrects the position of the single-piece substrate interference map in the lateral direction accordingly; when the boundary tilt angle differs between the pre-printed substrate image and the post-printed image, the image processing control computer corrects the rotational deviation of the single-piece substrate interference map relative to the post-printed image accordingly.
[0139] In a specific test of this embodiment, the leading edge position in the pre-printed substrate image is 12.40 mm, the side position is 8.15 mm, and the boundary tilt angle is 0.04°. The leading edge position in the post-printed image is 12.68 mm, the side position is 8.03 mm, and the boundary tilt angle is 0.16°. Based on this, the image processing industrial control computer determines that the difference in leading edge position is 0.28 mm, the difference in side position is -0.12 mm, and the difference in boundary tilt angle is 0.12°. According to the above differences, the interference image of the single substrate is corrected by translation in the transport direction, translation laterally, and rotation to align the paper boundary with the paper boundary in the post-printed image.
[0140] After boundary correction is completed, the image processing industrial control computer performs local iso-position correction based on the phase difference of the indentation period in the pre-printed substrate image and the post-printed image. Local iso-position correction is used to compensate for local stretching, slight slippage and local drift of paper texture that are still difficult to eliminate by encoder counting and paper boundary correction.
[0141] The image processing industrial control computer selects multiple indentation texture profiles within the same paper coordinate range after boundary correction, and performs grayscale mean normalization on each indentation texture profile. The same paper coordinate range refers to the paper range corresponding to the indentation texture area in the pre-printed substrate image after initial translation and boundary correction, rather than simply using the same pixel coordinate range in the two images.
[0142] The image processing industrial control computer determines the indentation period based on the repetition interval of the indentation texture in the conveying direction. The indentation period represents the actual spatial distance between adjacent indentation textures. In this embodiment, it is obtained through the autocorrelation results of multiple indentation texture profiles, and the median of multiple stable repetition intervals is used as the indentation period of the batch of paper-based printing substrate to be tested.
[0143] Since the indentation texture is periodic along the conveying direction, the image processing industrial control computer processes both the pre-printing indentation texture profile and the post-printing indentation texture profile into grayscale periodic signals; then compares the position offset ratio of the pre-printing indentation texture profile and the post-printing indentation texture profile within the same indentation period, and converts the position offset ratio into a local co-position correction amount along the conveying direction.
[0144] The physical meaning of the position offset ratio is that a complete indentation cycle corresponds to the spatial distance between two adjacent indentations. When the post-printing indentation texture is offset by half a cycle relative to the pre-printing indentation texture, the local co-position correction amount is equal to half an indentation cycle. When the post-printing indentation texture is offset by a quarter cycle relative to the pre-printing indentation texture, the local co-position correction amount is equal to a quarter of an indentation cycle. Thus, the local misalignment of the indentation texture in the pre-printing image and the post-printing image can be converted into the actual transport direction displacement correction amount.
[0145] When multiple indentation texture profiles are extracted, the image processing control computer determines the local displacement result of each indentation texture profile and performs a weighted average of multiple local displacement results based on the sharpness of the indentation texture profile. The sharpness is determined by the gray-level difference between the indentation valley value and the adjacent background area. When the difference between the local displacement result corresponding to a certain profile and the median exceeds 0.10mm, the profile is discarded as an abnormal profile. The 0.10mm is determined by the repeatability of indentation texture phase extraction and the camera spatial resolution.
[0146] In a specific test in this embodiment, the image processing industrial control computer determined the indentation period to be 4.82mm and obtained a stable position offset ratio from 5 indentation texture profiles. The local displacement results corresponding to the position offset ratios were 0.13mm, 0.15mm, 0.14mm, 0.16mm and 0.14mm, respectively, and the difference between the above local displacement results was less than 0.10mm. Therefore, the image processing industrial control computer used 0.14mm as the local co-position correction amount and superimposed it on the registration position after boundary correction.
[0147] The image processing industrial control computer uses the initial displacement in the conveying direction, the leading edge position difference, the side position difference, the boundary tilt angle difference, and the local co-position correction amount together for the coordinate mapping of the single-piece substrate interference map. Specifically, the single-piece substrate interference map is first initially translated in the conveying direction according to the initial displacement in the conveying direction, then rigid boundary correction is performed according to the leading edge position difference, the side position difference, and the boundary tilt angle difference, and finally local correction is performed in the local area where the indentation texture is located according to the local co-position correction amount.
[0148] After completing the above coordinate mapping, the fiber texture interference layer, indentation texture interference layer, background color change interference layer, and paper surface stain interference layer in the single substrate interference image are all mapped to the same position in the post-printing image; the same position refers to the position corresponding to the actual paper surface position of the same paper substrate to be tested in the post-printing image, and does not just refer to the same pixel position in the image coordinates.
[0149] Example 5
[0150] Please refer to Figure 1 and Figure 2 Specifically: In S4, a base matching calculation is performed between the deviation area in the initial inspection deviation diagram and the base interference area in the single-piece base interference diagram.
[0151] Basis matching calculation involves weighting positional overlap, contour similarity, grayscale distribution similarity, and texture orientation consistency to obtain the basis matching value;
[0152] When the base matching value reaches the first base matching threshold corresponding to the interference layer to which the base interference region to which the matching is located belongs, the corresponding deviation region is marked as the base-associated deviation region.
[0153] In S4, the base correlation deviation zone has a base correlation quality score, which is determined based on the area of the base correlation deviation zone, the deviation source label corresponding to the base correlation deviation zone, the base matching value corresponding to the base correlation deviation zone, and the layout area weight.
[0154] The review risk score is determined based on the quality score of the basis correlation and the deviation intensity of the basis correlation deviation zone. When the review risk score reaches the review risk threshold, the basis correlation deviation zone is written into the review candidate zone.
[0155] After excluding the substrate-related deviation area, the image area that remains in the ink coverage deviation layer forms a false printing defect; the image area that remains in the background contamination deviation layer forms an excess ink spot defect; and the image area that remains in the contour geometry deviation layer forms a line bending defect.
[0156] The severity of the printing defect is determined based on the ink coverage loss rate and the weight of the printing area.
[0157] The severity of the excess ink spot defect is determined based on the area of newly added connected components, the number of newly added connected components, and the weight of the page area.
[0158] The severity of line bending defects is determined based on the normal offset, the continuous length of the offset, and the weight of the page area.
[0159] In S4, the rejection control command is generated according to the rejection trigger time. The rejection trigger time is determined based on the distance between the post-printing image acquisition position and the rejection mechanism, the conveying speed of the paper-based printing substrate to be inspected, and the response delay of the rejection mechanism.
[0160] The rejection control command is determined by the substrate-associated quality score, the review candidate area, the severity of the false print, the severity of the ink spot, and the severity of the line curvature according to a preset rejection threshold rule. The printing operation control command is determined by the severity of the false print, the severity of the ink spot, and the severity of the line curvature according to a preset operation control threshold rule, and includes an ink supply adjustment command, a cleaning mechanism start command, and a correction adjustment command.
[0161] In this embodiment, based on embodiments 1 to 4, the process of base matching calculation between the initial inspection deviation map and the single-piece base interference map, determination of the base associated deviation area, writing of the review candidate area, generation of defect severity, and output of control instructions are further explained. The matching threshold, weight, area threshold, intensity threshold, severity threshold, and control trigger parameters involved in this embodiment are all exemplary parameters used to illustrate the specific implementation process. Without departing from the technical concept of this invention, those skilled in the art can make adaptive adjustments according to printing accuracy, substrate type, camera resolution, rejection mechanism response speed, and product quality requirements.
[0162] Before performing substrate matching calculation, the image processing industrial control computer reads the initial inspection deviation map formed in Example 3 and the single-piece substrate interference map registered to the same position in the post-printed image in Example 4. Each deviation region in the initial inspection deviation map has a deviation source label, page coordinates, image coordinates, region mask, and deviation intensity. Each substrate interference region in the single-piece substrate interference map has an interference layer identifier, paper coordinates, mapped image coordinates, region mask, and feature description field, thereby enabling the deviation region and the substrate interference region to be matched at corresponding positions in the same post-printed image coordinate space.
[0163] In this embodiment, the image processing industrial control computer uses the layout coordinates and image coordinates of the deviation area as the retrieval entry point to search for the substrate interference area located in the neighborhood of the same component position in the single component substrate interference image. The neighborhood of the same component position is determined based on the camera pixel equivalent, boundary correction residual, and local co-position correction residual. In this embodiment, the search range is set to be 0.20mm outward from the outer rectangle of the deviation area, so that the positional deviation caused by the slight paper stretching and local acquisition error will not cause the true substrate interference area to be missed.
[0164] When determining the base interference regions to be matched, the image processing control computer prioritizes calling the base interference regions of the corresponding interference layers based on the deviation source label. For deviation regions in the ink coverage deviation layer, it prioritizes calling the base interference regions in the background color change interference layer and the paper surface stain interference layer, and simultaneously searches for strong fiber texture regions in the fiber texture interference layer that overlap with the region. For deviation regions in the background contamination deviation layer, it prioritizes calling the base interference regions in the paper surface stain interference layer and the background color change interference layer. For deviation regions in the contour geometry deviation layer, it prioritizes calling the base interference regions in the indentation texture interference layer and the fiber texture interference layer.
[0165] Positional overlap is used to indicate the degree of spatial overlap between the deviation area and the substrate interference area in the same post-printed image coordinate space. The image processing industrial control computer overlays the area mask of the deviation area and the area mask mapped from the substrate interference area, counts the physical area covered by both, and uses the proportion of the common coverage area to the overall coverage of both as the basis for determining the positional overlap. The higher the positional overlap, the more likely the deviation area is to originate from the paper substrate features that existed before printing.
[0166] Contour similarity is used to represent the degree of consistency between the shape of the deviation region and the shape of the base interference region. The image processing industrial control computer extracts the boundary contours of the deviation region and the base interference region respectively, and compares the aspect ratio of their bounding rectangles, the number of boundary turning points, the principal axis direction of the contour, and the average distance between the boundary points. When the shape scale, principal axis direction, and boundary distribution are all similar, the contour similarity value increases. When the deviation region presents a diffuse boundary formed by printing ink splatter and the base interference region presents a stable closed contour of paper stains, the contour similarity value decreases.
[0167] Gray-scale distribution similarity is used to represent the degree of consistency between the deviation area and the base interference area in terms of light and dark distribution. The image processing industrial control computer respectively counts the gray-scale mean, gray-scale variance, and gray-scale histogram of the deviation area in the post-printing image, and counts the gray-scale mean, gray-scale variance, and gray-scale histogram of the corresponding base interference area in the pre-printing base image. When the difference in gray-scale mean between the two is small, the gray-scale variance is close, and the gray-scale histogram shape is similar, the gray-scale distribution similarity value increases. When the deviation area has obvious new ink color deepening while the pre-printing base interference area only has light background color fluctuation, the gray-scale distribution similarity value decreases.
[0168] Texture orientation consistency is used to represent the degree of consistency between the texture direction in the deviation region and the directional features in the base interference region. For the fiber texture interference layer, the image processing control computer compares the main texture direction in the deviation region with the texture direction recorded in the fiber texture interference layer. For the indentation texture interference layer, the image processing control computer compares the direction of the linear dark lines in the deviation region with the direction of the indentation center line. For the background color change interference layer, the image processing control computer compares the direction of grayscale change in the deviation region with the direction of grayscale change. For the paper stain interference layer, the image processing control computer compares the direction of the long axis of the deviation region's outline with the direction of the long axis of the paper stain region's outline.
[0169] During weighted processing, the image processing control computer determines the weights of four matching indicators based on the interference layer to which the base interference region participating in the matching belongs. For the fiber texture interference layer, the weights of position overlap, contour similarity, grayscale distribution similarity, and texture direction consistency are set to 0.30, 0.20, 0.15, and 0.35, respectively. For the indentation texture interference layer, the weights of the above four indicators are set to 0.28, 0.18, 0.14, and 0.40, respectively. For the background color abrupt change interference layer, the weights of the above four indicators are set to 0.30, 0.15, 0.40, and 0.15, respectively. For the paper stain interference layer, the weights of the above four indicators are set to 0.35, 0.30, 0.25, and 0.10, respectively.
[0170] The aforementioned weights are determined by a calibration sample set, which includes 280 unprinted paper base samples, 260 qualified printed samples, and 185 manually annotated defect samples. The image processing industrial control computer statistically analyzes the contribution of four matching indicators to the differentiation of manually judged substrate interference areas. The statistical results show that fiber texture and indentation texture depend more on directional consistency, background color abrupt changes depend more on grayscale distribution consistency, and paper surface stains depend more on positional overlap and contour similarity. Therefore, the above-mentioned hierarchical weight configuration is adopted so that different types of substrate interference can adopt matching strategies consistent with their physical characteristics.
[0171] The image processing industrial control computer performs weighted processing on positional overlap, contour similarity, grayscale distribution similarity, and texture direction consistency according to their respective weights to obtain the basis matching value. The higher the basis matching value, the more likely the deviation area in the initial inspection deviation map is caused by the paper substrate features that existed before printing, rather than being newly formed in the current printing process.
[0172] In this embodiment, the first substrate matching threshold is set according to the interference layer to which the substrate interference area to which the matching is located; the first substrate matching threshold corresponding to the fiber texture interference layer is 0.74, the first substrate matching threshold corresponding to the indentation texture interference layer is 0.78, the first substrate matching threshold corresponding to the background color change interference layer is 0.72, and the first substrate matching threshold corresponding to the paper surface stain interference layer is 0.80. The above thresholds are jointly determined by the error subtraction rate and the omission retention rate of manual review in the calibration sample, so that the substrate association deviation area can cover the main paper surface substrate interference, and will not mistakenly classify a large number of obvious new printing defects into substrate interference.
[0173] When the same deviation region has matching relationships with multiple base interference regions, the image processing industrial control computer retains the matching relationship with the highest base matching value as the primary matching relationship, and records the remaining matching relationships as auxiliary matching relationships in the matching log of the deviation region. When the base matching value corresponding to the primary matching relationship reaches the first base matching threshold corresponding to the interference layer to which the base interference region to which the participating base interference region belongs, the image processing industrial control computer marks the deviation region as a base-associated deviation region, and records its corresponding interference layer identifier, base interference region number, base matching value, and matching basis.
[0174] When generating the substrate-related quality score, the image processing industrial control computer reads the area of the substrate-related deviation zone, the deviation source label, and the page area weight. The area is used to represent the range of influence of the substrate-related deviation zone on the appearance of the current paper substrate to be tested. The deviation source label is used to indicate that the substrate-related deviation zone originates from the corresponding deviation layer among the ink coverage deviation layer, background contamination deviation layer, and contour geometry deviation layer. The page area weight is used to represent the importance of the page position where the substrate-related deviation zone is located to the evaluation of the print quality.
[0175] The page area weights are preset according to the page importance of the current printing task. In this embodiment, the page area weights of the barcode reading area, drug batch number area, and anti-counterfeiting label area are set to 1.00, the page area weight of the main graphic display area is set to 0.85, the page area weight of the general explanatory text area is set to 0.70, and the page area weight of the non-critical information edge area is set to 0.45. The above settings are used to make the deviation area of the same area have different quality evaluation effects in different page positions.
[0176] The deviation source label is involved in the determination of the substrate-related quality score. In this embodiment, the label influence coefficient corresponding to the contour geometry deviation layer is higher than that of the background contamination deviation layer, and the label influence coefficient corresponding to the background contamination deviation layer is higher than that of the ink coverage deviation layer. This is because curved lines are more likely to cause reading errors in text, barcode, and border areas, and excess ink dots are more likely to cause page contamination. Slight ink coverage deficiency has a smaller impact on the usability of the finished product in some non-critical areas.
[0177] When determining the baseline correlation quality score, the image processing industrial control computer first converts the area of the baseline correlation deviation region into the area influence level A, converts the deviation source label into the label influence coefficient L, records the baseline matching value as M, and reads the layout area weight W. In a specific implementation, the baseline correlation quality score Q satisfies Q=0.30A+0.20L+0.20M+0.30W, where A, L, M, and W are all normalized to a value range of 0 to 1. The larger the area of the baseline correlation deviation region, the higher the layout area weight, the more sensitive the deviation source label, and the higher the baseline matching value, the higher the baseline correlation quality score.
[0178] When generating the review risk score, the image processing industrial control computer simultaneously reads the substrate-related quality score and the deviation intensity of the substrate-related deviation area. The deviation intensity is determined according to the deviation layer to which the substrate-related deviation area belongs. When it belongs to the ink coverage deviation layer, the degree of decrease in ink coverage intensity is used as the deviation intensity. When it belongs to the background contamination deviation layer, the degree of increase in the color density of the newly added connected region relative to the background is used as the deviation intensity. When it belongs to the contour geometry deviation layer, the deviation intensity is characterized by both the normal offset and the continuous length of the offset.
[0179] The review risk score is used to identify base association deviation areas that are not suitable for direct release. When the base association deviation area matches the single-piece base interference map, but its area is large, it is located in a high-weight layout area, and the deviation intensity is high, the image processing control computer increases the review risk score, so that the area enters the review candidate area. When the base association deviation area is small, it is located in a low-weight layout area, and the deviation intensity is close to the variation range of the pre-press base features themselves, the image processing control computer reduces the review risk score, so that it is only recorded as an existing base interference record.
[0180] In this embodiment, the review risk threshold is set to 0.62. This threshold is determined by the distribution boundary between "substrate interference that can be directly deducted" and "suspected superposition defects that need to be reviewed" in the manually reviewed samples. When the review risk score reaches 0.62, the image processing industrial control computer writes the corresponding substrate-related deviation area into the review candidate area, and records the printing material tracking number, area mask, page coordinates, substrate matching value, substrate-related quality score, deviation intensity, and interference layer identifier participating in the matching in the review candidate area.
[0181] In one specific implementation, the review risk score R satisfies R = 0.55Q + 0.45I, where Q is the base correlation quality score and I is the normalized value of the deviation intensity. When R reaches 0.62, the corresponding base correlation deviation region is written into the review candidate region, thereby making the calculation process of the review risk score repeatable.
[0182] The review candidate area is not directly used as the basis for the formation of false printing defects, excess ink spot defects, and line bending defects; its role is to conservatively handle areas that "already have a substrate relationship but still have a high appearance risk", so that the area will not trigger the adjustment of printing parameters incorrectly, and at the same time, it can participate in the single-piece rejection control to avoid the real product quality risk being completely ignored.
[0183] After excluding the substrate-related deviation area, the image processing industrial control computer continues to read the image areas that are still retained in the ink coverage deviation layer, background contamination deviation layer, and contour geometry deviation layer in the initial inspection deviation image; the image areas that are still retained in the ink coverage deviation layer form the false printing defect item, the image areas that are still retained in the background contamination deviation layer form the redundant ink spot defect item, and the image areas that are still retained in the contour geometry deviation layer form the line bending defect item.
[0184] When determining the severity of false printing, the image processing industrial control computer reads the ink coverage loss rate E and the page area weight W of the false printing defect item. In one specific implementation, the severity of false printing Sv satisfies Sv=0.65E+0.35W, where E and W are both normalized to the range of 0 to 1. The larger E is and the higher W is, the higher the severity of false printing Sv is.
[0185] When determining the severity of ink spots, the image processing industrial control computer reads the normalized value A of the newly added connected component area, the normalized value N of the quantity, and the weight W of the page area from the redundant ink spot defect item. In one specific implementation, the ink spot severity Sm satisfies Sm=0.45A+0.25N+0.30W, where A, N, and W are all normalized to the range of 0 to 1. The larger A, the larger N, and the higher W are, the higher the ink spot severity Sm is.
[0186] When determining the severity of line bending, the image processing industrial control computer reads the normalized value D of the normal offset, the normalized value L of the continuous offset length, and the weight W of the layout area in the line bending defect item. In one specific implementation, the severity of line bending Sl satisfies Sl=0.45D+0.30L+0.25W. The larger D, the larger L, and the higher W are, the higher the severity of line bending Sl is.
[0187] In a specific test of this embodiment, the initial inspection deviation map corresponding to the substrate tracking number A-000238 includes 3 areas with insufficient ink coverage, 2 abnormally connected background areas, and 1 contour offset area. Among them, the first area with insufficient ink coverage matches the substrate interference area in the background color mutation interference layer, with a substrate matching value of 0.79, which reaches the threshold of 0.72 corresponding to the background color mutation interference layer, and is marked as a substrate-related deviation area. The second area with insufficient ink coverage does not reach the threshold corresponding to any interference layer and is retained as a false printing defect. The third area with insufficient ink coverage has a matching value of 0.71 with the fiber texture interference layer, which does not reach the threshold of 0.74 corresponding to the fiber texture interference layer, and is retained as a false printing defect.
[0188] In the same test, the first abnormal connected region of the background matched the substrate interference region in the paper stain interference layer, with a substrate matching value of 0.84, reaching the 0.80 threshold corresponding to the paper stain interference layer, and was marked as a substrate-related deviation region; the second abnormal connected region of the background did not form a valid match with any substrate interference region and was retained as a redundant ink spot defect item; the contour offset region matched the indentation center line region in the indentation texture interference layer, with a substrate matching value of 0.81, reaching the 0.78 threshold corresponding to the indentation texture interference layer, and was marked as a substrate-related deviation region.
[0189] In the three base association deviation areas mentioned above, the image processing industrial control computer further calculates the base association quality score and the review risk score. The area of the insufficient ink coverage area matching the background color mutation interference layer is 0.24 mm², located in the ordinary explanatory text area, with a review risk score of 0.38, and is not written into the review candidate area. The area of the abnormal connected background area matching the paper stain interference layer is 0.16 mm², located in the non-critical information edge area, with a review risk score of 0.29, and is not written into the review candidate area. The contour offset area matching the indentation texture interference layer is located in the barcode reading area, with a normal offset of 0.13 mm and a continuous offset length of 2.2 mm, with a review risk score of 0.68, reaching the review risk threshold of 0.62, and is written into the review candidate area.
[0190] After excluding the aforementioned base-related deviation areas, the image processing control computer identifies the remaining two areas with insufficient ink coverage as false printing defects and determines their false printing severity as 0.57 based on their ink coverage loss rate and layout area weight. The remaining one abnormally connected background area is identified as an extra ink dot defect and its ink dot severity is determined as 0.49 based on its newly added connected region area, the number of newly added connected regions, and layout area weight. Since the only contour offset area has been marked as a base-related deviation area and entered the review candidate area, the image processing control computer does not output it as a line bending defect, but instead uses it as a review candidate area for elimination control.
[0191] When generating rejection control commands, the image processing industrial control computer determines the rejection trigger time based on the distance between the post-printing image acquisition position and the rejection mechanism, the conveying speed of the paper-based substrate to be inspected, and the response delay of the rejection mechanism. Specifically, the image processing industrial control computer first determines the conveying time required for the paper-based substrate to be inspected to move from the post-printing image acquisition position to the rejection mechanism based on the distance and conveying speed, and then deducts the response delay required for the rejection mechanism to complete the action from receiving the command. The resulting time is used as the trigger advance of the rejection control command.
[0192] In this embodiment, the distance between the post-printing image acquisition position and the rejection mechanism is 860mm, the conveying speed of the paper-based substrate to be inspected is 120m / min, and the response delay of the rejection mechanism is 60ms. The image processing industrial control computer converts 120m / min to 2000mm / s and determines that it takes about 430ms for the paper-based substrate to be inspected to move from the post-printing image acquisition position to the rejection mechanism. After deducting the 60ms response delay, a rejection control command with the corresponding substrate tracking number is generated about 370ms after the post-printing image acquisition.
[0193] The rejection control instruction is determined by a combination of the substrate-related quality score, the candidate area for review, the severity of false printing, the severity of ink spots, and the severity of line curvature. When the candidate area for review is located in a high-weight area and the review risk score reaches the review risk threshold, the image processing industrial control computer marks the corresponding paper-based substrate to be inspected as a rejection object. When at least one of the severity of false printing, the severity of ink spots, and the severity of line curvature reaches the finished product rejection threshold, the image processing industrial control computer marks the corresponding paper-based substrate to be inspected as a defect rejection object. When none of the above conditions are met, the image processing industrial control computer records the inspection results and allows the corresponding paper-based substrate to be inspected to enter the next production process.
[0194] The printing operation control command is determined by a combination of the severity of poor printing, the severity of ink spots, and the severity of line curvature, and is not directly triggered by the simple substrate-related deviation area. This setting can prevent the fiber texture, indentation, background color abrupt change, and paper surface stains of the paper substrate itself from misleading the printing unit adjustment, thereby separating paper substrate problems from printing operation problems.
[0195] In this embodiment, when at least 6 out of 20 consecutive paper-based printing materials to be inspected have a false printing severity of 0.55 or higher in the same ink supply area, the image processing industrial control computer generates an ink supply adjustment command and increases the ink supply amount of the corresponding ink supply area by 1.5%.
[0196] When at least 5 out of 20 consecutive paper-based printing materials to be inspected have excess ink spot defects with a severity of 0.50 or higher, the image processing industrial control computer generates a cleaning mechanism start command and controls the cleaning mechanism to clean the corresponding printing roller area.
[0197] When at least 4 out of 15 consecutive paper-based printing materials to be inspected show line bending defects with a severity of 0.50 or higher, the image processing industrial control computer generates a correction adjustment command and fine-tunes the lateral registration position and angle correction parameters of the printing unit.
[0198] Example 6
[0199] Please refer to Figure 1 and Figure 2 A visual recognition-based online defect detection system for printed materials includes a single-piece image acquisition module, a layout deviation detection module, a substrate interference modeling module, and a defect diversion control module.
[0200] The single-piece image acquisition module acquires the pre-press substrate image formed upstream of the printing unit and the post-press image formed downstream of the printing unit by the paper-based substrate to be detected, as well as the standard printing layout corresponding to the current printing task, and establishes substrate tracking information for associating the pre-press substrate image and the post-press image. The substrate tracking information includes the substrate tracking number and the transport displacement information.
[0201] The layout deviation detection module registers the standard printed layout image to the post-printed image and forms an initial deviation map in the post-printed image based on the expected ink coverage area, expected blank background area, and expected image and text outline in the standard printed layout image. The initial deviation map includes areas with insufficient ink coverage, abnormally connected background areas, and outline offset areas, and each deviation area has a deviation source label.
[0202] The substrate interference modeling module extracts substrate features that characterize the paper surface state before printing from the pre-press substrate image to form a single-piece substrate interference map. Based on the substrate tracking information and the boundary position of the paper substrate to be detected in the pre-press substrate image and the post-press image, the single-piece substrate interference map is registered to the same position in the post-press image.
[0203] The defect diversion control module marks the deviation areas that match the single-piece substrate interference map as substrate-related deviation areas in the initial inspection deviation map. It identifies the areas with insufficient ink coverage, abnormal background connectivity, and contour offset areas other than the substrate-related deviation areas as false printing defects, excess ink spot defects, and line bending defects, respectively, and generates new printing defect detection results. Based on the substrate-related deviation areas and the new printing defect detection results, it generates rejection control instructions and printing operation control instructions.
[0204] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.
Claims
1. A method for online detection of defects in printed materials based on visual recognition, characterized in that, Includes the following steps: S1. Obtain the pre-press substrate image formed upstream of the printing unit, the post-press image formed downstream of the printing unit, and the standard printing layout corresponding to the current printing task, and establish substrate tracking information for associating the pre-press substrate image and the post-press image. The substrate tracking information includes the substrate tracking number and the transport displacement information. S2. Register the standard printed layout image to the post-printed image, and based on the desired ink coverage area, desired blank background area and desired graphic outline in the standard printed layout image, form a preliminary inspection deviation map in the post-printed image. The preliminary inspection deviation map includes areas with insufficient ink coverage, abnormally connected background areas and outline offset areas, and each deviation area has a deviation source label. S3. Extract substrate features that can characterize the paper surface state before printing from the pre-press substrate image to form a single-piece substrate interference map. Based on the printing material tracking information and the boundary position of the paper substrate to be detected in the pre-press substrate image and the post-press image, register the single-piece substrate interference map to the same position in the post-press image. S4. In the initial inspection deviation map, the deviation area that matches the single-piece substrate interference map is marked as the substrate-related deviation area. The areas with insufficient ink coverage, abnormal background connectivity, and contour offset areas other than the substrate-related deviation area are respectively identified as false printing defects, excess ink spot defects, and contour geometric defects, and a new printing defect detection result is generated. Based on the substrate-related deviation area and the detection results of newly added printing defects, a rejection control command is generated, and based on the detection results of newly added printing defects, a printing operation control command is generated.
2. The online defect detection method for printed materials based on visual recognition according to claim 1, characterized in that, In S1, the tracking number of the printing material is generated by the arrival trigger signal upstream of the printing unit, and the conveying displacement information is formed by the encoder pulse sequence corresponding to the tracking number of the printing material. The pre-press substrate image, the post-press image, the standard printed layout, and the encoder pulse sequence are written into the same single-piece detection record.
3. The online defect detection method for printed materials based on visual recognition according to claim 2, characterized in that, In S2, when the standard printed layout is registered to the printed image, the overall position and orientation of the standard printed layout relative to the printed image are first determined based on the layout positioning mark in the standard printed layout. Then, based on the boundary corner points of the paper-based printing substrate in the post-printing image, the offset of the printing substrate is corrected, and based on the graphic feature points in the post-printing image, the local layout offset is corrected.
4. The online defect detection method for printed materials based on visual recognition according to claim 3, characterized in that, In S2, the initial inspection deviation map includes an ink coverage deviation layer, a background contamination deviation layer, and a contour geometry deviation layer; The desired ink coverage area, desired blank background area, and desired graphic outline in the standard printed layout are respectively mapped to the post-printed image; In the image region corresponding to the desired ink coverage area, the image region with ink coverage intensity lower than the desired coverage intensity is written into the ink coverage deviation layer; In the image region corresponding to the desired blank background region, the image region where a new connected component appears is written into the background contamination deviation layer; In the image region corresponding to the desired graphic contour, the image region where the actual graphic edge is normally offset relative to the desired graphic contour is written into the contour geometry deviation layer; The image areas written into the ink coverage deviation layer, the background contamination deviation layer, and the contour geometry deviation layer are all associated with deviation source labels and layout coordinates.
5. The online defect detection method for printed materials based on visual recognition according to claim 4, characterized in that, In S3, the single-piece substrate interference map includes a fiber texture interference layer, an indentation texture interference layer, a background color abrupt change interference layer, and a paper surface stain interference layer for writing the substrate features; The fiber texture interference layer records the texture direction and texture density of the fiber texture region; The indentation texture interference layer records the center line and period of the indentation texture region; The background color mutation interference layer records the direction and magnitude of grayscale mutations in the background color mutation region. The paper stain interference layer records the regional outline and grayscale distribution of the paper stain area; Each substrate interference region in the single-piece substrate interference diagram corresponds to the paper coordinates in the pre-press substrate image.
6. The online defect detection method for printed materials based on visual recognition according to claim 5, characterized in that, In S3, the registration of the single-piece substrate interference map to the same piece position in the printed image includes: Based on the encoder pulse sequence, the initial displacement of the single-piece substrate interference map relative to the transport direction of the printed image is determined; The leading edge position, side position, and boundary tilt angle of the paper-based substrate to be tested are obtained in the pre-printing substrate image and the post-printing image, respectively, and the initial displacement in the conveying direction is corrected accordingly. When the indentation texture region has a stable indentation period, the registration position after boundary correction is locally aligned based on the phase difference of the indentation period of the indentation texture region in the pre-printed substrate image and the post-printed image to obtain the same piece position. When the indentation texture area does not have a stable indentation period, or the indentation texture area is covered by post-printing ink and cannot form a reliable indentation period phase difference, the registration position after boundary correction is locally aligned based on at least one of the graphic feature points in the post-printing image, the outline of the substrate interference area in the single-piece substrate interference image, and the high-confidence fiber texture direction, so as to obtain the same piece position.
7. The online defect detection method for printed materials based on visual recognition according to claim 6, characterized in that, In S4, a substrate matching calculation is performed between the deviation area in the initial inspection deviation diagram and the substrate interference area in the single-piece substrate interference diagram. The basis matching calculation includes weighting the positional overlap, contour similarity, grayscale distribution similarity, and texture direction consistency to obtain the basis matching value; When the base matching value reaches the first base matching threshold corresponding to the interference layer to which the base interference region to which the matching is located belongs, the corresponding deviation region is marked as the base-associated deviation region.
8. The online defect detection method for printed materials based on visual recognition according to claim 7, characterized in that, In S4, the base association deviation area has a base association influence score, which is determined based on the area of the base association deviation area, the deviation source label corresponding to the base association deviation area, the base matching value corresponding to the base association deviation area, and the layout area weight. The review risk score is determined based on the deviation intensity of the baseline correlation influence score and the baseline correlation deviation region. When the review risk score reaches the review risk threshold, the baseline correlation deviation region is written into the review candidate region. The image area that remains in the ink coverage deviation layer after excluding the substrate-related deviation area forms the false printing defect; the image area that remains in the background contamination deviation layer forms the redundant ink spot defect; and the image area that remains in the contour geometry deviation layer forms the contour geometry defect. The severity of the false printing defect is determined based on the ink coverage loss rate and the weight of the printing area. The severity of the excess ink spot defect is determined based on the area of newly added connected components, the number of newly added connected components, and the weight of the page area. The severity of the contour geometry defect item is determined based on the normal offset, the continuous length of the offset, and the weight of the layout area. Specifically, when the normal offset and the continuous offset length in the contour geometric defect item meet the preset bending determination conditions, the contour geometric defect item is determined as a line bending defect item.
9. The online defect detection method for printed materials based on visual recognition according to claim 8, characterized in that, In S4, the rejection control command is generated according to the rejection trigger time, which is determined based on the distance between the post-printing image acquisition position and the rejection mechanism, the conveying speed of the paper-based printing substrate to be detected, and the response delay of the rejection mechanism. The rejection control instruction is determined by comprehensively considering the base correlation impact score, the review candidate area, the dummy print severity, the ink spot severity, and the outline geometry severity according to rejection threshold rules. The rejection threshold rules include at least one of the following: whether the base correlation impact score reaches the base rejection threshold, whether the review candidate area is located in a critical layout area, whether the dummy print severity reaches the dummy print rejection threshold, whether the ink spot severity reaches the ink spot rejection threshold, and whether the outline geometry severity reaches the outline geometry rejection threshold. The printing operation control command is determined by comprehensively considering the severity of the false printing, the severity of the ink spot, and the severity of the contour geometry according to the operation control threshold rules. The operation control threshold rules include whether the cumulative number of false printing defects in the same ink supply area, the cumulative number of excess ink spot defects in the same background area, and the cumulative number of contour geometry defects in the same contour area reach the corresponding trigger threshold within the consecutive print count window. The printing operation control command includes an ink supply adjustment command, a cleaning mechanism start command, and a correction adjustment command.
10. A visual recognition-based online detection system for printed matter defects, applied to the visual recognition-based online detection method for printed matter defects as described in any one of claims 1-9, characterized in that, It includes a single-piece image acquisition module, a layout deviation detection module, a substrate interference modeling module, and a defect diversion control module.