Stay wire wide coiled material printing quality detection method and system based on machine vision
Through machine vision technology, outlier and anomaly analysis and fitting straight lines to determine position offset, the problem of character recognition error in laser printing line-pull-width coils is solved, and detection accuracy and reliability are improved.
Patent Information
- Application Number
- CN202510585409.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-05-08
AI Technical Summary
It is difficult for the prior art to accurately determine whether the colors and contours of characters in a wide-format rolled line based on laser printing meet the standards, especially when the light changes and the character size is too small.
Through machine vision technology, a wide-format coil image is obtained, the characters are selected from the mark box, the outlier and abnormality of the characters are calculated, the straight line is fitted to judge the position offset of the characters, and the character size changes are judged based on the difference in the number of pixels.
Improve the accuracy of character size and morphology changes of the pull-line wide coil material, reduce recognition errors, and enhance the accuracy and reliability of automatic detection.
Smart Images

Figure CN120107253A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and more specifically, to a method and system for detecting the printing quality of a wide-format coiled material based on machine vision. Background Art
[0002] In the production process of anti-counterfeiting pull wires, wide-width coils (i.e., wide-width pull wire coils) are usually produced first. The wide-width coils include multiple identical pull wires. After the wide-width coils are cut, multiple identical pull wires can be obtained.
[0003] Since the patterns engraved by laser are usually very subtle and complex, and considering that during the production process of wide coils used to make the wire, environmental factors (such as high temperature, etc.) may cause the tension of the coil to be unstable, resulting in deformation of the coil during or after printing, causing changes in the coating. At this time, the anti-counterfeiting effect of the wire obtained by cutting the wide coil may be lost due to changes in the detailed characteristics of the characters (such as the size and shape of the characters, etc.).
[0004] The prior art usually evaluates the printing effect of wide-format web printing when it is completed, in order to prevent the detailed features of the characters from changing and causing poor anti-counterfeiting effects. For example, an anti-counterfeiting pull-wire detector can be used to determine whether the pull-wire has an anti-counterfeiting effect. With the development of deep learning algorithms, in order to reduce labor costs, the prior art uses deep learning models to identify whether the printed characters meet the standards in the template, and then determines whether there are errors in each character. For example, a Chinese patent application document with publication number CN118710599A discloses a method and device for detecting character defects in printed products. The patent application matches the obtained image information with a pre-created template, and performs defect detection on the characters in the image information based on the OCR detection algorithm, thereby identifying character defects in the printed product.
[0005] However, on the one hand, due to the dynamic color change effect of the laser process, the optical characteristics of the anti-counterfeiting pull line are that its color is different under different lighting environments, and it cannot be identified by the pixel value of the pixel corresponding to each character in the image, that is, it is difficult to accurately determine whether the color of the character meets the standard. On the other hand, since the characters on the anti-counterfeiting pull line are small, the error in identifying them based on the edge shape of the characters is large, that is, it is difficult to accurately determine whether the outline of the characters meets the standard. Therefore, the existing methods for identifying the quality of printed characters are not suitable for wide-width pull line coils based on laser printing (laser engraving). Summary of the invention
[0006] In order to solve the above-mentioned technical problem that it is difficult to accurately judge whether the color of characters meets the standards based on the pixel value of the pixel of the image corresponding to each character or the edge shape of the character for the wide-width wire-drawn coil based on laser printing technology, the present invention provides solutions in the following aspects.
[0007] In a first aspect, a method for detecting the printing quality of a wide-format coiled material based on machine vision comprises: obtaining a wide-format coiled material image, and selecting each character through a marking frame, and obtaining the number of pixels belonging to the character in the marking frame, wherein the wide-format coiled material image comprises a plurality of characters obtained by laser printing; determining the horizontal / vertical coordinates of the center of the marking frame as the horizontal / vertical coordinates of the character, and dividing all characters into a plurality of coiled material clusters and a plurality of identical character clusters, wherein the absolute value of the difference between the vertical coordinates of any two characters in the coiled material cluster or the absolute value of the difference between the horizontal coordinates of any two characters in the identical character cluster are both less than a preset first threshold value, and the horizontal axis of the coordinate system is parallel to the straight line cutting the wide-format coiled material; calculating the outlier degree of each character, and the outlier degree is proportional to the character The absolute value of the difference between the number of pixels of a character and the mean number of pixels of all characters in the same character cluster to which it belongs, and the outlier degree is proportional to the absolute value of the difference between the number of pixels of the character and the number of pixels of characters in the same character cluster and adjacent to the character in the vertical axis direction; a first straight line is obtained by fitting the horizontal / vertical coordinates of each character in the pull-line cluster, and a first angle between the first straight line and the horizontal axis is calculated; a second straight line is obtained by fitting the horizontal / vertical coordinates of each character in the same character cluster, and a second angle between the second straight line and the vertical axis is calculated; the abnormality of each character is calculated and an alarm is issued when the abnormality of at least one character is less than a preset second threshold, wherein the abnormality of a character is proportional to its outlier degree, the first angle of the pull-line cluster to which it belongs, and the second angle of the same character cluster.
[0008] The beneficial effects of the present invention are as follows: the present invention determines whether the size of a character has changed based on the difference in the number of pixels between each character and other identical characters, and determines the degree of positional deviation of the character based on the degree of positional deviation of the character row (in the present invention, the pull line cluster) and character column (in the present invention, the same character cluster) to which the character belongs, and then determines whether the character is the same as the preset standard form, and issues an alarm when the probability of the character size and form changing is high, wherein the greater the degree of positional deviation of the character, the greater the possibility of changes in the character outline and form. Based on this, the present invention avoids recognition errors caused by problems such as changes in illumination and too small character size, and effectively improves the automatic detection accuracy and reliability of the pull line width used to make anti-counterfeiting pull lines.
[0009] Preferably, calculate i The first character cluster of the same character in the preset direction j Character Outliers The formula is: .
[0010] Among them i In clusters of identical characters, n is the number of characters, is the mean number of pixels of all characters, is the standard deviation of the number of pixels of all characters, A i,j For the j The number of pixels per character, A i,j-1 For the j -The number of pixels for 1 character, A i,j+1 For the j +1 character number of pixels, i , j is a positive integer, q is the preset parameter, and exp is the exponential function with the natural logarithm e as the base.
[0011] The present invention uses the difference between the number of pixels of a single character and the mean number of pixels of other identical characters (i.e. ) to determine the first difference between the character and all the same characters, the present invention also determines the first difference between the number of pixels of a single character and the number of pixels of the adjacent same characters (i.e. or ) determines the second difference between the character and the same character in the local area where it is located, and determines the degree of outlier of the character through the first difference and the second difference corresponding to the character, thereby improving the accuracy of whether the number of pixels of the character is abnormal.
[0012] Preferably, the calculation belongs to h The cable cluster and g The abnormality of characters in the same character cluster β h,g The formula is: , which belongs to h The cable cluster and g The character of the same character cluster is g The first character cluster of the same character in the preset direction h characters, α h,g For the h The cable cluster and g The outlier degree of characters in the same character cluster, θ 1,h For the h The first angle corresponding to the cable cluster, θ 2,g For the g The second angle corresponding to the same character cluster, 0< θ 1,h <90°,0< θ 2,g <90°, h , g is a positive integer, norm is the standard normalization function.
[0013] Preferably, the step of fitting the first straight line according to the horizontal / vertical coordinates of each character in the pull line cluster comprises: calculating a first slope of the first straight line and the first intercept , to obtain the line equation of the first line: , where: Calculate the first slope The formula is: .
[0014] For the cable cluster v The horizontal coordinate of the characters, For the cable cluster v The vertical coordinate of the character, m is the number of characters in the pull-line cluster, v is a positive integer; the first intercept The formula is: .
[0015] The present invention obtains the first straight line by fitting through the least square method, so that the fitting result can better represent the trend of the horizontal / vertical coordinates of each character in the pull-line cluster.
[0016] Preferably, the step of fitting the second straight line according to the horizontal / vertical coordinates of each character in the same character cluster comprises: calculating a second slope of the second straight line and the second intercept , to obtain the line equation of the second line: , where: Calculate the second slope The formula is: .
[0017] The first character in the same character cluster a The horizontal coordinate of the characters, For the cable cluster a The vertical coordinate of the character, b is the number of characters in the same character cluster, a is a positive integer; the second intercept The formula is: .
[0018] Preferably, each character is selected through a marking box through a character recognition model, wherein constructing the character model includes: constructing a first training set, wherein the first training set includes a plurality of first training images, each first training image includes a plurality of laser-printed characters, and the characters are selected through a marking box; constructing a first initial model, wherein the first initial model is a model of a CTPN architecture; and training the first initial model through the first training set to obtain the character recognition model.
[0019] The present invention uses a character recognition model based on a CTPN architecture to improve the accuracy of character detection.
[0020] Preferably, the pixels belonging to the characters in each marking box are marked with preset labels through an image segmentation model, and the number of pixels marked with preset labels is calculated to obtain the number of pixels belonging to the characters in each marking box, wherein constructing the image segmentation model includes: constructing a second training set, wherein the second training set includes multiple second training pictures, each second training picture includes multiple characters obtained by laser printing, and the pixels corresponding to the characters are marked with preset labels; constructing a second initial model, wherein the second initial model is a model of U-Net architecture; training the second initial model through the second training set to obtain the image segmentation model.
[0021] The present invention uses an image segmentation model with a U-Net architecture, which can more accurately identify pixels belonging to characters in the mark box.
[0022] In the second aspect, a machine vision-based wire-drawing wide-format coil printing quality inspection system comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement a machine vision-based wire-drawing wide-format coil printing quality inspection method as described in any one of the above-mentioned invention contents.
[0023] The beneficial effects of the present invention are: The present invention more accurately judges the size change of a character by analyzing the difference in the number of pixels between a character and other identical characters, and judges whether the character has positional shift according to the degree of positional shift of the character in rows and columns, thereby evaluating whether the character shape is consistent with a preset standard. When there is a high possibility that the size or shape of the character has changed, an alarm is issued. The present invention avoids errors in character judgment in wide-width wire-drawing coils based on laser printing caused by factors such as changes in illumination and small character size, thereby improving the automatic detection accuracy and reliability of the width of the anti-counterfeiting wire-drawing. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 is a flowchart of the steps of a method for detecting the quality of wire-drawn wide-format web printing based on machine vision according to an embodiment of the present invention; Figure 2 is a schematic diagram of some characters in a wide web image according to an embodiment of the present invention; Figure 3 It is a structural block diagram of the wire drawing wide-format web printing quality detection system based on machine vision in this embodiment. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0026] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0027] Figure 1 The present invention is a flowchart of the steps of a method for detecting the quality of wire-drawn wide-format web printing based on machine vision according to an embodiment of the present invention.
[0028] like Figure 1 As shown, the method for detecting the quality of wide-format web printing based on machine vision includes steps S1 to S6.
[0029] Step S1: obtaining a wide web image, and selecting each character through a marking frame to obtain the number of pixels belonging to the character in the marking frame.
[0030] Among them, the wide-format coil image includes multiple characters obtained by laser printing. It should be noted that laser printing is a printing technology that uses laser ink (metallic optical color-changing anti-counterfeiting ink) and laser printing technology to screen or roll-print laser ink on various flat and smooth transparent materials. The printed product can show different colors as the viewing angle changes, has an obvious dynamic color-changing effect, and can produce a rainbow ring effect under spotlight. Therefore, it is difficult to accurately judge the printing quality of each character through pixel values for a pull line or a wide-format coil composed of multiple pull lines with anti-counterfeiting functions.
[0031] In one embodiment, each character is selected through a marking box by a character recognition model, wherein constructing the character model includes: constructing a first training set, wherein the first training set includes a plurality of first training images, each of the first training images includes a plurality of characters obtained by laser printing, and the characters are selected through the marking box; constructing a first initial model, wherein the first initial model is a model of a CTPN architecture; and training the first initial model through the first training set to obtain the character recognition model. The marking box is usually a rectangular box.
[0032] It should be noted that the number of pixels of any character is the number of all pixels constituting the character. In one embodiment, the pixels belonging to the characters in each marking frame are marked with a preset label by an image segmentation model, and the number of pixels marked with the preset label is calculated to obtain the number of pixels belonging to the characters in each marking frame, wherein constructing the image segmentation model includes: constructing a second training set, wherein the second training set includes a plurality of second training images, each of the second training images includes a plurality of characters obtained by laser printing, and the pixels corresponding to the characters are marked with a preset label; constructing a second initial model, wherein the second initial model is a model of a U-Net architecture; and training the second initial model with the second training set to obtain the image segmentation model.
[0033] Step S2: Determine the horizontal / vertical coordinates of the center of the mark frame as the horizontal / vertical coordinates of the character, and divide all characters into multiple line clusters and multiple identical character clusters.
[0034] It should be noted that determining the horizontal / vertical coordinates of the center of the mark box as the horizontal / vertical coordinates of the character means: determining the horizontal coordinate of the center of the mark box as the horizontal coordinate of the character, and determining the vertical coordinate of the center of the mark box as the vertical coordinate of the character.
[0035] Among them, the absolute value of the difference between the vertical coordinates of any two characters in the pull line cluster or the absolute value of the difference between the horizontal coordinates of any two characters in the same character cluster is less than a preset first threshold, and the horizontal axis of the coordinate system is parallel to the straight line for cutting the wide-width coil.
[0036] It should be noted that the text length corresponding to the characters on the pull line is usually shorter. For example, the characters on the pull line used on cigarette boxes are usually product names or production company names, etc. The text length is short and repeated. Pull lines can be obtained by cutting wide-width coils. Each pull line is the same, that is, on the vertical line of the pull line on the wide-width coil, the characters on different pull lines through which the vertical line passes are the same. On the wide-width coil, if the characters belonging to a pull line are arranged horizontally, then the straight line for cutting the wide-width coil (that is, the above-mentioned "straight line for cutting the wide-width coil") is horizontal, and at this time, the characters in the vertical columns on the wide-width coil are the same.
[0037] Furthermore, the method of obtaining the same character cluster can also be determined according to the printing method of the wide-width coil. For example, the horizontal / vertical coordinates of the center of the characters in the wide-width coil are determined according to the character typesetting method in the printing of the wide-width coil, recorded as the preset coordinates of each character, and the horizontal / vertical coordinates of the center of the marking box corresponding to each character are matched with the preset coordinates of the character to minimize the distance between the preset coordinates and the horizontal / vertical coordinates of the center of the marking box, thereby determining the characters in the marking box and grouping the same characters into the same "same character cluster". Based on this, the purpose of this step is to group characters belonging to the same pull line into a "pull line cluster" and group the same characters into a "same character cluster".
[0038] Figure 2 Schematic diagram of some characters in a wide web image according to an embodiment of the present invention.
[0039] like Figure 2 As shown, "...ABCDEFAB..." in the same row are characters on a pull line, and a straight line L used for cutting a wide coil is parallel to the horizontal axis of the coordinate system in the figure. The characters included in any pull line are actually "ABCDEFAB...EFABCDEF", that is, the periodically appearing characters are "ABCDE", and each pull line is the same, then the characters in the same order of the pull line are the same, that is, for any pull line, the 7Z+1st character is "A", the 7Z+2nd character is "B", the 7Z+3rd character is "C", the 7Z+4th character is "D", the 7Z+5th character is "E", and the 7Z+6th character is "F", where Z is an integer greater than 0. The spacing between the characters is the same, so the characters in the same column are the same. Based on this, the present invention determines all characters that meet the condition "the absolute value of the difference between the horizontal coordinates of any two characters is less than the preset first threshold value" as an identical character cluster, so that all characters in the identical character cluster are identical.
[0040] Step S3: Calculate the outlier degree of each character.
[0041] Among them, the outlier degree is proportional to the absolute value of the difference between the number of pixels of the character and the average number of pixels of all characters in the same character cluster to which it belongs, and the outlier degree is proportional to the absolute value of the difference between the number of pixels of the character and the number of pixels of the characters in the same character cluster and adjacent to it in the vertical axis direction.
[0042] In one embodiment, the calculation i The first character cluster of the same character in the preset direction j Character Outliers The formula is: .
[0043] Among them i In clusters of identical characters,n is the number of characters, is the mean number of pixels of all characters, is the standard deviation of the number of pixels of all characters, A i,j For the j The number of pixels per character, A i,j-1 For the j -The number of pixels for 1 character, A i,j+1 For the j +1 character number of pixels, i , j is a positive integer, q is the preset parameter, exp is the exponential function with natural logarithm e as the base, i The first character cluster of the same character in the preset direction j Characters belong to i The same character cluster and j In one embodiment, the preset parameters q The size of is 1.
[0044] It should be noted that, in the embodiment of the present invention, a same character cluster represents a vertical column of characters, and a line drawing represents a horizontal row of characters, so any character belongs to a same character cluster and a line drawing cluster, and the intersection of the characters included in any same character cluster and the line drawing cluster has only one character. i The first character cluster of the same character in the preset direction j Characters belong to i The same character cluster and j A string cluster of characters.
[0045] Furthermore, for the same character, the number of pixels between characters is usually small. If the number of pixels of a certain character is significantly different from that of other identical characters, it means that the corresponding part of the character on the wide-width roll may have been deformed due to environmental factors, resulting in a change in the size of the character, and the character is no longer suitable for anti-counterfeiting recognition. i The first character cluster of the same character in the preset direction j characters, The larger the character is, the closer the number of pixels is to the first i The greater the difference in the number of pixels of other characters in the same character cluster, the more likely the character is to be enlarged or reduced, that is, the more likely the size of the character is to change, and the outlier degree of the character is The bigger; or The larger the value, the greater the difference between the character and its adjacent characters belonging to the same character cluster, that is, the character is more prominent (or "more abnormal") in the local range of the image, and the size of the character is more likely to change. The bigger.
[0046] Based on this, the greater the outlier degree of a character, the more likely the size of the character will change.
[0047] Step S4: fitting a first straight line according to the horizontal / vertical coordinates of each character in the line cluster, and calculating a first angle between the first straight line and the horizontal axis.
[0048] Among them, the first angle is an acute angle.
[0049] In one embodiment, the step of fitting the first straight line according to the horizontal / vertical coordinates of each character in the pull line cluster comprises: calculating a first slope of the first straight line and the first intercept , to obtain the line equation of the first line: , where: Calculate the first slope The formula is: .
[0050] For the cable cluster v The horizontal coordinate of the characters, For the cable cluster v The vertical coordinate of the character, m is the number of characters in the pull-line cluster, v is a positive integer; the first intercept The formula is: .
[0051] It should be noted that the connecting line of the horizontal / vertical coordinates of the center of the marking frame corresponding to all characters in a pull-wire cluster is theoretically parallel to the horizontal axis. Therefore, the horizontal / vertical coordinates of each character in the pull-wire cluster are fitted to obtain a first straight line, and the first angle between the first straight line and the horizontal axis is calculated. The first angle reflects the degree of deviation of all characters in a pull-wire cluster compared to the set position (i.e., the position of the character under an ideal state). Changes in the shape and outline of the character will cause changes in the shape of its marking frame, which in turn causes the coordinates of the center of the marking frame (i.e., the horizontal / vertical coordinates of the character in the present invention) to deviate from the set position. Based on this, the larger the first angle corresponding to the pull-wire cluster, the greater the possibility that the shape and outline of the characters in the pull-wire cluster will change.
[0052] Step S5: fitting a second straight line according to the horizontal / vertical coordinates of each character in the same character cluster, and calculating a second angle between the second straight line and the vertical axis.
[0053] Among them, the second angle is an acute angle.
[0054] In one embodiment, the second slope of the second straight line is calculated and the second intercept , to obtain the line equation of the second line: , where: Calculate the second slope The formula is: .
[0055] The first character in the same character cluster a The horizontal coordinate of the characters, For the cable cluster a The vertical coordinate of the character, b is the number of characters in the same character cluster, a is a positive integer; the second intercept The formula is: .
[0056] Similarly, the connecting line of the horizontal / vertical coordinates of the center of the marking box corresponding to all characters in the same character cluster is theoretically parallel to the vertical axis. Therefore, the horizontal / vertical coordinates of each character in the same character cluster are fitted to obtain a second straight line, and the second angle between the second straight line and the vertical axis is calculated. The second angle reflects the degree of deviation of all characters in the same character cluster compared to the set position. Changes in the shape and outline of the characters will cause changes in the shape of their marking boxes, which will in turn cause the coordinates of the center of the marking box to deviate from the set position. Based on this, the larger the second angle corresponding to the same character cluster, the greater the possibility that the shape and outline of the characters in the same character cluster will change.
[0057] In other embodiments, the printing method of the wire-drawn wide-format coil is similar to the embodiments of the present invention (such as Figure 2 If the image is different from the image shown in the figure, when printing the wide-format roll, two lines are set for each character, the two lines are perpendicular to each other, the two lines are parallel to one of the sides of the wide-format roll respectively, and the intersection of the two lines is the center of each character. The first angle and the second angle are calculated based on the angles between the two lines in the image and the vertical axis and the horizontal axis respectively.
[0058] Step S6: Calculate the abnormality of each character and generate an alarm when the abnormality of at least one character is less than a preset second threshold.
[0059] The abnormality of a character is proportional to its outlier, the first angle of the string cluster to which it belongs, and the second angle of the same character cluster.
[0060] In one embodiment, the calculation belongs to h The cable cluster and gThe abnormality of characters in the same character cluster β h,g The formula is: , which belongs to h The cable cluster and g The character of the same character cluster is g The first character cluster of the same character in the preset direction h characters, α h,g For the h The cable cluster and g The outlier degree of characters in the same character cluster, θ 1,h For the h The first angle corresponding to the cable cluster, θ 2,g For the g The second angle corresponding to the same character cluster, 0< θ 1,h <90°,0< θ 2,g <90°, h , g is a positive integer, norm is the standard normalization function. Among them, the standard normalization function norm Used to The values are mapped to the range (0,1).
[0061] It should be noted that for h The cable cluster and g characters of the same character cluster, h The first angle corresponding to the same character cluster θ 1,h or g The second angle corresponding to the same character cluster θ 2,g The larger the value, the more likely the shape and outline of the character have changed. β h,g The larger the character, the more outlier it is. α h,g The larger the value, the greater the possibility that the size of the character will change. β h,g Since the character may not be used for anti-counterfeiting recognition when the size, shape and outline of the character change, based on this, the greater the abnormality of the character, the greater the possibility that the character cannot be used for anti-counterfeiting recognition, so an alarm is triggered when the abnormality of at least one character is less than the preset second threshold.
[0062] Furthermore, characters whose length is less than a preset second threshold value are marked to facilitate manual inspection and related processing (for example, the wire to which the character belongs is cut and discarded).
[0063] Figure 3 It is a structural block diagram of the wire drawing wide-format web printing quality detection system based on machine vision in this embodiment.
[0064] The present invention also provides a machine vision-based wire drawing wide-format coil printing quality detection system. Figure 3 As shown, the system includes a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, the method for detecting the quality of wide-format web printing based on machine vision according to the first aspect of the present invention is implemented.
[0065] The system further includes a communication interface, which is another component well known to those skilled in the art. The configuration and function of the communication interface are known in the art, and thus will not be described in detail herein.
[0066] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.
[0067] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0068] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A method for detecting the quality of wide-format wire-drawn coil printing based on machine vision, characterized in that: include: Obtaining a wide web image, and selecting each character through a marking frame to obtain the number of pixels belonging to the character in the marking frame, wherein the wide web image includes a plurality of characters obtained by laser printing; Determine the horizontal / vertical coordinates of the center of the mark frame as the horizontal / vertical coordinates of the character, divide all characters into multiple line clusters and multiple identical character clusters, wherein the absolute value of the difference between the ordinates of any two characters in the line cluster or the absolute value of the difference between the horizontal coordinates of any two characters in the identical character cluster is less than a preset first threshold, and the horizontal axis of the coordinate system is parallel to the straight line for cutting the wide web; calculate the outlier of each character, the outlier is proportional to the absolute value of the difference between the number of pixels of the character and the average number of pixels of all characters in the same character cluster to which it belongs, and the outlier is proportional to the absolute value of the difference between the number of pixels of the character and the number of pixels of characters in the same character cluster and adjacent to each other in the vertical axis direction; A first straight line is obtained by fitting the horizontal / vertical coordinates of each character in the pull-line cluster, and a first angle between the first straight line and the horizontal axis is calculated; a second straight line is obtained by fitting the horizontal / vertical coordinates of each character in the same character cluster, and a second angle between the second straight line and the vertical axis is calculated; the abnormality of each character is calculated and an alarm is issued when the abnormality of at least one character is less than a preset second threshold, wherein the abnormality of a character is proportional to its outlier, the first angle of the pull-line cluster to which it belongs, and the second angle of the same character cluster.
2. The method for detecting the quality of wire-drawn wide-format coiled material printing based on machine vision according to claim 1, characterized in that: Calculate the i The first character cluster of the same character in the preset direction j Character Outliers The formula is: ; Among them in i In the same character clusters, n is the number of characters, is the mean number of pixels of all characters, is the standard deviation of the number of pixels of all characters, A i,j For the j The number of pixels per character, A i,j-1 For the j -The number of pixels for 1 character, A i,j+1 For the j +1 character number of pixels, i , j is a positive integer, q is the preset parameter, exp is the exponential function with natural logarithm e as the base, i The first character cluster of the same character in the preset direction j Characters belong to i The same character cluster and j A string cluster of characters.
3. The method for detecting the quality of wire-drawn wide-format coiled material printing based on machine vision according to claim 1, characterized in that: Calculate the h The cable cluster and g The abnormality of characters in the same character cluster β h,g The formula is: ; in α h,g For the h The cable cluster and g The outlier degree of characters in the same character cluster, θ 1,h For the h The first angle corresponding to the cable cluster, θ 2,g For the g The second angle corresponding to the same character cluster, 0< θ 1,h <90°,0< θ 2,g <90°, h , g is a positive integer, norm is the standard normalization function.
4. The method for detecting the quality of wire-drawn wide-format coiled material printing based on machine vision according to claim 1, characterized in that: The step of fitting the first straight line according to the horizontal / vertical coordinates of each character in the pull line cluster comprises: Calculate the first slope of the first straight line and the first intercept , to obtain the line equation of the first line: ,in: Calculate the first slope The formula is: , For the cable cluster v The horizontal coordinate of the characters, For the cable cluster v The vertical coordinate of the character, m is the number of characters in the pull-line cluster, v is a positive integer; First Intercept The formula is: .
5. The method for detecting the quality of wire-drawn wide-format coiled material printing based on machine vision according to claim 1, characterized in that: The step of fitting the second straight line according to the horizontal / vertical coordinates of the characters in the same character cluster comprises: Calculate the second slope of the second line and the second intercept , to obtain the line equation of the second line: ,in: Calculate the second slope The formula is: , The first character in the same character cluster a The horizontal coordinate of the characters, For the cable cluster a The vertical coordinate of the character, b is the number of characters in the same character cluster, a is a positive integer; Second intercept The formula is: .
6. The method for detecting the quality of wire-drawn wide-format coiled material printing based on machine vision according to claim 1, characterized in that: Each character is selected through a marking box by a character recognition model, wherein building a character model includes: Constructing a first training set, wherein the first training set includes a plurality of first training images, each of the first training images includes a plurality of characters obtained by laser printing, and the characters are selected by marking boxes; Constructing a first initial model, wherein the first initial model is a model of a CTPN architecture; The first initial model is trained using a first training set to obtain the character recognition model.
7. The method for detecting the quality of wire-drawn wide-format coiled material printing based on machine vision according to claim 1, characterized in that: The pixels belonging to the characters in each marked frame are marked with preset labels by an image segmentation model, and the number of pixels marked with preset labels is calculated to obtain the number of pixels belonging to the characters in each marked frame, wherein the image segmentation model is constructed including: Constructing a second training set, wherein the second training set includes a plurality of second training images, each of which includes a plurality of characters obtained by laser printing, and pixels corresponding to the characters are marked with preset labels; Constructing a second initial model, wherein the second initial model is a model of a U-Net architecture; The second initial model is trained using a second training set to obtain the image segmentation model.
8. A machine vision-based wire-drawing wide-format web printing quality inspection system, comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: The processor executes the computer program to implement the machine vision-based wire-drawing wide-format web printing quality detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Printed matter character defect detection method and device
CN118710599A
Printed matter quality detection method, device and equipment and computer medium
CN113406110A
Method of detecting misprints, computing device, and storage medium
US20230092072A1