A method and system for online detection of printed product quality
By setting the multi-level scanning frame size and method, multi-level inspection of printed materials is solved, and the problems of inaccurate detection and unclear defect classification in the prior art are achieved, and high-precision and clear classification of print quality inspection is achieved.
Patent Information
- Application Number
- CN202411234460.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-09-04
AI Technical Summary
In the prior art, there is no multi-level inspection of finished products, which lacks the accuracy of inspection, which easily causes detection errors, does not divide defects, and lacks clarity in classification.
By setting different scanning frame sizes and multi-level scanning methods, the samples to be tested and the standard samples are divided and numbered, the first sequence number scan and the second sequence number scan are performed, the image feature quantity is extracted, the similarity is calculated, and the grayscale value statistics and defect type classification are performed.
It realizes accurate detection of subtle defects of printed materials, provides a detection level from coarse to fine, improves the accuracy of detection and classification clarity, reduces manual intervention, and improves the consistency and reliability of detection results.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image detection, and in particular to an online detection method and system for printed product quality. Background Art
[0002] In recent years, printed product quality inspection technology has developed rapidly, using high-resolution cameras and image processing algorithms to achieve automated quality inspection, reduce manual intervention, and integrate advanced machine vision technologies such as deep learning and pattern recognition to improve the detection accuracy of printing defects, making quality inspection more efficient and accurate.
[0003] At present, a Chinese invention patent with publication number CN 117571661 A discloses a method and system for detecting the quality of ink printed products. The method obtains the ink printed product status value by processing the fineness factor of fineness data, the gloss factor of gloss data and the incomplete factor of integrity data, thereby completing the identification of the ink printed product status. However, the related technology does not perform multi-level detection on the finished product, lacks detection accuracy, is prone to detection errors, does not divide defects, and lacks classification clarity. Summary of the invention
[0004] The technical problem solved by the present invention is that: in the related art, there is no multi-level inspection of finished products, which lacks the accuracy of inspection and is prone to cause inspection errors, and there is no classification of defects, which lacks the clarity of classification.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: In the first aspect, a method for online detection of printed product quality comprises the following steps:
[0006] Step S1, setting a first scanning frame size, dividing the sample to be tested and the standard sample into a first sub-region and a second sub-region respectively according to the first scanning frame size, assigning a first number to the first sub-region, assigning a second number to the second sub-region, performing a first serial number scan on the sub-region after the first serial number to obtain a first scanned image, and performing a first serial number scan on the sub-region after the second serial number to obtain a second scanned image;
[0007] Step S2, preprocessing the first scanned image and the second scanned image respectively to obtain a first image and a second image, extracting feature quantities of the first image and the second image respectively to obtain a first feature quantity and a second feature quantity, calculating the similarity between the first feature quantity and the second feature quantity, and performing a second sequence number scanning on the first image and the second image when the similarity is less than a first value;
[0008] Step S3, setting the second scanning frame size, performing a second serial number scan on the first image to obtain a third image, performing a second serial number scan on a corresponding portion of the second image to obtain a fourth image, respectively counting the number of pixels with a second grayscale value in the third image and the fourth image, and performing a first classification of defect types according to the number of pixels with a second grayscale value in the third image and the fourth image;
[0009] Step S4, obtaining the distribution position of pixels having a gray value of a second value, performing a second division on the defect type according to the position and the defect type to obtain a second division type, and displaying the second division type.
[0010] As a preferred solution of the method for online detection of printed product quality described in the present invention, step S1 includes the following sub-steps:
[0011] Step S11, setting the first scanning frame size;
[0012] Step S12, dividing the sample to be tested and the standard sample into a first sub-area and a second sub-area respectively according to the size of the first scanning frame, assigning a first number to the first sub-area and assigning a second number to the second sub-area, wherein the first number is a natural number and the second number is a combination of the first number and a natural number;
[0013] Step S13, performing a first serial number scan on the sub-area after the first number to obtain a first scanned image, performing a first serial number scan on the sub-area after the second number to obtain a second scanned pattern, the first number and the second number are scanned corresponding to each other, and the corresponding scanning means first scanning the image corresponding to the first number, and then scanning the image corresponding to the second number containing the first number.
[0014] As a preferred solution of the method for online detection of printed product quality described in the present invention, the setting logic of the first scanning frame size includes:
[0015] Obtain the total length, single-line spacing and single-line length of the sample to be tested, perform weighted calculation on the single-line length and the single-line spacing to obtain a third value, calculate the ratio of the total length to the third value to obtain the single-line proportion, and set the single-line proportion as the side length of the first scanning frame, which is a square.
[0016] As a preferred solution of the method for online detection of printed product quality described in the present invention, step S2 includes the following sub-steps:
[0017] Step S21, preprocessing the first scanned image and the second scanned image respectively to obtain a first image and a second image, wherein the preprocessing includes grayscale processing and standardization processing, and the grayscale processing converts the first scanned image and the second scanned image into a first grayscale image and a second grayscale image;
[0018] Step S22, extracting feature quantities of the first image and the second image respectively, wherein the feature quantities are color block distribution features, obtaining a first feature quantity and a second feature quantity, and calculating the similarity between the first feature quantity and the second feature quantity by using a cosine similarity formula;
[0019] Step S23, setting the first value as a similarity threshold, and when the similarity is less than the first value, performing a second sequence number scan on the first image and the second image.
[0020] As a preferred solution of the method for online detection of printed product quality described in the present invention, step S3 includes the following sub-steps:
[0021] Step S31, setting the second scanning frame size, the setting logic of the second scanning frame size includes:
[0022] Obtain a third value, and set the third value as the side length of the second scanning frame;
[0023] Step S32, performing a second serial number scan on the first image to obtain a third image, performing a second serial number scan on a corresponding portion of the second image to obtain a fourth image, obtaining grayscale values of pixels in the third image and grayscale values of pixels in the fourth image, and selecting pixels whose grayscale values in the third image are the second value and pixels whose grayscale values in the fourth image are the second value;
[0024] Step S33, respectively counting the number of pixels whose grayscale values in the third image are the second value, and the number of pixels whose grayscale values in the fourth image are the second value, recorded as the first number and the second number, and performing a first division of the defect types according to the first number and the second number to obtain a first division type, wherein the first division type includes point defects, line defects and surface defects.
[0025] As a preferred solution of the method for online detection of printed product quality described in the present invention, the division logic of the first division type includes:
[0026] Obtain a first number and a second number, perform a difference calculation on the first number and the second number to obtain a first difference value, set the fourth value as an upper limit of the first difference value, set the fifth value as a lower limit of the first difference value, and compare the first difference with the fourth value and the fifth value respectively;
[0027] When the first difference is greater than or equal to the fourth value, the first division type is set to a surface defect; when the first difference is less than the fourth value and greater than or equal to the fifth value, the first division type is set to a linear defect; when the first difference is less than the fifth value, the first division type is set to a point defect.
[0028] As a preferred solution of the method for online detection of printed product quality described in the present invention, step S4 includes the following sub-steps:
[0029] Step S41, establishing a plane coordinate system with the lower left corner of the first image as the origin, the length of the first image as the horizontal coordinate, and the width of the first image as the vertical coordinate, wherein the unit length of the plane coordinate system is the length of a single pixel of the first image;
[0030] Step S42, obtaining the first coordinate of the pixel whose gray value is the second value, drawing the edge curve adjacent to the first coordinate, obtaining the edge curve position and the edge curve quantity, performing a second division on the defect type to obtain a second division type, and displaying the second division type, wherein the second division type includes stain, missing print, excess ink, missing pattern, dirty plate, and blur;
[0031] The second classification types corresponding to point defects include stains and missing prints, the second classification types corresponding to line defects include excess ink and missing patterns, and the second classification types corresponding to surface defects include dirty plates and blurs.
[0032] After the first classification type is completed, the defect database is called, the first classification type is input into the defect database, the corresponding defect picture is obtained, the third feature value of the defect picture corresponding to the first classification type is extracted, the third feature value is the position feature and the quantity feature, the fourth feature value of the first image is extracted, the similarity between the third feature value and the fourth feature value is calculated by the cosine similarity formula, the defect picture corresponding to the similarity with the largest value is selected, and the defect name corresponding to the defect picture is set to the second classification type.
[0033] In a second aspect, a printed product quality online detection system includes a first scanning module, a second scanning module, a calculation module, and a classification module;
[0034] The first scanning module sets a first scanning frame size, divides the sample to be tested and the standard sample into a first sub-region and a second sub-region according to the first scanning frame size, assigns a first number to the first sub-region, assigns a second number to the second sub-region, performs a first serial number scanning on the sub-region after the first number to obtain a first scanning image, and performs a first serial number scanning on the sub-region after the second number to obtain a second scanning pattern;
[0035] The calculation module preprocesses the first scanned image and the second scanned image respectively to obtain a first image and a second image, extracts feature quantities of the first image and the second image respectively to obtain a first feature quantity and a second feature quantity, calculates the similarity between the first feature quantity and the second feature quantity, and performs a second sequence number scan on the first image and the second image when the similarity is less than a first value;
[0036] The second scanning module is set to a second scanning frame size, performs a second serial number scan on the first image to obtain a third image, performs a second serial number scan on a corresponding portion of the second image to obtain a fourth image, and counts the number of pixels whose grayscale value is the second value in the third image and the fourth image respectively;
[0037] The classification module performs a first division of defect types according to the number of pixels with grayscale values of the second value in the third image and the fourth image, obtains the distribution position of pixels with grayscale values of the second value, performs a second division of defect types according to the position and defect type, obtains a second division type, and displays the second division type.
[0038] In a third aspect, the present invention provides an electronic device comprising a memory, a processor and storage in the memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the system as described in any one of the above items are executed.
[0039] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps in the system described in any one of the above items are executed.
[0040] The beneficial effects of the present invention are as follows: by setting different scanning frame sizes and multi-level scanning methods, subtle defects of printed products can be accurately detected; the combination of the first serial number scanning and the second serial number scanning provides a detection hierarchy from coarse to fine, thereby increasing the accuracy of detection; the samples to be tested and the standard samples are divided into different sub-areas, which are individually numbered and scanned, thereby facilitating a comprehensive detection of all parts of the printed product and avoiding missing potential defects; through automated image acquisition and processing steps, real-time monitoring and detection are achieved, production efficiency is improved, and manual intervention is reduced; defect types are intelligently classified according to the grayscale value and defect distribution in the image; standardized scanning and processing procedures are used to reduce human errors and improve the consistency and reliability of detection results; and by making a one-to-one correspondence between the sub-areas of the image to be tested and the sub-areas of the standard image for comparison, the type classification is made more detailed and accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A basic flow chart of a method for online detection of printed product quality provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, but not all of the embodiments.
[0043] Example 1, reference Figure 1 , as an embodiment of the present invention, provides a method for online detection of printed product quality, comprising the following steps:
[0044] Step S1, setting a first scanning frame size, dividing the sample to be tested and the standard sample into a first sub-region and a second sub-region respectively according to the first scanning frame size, assigning a first number to the first sub-region, assigning a second number to the second sub-region, performing a first serial number scan on the sub-region after the first serial number to obtain a first scanned image, and performing a first serial number scan on the sub-region after the second serial number to obtain a second scanned image;
[0045] Step S2, preprocessing the first scanned image and the second scanned image respectively to obtain a first image and a second image, extracting feature quantities of the first image and the second image respectively to obtain a first feature quantity and a second feature quantity, calculating the similarity between the first feature quantity and the second feature quantity, and performing a second sequence number scanning on the first image and the second image when the similarity is less than a first value;
[0046] Step S3, setting the second scanning frame size, performing a second serial number scan on the first image to obtain a third image, performing a second serial number scan on a corresponding portion of the second image to obtain a fourth image, respectively counting the number of pixels with a second grayscale value in the third image and the fourth image, and performing a first classification of defect types according to the number of pixels with a second grayscale value in the third image and the fourth image;
[0047] Step S4, obtaining the distribution position of pixels having a gray value of a second value, performing a second division on the defect type according to the position and the defect type to obtain a second division type, and displaying the second division type.
[0048] The present invention accurately detects subtle defects of printed products by setting different scanning frame sizes and multi-level scanning methods. The combination of the first serial number scanning and the second serial number scanning provides a detection hierarchy from coarse to fine, increases the accuracy of detection, divides the sample to be tested and the standard sample into different sub-areas, and individually numbers and scans them, which helps to comprehensively detect all parts of the printed product and avoid missing potential defects. Through automated image acquisition and processing steps, real-time monitoring and detection are achieved, production efficiency is improved, and human intervention is reduced. Defect types are intelligently classified according to the grayscale value and defect distribution in the image. Standardized scanning and processing procedures are used to reduce human errors and improve the consistency and reliability of detection results. The sub-areas of the image to be tested are matched one by one with the sub-areas of the standard image for comparison, so that the type classification is more detailed and accurate.
[0049] The step S1 includes the following sub-steps:
[0050] Step S11, setting the first scanning frame size;
[0051] Step S12, dividing the sample to be tested and the standard sample into a first sub-area and a second sub-area respectively according to the size of the first scanning frame, assigning a first number to the first sub-area and assigning a second number to the second sub-area, wherein the first number is a natural number and the second number is a combination of the first number and a natural number;
[0052] Step S13, performing a first serial number scan on the sub-area after the first number to obtain a first scanned image, performing a first serial number scan on the sub-area after the second number to obtain a second scanned pattern, the first number and the second number are scanned corresponding to each other, and the corresponding scanning means first scanning the image corresponding to the first number, and then scanning the image corresponding to the second number containing the first number.
[0053] The setting logic of the first scanning frame size includes:
[0054] Obtain the total length, single-line spacing and single-line length of the sample to be tested, perform weighted calculation on the single-line length and the single-line spacing to obtain a third value, calculate the ratio of the total length to the third value to obtain the single-line proportion, and set the single-line proportion as the side length of the first scanning frame, which is a square.
[0055] In specific implementation, the samples to be tested and the standard samples are divided into different sub-areas, which are numbered and scanned separately, which helps to comprehensively detect all parts of the printed products and avoid missing potential defects.
[0056] The step S2 includes the following sub-steps:
[0057] Step S21, preprocessing the first scanned image and the second scanned image respectively to obtain a first image and a second image, wherein the preprocessing includes grayscale processing and standardization processing, and the grayscale processing converts the first scanned image and the second scanned image into a first grayscale image and a second grayscale image;
[0058] Step S22, extracting feature quantities of the first image and the second image respectively, wherein the feature quantities are color block distribution features, obtaining a first feature quantity and a second feature quantity, and calculating the similarity between the first feature quantity and the second feature quantity by using a cosine similarity formula;
[0059] Step S23, setting the first value as a similarity threshold, and when the similarity is less than the first value, performing a second sequence number scan on the first image and the second image.
[0060] In specific implementation, through automated image acquisition and processing steps, real-time monitoring and detection are achieved, production efficiency is improved, manual intervention is reduced, labor costs are saved, and economic benefits are improved.
[0061] The step S3 includes the following sub-steps:
[0062] Step S31, setting the second scanning frame size, the setting logic of the second scanning frame size includes:
[0063] Obtain a third value, and set the third value as the side length of the second scanning frame;
[0064] Step S32, performing a second serial number scan on the first image to obtain a third image, performing a second serial number scan on a corresponding portion of the second image to obtain a fourth image, obtaining grayscale values of pixels in the third image and grayscale values of pixels in the fourth image, and selecting pixels whose grayscale values in the third image are the second value and pixels whose grayscale values in the fourth image are the second value;
[0065] Step S33, respectively counting the number of pixels whose grayscale values in the third image are the second value, and the number of pixels whose grayscale values in the fourth image are the second value, recorded as the first number and the second number, and performing a first division of the defect types according to the first number and the second number to obtain a first division type, wherein the first division type includes point defects, line defects and surface defects.
[0066] The partitioning logic of the first partitioning type includes:
[0067] Obtain a first number and a second number, perform a difference calculation on the first number and the second number to obtain a first difference value, set the fourth value as an upper limit of the first difference value, set the fifth value as a lower limit of the first difference value, and compare the first difference with the fourth value and the fifth value respectively;
[0068] When the first difference is greater than or equal to the fourth value, the first division type is set to a surface defect; when the first difference is less than the fourth value and greater than or equal to the fifth value, the first division type is set to a linear defect; when the first difference is less than the fifth value, the first division type is set to a point defect.
[0069] In the specific implementation, the defect type is intelligently classified according to the grayscale value and defect distribution in the image, and a standardized scanning and processing process is used to reduce human errors and improve the consistency and reliability of the inspection results.
[0070] The step S4 includes the following sub-steps:
[0071] Step S41, establishing a plane coordinate system with the lower left corner of the first image as the origin, the length of the first image as the horizontal coordinate, and the width of the first image as the vertical coordinate, wherein the unit length of the plane coordinate system is the length of a single pixel of the first image;
[0072] Step S42, obtaining the first coordinate of the pixel whose gray value is the second value, drawing the edge curve adjacent to the first coordinate, obtaining the edge curve position and the edge curve quantity, performing a second division on the defect type to obtain a second division type, and displaying the second division type, wherein the second division type includes stain, missing print, excess ink, missing pattern, dirty plate, and blur;
[0073] The second classification types corresponding to point defects include stains and missing prints, the second classification types corresponding to line defects include excess ink and missing patterns, and the second classification types corresponding to surface defects include dirty plates and blurs.
[0074] After the first classification type is completed, the defect database is called, the first classification type is input into the defect database, the corresponding defect picture is obtained, the third feature value of the defect picture corresponding to the first classification type is extracted, the third feature value is the position feature and the quantity feature, the fourth feature value of the first image is extracted, the similarity between the third feature value and the fourth feature value is calculated by the cosine similarity formula, the defect picture corresponding to the similarity with the largest value is selected, and the defect name corresponding to the defect picture is set to the second classification type.
[0075] In the specific implementation, by setting different scanning frame sizes and multi-level scanning methods, subtle defects in printed products can be accurately detected, which improves the accuracy of the system, effectively reduces detection errors caused by one-time detection, and enhances the hierarchy of detection.
[0076] The present invention accurately detects subtle defects of printed products by setting different scanning frame sizes and multi-level scanning methods. The combination of the first serial number scanning and the second serial number scanning provides a detection hierarchy from coarse to fine, increases the accuracy of detection, divides the sample to be tested and the standard sample into different sub-areas, and individually numbers and scans them, which helps to comprehensively detect all parts of the printed product and avoid missing potential defects. Through automated image acquisition and processing steps, real-time monitoring and detection are achieved, production efficiency is improved, and human intervention is reduced. Defect types are intelligently classified according to the grayscale value and defect distribution in the image. Standardized scanning and processing procedures are used to reduce human errors and improve the consistency and reliability of detection results. The sub-areas of the image to be tested are matched one by one with the sub-areas of the standard image for comparison, so that the type classification is more detailed and accurate.
[0077] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes. Wherein, the storage medium is implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or optical disk. These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0078] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions of the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for online detection of printed product quality, characterized in that: The following steps are involved: Step S1, setting a first scanning frame size, dividing the sample to be tested and the standard sample into a first sub-region and a second sub-region respectively according to the first scanning frame size, assigning a first number to the first sub-region, assigning a second number to the second sub-region, performing a first serial number scan on the sub-region after the first serial number to obtain a first scanned image, and performing a first serial number scan on the sub-region after the second serial number to obtain a second scanned image; Step S2, preprocessing the first scanned image and the second scanned image respectively to obtain a first image and a second image, extracting feature quantities of the first image and the second image respectively to obtain a first feature quantity and a second feature quantity, calculating the similarity between the first feature quantity and the second feature quantity, and performing a second sequence number scanning on the first image and the second image when the similarity is less than a first value; Step S3, setting the second scanning frame size, performing a second serial number scan on the first image to obtain a third image, performing a second serial number scan on a corresponding portion of the second image to obtain a fourth image, respectively counting the number of pixels with a second grayscale value in the third image and the fourth image, and performing a first classification of defect types according to the number of pixels with a second grayscale value in the third image and the fourth image; Step S4, obtaining the distribution position of pixels having a gray value of a second value, performing a second division on the defect type according to the position and the defect type to obtain a second division type, and displaying the second division type.
2. The method for online detection of printed matter quality according to claim 1, characterized in that: The step S1 includes the following sub-steps: Step S11, setting the first scanning frame size; Step S12, dividing the sample to be tested and the standard sample into a first sub-area and a second sub-area respectively according to the size of the first scanning frame, assigning a first number to the first sub-area and assigning a second number to the second sub-area, wherein the first number is a natural number and the second number is a combination of the first number and a natural number; Step S13, performing a first serial number scan on the sub-area after the first number to obtain a first scanned image, performing a first serial number scan on the sub-area after the second number to obtain a second scanned pattern, the first number and the second number are scanned corresponding to each other, and the corresponding scanning means first scanning the image corresponding to the first number, and then scanning the image corresponding to the second number containing the first number.
3. A method for online detection of printed matter quality as claimed in claim 2, characterized in that: The setting logic of the first scanning frame size includes: Obtain the total length, single-line spacing and single-line length of the sample to be tested, perform weighted calculation on the single-line length and the single-line spacing to obtain a third value, calculate the ratio of the total length to the third value to obtain the single-line proportion, and set the single-line proportion as the side length of the first scanning frame, which is a square.
4. The method for online detection of printed product quality according to claim 1, characterized in that: The step S2 includes the following sub-steps: Step S21, preprocessing the first scanned image and the second scanned image respectively to obtain a first image and a second image, wherein the preprocessing includes grayscale processing and standardization processing, and the grayscale processing converts the first scanned image and the second scanned image into a first grayscale image and a second grayscale image; Step S22, extracting feature quantities of the first image and the second image respectively, wherein the feature quantities are color block distribution features, obtaining a first feature quantity and a second feature quantity, and calculating the similarity between the first feature quantity and the second feature quantity by using a cosine similarity formula; Step S23, setting the first value as a similarity threshold, and when the similarity is less than the first value, performing a second sequence number scan on the first image and the second image.
5. The method for online detection of printed matter quality according to claim 1, characterized in that: The step S3 includes the following sub-steps: Step S31, setting the second scanning frame size, the setting logic of the second scanning frame size includes: Obtain a third value, and set the third value as the side length of the second scanning frame; Step S32, performing a second serial number scan on the first image to obtain a third image, performing a second serial number scan on a corresponding portion of the second image to obtain a fourth image, obtaining grayscale values of pixels in the third image and grayscale values of pixels in the fourth image, and selecting pixels whose grayscale values in the third image are the second value and pixels whose grayscale values in the fourth image are the second value; Step S33, respectively counting the number of pixels whose grayscale values in the third image are the second value, and the number of pixels whose grayscale values in the fourth image are the second value, recorded as the first number and the second number, and performing a first division of the defect types according to the first number and the second number to obtain a first division type, wherein the first division type includes point defects, line defects and surface defects.
6. A method for online detection of printed matter quality as claimed in claim 5, characterized in that: The partitioning logic of the first partitioning type includes: Obtain a first number and a second number, perform a difference calculation on the first number and the second number to obtain a first difference value, set the fourth value as an upper limit of the first difference value, set the fifth value as a lower limit of the first difference value, and compare the first difference with the fourth value and the fifth value respectively; When the first difference is greater than or equal to the fourth value, the first division type is set to a surface defect; when the first difference is less than the fourth value and greater than or equal to the fifth value, the first division type is set to a linear defect; when the first difference is less than the fifth value, the first division type is set to a point defect.
7. The method for online detection of printed matter quality according to claim 1, characterized in that: The step S4 includes the following sub-steps: Step S41, establishing a plane coordinate system with the lower left corner of the first image as the origin, the length of the first image as the horizontal coordinate, and the width of the first image as the vertical coordinate, wherein the unit length of the plane coordinate system is the length of a single pixel of the first image; Step S42, obtaining the first coordinate of the pixel whose gray value is the second value, drawing the edge curve adjacent to the first coordinate, obtaining the edge curve position and the edge curve quantity, performing a second division on the defect type to obtain a second division type, and displaying the second division type, wherein the second division type includes stain, missing print, excess ink, missing pattern, dirty plate, and blur; The second classification types corresponding to point defects include stains and missing prints, the second classification types corresponding to line defects include excess ink and missing patterns, and the second classification types corresponding to surface defects include dirty plates and blurs. After the first classification type is completed, the defect database is called, the first classification type is input into the defect database, the corresponding defect picture is obtained, the third feature value of the defect picture corresponding to the first classification type is extracted, the third feature value is the position feature and the quantity feature, the fourth feature value of the first image is extracted, the similarity between the third feature value and the fourth feature value is calculated by the cosine similarity formula, the defect picture corresponding to the similarity with the largest value is selected, and the defect name corresponding to the defect picture is set to the second classification type.
8. A printed product quality online detection system, characterized in that: It includes a first scanning module, a second scanning module, a calculation module and a classification module; The first scanning module sets a first scanning frame size, divides the sample to be tested and the standard sample into a first sub-region and a second sub-region according to the first scanning frame size, assigns a first number to the first sub-region, assigns a second number to the second sub-region, performs a first serial number scanning on the sub-region after the first number to obtain a first scanning image, and performs a first serial number scanning on the sub-region after the second number to obtain a second scanning pattern; The calculation module preprocesses the first scanned image and the second scanned image respectively to obtain a first image and a second image, extracts feature quantities of the first image and the second image respectively to obtain a first feature quantity and a second feature quantity, calculates the similarity between the first feature quantity and the second feature quantity, and performs a second sequence number scan on the first image and the second image when the similarity is less than a first value; The second scanning module is set to a second scanning frame size, performs a second serial number scan on the first image to obtain a third image, performs a second serial number scan on a corresponding portion of the second image to obtain a fourth image, and counts the number of pixels whose grayscale value is the second value in the third image and the fourth image respectively; The classification module performs a first division of defect types according to the number of pixels with grayscale values of the second value in the third image and the fourth image, obtains the distribution position of pixels with grayscale values of the second value, performs a second division of defect types according to the position and defect type, obtains a second division type, and displays the second division type.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for online detection of printed product quality according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for online detection of printed product quality according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for detecting quality of printing ink presswork
CN117571661A
Neural network-based printed matter appearance defect detection process
CN116482113A
Method and system for detecting printing quality of printed matter
CN118212224A
Cited By
A method and system for detecting map print quality
CN120580237B