A method for detecting the inkjet quality of an intelligent inkjet printer
Through the ink coding quality detection method of the intelligent inkjet printer, the dual histogram equalization and binary segmentation technology are used to extract and analyze the inkjet area images, solving the accuracy and comprehensiveness of the inkjet quality detection in the existing technology, and achieving a detailed and accurate evaluation of the inkjet quality.
Patent Information
- Application Number
- CN202411952045.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2044-12-27
AI Technical Summary
The existing ink coding quality detection methods are difficult to accurately extract the ink coding area under different lighting conditions and complex backgrounds, and it is difficult to comprehensively and accurately evaluate the stripe uniformity, coherence and void distribution of the ink coding.
The ink coding quality detection method of the intelligent inkjet printer is adopted, and the inkjet area images are processed through dual histogram equalization and binary segmentation, the limit connection domain is extracted and the inkjet simulation is carried out to generate a simulated inkjet model. Then, stripe continuity is evaluated by stripe skeleton splitting and ductile coherence analysis, stripe uniformity is evaluated based on void dispersion analysis, and a comprehensive quality assessment report is generated through quality rating mapping.
It improves the accuracy and comprehensiveness of the inkjet quality detection, ensures the readability of the inkjet characters under different lighting, clarity and uniformity conditions, and provides quantifiable inkjet quality evaluation results.
Smart Images

Figure CN119379686B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to a method for detecting the inkjet printing quality of an intelligent inkjet printer. Background Art
[0002] In modern industrial production, the application range of inkjet printing technology is extensive, covering the real-time printing of production batches, dates, and identification information. Such identification information is often directly attached to the surface of products or packages through an inkjet printer for production tracking and anti-counterfeiting. However, due to high production speed and complex environmental conditions, the inkjet printing quality fluctuates, and problems such as blurred, peeled-off, or incomplete inkjet content may occur. To ensure the clarity and durability of product information, inkjet printing quality detection technology has received increasing attention. Traditional manual detection methods can no longer meet the requirements of efficient and precise quality control. Current inkjet printing quality detection methods mostly rely on image processing technology, such as binarizing and connected component analysis of inkjet images to identify the integrity of characters and the continuity of stripes. However, in the prior art, the accuracy of inkjet detection is limited by the effect of image preprocessing. Image quality under different lighting conditions and complex backgrounds will affect the extraction and analysis accuracy of the inkjet area. In addition, a single image processing method is difficult to effectively achieve multi-angle evaluation of details such as the uniformity, coherence, and gap distribution of inkjet stripes, and cannot comprehensively and accurately judge the inkjet printing quality. Summary of the Invention
[0003] Based on this, it is necessary to provide a method for detecting the inkjet printing quality of an intelligent inkjet printer to solve at least one of the above technical problems.
[0004] To achieve the above object, a method for detecting the inkjet printing quality of an intelligent inkjet printer includes the following steps:
[0005] Step S1: Collect an image of the inkjet area; perform dual histogram equalization on the image of the inkjet area, and perform binarization segmentation to obtain a binarized image;
[0006] Step S2: Extract the extreme connected components of the binarized image, and perform inkjet simulation reconstruction to generate a simulation inkjet model;
[0007] Step S3: Split the stripe skeleton of the simulation inkjet model to obtain a basic inkjet skeleton; perform an analysis of the extension coherence of the basic inkjet skeleton to generate the stripe continuity quality;
[0008] Step S4: Perform an analysis of the gap dispersion of the simulation inkjet model based on the basic inkjet skeleton, and perform a uniformity evaluation to obtain the stripe uniformity quality;
[0009] Step S5: Deduce the readable quality of the simulation inkjet model according to the stripe continuity quality and the stripe uniformity quality, and perform a quality level mapping to generate a comprehensive quality evaluation report.
[0010] The present invention adjusts the illumination and contrast of an image through double histogram equalization to ensure that the detailed information of the image is clearly captured under different illumination conditions, and improves the contrast of the inkjet coding area in the image through binary segmentation to further highlight the character edge contour, facilitating subsequent feature extraction. The binary image is subjected to extraction of extreme connected components to effectively remove noise interference, ensuring that the character structure within the inkjet coding area is complete and clear. The inkjet coding form is reconstructed through inkjet coding simulation to generate a simulation inkjet coding model with clear structure without affecting the content of the inkjet coding characters, providing image data with complete structure for subsequent quality inspection. The simulation inkjet coding model is subjected to stripe skeleton splitting to retain the main contour of the characters and remove redundant information, obtaining the basic inkjet coding skeleton. Through the analysis of the extension coherence degree of the skeleton, the continuity of the characters can be accurately reflected, generating the stripe continuity quality, so that the coherence information between the inkjet coding characters can be clearly presented, providing reliable data for evaluating the clarity and recognizability of the inkjet coding. Based on the basic inkjet coding skeleton, the void dispersion degree of the simulation inkjet coding model is analyzed. By evaluating the void distribution, it is ensured that there are no obvious breaks and uniformity at the character edges, accurately identifying whether there are voids and defects in the characters, generating the stripe uniformity quality. According to the stripe continuity quality and the stripe uniformity quality, the readability quality of the simulation inkjet coding model is deduced, and the quality evaluation result is visualized through quality level mapping, generating a comprehensive quality evaluation report to ensure the readability of the inkjet coding characters under different illumination, clarity, and uniformity conditions, and providing a quantifiable inkjet coding quality evaluation result.
[0011] Preferably, step S1 includes the following steps:
[0012] Step S11: Collect an image of the inkjet coding area; perform global histogram equalization processing on the image of the inkjet coding area to obtain an enhanced inkjet coding image;
[0013] Step S12: Detect the unenhanced area of the enhanced inkjet coding image to obtain an uneven area;
[0014] Step S13: Perform local adaptive equalization processing on the uneven area to generate a double-equalized image;
[0015] Step S14: Perform maximum inter-class variance analysis on the double-equalized image to obtain a cutting variance threshold parameter;
[0016] Step S15: Perform binary segmentation on the double-equalized image based on the cutting variance threshold parameter to obtain a binary image.
[0017] The present invention enhances the contrast of the overall image through global enhancement, highlights the structural details of the inkjet printing area, enables the brightness and contrast of the image to be evenly distributed within the entire inkjet printing area, obtains an enhanced inkjet printing image, improves the recognizability of the inkjet printing, facilitates subsequent processing, detects the unenhanced area of the enhanced inkjet printing image, accurately identifies the area that is not evenly enhanced in the image, ensures smooth processing of the details by locating these areas, obtains the uneven area, provides accurate area information for subsequent local enhancement, improves the accuracy of detection, performs local adaptive equalization processing on the uneven area, solves the local detail problem missed by global equalization, optimizes the brightness and contrast of different areas through adaptive equalization, achieves a double equalization effect, performs maximum inter-class variance analysis on the double equalization image, calculates the optimal cutting variance threshold parameter to ensure clear separation of the background and foreground of the inkjet printing area, provides an accurate basis for image segmentation, effectively improves the accuracy of binary segmentation, performs binary segmentation on the double equalization image based on the cutting variance threshold parameter, obtains a clear binary image through high-precision binary processing, ensures that the edges of the characters in the inkjet printing area are clear and unbroken, and the segmentation effect is stable and consistent, providing accurate basic data for subsequent inkjet printing quality detection.
[0018] Preferably, step S2 includes the following steps:
[0019] Step S21: Perform eight-neighborhood channel statistics on the binary image to obtain candidate connected regions;
[0020] Step S22: Trace the boundary contours of the candidate connected regions to generate a set of connected region contour points;
[0021] Step S23: Identify the extreme points of the set of connected region contour points to obtain the key contour points of the connected regions;
[0022] Step S24: Analyze the feature topological relationships of the key contour points of the connected regions to generate a topological structure of the contour points;
[0023] Step S25: Reconstruct the key contour points of the connected regions based on the topological structure of the contour points to obtain the key inkjet printing contours;
[0024] Step S26: Fill the key inkjet printing contours with inkjet printing textures according to the binary image to generate a simulated inkjet printing model.
[0025] The present invention accurately analyzes the pixel connectivity in an image by performing eight-neighborhood channel statistics on a binary image, effectively identifies all candidate connected regions in the image, ensures the coherence and integrity of the coding area, forms candidate connected domains, performs boundary contour tracking on the candidate connected domains, obtains the accurate coordinates of the boundary through continuous tracking of contour points, generates a set of contour points of the connected domain, ensures the accurate boundary description of the coding area, obtains complete boundary information, identifies extreme points in the set of contour points of the connected domain, determines key boundary features by extracting geometric extreme points of the contour, obtains key contour points of the connected domain, accurately captures the key nodes of the coding boundary, ensures the effectiveness and representativeness of the contour points, analyzes the feature topological relationship of the key contour points of the connected domain, accurately establishes the spatial structure relationship between each contour point, generates a topological structure of the contour points, ensures the relative positions of the coding boundary features in space remain consistent, performs contour reconstruction on the key contour points of the connected domain based on the topological structure of the contour points, guides the overall reconstruction of the contour through the topological structure, obtains the key coding contour, ensures the continuity and accuracy of the reconstructed contour, improves the boundary expression accuracy of the coding model, fills the key coding contour with coding texture according to the binary image, restores the true texture of the coding through the filling operation, generates a simulated coding model, ensures the texture consistency and visual realism of the simulated model, provides a simulated coding image closer to the actual effect, and provides accurate basic data for coding quality detection.
[0026] Preferably, step S3 includes the following steps:
[0027] Step S31: Locate the contour branch points of the simulated coding model to obtain the coding branch position information;
[0028] Step S32: Split the simulated coding model based on the coding branch position information to generate a basic coding skeleton;
[0029] Step S33: Monitor the extension breakpoints of the basic coding skeleton to obtain the skeleton breakpoint positions;
[0030] Step S34: Analyze the coherence of the basic coding skeleton based on the skeleton breakpoint positions to generate a skeleton continuity index;
[0031] Step S35: Perform quality level mapping on the skeleton continuity index according to a preset continuity quality reference value to generate stripe continuity quality.
[0032] The present invention accurately identifies branch nodes in the inkjet coding model to obtain inkjet branch position information, ensuring the integrity of the complex contour structure of the inkjet coding model, improving the accuracy of model branch information, splitting the skeleton of the simulated inkjet coding model based on the inkjet branch position information to generate the basic inkjet skeleton, guiding the skeleton splitting process through branch nodes to ensure the coherence and clarity of the skeleton, helping to accurately display the overall shape of the inkjet area, improving the structural clarity of the inkjet coding model, monitoring the extension breakpoints of the basic inkjet skeleton, accurately positioning the area where breakpoints exist by detecting the breakpoint positions in the skeleton to obtain the skeleton breakpoint positions, ensuring the integrity and coherence recognition of the skeleton structure, improving the positioning accuracy of breakpoint data, analyzing the coherence of the basic inkjet skeleton based on the skeleton breakpoint positions, obtaining the coherence of the inkjet area skeleton through the analysis of the skeleton breakpoint positions, generating a skeleton continuity index, ensuring the quantitative analysis of the inkjet quality in terms of structural coherence, enhancing the evaluation ability of the structural consistency of the inkjet coding model, performing quality level mapping on the skeleton continuity index according to a preset continuity quality reference value to generate stripe continuity quality, mapping the skeleton continuity quality level by comparing with the reference value, ensuring that the inkjet skeleton meets the quality requirements in terms of continuity, effectively evaluating the structural integrity and uniformity of the inkjet, and providing stripe structure quality data for the final inkjet quality evaluation.
[0033] Preferably, step S34 includes the following steps:
[0034] Segment the basic inkjet skeleton based on the skeleton breakpoint positions to obtain multiple segments of inkjet skeletons;
[0035] Compare the adjacent length differences of the multiple segments of inkjet skeletons to generate adjacent inkjet length differences;
[0036] Compare the adjacent angle differences of the multiple segments of inkjet skeletons to obtain adjacent inkjet angle differences;
[0037] Evaluate the segment coherence of the adjacent inkjet length differences and adjacent inkjet angle differences to generate segment coherence quality;
[0038] Perform coherence index mapping on the basic inkjet skeleton based on the segment coherence quality to generate a skeleton continuity index.
[0039] The present invention realizes the refined analysis of the inkjet coding area by segmenting the skeleton, obtains a multi-segment inkjet coding skeleton, ensures the independent recognition of each segment in the skeleton structure, facilitates the subsequent processing of the coherence of each segment feature, provides basic structural support for the analysis of the differences in length and angle, enhances the segmentation recognition accuracy, compares the adjacent length differences of the multi-segment inkjet coding skeleton, generates the adjacent inkjet length differences by analyzing the length differences of adjacent skeleton segments, accurately evaluates the continuity of the inkjet coding skeleton in terms of length, helps to identify abnormal situations of length changes, compares the adjacent angle differences of the multi-segment inkjet coding skeleton, obtains the adjacent inkjet angle differences through the analysis of the angle change trend of adjacent skeleton segments, ensures that the angle change of the inkjet stripes is within a reasonable range, improves the judgment accuracy of the inkjet model in terms of angle coherence, and assists in detecting the occurrence of angle anomalies, evaluates the segment coherence of the adjacent inkjet length differences and the adjacent inkjet angle differences, generates the segment coherence quality by comprehensively comparing the length and angle differences, accurately judges the overall coherence level of each segment of the skeleton, provides an accurate quantitative basis for the coherence judgment of the inkjet coding quality, maps the coherence index based on the segment coherence quality to the inkjet basic skeleton, generates the skeleton continuity index through the mapping, provides the coherence evaluation of the overall inkjet coding area skeleton, ensures the quantitative expression of the skeleton quality in terms of coherence, improves the accuracy and comprehensiveness of the inkjet coding quality evaluation, and provides a coherence index for the final inkjet coding quality determination.
[0040] Preferably, step S4 includes the following steps:
[0041] Step S41: Locate the boundaries of the inkjet basic skeleton to obtain the stripe boundary point set;
[0042] Step S42: Perform spacing traversal statistics on the stripe boundary point set to generate the stripe interval distance;
[0043] Step S43: Calculate the local dispersion of the inkjet basic skeleton based on the stripe interval distance to obtain the inkjet void dispersion;
[0044] Step S44: Extract the mean value of the inkjet void dispersion to generate the dispersion mean value;
[0045] Step S45: Evaluate the uniformity of the inkjet basic skeleton based on the preset uniformity quality reference value and the dispersion mean value to obtain the stripe uniformity quality.
[0046] The present invention precisely identifies the boundaries of the inkjet code stripes to obtain a set of stripe boundary points, achieving a fine characterization of the stripe boundary positions, providing accurate boundary data for subsequent pitch statistics, enhancing the resolution of the boundary point set and the clarity of the overall contour. It traverses and statistically analyzes the pitches of the stripe boundary point set, calculates the stripe boundary pitches, generates the stripe interval distances, ensures the precise quantification of the pitch of each stripe segment, provides specific data support for subsequent analysis of the dispersion, and improves the measurement accuracy of the inkjet code stripe pitches. Based on the stripe interval distances, it calculates the local dispersion of the inkjet code basic skeleton, obtains the inkjet void dispersion through the localization processing of the interval distances, generates the dispersion characteristics between each inkjet code stripe, ensures the regional distribution of the dispersion data, assists in analyzing the uniform distribution state of the inkjet code stripes, increases the detail accuracy of the stripes, extracts the mean value of the inkjet void dispersion, generates the dispersion mean value by calculating the mean value of each dispersion value, ensures the overall overview of the discrete distribution of the inkjet code stripes, provides a mean reference for the quality evaluation of the stripe uniformity, improves the accuracy of the overall uniformity analysis, and conducts a uniformity evaluation of the inkjet code basic skeleton based on the preset uniformity quality reference value and the dispersion mean value. By comparing the standard reference with the dispersion mean value, it obtains the stripe uniformity quality, ensures that the stripe distribution in the inkjet area meets the established uniformity quality standard, and realizes the quantitative determination of the uniformity of the inkjet quality.
[0047] Preferably, step S43 includes the following steps:
[0048] Step S431: Cut the inkjet code basic skeleton based on the stripe interval distances to generate a set of inkjet void areas;
[0049] Step S432: Determine the extreme values of the pitches in the set of inkjet void areas to obtain the maximum void pitch and the minimum void pitch;
[0050] Step S433: Calculate the local dispersion of the set of inkjet void areas according to the maximum pitch and the minimum pitch to generate a set of local void dispersions;
[0051] Step S434: Conduct a global integration process on the set of local void dispersions to obtain the inkjet void dispersion.
[0052] The present invention realizes the precise differentiation of the inkjet coding gap area by identifying and cutting out the gap areas between the stripes to generate a set of inkjet coding gap areas, ensuring the integrity and independence of the gap areas. The extreme values of the spacing are determined for the set of inkjet coding gap areas. By calculating the maximum and minimum spacing values in the set of gap areas, the maximum gap spacing and the minimum gap spacing are obtained, realizing the extreme value judgment of the spacing range of the gap areas. According to the maximum spacing and the minimum spacing, the local dispersion of the set of inkjet coding gap areas is calculated. By guiding the role of the extreme value spacing, the dispersion within the local area is calculated to generate a set of local gap dispersions, ensuring that the distribution regularity of the local gap spacing is quantified, realizing the local discretization analysis of the inkjet coding stripe gaps, enhancing the analysis depth of the local characteristics of the gap areas. The set of local gap dispersions is subjected to global integration processing. By integrating and summarizing the local dispersion data, the inkjet coding gap dispersion is obtained, realizing the transformation from local characteristics to overall characteristics.
[0053] Preferably, step S433 includes the following steps:
[0054] Calculate the standard spacing difference between the maximum spacing and the minimum spacing to obtain the standard spacing difference value;
[0055] Calculate the fluctuation range of the maximum spacing and the minimum spacing to generate a discrete allowable range;
[0056] Build an ideal interval for the set of inkjet coding gap areas based on the standard spacing difference value to generate an ideal reference interval;
[0057] Locate the relative positions of the set of inkjet coding gap areas according to the ideal reference interval to obtain regional deviation data;
[0058] Identify the fluctuation interval of the regional deviation data based on the discrete allowable range to generate a regional deviation fluctuation interval;
[0059] Evaluate the dispersion of the regional deviation fluctuation interval according to the ideal reference interval to generate a set of local gap dispersions.
[0060] The present invention realizes the standard deviation measurement of the set of inkjet void areas by obtaining the standard deviation value of the spacing, ensures the quantization accuracy of the spacing data, provides the standard deviation basis for the inkjet void areas, calculates the fluctuation ranges of the maximum spacing value and the minimum spacing value, generates the discrete allowable range, realizes the standardized control of the fluctuation of the spacing between inkjet void areas by defining the allowable range of discrete data, ensures the rationality and controllability of the discrete evaluation, improves the accuracy of the fluctuation range evaluation, constructs the ideal interval for the set of inkjet void areas based on the standard deviation value of the spacing, generates the ideal reference interval, provides a reference for the relative position of the inkjet voids by constructing the ideal interval, makes the distribution of discrete data clearer and more orderly, ensures the unity of data positioning, strengthens the reference comparability of the void intervals, locates the relative position of the set of inkjet void areas according to the ideal reference interval, makes the position of each void area relative to the ideal reference interval clearer by obtaining the regional deviation data, realizes the differential identification of the regional distribution, provides an accurate regional deviation basis for the subsequent discrete fluctuation analysis, identifies the fluctuation interval for the regional deviation data based on the discrete allowable range, ensures that the fluctuation amplitude of the inkjet void areas meets the discrete control requirements by generating the regional deviation fluctuation interval, realizes the regional analysis of discrete data, improves the hierarchical evaluation of the fluctuation distribution of the void areas, evaluates the discreteness of the regional deviation fluctuation interval according to the ideal reference interval, ensures that the discrete degree of the inkjet area is fully measured by generating the local void discreteness set, ensures that the local distribution characteristics of the inkjet voids are accurately analyzed, and provides a basis for the discrete evaluation of the overall quality of the inkjet.
[0061] Preferably, step S5 includes the following steps:
[0062] Step S51: Perform equal-weight fusion on the stripe continuity quality and the stripe uniformity quality to obtain the fusion quality value;
[0063] Step S52: Deduce the readable quality of the simulated inkjet model based on the fusion quality value to generate the predicted readable quality value;
[0064] Step S53: Perform hierarchical processing on the predicted readable quality value to obtain the graded inkjet quality value;
[0065] Step S54: Map the quality level of the simulated inkjet model according to the graded inkjet quality value to generate the quality evaluation report.
[0066] Through the comprehensive weight calculation of the stripe quality, the present invention ensures the balanced integration of various quality indicators, provides a comprehensive quality evaluation method, accurately reflects the comprehensive state of the inkjet printing quality, effectively improves the evaluation accuracy, deduces the readable quality of the simulation inkjet printing model based on the fusion quality value, generates a predicted readable quality value, and through the deduction and analysis of the fusion quality value, can simulate the readability performance of the inkjet printing under different conditions, predict the readability of the actual inkjet printing, provide a basis for further quality control, enhance the predictability and reliability of the inkjet printing quality, perform hierarchical processing on the predicted readable quality value to obtain a graded inkjet printing quality value, and through the grading process of the predicted value, the inkjet printing quality can be divided into different grades according to the preset standard, ensuring the precision and hierarchy of the quality evaluation, making the inkjet printing quality level more intuitive and facilitating subsequent optimization and adjustment. Map the quality grade of the simulation inkjet printing model according to the graded inkjet printing quality value to generate a quality evaluation report. Through generating a detailed quality evaluation report, the visualization presentation and scientific classification of the inkjet printing quality are realized, providing a clear reference basis for subsequent decision-making, and enhancing the transparency and systematicness of the inkjet printing quality detection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a schematic flow chart of the steps of a method for detecting the inkjet printing quality of an intelligent inkjet printer;
[0068] Figure 2 is Figure 1 a detailed implementation step flow chart of step S2 in
[0069] Figure 3 is Figure 1 a detailed implementation step flow chart of step S3 in
[0070] The realization, functional features and advantages of the object of the present invention will be further described in conjunction with the embodiments with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0071] The technical method of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0072] In addition, the attached drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.
[0073] It should be understood that although terms such as "first" and "second" may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0074] To achieve the above object, please refer to Figures 1 to 3 , a method for detecting the inkjet printing quality of an intelligent inkjet printer, comprising the following steps:
[0075] Step S1: Collect an image of the inkjet printing area; perform double histogram equalization on the image of the inkjet printing area and perform binary segmentation to obtain a binary image;
[0076] Step S2: Extract the extreme connected regions from the binary image and perform inkjet printing simulation reconstruction to generate a simulation inkjet printing model;
[0077] Step S3: Split the stripe skeleton of the simulation inkjet printing model to obtain the basic inkjet printing skeleton; perform an analysis of the extension coherence of the basic inkjet printing skeleton to generate the stripe continuity quality;
[0078] Step S4: Perform an analysis of the void dispersion degree on the simulation inkjet printing model based on the basic inkjet printing skeleton and perform a uniformity evaluation to obtain the stripe uniformity quality;
[0079] Step S5: Deduce the readable quality of the simulation inkjet printing model according to the stripe continuity quality and the stripe uniformity quality, and perform a quality level mapping to generate a comprehensive quality evaluation report.
[0080] The present invention adjusts the illumination and contrast of an image through double histogram equalization to ensure that the detailed information of the image is clearly captured under different illumination conditions. It improves the contrast of the inkjet coding area in the image through binary segmentation, further highlighting the character edge contours, facilitating subsequent feature extraction. It extracts the ultimate connected components of the binary image to effectively remove noise interference, ensuring the integrity and clarity of the character structure within the inkjet coding area. It reconstructs the inkjet coding form through inkjet coding simulation to generate a clearly structured simulated inkjet coding model without affecting the content of the inkjet coding characters, providing image data with complete structure for subsequent quality inspection. It splits the stripe skeleton of the simulated inkjet coding model, retains the main contour of the characters, removes redundant information, and obtains the basic inkjet coding skeleton. Through the analysis of the extension coherence of the skeleton, the continuity of the characters can be accurately reflected, generating the stripe continuity quality, enabling the clear display of the coherence information between the inkjet coding characters, and providing reliable data for evaluating the clarity and legibility of the inkjet coding. Based on the basic inkjet coding skeleton, it analyzes the void dispersion of the simulated inkjet coding model, ensures the absence of obvious breaks and uniformity at the character edges by evaluating the void distribution, accurately identifies whether there are voids or defects in the characters, and generates the stripe uniformity quality. According to the stripe continuity quality and the stripe uniformity quality, it deduces the readable quality of the simulated inkjet coding model, visualizes the quality evaluation results through quality level mapping, generates a comprehensive quality evaluation report, ensures the readability of the inkjet coding characters under different illumination, clarity, and uniformity conditions, and provides a quantifiable inkjet coding quality evaluation result.
[0081] In an embodiment of the present invention, refer to Figure 1 , which is a schematic diagram of the step flow of a method for detecting the inkjet coding quality of an intelligent inkjet printer of the present invention. In this example, the method for detecting the inkjet coding quality of an intelligent inkjet printer includes the following steps:
[0082] Step S1: Collect an image of the inkjet coding area; perform double histogram equalization on the image of the inkjet coding area and perform binary segmentation to obtain a binary image;
[0083] In this embodiment, a high-resolution camera is used to collect images of the inkjet coding area. The image size should be no less than 1024×1024 pixels. During collection, it should be ensured that the inkjet coding area is within the clear visible range, and the image should have sufficient illuminance and contrast. Subsequently, the double histogram equalization technique is used to process the brightness and contrast of the image. First, perform the initial histogram equalization on the original image to increase the overall contrast of the image, and then perform the histogram equalization on the local area to optimize the local details. After processing, the image will become clearer and have a stronger detail contrast. Then, perform binaryzation processing on the equalized image. By setting an appropriate threshold, the image is converted into a black-and-white image. The white part represents the inkjet coding area, and the black part represents the background, thereby obtaining a binary image. The threshold setting during the binaryzation process should ensure that the contour of the inkjet coding area in the image is clear, and the background part is clearly segmented from the inkjet coding area. The finally obtained binary image will be used for subsequent analysis and processing.
[0084] Step S2: Extract the extreme connected components from the binary image and perform inkjet coding simulation reconstruction to generate a simulated inkjet coding model;
[0085] In this embodiment, the extreme connected components of the white area in the binary image are extracted. A connected component refers to an area in the image where the pixel values are the same and adjacent. Using the 8-neighborhood connection rule, each pixel in the image is compared with its surrounding 8 pixels to determine whether they belong to the same connected component, and all connected components are extracted. Then, each of the extracted connected components is further processed to remove small-area noise points to ensure that the connected components meet the size requirements of the inkjet coding area. After that, these connected components are subjected to inkjet coding simulation reconstruction. By analyzing the characteristics such as the shape and texture of the connected components, the distribution of inkjet dots during the inkjet coding process is simulated, and a simulated inkjet coding model is reconstructed. The shape of the simulated inkjet coding model is as close as possible to the inkjet effect of the actual inkjet coding area. This model will serve as the basis for subsequent quality inspection.
[0086] Step S3: Split the stripe skeleton of the simulated inkjet coding model to obtain the basic inkjet coding skeleton; perform an analysis of the extension coherence of the basic inkjet coding skeleton to generate the stripe continuity quality;
[0087] In this embodiment, the stripe skeleton of the simulation inkjet coding model is split. The skeleton refers to the thinned version of the inkjet coding area in the image. The edges of the inkjet coding area in the image are extracted to form thin lines. The skeletonization algorithm, such as the Zhang-Suen algorithm (Zhang Suen skeletonization algorithm), is used to remove the redundant pixels in the skeleton and only retain the center line of the skeleton to obtain the basic inkjet coding skeleton. The basic inkjet coding skeleton represents the stripe structure of the inkjet coding, and its detailed features can reflect the inkjet coding quality. Then, the obtained basic inkjet coding skeleton is analyzed for the extension coherence. The coherence between each stripe in the skeleton is analyzed. The path extension algorithm is used to detect the breakpoints and connection points in the skeleton and calculate the coherence between every two adjacent skeleton parts. If there are breaks or discontinuities, the extension algorithm will mark them as low coherence regions. The result of the extension coherence analysis will generate the stripe continuity quality. The higher the evaluation value of the stripe continuity quality, the better the extensibility of the inkjet coding stripe and the higher the inkjet coding quality.
[0088] Step S4: Based on the basic inkjet coding skeleton, perform void dispersion analysis on the simulation inkjet coding model and conduct uniformity evaluation to obtain the stripe uniformity quality;
[0089] In this embodiment, void dispersion analysis is performed based on the basic inkjet coding skeleton. The void dispersion refers to the change in the spacing between the inkjet coding stripes. Statistical methods are used to calculate the void distances between each stripe in the skeleton and calculate the standard deviation of these distances. The smaller the standard deviation, the more uniform the spacing of the inkjet coding stripes. Then, the obtained void dispersion data is evaluated for uniformity. By comparing with the preset ideal spacing range, the uniformity of the inkjet coding stripes is evaluated. If the void dispersion exceeds the predetermined range, it indicates that the uniformity of the inkjet coding is poor, which will lead to poor readability of the inkjet coding or affect the appearance quality. Finally, the evaluation value of the stripe uniformity quality is obtained. The higher this value, the better the uniformity of the inkjet coding.
[0090] Step S5: Based on the stripe continuity quality and the stripe uniformity quality, perform readable quality deduction on the simulation inkjet coding model and conduct quality level mapping to generate a comprehensive quality assessment report.
[0091] In this embodiment, readable quality deduction is performed on the simulation inkjet coding model according to the stripe continuity quality and the stripe uniformity quality. The weighted average algorithm is used to fuse the two quality indicators to generate a comprehensive readable quality deduction value. The higher the deduction value, the better the readability of the inkjet coding. Then, quality level mapping is performed according to the deduction value. Multiple level ranges are set, such as excellent, good, average, unqualified, etc., and the final quality level of the inkjet coding is determined according to the deduction value. Finally, a comprehensive quality assessment report is generated. The report includes information such as the stripe continuity quality, the stripe uniformity quality, the readable quality deduction result, and the quality level. The report can provide detailed quality feedback for the inkjet coding machine operator.
[0092] Preferably, step S1 includes the following steps:
[0093] Step S11: Collect the image of the coding area; perform global histogram equalization processing on the image of the coding area to obtain an enhanced coding image;
[0094] Step S12: Detect the unenhanced area of the enhanced coding image to obtain an uneven area;
[0095] Step S13: Perform local adaptive equalization processing on the uneven area to generate a double-equalized image;
[0096] Step S14: Perform maximum inter-class variance analysis on the double-equalized image to obtain a cutting variance threshold parameter;
[0097] Step S15: Perform binary segmentation on the double-equalized image based on the cutting variance threshold parameter to obtain a binary image.
[0098] In this embodiment, a high-resolution image of the inkjet printing area is collected by an industrial camera to ensure the clarity of details. The collected inkjet printing area image is subjected to global histogram equalization processing. The HistogramEqualization algorithm is used in the equalization process. By stretching and redistributing pixel values, the image contrast is enhanced, making the light and dark contrast in the inkjet printing area more prominent. Global histogram equalization is applicable to scenarios where the overall brightness distribution of the image is uneven. The enhanced inkjet image is more uniform in terms of color levels. Detect the non-uniform areas in the image. The non-uniform area detection adopts the local contrast analysis method. The image is traversed pixel by pixel through a sliding window (such as 9×9 or 11×11 pixel size), and the pixel contrast difference within each area is detected. If the pixel brightness difference within a certain area is lower than the preset threshold, then this area is marked as a non-uniform area. The non-uniform areas mainly include parts with insufficient image contrast or too low brightness. These areas are difficult to accurately cut during the binarization segmentation process, so they must be marked separately. For the detected non-uniform areas, local adaptive histogram equalization processing is performed to enhance the local contrast of the image. Local Adaptive Histogram Equalization (AHE) divides the image into multiple small windows and performs histogram equalization on each window area separately to achieve uniform distribution of the local brightness of the image. To prevent the artifacts or noise effects caused by over-equalization, a contrast limit parameter (such as 0.03 to 0.05) is set to control the processing effect. The generated double-equalized image has a high contrast level in both the overall and local areas. Perform the maximum inter-class variance analysis on the double-equalized image to obtain the cutting variance threshold parameter. Otsu’s Method is a threshold segmentation method based on the inter-class variance. By calculating the inter-class variance between the foreground and background in the image, the threshold that maximizes the inter-class variance is selected as the segmentation basis. In the operation, the gray values of the double-equalized image are divided into two categories using the algorithm, and the within-class variance and inter-class variance are calculated respectively, and then the gray value that maximizes the inter-class variance is selected as the optimal segmentation threshold. Based on the cutting variance threshold parameter, the double-equalized image is subjected to binarization segmentation. Binarization segmentation divides the pixel values in the image into two categories through the set threshold. The foreground is displayed in black, and the background is white. The Thresholding algorithm is used for binarization processing. The pixels greater than or equal to the cutting variance threshold are set to black, and the pixels less than this value are set to white, so as to obtain a clear binarized image.
[0099] Preferably, step S2 includes the following steps:
[0100] Step S21: Perform eight-neighborhood channel statistics on the binarized image to obtain candidate connected components;
[0101] Step S22: Perform boundary contour tracing on the candidate connected components to generate a set of connected component contour points;
[0102] Step S23: Identify extreme points from the set of connected component contour points to obtain key contour points of the connected components;
[0103] Step S24: Analyze the feature topological relationships of the key contour points of the connected components to generate a topological structure of the contour points;
[0104] Step S25: Reconstruct the contour of the key contour points of the connected components based on the topological structure of the contour points to obtain the key contour of the inkjet code;
[0105] Step S26: Fill the key contour of the inkjet code with inkjet texture according to the binary image to generate a simulated inkjet code model.
[0106] As an example of the present invention, refer to Figure 2 , in this example, step S2 includes:
[0107] Step S21: Perform eight-neighborhood channel statistics on the binary image to obtain candidate connected components;
[0108] In this embodiment, an eight-neighborhood channel statistical algorithm is used to identify candidate connected components in the image. Eight-neighborhood channel statistics is a technical method for determining the neighborhood connection relationship of each pixel. This method determines whether it belongs to the same connected region by checking the color consistency of each pixel with its adjacent pixels in eight directions (left, right, up, down, upper left, upper right, lower left, lower right). Specifically, when operating, start scanning line by line from the upper left corner of the image, group each pixel according to the eight-neighborhood rule. If the adjacent pixels belong to the same connected block, they are marked as the same connected component, record their pixel coordinates. After completing the scan, all candidate connected components and their coordinate information in the inkjet code area are obtained, and each candidate connected component is marked for subsequent processing.
[0109] Step S22: Perform boundary contour tracing on the candidate connected components to generate a set of connected component contour points;
[0110] In this embodiment, perform boundary contour tracing operations on the obtained candidate connected components to generate a set of contour points of the candidate connected components. The contour tracing uses the chain code method. By sequentially tracking the outer boundary pixels of each connected component, record the position information of the boundary points to generate a complete set of contour points. Start from the starting point (the upper leftmost pixel) of the connected component, trace pixel by pixel in the clockwise direction. If a boundary switch is encountered, record the coordinates of this point and store it in the set of contour points until returning to the starting point to complete the closed-loop contour. Finally, the generated set of contour points contains the boundary contours of all candidate connected components.
[0111] Step S23: Identify extreme points from the set of connected component contour points to obtain key contour points of the connected components;
[0112] In this embodiment, extreme point recognition is performed on the generated connected component contour point set to obtain the key contour points of the connected component. Extreme point recognition refers to calculating the maximum and minimum values of each coordinate point in the contour point set in a specific direction to obtain the vertex information and boundary endpoints of the contour, extracting the extreme points in the horizontal and vertical directions in the contour point set, then calculating the corner points and marking the corner points with drastic contour changes, and taking these corner points and endpoints as the key contour points of the connected component, and storing the obtained extreme point data to form a connected component key contour point set.
[0113] Step S24: Analyze the feature topological relationship of the connected component key contour points to generate a contour point topological structure;
[0114] In this embodiment, topological relationship analysis is performed on the connected component key contour point set to generate a topological structure of the contour points. Topological relationship analysis refers to analyzing the spatial connection relationship and relative position between each key point and its adjacent points, establishing a connection structure between the contour points through Delaunay triangulation, connecting the contour points with their adjacent points to form triangles, avoiding intersecting connections, ensuring the integrity of the topological structure, and the generated topological structure information includes the adjacent point sequence and geometric angle relationship of each key point in the connected component, and this information is used as a basic structure in contour reconstruction.
[0115] Step S25: Based on the contour point topological structure, perform contour reconstruction on the connected component key contour points to obtain the key contour of the inkjet code;
[0116] In this embodiment, based on the contour point topological structure, contour reconstruction is performed on the connected component key contour points. Contour reconstruction is achieved by redrawing each marked edge line in the topological structure as a continuous curve to form a complete inkjet code contour structure. Bicubic spline interpolation method is used for contour reconstruction to make the curves smoothly connect. Specifically, when operating, the key contour points are curve-fitted according to the edge connection order of the topological structure, each edge line is interpolated into a smooth curve, and the global contour reconstruction is completed according to the arrangement of the contour points to obtain a clear and complete key contour of the inkjet code.
[0117] Step S26: Fill the key contour of the inkjet code with inkjet code texture according to the binary image to generate a simulated inkjet code model.
[0118] In this embodiment, according to the binary image, texture filling is performed on the key outline of the inkjet code to generate a simulated inkjet code model. During the texture filling process, the pixel values of the inkjet area in the binary image are used as texture information, and a scan-line based filling algorithm is adopted to perform pixel-by-pixel filling on the area within the key outline of the inkjet code. The scan-line filling method starts from the top of the inkjet outline and fills line by line to the bottom, filling the pixels within the boundary of each line with the inkjet color to ensure seamless coverage of the texture within the outline. The finally generated simulated inkjet code model contains real inkjet code texture and edge information, which is used for subsequent detection and analysis.
[0119] Preferably, step S3 includes the following steps:
[0120] Step S31: Locate the contour branch points of the simulated inkjet code model to obtain the inkjet branch position information;
[0121] Step S32: Based on the inkjet branch position information, split the skeleton of the simulated inkjet code model to generate the basic skeleton of the inkjet code;
[0122] Step S33: Monitor the extension breakpoints of the basic skeleton of the inkjet code to obtain the skeleton breakpoint positions;
[0123] Step S34: Based on the skeleton breakpoint positions, perform coherence analysis on the basic skeleton of the inkjet code to generate a skeleton continuity index;
[0124] Step S35: Perform quality level mapping on the skeleton continuity index according to a preset continuity quality reference value to generate the stripe continuity quality.
[0125] As an example of the present invention, refer to Figure 3 , in this example, step S3 includes:
[0126] Step S31: Locate the contour branch points of the simulated inkjet code model to obtain the inkjet branch position information;
[0127] In this embodiment, contour branch point positioning is performed on the simulated inkjet code model to identify the position information of branch nodes during the inkjet process. The position information of branch nodes refers to the position information where there are bifurcations or corners in the inkjet lines. The outline of the inkjet code model is iteratively trimmed multiple times through a thinning algorithm to retain its skeleton structure, and branches are identified in the skeleton. A branch point is a key node in the skeleton structure where the number of connection points exceeds two. To ensure accuracy, structural element analysis is first performed to confirm the actual existence of the branch points of the skeleton outline and eliminate noise points. After completion, all branch nodes are stored in the inkjet branch position information set and marked.
[0128] Step S32: Based on the inkjet branch position information, split the skeleton of the simulated inkjet code model to generate the basic skeleton of the inkjet code;
[0129] In this embodiment, based on the inkjet printing branch position information, the simulation inkjet printing model is split into skeletons to generate the basic inkjet printing skeletons. The skeleton splitting uses the cutting algorithm. Taking the branch nodes as the cutting points, the overall skeleton is split into multiple independent skeleton segments one by one. These segments respectively represent the basic structures of the inkjet printing model. By analyzing the characteristics of each segment one by one, its independence is confirmed. At the same time, connection indexes are set at the beginning and end of each segment for subsequent processing. During the splitting process, each skeleton segment retains the contour features of the original inkjet printing.
[0130] Step S33: Monitor the extension breakpoints of the basic inkjet printing skeletons to obtain the skeleton breakpoint positions.
[0131] In this embodiment, the generated basic inkjet printing skeletons are monitored for extension breakpoints to determine the potential breakpoint positions in the skeletons. The extension breakpoint monitoring is performed by gradually tracking the endpoints of each skeleton segment to find whether there are disconnections or discontinuities in the extension direction. Specifically, when operating, each skeleton segment is pixel-by-pixel tracked along the contour direction from the starting point to detect whether the distance between adjacent pixels exceeds the preset breakpoint threshold. If the over-distance phenomenon occurs, the position is recorded as the breakpoint position and stored in the skeleton breakpoint position set. The existence of breakpoints will indicate inkjet printing quality problems. By recording the breakpoint positions, it provides a data basis for the subsequent coherence analysis.
[0132] Step S34: Perform coherence analysis on the basic inkjet printing skeletons based on the skeleton breakpoint positions to generate skeleton continuity indexes.
[0133] In this embodiment, according to the skeleton breakpoint positions, coherence analysis is performed on the basic inkjet printing skeletons to generate skeleton continuity indexes. The coherence analysis determines the integrity of the overall skeleton by calculating the average continuous length and breakpoint interval distance of each skeleton segment. The specific method is to count the number and positions of continuous points in each skeleton segment. By statistically calculating the distances between the breakpoints in the skeleton and performing weighted average calculation, a continuity index is formed. The continuity index represents the coherence degree of the skeleton. The fewer the number of breakpoints and the shorter the interval, the more complete the skeleton. The analysis results form a set of skeleton continuity indexes.
[0134] Step S35: Map the quality level of the skeleton continuity indexes according to the preset continuity quality reference value to generate the stripe continuity quality.
[0135] In this embodiment, the quality grade mapping of the skeleton continuity index is performed according to a preset continuous quality reference value to generate the stripe continuity quality. The skeleton continuity index is compared with the preset reference value, and the index is classified into different grades such as "excellent", "good", "medium", and "poor" through the set quality grade standard. The specific operation is to determine the corresponding quality grade according to the deviation ratio between the specific value of the skeleton continuity index and the reference value. For example, if the continuity index is within the reference value range, the quality grade is determined to be "excellent", and the grade decreases successively as the deviation increases. The finally generated stripe continuity quality grade will be used for the final detection and evaluation of the inkjet printing quality.
[0136] Preferably, step S34 includes the following steps:
[0137] Segment the inkjet printing basic skeleton based on the skeleton break point positions to obtain multiple segments of inkjet printing skeletons;
[0138] Compare the adjacent lengths of the multiple segments of inkjet printing skeletons to generate the adjacent inkjet printing length differences;
[0139] Compare the adjacent angles of the multiple segments of inkjet printing skeletons to obtain the adjacent inkjet printing angle differences;
[0140] Evaluate the segment coherence of the adjacent inkjet printing length differences and the adjacent inkjet printing angle differences to generate the segment coherence quality;
[0141] Map the coherence index of the inkjet printing basic skeleton based on the segment coherence quality to generate the skeleton continuity index.
[0142] In this embodiment, the basic inkjet skeleton is segmented section by section using the positions of the skeleton breakpoints. Each inkjet skeleton segment between two breakpoints is regarded as an independent skeleton segment. Each breakpoint is located in sequence on the basic inkjet skeleton, and adjacent breakpoints are used as the starting and ending points of segmentation. If the length of a skeleton segment is too small, that segment is skipped to avoid the accumulation of errors in the analysis. Through this segmentation operation, several independent multi-segment inkjet skeletons are obtained. The structure of each skeleton segment remains consistent, ensuring the equivalence of each segment in subsequent analysis. The actual pixel length of each skeleton segment is measured in sequence, and the total number of pixels of each segment is recorded. The lengths of adjacent segments are subtracted to obtain the adjacent inkjet length difference. The length difference represents the length change of the inkjet skeleton between segments, used to judge the uniformity of the inkjet. Finally, each length difference result is stored in the adjacent inkjet length difference set. The magnitude of the length difference value is used to evaluate the overall uniformity and length distribution characteristics of the inkjet. In the angle difference comparison, the direction angles of the multi-segment inkjet skeleton are calculated section by section. The starting point and ending point of each segment are used as the reference for angle calculation to obtain the direction vector of each segment of the skeleton. The included angle between the direction vectors of adjacent segments is calculated. The included angle is the angle difference between the two segments. If the angle difference between adjacent segments is too large, it indicates that there is a problem with the continuity of the inkjet. The angle difference values of each adjacent segment are recorded in sequence to form the adjacent inkjet angle difference set. The closer the values in the angle difference set are, the more consistent the direction of the inkjet skeleton is. The larger the angle difference, the more discontinuous there is during the inkjet process. Based on the length difference and angle difference, the continuity of the inkjet is comprehensively evaluated. The length difference value and angle difference value of each skeleton segment are used as the continuity judgment criteria. The length difference and angle difference are weighted and calculated to obtain the continuity score between each skeleton segment. If the score is within the continuity standard range, that segment is marked as "coherent", otherwise it is marked as "incoherent". Finally, the continuity marks of each skeleton segment are summarized to generate the overall segmented continuity quality result, indicating the uniformity degree and continuity characteristics of the inkjet. The segmented continuity quality result is mapped and analyzed with the coherence degree information of each segment of the basic inkjet skeleton to count the continuity scores of each coherent segment. Combining the preset continuity standard, the overall continuity score of the skeleton is calculated to complete the mapping of the continuity index of the inkjet skeleton. The higher the score, the more continuous the inkjet is. The generated skeleton continuity index will be used as the judgment basis for the inkjet quality. This index is used to quantify the inkjet continuity and for the comprehensive evaluation of the subsequent inkjet quality.
[0143] Preferably, step S4 includes the following steps:
[0144] Step S41: Locate the boundaries of the basic inkjet skeleton to obtain the stripe boundary point set;
[0145] Step S42: Traverse and count the spacing of the stripe boundary point set to generate the stripe interval distance;
[0146] Step S43: Calculate the local dispersion of the inkjet basic skeleton based on the stripe interval distance to obtain the inkjet void dispersion;
[0147] Step S44: Extract the mean value of the inkjet void dispersion to generate the mean dispersion;
[0148] Step S45: Evaluate the uniformity of the inkjet basic skeleton based on the preset uniformity quality reference value and the mean dispersion to obtain the stripe uniformity quality.
[0149] In this embodiment, each pixel point of the inkjet skeleton is processed based on the Edge Detection Algorithm. The contour detection function is used to sequentially identify the edge pixel points of each section of the inkjet. All the identified edge pixel points will be stored in the stripe boundary point set. The boundary point set contains the specific positions of each stripe in space, thus ensuring sufficient accuracy in subsequent spacing statistics. According to the arrangement order of the stripes, the coordinate positions of adjacent boundary points are extracted pair by pair from the boundary point set. The Euclidean distance between each pair of adjacent boundary points is calculated and stored in the stripe interval distance list. The values in the stripe interval distance list are used to represent the interval law of the inkjet stripes and the uniformity of the inkjet. The statistics of each interval distance contribute to the subsequent calculation of the dispersion. The values in the stripe interval distance list are divided into several regions. Then, the standard deviation of the stripe interval values in each region is calculated to obtain the dispersion value of each region. These dispersion values are stored in the inkjet void dispersion list one by one. The size of the inkjet void dispersion reflects whether the intervals of the inkjet stripes are consistent. A larger dispersion value indicates a larger difference in the intervals between the stripes, and a smaller dispersion value indicates a more uniform stripe interval. The dispersion values in the inkjet void dispersion list are accumulated, and the accumulated result is divided by the number of dispersion values to obtain the mean dispersion. The mean dispersion is used to quantify the uniformity characteristics of the overall inkjet. A lower mean value indicates that the stripe intervals of the inkjet are more consistent, and a high mean dispersion value indicates obvious non-uniformity in the stripe intervals. Finally, this mean value is stored in the mean dispersion variable for subsequent uniformity evaluation. The mean dispersion is compared with the preset uniformity quality reference value. The uniformity quality reference value is a threshold set based on the inkjet process standard and is used to judge the uniformity of the inkjet stripes. If the mean dispersion is less than or equal to the uniformity quality reference value, it is determined that the inkjet uniformity quality is qualified; otherwise, it is determined as unqualified. The evaluation result is stored in the stripe uniformity quality variable. This uniformity quality value will be used as the final judgment basis for the inkjet quality to measure the overall uniformity of the inkjet process.
[0150] Preferably, step S43 includes the following steps:
[0151] Step S431: Cut the inkjet void areas on the inkjet basic skeleton based on the stripe interval distance to generate a set of inkjet void areas;
[0152] Step S432: Determine the extreme values of the intervals for the set of inkjet void areas to obtain the maximum void interval and the minimum void interval;
[0153] Step S433: Calculate the local dispersion for the set of inkjet void areas according to the maximum interval value and the minimum interval value to generate a set of local void dispersions;
[0154] Step S434: Perform global integration processing on the set of local void dispersions to obtain the inkjet void dispersion.
[0155] In this embodiment, the stripe interval distance list is combined with the inkjet basic skeleton to calibrate the void positions between the inkjet stripes. By analyzing the intervals in the stripe interval distance list that are greater than the set threshold, the void areas of the inkjet stripes are separated from the basic skeleton one by one. Each area that meets the void conditions will be cut and stored in the set of inkjet void areas, forming a void set that includes the positions and boundaries of each void area. After the division of the void areas is completed, the set of void areas will be used for subsequent extreme value and dispersion analysis operations. Each void area in the set of inkjet void areas is detected one by one. By measuring the width of each void area and storing the measured values in the void interval list in sequence, the extreme value function is applied to the void interval list to identify the maximum and minimum values and store them as the maximum void interval and the minimum void interval respectively. The void interval extreme values will be used as the basic parameters for local dispersion calculation to evaluate the range of void changes in the stripes during the inkjet process. The differences between the maximum and minimum values are analyzed for each area in the set of void areas. By calculating the differences between the intervals of each segment in the void area relative to the extreme values, and then using the variance function for dispersion calculation, the local dispersion value of the area is obtained, and all dispersion values are stored as the set of local void dispersions. The set of local void dispersions is used to represent the interval change situation of each void area to reflect the local uniformity difference between the inkjet stripes. The discrete values in the set of local void dispersions are subjected to weighted average calculation, and the calculation result will be defined as the inkjet void dispersion. Through the total dispersion statistics, the inkjet void dispersion value will be used to quantify the overall uniformity degree of each void during the inkjet process. Finally, as the core index for evaluating the inkjet uniformity, the inkjet void dispersion will be applied to the result determination of the inkjet quality inspection.
[0156] Preferably, step S433 includes the following steps:
[0157] Calculate the standard interval difference between the maximum interval value and the minimum interval value to obtain the interval standard difference value;
[0158] Calculate the fluctuation range of the maximum and minimum spacing values to generate a discrete allowable range;
[0159] Build an ideal interval for the set of inkjet void areas based on the standard deviation of the spacing to generate an ideal reference interval;
[0160] Locate the relative positions of the set of inkjet void areas according to the ideal reference interval to obtain regional deviation data;
[0161] Identify the fluctuation interval of the regional deviation data based on the discrete allowable range to generate a regional deviation fluctuation interval;
[0162] Evaluate the dispersion of the regional deviation fluctuation interval according to the ideal reference interval to generate a set of local void dispersions.
[0163] In this embodiment, the maximum spacing value and the minimum spacing value are used as input data. By applying the standard deviation formula, that is, dividing the difference between the two by the total number to obtain the sample standard deviation, the spacing standard deviation value is generated. The spacing standard deviation value is used as an important indicator to measure the volatility of the inkjet spacing, which is used to reflect the dispersion degree of the inkjet spacing. This value will provide a data basis for the construction of the subsequent ideal interval and serve as a reference for the fluctuation of the spacing. The allowable range between the maximum spacing value and the minimum spacing value is calculated using the dispersion analysis method. First, the allowable fluctuation coefficient is defined, and based on this coefficient, the difference between the maximum spacing value and the minimum spacing value is multiplied by the allowable coefficient to generate the discrete allowable range. The discrete allowable range is used as the deviation limit for defining the inkjet stripe spacing, which is used for subsequent deviation evaluation to ensure the compliance of the inkjet stripe spacing. This range provides a reference standard for the discrete detection of the inkjet void area. By calculating and analyzing the spacing standard deviation value, an ideal reference interval is constructed. The ideal reference interval uses the ideal spacing range defined by the standard deviation value as the target interval for the inkjet stripe distribution. By introducing the ideal interval range calibration points in each void area of the inkjet void area set, it is convenient for the subsequent positioning and fluctuation evaluation of the deviation. The ideal reference interval is used as the reference spacing set to evaluate the fluctuation deviation of the actual inkjet spacing. Based on the preset standard of the ideal reference interval, the position of each inkjet void area is compared with the reference interval, so as to measure the deviation amplitude of each void area. Using the regional deviation calculation formula, the distance difference between each inkjet area in the void area set and the ideal interval is statistically calculated and stored as deviation data. The generated regional deviation data is used for the subsequent identification of the fluctuation interval to judge the actual discrete deviation degree of the inkjet spacing. Based on the upper and lower limits of the discrete allowable range, the regional deviation data is compared with the allowable range one by one to judge whether the deviation of each area exceeds the specified discrete allowable range. The deviation data that exceeds the allowable range is marked as the fluctuation abnormal interval. By recording the deviation amplitude of the abnormal interval, the regional deviation fluctuation interval is generated. The regional deviation fluctuation interval is used as the deviation characterization of the inkjet uniformity quality to facilitate the evaluation of the stability of the inkjet process. By comparing each data point in the regional deviation fluctuation interval with the ideal reference interval, by analyzing the data distribution in the fluctuation interval, the deviation dispersion value of each area is calculated using the dispersion evaluation formula. The dispersion results of each area are sequentially integrated into the local void dispersion set, and the local spacing volatility of the inkjet void area is reflected through the local void dispersion set.
[0164] Preferably, step S5 includes the following steps:
[0165] Step S51: Perform equal-weight fusion on the stripe continuity quality and the stripe uniformity quality to obtain the fusion quality value;
[0166] Step S52: Based on the fusion quality value, perform a readable quality deduction on the simulation inkjet model to generate a predicted readable quality value;
[0167] Step S53: Perform hierarchical processing on the predicted readable quality value to obtain a graded inkjet coding quality value;
[0168] Step S54: Perform quality level mapping on the simulated inkjet coding model according to the graded inkjet coding quality value to generate a quality assessment report.
[0169] In this embodiment, the stripe continuity quality value and the stripe uniformity quality value are obtained. The stripe continuity quality value represents the continuity between inkjet stripes, while the stripe uniformity quality value reflects the uniformity of inkjet stripes. As two important criteria for evaluating inkjet coding quality, they are fused by setting a weight coefficient. The equal weight method is adopted, that is, the weight of each quality value is set to 0.5. By the method of weighted summation, the fused quality value is calculated. This fused quality value represents the comprehensive quality level of inkjet stripes and serves as the basis for subsequent quality assessment. Taking the fused quality value as input data, a simulated inkjet coding model is used. This model is based on previous inkjet coding data and deduces the readability of inkjet coding by simulating various quality change situations that occur during the inkjet coding process. During this process, the simulation model simulates the actual readability of inkjet stripes according to the fused quality value and simulation rules and generates a predicted readable quality value. The predicted readable quality value reflects the readable degree of inkjet stripes in actual applications. This predicted value will provide a reference basis for the next quality grading. Define several inkjet coding quality levels, such as excellent, good, general, unqualified, etc. The boundary values of each level are set by historical inkjet coding data and quality standards. Subsequently, the predicted readable quality value is compared with these standards. If the predicted value falls within a certain specific interval, the inkjet coding quality value will be classified into the corresponding level. Through this processing process, a graded inkjet coding quality value is generated, and the quality of each inkjet stripe will be assigned to the corresponding quality level for subsequent quality assessment and report generation. Using the graded inkjet coding quality value, by establishing a mapping relationship, the quality level of each inkjet stripe is associated with specific regions or inkjet points in the simulated inkjet coding model. Through this mapping, the quality status of the inkjet coding region is identified. Finally, a quality assessment report is generated according to the mapping result. The report details the quality levels and related indicators of each inkjet coding region and summarizes and evaluates the overall inkjet coding quality. This report can be used as a basis for debugging or repairing inkjet coding equipment and also provides data support for quality control.
[0170] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, it is intended to cover all changes falling within the meaning and scope of the equivalent elements of the application documents within the present invention.
[0171] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features invented herein.
Claims
1. A method for detecting the inkjet quality of an intelligent inkjet printer, characterized in that: The following steps are involved: Step S1: Collecting the image of the coding area; Perform double histogram equalization on the coding area image and perform binary segmentation to obtain a binary image; Step S2: extracting the extreme connected domain of the binary image, and performing inkjet coding simulation reconstruction to generate a simulated inkjet coding model; wherein step S2 includes the following steps: Step S21: Perform eight-neighborhood channel statistics on the binary image to obtain a candidate connected domain; Step S22: Tracing the boundary contour of the candidate connected domain to generate a connected domain contour point set; Step S23: identifying extreme points of the connected domain contour point set to obtain key contour points of the connected domain; Step S24: performing feature topological relationship analysis on key contour points of the connected domain to generate a contour point topological structure; Step S25: reconstructing the key contour points of the connected domain based on the contour point topological structure to obtain the key contour for inkjet printing; Step S26: Fill the key outline of the inkjet coding with inkjet texture according to the binary image to generate a simulated inkjet coding model; Step S3: splitting the stripe skeleton of the simulated inkjet model to obtain the basic skeleton of the inkjet; performing extension and coherence analysis on the basic skeleton of the inkjet to generate stripe continuity quality; wherein step S3 includes the following steps: Step S31: positioning the contour branch points of the simulation inkjet model to obtain inkjet branch position information; Step S32: splitting the simulated inkjet model into skeletons based on the inkjet branch position information to generate an inkjet basic skeleton; Step S33: monitor the extension breakpoints of the coding basic skeleton to obtain the skeleton breakpoint positions; Step S34: performing a coherence analysis on the basic skeleton of the coding based on the skeleton breakpoint positions to generate a skeleton continuity index; wherein step S34 includes the following steps: The basic coding skeleton is segmented based on the skeleton breakpoint positions to obtain a multi-segment coding skeleton; Compare the adjacent length differences of multiple sections of inkjet skeletons to generate the adjacent inkjet length differences; Compare the adjacent angle differences of multiple sections of inkjet skeletons to obtain the adjacent inkjet angle differences; Perform segment continuity evaluation on the difference in adjacent code lengths and adjacent code angles to generate segment continuity quality; Based on the segmented continuity quality, the coherence index of the basic skeleton of the inkjet coding is mapped to generate the skeleton continuity index; Step S35: mapping the skeleton continuity index to a quality level according to a preset continuity quality reference value to generate a stripe continuity quality; Step S4: Based on the basic skeleton of inkjet printing, the gap dispersion analysis of the simulated inkjet printing model is performed, and the uniformity evaluation is performed to obtain the stripe uniformity quality; wherein, step S4 includes the following steps: Step S41: performing boundary positioning on the basic skeleton of the inkjet printer to obtain a set of stripe boundary points; Step S42: performing spacing traversal statistics on the stripe boundary point set to generate the stripe spacing distance; Step S43: Calculate the local discreteness of the coding basic skeleton based on the stripe spacing distance to obtain the coding gap discreteness; wherein step S43 includes the following steps: Step S431: cutting the coding gap area of the coding basic skeleton based on the stripe spacing distance to generate a coding gap area set; Step S432: determining the spacing extreme values of the inkjet coding gap area set to obtain the maximum spacing value and the minimum spacing value; Step S433: Calculate the local discreteness of the coding gap area set according to the maximum spacing value and the minimum spacing value to generate a local gap discreteness set; wherein step S433 includes the following steps: The standard spacing difference is calculated for the maximum spacing value and the minimum spacing value to obtain the spacing standard deviation value; Calculate the fluctuation range of the maximum and minimum interval values to generate a discrete allowable range; Based on the standard deviation of the spacing, an ideal interval is constructed for the inkjet coding gap area set to generate an ideal reference interval; According to the ideal reference interval, the relative position of the inkjet coding gap area set is located to obtain the regional deviation data; Identify the fluctuation interval of regional deviation data based on the discrete allowable range and generate the regional deviation fluctuation interval; The dispersion of the regional deviation fluctuation interval is evaluated according to the ideal benchmark interval to generate a local gap dispersion set; Step S434: globally integrating the local gap discreteness set to obtain the coding gap discreteness; Step S44: extracting the mean of the inkjet coding gap discreteness to generate a discreteness mean; Step S45: performing uniformity evaluation on the basic skeleton of the inkjet printer based on the preset uniformity quality reference value and the mean value of the dispersion to obtain the stripe uniformity quality; Step S5: Deducing the readable quality of the simulated inkjet printing model according to the stripe continuity quality and the stripe uniformity quality, and mapping the quality level to generate a comprehensive quality assessment report, wherein step S5 includes the following steps: Step S51: performing weighted fusion on the stripe continuity quality and the stripe uniformity quality to obtain a fusion quality value; Step S52: performing readability quality deduction on the simulated inkjet coding model based on the fused quality value to generate a predicted readability quality value; Step S53: performing hierarchical processing on the predicted readable quality value to obtain a graded coding quality value; Step S54: mapping the quality level of the simulated inkjet printing model according to the graded inkjet printing quality value, and generating a quality assessment report.
2. The method for detecting the inkjet quality of an intelligent inkjet printer according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: collecting the image of the coding area; performing global histogram equalization processing on the image of the coding area to obtain an enhanced coding image; Step S12: performing non-enhanced area detection on the enhanced inkjet coding image to obtain a non-uniform area; Step S13: performing local adaptive equalization processing on the non-uniform area to generate a double equalized image; Step S14: performing maximum inter-class variance analysis on the double equalized image to obtain a cutting variance threshold parameter; Step S15: performing binarization segmentation on the double equalized image based on the cutting variance threshold parameter to obtain a binarized image.
Citation Information
Patent Citations
Layer-by-layer segmentation method for distorted code spraying characters
CN111860521A