Calibration method, system, equipment and storage medium for barcode printing quality tester

By calibrating the exposure and distortion abnormalities of the barcode printing quality detector, the problem of difficulty in ensuring scanning quality is solved, the detector can be accurately identified and corrected, and the reliability of the detection results is improved.

CN118470137BActive Publication Date: 2024-10-29GUANGZHOU XINYIDA ELECTRONICS TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410911295.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-29
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

It is difficult to guarantee the shooting quality of the barcode printing quality detector, which affects the detection results. In particular, the abnormal exposure and distortion of the scan head are difficult to identify and calibrate.

Method used

Provides a calibration method for barcode printing quality detectors. Through necessary feature extraction, abnormality determination and calibration of the scanned barcode, it can identify and correct exposure anomalies and distortion anomalies, including exposure anomaly calibration and distortion anomaly calibration, using the coincidence coefficient and calibration Coefficients perform image processing and interpolation.

Benefits of technology

It achieves accurate identification and calibration of exposure abnormalities and distortion abnormalities of the quality detector, improves the quality of shooting and scanning, and ensures the accuracy and reliability of printing quality detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470137B_ABST
    Figure CN118470137B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of quality inspection, and specifically to a calibration method, system, device and storage medium for a barcode printing quality inspection instrument. The method includes: the barcode printing quality inspection instrument photographs and scans a barcode that is intact and has no abnormalities, and performs necessary feature extraction, abnormality determination and calibration; the necessary feature extraction, abnormality determination and calibration include: S1: extracting necessary features of the black bar area and blank area of ​​the inspection barcode after the inspection instrument has scanned; S2: retrieving different types of standard barcodes and comparing them with the necessary features of the inspection barcode, and when only basic distinguishing features appear, the calibration is terminated, and when abnormal distinguishing features appear, S3 is continued to be executed; S3: judging whether the type of abnormal distinguishing features is exposure abnormality or barcode distortion abnormality; S4: performing exposure abnormality calibration when it is judged to be exposure abnormality, and performing distortion abnormality calibration when it is judged to be distortion abnormality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quality inspection, and in particular to a calibration method, system, equipment and storage medium of a barcode printing quality inspection instrument. Background Art

[0002] Whether a barcode can be accurately identified depends largely on the barcode printing quality. Factors that affect the barcode printing quality include printing pressure, ink dosage, ink viscosity, temperature and other parameters. In the barcode printing process, if these parameters are not well controlled, it is easy to cause certain defects in the printed barcode, such as the barcode color is lighter, the barcode is rubbed dirty, etc., which brings inconvenience to the user. To determine the quality of the barcode, a barcode printing quality detector is generally used to shoot and transmit it to the computer for identification. The quality of identification is also related to the shooting quality of the barcode detector's scanning head. When the scanning head fails, the exposure and distortion of the photographed barcode are large, which is likely to affect the inspection of the printing quality.

[0003] Based on the above problems, there is an urgent need for a calibration device for the barcode printing quality inspection instrument, which can calibrate the scanning head before quality inspection to ensure the shooting and scanning quality. Summary of the invention

[0004] In view of the fact that the shooting quality of the current barcode printing quality detector is difficult to ensure, thus affecting the detection, the present invention provides a calibration method, system, equipment and storage medium for the barcode printing quality detector to solve the above problem.

[0005] To achieve the above object, the present invention is implemented through the following technical solutions:

[0006] The present application embodiment discloses a calibration method for a barcode printing quality detector, comprising:

[0007] The barcode printing quality detector takes pictures and scans the intact barcodes without any abnormalities, and performs necessary feature extraction, abnormality determination and calibration;

[0008] The necessary feature extraction, anomaly determination and calibration include:

[0009] S1: extracting necessary features of the black bar area and blank area of ​​the detection barcode scanned by the detector;

[0010] S2: Retrieve different types of standard barcodes and compare them with the necessary features of the test barcode. If only basic distinguishing features appear, the calibration ends. If abnormal distinguishing features appear, continue to execute S3.

[0011] S3: Determine whether the type of the abnormal distinguishing feature is an exposure abnormality or a barcode distortion abnormality;

[0012] S4: When it is determined that the exposure is abnormal, exposure abnormality calibration is performed; when it is determined that the distortion is abnormal, distortion abnormality calibration is performed.

[0013] The above technical solution is adopted: the above solution provides a calibration method for a barcode printing quality detector, which can identify the exposure anomaly and distortion anomaly of the camera module of the quality detector and perform corresponding calibration.

[0014] Preferably, the exposure abnormality calibration includes:

[0015] Extract the abnormal part of the image and place the abnormal image in the set coordinate system xy. Within the image range, draw a circle with a standard value outward from a coordinate point (x, y) as a region, and encode each region to determine the number n of image blocks that need to be calibrated. Obtain the normal image blocks that overlap with the circle of the image block to be calibrated, and obtain the image block with the highest overlap coefficient, and piece together the normal image blocks with the abnormal image blocks.

[0016] Further preferably, the calculation formula of the overlap coefficient is:

[0017] ;

[0018] ;

[0019] ;

[0020] ;

[0021] Where C(S) represents the overlap coefficient, l(x, y) is the pixel brightness at position (x, y) in the image to be processed; Represents the brightness difference between adjacent pixels in the horizontal direction at position (x, y); represents the brightness difference between adjacent pixels in the vertical direction at the position (x, y); Q(w) represents the normalized linear mapping function; represents the maximum brightness value; S is the circular image area where the coordinate point (x, y) is located; the coordinates of the upper left corner pixel of the circular image area are ; w is the parameter of the normalized linear mapping function, w represents the horizontal brightness difference at position [x, y] and vertical brightness difference The larger one among them; n and m represent the pixel position index values ​​in the x-axis direction and the y-axis direction respectively.

[0022] Adopting the above technical solution: The above technical solution can detect the exposure anomaly of the quality detector by adopting the corresponding algorithm.

[0023] Further preferably, the distortion anomaly calibration includes:

[0024] S41: extracting an abnormal part of the image, and extracting a sub-pixel sequence of the abnormal part of the image;

[0025] S42: Calculate the edge widths of all sub-pixel sequences, obtain the minimum edge width and use it as the standard unit width;

[0026] S43: Using the standard unit width as the spacing between coordinate points, establishing a coordinate system, using the first edge width as the reference point x, and setting a total of n*x spacing units according to the distance of the abnormal image;

[0027] S44: Calculate the proportional relationship between the position coordinates of the sub-pixel sequence and the original position coordinates, and obtain the proportional coefficient as the calibration coefficient;

[0028] S45: by setting the calibration coefficients and standard unit widths of the pixels at the sub-pixel edges, the distortion values ​​of the pixels between the adjacent sub-pixel edges are interpolated accordingly;

[0029] S46: Obtain the distortion relationship between the position coordinates of all pixels of the abnormal part image after dedistortion and the original position coordinates; store the calibration coefficients of all pixels of the quality detector, and use the calibration coefficients to dedistort and calibrate each pixel when the online scanning camera is used to capture images.

[0030] Adopting the above technical solution: the above solution can realize the calibration of distortion anomaly through the calculation of distortion relationship.

[0031] Further preferably, a calibration system of a barcode printing quality detector is applied to the calibration method as described in any one of the above, characterized in that it comprises:

[0032] Barcode image extraction unit: used to extract the black bar area and blank area of ​​the barcode after the scanning head scans;

[0033] Data storage unit: Different types of barcode data are stored in the data storage module;

[0034] Central processing unit: The central processing unit is used to retrieve the barcode data from the data storage unit and compare it with the data extracted by the barcode image extraction unit, and determine the abnormal type;

[0035] Calibration unit: used to calibrate the barcode image extraction unit according to the abnormal type identified by the central processing unit;

[0036] The abnormality types include exposure abnormality and distortion abnormality.

[0037] Adopt the above technical solution: In the above solution, each module can obtain the corresponding abnormal problem of the scanner according to the extraction of barcode data.

[0038] Further preferably, the calibration unit includes:

[0039] Exposure calibration module: The exposure calibration module is used to calibrate the exposure anomaly of the barcode;

[0040] Barcode distortion calibration module: The image distortion calibration module is used to calibrate the barcode distortion.

[0041] Further preferably, it is characterized in that the central processing unit comprises:

[0042] Basic distinguishing feature recognition module: The basic distinguishing feature recognition module is used to recognize the basic distinguishing features of the image;

[0043] Exposure abnormality feature recognition module: The exposure abnormality feature recognition module is used to identify the exposure abnormality of the detector;

[0044] Distortion anomaly feature recognition module: The distortion anomaly feature recognition module is used to identify the distortion anomaly of the detector;

[0045] Adopting the above technical solution: the module adopted in the above solution can realize the identification of exposure anomaly and distortion anomaly of the detector.

[0046] Further preferably, the basic distinguishing feature is a distinguishing feature between barcodes and has nothing to do with the image acquired by the quality detector.

[0047] Further preferably, the device comprises: a processor, a memory and a program, wherein the program is stored in the memory and executed by the processor, and the program includes means for executing any one of the methods described above.

[0048] Further preferably, a storage medium stores a computer program, and the computer program is executed by a processor to perform any of the methods described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0050] Figure 1 A flow chart of the calibration method for this application;

[0051] Figure 2This is a flow chart of the barcode distortion calibration method for this application;

[0052] Figure 3 Calibration system structure diagram for this application.

[0053] In the figure:

[0054] 1. Barcode image extraction unit; 2. Data storage unit; 3. Central processing unit; 4. Calibration unit; 5. Exposure calibration module; 6. Barcode distortion calibration module; 7. Basic distinguishing feature recognition module; 8. Exposure abnormality feature recognition module; 9. Distortion abnormality feature recognition module. DETAILED DESCRIPTION

[0055] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0056] See also Figure 1-Figure 3 For example, the original calibration device is generally applied to the relevant photographic equipment to ensure the quality of the photographed photos, but the barcode quality detector also has a barcode image acquisition unit. Once the shooting quality of the barcode quality detector is not up to standard, it is easy to affect the final test result. Based on the above problem, the present application provides a calibration method for a barcode printing quality detector, which is implemented by the following technical solutions:

[0057] The present application embodiment discloses a calibration method of a barcode printing quality detector to solve the above problems, including:

[0058] The barcode printing quality detector takes pictures and scans the intact barcodes without any abnormalities, and performs necessary feature extraction, abnormality determination and calibration;

[0059] The necessary feature extraction, anomaly determination and calibration include:

[0060] S1: extracting necessary features of the black bar area and blank area of ​​the detection barcode scanned by the detector;

[0061] S2: Retrieve different types of standard barcodes and compare them with the necessary features of the test barcode. If only basic distinguishing features appear, the calibration ends. If abnormal distinguishing features appear, continue to execute S3.

[0062] S3: Determine whether the type of the abnormal distinguishing feature is an exposure abnormality or a barcode distortion abnormality;

[0063] S4: When it is determined to be an exposure abnormality, perform exposure abnormality calibration; when it is determined to be a distortion abnormality, perform distortion abnormality calibration. The above scheme provides a calibration method for a barcode printing quality detector, which can identify the exposure abnormality and distortion abnormality of the camera module of the quality detector and perform corresponding calibration.

[0064] The exposure abnormality calibration in the above embodiment includes:

[0065] Extract the abnormal part of the image and place the abnormal image in the set coordinate system xy. Within the image range, draw a circle with a standard value outward from a coordinate point (x, y) as a region, and encode each region to determine the number n of image blocks that need to be calibrated. Obtain the normal image blocks that overlap with the circle of the image block to be calibrated, and obtain the image block with the highest overlap coefficient, and piece together the normal image blocks with the abnormal image blocks.

[0066] The calculation formula of the overlap coefficient is:

[0067] ;

[0068] ;

[0069] ;

[0070] ;

[0071] Where C(S) represents the overlap coefficient, l(x, y) is the pixel brightness at position (x, y) in the image to be processed; Represents the brightness difference between adjacent pixels in the horizontal direction at position (x, y); represents the brightness difference between adjacent pixels in the vertical direction at the position (x, y); Q(w) represents the normalized linear mapping function; represents the maximum brightness value; S is the circular image area where the coordinate point (x, y) is located; the coordinates of the upper left corner pixel of the circular image area are ; w is the parameter of the normalized linear mapping function, w represents the horizontal brightness difference at position [x, y] and vertical brightness difference The larger one among them; n and m represent the pixel position index values ​​in the x-axis direction and the y-axis direction respectively.

[0072] The above technical solution can detect exposure anomalies of the quality detector by adopting corresponding algorithms.

[0073] The distortion anomaly calibration in the above embodiment includes:

[0074] S41: extracting an abnormal part of the image, and extracting a sub-pixel sequence of the abnormal part of the image;

[0075] S42: Calculate the edge widths of all sub-pixel sequences, obtain the minimum edge width and use it as the standard unit width;

[0076] S43: Using the standard unit width as the spacing between coordinate points, establishing a coordinate system, using the first edge width as the reference point x, and setting a total of n*x spacing units according to the distance of the abnormal image;

[0077] S44: Calculate the proportional relationship between the position coordinates of the sub-pixel sequence and the original position coordinates, and obtain the proportional coefficient as the calibration coefficient;

[0078] S45: by setting the calibration coefficients and standard unit widths of the pixels at the sub-pixel edges, the distortion values ​​of the pixels between the adjacent sub-pixel edges are interpolated accordingly;

[0079] S46: Obtain the distortion relationship between the position coordinates of all pixels of the abnormal part image after dedistortion and the original position coordinates; store the calibration coefficients of all pixels of the quality detector, and use the calibration coefficients to dedistort and calibrate each pixel when the online scanning camera is used to capture images.

[0080] Adopting the above technical solution: the above solution can realize the calibration of distortion anomaly through the calculation of distortion relationship.

[0081] The calibration system of the barcode printing quality detector is applied to the calibration method as described in any one of the above, and is characterized by comprising:

[0082] Barcode image extraction unit 1: used to extract the black bar area and blank area of ​​the barcode scanned by the scanning head;

[0083] Data storage unit 2: The data storage module stores different types of barcode data;

[0084] Central processing unit 3: The central processing unit 3 is used to retrieve the barcode data from the data storage unit 2 and compare it with the data extracted by the barcode image extraction unit 1, and determine the abnormal type;

[0085] Calibration unit 4: used to calibrate the barcode image extraction unit 1 according to the abnormal type determined by the central processing unit 3;

[0086] The abnormality types include exposure abnormality and distortion abnormality.

[0087] In the above scheme, each module can obtain the corresponding abnormal problem of the scanner based on the extraction of barcode data.

[0088] The calibration unit 4 comprises:

[0089] Exposure calibration module 5: Exposure calibration module 5 is used to calibrate the exposure anomaly of the barcode;

[0090] Barcode distortion calibration module 6: The image distortion calibration module is used to calibrate the barcode distortion.

[0091] Further preferably, it is characterized in that the central processing unit 3 comprises:

[0092] Basic distinguishing feature recognition module 7: The basic distinguishing feature recognition module 7 is used to recognize the basic distinguishing features of the image;

[0093] Exposure abnormality feature recognition module 8: The exposure abnormality feature recognition module 8 is used to recognize the exposure abnormality of the detector;

[0094] Distortion abnormality feature recognition module 9: The distortion abnormality feature recognition module 9 is used to recognize the distortion abnormality of the detector;

[0095] The module used in the above solution can realize the identification of exposure anomalies and distortion anomalies of the detector. The basic distinguishing features are distinguishing features between bar codes and have nothing to do with the image obtained by the quality detector.

[0096] A device comprises: a processor, a memory and a program, wherein the program is stored in the memory and executed by the processor, and the program includes instructions for executing any one of the methods described above.

[0097] A storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to execute any of the methods described above.

[0098] Unless otherwise specified, the device components involved in the above embodiments are all conventional device components, and the connection methods and control methods involved are all conventional connection methods and control methods unless otherwise specified.

[0099] The present invention has been described in detail above in conjunction with the embodiments. However, those skilled in the art will appreciate that, without departing from the spirit of the present invention, the specific parameters in the above embodiments may be changed to form a plurality of specific embodiments, which are all within the common variation range of the present invention and will not be described in detail herein.

Claims

1. Calibration method of barcode printing quality detector, It is characterized in that include: The barcode printing quality detector takes pictures and scans the intact barcodes without any abnormalities, and performs necessary feature extraction, abnormality determination and calibration; The necessary feature extraction, anomaly determination and calibration include: S1: extracting necessary features of the black bar area and blank area of ​​the detection barcode scanned by the detector; S2: Retrieve different types of standard barcodes and compare them with the necessary features of the test barcode. If only basic distinguishing features appear, the calibration ends. If abnormal distinguishing features appear, continue to execute S3. S3: Determine whether the type of the abnormal distinguishing feature is an exposure abnormality or a barcode distortion abnormality; S4: when it is judged that the exposure is abnormal, the exposure abnormality calibration is performed; when it is judged that the distortion is abnormal, the distortion abnormality calibration is performed; Extract the abnormal part of the image and place the abnormal image in the set coordinate system xy. Within the image range, draw a circle with a standard value from a coordinate point (x, y) outward as a region, and encode each region to determine the number n of image blocks that need to be calibrated. Obtain the normal image blocks that overlap with the circle of the image block to be calibrated, and obtain the image block with the highest overlap coefficient, and piece together the normal image blocks with the abnormal image blocks; ; ; ; ; Where C(S) represents the overlap coefficient, l(x, y) is the pixel brightness at position (x, y) in the image to be processed; Represents the brightness difference between adjacent pixels in the horizontal direction at position (x, y); represents the brightness difference between adjacent pixels in the vertical direction at the position (x, y); Q(w) represents the normalized linear mapping function; I max represents the maximum brightness value; S is the circular image area where the coordinate point (x, y) is located; the coordinates of the upper left corner pixel of the circular image area are [x r ,y r ]; w is the parameter of the normalized linear mapping function, w represents the horizontal brightness difference at position [x, y] and vertical brightness difference The larger one among them; n and m represent the pixel position index values ​​in the x-axis direction and the y-axis direction respectively.

2. The calibration method of the barcode printing quality detector according to claim 1, It is characterized in that Distortion anomaly calibration includes: S41: extracting the abnormal part of the image, and extracting the sub-pixel sequence of the abnormal part of the image; S42: Calculate the edge widths of all sub-pixel sequences, obtain the minimum edge width and use it as the standard unit width; S43: Use the standard unit width as the spacing between coordinate points to establish a coordinate system, use the first edge width as the reference point x, and set n in total according to the distance of the abnormal image. x spacing units; S44: Calculate the proportional relationship between the position coordinates of the sub-pixel sequence and the original position coordinates, and obtain the proportional coefficient as the calibration coefficient; S45: by setting the calibration coefficients and standard unit widths of the pixels at the sub-pixel edges, the distortion values ​​of the pixels between the adjacent sub-pixel edges are interpolated accordingly; S46: Obtain the distortion relationship between the position coordinates of all pixels of the abnormal part image after dedistortion and the original position coordinates; store the calibration coefficients of all pixels of the quality detector, and use the calibration coefficients to dedistort and calibrate each pixel when the online scanning camera is used to capture images.

3. A calibration system for a barcode printing quality detector, applied to the calibration method as claimed in any one of claims 1 to 2, It is characterized in that include: The barcode image extraction unit (1) is used to extract the black bar area and the blank area of ​​the barcode after the scanning head scans the barcode; Data storage unit (2): The data storage module stores different types of barcode data; Central processing unit (3): The central processing unit (3) is used to retrieve the barcode data from the data storage unit (2) and compare it with the data extracted by the barcode image extraction unit (1), and determine the type of abnormality; A calibration unit (4): used to calibrate the barcode image extraction unit (1) according to the abnormality type identified by the central processing unit (3); The abnormality types include exposure abnormality and distortion abnormality.

4. The calibration system of the barcode printing quality detector according to claim 3, It is characterized in that The calibration unit (4) comprises: Exposure calibration module (5): The exposure calibration module (5) is used to calibrate the exposure anomaly of the barcode; Barcode distortion calibration module (6): The image distortion calibration module is used to calibrate the barcode distortion.

5. The calibration system of the barcode printing quality detector according to claim 3, It is characterized in that The central processing unit (3) comprises: Basic distinguishing feature recognition module (7): The basic distinguishing feature recognition module (7) is used to recognize basic distinguishing features of an image; Exposure abnormality feature recognition module (8): the exposure abnormality feature recognition module (8) is used to recognize the exposure abnormality of the detector; Distortion anomaly feature recognition module (9): The distortion anomaly feature recognition module (9) is used to recognize the distortion anomaly of the detector.

6. The calibration system of the barcode printing quality detector according to claim 5, It is characterized in that The basic distinguishing features are distinguishing features between bar codes and have nothing to do with the images obtained by the quality detector.

7. A processing device, It is characterized in that include: A processor, a memory, and a program, wherein the program is stored in the memory and executed by the processor, and the program includes instructions for executing the method according to any one of claims 1 to 2.

8. A storage medium having a computer program stored thereon, It is characterized in that The computer program is used by a processor to execute the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Exposure compensation adjustment method for multi-lens shooting

    CN109889734A

  • Barcode recognition method, device and equipment and storage medium

    CN115618901A

  • Line scanning camera distortion correction method, computing device and storage medium

    CN116342435A