Intelligent identification and verification method and system for two-dimensional code production labeling position

By collecting and analyzing product image data in real time, dynamically generating positioning boxes and compensating and correcting them in combination with environmental features, the problem of detection errors in the face of diversified products is solved, and a more accurate and adaptable QR code labeling position detection is achieved.

CN120146076AActive Publication Date: 2025-06-13GUANGZHOU SHANGZHUN INSTR EQUIP CO LTD

Patent Information

Application Number
CN202510325075.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-06-13
Estimated Expiration
2045-03-19

AI Technical Summary

Technical Problem

The existing QR code production and labeling position detection technology is difficult to adapt to the characteristics of different products when facing the diversification of product types, resulting in errors in the detection results.

Method used

By collecting the overall image data of the product in real time, identifying the product reference features and dynamically generating positioning boxes, extracting the QR code labeling outline and calculating its geometric center point, establishing a spatial mapping model to calculate the proportion of overlapping area, compensating and correcting based on environmental features and surface attribute parameters, and judging the correctness of the labeling position.

Benefits of technology

It improves the accuracy and adaptability of the detection, reduces errors, ensures the correct judgment of the position of the QR code labeling, and improves production efficiency and quality consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146076A_ABST
    Figure CN120146076A_ABST
Patent Text Reader

Abstract

The invention relates to the field of labeling position detection, in particular to an intelligent identification and verification method and system for a two-dimensional code production labeling position, and the method comprises the steps: collecting the overall image data of a target product in real time; according to the overall image data, identifying product reference features in the overall image data, and dynamically generating a positioning frame matched with the product; according to the overall image data, extracting a two-dimensional code labeling contour, and calculating a geometric center point of the two-dimensional code labeling contour; establishing a space mapping model of the geometric center point and the positioning frame, and calculating an overlapping area proportion of the two-dimensional code labeling contour and the positioning frame in the whole image data through the space mapping model as an initial overlapping ratio; acquiring scene characteristics of a labeling environment and product surface attribute parameters, and calculating a deviation value of the overlap ratio through a preset compensation algorithm; correcting the initial overlap ratio based on the deviation value, and judging whether the corrected deviation value is greater than a preset deviation threshold value or not; and if the corrected overlap ratio is greater than a preset deviation threshold value, judging that the labeling position is correct.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of label position detection, and particularly to an intelligent recognition and verification method and system for the label position of two-dimensional code production. Background Art

[0002] The recognition of the label position of two-dimensional code production refers to using image processing technology to detect and verify whether the two-dimensional code is accurately pasted on the product at the predetermined position during the production process. It is usually applied to automated production lines to ensure that the two-dimensional code attached to the product meets the quality standards and can be successfully scanned and recognized in subsequent logistics, sales and other links.

[0003] The existing label position detection technology for two-dimensional code production mainly verifies the accuracy of the two-dimensional code label on the product through image recognition and geometric algorithms. Usually, these technologies are based on a unified detection standard, and judge whether the two-dimensional code is accurately pasted at the specified position of the product by analyzing the characteristics such as the position, shape and contrast of the two-dimensional code in the image. This method relies on high-precision image acquisition equipment and specific algorithm models to achieve automatic detection and verification of the label position. However, the existing technology is often limited when faced with the diversification of product types. Due to significant differences in the shape, surface curvature, reflection characteristics, etc. of different types of products, it is difficult for a unified detection standard to adapt to all types of products. For example, for curved surface products, the physical contour of the two-dimensional code is quite different from that of flat surface products, and changes in the shooting angle and lighting conditions will also cause deviations in the performance of the two-dimensional code in the image. At this time, the unified detection standard cannot fully cope with the characteristics of different products, and it is easy to cause errors in the detection results.

[0004] Therefore, there are defects in the existing technology and it needs to be improved. Summary of the Invention

[0005] In order to solve one or several problems in the existing technology, the main object of the present application is to provide an intelligent recognition and verification method and system for the label position of two-dimensional code production.

[0006] In order to achieve the above invention object, the present application proposes an intelligent recognition and verification method for the label position of two-dimensional code production, and the method includes:

[0007] Real-time collect the overall image data of the target product;

[0008] According to the overall image data, identify the product reference features in the overall image data, and dynamically generate a positioning frame matching the product;

[0009] According to the overall image data, extract the two-dimensional code label contour and calculate its geometric center point;

[0010] Establish a spatial mapping model between the geometric center point and the positioning frame, and calculate the proportion of the overlapping area between the two-dimensional code labeling contour and the positioning frame in the overall image data through the spatial mapping model as the initial coincidence degree;

[0011] Obtain the scene features of the labeling environment and the product surface attribute parameters, and calculate the deviation value of the coincidence degree through a preset compensation algorithm;

[0012] Based on the deviation value, correct the initial coincidence degree, and determine whether the corrected deviation value is greater than a preset deviation threshold;

[0013] If the corrected coincidence degree is greater than the preset deviation threshold, it is determined that the labeling position is correct.

[0014] The embodiment of the present application also provides an intelligent recognition and verification system for the two-dimensional code production labeling position, including:

[0015] A collection module for real-time collecting the overall image data of the target product;

[0016] An identification module for identifying the product reference features in the overall image data according to the overall image data and dynamically generating a positioning frame matching the product;

[0017] An extraction module for extracting the two-dimensional code labeling contour according to the overall image data and calculating its geometric center point;

[0018] A establishment module for establishing a spatial mapping model between the geometric center point and the positioning frame, and calculating the proportion of the overlapping area between the two-dimensional code labeling contour and the positioning frame in the overall image data through the spatial mapping model as the initial coincidence degree;

[0019] An acquisition module for obtaining the scene features of the labeling environment and the product surface attribute parameters, and calculating the deviation value of the coincidence degree through a preset compensation algorithm;

[0020] A judgment module for correcting the initial coincidence degree based on the deviation value and determining whether the corrected deviation value is greater than a preset deviation threshold;

[0021] A correction module for determining that the labeling position is correct if the corrected coincidence degree is greater than the preset deviation threshold.

[0022] The present application also provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method described in any one of the above when executing the computer program.

[0023] The present application also provides a computer-readable storage medium, on which a computer program is stored, and the computer program implements the steps of the method described in any one of the above when being executed by a processor.

[0024] The intelligent recognition and verification method and system for the QR code production labeling position in the embodiments of the present application can dynamically generate a positioning frame matching the product by collecting overall image data in real time and identifying the product reference features, providing a reliable reference and positioning information for the accurate labeling of the QR code. By extracting the contour of the QR code label and calculating its geometric center point. When calculating the coincidence degree, the present application not only depends on the geometric information of the QR code itself, but also obtains the scene features of the labeling environment and the product surface attribute parameters, and combines a preset compensation algorithm for deviation correction, which can effectively cope with the influence brought by environmental changes and the irregularity of the product surface, and further improve the accuracy of the system. By comparing the corrected coincidence degree with a preset deviation threshold, it automatically judges whether the labeling position of the QR code is correct, reduces manual intervention, and improves production efficiency and quality consistency. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a schematic flowchart of the intelligent recognition and verification method for the QR code production labeling position according to an embodiment of the present application;

[0026] Figure 2 is a schematic flowchart of the intelligent recognition and verification method for the QR code production labeling position according to an embodiment of the present application;

[0027] Figure 3 is a schematic block diagram of the structure of the intelligent recognition and verification system for the QR code production labeling position according to an embodiment of the present application;

[0028] Figure 4 is a schematic block diagram of the structure of a computer device according to an embodiment of the present application.

[0029] The realization, functional features and advantages of the purpose of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0030] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0031] Referring to Figure 1 , an intelligent recognition and verification method for the QR code production labeling position is provided in an embodiment of the present application. The method includes:

[0032] S1. Collect overall image data of the target product in real time;

[0033] S2. According to the overall image data, identify the product reference features in the overall image data, and dynamically generate a positioning frame matching the product;

[0034] S3. Extract the contour of the QR code label based on the overall image data and calculate its geometric center point.

[0035] S4. Establish a spatial mapping model between the geometric center point and the positioning frame, and calculate the proportion of the overlapping area between the QR code label contour and the positioning frame in the overall image data through the spatial mapping model as the initial coincidence degree.

[0036] S5. Obtain the scene features of the labeling environment and the product surface attribute parameters, and calculate the deviation value of the coincidence degree through a preset compensation algorithm.

[0037] S6. Correct the initial coincidence degree based on the deviation value, and determine whether the corrected deviation value is greater than a preset deviation threshold.

[0038] S7. If the corrected coincidence degree is greater than the preset deviation threshold, it is determined that the labeling position is correct.

[0039] As described in the above steps S1 - S3, the acquisition of the overall image data can help the system comprehensively understand the relative position and integrity of the QR code. Real - time image acquisition can ensure that the system dynamically monitors the QR code labeling position during the production process, so as to discover problems in real time and ensure the timeliness and accuracy of production. The product reference features are the feature points with fixed and easy - to - identify on the product surface, such as corner points, edges, specific patterns or marks. These reference features can be used as reference objects to determine the position of the QR code. The positioning frame is a frame generated around the product or the QR code after identifying these reference features. The positioning frame can be rectangular, square or other shapes, and its purpose is to define the correct position area of the QR code. Dynamically generating the positioning frame can ensure that the system generates a suitable reference frame for different products or production environments. This feature ensures that the relative position of the QR code is within a controllable range and reduces the occurrence of errors. The QR code label contour refers to the outer boundary of the QR code, which can be obtained through image - processing techniques such as edge detection and contour extraction. The geometric center point is the centroid of the QR code, which is obtained by solving the geometric center of the QR code label contour. This point is representative of the position, rotation angle, etc. of the QR code. Extracting the QR code label contour and its geometric center point can more accurately locate the QR code, especially in the case of QR code tilt or offset, which helps with subsequent correction and comparison. Through the geometric center point, the relative position of the QR code can be judged, reducing the recognition deviation caused by morphological deformation.

[0040] As described in the above steps S4 - S7, the spatial mapping model associates the geometric center point of the two - dimensional code with the positioning frame to form a mathematical model for describing the spatial relationship between the position of the two - dimensional code and the positioning frame. The overlapping area ratio refers to the ratio of the area of the intersection part of the two - dimensional code labeling contour and the positioning frame area to the total area of the two - dimensional code, which is used as a quantitative index of the initial coincidence degree. By calculating the overlapping area ratio through the spatial mapping model, the degree of coincidence between the two - dimensional code and the target position can be quantified, providing data support for subsequent calibration and judgment. The initial coincidence degree helps to determine whether the two - dimensional code has been pasted at the predetermined position, providing a basis for whether further calibration is needed. The scene characteristics of the labeling environment refer to environmental factors such as lighting and camera angle that may affect image acquisition. The product surface attribute parameters may include factors such as surface reflectivity, texture, and shape, which will affect the recognition effect of the two - dimensional code. The compensation algorithm dynamically adjusts the calculated coincidence degree based on the compensation for changes in the environment and surface characteristics, thereby obtaining a more accurate calibration. By correcting the changes in the environment and surface attributes through the compensation algorithm, the adaptability and accuracy of the system can be improved, avoiding errors caused by environmental or surface factors. The deviation value refers to the corrected value after the compensation algorithm, reflecting the difference between the initial coincidence degree and the actual situation. The preset deviation threshold is a tolerance range set by the system according to production requirements for determining whether the two - dimensional code has been pasted correctly. If the deviation value is greater than this threshold, it indicates that the position error of the two - dimensional code is relatively large and needs to be adjusted. The corrected coincidence degree can improve the judgment accuracy of the system, ensuring that the two - dimensional code labeling position is within a reasonable range. If the deviation value is greater than the preset threshold, the system can promptly detect the labeling error, ensuring product quality control and preventing defective products from entering the market. After compensation and calibration, if the actual position of the two - dimensional code still meets the preset error range, the system determines that the labeling position is correct.

[0041] Referring to Figure 2 , in one embodiment, the steps of obtaining the scene characteristics of the labeling environment and the product surface attribute parameters and calculating the deviation value of the coincidence degree through a preset compensation algorithm include:

[0042] S51. Collect the scene characteristics of the labeling environment, including the shooting tilt angle of the image acquisition device and the reflectivity parameter of the product surface;

[0043] S52. Analyze the product surface attribute parameters. When there are curvature features on the product surface, extract the radius of curvature;

[0044] S53. Adopt a geometric projection compensation algorithm to calculate the deformation offset parameter of the two - dimensional code labeling contour according to the radius of curvature and the shooting tilt angle;

[0045] S54. Construct a deviation value analysis model, input the reflectivity parameter and the deformation offset parameter into the deviation value analysis model, and output the deviation value through the deviation value analysis model.

[0046] As described in the above steps, the angle of the image acquisition device has a direct impact on the acquisition quality of the image and the shape and position of the QR code. The shooting angle (i.e., the tilt angle) will cause deformation of the QR code in the image, affecting the recognition accuracy of the QR code. The surface reflectivity of the product refers to the reflection characteristics of the product surface to light. Different materials or surfaces may cause differences in reflectivity, thereby affecting the image quality, such as overexposure or low light, affecting the recognition accuracy of the QR code. Collecting the shooting tilt angle and reflectivity parameters is to consider the impact of the actual environment on the image quality. The shooting angle and reflectivity are important factors affecting the QR code recognition accuracy. Collecting these data can provide basic information for subsequent image compensation and correction. By collecting environmental feature data, the image acquisition settings can be adjusted in real time, the image quality can be optimized, the deviation caused by the external environment can be reduced, and the QR code recognition accuracy can be improved. The product surface attribute parameters refer to the geometric shape, texture, smoothness and other characteristics of the product surface. These characteristics may affect the position and shape of the QR code labeling. The curvature feature indicates whether the product surface has forms such as bending, protrusion or depression, and the radius of curvature is a measure describing the degree of surface bending. If there is curvature on the product surface, the product surface may be deformed, thereby affecting the geometric structure of the QR code. The curvature of the product surface will cause deformation of the QR code. Especially when the QR code is pasted on an uneven surface, the deformation will affect the recognition and scanning accuracy of the QR code. By extracting the radius of curvature, this factor can be considered in the subsequent compensation steps to reduce the error caused by the curvature. Geometric projection compensation algorithm: The core idea of this algorithm is based on geometric principles, and compensates for the deformation of the QR code on the curved surface and at different shooting angles. By analyzing the radius of curvature and the shooting tilt angle, the geometric deformation that the QR code may generate in the image can be deduced and corrected. Deformation offset parameter: This parameter represents the measure of the displacement or deformation of the QR code during shooting due to curvature or inclination changes. The compensation algorithm will calculate this offset parameter and make corresponding corrections. Both the shooting angle and the surface curvature will cause deformation of the QR code contour. The geometric projection compensation algorithm can model and compensate for the influence of these factors through a mathematical model, ensuring that even on a curved surface or an inclined surface, the shape and position of the QR code can be corrected, avoiding errors in the recognition process. Deviation value analysis model: This is a mathematical or statistical model used to comprehensively analyze the data affecting the QR code accuracy (such as reflectivity parameters and deformation offset parameters). The model can calculate the deviation in the position or shape of the QR code by inputting different parameters, and perform error analysis based on the model results. Input of reflectivity parameter and deformation offset parameter: Reflectivity and deformation offset respectively represent the influence of environmental factors and geometric deformation on the QR code. By inputting these two parameters into the deviation value analysis model, the model can output a deviation value, indicating the difference between the QR code in the image and the ideal position or shape.Environmental factors (such as reflectivity) and geometric factors (such as deformation offset) jointly affect the recognition accuracy of the QR code. Constructing a deviation value analysis model can comprehensively consider these factors, quantify their impact on the QR code accuracy, and thus provide a basis for subsequent correction or calibration.

[0047] In one embodiment, after the step of acquiring the scene features of the labeling environment and the product surface attribute parameters, and before the step of calculating the deviation value of the coincidence degree through a preset compensation algorithm, the method further includes:

[0048] Based on the overall image data, obtain the color RGB values of the target product and the color RGB values of the QR code label;

[0049] According to the color RGB values of the target product and the color RGB values of the QR code label, calculate the color difference between the two;

[0050] Based on the calculation result, when the color difference between the two is lower than a preset visual discrimination threshold, it is determined as a color-similar scene;

[0051] According to the color-similar scene, switch to the multi-spectral image acquisition mode to obtain image data including infrared or ultraviolet bands;

[0052] Based on the multi-spectral data, reconstruct the QR code label contour to replace the contour data in the original visible light image;

[0053] According to the overlapping area between the reconstructed QR code label contour and the positioning frame, update the initial coincidence degree.

[0054] As mentioned above, obtaining the RGB color values of image data is a common step in image processing. RGB represents the color intensities of the three channels: red, green, and blue. By extracting the information of these three colors from the images of the target product and the QR code label, the color characteristics of the image can be comprehensively described. This is an important basis for judging the color consistency between the product and the QR code label. Color difference refers to the measure of the visual difference between two colors. The calculation of color difference in the RGB color space, such as the Euclidean distance or the CIEDE2000 algorithm, can quantify the difference between two RGB color values. This calculation is usually used to quantify the difference between colors and determine whether they are within the visually distinguishable range. By calculating the color difference, the system can quantitatively analyze the color similarity between the target product and the QR code label. This step helps to judge whether the target product and the QR code label are within the visually acceptable color range. If the color difference is small, it indicates that their colors are close and they can enter the next processing stage; if the difference is large, further analysis is required. The preset visual discrimination threshold is set according to the human eye's perception ability of colors. If the color difference between the target product and the QR code label is below this threshold, it means that their colors are close and it is difficult for the human eye to distinguish the difference between them. Through this judgment, the system can intelligently distinguish between scenarios with similar colors and significant color differences. If the colors are similar, it is possible to choose not to perform further complex processing and enter the next step of data acquisition and processing based on multi-spectral images. This helps to improve the processing efficiency of the system and avoid starting complex image acquisition modes in unnecessary scenarios. When the colors of the target product and the QR code label are similar, ordinary visible light images may not be clear or accurate enough. Especially in complex backgrounds, it may be difficult to identify whether the QR code is accurately pasted. The multi-spectral image acquisition mode can capture bands outside the visible light, such as infrared or ultraviolet bands. These bands are more sensitive to the display of surface details and physical contours of objects and can provide more image information in the case of small color differences. By switching to the multi-spectral image acquisition mode, the system can obtain more information. Especially when ordinary visible light cannot effectively distinguish the QR code from the background, the infrared and ultraviolet band images can provide a clearer contour of the QR code label. This helps to improve the accuracy of QR code recognition, especially in the case of similar colors, and avoid the influence of image noise. In multi-spectral images, the infrared or ultraviolet bands are more sensitive to the details, materials, and reflection characteristics of the object surface, which enables the physical contour of the QR code to be presented more accurately. By processing the multi-spectral image data, the system can extract the physical contour of the QR code. Replacing the contour data in the original visible light image can improve the accuracy of QR code recognition. In ordinary visible light images, similar colors or complex backgrounds may blur the boundary of the QR code. By reconstructing the physical contour, it can ensure that the contour data of the QR code is more accurate, thereby improving the accuracy of subsequent processing (such as positioning, recognition, and coincidence degree calculation).The coincidence degree is an index for evaluating the matching degree between the two-dimensional code and the positioning frame (or target area). By calculating the overlapping area between the physical contour of the two-dimensional code and the preset positioning frame, it can be accurately measured whether the two-dimensional code has been correctly placed within the target area.

[0055] In one embodiment, after the step of calculating, by means of the spatial mapping model, the proportion of the overlapping area between the two-dimensional code labeling contour and the positioning frame in the overall image data as the initial coincidence degree, the method further includes:

[0056] Calculating the closeness of the two-dimensional code labeling contour;

[0057] Based on the calculation result, analyzing the closeness of the two-dimensional code labeling contour;

[0058] If the closeness of the two-dimensional code labeling contour is lower than a preset integrity threshold, it is determined that there is occlusion or damage in the overall image data of the two-dimensional code label;

[0059] Extracting the contour key points of the unoccluded area, and reconstructing the incomplete two-dimensional code labeling contour through a curve fitting algorithm;

[0060] Updating the initial coincidence degree based on the reconstructed two-dimensional code labeling contour;

[0061] If the improvement rate of the updated initial coincidence degree compared to the original value is less than a preset repair threshold, triggering an artificial re-inspection signal;

[0062] Otherwise, continue to execute the step of obtaining the scene features and calculating the deviation value.

[0063] As mentioned above, the closure degree refers to the integrity of the QR code label contour, that is, whether the contour forms a closed shape. The way to calculate the closure degree is based on whether the endpoints of the contour are close or whether there are missing or open areas in certain regions of the contour. Common calculation methods include curve detection of the closure degree, endpoint distance, etc. A contour with a lower closure degree usually indicates damage, occlusion, or contamination. By calculating the closure degree, it is possible to evaluate whether the contour of the QR code label is complete or whether there are incomplete situations (such as occlusion or contamination). If the closure degree of the QR code label contour is low, the system can detect potential problems, providing a basis for subsequent repair and detection. Analyzing the closure degree of the QR code label contour is to judge the integrity of the QR code. If the closure degree is below the set threshold, it means that the QR code is occluded or contaminated, which may lead to failure in QR code recognition. By analyzing the specific value of the closure degree, it is possible to further understand the degree of integrity of the QR code label contour, helping to determine whether remedial measures are needed. Setting a preset integrity threshold is to quantify the degree of integrity of the contour. If the closure degree of the QR code is below this threshold, it means that there are defects in the QR code label contour, possibly due to reasons such as occlusion or contamination. This judgment can help the system identify quality problems of the QR code from the appearance. In the case of occlusion or contamination in the QR code label contour, the system extracts the contour key points of the unoccluded part and uses curve fitting algorithms (such as Bezier curves, spline curves, etc.) to reconstruct the missing part. This method uses the known image data to speculate on the contour shape of the occluded area, thus restoring the complete contour of the QR code. By reconstructing the occluded area of the QR code through curve fitting algorithms, the recognition rate of the QR code can be improved, especially when part of the image is occluded or damaged, avoiding the entire QR code being unrecognizable due to damage. This step improves the fault tolerance of the system and ensures the stability of image recognition. After the reconstruction of the QR code label contour, the system recalculates the overlapping area between the QR code label contour and the positioning frame and updates the coincidence degree. Through this operation, the system can evaluate whether the reconstructed QR code matches the target position better. This step usually includes updating the calculation of the overlapping area based on image features. A repair threshold is set to judge whether the repair effect is significant. If the overlapping degree between the reconstructed QR code and the original positioning frame does not increase significantly, it means that the repair effect is not ideal, and the system will trigger an artificial recheck signal, requiring manual intervention to further check the quality and positioning of the QR code. By setting the repair threshold, the system can automatically evaluate the effect of the repair process and trigger an artificial recheck in case of insufficient repair. This can ensure that when the automated process cannot perfectly repair the QR code, the product quality and the usability of the QR code can still be ensured through manual intervention. If the overlapping degree between the reconstructed QR code label contour and the positioning frame increases significantly, it means that the QR code repair is successful, and the system will continue to execute subsequent image processing and recognition steps, such as obtaining scene features and calculating deviation values.These steps help to further analyze the environmental factors and deviations of the QR code, ensuring the accuracy in the QR code recognition process.

[0064] In one embodiment, before the step of inputting the reflectivity parameter and the deformation offset parameter into the deviation value analysis model, the method further includes:

[0065] Collect the light intensity of the environment in real time;

[0066] When the light intensity is greater than or equal to a preset light intensity threshold, enable a polarized light filter;

[0067] Calculate the calibrated reflectivity parameter according to the light intensity and the state of the polarized light filter, and input the calibrated reflectivity parameter into the deviation value analysis model.

[0068] As described above, the ambient light intensity refers to the light intensity irradiating on the target object. In practical applications, the light intensity has an important impact on the reflection characteristics of the object surface, especially in optical measurement and image recognition. The change in light intensity may cause fluctuations in the reflectivity parameters, thereby affecting the accuracy of subsequent analysis. Therefore, real-time acquisition of light intensity data helps to dynamically adjust the input parameters in the deviation analysis model. The polarizing filter can control the polarization state of the light reflected from the object surface, thereby effectively filtering out stray light and unnecessary reflected light caused by changes in the light angle or irregularity of the reflection surface. Enabling the polarizing filter can eliminate these interferences, especially in a strong light environment, which can effectively improve the accuracy of reflectivity measurement. When the light intensity reaches a certain threshold, the scattering of the reflected light may increase, thereby affecting the measurement accuracy. Therefore, the polarizing filter is enabled to improve the measurement accuracy. The calibrated reflectivity parameter is the reflectivity data obtained after adjustment by the light intensity and the polarizing filter. Since the properties of the reflected light are different under different light intensities, it is necessary to adjust the reflectivity parameter according to the light intensity and the state of the filter. By dynamically calculating the calibrated reflectivity, the error caused by environmental changes can be eliminated to ensure the accuracy of the data. Specifically, when the light intensity is relatively high, the polarizing filter can effectively reduce the interference of strong light and help the system obtain a more accurate reflectivity value. The calibrated reflectivity parameter will be input into the deviation value analysis model as input data for further analysis of the deviation of the target object. By introducing the calibrated reflectivity data, the model can calculate the deviation value according to the actual reflection characteristics of the object, thereby judging the size of the deviation. The role of the deviation analysis model here is to help the system evaluate the deformation, damage or irregularity of the target object according to the change of the reflectivity parameter. By inputting the calibrated reflectivity parameter, the deviation value analysis model can provide a more accurate deviation detection result, especially under different light conditions. The calibrated reflectivity data will effectively improve the accuracy of the deviation value calculation and ensure the reliability of the final result. This can reduce the deviation detection error caused by light changes and improve the robustness and accuracy of the system.

[0069] In one embodiment, before the step of inputting the reflectivity parameter and the deformation offset parameter into the deviation value analysis model, the method further includes:

[0070] Obtain the curvature change rate of the product surface;

[0071] If the curvature change rate of the product surface is greater than a preset curvature change rate threshold, divide the product surface into multiple grid regions;

[0072] Independently calculate the local deformation offset parameter for each grid region, and input the offset parameters of each grid region into the deviation value analysis model.

[0073] As described above, curvature refers to the degree of bending of a surface or curve, which can usually be calculated through the derivative of the curve. For the product surface, the curvature change rate can reflect the bending change of the QR code surface or curve. This parameter is very important for judging the deformation of the product surface because the deformation of the product surface may affect the reading accuracy of the QR code and the reflectivity measurement. Obtaining the curvature change rate can help determine whether there is irregular bending or deformation on the product surface. By obtaining the curvature change rate of the product surface, the degree of deformation of the product surface can be accurately detected. If the curvature changes greatly, it indicates that there may be a large deformation on the QR code surface, which may in turn affect the scanning of the QR code or the reflectivity measurement. As a preprocessing step, the curvature change rate can provide a basis for subsequent mesh generation and the calculation of local offset parameters, thus ensuring the accurate calculation of the deformation offset parameters. If the curvature change rate exceeds the preset threshold, it indicates that there may be a large deformation or a non-uniform surface on the product surface, and it cannot be processed by a simple global model. Therefore, dividing the product surface into multiple mesh regions can achieve localization processing, enabling each mesh region to be processed independently, so as to better capture local deformations. Mesh generation can reduce the impact of large-scale deformations on the entire product surface and ensure that the offset parameters in the local area can more accurately reflect the true deformation of the QR code. After dividing the mesh regions, the deformation of each small region can be calculated and analyzed separately, thus avoiding the errors caused by global calculations. Through this method, the calculation of the deformation offset parameters is more detailed and accurate, which helps to improve the accuracy of reflectivity measurement and deviation detection of the entire system under complex deformations. For regions with different degrees of deformation, different processing strategies can be adopted, thereby improving the flexibility and reliability of deviation value analysis. The deformation offset parameter of each mesh region refers to the degree of deformation that occurs on the QR code surface within that region. Independently calculating the local deformation offset parameters helps to accurately capture the deformation conditions of different regions. For some curved or irregular QR code surfaces, only some regions may have large deformations, while other regions are relatively small. Independently calculating the local deformation offset parameters can reflect these differences, thus ensuring that the deformation of each local region is accurately reflected. Independently calculating the deformation offset parameters of each mesh region can analyze the product surface more accurately and avoid measurement errors caused by global assumptions or over-simplification. This localization processing not only improves the accuracy of the deformation parameters but also provides more detailed feedback, which is more helpful for subsequent deviation value analysis. Different deformation regions can be processed differently, optimizing the accuracy of reflectivity calculation and deviation value evaluation. The offset parameter of each mesh region is calculated based on the deformation of that region. When these offset parameters are input into the deviation value analysis model, it can help the model evaluate the deviation of the entire product surface. The deviation value analysis model comprehensively considers the local and overall deformations based on the offset conditions of each local region, and thus obtains the deviation value of the entire product surface.By inputting local offset parameters into the deviation value analysis model, the accuracy and robustness of the system in a complex deformation environment can be improved. The local offset parameters help to accurately reflect the deformation of each region, and the model will comprehensively obtain the overall deviation detection result based on these input data, thereby providing accurate data support for the calculation of the reflectivity parameters of the two-dimensional code. This step can effectively improve the accuracy of deviation value analysis and ensure that the final reflectivity parameters and deformation detection results are still reliable in a dynamic environment.

[0074] In one embodiment, before the step of inputting the reflectivity parameters and deformation offset parameters into the deviation value analysis model, the method further includes:

[0075] Obtain the radius of curvature of the product surface;

[0076] When it is detected that the radius of curvature of the product surface is less than or equal to a preset minimum radius of curvature threshold, activate the high-curvature compensation mode;

[0077] Reconstruct the three-dimensional contour of the product surface through a multi-viewpoint image fusion algorithm;

[0078] Based on the reconstructed three-dimensional contour, correct the deformation offset parameters and input the corrected deformation offset parameters into the deviation value analysis model.

[0079] As described above, the radius of curvature refers to the reciprocal of the curvature of a surface or a curve at a certain point, which is used to describe the degree of bending of the surface or the curve. The smaller the radius of curvature, the greater the degree of bending of the surface or the curve. By obtaining the radius of curvature of the product surface, it is possible to directly determine whether the product surface is in a high-curvature region, that is, whether there is a strong bending deformation. The reason for obtaining the radius of curvature is that the degree of deformation of the product surface is closely related to the surface curvature. If the surface curvature of the product is too large, the deformation of the QR code may be more severe. Therefore, special compensation is required for these regions. Obtaining the radius of curvature of the product surface can help the system determine whether the surface is in a region of smaller curvature. If the radius of curvature is less than a preset threshold, this region can be identified as a highly curved region. In this way, compensation can be made in advance to avoid the deformation of the QR code in these regions from affecting subsequent scanning and reflectivity measurement. When the radius of curvature of the product surface is less than or equal to a certain preset minimum curvature radius threshold, the degree of bending of the product surface is large, and at this time, the QR code may undergo strong deformation, resulting in the inability to accurately scan or read the QR code. To compensate for this deformation, the system needs to activate the "high-curvature compensation mode". By activating this mode, the system will adopt special algorithms or compensation techniques to correct the deformation of the product surface, ensuring that the QR code can still maintain good readability in the curved region. This compensation mode can effectively address the deformation problem in the high-curvature region. By activating the high-curvature compensation mode, the system can automatically identify and correct the deformation of the product surface, ensuring that accurate reflectivity and deformation analysis can be obtained even when the surface is curved, thereby improving the readability and scanning accuracy of the QR code. The multi-viewpoint image fusion algorithm uses images taken from different angles to reconstruct the three-dimensional shape of the product surface. This method usually combines the image data from multiple viewpoints to solve the problems of information loss and error caused by a single perspective, thereby more accurately reconstructing the three-dimensional contour. Since the surface where the QR code is located may have insufficient traditional two-dimensional image information due to bending, taking multiple viewpoints and fusing the information can more accurately capture the deformation of the QR code surface in three-dimensional space, thereby improving the accuracy of correction. Through the multi-viewpoint image fusion algorithm, it is possible to more accurately reconstruct the three-dimensional shape of the region where the QR code is located, especially in the highly curved region. This enables a comprehensive evaluation of the deformation of the QR code in three-dimensional space, providing more reliable data support for subsequent deformation correction and reflectivity measurement. After obtaining the three-dimensional contour of the product surface, the deformation of the QR code can be corrected according to this contour. The three-dimensional contour provides more realistic shape data of the QR code surface, and these data can be used to calculate the specific parameters of the deformation (such as offset, angle, curvature, etc.) and correct the offset parameters. The reason for correcting the deformation offset parameters is that the offset parameters of the product surface may be affected by irregular deformation in the high-curvature region. By correcting the three-dimensional contour, the accuracy of the deformation parameters can be improved, making the subsequent deviation value analysis more accurate.The corrected deformation offset parameters are obtained through a three-dimensional reconstruction and compensation algorithm. After correction, these parameters can more accurately reflect the true deformation of the product surface. Inputting these corrected parameters into the deviation value analysis model helps to accurately evaluate the relationship between the deformation and reflectivity of the product surface. Because there may be errors in the original deformation parameters, especially in complex high-curvature regions. With the corrected deformation offset parameters, the deviation value can be analyzed more precisely, thereby improving the accuracy of the QR code reflectivity and scanning accuracy.

[0080] Referring to Figure 3 , an intelligent recognition and verification system for the QR code production labeling position is also provided in the embodiment of the present application, including:

[0081] The acquisition module 1 is used to collect the overall image data of the target product in real time;

[0082] The recognition module 2 is used to identify the product reference features in the overall image data according to the overall image data and dynamically generate a positioning frame matching the product;

[0083] The extraction module 3 is used to extract the QR code labeling contour according to the overall image data and calculate its geometric center point;

[0084] The establishment module 4 is used to establish a spatial mapping model between the geometric center point and the positioning frame, and calculate the proportion of the overlapping area between the QR code labeling contour and the positioning frame in the overall image data through the spatial mapping model as the initial coincidence degree;

[0085] The acquisition module 5 is used to acquire the scene features of the labeling environment and the product surface attribute parameters, and calculate the deviation value of the coincidence degree through a preset compensation algorithm;

[0086] The judgment module 6 is used to correct the initial coincidence degree based on the deviation value and judge whether the corrected deviation value is greater than a preset deviation threshold;

[0087] The correction module 7 is used to determine that the labeling position is correct if the corrected coincidence degree is greater than the preset deviation threshold.

[0088] As described above, it can be understood that each component of the intelligent recognition and verification system for the QR code production labeling position proposed in the present application can implement the functions of any one of the intelligent recognition and verification methods for the QR code production labeling position described above, and the specific structure will not be elaborated.

[0089] Referring to Figure 4 , a computer device is also provided in the embodiment of the present application. This computer device can be a server, and its internal structure can be as Figure 4As shown in the figure. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store data such as monitoring data. The network interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements an intelligent recognition and verification method for the labeling position of two-dimensional code production.

[0090] The above-mentioned processor executes the above-mentioned intelligent recognition and verification method for the labeling position of two-dimensional code production, including: real-time collecting the overall image data of the target product; according to the overall image data, identifying the product reference features in the overall image data, and dynamically generating a positioning frame matching the product; according to the overall image data, extracting the two-dimensional code labeling contour and calculating its geometric center point; establishing a spatial mapping model between the geometric center point and the positioning frame, and calculating the overlapping area ratio of the two-dimensional code labeling contour and the positioning frame in the overall image data through the spatial mapping model as the initial coincidence degree; obtaining the scene features of the labeling environment and the product surface attribute parameters, and calculating the deviation value of the coincidence degree through a preset compensation algorithm; correcting the initial coincidence degree based on the deviation value, and judging whether the corrected deviation value is greater than a preset deviation threshold; if the corrected coincidence degree is greater than the preset deviation threshold, it is determined that the labeling position is correct.

[0091] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements an intelligent recognition and verification method for the labeling position of two-dimensional code production, including the steps of: real-time collecting the overall image data of the target product; according to the overall image data, identifying the product reference features in the overall image data, and dynamically generating a positioning frame matching the product; according to the overall image data, extracting the two-dimensional code labeling contour and calculating its geometric center point; establishing a spatial mapping model between the geometric center point and the positioning frame, and calculating the overlapping area ratio of the two-dimensional code labeling contour and the positioning frame in the overall image data through the spatial mapping model as the initial coincidence degree; obtaining the scene features of the labeling environment and the product surface attribute parameters, and calculating the deviation value of the coincidence degree through a preset compensation algorithm; correcting the initial coincidence degree based on the deviation value, and judging whether the corrected deviation value is greater than a preset deviation threshold; if the corrected coincidence degree is greater than the preset deviation threshold, it is determined that the labeling position is correct.

[0092] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium provided in this application and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0093] It should be noted that in this text, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, device, article, or method including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, device, article, or method. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, device, article, or method including that element.

[0094] The above are only the preferred embodiments of this application, and do not limit the patent scope of this application accordingly. Any equivalent structural or equivalent process transformation made by using the specification and drawings of this application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of this application.

Claims

1. An intelligent identification and verification method for the production and labeling position of a two-dimensional code, characterized in that: The method comprises: Collect the overall image data of the target product in real time; According to the overall image data, identifying product reference features in the overall image data, and dynamically generating a positioning frame matching the product; Extract the outline of the two-dimensional code label according to the overall image data and calculate its geometric center point; Establishing a spatial mapping model between the geometric center point and the positioning frame, and calculating the overlapping area ratio between the outline of the two-dimensional code label and the positioning frame in the overall image data by using the spatial mapping model as an initial overlap degree; Obtain the scene characteristics of the labeling environment and the product surface attribute parameters, and calculate the deviation value of the overlap through the preset compensation algorithm; Correcting the initial overlap based on the deviation value, and determining whether the corrected deviation value is greater than a preset deviation threshold; If the corrected overlap is greater than the preset deviation threshold, the labeling position is determined to be correct.

2. The intelligent identification and verification method for the production and labeling position of a two-dimensional code according to claim 1 is characterized in that: The step of obtaining scene features of the labeling environment and product surface attribute parameters and calculating the deviation value of the overlap by a preset compensation algorithm includes: Collect scene features of the labeling environment, including the shooting angle of the image acquisition device and the reflectivity parameters of the product surface; Analyze the product surface attribute parameters and extract the curvature radius when there is curvature feature on the product surface; The geometric projection compensation algorithm is used to calculate the deformation offset parameters of the QR code label contour according to the curvature radius and the shooting inclination angle; A deviation value analysis model is constructed, the reflectivity parameter and the deformation offset parameter are input into the deviation value analysis model, and the deviation value is output through the deviation value analysis model.

3. The intelligent identification and verification method for the production and labeling position of a two-dimensional code according to claim 1 is characterized in that: After the step of obtaining the scene characteristics of the labeling environment and the product surface attribute parameters, and before the step of calculating the deviation value of the overlap by using a preset compensation algorithm, the method further includes: Based on the overall image data, obtaining the color RGB value of the target product and the color RGB value of the QR code label; Calculate the color difference between the target product and the QR code label according to the RGB value of the color. Based on the calculation results, when the color difference between the two is lower than the preset visual distinction threshold, it is determined to be a scene with similar colors; According to the scene with similar colors, switch to the multispectral image acquisition mode to obtain image data containing infrared or ultraviolet bands; Reconstruct the QR code label outline based on multispectral data to replace the outline data in the original visible light image; The initial overlap is updated according to the overlapping area between the reconstructed QR code label outline and the positioning frame.

4. The intelligent identification and verification method for the production and labeling position of a two-dimensional code according to claim 1, characterized in that: After the step of calculating the overlapping area ratio of the two-dimensional code label outline and the positioning frame in the overall image data by the spatial mapping model as the initial overlap, the method further includes: Calculating the degree of closure of the outline of the two-dimensional code label; Based on the calculated results, the closure degree of the QR code label outline is analyzed; If the degree of closure of the outline of the two-dimensional code label is lower than a preset integrity threshold, it is determined that the overall image data of the two-dimensional code label is blocked or contaminated; Extract the key points of the contour of the unobstructed area and reconstruct the contour of the incomplete QR code label through the curve fitting algorithm; Update the initial overlap based on the reconstructed QR code label contour; If the improvement rate of the updated initial overlap compared to the original value is less than the preset repair threshold, a manual re-inspection signal is triggered; Otherwise, continue to execute the steps of obtaining scene features and calculating deviation values.

5. The intelligent identification and verification method for the production and labeling position of a two-dimensional code according to claim 2, characterized in that: Before the step of inputting the reflectivity parameter and the deformation offset parameter into the deviation value analysis model, the method further includes: Real-time collection of ambient light intensity; When the light intensity is greater than or equal to a preset light intensity threshold, activating the polarized light filter; According to the light intensity and the state of the polarization filter, the calibrated reflectivity parameter is calculated, and the calibrated reflectivity parameter is input into the deviation value analysis model.

6. The intelligent identification and verification method for the production and labeling position of a two-dimensional code according to claim 2, characterized in that: Before the step of inputting the reflectivity parameter and the deformation offset parameter into the deviation value analysis model, the method further includes: Obtaining a curvature change rate of the surface of the product; If the curvature change rate of the product surface is greater than a preset curvature change rate threshold, the product surface is divided into multiple grid areas; The local deformation offset parameters are calculated independently for each mesh region, and the offset parameters of each mesh region are input into the deviation value analysis model.

7. The intelligent identification and verification method for the production and labeling position of a two-dimensional code according to claim 2, characterized in that: Before the step of inputting the reflectivity parameter and the deformation offset parameter into the deviation value analysis model, the method further includes: Obtaining the radius of curvature of the surface of the product; When it is detected that the curvature radius of the product surface is less than or equal to the preset minimum curvature radius threshold, the high curvature compensation mode is activated; Reconstruct the 3D contour of the product surface through multi-view image fusion algorithm; The deformation offset parameters are corrected based on the reconstructed three-dimensional contour, and the corrected deformation offset parameters are input into the deviation value analysis model.

8. An intelligent identification and verification system for the production and labeling position of a two-dimensional code, characterized in that: include: The acquisition module is used to acquire the overall image data of the target product in real time; A recognition module, for recognizing product reference features in the overall image data according to the overall image data, and dynamically generating a positioning frame matching the product; An extraction module, used to extract the outline of the two-dimensional code label according to the overall image data and calculate its geometric center point; An establishment module is used to establish a spatial mapping model between the geometric center point and the positioning frame, and calculate the overlapping area ratio of the two-dimensional code label outline and the positioning frame in the overall image data through the spatial mapping model as an initial overlap degree; An acquisition module is used to obtain scene features of the labeling environment and product surface attribute parameters, and calculate the deviation value of the overlap through a preset compensation algorithm; A judgment module, used to correct the initial overlap based on the deviation value, and judge whether the corrected deviation value is greater than a preset deviation threshold; The correction module is used to determine that the labeling position is correct if the overlap degree after correction is greater than a preset deviation threshold.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Cultural relic disassembling relative position verification method based on QR code

    CN111553341A

  • Label printing positioning method and device, equipment and storage medium

    CN116681913A

  • High-speed article visual detection method based on artificial intelligence

    CN118134923A

  • Hand bag bar code printing position detection method and device and storage medium

    CN119378584A

  • Two-dimensional code reading system and two-dimensional code

    JP2024010275A

Cited By

  • Automatic labeling mechanism and visual compensation method

    CN120423143A