CN117975168A - Method and system for detecting quality of printed label - Google Patents
Method and system for detecting quality of printed label Download PDFInfo
- Publication number
- CN117975168A CN117975168A CN202410361581.5A CN202410361581A CN117975168A CN 117975168 A CN117975168 A CN 117975168A CN 202410361581 A CN202410361581 A CN 202410361581A CN 117975168 A CN117975168 A CN 117975168A
- Authority
- CN
- China
- Prior art keywords
- image
- sub
- images
- label
- quality inspection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000007689 inspection Methods 0.000 claims abstract description 79
- 238000005520 cutting process Methods 0.000 claims abstract description 56
- 238000004364 calculation method Methods 0.000 claims abstract description 26
- 238000001914 filtration Methods 0.000 claims description 15
- 238000007639 printing Methods 0.000 claims description 10
- 238000007781 pre-processing Methods 0.000 claims description 6
- 230000035945 sensitivity Effects 0.000 claims description 3
- 238000001514 detection method Methods 0.000 description 11
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000004804 winding Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 150000003839 salts Chemical class 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention belongs to the field of image recognition, and discloses a method and a system for detecting the quality of a printed label, wherein the method comprises the following steps: s1, obtaining a standard image of a label meeting quality inspection requirements; S2, adopting preset cutting rule pairsCutting, and storing the obtained sub-images into a collection; S3, obtaining an image to be detected of the label printed at the moment t; S4, calculatingContrast coefficient of each sub-image in (a); s5, according to the order of the contrast coefficient from high to lowContinuously numbering the sub-images in the frame; s6, based onAnd judging whether the printed label at the moment t meets the quality inspection requirement or not. The method and the device enable the area which does not meet the quality inspection requirement in the label to be identified in the front identification sequence, avoid redundant quality inspection calculation on the rest pixel points, and improve the quality inspection efficiency.
Description
Technical Field
The invention relates to the field of image recognition, in particular to a method and a system for detecting the quality of a printed label.
Background
In the process of printing the label, there may be a problem of print quality, such as deformation of the pattern, insufficient definition, etc., so that quality detection of the printed label is required to avoid the customer from receiving the label with the quality problem.
In the prior art, a quality detection is generally performed on a printed label by adopting an image recognition mode, the detection principle is that an image of the printed label is compared with a standard image of a pre-stored label, the similarity between the two images is calculated, and when the similarity is larger than a threshold value, the quality of the printed label is qualified. This comparison has the following drawbacks: whether the label is printed correctly or not, the quality detection result needs to be obtained by calculating the similarity based on all pixel points in the image. However, if there is a region which does not meet the printing requirements, the label is a label with quality problems. When the quality problem exists in the label, the quality problem can be detected only by calculating all other areas without the quality problem in the prior art, and the overall detection efficiency is affected.
Therefore, when the quality of the label is detected by using the image recognition technology, how to improve the detection efficiency in the quality detection process of the label becomes a technical problem to be solved.
Disclosure of Invention
The invention aims to disclose a quality detection method and a quality detection system for a printed label, which solve the problem of how to improve the detection efficiency in the quality detection process of the label when the production quality of the label is detected by using an image recognition technology.
In order to achieve the above purpose, the present invention provides the following technical solutions:
In one aspect, the present invention provides a method for detecting quality of a printed label, comprising:
s1, obtaining a standard image of a label meeting quality inspection requirements ;
S2, adopting preset cutting rule pairsCutting to obtain multiple sub-images, and storing the obtained sub-images into a set/>;
S3, obtaining an image to be detected of the label printed at the moment t;
S4, based on the printed images to be detected of the labels at the time t-1 and the time t-2And/>Calculation ofContrast coefficient of each sub-image in (a);
s5, according to the order of the contrast coefficient from high to low Continuously numbering the sub-images in the table, wherein the larger the contrast coefficient is, the smaller the number is, and the number is a positive integer;
s6, based on Judging whether the printed label at the moment t meets the quality inspection requirement or not according to the sub-image in the step (a), comprising the following steps:
s61, using k to represent a number, and initializing the value of k to be 1;
S62, obtaining Sub-image/>, numbered k;
S63, willAnd/>Corresponding judgment area/>Comparing, judging/>And (3) withIf the similarity is greater than a preset similarity threshold, the step S64 is carried out, if not, the step S indicates that the printed label at the moment t does not meet the quality inspection requirement;
S64, adding 1 to the value of k, judging whether k is larger than If yes, it means that the printed label at time t meets the quality inspection requirement, if no, it goes to S62.
Optionally, S2 includes:
the 1 st cutting process comprises the following steps:
Will be Cutting into N sub-images with consistent areas, and taking all the obtained sub-images as a set/>Elements of (a) and (b);
Separately calculate A cut probability value for each sub-image in (a);
Taking the cutting probability value larger than a preset cutting probability value threshold value as a set Elements of (a) and (b);
the h-th cutting process comprises the following steps:
Will respectively Each sub-image in the list is cut into N sub-images with identical areas, and all the obtained sub-images are taken as a set/>Elements of (a) and (b); h is greater than 1;
Separately calculate A cut probability value for each sub-image in (a);
Taking the cutting probability value larger than a preset cutting probability value threshold value as a set Elements of (a) and (b);
Judging If the total number of elements in the image is greater than 0, continuing to cut the image next time, otherwise, taking all sub-images obtained by cutting for a total of h times as/>Is a component of the group.
Optionally, the calculation formula of the cutting probability value is:
Representing the cut probability value,/> Representing the total number of pixel points in the sub-image,/>Representation/>Total number of pixel points in/>Representing the total number of pixel points with gray value i in gray image corresponding to sub-image,/>Representing a preset importance level reference value/>Representing the number weights,/>Representing information quantity weight,/>Representing a preset integer.
Optionally, S3 includes:
Adoption and acquisition Shooting the label printed at the moment t by using the same shooting parameters to obtain an initial image/>;
For a pair ofImage preprocessing is carried out to obtain an image to be detected/>。
Optionally, the photographing parameters include aperture, shutter speed, sensitivity, focal length, resolution, and white balance.
Alternatively, toImage preprocessing is carried out to obtain an image to be detected/>Comprising:
For a pair of Filtering to obtain the image to be detected/>。
Alternatively, toFiltering to obtain the image to be detected/>Comprising:
adopts NLEM algorithm pairs Filtering to obtain the image to be detected/>。
On the other hand, the invention provides a printing label quality inspection system, which comprises a first acquisition module, a cutting module, a second acquisition module, a calculation module, a numbering module and a quality inspection module;
The first acquisition module is used for acquiring standard images of labels meeting quality inspection requirements ;
The cutting module is used for adopting preset cutting rule pairsCutting to obtain multiple sub-images, and storing the obtained sub-images into a set/>;
The second acquisition module is used for acquiring an image to be detected of the label printed at the moment t;
The computing module is used for detecting images to be detected of the printed labels based on the time t-1 and the time t-2And/>Calculation/>Contrast coefficient of each sub-image in (a);
the numbering module is used for pairing in order of high-to-low comparison coefficient Continuously numbering the sub-images in the table, wherein the larger the contrast coefficient is, the smaller the number is, and the number is a positive integer;
The quality inspection module is used for being based on Judging whether the printed label at the moment t meets the quality inspection requirement or not according to the sub-image in the step (a), comprising the following steps:
The first step, using k to represent the number, initializing the value of k to be 1;
Second step, obtaining Sub-image/>, numbered k;
Third step, willAnd/>Corresponding judgment area/>Comparing, judging/>And (3) withIf the similarity is greater than a preset similarity threshold, entering a fourth step, otherwise, indicating that the printed label at the moment t does not meet the quality inspection requirement;
fourth, adding 1 to the value of k, judging whether k is larger than or not If yes, the total number of the sub-images in the image is represented that the printed label at the moment t meets the quality inspection requirement, and if not, the second step is entered.
The invention has the advantages that:
Compared with the prior art, the invention divides the standard image into a plurality of sub-images, and then calculates the quality inspection of the latest image to be identified based on the results of the quality inspection process of the previous two times, The contrast coefficients of the sub-images in (a) are then increased/decreased in order of the contrast coefficientsThe sub-images in the label are compared with the corresponding judging areas in the image to be identified one by one in similarity, so that the areas which do not meet the quality inspection requirements in the label can be identified in the front identification sequence, redundant quality inspection calculation on the rest pixel points is avoided, and the quality inspection efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a method for detecting quality of a printed label according to the present invention.
FIG. 2 is a schematic diagram of a print label quality inspection system according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, based on the embodiments of the invention, which a person of ordinary skill in the art would obtain without inventive faculty, are within the parameters of the scope of the invention.
Embodiment one:
in one embodiment shown in fig. 1, the present invention provides a method for detecting quality of a printed label, comprising:
s1, obtaining a standard image of a label meeting quality inspection requirements ;
S2, adopting preset cutting rule pairsCutting to obtain multiple sub-images, and storing the obtained sub-images into a set/>;
S3, obtaining an image to be detected of the label printed at the moment t;
S4, based on the printed images to be detected of the labels at the time t-1 and the time t-2And/>Calculation ofContrast coefficient of each sub-image in (a);
s5, according to the order of the contrast coefficient from high to low Continuously numbering the sub-images in the table, wherein the larger the contrast coefficient is, the smaller the number is, and the number is a positive integer;
s6, based on Judging whether the printed label at the moment t meets the quality inspection requirement or not according to the sub-image in the step (a), comprising the following steps:
s61, using k to represent a number, and initializing the value of k to be 1;
S62, obtaining Sub-image/>, numbered k;
S63, willAnd/>Corresponding judgment area/>Comparing, judging/>And (3) withIf the similarity is greater than a preset similarity threshold, the step S64 is carried out, if not, the step S indicates that the printed label at the moment t does not meet the quality inspection requirement;
S64, adding 1 to the value of k, judging whether k is larger than If yes, it means that the printed label at time t meets the quality inspection requirement, if no, it goes to S62.
By dividing the standard image into a plurality of sub-images and then calculating the latest image to be identified based on the results of the previous two quality inspection processes,The contrast coefficients of the sub-images in (a) are then increased/decreased in order of the contrast coefficientsThe sub-images in the label are compared with the corresponding judging areas in the image to be identified one by one in similarity, so that the areas which do not meet the quality inspection requirements in the label can be identified in the front identification sequence, redundant quality inspection calculation on the rest pixel points is avoided, and the quality inspection efficiency is improved.
In addition, the set of the inventionIs calculated in advance,/>The coordinates of the sub-images are stored in advance, and calculation is not needed in the quality inspection process of the printed label, so that the quality inspection efficiency can be effectively improved, and in the quality inspection process, only the numbers of the sub-images are acquired and the sub-images are respectively inspected based on the numbersThe similarity between each sub-image and the judging area corresponding to the image to be detected is only needed.
When the label meets the quality inspection requirement, the similarity is calculated only based on all pixel points in the image, and the calculation amount is not larger than that in the prior art. And when encountering a label which does not meet the quality inspection requirement, the label can be quickly identified, and the quality inspection efficiency is obviously higher than that of the prior art.
When the quality inspection is carried out on the first label, the comparison coefficient of the sub-images is not calculated, the similarity is calculated between the sub-images and the corresponding judging areas in the image to be detected corresponding to the first label one by one, and if the sub-images which do not meet the similarity requirement are found, the first label does not meet the quality inspection requirement.
The process of quality inspection of the second label is the same as the process of quality inspection of the first label.
Since the first printed label and the second printed label have no previous quality inspection result to calculate the contrast coefficient when the quality inspection is started, the sequence of similarity calculation is not specified, and only the similarity calculation of all the sub-images is required to be completed.
Starting from the third printed label, quality inspection can be performed based on the contrast factor using the quality inspection process described above.
Therefore, the minimum value of t is 3t, and t represents the length of time between the times when printing of two adjacent labels is completed.
Optionally, the preset similarity threshold is 0.98.
Optionally, S2 includes:
the 1 st cutting process comprises the following steps:
Will be Cutting into N sub-images with consistent areas, and taking all the obtained sub-images as a set/>Elements of (a) and (b);
Separately calculate A cut probability value for each sub-image in (a);
Taking the cutting probability value larger than a preset cutting probability value threshold value as a set Elements of (a) and (b);
the h-th cutting process comprises the following steps:
Will respectively Each sub-image in the list is cut into N sub-images with identical areas, and all the obtained sub-images are taken as a set/>Elements of (a) and (b); h is greater than 1;
Separately calculate A cut probability value for each sub-image in (a);
Taking the cutting probability value larger than a preset cutting probability value threshold value as a set Elements of (a) and (b);
Judging If the total number of elements in the image is greater than 0, continuing to cut the image next time, otherwise, taking all sub-images obtained by cutting for a total of h times as/>Is a component of the group.
And continuously taking the sub-image with the cutting probability value meeting the judgment condition in the sub-images obtained by the previous cutting as the object of the next cutting in a circular cutting mode, so that the importance degrees of all the obtained sub-images are basically consistent. In this way, the sub-images can be numbered by using the previous quality inspection result when the sub-images are numbered later. The number of the sub-images is relatively small, so that the number of each sub-image can be obtained rapidly.
In addition, the present invention is not to be taken as suchThe sub-images with the same area are divided into a plurality of sub-images, and because the importance degrees of different areas are inconsistent in the sub-images, the sub-images cannot be numbered by utilizing the quality inspection result in the front, and further the sub-images with the quality inspection problem cannot be numbered at the front position, so that the quality inspection efficiency cannot be improved.
Alternatively, the value of N is 9.
Optionally, the calculation formula of the cutting probability value is:
Representing the cut probability value,/> Representing the total number of pixel points in the sub-image,/>Representation/>Total number of pixel points in/>Representing the total number of pixel points with gray value i in gray image corresponding to sub-image,/>Representing a preset importance level reference value/>Representing the number weights,/>Representing information quantity weight,/>Representing a preset integer.
The cutting probability value is used for matching with a preset cutting probability value threshold value, so that the importance degree of the obtained sub-images is basically consistent. When the total number of pixel points of the sub-image is larger, the more effective information exists, the larger the cutting probability value of the invention is, so that the degree of the importance degree of the sub-image deviating from the preset importance degree reference value is larger, and the probability of the sub-image entering the next cutting is larger. The more effective information is present, the more important the sub-image is represented when the number of pixels in the sub-image is greater. Therefore, the sub-images are continuously segmented, so that the importance degree of each sub-image is as close to a preset importance degree reference value as possible, and the importance degree of each sub-image tends to be consistent.
Alternatively, the number weight is 0.3 and the information amount weight is 0.7.
Alternatively to this, the method may comprise,Has a value of 10.
Optionally, the preset importance level reference value is 0.1.
Optionally, the preset cutting probability value threshold value is 0.01.
Optionally, S3 includes:
Adoption and acquisition Shooting the label printed at the moment t by using the same shooting parameters to obtain an initial image/>;
For a pair ofImage preprocessing is carried out to obtain an image to be detected/>。
The same shooting parameters are adopted, so that the calculation of the similarity between the sub-images and the judging areas can be prevented from being influenced by different shooting parameters.
Specifically, in the present invention, the time interval between t and t-1 is the length of time between the times when printing between two labels adjacent in the printing order is completed.
At the time of photographing, the lens is vertically downward, photographing is performed toward the center of the printed label.
Optionally, the photographing parameters include aperture, shutter speed, sensitivity, focal length, resolution, and white balance.
Specifically, the shooting parameters further include a lens model, a shooting distance, a shooting angle formed between the lens model and a plane where the tag is located, and the like.
Alternatively, toImage preprocessing is carried out to obtain an image to be detected/>Comprising:
For a pair of Filtering to obtain the image to be detected/>。
The image is filtered, so that the quality of the image can be improved, and more accurate similarity calculation results can be obtained.
Alternatively, toFiltering to obtain the image to be detected/>Comprising:
adopts NLEM algorithm pairs Filtering to obtain the image to be detected/>。
The NLEM image filtering is different from the traditional image filtering algorithm, the similarity between the neighborhoods is considered, euclidean distance is introduced in calculation as a similarity measurement standard, and median filtering is adopted to remove noise. Therefore, NLEM image filtering can effectively remove Gaussian noise and spiced salt noise, and can retain details such as image edges and textures.
Optionally, S1 includes:
shooting the label meeting the quality inspection requirement to obtain an image ;
For a pair ofFiltering to obtain standard image/>。
The NLEM algorithm pair can be adoptedAnd filtering.
Optionally, S4 includes:
For the following Sub-image/>Will/>And/>At/>The similarity between the corresponding judgment regions in (a) is expressed as/>Will/>And/>At/>The similarity between the corresponding judgment regions in (a) is expressed as/>;
Calculation using the following formulaIs a contrast coefficient of (2):
Representation/> Contrast coefficient of/>Representing a preset similarity threshold,/>AndRespectively representing a first similarity difference weight and a second similarity difference weight.
In calculating the contrast coefficient, if it is in the last quality inspection process for the same sub-image, it is compared withThe similarity between the judgment areas in (a) is smaller than a similarity threshold value set in advance, and the larger the amplitude smaller than the similarity threshold value set in advance is, the greater the amplitude of the similarity between the judgment areas isAnd/>The smaller the difference value is, the larger the probability that the corresponding position of the sub-image is out of compliance with the quality inspection requirement is, so that the smaller the number is, the earlier the sub-image with the higher probability that the quality inspection requirement is out of compliance is inspected, and therefore when the quality problem exists in the label, the quality inspection requirement of the label is judged by only needing a small amount of calculation.
Optionally, the first similarity difference weight and the second similarity difference weight are 0.4 and 0.6, respectively.
Alternatively to this, the method may comprise,The acquisition of (1) includes:
For a pair of Acquisition/>The pixel points in/>Set of coordinates in/>;
At the position ofObtain the result of/>Judging area/>, consisting of pixel points corresponding to coordinates in the image。
Before quality inspection is performed on the label, calculation is completed and stored, and when the label is acquired, the label is directly read from a storage position, so that the calculation can be avoided when the label is subjected to quality inspection, and the quality inspection efficiency is ensured.
Embodiment two:
As shown in fig. 2, the invention provides a quality inspection system for printed labels, which comprises a first acquisition module, a cutting module, a second acquisition module, a calculation module, a numbering module and a quality inspection module;
The first acquisition module is used for acquiring standard images of labels meeting quality inspection requirements ;
The cutting module is used for adopting preset cutting rule pairsCutting to obtain multiple sub-images, and storing the obtained sub-images into a set/>;
The second acquisition module is used for acquiring an image to be detected of the label printed at the moment t;
The computing module is used for detecting images to be detected of the printed labels based on the time t-1 and the time t-2And/>Calculation/>Contrast coefficient of each sub-image in (a);
the numbering module is used for pairing in order of high-to-low comparison coefficient Continuously numbering the sub-images in the table, wherein the larger the contrast coefficient is, the smaller the number is, and the number is a positive integer;
The quality inspection module is used for being based on Judging whether the printed label at the moment t meets the quality inspection requirement or not according to the sub-image in the step (a), comprising the following steps:
The first step, using k to represent the number, initializing the value of k to be 1;
Second step, obtaining Sub-image/>, numbered k;
Third step, willAnd/>Corresponding judgment area/>Comparing, judging/>And (3) withIf the similarity is greater than a preset similarity threshold, entering a fourth step, otherwise, indicating that the printed label at the moment t does not meet the quality inspection requirement;
fourth, adding 1 to the value of k, judging whether k is larger than or not If yes, the total number of the sub-images in the image is represented that the printed label at the moment t meets the quality inspection requirement, and if not, the second step is entered.
In an application scenario, the second acquisition module of the invention can be arranged in front of a paper winding roller of the label printer, the printed labels entering the paper winding roller are shot, and meanwhile, the quality inspection module sends a quality inspection result to a control system of the label printer, when the labels which do not meet the quality inspection requirement are found, the control system controls the label printer to pause printing, so that excessive labels with quality problems are prevented from being printed, and unnecessary production cost is increased.
In another application scenario, the second obtaining module may be disposed directly above a conveyor belt that conveys the printed labels, where the labels on the conveyor belt are all cut single labels, and are arranged in the order from early to late when printing is completed, that is, the labels arrive directly below the conveyor belt earlier when the printing is completed, and the quality inspection module sends the quality inspection result to the control system of the label printer.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (8)
1. A method for detecting quality of a printed label, comprising:
s1, obtaining a standard image of a label meeting quality inspection requirements ;
S2, adopting preset cutting rule pairsCutting to obtain multiple sub-images, and storing the obtained sub-images into a set/>;
S3, obtaining an image to be detected of the label printed at the moment t;
S4, based on the printed images to be detected of the labels at the time t-1 and the time t-2And/>Calculation/>Contrast coefficient of each sub-image in (a);
s5, according to the order of the contrast coefficient from high to low Continuously numbering the sub-images in the table, wherein the larger the contrast coefficient is, the smaller the number is, and the number is a positive integer;
s6, based on Judging whether the printed label at the moment t meets the quality inspection requirement or not according to the sub-image in the step (a), comprising the following steps:
s61, using k to represent a number, and initializing the value of k to be 1;
S62, obtaining Sub-image/>, numbered k;
S63, willAnd/>Corresponding judgment area/>Comparing, judging/>And/>If the similarity is greater than a preset similarity threshold, the step S64 is carried out, if not, the step S indicates that the printed label at the moment t does not meet the quality inspection requirement;
S64, adding 1 to the value of k, judging whether k is larger than If yes, it means that the printed label at time t meets the quality inspection requirement, if no, it goes to S62.
2. The method for detecting the quality of a printed label according to claim 1, wherein S2 comprises:
the 1 st cutting process comprises the following steps:
Will be Cutting into N sub-images with consistent areas, and taking all the obtained sub-images as a set/>Elements of (a) and (b);
Separately calculate A cut probability value for each sub-image in (a);
Taking the cutting probability value larger than a preset cutting probability value threshold value as a set Elements of (a) and (b);
the h-th cutting process comprises the following steps:
Will respectively Each sub-image in the list is cut into N sub-images with identical areas, and all the obtained sub-images are taken as a set/>Elements of (a) and (b); h is greater than 1;
Separately calculate A cut probability value for each sub-image in (a);
Taking the cutting probability value larger than a preset cutting probability value threshold value as a set Elements of (a) and (b);
Judging If the total number of elements in the image is greater than 0, continuing to cut the image next time, otherwise, taking all sub-images obtained by cutting for a total of h times as/>Is a component of the group.
3. The method for detecting quality of printed labels according to claim 2, wherein the calculation formula of the cutting probability value is:
;
Representing the cut probability value,/> Representing the total number of pixel points in the sub-image,/>Representation ofTotal number of pixel points in/>Representing the total number of pixel points with the gray value of i in the gray image corresponding to the sub-image,Representing a preset importance level reference value/>Representing the number weights,/>Representing information quantity weight,/>Representing a preset integer.
4. The method for detecting the quality of a printed label according to claim 1, wherein S3 comprises:
Adoption and acquisition The same shooting parameters are used for shooting the label printed at the moment t to obtain an initial image;
For a pair ofImage preprocessing is carried out to obtain an image to be detected/>。
5. The method of claim 4, wherein the photographing parameters include aperture, shutter speed, sensitivity, focal length, resolution, and white balance.
6. The method for detecting the quality of a printed label according to claim 4, wherein forImage preprocessing is carried out to obtain an image to be detected/>Comprising:
For a pair of Filtering to obtain the image to be detected/>。
7. The method for detecting the quality of a printed label according to claim 6, wherein forFiltering to obtain the image to be detected/>Comprising:
adopts NLEM algorithm pairs Filtering to obtain the image to be detected/>。
8. The printing label quality inspection system is characterized by comprising a first acquisition module, a cutting module, a second acquisition module, a calculation module, a numbering module and a quality inspection module;
The first acquisition module is used for acquiring standard images of labels meeting quality inspection requirements ;
The cutting module is used for adopting preset cutting rule pairsCutting to obtain multiple sub-images, and storing the obtained sub-images into a set/>;
The second acquisition module is used for acquiring an image to be detected of the label printed at the moment t;
The computing module is used for detecting images to be detected of the printed labels based on the time t-1 and the time t-2And/>Calculation ofContrast coefficient of each sub-image in (a);
the numbering module is used for pairing in order of high-to-low comparison coefficient Continuously numbering the sub-images in the table, wherein the larger the contrast coefficient is, the smaller the number is, and the number is a positive integer;
The quality inspection module is used for being based on Judging whether the printed label at the moment t meets the quality inspection requirement or not according to the sub-image in the step (a), comprising the following steps:
The first step, using k to represent the number, initializing the value of k to be 1;
Second step, obtaining Sub-image/>, numbered k;
Third step, willAnd/>Corresponding judgment area/>Comparing, judging/>And (3) withIf the similarity is greater than a preset similarity threshold, entering a fourth step, otherwise, indicating that the printed label at the moment t does not meet the quality inspection requirement;
fourth, adding 1 to the value of k, judging whether k is larger than or not If yes, the total number of the sub-images in the image is represented that the printed label at the moment t meets the quality inspection requirement, and if not, the second step is entered.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410361581.5A CN117975168B (en) | 2024-03-28 | 2024-03-28 | Method and system for detecting quality of printed label |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410361581.5A CN117975168B (en) | 2024-03-28 | 2024-03-28 | Method and system for detecting quality of printed label |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117975168A true CN117975168A (en) | 2024-05-03 |
CN117975168B CN117975168B (en) | 2024-05-31 |
Family
ID=90851773
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410361581.5A Active CN117975168B (en) | 2024-03-28 | 2024-03-28 | Method and system for detecting quality of printed label |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117975168B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113537301A (en) * | 2021-06-23 | 2021-10-22 | 天津中科智能识别产业技术研究院有限公司 | Defect detection method based on template self-adaptive matching of bottle body labels |
US20230090743A1 (en) * | 2020-03-26 | 2023-03-23 | Another Brain | Anomaly detection based on an autoencoder and clustering |
CN116109577A (en) * | 2022-12-27 | 2023-05-12 | 无锡群欢包装材料有限公司 | Printing label defect detection system and method |
US20230281967A1 (en) * | 2020-07-27 | 2023-09-07 | Nec Corporation | Information processing device, information processing method, and recording medium |
-
2024
- 2024-03-28 CN CN202410361581.5A patent/CN117975168B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20230090743A1 (en) * | 2020-03-26 | 2023-03-23 | Another Brain | Anomaly detection based on an autoencoder and clustering |
US20230281967A1 (en) * | 2020-07-27 | 2023-09-07 | Nec Corporation | Information processing device, information processing method, and recording medium |
CN113537301A (en) * | 2021-06-23 | 2021-10-22 | 天津中科智能识别产业技术研究院有限公司 | Defect detection method based on template self-adaptive matching of bottle body labels |
CN116109577A (en) * | 2022-12-27 | 2023-05-12 | 无锡群欢包装材料有限公司 | Printing label defect detection system and method |
Also Published As
Publication number | Publication date |
---|---|
CN117975168B (en) | 2024-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107194317B (en) | Violent behavior detection method based on grid clustering analysis | |
CN116559183B (en) | Method and system for improving defect judging efficiency | |
CN111680690B (en) | Character recognition method and device | |
CN109711268B (en) | Face image screening method and device | |
CN109460754A (en) | A kind of water surface foreign matter detecting method, device, equipment and storage medium | |
CN110543848B (en) | Driver action recognition method and device based on three-dimensional convolutional neural network | |
CN113095445B (en) | Target identification method and device | |
CN116152261B (en) | Visual inspection system for quality of printed product | |
CN116228780A (en) | Silicon wafer defect detection method and system based on computer vision | |
WO2024016632A1 (en) | Bright spot location method, bright spot location apparatus, electronic device and storage medium | |
CN116012675A (en) | Model training method, image processing method and electronic equipment | |
CN114445843A (en) | Card image character recognition method and device of fixed format | |
CN113936010A (en) | Shelf positioning method and device, shelf carrying equipment and storage medium | |
JP2011165170A (en) | Object detection device and program | |
US10115028B2 (en) | Method and device for classifying an object in an image | |
CN113822927B (en) | Face detection method, device, medium and equipment suitable for weak quality image | |
CN115512381A (en) | Text recognition method, text recognition device, text recognition equipment, storage medium and working machine | |
CN117975168B (en) | Method and system for detecting quality of printed label | |
CN112396016B (en) | Face recognition system based on big data technology | |
CN111089586B (en) | All-day star sensor star point extraction method based on multi-frame accumulation algorithm | |
CN112364856A (en) | Method and device for identifying copied image, computer equipment and storage medium | |
CN114550069B (en) | Piglet nipple counting method based on deep learning | |
CN113420579B (en) | Training and positioning method and device for identification code position positioning model and electronic equipment | |
CN113591548B (en) | Target ring identification method and system | |
CN114148103B (en) | Solder paste printing mark recognition method and system based on neural network learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |