Ink printing surface quality detection method based on computer vision
By using a computer vision-based method for detecting the surface quality of ink printing, combined with multi-sensor collaboration and perspective transformation adjustment, the problems of misjudgment, missed detection, and low production line operating efficiency in traditional detection methods have been solved, achieving high-precision and high-efficiency printing quality detection and production.
Patent Information
- Application Number
- CN202511632194.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-27
AI Technical Summary
Traditional ink printing quality inspection methods cannot meet the needs of high-precision, high-efficiency and flexible production. They suffer from problems such as misjudgment, missed detection and low production line operating efficiency, and cannot adapt to the challenges of multi-variety small-batch production and equipment aging.
A computer vision-based method for detecting the surface quality of ink printing is adopted. This method combines image acquisition and preprocessing, template matching, ORB feature point detection, deformation transformation algorithm, multi-sensor collaboration, and perspective transformation adjustment to dynamically optimize parameters and achieve real-time correction and closed-loop verification of printing quality.
It improves the accuracy and efficiency of printing quality inspection, reduces the false judgment rate and the missed inspection rate, increases the production line yield, adapts to multi-variety small-batch production, shortens the production changeover cycle, and realizes high-quality production of high-end printing.
Smart Images

Figure CN121582152A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printing quality inspection technology, and in particular to a computer vision-based method for inspecting the surface quality of ink printing. Background Technology
[0002] In the ink printing production process, traditional quality inspection methods are no longer adequate to meet the current industry's demands for high precision, high efficiency, and flexible production, presenting numerous pain points that urgently need to be addressed. On the one hand, quality inspection methods dominated by human experience are highly subjective and unstable. Different personnel have significantly different standards for judging printing quality, resulting in more than 5% of printed products being "misjudged as defective" or "defective products being missed," causing a large amount of waste of good products and the risk of customer complaints. At the same time, single-algorithm detection has obvious limitations. Relying solely on edge detection cannot identify complex defects such as local stretching and nonlinear deformation, with a false negative rate exceeding 10%, failing to meet the stringent precision requirements of high-end printing such as electronic circuits and anti-counterfeiting labels.
[0003] On the other hand, production line operation efficiency and adaptability face challenges. Traditional inspection is lagging, processing deformation only after image acquisition and analysis, which can easily lead to defective products flowing into downstream processes, significantly increasing rework costs. Moreover, parameters rely on manual settings and cannot dynamically adapt to conditions such as ink gradation and equipment aging, resulting in a production line yield drop of more than 5% within 3 months. When changing production lines, recalibrating mechanical alignment and adjusting inspection parameters can take up to 2 hours, making it difficult to respond to the flexible production needs of multiple varieties and small batches.
[0004] Existing technologies mostly focus on a single dimension and have not built a complete system for multi-sensor collaboration, dynamic parameter self-optimization, and closed-loop quality verification, which cannot support high-quality production in high-end printing. This invention is therefore proposed to solve the above-mentioned industry problems. Summary of the Invention
[0005] The purpose of this invention is to propose a computer vision-based method for detecting the surface quality of ink printing in order to solve the above-mentioned problems.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] Computer vision-based methods for inspecting the surface quality of ink printing include:
[0008] Image acquisition and preprocessing: Dynamically acquire printed images and process them using preprocessing techniques;
[0009] Print quality inspection: Based on template matching and ORB feature point detection, the deformation index is calculated through deformation decomposition algorithm to determine whether the printing quality meets the standard and output a trigger signal;
[0010] Tension and displacement parameter acquisition and analysis: collect the corresponding printing data, calculate the comprehensive adjustment factor after pretreatment, and quantify the running deviation of the printing equipment;
[0011] Calibration and perspective transformation adjustment: obtain the initial perspective matrix based on the chessboard calibration, dynamically optimize the matrix parameters combined with the adjustment factor, real-time correct the printed image, and feedback to the quality detection module for secondary verification.
[0012] Preferably, the image acquisition and preprocessing specifically includes:
[0013] After laying out the image acquisition hardware, dynamic image acquisition is performed to track the motion state of the web material in real time
[0014] Wherein, the printed image is collected at a fixed frequency during normal detection; when it is determined that calibration is needed, the calibration mode is automatically switched to, the camera is focused on the chessboard calibration plate, and a preset number of calibration plate images at different angles are continuously captured
[0015] And the image is processed to include noise removal, contrast enhancement, distortion initial correction, and ROI extraction.
[0016] Preferably, the printing quality detection specifically includes:
[0017] Store the high-definition template of the standard printed pattern, including the coordinates and shape parameters of the key feature area;
[0018] Extract feature points from the preprocessed image to be detected, including key point coordinates, directions, and descriptors;
[0019] Match the feature points of the image to be detected with the template feature points through the matcher, eliminate the mismatch, calculate the displacement deviation of the matched points.
[0020] Preferably, the calculation process includes:
[0021] Construct the global deformation field of the printed pattern, fit the feature point deviation as a continuous deformation function, and calculate the deformation gradient of the local area:
[0022]
[0023] Wherein,
[0024] , , , are the weight factors corresponding to the displacement, rotation, scaling deviation and local deformation, respectively;
[0025] , is the displacement deviation; is the average distance between the template feature points;
[0026] is a rotation angle deviation;
[0027] is a maximum rotation deviation allowed;
[0028] is a scaling ratio deviation;
[0029] is a maximum scaling deviation allowed;
[0030] is a local deformation index.
[0031] Preferably, the, The acquisition process comprises:
[0032] The feature point pairs are extracted to construct a TPS interpolation function to generate a deformation field, and the displacement data of the deformation field are used to calculate the displacement gradient of the corresponding region to obtain a strain tensor;
[0033] The maximum principal strain of the strain tensor is taken as the deformation index of the region.
[0034] Preferably, the tension and displacement parameter acquisition and analysis specifically comprises:
[0035] The corresponding tension and displacement data of the coiled material are obtained based on a tension sensor, a laser displacement sensor and an encoder;
[0036] After receiving a trigger signal of the quality detection step, the sensor records data to obtain tension values, transverse displacement and longitudinal displacement;
[0037] After obtaining the average tension, the average transverse displacement and the average longitudinal displacement, a comprehensive deviation value is calculated: the comprehensive deviation value is divided by the standard parameter value to obtain an adjustment factor.
[0038] Preferably, the calibration and perspective transformation adjustment specifically comprises:
[0039] A preset number of checkerboard images are collected, and corner point coordinates and corresponding physical coordinates are extracted through a sub-pixel corner point detection algorithm;
[0040] An external parameter of the camera is calculated, and an initial perspective transformation matrix is generated , satisfying ;
[0041] An adjustment factor is established to map the matrix , and the adjustment factor is integrated into the matrix parameter:
[0042]
[0043] wherein,
[0044] for scaling correction, for rotation correction matrix based on dynamic adjustment according to the deviation direction;
[0045] for lateral / longitudinal displacement deviation, separately correct translation parameters in it.
[0046] Preferably, the still further comprises:
[0047] for the newly collected printed image, using the optimized perspective transformation, the formula is:
[0048]
[0049]
[0050] output the corrected image, feedback to the quality detection step for secondary verification.
[0051] Preferably, the control and feedback: through the industrial controller cooperates with each step work, will adjust the factor into motor control instruction, combined with HMI realizes man-machine interaction, data management and abnormal alarm.
[0052] In summary, due to the adoption of the above technical scheme, the beneficial effects of the present application are:
[0053] 1、The present application quantifies the displacement, rotation and other deviations to pixel level by extracting feature points, combining FLANN matcher with RANSAC algorithm to remove false matches; introduces thin plate spline interpolation to construct global deformation field, first realizes the quantitative detection of local stretching and nonlinear distortion, and the detection rate of local deformation defects is increased; at the same time, through the self-learning weight factor of random forest model, it adapts to the different product defect sensitivity, reduces the quality inspection deviation, reduces the misjudgment rate, effectively solves the problems of traditional detection missed detection and misjudgment, and meets the high precision demand of high-end printing such as electronic circuit and anti-counterfeiting label.
[0054] 2、The present application realizes the breakthrough of production line efficiency through whole process collaborative optimization: multi-sensor cooperation and dynamic calculation of adjustment factor shorten the deformation response time, avoid the defective products flowing into the downstream; parameter self-calibration mode combined with template library compresses the production change cycle, adapts to multi-variety small-batch production; closed-loop control system realizes dynamic optimization of perspective matrix and precise control of motor, promotes the stability of production line yield; in addition, algorithm compensation reduces the dependence of equipment precision, realizes the double improvement of quality and efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0055] Further details, features and advantages of the present application are disclosed in the following description of exemplary embodiments in conjunction with the attached drawings, in which:
[0056] Figure 1 Flowchart of the method of the present application. DETAILED DESCRIPTION
[0057] Several embodiments of the present application will be described in detail herein below with reference to the attached drawings, in order to enable a person skilled in the art to implement the present application. The present application can be embodied in many different forms and for many different purposes and should not be limited to the embodiments set forth herein. These embodiments are provided so that the present application is thorough and complete, and fully conveys the scope of the present application to those skilled in the art. The embodiments are not limiting of the present application.
[0058] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and / or the present specification, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0059] Embodiment 1
[0060] The detailed description of its embodiments is combined with the attached Figure 1 are described in detail.
[0061] The attached Figure 1 Flowchart of the computer vision-based ink printed surface quality detection method provided by the embodiment of the present application, which shows the complete steps from image acquisition and preprocessing to calibration and perspective transformation adjustment.
[0062] In the present embodiment, it comprises:
[0063] Image acquisition and preprocessing: dynamic acquisition of printed images through industrial cameras, multi-spectral light sources and other hardware, combined with adaptive filtering, CLAHE enhancement, distortion correction and ROI extraction and other preprocessing techniques to process the images;
[0064] Specifically, it comprises:
[0065] After laying out the image acquisition hardware, dynamic image acquisition is performed, and the motion state of the web material is tracked in real time (the camera is triggered by the encoder to ensure that each frame of image corresponds to a fixed length of printed area, such as 0.5mm / frame);
[0066] Among them, the normal detection is collected at a fixed frequency; when it is determined that calibration is needed, it is automatically switched to calibration mode, the camera is controlled to focus on the chessboard calibration plate (preset at a fixed position beside the printing equipment), and a preset number of different angle calibration plate images are continuously shot (to avoid single image error);
[0067] And the image is processed including noise removal, contrast enhancement, distortion correction and ROI extraction.
[0068] Noise removal: adaptive median filtering (for salt and pepper noise in printed texture) combined with Gaussian filtering (to smooth high-frequency noise), with filter kernel size dynamically adjusted according to image noise intensity (3x3 to 7x7);
[0069] Contrast enhancement: CLAHE (Contrast Limited Adaptive Histogram Equalization) is used for low-light areas to avoid local overexposure and enhance the visibility of subtle defects (such as uneven ink);
[0070] Distortion correction: based on the camera intrinsic matrix (obtained in advance by Zhang Zhengyou calibration method), radial and tangential distortion correction is performed on the image.
[0071] ROI extraction: through the preset printing area bounding box (based on template matching positioning), the non-printing area (such as the edge blank of the roll material) is cropped, reducing the invalid calculation amount.
[0072] Quality detection: based on template matching and ORB feature point detection, the deformation index including displacement, rotation and scaling deviation is calculated by a deformation quantization algorithm to determine whether the printing quality meets the standard and output a trigger signal;
[0073] Specifically including:
[0074] Store high-definition templates of standard printing patterns (classified by product model), including coordinates and morphological parameters of key feature areas (such as LOGO, text edge, line corner);
[0075] Support template update (when the printing process is adjusted, update the reference features by manual annotation or automatic learning);
[0076] For the pre-processed image to be detected, the ORB algorithm (considering speed and accuracy) is used to extract feature points (number ≥500 per frame), including key point coordinates, direction and descriptor;
[0077] Match the feature points of the image to be detected with the template feature points through the FLANN matcher, eliminate the false matches (use RANSAC algorithm, keep the matching pairs with an inner point proportion ≥80%), and calculate the displacement deviation of the matching pairs.
[0078] By constructing a standardized template library, storing high-definition templates containing key features (such as LOGO, text edge, etc.) according to product models, converting manual experience judgment into precise digital feature comparison, and supporting template updating during process adjustment, subjective bias is eliminated, and quality inspection judgment bias is reduced. At the same time, the ORB algorithm extracts feature points with consideration of speed and accuracy, and the FLANN matcher combined with the RANSAC algorithm eliminates false matches, quantifies the displacement deviation of matching points, covers complex defects such as stretching and distortion, reduces the rate of missed defects, accurately identifies defects, reduces the waste of good products and the risk of customer complaints for defective products.
[0079] The calculation process includes:
[0080] Based on thin plate spline interpolation (TPS), a global deformation field of the printed pattern is constructed, the feature point deviation is fitted as a continuous deformation function, and the deformation gradient (such as edge stretching rate, corner distortion) of the local area is calculated;
[0081]
[0082] Among them,
[0083] , , , are the weight factors corresponding to displacement, rotation, scaling deviation and local deformation respectively; it needs to be adjusted according to the quality standard of printed matter and the sensitive point of defect; use the historical data of production line (including defect label) to train random forest / regression model, automatically learn the optimal weight;
[0084] Example: fine line printing (such as circuit board): displacement deviation is easy to cause short circuit, set to 0.6 (prefer to focus on displacement); large format poster printing (including large angle pattern): rotation deviation affects vision, set to 0.4 (prefer to focus on rotation).
[0085] , is the displacement deviation; in the detection graph and the standard graph, the coordinate difference of the feature points in (horizontal direction), (vertical direction) reflects the degree of pattern deviation. Use feature matching algorithm (such as SuperGlue) to find the same point pair, calculate , .
[0086] is the average distance between template feature points; in the standard template, the average distance of all feature point pairs (unit: pixel), used for normalizing displacement deviation (to avoid the incommensurability of bias value caused by different template sizes);
[0087] When pre-processing the standard template, traverse all feature point pairs, calculate the Euclidean distance and take the mean value.
[0088] Rotation angle deviation; detect the rotation angle difference between the test image and the standard image (unit: radian / degree), reflecting the pattern twist degree;
[0089] For the displacement vector of the feature point pair, use principal component analysis (PCA) to fit the main direction and calculate the direction angle difference; or use the phase correlation method to quickly estimate the global rotation angle.
[0090] Maximum allowable rotation deviation; according to the standard of printing process, set the maximum acceptable rotation error.
[0091] Refer to industry standards (such as packaging printing ISO standards);
[0092] Production line trial production verification: produce 100 rolls continuously, and statistically analyze the maximum rotation deviation that does not affect the downstream process (such as die cutting, lamination), as .
[0093] Scaling ratio deviation; detect the size ratio difference between the test image and the standard image, reflecting the pattern stretching / compression degree. Calculate the distance ratio of the feature point pairs: .
[0094] Maximum allowable scaling deviation; the maximum scaling error allowed by the process (such as 5% that is =0.05), exceeding which will affect the pattern adaptability (such as QR code scaling exceeding 10% cannot be scanned).
[0095] Local deformation index; use thin plate spline (TPS) to fit the local stretching / twisting of the printed matter, convert the discrete feature point deviation into a continuous deformation field, and calculate the strain value of the local area.
[0096] Traditional quality inspection only looks at displacement / rotation in a single dimension. This scheme constructs a global deformation field through TPS interpolation, and for the first time realizes the quantitative detection of local stretching (such as 0.1mm twisting of the edge of the text) and nonlinear twisting (such as pattern corner wrinkles) (strain resolution 0.01%).
[0097] For example, in fine line printing (such as FPC), it can identify the risk of short circuit caused by global displacement up to standard but local stretching of 0.2mm, which will increase the detection rate of local deformation defects from 30% to 95%, avoiding good products from being shipped and bad products from causing customer complaints.
[0098] Abandoning empiricism with fixed weights, through random forest / regression model learning historical defect data (such as 1000+ production data containing defect labels), automatically adjusting 、 、 、 .
[0099] Traditional line parameters (such as 、 ) are static empirical values, and the yield will decrease after 3 months due to ink gradation and equipment aging. This solution dynamically updates parameters (such as from 1° to 1.2° to adapt to equipment aging) through line trial production verification (100 consecutive volumes), and iterates weights combined with 3000+ frame data every week to automatically adapt quality standards to process changes, resulting in long-term stable line yield at the preset standard.
[0100] The acquisition process includes:
[0101] Extract feature point pairs (template) and (detection map);
[0102] Construct TPS interpolation function:
[0103]
[0104] is the base function, is the control point weight, and the deviation is fitted by the least squares method;
[0105] Generate deformation field: for each pixel of the detection map , , visualize as a heat map (red for high deformation area);
[0106] Calculate the displacement gradient (using the Sobel operator or finite difference) of the corresponding area for the displacement data of the deformation field:
[0107]
[0108] The strain tensor is approximately:
[0109] Take the maximum principal strain of the strain tensor as the deformation index of the area, is the average (or maximum, depending on defect sensitivity) of the maximum principal strain of all 10x10 blocks.
[0110] Maximum principal strain greater than 0.1 (10% strain): local stretching is severe, which may cause ink cracking and pattern blurring; combined with the elastic modulus of the printing ink (such as the elastic modulus of UV ink 2GPa), the actual stress can be converted, but it is more convenient to use strain value directly in engineering.
[0111] New production line / new product switching, first run parameter self-calibration mode: continuous acquisition of 100 frames of standard sample image, statistics feature point deviation, strain value, automatic calculation 、 、 Parameters; manual only need to set the final quality threshold, reduce the production line debugging threshold.
[0112] Traditional printing detection only focuses on global displacement / rotation / scaling, but printing will actually cause local stretching (such as text edge deformation) and distortion (such as pattern corner wrinkles) due to ink accumulation and uneven mechanical pressure. These nonlinear deformations are the core reasons for ink cracking and pattern blurring, but they are ignored by existing methods.
[0113] Construct local deformation field by thin plate spline interpolation (TPS), convert discrete feature point deviation into continuous strain distribution (such as 10x10 pixel block strain value), and first realize the quantitative detection of millimeter-level local deformation (strain resolution 0.01%).
[0114] Can identify local defects missed by global detection (such as a roll of printed matter with global deformation meeting standards, but local strain >0.1 causing ink cracking), and improve the detection rate of local deformation class defects from 30% to 95%, directly reducing the complaint rate of end users receiving pattern blurred products.
[0115] Traditional threshold is an empirical value, not combined with ink physical properties (such as UV ink elastic modulus 2GPa, water-based ink elastic modulus 0.5GPa), resulting in different effects of the same strain value on different inks (such as 0.1 strain is a small deformation for UV ink, but it may have cracked for water-based ink).
[0116] Tension and displacement parameter acquisition and analysis: use tension sensors, laser displacement sensors, etc. to collect corresponding printing data, and after preprocessing, calculate the comprehensive adjustment factor by weighted summation and normalization to quantify the printing equipment operation deviation;
[0117] Specifically includes:
[0118] Based on tension sensors, laser displacement sensors and encoders to obtain corresponding tension and displacement data of the roll material;
[0119] Tension sensor (installed on the roll material unwinding / rewinding roller, accuracy ±0.1N, sampling rate 1kHz);
[0120] Laser displacement sensor (installed on both sides of the roll material, detects lateral offset, accuracy ±0.01mm, sampling rate 500Hz);
[0121] Encoder (linked with the drive roller, detects longitudinal displacement, resolution 0.001mm / pulse).
[0122] After receiving the trigger signal of the quality detection step, the sensor starts recording data, and the tension value, transverse displacement, and longitudinal displacement are collected for 5 seconds (covering 2-3 printing cycles);
[0123] After obtaining the average tension value, transverse displacement value, and longitudinal displacement value, the comprehensive deviation value is calculated:
[0124]
[0125] The average tension value is: The average transverse displacement value is: The average longitudinal displacement value is:
[0126] The comprehensive deviation value is divided by the standard parameter value to obtain the adjustment factor : .
[0127] Traditional printing detection only relies on visual images and cannot associate the stretching deformation caused by tension fluctuations with the pattern shift caused by displacement deviation. More than 60% of hidden defects (such as pattern cracking after 1 month of user use) are caused by gradual changes in tension and displacement.
[0128] Integrating tension, laser displacement, and encoder sensors, the three-parameter linkage detection of tension-displacement-image is realized, and the single visual detection lag (such as the image only appears 3 seconds after the tension anomaly) is solved.
[0129] The physical parameter deviation is converted into the proportional coefficient (adjustment factor) of image deformation compensation, realizing the accurate mapping of physical world deviation to digital image correction.
[0130] Calibration and perspective transformation adjustment: based on the chessboard calibration to obtain the initial perspective matrix, combined with the adjustment factor to dynamically optimize the matrix parameters, the printing image is corrected in real time and fed back to the quality detection step for secondary verification.
[0131] Specifically, it includes:
[0132] A predetermined number of chessboard images (calibration board specifications such as 10x14 grids, grid distance 5mm) are collected, and the corner point coordinates (image coordinates) and corresponding physical coordinates are extracted through the sub-pixel corner point detection algorithm (accuracy 0.1 pixels).
[0133] Based on the Perspective-n-Point algorithm, the camera external parameters (rotation matrix R, translation vector t) are calculated, and the initial perspective transformation matrix (3x3 matrix) is generated, which satisfies ;
[0134] By acquiring checkerboard images and applying a sub-pixel corner detection algorithm (with an accuracy of 0.1 pixels), corner coordinates can be extracted with extremely high precision. Combined with physical coordinates, camera extrinsic parameters are calculated, and an initial perspective transformation matrix is generated. This allows the images captured by the camera to be restored according to the coordinate relationships of the real physical world, ensuring that subsequent analysis of printed images is based on accurate spatial mapping. This fundamentally guarantees the accuracy of detection and avoids misjudgments caused by image spatial mapping deviations.
[0135] Establish regulatory factors With matrix The mapping relationship will Incorporation matrix parameters:
[0136]
[0137] in,
[0138] For scaling correction, For based on The rotation correction matrix is dynamically adjusted according to the direction of the deviation.
[0139] Individual corrections are made for lateral / longitudinal displacement deviations. Translation parameters in The formula is , ;
[0140] During the printing process, changes in roll tension and minor vibrations of the equipment can cause deformation of the printed pattern, establishing a regulating factor. With matrix The mapping relationship allows for dynamic correction of the perspective transformation matrix, which can compensate for these deformations in a targeted manner.
[0141] For example, when the roll material is stretched due to increased tension, Image scaling can be corrected; horizontal and vertical displacement deviations can be corrected separately. Translation parameters in Just like correcting image distortion, it ensures that the detected print quality is true and free from bias interference, greatly improving detection accuracy.
[0142] After calibration and perspective transformation adjustment, the generated corrected image is returned for secondary quality verification. The printing process is complex, and the initial detection may be misjudged due to image distortion (such as stretching that blurs the edges of the pattern, causing misjudgment of uneven ink). Secondary verification uses the accurate image after correction to re-identify quality problems, reducing the misjudgment rate of geometric distortion type defects from a high level (such as more than 10%) to within 1%, neither misjudging good products nor missing problematic products, effectively ensuring product quality;
[0143] During line operation, printing process parameters (ink viscosity, equipment temperature, etc.) will gradually change. The data generated by calibration and perspective transformation adjustment can reverse correct model parameters (such as retraining the weight of adjustment factor K). In this way, the compensation strategy can adapt to the unique process characteristics of the production line (for example, the mechanical structure of a certain production line makes the horizontal displacement and rotation strongly related. After iteration, the correction logic of will strengthen the compensation of this correlation), which can help improve the yield of the production line from a lower level (such as 95%) to a higher level (such as 99%) in the long run;
[0144] The data generated by calibration and perspective transformation adjustment (such as the matrix before and after correction, and the secondary verification results) will be deposited into the knowledge base of printing distortion and compensation strategy. When a new production line is debugged or a new product is introduced, the compensation parameters of similar products (such as the factor weight of label printing) can be directly reused to shorten the production cycle of the production line and speed up the launch of new products to the market.
[0145] Also includes:
[0146] For newly collected printed images, use the optimized to perform perspective transformation, the formula is:
[0147]
[0148]
[0149] Output the corrected image and feed it back to the quality detection step for secondary verification.
[0150] The printing process is affected by tension fluctuations, mechanical vibrations, etc., and is prone to image stretching, shifting, and rotation (such as uneven tension of the roll material causing local pattern stretching). Perspective transformation accurately calculates the pixel mapping relationship through the matrix to convert the error value of geometric distortion into the correction amount of pixel coordinates to control the geometric error of the corrected image.
[0151] When printing process parameters (such as ink viscosity, equipment temperature) change over time, perspective transformation can real-time integrate dynamic parameters such as tension and displacement (through (Association), proactively compensating for deformations that have not occurred but are predictable.
[0152] For example, when the sensor detects an abnormal increase in tension, it passes in advance. Adjust the scaling parameters to avoid poor lag caused by deformation before detection.
[0153] The quality inspection step after image correction can verify whether deformation compensation is effective. If the initial inspection is misjudged due to deformation (such as stretching causing blurred pattern edges and being misjudged as uneven ink), the second verification after correction can re-identify the real quality problem, thereby reducing the misjudgment rate of geometric deformation defects and avoiding the situation of good products being rejected or bad products being missed.
[0154] Quality inspection results (such as deviation data from secondary validation) can be used to correct perspective transformation models in reverse (e.g., retraining). The weights of the compensation strategy are adjusted to adapt the strategy to the unique process characteristics of the production line (e.g., in a production line where lateral displacement and rotation are strongly correlated due to mechanical structure, after iteration). The correction logic can automatically strengthen this correlation compensation, which will drive long-term improvement in production line yield.
[0155] Control and Feedback: The industrial controller coordinates the work of each step, converting the adjustment factor into motor control commands, and combining it with the HMI to realize human-machine interaction, data management, and abnormal alarms.
[0156] Specifically, it includes:
[0157] After receiving the trigger signal for the quality inspection step, parameter acquisition is started according to the timing sequence (delay ≤ 100ms), then the adjustment factor, trigger calibration, perspective matrix optimization, and control command output are calculated.
[0158] A state machine is used to manage the process (idle, detection, exception, adjustment, normal) to ensure data synchronization between steps (transmitted via TCP / IP protocol with a latency of ≤50ms).
[0159] Adjustment factor Convert to motor control parameters:
[0160] Tension adjustment: Controls the output torque of the tension roller motor, using the following formula; ;
[0161] For standard tension, When the value is greater than 1, reduce the tension. It increases when <1.
[0162] Displacement adjustment: Controls the number of pulses of the lateral / longitudinal adjustment motor. ;
[0163] This represents the number of pulses corresponding to the standard displacement.
[0164] HMI displays the detection results in real time (deformation index, adjustment factor, correction effect comparison chart) and sensor data curves (tension / displacement trend).
[0165] Automatically stores key data (abnormal images, adjustment parameters, equipment status) to the server, retains it for 30 days, and supports querying by time / product model;
[0166] Alarm mechanism: If the deformation still does not meet the standard after 3 consecutive adjustments ( If the fault exceeds the quality judgment threshold, an audible and visual alarm (a buzzer combined with a red indicator light) will be triggered, and the fault code will be displayed on the host computer.
[0167] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0168] 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.
[0169] It should be noted that, in this document, the use of relational terms such as "first" and "second" is merely for distinguishing one entity or operation from another, and does not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0170] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0171] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0172] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0173] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment according to actual needs.
[0174] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can be physically present separately, or two or more units can be integrated into one unit.
[0175] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any skilled person in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0176] The above only describes some exemplary embodiments of the present application by way of illustration, and it is needless to say that those skilled in the art can modify the described embodiments in various ways without deviating from the spirit and scope of the present application. Therefore, the above figures and description are illustrative in nature and should not be understood as limiting the scope of protection of the claims of the present application.
Claims
1. A computer vision-based method for inspecting the surface quality of ink printing, characterized in that, include: Image acquisition and preprocessing: Dynamically acquire printed images and process them using preprocessing techniques; Quality inspection: Based on template matching and ORB feature point detection, the deformation index is calculated through deformation decomposition algorithm to determine whether the printing quality meets the standard and output a trigger signal; Tension and displacement parameter acquisition and analysis: Collect relevant printing data, calculate the comprehensive adjustment factor after preprocessing, and quantify the operating deviation of printing equipment; Calibration and perspective transformation adjustment: The initial perspective matrix is obtained based on checkerboard calibration, and the matrix parameters are dynamically optimized by combining adjustment factors. The printed image is corrected in real time and fed back to the secondary verification of the quality inspection step.
2. The method for detecting the surface quality of ink printing based on computer vision according to claim 1, characterized in that, Image acquisition and preprocessing, specifically including: After deploying the image acquisition hardware, dynamic image acquisition is performed to track the movement of the roll material in real time. During normal testing, printed images are acquired at a fixed frequency. When calibration is required, the system automatically switches to calibration mode, controls the camera to focus on the checkerboard calibration board, and continuously captures a preset number of images of the calibration board from different angles. The image is then processed including noise removal, contrast enhancement, initial distortion correction, and ROI extraction.
3. The method for detecting the surface quality of ink printing based on computer vision according to claim 1, characterized in that, Quality inspection specifically includes: Stores high-definition templates of standard printing patterns, including the coordinates and morphological parameters of key feature areas; Feature points are extracted from the preprocessed image to be detected, including key point coordinates, orientation, and descriptors; The matcher matches the feature points of the image to be detected with the feature points of the template, eliminates mismatches, and calculates the displacement deviation of the matching point pairs.
4. The computer vision-based surface quality inspection method for ink printing according to claim 3, characterized in that, The calculation process includes: Construct a global deformation field for the printed pattern, fit the feature point deviations to a continuous deformation function, and calculate the deformation gradient of local regions: in, , , , These are the weighting factors corresponding to displacement, rotation, scaling deviation, and local deformation, respectively. , This refers to displacement deviation; This represents the average spacing between feature points in the template. This refers to the rotation angle deviation; To allow the maximum rotational deviation; This is the scaling deviation; To allow the maximum scaling deviation; This is the local deformation index.
5. The computer vision-based surface quality inspection method for ink printing according to claim 4, characterized in that, The acquisition process includes: Feature points are extracted to construct a TPS interpolation function to generate a deformation field. For the displacement data of the deformation field, the displacement gradient of the corresponding region is calculated to obtain the strain tensor. The maximum principal strain of the strain tensor is taken as the deformation index of the region, i.e., the local deformation index.
6. The method for detecting the surface quality of ink printing based on computer vision according to claim 1, characterized in that, Tension and displacement parameter acquisition and analysis, specifically including: The tension and displacement data of the roll material are obtained based on tension sensors, laser displacement sensors and encoders; After receiving the trigger signal for the quality inspection step, the sensor is activated to record data, obtaining the tension value, lateral displacement, and longitudinal displacement. After obtaining the average tension, average lateral displacement, and average longitudinal displacement, the comprehensive deviation value is calculated: the comprehensive deviation value is divided by the standard parameter value to obtain the adjustment factor.
7. The method for detecting the surface quality of ink printing based on computer vision according to claim 1, characterized in that, Calibration and perspective transformation adjustment, specifically including: A preset number of chessboard images are collected, and the corner coordinates and corresponding physical coordinates are extracted using a sub-pixel corner detection algorithm. Calculate the camera extrinsic parameters and generate the initial perspective transformation matrix. ,satisfy ; Establish regulatory factors With matrix The mapping relationship will Incorporation matrix parameters: in, For scaling correction, Based on The rotation correction matrix is dynamically adjusted according to the direction of the deviation. Individual corrections are made for lateral / longitudinal displacement deviations. The translation parameters in the text.
8. The computer vision-based surface quality inspection method for ink printing according to claim 7, characterized in that, Also includes: For newly acquired printed images, use the optimized... The formula for perspective transformation is: The corrected image is output and fed back to the quality inspection step for secondary verification.
9. The method for detecting the surface quality of ink printing based on computer vision according to claim 1, characterized in that, Control and Feedback: The industrial controller coordinates the work of each step, converting the adjustment factor into motor control commands, and combining it with the HMI to realize human-machine interaction, data management, and abnormal alarms.