A method, system and device for detecting surface printing defects of a corrugated packaging box
By performing regional analysis on corrugated cardboard box images, printing defects can be identified and quantified, solving the problem of inaccurate manual inspection and realizing intelligent detection and production optimization of printing defects in corrugated cardboard boxes.
Patent Information
- Application Number
- CN202511144447.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-15
AI Technical Summary
In existing technologies, the detection of printing defects in corrugated boxes relies on manual experience, which makes it impossible to trace the specific process or cause of the defects, resulting in inaccurate detection results.
By acquiring images of the corrugated paper to be tested and template images, the detection area and template area are divided. Suspected white leakage areas are identified based on the difference in average reflectance. Edge pixels of suspected white leakage areas are extracted, and the edge connection breakage degree and the shape irregularity index and distribution density of the closed area are calculated. The white leakage unit and the pattern repetition and missing rate are determined, thereby identifying the defect type and associating it with the production process.
It enables intelligent identification and quantification of printing defects in corrugated packaging boxes, improving the objectivity and accuracy of detection, locating defect types, optimizing production processes, and reducing the production of defective products.
Smart Images

Figure CN120707563B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a corrugated packaging box surface printing defect detection method, system and device. BACKGROUND
[0002] As an important packaging carrier, corrugated boxes not only protect products from damage during transportation and storage, but also display brand image and deliver logistics information through surface printing. Printing defects in the production process of corrugated boxes can cause many problems. For example, on the appearance level, blurred text or color deviation can reduce the appearance of the package and the visual presentation effect of the product; on the functional level, if the printed content involves key information such as usage instructions, defects may cause misreading or missing of information. Therefore, the process precision and quality detection of the printing process need to be strictly controlled during the production of corrugated boxes to reduce the production of defective products.
[0003] In the production process of corrugated boxes, the above-mentioned printing defects may be caused by a single process anomaly or the combined action of multiple processes, and in the related art, the printing defects of corrugated boxes are mainly detected by relying on human experience, which can only determine the final result of whether the corrugated box has printing defects, and cannot trace the specific process or reason for the defect. SUMMARY
[0004] To solve the problem of relying on human experience to detect the printing defects of corrugated boxes in the related art, which can only determine the final result of whether the corrugated box has printing defects, and cannot trace the specific process or reason for the defect, the present application provides a corrugated packaging box surface printing defect detection method, the technical solution is as follows:
[0005] Obtain and align the corrugated paper image to be tested and the template image, and divide the corrugated paper image to be tested and the template image into a plurality of corresponding detection regions and template regions; wherein the template image is an image of a non-white printing template;
[0006] Based on the average reflectivity difference of the detection region and its corresponding template region, identify the suspected white omission area in the detection region;
[0007] Extract the pixel points of the suspected white omission area contour edge, and determine the edge connection fracture degree based on the color difference value of each edge pixel point and the standard color on both sides of the contour edge;
[0008] determine a shape irregularity index and a distribution density index of the target closed region based on the fractal dimension of the suspected missing region and the distance between regions, and determine a closed region filling defect rate based on the shape irregularity index and the distribution density index; the target closed region is any closed figure that needs to be printed on the image surface of the corrugated paper to be tested;
[0009] identify a second repeating pattern unit in the corrugated paper image to be tested based on a first repeating pattern unit in the template image, determine a missing unit based on the average color difference of the first repeating pattern unit and the second repeating pattern unit, and determine a pattern repetition loss rate based on the missing density and the missing dispersion of the missing unit;
[0010] determine the defect type and associate the corresponding production process based on the edge connection fracture degree, the closed region filling defect rate and the pattern repetition loss rate.
[0011] Illustratively, based on the average reflectivity difference of the detection region and its corresponding template region, the suspected missing region in the detection region is identified, including: obtaining a standard color block, which is a color sample with known and fixed reflectivity; determining the gray value of the standard color block, and determining the target mapping relationship based on the gray value of the standard color block and the reflectivity; determining the average reflectivity of each pixel point in the detection region based on the target mapping relationship and taking the average, denoted as the first average reflectivity; determining the average reflectivity of each pixel point in the template region based on the target mapping relationship and taking the average, denoted as the second average reflectivity; calculating the difference between the first average reflectivity and the second average reflectivity to obtain the average reflectivity difference, and identifying the detection region with an average reflectivity difference greater than a first preset threshold as the suspected missing region.
[0012] Illustratively, the pixel points of the suspected missing region contour edge are extracted, and the edge connection fracture degree is determined based on the color difference value between the color of each edge pixel point and the standard color on both sides of the contour edge, including: extracting all edge pixel points on the contour edge of the suspected missing region based on an edge detection algorithm; determining a first standard color and a second standard color located on different sides of the contour edge based on the template image; for each edge pixel point, calculating a first color difference value between the color of the edge pixel point and the first standard color, and a second color difference value between the color of the edge pixel point and the second standard color; if both the first color difference value and the second color difference value are greater than a second preset threshold, the corresponding edge pixel point is recorded as a fracture pixel point; the edge connection fracture degree is determined based on the number of fracture pixel points and the total number of edge pixel points.
[0013] Illustratively, the shape irregularity index and the distribution density index of the target closed region are determined based on the fractal dimension of the suspected missing area and the inter-area distance, including: calculating the fractal dimension of each suspected missing area in the target closed region based on the box dimension method; obtaining the area perimeter of each suspected missing area, and determining a reference length based on the area perimeter of each suspected missing area; determining the shape irregularity index based on the area perimeter, the reference length and the fractal dimension of each suspected missing area; calculating the Euclidean distance between the centroids of any two suspected missing areas in the target closed region, denoted as the inter-area distance between the any two suspected missing areas; determining the distribution density index based on each inter-area distance and the number of suspected missing areas.
[0014] Illustratively, the closed region filling defect rate is determined based on the shape irregularity index and the distribution density index, including: obtaining a morphological sensitivity coefficient of the target closed region preset; setting a printing speed interval of a printing machine, and determining a spatial sensitivity coefficient of the target closed region based on the printing speed interval; determining a first filling defect factor based on the morphological sensitivity coefficient and the shape irregularity index, and determining a second filling defect factor based on the spatial sensitivity coefficient and the distribution density index; determining the closed region filling defect rate based on the first filling defect factor and the second filling defect factor.
[0015] Illustratively, the second repetitive pattern unit in the to-be-tested corrugated paper image is identified based on the first repetitive pattern unit in the template image, including: obtaining the first repetitive pattern unit in the template image; sliding the first repetitive pattern unit in the to-be-tested corrugated paper image based on a square difference matching algorithm, and determining the similarity between each pattern unit in the to-be-tested corrugated paper image and the first repetitive pattern unit in the sliding process; identifying the pattern unit with a similarity greater than a third preset threshold value as the second repetitive pattern unit.
[0016] Illustratively, the missing area is determined based on the average color difference of the first repetitive pattern unit and the second repetitive pattern unit, including: calculating the average color difference of the first repetitive pattern unit and the second repetitive pattern unit, and determining the second repetitive pattern unit with an average color difference greater than a fourth preset threshold value as a missing area.
[0017] Exemplarily, the determining the pattern repetition missing rate based on the leakage density and the leakage dispersion of the leakage unit comprises: determining the leakage density based on the number of the leakage units in the corrugated paper image to be tested and the total number of the pattern units; determining the unit perimeter and the unit area of each of the leakage units, and calculating the perimeter average of each of the unit perimeters and the area average of each of the unit areas; determining a first dispersion factor based on each of the unit perimeters and the perimeter average, and determining a second dispersion factor based on each of the unit areas and the area average; determining the leakage dispersion based on the first dispersion factor and the second dispersion factor; determining a first repetition missing factor based on a preset weight coefficient and the leakage density, and determining a second repetition missing factor based on the preset weight coefficient and the leakage dispersion; and determining the pattern repetition missing rate based on the first repetition missing factor and the second repetition missing factor.
[0018] The application further provides a surface printing defect detection system for corrugated packaging boxes, comprising:
[0019] an image acquisition subsystem for capturing, by a high-frame camera and a fixed light source, a corrugated packaging box image after printing on a printing machine;
[0020] a defect detection subsystem for acquiring and aligning the corrugated paper image to be tested and a template image, and dividing the corrugated paper image to be tested and the template image into a plurality of corresponding detection regions and template regions; wherein the template image is an image of a non-leakage printing template; identifying a suspected leakage region in the detection region based on the average reflectivity difference between the detection region and the corresponding template region; extracting pixel points of the suspected leakage region contour edge, determining edge connection fracture degree based on the color difference value between each edge pixel point and the standard color on both sides of the contour edge; determining shape irregularity index and distribution density index of a target closed region based on the fractal dimension and the inter-region distance of the suspected leakage region, and determining closed region filling defect rate based on the shape irregularity index and the distribution density index, the target closed region being any closed figure that needs to be printed on the surface of the corrugated paper image to be tested; identifying a second repetitive pattern unit in the corrugated paper image to be tested based on a first repetitive pattern unit in the template image, determining a leakage unit based on the average color difference between the first repetitive pattern unit and the second repetitive pattern unit, and determining a pattern repetition missing rate based on the leakage density and the leakage dispersion of the leakage unit; and determining a defect type and associating a corresponding production process based on the edge connection fracture degree, the closed region filling defect rate, and the pattern repetition missing rate.
[0021] The application further provides a surface printing defect detection device for corrugated packaging boxes, comprising:
[0022] An image acquisition module is configured to acquire and align a corrugated paper image to be tested and a template image, and divide the corrugated paper image to be tested and the template image into a plurality of corresponding detection regions and template regions; wherein the template image is an image of a non-missing printing template;
[0023] An image processing module is configured to identify a suspected missing region in the detection region based on an average reflectivity difference of the detection region and the corresponding template region;
[0024] The image processing module is further configured to extract pixel points of a contour edge of the suspected missing region, and determine an edge connection fracture degree based on a color difference value between a color of each edge pixel point and a standard color on both sides of the contour edge.
[0025] The image processing module is further configured to determine a shape irregularity index and a distribution density index of a target closed region based on a fractal dimension and an inter-region distance of the suspected missing region, and determine a closed region filling defect rate based on the shape irregularity index and the distribution density index; the target closed region is any closed figure that needs to be printed on a surface of the corrugated paper image to be tested.
[0026] The image processing module is further configured to identify a second repeating pattern unit in the corrugated paper image to be tested based on a first repeating pattern unit in the template image, determine a missing unit based on an average color difference of the first repeating pattern unit and the second repeating pattern unit, and determine a pattern repetition loss rate based on a missing density and a missing dispersion of the missing unit.
[0027] A defect detection module is configured to determine a defect type and associate a corresponding production process based on the edge connection fracture degree, the closed region filling defect rate, and the pattern repetition loss rate.
[0028] The present application can have the following parts or all of the beneficial effects:
[0029] In the surface printing defect detection method of the corrugated packaging box provided in the application, the suspected white omission area is identified based on the average reflectivity difference of the corresponding detection area and the template area, and the edge connection fracture degree, the closed area filling defect rate and the pattern repetition missing rate are determined by analyzing the shape, distribution and color characteristics of the suspected white omission area, so that the intelligent identification of the white omission area can be realized through quantitative indexes, the dependence on artificial experience is eliminated, and the objectivity and accuracy of the corrugated packaging box printing defect detection are improved. In addition, after the edge connection fracture degree, the closed area filling defect rate and the pattern repetition missing rate are determined, the defect type to which the white omission area belongs is determined based on the quantitative indexes, and the production process in which the printing defect occurs is associated based on the defect type to which the white omission area belongs. By determining the potential production problems corresponding to different white omission types, evidence can be provided for targeted optimization of the corrugated packaging box production link, and the generation of defective products can be reduced.
[0030] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the application. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the application or prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0032] Figure 1 A flow chart of a surface printing defect detection method of a corrugated packaging box according to an exemplary embodiment of the application is shown;
[0033] Figure 2 A schematic block diagram of a surface printing defect detection system of a corrugated packaging box according to an exemplary embodiment of the application is shown;
[0034] Figure 3 A schematic diagram of an image acquisition subsystem in a surface printing defect detection system of a corrugated packaging box according to an exemplary embodiment of the application is shown, which acquires corrugated paper images to be detected;
[0035] Figure 4 A schematic block diagram of a surface printing defect detection device of a corrugated packaging box according to an exemplary embodiment of the application is shown. DETAILED DESCRIPTION
[0036] In order to further illustrate the technical means and effects taken by the present application to achieve the predetermined object, the specific implementation, structure, features and effects of the surface printing defect detection method, system and device of a corrugated packaging box according to the present application are described in detail as follows. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0037] Unless otherwise defined, all 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.
[0038] The specific scheme of the surface printing defect detection method, system and device of a corrugated packaging box provided by the present application is described in detail below in combination with the drawings.
[0039] Please refer to Figure 1 , which shows a flowchart of a surface printing defect detection method of a corrugated packaging box according to one embodiment of the present application, as shown in Figure 1 , the surface printing defect detection method of the corrugated packaging box specifically includes the following steps:
[0040] S110: Acquire and align the corrugated paper image to be tested and the template image, and divide the corrugated paper image to be tested and the template image into a plurality of corresponding detection areas and template areas; wherein the template image is an image of a non-missing printing template;
[0041] S120: Based on the average reflectivity difference of the detection area and its corresponding template area, identify the suspected missing area in the detection area;
[0042] S130: Extract the pixel points of the suspected missing area contour edge, and determine the edge connection fracture degree based on the color difference value of each edge pixel point and the standard color on both sides of the contour edge;
[0043] S140: Determine the shape irregularity index and distribution density index of the target closed area based on the fractal dimension and inter-regional distance of the suspected missing area, and determine the closed area filling defect rate based on the shape irregularity index and distribution density index, the target closed area being any closed figure that needs to be printed on the surface of the corrugated paper image to be tested;
[0044] S150: Identify the second repeating pattern unit in the corrugated paper image to be tested based on the first repeating pattern unit in the template image, determine the missing unit based on the average color difference of the first repeating pattern unit and the second repeating pattern unit, and determine the pattern repetition loss rate based on the missing density and missing dispersion of the missing unit;
[0045] S160: Determine the defect type based on the edge connection fracture degree, closed area filling defect rate and pattern repetition missing rate, and associate the corresponding production process.
[0046] Next, each step of the above corrugated packaging box surface printing defect detection method will be described in detail:
[0047] In step S110, the to-be-tested corrugated paper image and the template image are acquired and aligned, and the to-be-tested corrugated paper image and the template image are divided into a plurality of corresponding detection regions and template regions; wherein the template image is an image of a non-white printing template.
[0048] In the embodiments of the present application, the above-mentioned to-be-tested corrugated paper image is an image of the surface of the corrugated packaging box synchronously collected by the image acquisition device at the first time when the printing process is completed in the corrugated packaging box production process. Illustratively, the above-mentioned image acquisition device can be an industrial camera with high resolution and high frame rate vertically erected above the printing machine, which needs to ensure that the camera's shooting range can completely cover the entire surface of the corrugated packaging box; wherein the above-mentioned printing machine is used to print patterns on the surface of the corrugated packaging box.
[0049] Specifically, the above-mentioned to-be-tested corrugated paper image can be obtained by adjusting the angle and height of the industrial camera above the printing machine to ensure that its shooting range completely covers the entire surface of the corrugated packaging box; connecting the industrial camera with the control system of the printing machine and setting a synchronous triggering mechanism, when the printing machine completes the printing of a corrugated packaging box and transports it to the shooting position, the camera immediately automatically shoots an image, realizing the precise synchronization of printing and shooting; at the same time, a full-spectrum white LED ring light source is installed around the lens of the industrial camera, and the brightness of the light source is adjusted to make the light evenly illuminate the surface of the packaging box, which can clearly present the details of the printed pattern and reduce the shadows caused by uneven lighting, avoiding interference with subsequent defect detection.
[0050] In the embodiments of the present application, the above-mentioned template image is an image of a non-white printing template. Illustratively, the template image can be an image of a pre-made printed qualified product of the corrugated packaging box collected by the image acquisition device.
[0051] In the embodiments of the present application, after the to-be-tested corrugated paper image and the template image are collected by the above-mentioned method, the to-be-tested corrugated paper image and the template image can be aligned based on a feature point matching algorithm. Specifically, the feature matching process can be implemented as follows: the first feature points in the template image and the second feature points corresponding to the first feature points in the to-be-tested corrugated paper image are extracted by a feature detection algorithm, to form a first feature point set of the template image and a second feature point set of the to-be-tested corrugated paper image , wherein, is the coordinate of the i-th feature point in the first feature point set, is the coordinate of the i-th feature point in the second feature point set; the Euclidean distance between the first feature point in the first feature point set and the second feature point in the corresponding second feature point set is calculated, and the calculated Euclidean distance is normalized to obtain a matching score; the feature point pair corresponding to the matching score greater than a preset threshold (for example, 0.8) is determined as a matching feature point pair ; based on the correspondence between the matching feature point pairs, a 2D affine transformation matrix is calculated by using the least square method, so that the coordinates of the first feature points in the image coordinate system of the to-be-tested corrugated paper can be converted to the image coordinate system of the template based on the 2D affine transformation matrix, so as to realize accurate alignment of the to-be-tested corrugated paper image and the template image.
[0052] Since the corrugated paper after printing is in a static state, its physical position and size are relatively fixed, the method of dividing the surface of the to-be-tested corrugated paper image into several equidistant small sections can be used to improve the accuracy of locating the printing defects in the to-be-tested corrugated paper image. For example, the process can be implemented as follows: the to-be-tested corrugated paper image and the template image are divided into a plurality of corresponding detection regions and template regions. Specifically, the surface of the to-be-tested corrugated paper image is uniformly divided into several equidistant small sections (S1, S2, …, Sn) along a fixed direction, each small section Si corresponds to a fixed geometric position of the surface of the to-be-tested corrugated paper image, forming a standardized detection region; at the same time, the template image is divided into a plurality of template regions (T1, T2, …, Tn) corresponding to the above detection regions in the same distance division manner, so that each template region Ti is completely matched with the detection region Si in physical position and size, so as to accurately compare the differences between the detection regions and the template regions through one-to-one correspondence, thereby locating the printing defects of the to-be-tested corrugated paper image.
[0053] In step S120, a suspected white omission region in the detection region is identified based on the average reflectivity difference of the detection region and its corresponding template region.
[0054] In the embodiment of the present application, the above-mentioned suspected white omission region is a region in the detection region that is preliminarily determined to possibly exist printing white omission according to the reflectivity of the light; wherein the above-mentioned printing white omission is the color loss or blank of the region that should be filled with ink; the principle of preliminarily determining the suspected white omission region according to the reflectivity of the light is as follows: the ink-covered region will absorb more light due to containing closely attached pigment particles on the surface of the paper, thereby showing lower reflectivity; while the corrugated paper surface is not covered with ink, the rough surface of the carton will reflect more light, thereby showing higher reflectivity; that is, the suspected white omission region will show higher reflectivity compared with the normally printed region.
[0055] Exemplarily, the above-mentioned average reflectivity difference based on the detection area and the corresponding template area thereof to identify the suspected white omission area in the detection area can be implemented as follows: a standard color block is obtained, the standard color block is a color sample with known and fixed reflectivity; the gray value of the standard color block is determined, and a target mapping relationship is determined based on the gray value of the standard color block and the reflectivity; the reflectivity corresponding to the gray value of each pixel point in the detection area is determined based on the target mapping relationship, and an average value is obtained, which is recorded as a first average reflectivity; the reflectivity corresponding to the gray value of each pixel point in the template area is determined based on the target mapping relationship, and an average value is obtained, which is recorded as a second average reflectivity; the difference between the first average reflectivity and the second average reflectivity is calculated to obtain the average reflectivity difference, and the detection area corresponding to the average reflectivity difference greater than a first preset threshold is identified as the suspected white omission area.
[0056] In the embodiments of the present application, the above-mentioned standard color block can be selected as a gray standard color block composed of a series of neutral gray blocks from black to white, and the reflectivity is known and uniform. For example, the gray blocks with reflectivity of 10%, 20%, 30%, 50%, 70% and 90% can be selected, and other standard color blocks meeting the calibration requirements can also be selected, which are not specially limited in the embodiments of the present application.
[0057] Since the reflectivity is linearly and positively correlated with the pixel gray value, after the above-mentioned standard color block is determined, the conversion relationship (i.e. the above-mentioned target mapping relationship) between the gray value and the reflectivity can be calibrated based on the standard color block as follows:
[0058]
[0059] wherein, is the gray value of any pixel point, is the reflectivity converted from the gray value of the pixel point, and k and b are coefficients calibrated based on the corresponding relationship between the gray value and the reflectivity of the standard color block.
[0060] After the above-mentioned target mapping relationship is determined, the gray value of each pixel point in the detection area can be substituted into the above-mentioned formula to calculate the corresponding reflectivity. Taking the i-th detection area in the corrugated paper image to be measured as an example, the gray value of each pixel point in the i-th detection area is substituted into the above-mentioned formula to obtain the reflectivity corresponding to each pixel point, and an average value is obtained to obtain the above-mentioned first average reflectivity as follows:
[0061]
[0062] wherein, is the first average reflectivity of each pixel point in the i-th detection area; N is the number of pixel points in the i-th detection area; is the sum of the reflectivity of each pixel point in the i-th detection area.
[0063] Similarly, the average reflectivity of the i-th template region corresponding to the i-th detection region in the template image (i.e., the second average reflectivity) can be calculated as follows:
[0064]
[0065] wherein, is the second average reflectivity of each pixel point in the i-th template region; N is the number of pixel points in the i-th template region; is the sum of the reflectivity of each pixel point in the i-th template region.
[0066] Suppose the value of the first preset threshold is 5%, then the difference between the average reflectivity of the i-th template region and the i-th detection region can be calculated by the following formula:
[0067]
[0068] wherein, is the difference between the average reflectivity of the i-th template region and the i-th detection region; is the first average reflectivity of each pixel point in the i-th detection region; is the second average reflectivity of each pixel point in the i-th template region; if the difference between the average reflectivity of the i-th template region and the i-th detection region is greater than 5%, the i-th detection region is identified as a suspected white omission region.
[0069] In step S130, the pixel points of the suspected white omission region contour edge are extracted, and the edge connection fracture degree is determined based on the color difference value of each edge pixel point and the standard color on both sides of the contour edge.
[0070] In the corrugated box printing process, some patterns may need to be presented in rich colors by superimposing multiple printing plates. If the precision of the previous process is insufficient, it will cause the edges of the adjacent color printing areas to be misaligned, forming a white gap visible to the naked eye, i.e., an edge connection type white omission defect. The above edge connection fracture degree is used to describe the proportion of edge pixels when the edge of the adjacent color region in the printing pattern of the edge connection type white omission defect is formed by abnormal connection (such as misalignment, fracture), which can quantify the degree of damage to the edge integrity of the edge connection type white omission defect.
[0071] For example, the above-mentioned extraction of pixels on the contour edge of the suspected white area and determination of edge connection discontinuity based on the color difference between the color of each edge pixel and the standard colors on both sides of the contour edge can be achieved as follows: extract all edge pixels on the contour edge of the suspected white area based on an edge detection algorithm; determine the first standard color and the second standard color on different sides of the contour edge based on a template image; for each edge pixel, calculate the first color difference between the color of the edge pixel and the first standard color, and the second color difference between the color of the edge pixel and the second standard color; if both the first color difference and the second color difference are greater than a second preset threshold, the corresponding edge pixel is recorded as a broken pixel; determine the edge connection discontinuity based on the number of broken pixels and the total number of edge pixels.
[0072] Specifically, the above process can be implemented as follows: Based on the edge detection algorithm, extract all edge pixels on the contour edge of the suspected white area, and construct a contour edge pixel set. E ={ e 1, e 2, ..., e n}, where n is the number of pixels on the upper edge of the suspected white area's outline; the colors that should be printed on both sides of the suspected white area's outline edge under normal printing conditions are obtained from the template image, and the normally printed color on one side is recorded as the first standard color. C left The color printed normally on the other side is designated as the second standard color. C right For the i-th pixel in the set of pixels at the contour edge, calculate the actual color of the i-th pixel. C i With the first standard color C left First color difference value Δ L and the actual color of the i-th pixel. C i With the second standard color C right The second color difference value Δ R If Δ R > T And Δ L > T If the i-th pixel is determined to be a broken pixel, then... T The second preset threshold can be determined according to the needs of the actual scenario, and its value range is usually 50~100; similarly, all broken pixels on the outline edge of the suspected white area can be identified, and the edge connection breakage can be specifically calculated based on the following formula:
[0073]
[0074] in, an edge connection brokenness of a contour edge of the suspected white-missing region; a number of broken pixel points on the contour edge of the suspected white-missing region; a number of edge pixel points on the contour edge of the suspected white-missing region.
[0075] In step S140, a shape irregularity index and a distribution density index of a target closed region are determined based on the fractal dimension of the suspected white-missing region and the inter-region distance, and a closed region filling defect rate is determined based on the shape irregularity index and the distribution density index, the target closed region being any closed figure that needs to be printed on the image surface of the corrugated paper to be tested.
[0076] In the embodiments of the present application, the target closed region described above is any closed figure that needs to be printed on the image surface of the corrugated paper to be tested. Exemplarily, the target closed region can be any text, color block, icon, or the like.
[0077] In the printing process, insufficient equipment precision can cause the target closed region described above to have a white-missing part (for example, a small hole or a broken region) that is not covered by ink. The shape irregularity index described above is used to quantify the morphological complexity of the white-missing part in the target closed region. The morphological complexity can intuitively reflect the visual saliency and repair difficulty of the filling defect of the target closed region. The higher the morphological complexity, the more significant the damage of the white-missing part to the integrity of the target closed region. The distribution density index described above is used to quantify the spatial coverage range of the white-missing part in the target closed region. The greater the distribution density index, the higher the probability and frequency of the abnormality of the target closed region in the printing process.
[0078] Exemplarily, the shape irregularity index described above can be determined based on the fractal dimension. The greater the value of the fractal dimension, the more irregular the shape of the white-missing part in the target closed region, and the more significant the damage to the integrity of the closed region.
[0079] Specifically, after each suspected white-missing region in the corrugated paper image to be tested is identified through the steps described above, for any target closed region, the shape irregularity index can be determined based on the fractal dimension of each suspected white-missing region in the target closed region. The fractal dimension of each suspected white-missing region can be calculated by a box dimension method, which has the same technical principle as related technologies, and thus will not be described herein again.
[0080] After determining the fractal dimension of each suspected white space region in the target closed region, further, the embodiment of the present application can determine the shape irregularity index by the following method: obtaining the region perimeter of each suspected white space region, and determining the reference length of each suspected white space region based on the region perimeter, for example, 1% of the average side length of the suspected white space region in the target closed region can be taken as the reference length; determining the shape irregularity index based on the region perimeter, the reference length and the fractal dimension of each suspected white space region; specifically, the shape irregularity index of the target closed region can be calculated by the following formula:
[0081]
[0082] wherein, is the shape irregularity index of the target closed region; is the fractal dimension of the ith suspected white space region in the target closed region; is the region perimeter of the ith suspected white space region in the target closed region; is the number of suspected white space regions in the target closed region; is the reference length determined based on the average side length of the suspected white space region in the target closed region, wherein the average side length of the suspected white space region in the target closed region is ; By converting the ratio of the region perimeter of each suspected white space region to the reference length into logarithmic form, the proportional relationship of the region perimeter of each suspected white space region to the reference length is quantified, so as to unify the calculation scale of suspected white space regions of different sizes.
[0083] For example, the embodiment of the present application can analyze the density of the distribution of suspected white space regions in the target closed region based on spatial autocorrelation, which is realized as follows: calculating the Euclidean distance between the centroids of any two suspected white space regions in the target closed region, denoted as the inter-regional distance between any two suspected white space regions; determining the distribution density index based on the inter-regional distance and the number of suspected white space regions; specifically, the distribution density index of the target closed region can be calculated by the following formula:
[0084]
[0085] wherein, is the distribution density index of the target closed region; d ij is the Euclidean distance between the centroid of the ith suspected white space region and the centroid of the jth suspected white space region in the target closed region (i.e. the inter-regional distance between the ith suspected white space region and the jth suspected white space region); is the number of suspected white space regions in the target closed region; m=max(n-1,1), to avoid the denominator being 0 when there is only one suspected white space region in the target closed region; the distribution density index The greater the value, the more densely distributed the suspected white defect regions in the target closed region, and the higher the probability and frequency of abnormalities in the printing process, especially in the closed region filling process; otherwise, the suspected white defect regions are more dispersed in the target closed region, and the abnormal probability is relatively low.
[0086] In the embodiments of the present application, the closed region filling defect rate described above is a comprehensive index for quantifying the severity of white defect in the target closed region, and by combining the morphological complexity and spatial distribution density of the suspected white defect region in the target closed region, the damage degree of the suspected white defect region to the integrity of the target closed region and the probability of abnormalities in the ink filling process are evaluated.
[0087] Exemplarily, the closed region filling defect rate can be determined based on the shape irregularity index and the distribution density index, and the implementation is as follows: obtaining a morphological sensitivity coefficient of the target closed region preset; setting a printing speed interval of the printing machine, and determining a spatial sensitivity coefficient of the target closed region based on the printing speed interval; determining a first filling defect factor based on the morphological sensitivity coefficient and the shape irregularity index, and determining a second filling defect factor based on the spatial sensitivity coefficient and the distribution density index; determining the closed region filling defect rate based on the first filling defect factor and the second filling defect factor.
[0088] The morphological sensitivity coefficient is used to adjust the weight of the shape irregularity index in the calculation of the closed region filling defect rate, and can be set based on the complexity of the target closed region. When the target closed region is a complex pattern (such as fine text, multi-detail icon), because the morphological irregularity of the white part of the complex pattern is usually large, the damage of the white part to the integrity of the pattern is more significant, and it is more easily visually perceived and more difficult to repair, so the weight of the shape irregularity index needs to be increased; when the target closed region is a simple color block, because the white shape of the simple color block has little effect on the integrity of the whole region, the role of morphological complexity does not need to be emphasized too much, so the weight of the shape irregularity index is reduced. Specifically, in one implementation manner of the embodiments of the present application, when the target closed region is a complex pattern, the morphological sensitivity coefficient takes α = 0.3, and when the target closed region is a simple color block, the morphological sensitivity coefficient takes α = 0.1; wherein, the complex pattern refers to a region containing multiple element combinations, fine texture, text or multi-color superposition, which is irregular in shape and rich in details, and may involve complex structures such as pattern repetition and edge connection; the simple color block refers to a continuous and regular region filled with a single color, without complex texture or details, and the shape is mostly geometric pattern (such as rectangle, circle, solid color background block, etc.).
[0089] The space-sensitive coefficient is used to adjust the weight of the distribution density index in the calculation of the closed area filling defect rate, and can be determined based on the printing speed interval setting of the printing machine. The higher the printing speed, the more likely it is that ink drying, mechanical stability and other factors will fluctuate, and the distribution density of suspected white area can better reflect the abnormal probability of the ink filling process (the denser the distribution, the higher the abnormal frequency), so the weight of the distribution density index needs to be increased; when printing at low speed, the influence of the spatial distribution of suspected white area is relatively weak, so the weight of the distribution density index needs to be reduced. The printing speed interval [v v min , v max ] is usually set based on the complexity of the printed pattern, and the specific value is determined by the actual production of the factory. Specifically, the space-sensitive coefficient can be determined by the following formula:
[0090]
[0091] wherein, is the space-sensitive coefficient when the printing speed is v ; v min is the lower limit threshold of the printing speed, is the upper limit threshold of the printing speed; is the exponential growth coefficient, which is used to make the space-sensitive coefficient increase exponentially with the increase of the printing speed when v , so as to reflect the nonlinear influence of the speed in the medium speed interval on the space-sensitive coefficient, and the value can be determined by the actual printing process parameters and historical defect data; is the space-sensitive coefficient when v , and the value can be determined based on the actual scene. For example, the value of v may be in the range of 0.1-0.2; is the space-sensitive coefficient when v , and the value can be determined based on the actual scene. For example, the value of v may be in the range of 0.4-0.6; when v , the printing machine and ink are in a good cooperative state, and the occurrence rate of white defects of spatial distribution type is low; when v , the printing problem caused by the printing machine and ink has reached the limit, and even if the speed continues to increase, the occurrence rate of white defects of spatial distribution type will not be significantly improved.
[0092] In the embodiments of the present application, after the shape-sensitive coefficient and the space-sensitive coefficient are determined through the above process, the closed area filling defect rate can be calculated by the following formula:
[0093]
[0094] wherein, a filling defect rate of a target closed region; a morphology sensitivity coefficient, a shape irregularity index; the first filling defect factor, for quantifying an influence of a morphological complexity of a suspected white-missing region in the target closed region on the filling defect rate of the closed region; a spatial sensitivity coefficient, a distribution density index; the second filling defect factor, for quantifying an influence of a spatial distribution of a suspected white-missing region in the target closed region on the filling defect rate of the closed region.
[0095] In step S150, a second repetitive pattern unit in the to-be-tested corrugated paper image is identified based on the first repetitive pattern unit in the template image, a white-missing unit is determined based on an average color difference of the first repetitive pattern unit and the second repetitive pattern unit, and a pattern repetition missing rate is determined based on a white-missing density and a white-missing dispersion degree of the white-missing unit.
[0096] In the embodiments of the present application, the first repetitive pattern unit and the second repetitive pattern unit are regular repetitive patterns in a printing process of the to-be-tested corrugated paper image. The white-missing in the regular repetitive pattern printing process usually manifests as missing of a color of a single or multiple repetitive units. The white-missing unit refers to a unit in which white-missing occurs in the regular repetitive pattern printing process. The white-missing density is used to quantify a severity of missing of a color of the regular repetitive pattern in the printing process. The higher the white-missing density, the higher the frequency of occurrence of the white-missing unit, and the more significant the damage to the integrity of the overall pattern. The white-missing dispersion degree is used to measure a dispersion degree of a shape and size of the white-missing unit. The greater the white-missing dispersion degree, the greater the difference in the shape of the white-missing unit, and the lower the possibility of regular white-missing.
[0097] Exemplarily, the identification of the second repetitive pattern unit in the to-be-tested corrugated paper image based on the first repetitive pattern unit in the template image can be implemented as follows: the first repetitive pattern unit in the template image is acquired; the first repetitive pattern unit is slid in the to-be-tested corrugated paper image based on a square difference matching algorithm, and a similarity of each pattern unit in the to-be-tested corrugated paper image to the first repetitive pattern unit in the sliding process is determined; and a pattern unit with a similarity greater than a third preset threshold value is identified as the second repetitive pattern unit.
[0098] Specifically, taking the third preset threshold value 0.8 as an example, the implementation of identifying the second repetitive pattern unit can be as follows: based on the first repetitive pattern unit in the template image, using the square difference matching algorithm to slide the first repetitive pattern unit in the to-be-tested corrugated paper image, and calculating the similarity score of each position in the sliding process; extracting the coordinates of all regions with a similarity score greater than 0.8 to determine the position and period of the second repetitive unit; wherein the implementation principle of calculating the similarity score by the square difference matching algorithm is the same as that of the related art, and will not be described here.
[0099] Specifically, taking the third preset threshold value 0.8 as an example, the implementation of identifying the second repetitive pattern unit can be as follows: based on the first repetitive pattern unit in the template image, using the square difference matching algorithm to slide the first repetitive pattern unit in the to-be-tested corrugated paper image, and calculating the similarity score of each position in the sliding process; extracting the coordinates of all regions with a similarity score greater than 0.8 to determine the position and period of the second repetitive unit; wherein the implementation principle of calculating the similarity score by the square difference matching algorithm is the same as that of the related art, and will not be described here.
[0100] In the embodiments of the present application, the pattern repetition loss rate is an index for quantifying the severity of pattern loss caused by white omission of regular repetitive patterns in corrugated packaging box printing.
[0101] Specifically, taking the third preset threshold value 0.8 as an example, the implementation of identifying the second repetitive pattern unit can be as follows: based on the first repetitive pattern unit in the template image, using the square difference matching algorithm to slide the first repetitive pattern unit in the to-be-tested corrugated paper image, and calculating the similarity score of each position in the sliding process; extracting the coordinates of all regions with a similarity score greater than 0.8 to determine the position and period of the second repetitive unit; wherein the implementation principle of calculating the similarity score by the square difference matching algorithm is the same as that of the related art, and will not be described here.
[0102] Specifically, the calculation formula of the white omission density is as follows:
[0103]
[0104] wherein, is the white omission density of the white omission unit in the to-be-tested corrugated paper image; The number of units identified as missing white spaces in the regularly repeating pattern units of the corrugated paper image to be tested (i.e., the second repeating pattern unit mentioned above); The total number of the second repeating pattern units in the corrugated paper image to be tested.
[0105] The formula for calculating the above-mentioned white space dispersion is as follows:
[0106]
[0107] in, The white space dispersion of the white space unit in the corrugated paper image to be tested; The number of missing white units in the corrugated paper image to be tested; Let be the area of the i-th missing cell; for The average area of each missing white unit; The first discrete factor mentioned above is used to reflect the degree of difference between the area of the i-th missing white unit and the average area of all missing white units. Let be the perimeter of the i-th missing cell; for The average perimeter of each missing white unit; The second dispersion factor mentioned above is used to reflect the degree of difference between the perimeter of the i-th leakage unit and the average perimeter of the overall leakage units. If the leakage dispersion value is high, it reflects that the area and perimeter of the leakage units are different. Conversely, it reflects that the leakage units are similar in shape and that there is a high probability of leakage at fixed positions or in a regular manner.
[0108] The formula for calculating the repetition rate of the above patterns is as follows:
[0109]
[0110] in, The pattern repetition and missing rate; The density of the white gap; The white space dispersion; The preset weighting coefficients are determined based on the actual scenario. If the actual scenario is a high-precision scenario (i.e., the requirement for pattern fineness is high), more attention should be paid to the impact of the discreteness of the white gap pattern on the pattern fineness, and the weighting coefficients should be increased accordingly. The weight is reduced. The weight, for example, at this time A value of 0.4 is acceptable. However, if the actual scenario involves high-volume printing (i.e., high requirements for printing speed and quantity), the impact of missing white areas on mass production efficiency should be prioritized, and the value should be reduced accordingly. Weighting, increasing The weight, for example, at this time 0.6 is acceptable.
[0111] In step S160, the flaw type is determined based on the edge connection fracture degree, the closed area filling defect rate, and the pattern repetition missing rate, and the corresponding production process is associated.
[0112] In the embodiments of the present application, the edge connection fracture degree, the closed area filling defect rate, and the pattern repetition missing rate calculated above are comprehensively set, and the area meeting (F≥0.2)∧(E≥0.01)∧(Q≥0.05) is set as the real white missing area. It should be noted that the corresponding threshold values of the edge connection fracture degree, the closed area filling defect rate, and the pattern repetition missing rate can be set according to actual needs, and the embodiments of the present application do not make special limitations.
[0113] According to the edge connection fracture degree, the closed area filling defect rate, and the pattern repetition missing rate calculated by the above process, after eliminating the dimensional differences of the above three indexes through normalization processing, the flaw type to which the real white missing area determined above belongs and the production process in which it appears can be determined according to the following logical framework:
[0114] When the value of the edge connection fracture degree is the highest, the white missing feature is that the area boundary presents obvious fracture, the edge pixel connection is abnormal, the contour integrity is damaged, and it is mostly edge tearing type white missing and misregistration type white missing, which may occur in the case of uneven mechanical stress or color plate, process positioning deviation.
[0115] When the value of the closed area filling defect rate is the highest, the white missing is concentrated in the closed area, and presents a spot, a hole or a large area of unfilled state, which is mostly filling cavity type white missing and shrinkage crack type white missing, which may occur in the case of abnormal material supply or material solidification shrinkage.
[0116] When the value of the pattern repetition missing rate is the highest, the white missing presents regular distribution, which is highly related to the position of the pattern repetition unit, destroys the overall repetition and consistency, and is mostly periodic missing type white missing and array out-of-order type white missing, which may occur in the case of repetition process positioning error or row and column alignment out of control.
[0117] When the values of the edge connection fracture degree and the closed area filling defect rate are the same, it is usually that the edge positioning deviation and the ink filling deficiency caused by equipment aging, which may be caused by the old printing machine existing misregistration and nozzle blockage at the same time.
[0118] When the values of the closed area filling defect rate and the pattern repetition missing rate are the same, it is usually that the white missing caused by periodic failure of the filling system and positioning error of the repetition unit in high-speed printing (such as missing filling once every 10 units, and the missing filling area has consistent morphology).
[0119] When the values of edge adhesion fracture degree, pattern repeat missing rate and closed area filling defect rate are high, there are edge fracture and repeat unit missing at the same time, which may be caused by the superposition of transmission system and mechanical stress, such as drum positioning deviation and uneven paper stretching.
[0120] When the values of edge adhesion fracture degree, closed area filling defect rate and pattern repeat missing rate are high, there may be systematic process out of control, such as poor material quality, uncalibrated equipment and environmental fluctuations, resulting in white spots in edge, filling and repeat unit at the same time.
[0121] The above mainly introduces the scheme provided by the embodiments of the application from the perspective of method. In order to realize the above functions, it contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in the present text, the application can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
[0122] Correspondingly, the embodiments of the application also provide a surface printing defect detection system of a corrugated packaging box. As shown in Figure 2 The surface printing defect detection system 200 of the corrugated packaging box can include an image acquisition subsystem 210 and a defect detection subsystem 220, wherein:
[0123] The image acquisition subsystem is used for shooting the image of the to-be-tested corrugated paper after printing by a high-frame camera and a fixed light source above the printing machine. Exemplarily, the image acquisition subsystem includes an industrial camera with high resolution and high frame rate vertically erected above the printing machine. The implementation of collecting the image of the to-be-tested corrugated paper can be as shown in Figure 3 .
[0124] The flaw detection subsystem is used to acquire and align the corrugated paper image to be detected and a template image, and divide the corrugated paper image to be detected and the template image into a plurality of corresponding detection regions and template regions; wherein the template image is an image of a non-missing printing template; based on the average reflectivity difference of the detection region and the corresponding template region, a suspected missing region in the detection region is identified; the pixel points of the contour edge of the suspected missing region are extracted, and the edge connection fracture degree is determined based on the color difference value of each edge pixel point and the standard color on both sides of the contour edge; the shape irregularity index and the distribution density index of the target closed region are determined based on the fractal dimension and the inter-region distance of the suspected missing region, and the closed region filling defect rate is determined based on the shape irregularity index and the distribution density index, and the target closed region is any closed figure that needs to be printed on the surface of the corrugated paper image to be detected; a second repeating pattern unit in the corrugated paper image to be detected is identified based on a first repeating pattern unit in the template image, a missing unit is determined based on the average color difference of the first repeating pattern unit and the second repeating pattern unit, and the pattern repetition loss rate is determined based on the missing density and the missing dispersion of the missing unit; the flaw type is determined based on the edge connection fracture degree, the closed region filling defect rate and the pattern repetition loss rate, and the corresponding production process is associated.
[0125] The specific implementation details of the surface printing flaw detection system of the corrugated packaging box have been described in detail in the corresponding position of the surface printing flaw detection method of the corrugated packaging box, and therefore will not be described here.
[0126] In addition, the embodiment of the present application also provides a surface printing flaw detection device of a corrugated packaging box, as shown in Figure 4 The surface printing flaw detection device 400 of the corrugated packaging box can include an image acquisition module 410, an image processing module 420 and a flaw detection module 430, wherein:
[0127] The image acquisition module is used to acquire and align the corrugated paper image to be detected and a template image, and divide the corrugated paper image to be detected and the template image into a plurality of corresponding detection regions and template regions; wherein the template image is an image of a non-missing printing template;
[0128] The image processing module is used to identify a suspected missing region in the detection region based on the average reflectivity difference of the detection region and the corresponding template region;
[0129] The image processing module is also used to extract the pixel points of the contour edge of the suspected missing region, and determine the edge connection fracture degree based on the color difference value of each edge pixel point and the standard color on both sides of the contour edge;
[0130] The image processing module is further configured to determine a shape irregularity index and a distribution density index of the target closed region based on the fractal dimension of the suspected white-missing region and the distance between regions, and determine a closed region filling defect rate based on the shape irregularity index and the distribution density index; the target closed region is any closed figure that needs to be printed on the surface of the corrugated paper image to be tested;
[0131] The image processing module is further configured to identify a second repeating pattern unit in the corrugated paper image to be tested based on a first repeating pattern unit in the template image, determine a white-missing unit based on the average color difference of the first repeating pattern unit and the second repeating pattern unit, and determine a pattern repetition loss rate based on the white-missing density and the white-missing dispersion of the white-missing unit.
[0132] The flaw detection module is configured to determine a flaw type based on the edge connection breakage, the closed region filling defect rate, and the pattern repetition loss rate, and associate the corresponding production process.
[0133] The specific implementation details of the surface printing flaw detection device of the corrugated packaging box have been described in detail in the corresponding positions of the surface printing flaw detection method of the corrugated packaging box, and therefore will not be described here.
[0134] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.
[0135] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A method of detecting surface printing defects of a corrugated packaging box, characterized by, The method comprises: acquiring and aligning a to-be-tested corrugated paper image and a template image, and dividing the to-be-tested corrugated paper image and the template image into a plurality of corresponding detection regions and template regions; based on the average reflectivity difference of the detection region and its corresponding template region, identifying a suspected white omission region in the detection region; extracting the pixel points of the suspected white omission region contour edge, and determining the edge connection fracture degree based on the color difference value of each edge pixel point and the standard color on both sides of the contour edge; based on the shape profile and distribution of the suspected white omission region, determining the closed region filling defect rate; based on the difference between the repeating patterns in the template image and the to-be-tested corrugated paper image, determining a white omission unit, and based on the distribution of the white omission unit, determining a pattern repetition loss rate; based on the edge connection fracture degree, the closed region filling defect rate, and the pattern repetition loss rate, determining the defect type and associating the corresponding production process; the shape irregularity index and the distribution density index determine the closed region filling defect rate, comprising: acquiring a pre-set shape sensitivity coefficient of a target closed region; setting a printing speed interval of a printing machine, and determining a space sensitivity coefficient of the target closed region based on the printing speed interval; based on the shape sensitivity coefficient and the shape irregularity index, determining a first filling defect factor, and based on the space sensitivity coefficient and the distribution density index, determining a second filling defect factor; based on the first filling defect factor and the second filling defect factor, determining the closed region filling defect rate; the distribution of the white omission unit determines the pattern repetition loss rate, comprising: based on the number of white omission units and the total number of pattern units in the to-be-tested corrugated paper image, determining the white omission density; determining the unit perimeter and unit area of each white omission unit, and calculating the perimeter mean of each unit perimeter and the area mean of each unit area; based on each unit perimeter and the perimeter mean, determining a first dispersion factor, and based on each unit area and the area mean, determining a second dispersion factor; based on the first dispersion factor and the second dispersion factor, determining the white omission dispersion degree; based on a pre-set weight coefficient and the white omission density, determining a first repetition loss factor, and based on the pre-set weight coefficient and the white omission dispersion degree, determining a second repetition loss factor; based on the first repetition loss factor and the second repetition loss factor, determining the pattern repetition loss rate.
2. The method of claim 1, wherein the surface printing defect of the corrugated packaging box is detected by using a camera. based on the average reflectivity difference of the detection region and its corresponding template region, identifying the suspected white omission region in the detection region, comprising: acquiring a standard color block, which is a color sample with known and fixed reflectivity; determining the gray value of the standard color block, and based on the gray value of the standard color block and the reflectivity, determining a target mapping relationship; based on the target mapping relationship, determining the reflectivity corresponding to the gray value of each pixel point in the detection region and averaging, denoted as the first average reflectivity; based on the target mapping relationship, determining the reflectivity corresponding to the gray value of each pixel point in the template region and averaging, denoted as the second average reflectivity; A difference between the first average reflectivity and the second average reflectivity is calculated to obtain the average reflectivity difference, and the detection area corresponding to the average reflectivity difference greater than a first preset threshold is identified as the suspected white omission area.
3. The method of claim 1, wherein the surface printing defect of the corrugated packaging box is detected by using a camera. The extraction of the edge pixel points of the suspected white omission area profile edge based on the color difference value of each edge pixel point and the standard color on both sides of the profile edge determines the edge connection fracture degree, including: Based on the edge detection algorithm, all edge pixel points on the profile edge of the suspected white omission area are extracted; Based on the template image, a first standard color and a second standard color located on different sides of the profile edge are determined; For each edge pixel point, a first color difference value between the color of the edge pixel point and the first standard color, and a second color difference value between the color of the edge pixel point and the second standard color are calculated; If the first color difference value and the second color difference value are both greater than a second preset threshold, the corresponding edge pixel point is recorded as a fracture pixel point; Based on the number of fracture pixel points and the total number of edge pixel points, the edge connection fracture degree is determined.
4. The method of claim 1, wherein the surface printing defect of the corrugated packaging box is detected. The determination of the shape irregularity index and the distribution density index of the target closed area based on the fractal dimension and the inter-region distance of the suspected white omission area, including: The fractal dimension of each suspected white omission area in the target closed area is calculated based on the box dimension method; The region perimeter of each suspected white omission area is obtained, and a reference length is determined based on the region perimeter of each suspected white omission area; The shape irregularity index is determined based on the region perimeter, the reference length, and the fractal dimension of each suspected white omission area; The Euclidean distance between the centroids of any two suspected white omission areas in the target closed area is calculated, which is recorded as the inter-region distance between the two suspected white omission areas; Based on each inter-region distance and the number of suspected white omission areas, the distribution density index is determined.
5. The method of claim 1, wherein the surface printing defect of the corrugated packaging box is detected by using a camera. The determination of the white omission unit based on the difference between the repeated patterns in the template image and the corrugated paper image to be tested, including: A first repeated pattern unit in the template image is obtained; the first repeated pattern unit is a regular repeated pattern in the printing process of the corrugated paper image to be tested; Based on the square difference matching algorithm, the first repeated pattern unit is slid in the corrugated paper image to be tested to determine the similarity of each pattern unit in the corrugated paper image to be tested to the first repeated pattern unit during the sliding process; The pattern unit with a similarity greater than a third preset threshold is identified as a second repeated pattern unit; The average color difference between the first repeated pattern unit and the second repeated pattern unit is determined to determine the white omission unit.
6. The method of surface printing defect detection of a corrugated packaging box according to claim 5, wherein, The determination of the white omission unit based on the average color difference between the first repeated pattern unit and the second repeated pattern unit, including: The average color difference between the first repeated pattern unit and the second repeated pattern unit is calculated, and the second repeated pattern unit corresponding to the average color difference greater than a fourth preset threshold is determined as the white omission unit.
7. A system for detecting surface printing defects of a corrugated packaging box, characterized by, The system includes: An image acquisition subsystem is configured to capture an image of a printed corrugated box by a high-frame camera and a fixed light source above a printing machine; A defect detection subsystem is configured to acquire and align a template image and a test image of a corrugated paper, divide the test image and the template image into a plurality of corresponding detection regions and template regions, identify a suspected white-out region in the detection region based on an average reflectivity difference between the detection region and the corresponding template region, extract a pixel point of a contour edge of the suspected white-out region, determine an edge connection breakage degree based on a color difference value between the pixel point of the contour edge and standard colors on both sides of the contour edge, determine a closed region filling defect rate based on a shape contour and a distribution of the suspected white-out region, determine a white-out unit based on a difference between a repeated pattern in the template image and the test image, and determine a pattern repetition missing rate based on a distribution of the white-out unit, determine a defect type and associate a corresponding production process based on the edge connection breakage degree, the closed region filling defect rate, and the pattern repetition missing rate; The shape irregularity index and the distribution density index are used to determine the closed region filling defect rate, including: obtaining a shape sensitivity coefficient of a target closed region preset; setting a printing speed interval of a printing machine, and determining a space sensitivity coefficient of the target closed region based on the printing speed interval; determining a first filling defect factor based on the shape sensitivity coefficient and the shape irregularity index, and determining a second filling defect factor based on the space sensitivity coefficient and the distribution density index; determining the closed region filling defect rate based on the first filling defect factor and the second filling defect factor; The distribution of the white-out unit is used to determine the pattern repetition missing rate, including: determining a white-out density based on a number of the white-out units and a total number of pattern units in the test image of the corrugated paper; determining a unit perimeter and a unit area of each white-out unit, and calculating a perimeter average of each unit perimeter and an area average of each unit area; determining a first dispersion factor based on each unit perimeter and the perimeter average, and determining a second dispersion factor based on each unit area and the area average; determining a white-out dispersion degree based on the first dispersion factor and the second dispersion factor; determining a first repetition missing factor based on a preset weight coefficient and the white-out density, and determining a second repetition missing factor based on the preset weight coefficient and the white-out dispersion degree; determining the pattern repetition missing rate based on the first repetition missing factor and the second repetition missing factor.
8. A surface printing defect detection apparatus for a corrugated packaging box, characterized by, The device includes: An image acquisition module is configured to acquire and align a template image and a test image of a corrugated paper, and divide the test image and the template image into a plurality of corresponding detection regions and template regions; An image processing module is configured to identify a suspected white-out region in the detection region based on an average reflectivity difference between the detection region and the corresponding template region. The image processing module is further configured to extract pixel points of the contour edges of the suspected white omission area, and determine edge connection fracture degree based on color difference values of each edge pixel point and standard colors on both sides of the contour edges; The image processing module is further configured to determine closed area filling defect rate based on shape contours and distribution conditions of the suspected white omission area; The image processing module is further configured to determine white omission units based on differences between repeated patterns in the template image and the corrugated paper image to be tested, and determine pattern repetition loss rate based on distribution conditions of the white omission units; The flaw detection module is configured to determine flaw types and associate corresponding production processes based on the edge connection fracture degree, the closed area filling defect rate, and the pattern repetition loss rate; The shape irregularity index and the distribution density index are used to determine the closed area filling defect rate, including: obtaining a shape sensitivity coefficient of a target closed area preset in advance; setting a printing speed interval of a printing machine, and determining a space sensitivity coefficient of the target closed area based on the printing speed interval; determining a first filling defect factor based on the shape sensitivity coefficient and the shape irregularity index, and determining a second filling defect factor based on the space sensitivity coefficient and the distribution density index; determining the closed area filling defect rate based on the first filling defect factor and the second filling defect factor; The distribution conditions of the white omission units are used to determine the pattern repetition loss rate, including: determining white omission density based on a number of the white omission units and a total number of pattern units in the corrugated paper image to be tested; determining unit perimeters and unit areas of each of the white omission units, and calculating perimeter average values of each of the unit perimeters and area average values of each of the unit areas; determining a first dispersion factor based on each of the unit perimeters and the perimeter average values, and determining a second dispersion factor based on each of the unit areas and the area average values; determining white omission dispersion degree based on the first dispersion factor and the second dispersion factor; determining a first repetition loss factor based on a preset weight coefficient and the white omission density, and determining a second repetition loss factor based on the preset weight coefficient and the white omission dispersion degree; determining the pattern repetition loss rate based on the first repetition loss factor and the second repetition loss factor.
Citation Information
Patent Citations
Printing pattern defect detection method and system for plastic package
CN118411367A
Carton printing quality detection method and system based on industrial vision
CN120318187A