Intelligent quality inspection method and system for printed matter based on same-scale vector reference
Patent Information
- Application Number
- CN202611247487.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-10-30
AI Technical Summary
[0007]本发明的目的是提供基于同尺度矢量基准的印刷品智能质检方法及系统,以解决现有技术中不引入重采样伪差异的前提下实现电子清样与裁切后成品之间的同尺度比对的问题
[0055]与现有技术相比,本发明提供的基于同尺度矢量基准的印刷品智能质检方法及系统,本发明通过按成品物理尺寸与检测分辨率直接矢量渲染生成同尺度数字基准图像,从根本上杜绝了传统像素比对法中因电子清样版式尺寸与成品裁切尺寸不一致而进行位图缩放所引入的重采样抗锯齿伪差异,使配准环节在像素层面具备先天一致性,再配合内容锚定归一化处理消除采集过程带来的尺寸偏差,使后续差异提取所得到的差异区域均为真实内容差异而非算法人为产物。
Smart Images

Figure CN123015495A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printed matter quality inspection technology, specifically to an intelligent quality inspection method and system for printed matter based on a vector reference of the same scale. Background Technology
[0002] With the popularization of digital prepress technology, electronic proof files of printed content have been fully digitized, providing a technological foundation for automated print quality inspection based on image comparison. Currently, offline print content quality inspection generally uses general image comparison software. The basic process is as follows: convert the electronic proof file into a bitmap, scan the print to be inspected and convert it into a bitmap as well, perform pixel-by-pixel difference comparison between the two bitmaps, and determine whether there are content defects in the print based on the number of difference pixels or grayscale values.
[0003] However, the above-mentioned solutions face fundamental technical bottlenecks when dealing with printed materials such as exam papers and legal documents where the cut size of the finished product does not match the size of the electronic proof. Since the size of the electronic proof (e.g., 210 mm × 297 mm for A4 size) often differs from the physical size of the cut product (e.g., 195 mm × 270 mm), the system must perform a scaling operation on at least one of the electronic proof bitmap or scanned image before comparison to achieve size uniformity.
[0004] Bitmap scaling is essentially a resampling of a discrete pixel matrix. If the scaling factor is not an integer, the resampling process will inevitably introduce pixel grayscale interpolation calculations. The anti-aliasing effects produced by different scaling directions (enlargement or reduction) and different interpolation algorithms are significantly different, resulting in pixel grayscale deviations throughout the entire page between the scaled bitmap and the original vector rendered image after only size adjustments to the same original.
[0005] This deviation is not a genuine printing defect, but its magnitude is comparable to minor content defects such as missing punctuation or a missing decimal point. Furthermore, this problem stems from the mathematical nature of discrete signal resampling and cannot be eliminated by adjusting the judgment threshold: lowering the threshold results in the entire page being judged as a defect, leading to a false alarm rate so high as to be unusable; raising the threshold, however, overwhelms both genuine minor defects and false differences, causing missed detections. Therefore, how to achieve same-scale comparison between the electronic proof and the trimmed finished product without introducing resampling false differences is a pressing technical problem in this field.
[0006] In response to this, this application proposes an intelligent quality inspection method and system for printed materials based on a vector reference of the same scale, in order to solve the above problems. Summary of the Invention
[0007] The purpose of this invention is to provide an intelligent quality inspection method and system for printed materials based on a vector reference of the same scale, so as to solve the problem of achieving same-scale comparison between electronic proofs and finished products after cutting without introducing resampling pseudo-differences in the prior art.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] Firstly, this application provides an intelligent quality inspection method for printed materials based on a vector reference of the same scale, including:
[0010] Obtain an electronic sample file, perform vector rendering on the electronic sample file according to the physical size of the finished product and the detection resolution, and generate a digital reference image of the same scale. The digital reference image of the same scale is not obtained by cross-size resampling of an existing bitmap.
[0011] Acquire images of the printed matter to be inspected, and perform content anchoring normalization processing on the acquired images to obtain normalized images to be inspected;
[0012] The normalized image to be inspected is registered with the digital reference image of the same scale, and a geometric rationality acceptance gate is applied to the registration result. If the verification is passed, the registration result is adopted; if the verification is not passed, it is downgraded to the backup registration method and an alarm is recorded to obtain the aligned image to be inspected.
[0013] The aligned image to be inspected and the digital reference image of the same scale are subjected to differential processing to extract the difference region. Based on the physical area and grayscale characteristics of the difference region, a multi-threshold hierarchical judgment is made to obtain the page-level detection conclusion.
[0014] Perform page position identity matching on each page and complete integrity verification on the entire set. Based on the verification results, revise the page-level detection conclusions and output the final detection conclusions.
[0015] Furthermore, the method for generating the same-scale digital reference image is as follows:
[0016] The target pixel size is calculated by multiplying the finished physical size in millimeters by the number of dots per inch and then dividing by 25.4. The bitmap is directly rendered by the page description instructions in the electronic proof file, and cross-size scaling of existing bitmaps is prohibited.
[0017] For large-format impositions, each page is unfolded according to the imposition template, including its rotation angle, mirror state, and corresponding proof page number. After rendering each page, they are then assembled according to the template.
[0018] Furthermore, the content anchoring normalization process includes:
[0019] Perform connected component analysis on the images to be inspected to detect the bounding box of the page content, and remove the white borders, background colors, and black borders of the paper feed;
[0020] The tilt angle is estimated based on the minimum bounding rectangle for correction. The rotation is performed once in each of the positive and negative directions, and the result with the smaller bounding rectangle is taken.
[0021] The corrected image is scaled proportionally to the actual pixel size of the corresponding proof page content frame and then pasted back to its original position, so that the defect area dimension remains in physical millimeters.
[0022] Furthermore, the image registration employs multi-level pyramid enhanced correlation coefficient registration, progressively refining the resolution from low to high to sub-pixel accuracy.
[0023] The geometric rationality acceptance gate verification includes:
[0024] The rotation angle is not greater than the preset angle threshold, the translation amount is not greater than the preset translation threshold, and the residual after registration is not significantly worse than the residual before registration.
[0025] The alternative registration method is weak alignment using projection.
[0026] Furthermore, the multi-threshold hierarchical determination includes:
[0027] The differential regions obtained after suppressing text edge jitter by the production content mask are judged by multiple thresholds based on physical area, peak gray level difference and mean gray level difference.
[0028] Color difference and registration difference are decoupled from content defects, and under the preset tolerance judgment mode, only a prompt is given and the content is not rejected;
[0029] A separate high-confidence small solid defect channel is set up to separately judge small-area solid defects whose peak value and mean value both exceed the high threshold.
[0030] Page-level summary outputs three levels of conclusions: qualified, manually reviewed, and unqualified.
[0031] Furthermore, the method for determining the high-confidence small solid defect channel is as follows:
[0032] In the lightly blurred domain, candidate locations must simultaneously meet three conditions:
[0033] Here, the "this side" refers to the reference image side, the "opposite side" refers to the image to be inspected, and the two sides refer to the "this side" and the "opposite side". The gray value of the solid ink on the "this side" is lower than the first threshold, the absolute value of the gray value difference between the two sides is not less than the second threshold, and the minimum gray value of the neighboring area after corrosion on the opposite side is higher than the third threshold.
[0034] When all three conditions are met, the corresponding area will be detected and only classified into the manual review channel, and will not enter the automatic rejection channel.
[0035] Furthermore, the page position identity matching adopts an identity scoring mechanism:
[0036] Each page or page position is matched and scored with the candidate draft pages. When a misorder is determined, the expected page must be obviously mismatched and the other draft page must be obviously matched. If the evidence is insufficient, it is marked as uncertain and transferred to manual review.
[0037] The integrity check includes missing data collection detection, duplicate data collection detection, and total page count verification. Any integrity anomaly triggers a complete set of downgraded manual reviews.
[0038] Furthermore, when outputting the final detection conclusion, each defect area is marked with a red frame of adaptive line width and a serial number, and a large comparison bar is attached showing the sample and the actual object side by side. The coordinates of the defect area are translated into Chinese language describing the horizontal and vertical distances from the upper left corner in millimeters and the orientation of the nine-square grid.
[0039] A red banner illustration is generated to explain anomalies such as out-of-order scanning and missed scanning that lack pixel coordinates.
[0040] Each unqualified conclusion is accompanied by a visual explanation diagram.
[0041] Furthermore, after the electronic proof file is imported, its cryptographic hash value is calculated as the basis for locking the version. Any subsequent replacement of the benchmark must be approved and unlocked, and the reason must be registered.
[0042] The release and non-compliance confirmation of the test results must be confirmed by the second signatory's password;
[0043] The entire process is logged, forming a closed loop to prevent tampering during the testing process.
[0044] Secondly, this application provides an intelligent quality inspection system for printed materials based on a vector reference of the same scale, including:
[0045] The benchmark generation module is used to acquire electronic sample files, perform vector rendering on the electronic sample files according to the physical size of the finished product and the detection resolution, and generate digital benchmark images of the same scale.
[0046] The normalization processing module is used to acquire the captured image of the printed matter to be inspected, and to perform content anchoring normalization processing on the captured image to obtain the normalized image to be inspected.
[0047] The registration verification module is used to perform image registration between the normalized image to be inspected and the digital reference image of the same scale, and to apply a geometric rationality acceptance gate to the registration result. If the verification is passed, the registration result is adopted; if the verification is not passed, it is downgraded to the backup registration method and an alarm is recorded to obtain the aligned image to be inspected.
[0048] The hierarchical judgment module is used to perform differential processing on the aligned image to be inspected and the digital reference image of the same scale to extract the difference region, and perform multi-threshold hierarchical judgment based on the physical area and grayscale characteristics of the difference region to obtain the page-level detection conclusion.
[0049] The integrity correction output module is used to perform page position identity matching on each page and integrity verification on the entire set. Based on the verification results, it corrects the page-level detection conclusions and outputs the final detection conclusions.
[0050] Thirdly, this application also provides an electronic device, the electronic device comprising:
[0051] At least one processor; and
[0052] A memory communicatively connected to the at least one processor; wherein,
[0053] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.
[0054] Fourthly, this application also provides a computer-readable storage medium, wherein a computer program is stored on the medium, and the computer program, when executed by a processor, implements the method described in the first aspect.
[0055] Compared with existing technologies, the intelligent quality inspection method and system for printed materials based on the same-scale vector reference provided by this invention generates a digital reference image of the same scale by directly vector rendering according to the physical size of the finished product and the detection resolution. This fundamentally eliminates the pseudo-differences caused by bitmap scaling due to the inconsistency between the electronic proof size and the finished product cutting size in the traditional pixel comparison method. This makes the registration process inherently consistent at the pixel level. In addition, the content anchoring normalization process eliminates the size deviation caused by the acquisition process, so that the difference regions obtained by subsequent difference extraction are all real content differences rather than artificial products of the algorithm.
[0056] This invention elevates the difference determination from the pixel level to the physical area level, using square millimeters as the unit to determine the severity of defects. This effectively decouples normal process deviations such as text edge jitter and ink color fluctuation inherent in the printing process from actual content defects such as missing prints and overprints. The system can achieve offline fully automatic quality inspection with low false alarm rate and low false alarm rate on ordinary office computers without relying on GPU acceleration, solving the drawback of not being able to use networked inspection equipment in confidential printing locations. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0058] Figure 1 A flowchart of an intelligent quality inspection method for printed materials based on a vector reference of the same scale, provided in an embodiment of the present invention;
[0059] Figure 2 This is a block diagram of a smart quality inspection system for printed materials based on a vector reference of the same scale, provided for an embodiment of the present invention. Detailed Implementation
[0060] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0061] As attached Figure 1 As shown:
[0062] Example 1:
[0063] Intelligent quality inspection methods for printed materials based on the same-scale vector reference include:
[0064] S1. Obtain the confirmed electronic sample file, and perform vector rendering on the electronic sample file according to the physical size of the finished product and the detection resolution to generate a digital reference image of the same scale;
[0065] In step S1, the method for generating the same-scale digital reference image is as follows:
[0066] The target pixel size is calculated by multiplying the finished physical size in millimeters by the number of dots per inch and then dividing by 25.4. The bitmap is directly rendered by the page description instructions in the electronic proof file, and cross-size scaling of existing bitmaps is prohibited.
[0067] For large-format imposition, unfold each page position according to the imposition template, including the rotation angle, mirror state, and corresponding proof page number, render each page position, and then splice them according to the template.
[0068] Specifically, after obtaining the confirmed electronic proof file, the system first verifies the file's integrity and legality, checking whether the file is damaged, whether it has complete page description information, and whether the version is the final confirmed version.
[0069] After verification, the cryptographic hash value of the file is calculated as the base version identifier for this batch of testing. This hash value is bound to all subsequent test results. Any replacement or modification of the base file will cause the hash value to change, thereby triggering the version locking mechanism.
[0070] Subsequently, the system reads the page description instructions recorded in the electronic proof file, including but not limited to text encoding, graphic path, image sampling data, color space definition and rendering intent, and obtains the pre-configured physical size parameters of the finished product (in millimeters) and detection resolution parameters (in dots per inch).
[0071] The number of target pixels in the width and height directions is calculated according to the formula "target pixel size = finished physical size (mm) × detection resolution (DPI) ÷ 25.4". Then, the vector graphics rendering engine is called to directly draw the page description instructions onto the empty positioning map with the above target pixel size.
[0072] The rendering process fully preserves the mathematical precision of the vector information—the edges of text are calculated with subpixel precision for grayscale transitions, and the boundaries of graphics are defined by mathematical curves rather than approximated by discrete pixels. As a result, every pixel value in the resulting baseline image is derived from an accurate sample of the original vector description at the corresponding spatial location, without involving any resampling of existing bitmaps or pixel interpolation operations.
[0073] For large-format layouts (e.g., a long octavo with 8 pages or a half-sheet with 4 pages), the system reads the layout template configuration file before rendering. This file defines the spatial coordinates of each page position on the large sheet, the rotation angle (e.g., 0°, 90°, 180°, 270°), the mirroring status (horizontal mirror, vertical mirror, or no mirror), and the corresponding proof page number for that page position.
[0074] Each page is processed one by one according to the template definition. The proof content of the corresponding page number is transformed according to the defined rotation and mirror state and then rendered to the specified coordinate area of the large reference image. Finally, they are combined into a complete imposition reference image.
[0075] For single pages after trimming, the system renders each page independently according to the finished size template. The finished size template supports different specifications (such as A4, A3, B4 and custom sizes).
[0076] In either case, the reference image is persistently stored as a disk file, along with its generation parameters (finished product size, resolution, rendering time, sample hash value, etc.) for repeated use in subsequent registration and comparison processes, ensuring that all samples to be inspected within the same batch share the exact same reference data source.
[0077] S2. Acquire the image of the printed material to be inspected, and perform content anchoring normalization processing on the acquired image to obtain a normalized image to be inspected.
[0078] In step S2, the content anchoring normalization process includes:
[0079] Perform connected component analysis on the images to be inspected to detect the bounding box of the page content, and remove the white borders, background colors, and black borders of the paper feed;
[0080] The tilt angle is estimated based on the minimum bounding rectangle for correction. The rotation is performed once in each of the positive and negative directions, and the result with the smaller bounding rectangle is taken.
[0081] The corrected image is scaled proportionally to the actual pixel size of the corresponding proof page content box and then pasted back to its original position to keep the defect area dimension in physical millimeters.
[0082] Specifically, the printed materials to be inspected are scanned and then scanned to generate scanned image files.
[0083] The images of the printed materials to be inspected are acquired by an acquisition device, which includes, but is not limited to, a sheet-fed scanner, a line scan camera, and an area scan camera. When using a line scan camera for online acquisition, the line frequency and paper feed speed are matched to ensure the vertical resolution, and the physical size of the pixels obtained from camera calibration is used instead of the scanning resolution for normalization and physical area conversion. The remaining processing is the same as for the scanned images.
[0084] The recommended optical resolution for scanning is 300 DPI. When importing scanned images, the system first reads their actual resolution information and compares it with the recommended value. If the resolution is too low, it will automatically issue a prompt and clamp the upper limit of the scaling factor in the normalization process to prevent unacceptable distortion from being introduced after the low-resolution image is magnified.
[0085] Scanned images typically contain a large number of non-content areas, including black or dark gray stripes generated at the edges of the image when the scanner automatically feeds the paper, white edges around the original document caused by the scanning area being larger than the original document, and the imaging residue of the original document's paper background color during the scanning process. If these non-content areas are not processed, they will seriously interfere with the subsequent registration accuracy and difference determination.
[0086] The system processes the scanned images using connected component analysis techniques.
[0087] Furthermore, the system traverses the pixel matrix of the scanned image, marks pixels with gray values higher than the background threshold as foreground, and then aggregates all interconnected foreground pixels to form a set of connected components, with each connected component corresponding to an independent graphic or text block.
[0088] Based on this, the system calculates the bounding rectangle parameters of each connected component and uses the smallest rectangle that covers all significant connected components as the bounding box of the page content.
[0089] The detection of the bounding box does not simply look for the outermost foreground pixel. Instead, it uses a robust statistical method to count the distribution density of foreground pixels in both the horizontal and vertical directions. The content boundary is defined as the position where the density drops to a certain proportion, thereby avoiding abnormal expansion of the bounding box caused by isolated noise points.
[0090] At the same time, the system also implements logic for identifying large background blocks that are close to the edge:
[0091] If a large area of uniform pixels (such as the entire background color or the black border of the paper feed) is detected along one side of the image edge, the entire area is cropped out, rather than relying solely on the connected component results.
[0092] After the content area is cropped and extracted, the system corrects the tilt of the cropped content image.
[0093] The system calculates the minimum bounding rectangle of the foreground pixels in the content image and obtains the estimated tilt angle of the rectangle.
[0094] Considering that the tilt sign may be misjudged (i.e. the actual tilt direction of the image is opposite to the algorithm's estimate), the system rotates once in both directions and calculates the bounding box size of the content under the two rotation results. The smaller bounding box area is taken as the correct correction direction. This two-way verification mechanism effectively prevents further image distortion caused by incorrect correction direction.
[0095] After correction, the system reads the actual pixel size of the corresponding proof page content frame recorded in the baseline rendering stage. Using this size as a target, it scales the corrected image to be inspected proportionally, ensuring that the pixel size of the content area in the image to be inspected is exactly the same as that in the baseline image. After scaling, the content area of the image to be inspected is pasted back to the same coordinate origin as the baseline image, resulting in the normalized image to be inspected.
[0096] This re-alignment operation ensures that the image to be inspected and the reference image are not only identical in size at the content level, but also aligned in the same coordinate system in terms of spatial position. This lays a good foundation for "initial alignment" for subsequent registration and allows the defect area calculated in the subsequent difference judgment to be directly measured in physical square millimeters, no longer affected by the fluctuation of scanning resolution.
[0097] S3. Perform image registration between the normalized image to be inspected and the digital reference image of the same scale, and apply a geometric rationality acceptance gate check to the registration result. If the check passes, the registration result is adopted; if the check fails, it is downgraded to the backup registration method and an alarm is recorded to obtain the aligned image to be inspected.
[0098] In step S3, the image registration adopts multi-level pyramid enhanced correlation coefficient registration, which refines the image from low resolution to high resolution down to sub-pixel accuracy.
[0099] The geometric rationality acceptance gate verification includes:
[0100] The rotation angle is not greater than the preset angle threshold, the translation amount is not greater than the preset translation threshold, and the residual after registration is not significantly worse than the residual before registration.
[0101] The alternative registration method is weak alignment using projection.
[0102] Specifically, although the normalized image to be inspected and the digital reference image of the same scale are consistent in content size, there is still a slight translation between the two because the placement of the paper in the scanner during the scanning process is difficult to be completely consistent.
[0103] At the same time, a slight skew during paper feeding will also introduce a small rotation.
[0104] In addition, minute distortions in the scanner's optical system or the stretching or shrinking of the paper itself can also cause localized nonlinear deformation.
[0105] Therefore, image registration is required to achieve pixel-level precise alignment.
[0106] The system employs a multi-level pyramid registration algorithm based on image grayscale information.
[0107] The specific working method is as follows: the two images to be registered are downsampled to construct an image pyramid, for example, by decreasing the resolution by 8 times, 4 times, and 2 times. At the low resolution level, the image details are smoothed, the registration objective function is smoother, and the algorithm is more likely to converge to the global optimum rather than getting trapped in local extrema.
[0108] After obtaining the initial registration parameters at the low-resolution level, they are passed and refined step by step to the high-resolution level until sub-pixel accuracy registration is achieved at the original resolution level.
[0109] The registration model uses Euclidean transformation (including three degrees of freedom: horizontal translation, vertical translation, and rotation), without introducing scaling and affine transformation degrees of freedom. This is because the content size of the image to be inspected is already consistent with the reference after the aforementioned normalization process. Introducing scaling degrees of freedom may mistakenly treat the scanning scaling as a real content difference and compensate for it, causing minor defects to be absorbed by the registration process and missed.
[0110] The registration process iteratively optimizes a similarity metric to enhance the correlation coefficient. This metric is invariant to linear brightness changes between the image to be inspected and the reference image, and can resist the interference of scanning brightness fluctuations and contrast differences on registration accuracy.
[0111] After registration, the system does not directly adopt the registration result, but instead forces a geometric rationality acceptance check. This acceptance check has three independent judgment criteria:
[0112] First, the absolute value of the rotation angle obtained by registration must not exceed the preset angle threshold (such as 3°), because exceeding this angle means that there is serious skew in the scanning process and the registration parameters have exceeded the reasonable range.
[0113] Second, the absolute values of the horizontal and vertical translation amounts must not exceed a certain proportion (e.g., 8%) of the image width and height, respectively, because the scanning placement deviation is usually within a small range, and excessive translation amounts often mean that the registration algorithm has failed to converge.
[0114] Third, calculate the normalized mean square error between the registered image and the reference image, and compare it with the same index before registration. If the residual after registration is not significantly worse than the residual before registration, it indicates that the registration has actually improved the image alignment rather than "false convergence". False convergence means that the registration algorithm distorts the image to be checked to a position that is physically wrong but has a higher matching metric score.
[0115] If any of the above three standards are not met, the registration result will be judged as a gate that has failed the acceptance test.
[0116] Registration results that fail the acceptance gate are rejected, and the system automatically downgrades to the backup registration method. The backup registration method uses a weak alignment algorithm based on image projection features to calculate the grayscale projection curves of the image to be inspected and the reference image in the horizontal and vertical directions, respectively.
[0117] The horizontal and vertical displacements are estimated by finding the best translational match between the two curves, supplemented by tilt angle estimation based on the first moment.
[0118] Although this backup method is less accurate than the primary registration algorithm, it is stable and less prone to divergence, and can provide usable alignment results when the primary registration fails.
[0119] When a degradation occurs, the system records an alarm log to alert operators to pay attention to the registration status of the sample.
[0120] The registration results that pass the acceptance gate verification or the downgraded backup registration results are applied to the normalized image to be inspected, and spatial transformation (rotation, translation and resampling) is performed on it to finally obtain the aligned image to be inspected that is precisely aligned with the digital reference image of the same scale in space.
[0121] S4. Perform differential processing on the aligned image to be inspected and the digital reference image of the same scale to extract the difference region. Based on the physical area and grayscale characteristics of the difference region, perform multi-threshold hierarchical judgment to obtain the page-level detection conclusion.
[0122] In step S4, the multi-threshold hierarchical determination includes:
[0123] The differential regions obtained after suppressing text edge jitter by the production content mask are judged by multiple thresholds based on physical area, peak gray level difference and mean gray level difference.
[0124] Color difference and registration difference are decoupled from content defects, and under the preset tolerance judgment mode, only a prompt is given and the content is not rejected;
[0125] A separate high-confidence small solid defect channel is set up to separately judge small-area solid defects whose peak value and mean value both exceed the high threshold.
[0126] Page-level summary output includes three levels of conclusions: qualified, manually reviewed, and unqualified.
[0127] The method for determining the high-confidence small solid defect channel is as follows:
[0128] In the lightly blurred domain, candidate locations must simultaneously meet three conditions:
[0129] The grayscale of the solid ink on this side is lower than the first threshold, the absolute value of the grayscale difference between the two sides is not less than the second threshold, and the minimum grayscale of the neighboring area after etching at the same position on the opposite side is higher than the third threshold.
[0130] Here, the "this side" refers to the reference image side, and the "opposite side" refers to the image to be inspected side.
[0131] When all three conditions are met, the corresponding area will be detected and only classified into the manual review channel, and will not enter the automatic rejection channel.
[0132] Specifically, after alignment, the image to be inspected and the digital reference image of the same scale correspond precisely in spatial position. The system performs gray-level difference operation on the two images pixel by pixel, that is, calculates the absolute value of the difference between the gray value of the pixel in the image to be inspected and the gray value of the pixel in the reference image at the same coordinate position, and obtains the difference image.
[0133] However, during the printing process, due to physical factors such as ink diffusion and paper fiber penetration, the grayscale transition of the text edge area inevitably exhibits slight fluctuations between batches. This fluctuation is not a content defect, but it will produce a differential response.
[0134] To suppress such spurious differences, the system pre-generates a production content mask based on the reference image. This mask assigns a lower weight coefficient to the transition zone region at the edge of the text strokes and a higher weight coefficient to the inside of the strokes and the background region.
[0135] When performing differential calculations, the mask weights are multiplied into the differential values of each pixel, thereby effectively attenuating the pseudo-difference response introduced by edge jitter and making the differential results more focused on the real content abnormal areas.
[0136] After obtaining the weighted difference image, the system performs connected component aggregation on pixels whose difference values exceed a preset sensitivity threshold.
[0137] Furthermore, pixels with difference values higher than a threshold are marked as candidate defect pixels. Then, the eight-neighborhood connectivity rule is used to merge these candidate pixels into independent connected regions, with each connected region corresponding to a suspected defect.
[0138] For each connected region, the system calculates three core quantization features:
[0139] Physical area is the number of pixels within a region multiplied by the physical area of a single pixel (physical area of a single pixel = 25.4). 2 / Detection resolution 2 (unit: square millimeter)
[0140] Peak grayscale difference, the largest difference value within the region;
[0141] Mean grayscale difference, the arithmetic mean of the differences within a region.
[0142] The system performs multi-threshold joint judgment on each difference region based on the above three features. The judgment logic is divided into multiple levels:
[0143] First, perform a coarse screening based on physical area; isolated noise points with too small an area are ignored.
[0144] For areas that pass the coarse screening, we examine whether their peak grayscale difference and mean grayscale difference exceed the corresponding first and second thresholds, respectively. Only when both dimensions are met is it considered a content defect. If one dimension exceeds the standard while the other dimension is insufficient, it is attributed to scanning noise or uneven illumination.
[0145] Meanwhile, the system has built-in decoupling logic for color difference and registration difference. In the preset tolerance judgment mode, if the difference area has a uniform color deviation feature of large area, low peak value and low mean value, it is judged as color difference or registration deviation rather than content defect. The operator is only prompted and not rejected. Therefore, it effectively avoids large-scale misjudgment caused by ink color fluctuation of printing press.
[0146] The system also has a high-confidence small solid defect channel, which is specifically designed for small areas of solid ink dots with extremely strong grayscale contrast. If such defects appear on punctuation marks or decimal points of numbers, they may be small in area but affect key information. This channel makes separate judgments for areas with a physical area smaller than a certain threshold but with peak and average values higher than the corresponding high threshold, and does not automatically ignore them because of their small size.
[0147] After the above multi-level judgment of each difference area, the judgment results of all areas are summarized on the same page to generate a page-level three-level conclusion: qualified (no area triggers defect judgment), manually reviewed (there is a suspected defect but the confidence level is insufficient and it is automatically rejected), and unqualified (there is a clear area-level content defect).
[0148] The threshold is calibrated at the factory and physically isolated from the daily adjustable parameters in the system interface. Operators cannot adjust it arbitrarily during daily use, which fundamentally prevents the risk of missed detection due to incorrect threshold adjustment.
[0149] S5. Perform page position identity matching on each page and complete the integrity check on the entire set. Based on the check results, revise the page-level detection conclusion and output the final detection conclusion.
[0150] In step S5, the page position identity matching adopts an identity scoring mechanism:
[0151] Each page or page position is matched and scored with the candidate draft pages. When a misorder is determined, the expected page must be obviously mismatched and the other draft page must be obviously matched. If the evidence is insufficient, it is marked as uncertain and transferred to manual review.
[0152] The integrity check includes missing data detection, duplicate data detection, and total page count verification. Any integrity anomaly triggers a complete set of downgraded manual reviews.
[0153] Specifically, after the page-level determination is completed, the system performs identity consistency verification on a page-by-page basis for the entire set of printed materials.
[0154] In the case of cutting single pages, the system performs pairwise matching and scoring between the normalized image of each page to be inspected and the benchmark images of all candidate proof pages in the benchmark library. The matching score is based on the normalized cross-correlation or structural similarity index, which can stably measure the similarity between two images under the condition of normal printing fluctuations.
[0155] For large-format images, the system first divides the large image into individual page image blocks according to the layout template, and then performs the same matching score on each page block one by one.
[0156] The scoring results generate a page number-page similarity matrix.
[0157] The system executes the dual evidence misorder determination logic based on this matrix.
[0158] When the matching score of a page with the expected proof page is lower than the preset rejection threshold, and the matching score with another unexpected proof page is higher than the preset acceptance threshold, that is, when there are two independent pieces of evidence, namely "expected page obviously does not match" and "another proof page obviously matches", the system determines that the page order is disordered.
[0159] If only the expected page matching score is low but no other proof page matching score is high enough, for example, if all matching scores are low due to severe degradation of printing quality, this system will not hastily judge it as an out-of-order error, but will mark it as "uncertain" and transfer it to manual review.
[0160] This dual-evidence mechanism effectively prevents misjudgments of incorrect ordering caused by localized quality fluctuations in printed materials.
[0161] After completing identity matching for each page or page segment, the system performs a complete integrity check. The integrity check includes three dimensions:
[0162] Missed page detection involves checking whether the actual number of pages received equals the expected total number of pages for the batch.
[0163] Repeat scan detection checks for instances where the same sample page content matches multiple pages to be inspected.
[0164] Page number discrepancy detection checks whether the actual number of pages matches the configured expected number of pages.
[0165] If any integrity anomaly triggers the entire voting downgrade mechanism, the system will downgrade the entire product that might have been deemed qualified to a manual review conclusion instead of automatically approving it.
[0166] The core principle of this handling strategy is "better to investigate one more time than to let one case go unpunished."
[0167] In cases where the integrity of the product is in doubt, the final judgment should be made by human quality inspectors, who should combine the actual printing conditions to make a comprehensive judgment, thus avoiding high-risk omissions caused by logical defects in the automated system.
[0168] Finally, the system outputs the final inspection conclusion for each set of printed materials based on the combined weight of the page-level judgment conclusion and the integrity verification result.
[0169] This conclusion comprises three levels:
[0170] Finished product release (all pages are qualified and pass the integrity check), manual review (any suspected defects, page position identity is uncertain or integrity is abnormal), unqualified (there are clear area-level content defects).
[0171] While outputting the final inspection results, the system automatically generates a visual annotation map of each defect, using an adaptive red frame and serial number to highlight the defect location. The line width and font size are scaled with the page size to ensure that it remains clearly legible after printing.
[0172] Each defect is accompanied by a large comparison strip placed side by side with the sample, which facilitates quick manual confirmation;
[0173] The pixel coordinates of the defective area are automatically translated into numerical coordinates such as "horizontal distance from the top left corner ×× mm, vertical distance ×× mm" and supplemented with Chinese terms describing the location in a nine-square grid (such as top left, center, bottom right, etc.).
[0174] For integrity anomalies such as out-of-order or missed scans that lack pixel coordinates, the system generates a red banner problem description image instead of location annotations.
[0175] All the above-mentioned visual information is compiled into a brochure-style PDF report and structured data output in CSV / JSON format, ensuring that every unqualified conclusion is accompanied by complete image evidence and is traceable throughout the process.
[0176] As can be seen from the above, this invention generates a digital reference image of the same scale by directly vector rendering according to the physical size of the finished product and the detection resolution. This fundamentally eliminates the pseudo-differences caused by bitmap scaling due to the inconsistency between the electronic proof size and the finished product cutting size in the traditional pixel comparison method. This ensures that the registration process has inherent consistency at the pixel level. Furthermore, the content anchoring normalization process eliminates the size deviation caused by the acquisition process, so that the difference regions obtained by subsequent difference extraction are all real content differences rather than artificial products of the algorithm.
[0177] This invention elevates the difference determination from the pixel level to the physical area level, using square millimeters as the unit to determine the severity of defects. This effectively decouples normal process deviations such as text edge jitter and ink color fluctuation inherent in the printing process from actual content defects such as missing prints and overprints. The system can achieve offline fully automatic quality inspection with low false alarm rate and low false alarm rate on ordinary office computers without relying on GPU acceleration, solving the drawback of not being able to use networked inspection equipment in confidential printing locations.
[0178] like Figure 2 As shown, in one embodiment, the present invention also provides an intelligent quality inspection system for printed materials based on a vector reference of the same scale, comprising:
[0179] The benchmark generation module is used to acquire the confirmed electronic sample file, perform vector rendering on the electronic sample file according to the physical size of the finished product and the detection resolution, and generate a digital benchmark image of the same scale.
[0180] The normalization processing module is used to acquire the captured image of the printed matter to be inspected, and to perform content anchoring normalization processing on the captured image to obtain the normalized image to be inspected.
[0181] The registration verification module is used to perform image registration between the normalized image to be inspected and the digital reference image of the same scale, and to apply a geometric rationality acceptance gate to the registration result. If the verification is passed, the registration result is adopted; if the verification is not passed, it is downgraded to the backup registration method and an alarm is recorded to obtain the aligned image to be inspected.
[0182] The hierarchical judgment module is used to perform differential processing on the aligned image to be inspected and the digital reference image of the same scale to extract the difference region, and perform multi-threshold hierarchical judgment based on the physical area and grayscale characteristics of the difference region to obtain the page-level detection conclusion.
[0183] The integrity correction output module is used to perform page position identity matching on each page and integrity verification on the entire set. Based on the verification results, it corrects the page-level detection conclusions and outputs the final detection conclusions.
[0184] As can be seen from the above, the present invention adds page position identity matching and integrity voting verification mechanism on the basis of pixel-level content comparison. It uses the principle of mutual verification of dual evidence to determine the logical high-risk defects such as misaligned pages, page order swaps and missing pages that cannot be detected by pixel differences. This makes up for the fundamental deficiency of existing general image comparison software that only compares pixels and does not verify page order.
[0185] Meanwhile, the present invention employs a mutual verification logic in the micro-defect detection channel that simultaneously satisfies three conditions: the presence of solid ink on the reference side, significant grayscale contrast between the two sides, and paper whiteness at the same position on the side to be inspected. This allows for highly sensitive capture of sub-millimeter-level missing key elements such as punctuation marks and decimal points, and forces such detection results to be classified only into the manual review channel and never enter the automatic rejection channel, effectively preventing the misjudgment and rejection of critical samples due to excessive pursuit of automation.
[0186] The geometric rationality acceptance gate and downgrade backup mechanism in the registration process, together with the overall downgrade strategy for integrity anomalies, constitute a conservative decision-making system that distrusts automated results and presumes innocence. Any uncertainty in any step will be transferred to manual review, and any integrity anomaly will result in a complete downgrade. This ensures that every automated release conclusion is supported by sufficient evidence, and every non-compliant conclusion is accompanied by a visual explanation diagram. This fundamentally eliminates quality accidents caused by missed detection of high-risk defects and fully meets the industry's rigid requirement of zero tolerance for errors in the content of high-security printed materials such as exam papers.
[0187] In one embodiment, this application also provides an electronic device, the electronic device comprising:
[0188] At least one processor; and
[0189] A memory communicatively connected to the at least one processor; wherein,
[0190] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in Embodiment 1.
[0191] In one embodiment, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in Embodiment 1.
[0192] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A smart quality inspection method for printed materials based on a vector reference of the same scale, characterized in that, include: Obtain an electronic sample file, perform vector rendering on the electronic sample file according to the physical size of the finished product and the detection resolution, and generate a digital reference image of the same scale. The digital reference image of the same scale is not obtained by cross-size resampling of an existing bitmap. Acquire images of the printed matter to be inspected, and perform content anchoring normalization processing on the acquired images to obtain normalized images to be inspected; The normalized image to be inspected is registered with the digital reference image of the same scale, and a geometric rationality acceptance gate is applied to the registration result. If the verification is passed, the registration result is adopted; if the verification is not passed, it is downgraded to the backup registration method and an alarm is recorded to obtain the aligned image to be inspected. The aligned image to be inspected and the digital reference image of the same scale are subjected to differential processing to extract the difference region. Based on the physical area and grayscale characteristics of the difference region, a multi-threshold hierarchical judgment is made to obtain the page-level detection conclusion. Perform page position identity matching on each page and complete integrity verification on the entire set. Based on the verification results, revise the page-level detection conclusions and output the final detection conclusions.
2. The intelligent quality inspection method for printed materials based on a vector reference of the same scale according to claim 1, characterized in that, The method for generating the same-scale digital reference image is as follows: The target pixel size is calculated by multiplying the finished physical size in millimeters by the number of dots per inch and then dividing by 25.
4. The bitmap is directly rendered by the page description instructions in the electronic proof file, and cross-size scaling of existing bitmaps is prohibited. For large-format impositions, each page is unfolded according to the imposition template, including its rotation angle, mirror state, and corresponding proof page number. After rendering each page, they are then assembled according to the template.
3. The intelligent quality inspection method for printed materials based on a vector reference of the same scale according to claim 1, characterized in that, The content anchoring normalization process includes: Perform connected component analysis on the images to be inspected to detect the bounding box of the page content, and remove the white borders, background colors, and black borders of the paper feed; The tilt angle is estimated based on the minimum bounding rectangle for correction. The rotation is performed once in each of the positive and negative directions, and the result with the smaller bounding rectangle is taken. The corrected image is scaled proportionally to the actual pixel size of the corresponding proof page content frame and then pasted back to its original position, so that the defect area dimension remains in physical millimeters.
4. The intelligent quality inspection method for printed materials based on a vector reference of the same scale according to claim 1, characterized in that, The image registration employs multi-level pyramid enhanced correlation coefficient registration, refining the image registration step by step from low resolution to high resolution down to sub-pixel accuracy. The geometric rationality acceptance gate verification includes: The rotation angle is not greater than the preset angle threshold, the translation amount is not greater than the preset translation threshold, and the residual after registration is not significantly worse than the residual before registration. The alternative registration method is weak alignment using projection.
5. The intelligent quality inspection method for printed materials based on a vector reference of the same scale according to claim 1, characterized in that, The multi-threshold hierarchical determination includes: The differential regions obtained after suppressing text edge jitter by the production content mask are judged by multiple thresholds based on physical area, peak gray level difference and mean gray level difference. Color difference and registration difference are decoupled from content defects, and under the preset tolerance judgment mode, only a prompt is given and the content is not rejected; A separate high-confidence small solid defect channel is set up to separately judge small-area solid defects whose peak value and mean value both exceed the high threshold. Page-level summary outputs three levels of conclusions: qualified, manually reviewed, and unqualified.
6. The intelligent quality inspection method for printed materials based on a vector reference of the same scale according to claim 5, characterized in that, The method for determining the high-confidence small solid defect channel is as follows: In the lightly blurred domain, candidate locations must simultaneously meet three conditions: Here, the "this side" refers to the reference image side, the "opposite side" refers to the image to be inspected, and the two sides refer to the "this side" and the "opposite side". The gray value of the solid ink on the "this side" is lower than the first threshold, the absolute value of the gray value difference between the two sides is not less than the second threshold, and the minimum gray value of the neighboring area after corrosion on the opposite side is higher than the third threshold. When all three conditions are met, the corresponding area will be detected and only classified into the manual review channel, and will not enter the automatic rejection channel.
7. The intelligent quality inspection method for printed materials based on a vector reference of the same scale according to claim 1, characterized in that, The page position identity matching adopts an identity scoring mechanism: Each page or page position is matched and scored with the candidate draft pages. When a misorder is determined, the expected page must be obviously mismatched and the other draft page must be obviously matched. If the evidence is insufficient, it is marked as uncertain and transferred to manual review. The integrity check includes missing data collection detection, duplicate data collection detection, and total page count verification. Any integrity anomaly triggers a complete set of downgraded manual reviews.
8. The intelligent quality inspection method for printed materials based on a vector reference of the same scale according to claim 1, characterized in that, When outputting the final detection conclusion, each defect area is marked with a red frame of adaptive line width and a serial number, and a large comparison bar is attached with the sample and the actual object side by side. The coordinates of the defect area are translated into Chinese language with the horizontal and vertical millimeter distances from the upper left corner and the nine-square grid orientation. A red banner illustration is generated to explain anomalies such as out-of-order scanning and missed scanning that lack pixel coordinates. Each unqualified conclusion is accompanied by a visual explanation diagram.
9. The intelligent quality inspection method for printed materials based on a vector reference of the same scale according to claim 1, characterized in that, After the electronic proof file is imported, its cryptographic hash value is calculated as the basis for locking the version. Any subsequent replacement of the benchmark must be approved and unlocked, and the reason must be registered. The release and non-compliance confirmation of the test results must be confirmed by the second signatory's password; The entire process is logged, forming a closed loop to prevent tampering during the testing process.
10. A smart quality inspection system for printed materials based on a vector reference of the same scale, characterized in that, include: The benchmark generation module is used to acquire electronic sample files, perform vector rendering on the electronic sample files according to the physical size of the finished product and the detection resolution, and generate digital benchmark images of the same scale. The normalization processing module is used to acquire the captured image of the printed matter to be inspected, and to perform content anchoring normalization processing on the captured image to obtain the normalized image to be inspected. The registration verification module is used to perform image registration between the normalized image to be inspected and the digital reference image of the same scale, and to apply a geometric rationality acceptance gate to the registration result. If the verification is passed, the registration result is adopted; if the verification is not passed, it is downgraded to the backup registration method and an alarm is recorded to obtain the aligned image to be inspected. The hierarchical judgment module is used to perform differential processing on the aligned image to be inspected and the digital reference image of the same scale to extract the difference region, and perform multi-threshold hierarchical judgment based on the physical area and grayscale characteristics of the difference region to obtain the page-level detection conclusion. The integrity correction output module is used to perform page position identity matching on each page and integrity verification on the entire set. Based on the verification results, it corrects the page-level detection conclusions and outputs the final detection conclusions.
11. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The medium is a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the method as described in any one of claims 1-9.