Method and system for detecting levelness of wood-plastic plate label
Through the comprehensive methods of image edge recognition, particle coordinate comparison, tangent angle analysis and convolutional neural network technology, the existing wood plastic board labeling level detection efficiency and low accuracy are solved, and high-precision labeling quality detection and automated sorting are realized.
Patent Information
- Application Number
- CN202411824602.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing wood-plastic board level detection method has low efficiency and low accuracy, and is easily affected by subjective factors, resulting in deviations in the detection results.
A comprehensive method including image edge recognition, particle coordinate alignment, tangent angle analysis and convolutional neural network technology is adopted to build a qualified labeling model through image processing and deep learning technology, obtain a level evaluation index, and conduct a comprehensive evaluation.
It improves the accuracy and efficiency of label level detection, reduces the error of manual detection, realizes high-precision evaluation and automated sorting of label quality, and improves the detection reliability and efficiency of the production line.
Smart Images

Figure CN119831937A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of label detection, and in particular to a method and system for detecting the levelness of a wood-plastic board label. Background Art
[0002] In the field of intelligent manufacturing and automated testing, image processing technology is increasingly used in quality control and product testing. In the manufacturing industry, especially in industrial applications involving the production of wood plastic composite materials (WPC), the precise fitting of labels (labels, markings, etc.) is one of the key links to ensure product quality. Specifically in the field of labeling of wood plastic boards, ensuring the accuracy and consistency of labels is not only related to the aesthetics of the product appearance, but also involves the accurate communication of information during the sales and user use of the product. In the production process of wood plastic boards, the horizontality detection of labels is a key technical indicator used to evaluate whether the labels are attached to the surface of the material at the correct angle and position.
[0003] There are many limitations in the commonly used methods for detecting the levelness of wood-plastic board labels. In the traditional methods for detecting the levelness of wood-plastic board labels, judgment is mainly based on manual inspection or simple image processing technology, which has the disadvantages of low detection efficiency, low accuracy and the results are easily affected by subjective factors, which can easily lead to deviations in the detection results. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a method and system for detecting the levelness of a wood-plastic board label, which solves the problems in the above-mentioned background technology.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for detecting the levelness of a wood-plastic board label comprises the following steps:
[0006] S1. Establish a plane coordinate system in the testing platform in advance, obtain the image of the wood-plastic board to be tested through the image detector, and obtain the label area in the image of the wood-plastic board to be tested through image edge recognition;
[0007] S2, based on the image edge recognition in S1, to identify and obtain several groups of edge pixel points in the label area, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, and compare the particle coordinates Zd (a1, b1) of the label area with the particle coordinates Zd (a2, b2) of the label in the standard wood-plastic board to preliminarily judge the qualified status of the wood-plastic board label. If qualified, an edge detection instruction is issued externally;
[0008] S3, after receiving the edge detection instruction, analyze whether the several groups of edge pixel points obtained in S2 coincide with the corresponding edge pixel points of the standard wood-plastic board inner label. If they coincide, set a neighborhood window at each edge pixel point in S2, and analyze and calculate the tangent angle Qjjd at each edge pixel point in S2 based on the setting of the neighborhood window at each edge pixel point. According to the value of the tangent angle Qjjd at each edge pixel point, determine whether the corresponding edge pixel point has an angle tilt phenomenon;
[0009] S4, based on S3, if the groups of edge pixel points obtained in S2 do not overlap with the corresponding edge pixel points of the label inside the standard wood-plastic board, then according to the wood-plastic board image to be detected, the surface smoothness Bphd of the label area in the wood-plastic board image to be detected is analyzed and calculated;
[0010] S5. Use convolutional neural network technology to build a qualified label model. Input the surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3 into the qualified label model, and after linear normalization, fit to obtain the levelness evaluation index Pjzs. Compare the levelness evaluation index Pjzs with the preset evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and take corresponding sorting measures based on the estimation results.
[0011] Preferably, the specific steps of S1 include:
[0012] S11, pre-establishing a plane coordinate system in the testing platform, and placing the wood-plastic board to be tested on the testing platform, so as to obtain an image of the wood-plastic board to be tested by an image detector;
[0013] S12, performing image preprocessing on the wood-plastic board image to be detected obtained in S11 to convert the wood-plastic board image to be detected into a grayscale image, extracting the label edge in the converted wood-plastic board image to be detected by using the Canny edge detection technology, obtaining each edge pixel point, and obtaining the label area in the wood-plastic board image to be detected based on the label edge.
[0014] Preferably, the specific step S1 also includes:
[0015] S13, convert each edge pixel point in S12 into the Hough space, and construct a corresponding sine curve for each edge pixel point in combination with the polar coordinate equation, and monitor different points in the Hough space to detect whether the sine curves at each point intersect. If so, it is determined that there is a straight line at the edge of the current labeling area, and the number of intersecting sine curves at the corresponding point is recorded. By statistics, the point with the largest number of intersecting sine curves is extracted and used as the parameter of the straight line in the image space, and the point with the largest number of intersecting sine curves is marked as the node Jd (Dj, Jd);
[0016] S14. Based on the extracted node Jd (Dj, Jd), identify the straight line at the edge of the labeling area in the image space. The specific identification method is as follows:
[0017] S141, select two coordinate points in the image space as the first coordinate I (0, y) and the second coordinate I (x, 0), and combine the polar coordinate equation to respectively calculate the y value in the first coordinate I (0, y) and the x value in the second coordinate I (x, 0). The specific solution is as follows:
[0018] S1411. The y value in the first coordinate I (0, y) is obtained by setting the x in the first coordinate to 0 and finding the corresponding Where Dj represents the shortest distance from a straight line to the origin in the image space; Jd represents the angle between the vertical line and the horizontal axis;
[0019] S1412, the x value in the second coordinate I (x, 0) is obtained by setting the y value in the second coordinate to 0 and finding the corresponding
[0020]
[0021] S142: Based on the y value in the first coordinate I(0, y) and the x value in the second coordinate I(x, 0) obtained in S1411 and S1412, identify the straight line at the edge of the labeling area in the image space.
[0022] Preferably, the specific steps of S2 include:
[0023] S21, based on the image edge recognition in S1, to identify and obtain several groups of edge pixel points in the label area, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, specifically in the following way:
[0024]
[0025] Where N is the number of edge pixels, i = 1, 2, 3, ..., N, x i Represented as the X-axis coordinate value of the i-th edge pixel, y i Represented as the Y-axis coordinate value of the i-th edge pixel;
[0026] S22, pre-acquire the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, and compare it with the particle coordinates Zd (a1, b1) of the label area to preliminarily judge the qualified state of the wood-plastic board label. The specific comparison content is: if the particle coordinates Zd (a1, b1) of the label area coincide with the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, it is judged that the wood-plastic board label is temporarily in a qualified state, and an edge detection instruction will be issued outward at this time; if the particle coordinates Zd (a1, b1) of the label area do not coincide with the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, it is judged that the wood-plastic board label is not in a qualified state, and a second sorting instruction will be issued outward at this time.
[0027] Preferably, the specific steps of S3 include:
[0028] S31, after receiving the edge detection instruction, analyzing whether the groups of edge pixel points obtained in S2 coincide with the corresponding edge pixel points of the standard wood-plastic board inner label;
[0029] S32, if they overlap, set a 3*3 neighborhood window at each edge pixel point in S2, and obtain the X-axis brightness change vector Lb in each neighborhood window based on the neighborhood window set at each edge pixel point x and Y-axis brightness change vector Lb y ; Based on the X-axis brightness change vector Lb in each neighborhood window x and Y-axis brightness change vector Lb y , in order to analyze and calculate the horizontal gradient St and vertical gradient Ct at each edge pixel in the image space, which can be obtained in the following way:
[0030]
[0031] In the formula, Rt(x+j, y+k) represents the pixel value of each adjacent point in the neighborhood window corresponding to the corresponding edge pixel point, Lb x Represented as the X-axis brightness change vector Lb in each neighborhood window x , Lb y Represented as the Y-axis brightness change vector Lb in each neighborhood window y , the range of j is -1, 0 and 1, indicating movement from the center point to the left, the center point and the right; the range of k is -1, 0 and 1, indicating movement from the center point to the top, the center point and the bottom.
[0032] Preferably, the specific step S3 also includes:
[0033] S33, based on the straight line at the edge of the labeling area in the image space identified in S142, the straight line is used as the principal axis in the principal component analysis, and the slope value Xz of the principal axis is obtained, by comparing the slope value Xz of the principal axis with the slope of the corresponding straight line in the labeling area of the standard wood-plastic board. If the slope value Xz of the principal axis is the same as the slope of the corresponding straight line in the labeling area of the standard wood-plastic board, it is preliminarily determined that there is no tilt state in the labeling area in the current image space, and a secondary analysis instruction will be issued at this time; if the slope value Xz of the principal axis is different from the slope of the corresponding straight line in the labeling area of the standard wood-plastic board, it is preliminarily determined that there is a tilt state in the labeling area in the current image space, and a second sorting instruction will be issued outward at this time;
[0034] S34, after receiving the secondary analysis instruction sent by S33, analyze and calculate the tangent angle Qjjd at each edge pixel point in S2, which can be obtained in the following way:
[0035] Qjjd = atan2(Ct, St);
[0036] Where atan2 is a function that calculates angles;
[0037] S35, by comparing the tangent angle Qjjd at each edge pixel point in S2 with the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, to determine whether the corresponding edge pixel point has an angle tilt phenomenon; if the tangent angle Qjjd at each edge pixel point is ≠ the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, it will be determined that the corresponding edge pixel point has an angle tilt phenomenon; if the tangent angle Qjjd at each edge pixel point is equal to the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, it will be determined that the corresponding edge pixel point does not have an angle tilt phenomenon.
[0038] Preferably, the specific steps of S4 include:
[0039] S41, if the groups of edge pixel points obtained in S2 do not overlap with the corresponding edge pixel points of the label in the standard wood-plastic board, then according to the wood-plastic board image to be detected, the surface smoothness Bphd of the label area in the wood-plastic board image to be detected is analyzed and calculated, and is specifically obtained in the following manner:
[0040]
[0041] Where m represents the pixel value of each pixel in the label area of the wood-plastic board image to be detected, p = 1, 2, 3, ..., m, Xsz p It is represented as the pixel value of the pth pixel in the label area of the wood-plastic board image to be detected, Xsz avg It is represented by the average pixel value of all pixels in the label area of the wood-plastic board image to be detected.
[0042] Preferably, the specific steps of S5 include:
[0043] S51, through the surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3, combined with the qualified label model, after linear normalization processing, the levelness evaluation index Pjzs is obtained by fitting. The levelness evaluation index Pjzs is obtained by the following formula:
[0044]
[0045] Wherein, F1 and F2 represent the weight values of the tangent angle Qjjd and the surface smoothness Bphd respectively, and V represents the correction constant. The specific values of F1 and F2 are set by the user according to the situation.
[0046] Preferably, the specific step S5 also includes:
[0047] S52, pre-set the evaluation threshold H, wherein the evaluation threshold H includes the first evaluation threshold H1 and the second evaluation threshold H2, and the first evaluation threshold H1> the second evaluation threshold H2, and compare the levelness evaluation index Pjzs with the evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and the specific comparison content is as follows:
[0048] If the levelness evaluation index Pjzs≤No.2 evaluation threshold value H2, the current wood-plastic board label will be comprehensively judged to be in a qualified state, and No.1 sorting instruction will be issued to the outside to transport the current wood-plastic board to the qualified frame area through the conveying device;
[0049] If the second evaluation threshold H2 is less than the levelness evaluation index Pjzs ≤ the first evaluation threshold H1, the qualified status of the current wood-plastic board label will be comprehensively estimated, and the first sorting instruction will be issued to the outside to transport the current wood-plastic board to the qualified frame area through the conveying device;
[0050] If the levelness evaluation index Pjzs> the first evaluation threshold H1, it will be comprehensively judged that the current wood-plastic board label is not in a qualified state. At this time, a second sorting instruction will be issued to the outside to transport the current wood-plastic board to the unqualified frame area through the conveying device, waiting for manual inspection.
[0051] A levelness detection system for a wood-plastic board label, comprising an image capture module, a preliminary investigation module, a direction analysis module, a three-dimensional analysis module and a detection feedback module;
[0052] The image capture module is used to establish a plane coordinate system in the detection platform in advance, obtain the image of the wood-plastic board to be detected through the image detector, and obtain the label area in the image of the wood-plastic board to be detected through image edge recognition;
[0053] The preliminary screening module is used to identify and obtain several groups of edge pixel points in the label area based on the image edge recognition in the image capture module, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, and compare the particle coordinates Zd (a1, b1) of the label area with the particle coordinates Zd (a2, b2) of the label in the standard wood-plastic board to preliminarily judge the qualified state of the wood-plastic board label. If qualified, an edge detection instruction is issued externally;
[0054] The direction analysis module is used to analyze whether the groups of edge pixel points obtained in the preliminary screening module coincide with the corresponding edge pixel points of the standard wood-plastic board inner label after receiving the edge detection instruction. If they coincide, a neighborhood window is set at each edge pixel point in the preliminary screening module. Based on the neighborhood window set at each edge pixel point, the tangent angle Qjjd at each edge pixel point in the preliminary screening module is analyzed and calculated. According to the value of the tangent angle Qjjd at each edge pixel point, it is determined whether the corresponding edge pixel point has an angle tilt phenomenon;
[0055] The three-dimensional analysis module is used to analyze and calculate the surface smoothness Bphd of the label area in the image of the wood-plastic board to be detected based on the direction analysis module if the groups of edge pixel points obtained in the preliminary screening module do not coincide with the corresponding edge pixel points of the label in the standard wood-plastic board.
[0056] The detection feedback module is used to construct a qualified label model using convolutional neural network technology. The surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3 are input into the qualified label model, and after linear normalization processing, the horizontality evaluation index Pjzs is fitted and obtained. The horizontality evaluation index Pjzs is compared with the preset evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and take corresponding sorting measures based on the estimation result.
[0057] The present invention provides a method and system for detecting the levelness of a wood-plastic board label, which has the following beneficial effects:
[0058] (1) This method gradually improves the accuracy and efficiency of label levelness detection through multiple steps. First, the label area is obtained through image edge recognition to ensure the accuracy of label positioning. On this basis, by calculating the coordinates of the particle points in the label area and comparing them with the standard label, the preliminary judgment of the qualified status of the label is more intuitive and effective. This process effectively reduces the detection error caused by the offset of the label position, thereby improving the ability to accurately control the label position. Furthermore, this method uses convolutional neural network technology to construct a qualified label model, and further realizes high-precision evaluation of the label levelness by analyzing the surface smoothness Bphd of the label and the tangent angle Qjjd at the edge pixel point. Through linear normalization processing and calculation of the smoothness evaluation index Pjzs, this method can further quantitatively evaluate the flatness and levelness of the label and compare it with the preset evaluation threshold. This multi-level analysis method significantly improves the detection accuracy of the label quality and can more effectively identify the unqualified label, thereby providing strong technical support for the quality control of wood-plastic board products. In addition, this method automatically sorts out unqualified products through comprehensive evaluation results, reducing the error rate of manual inspection and improving overall production efficiency and inspection reliability.
[0059] (2) By converting the original image into a grayscale image through image preprocessing, and using the Canny edge detection technology to extract the label edge in the image, it is possible to effectively identify the obvious brightness change boundary in the image and form the outer contour line of the label. This method further improves the accuracy of edge detection, making each edge pixel point obtained more accurate, thereby ensuring the accuracy of label area recognition in subsequent steps. In Hough space, based on the polar coordinate equation, each edge pixel point is converted into a corresponding sine curve, and the intersection points of each sine curve are monitored, which can effectively detect the straight line features in the image. By extracting the points with the largest number of intersecting sine curves and marking them as nodes, the edge straight lines of the label area can be accurately located. This method uses the Hough transform to efficiently and accurately detect straight lines in the image space, further reducing the complex calculations and instability in traditional methods. In the image space, by selecting two coordinate points and combining the polar coordinate equation, the corresponding y value and x value are calculated respectively. This operation method makes it possible to clearly identify the straight line position of the edge of the label area in the image space. The straight line position serves as the basis for the subsequent analysis of the angle deviation. In short, this intelligent detection method effectively reduces the uncertainty of manual detection, improves detection efficiency and accuracy, and enables rapid quality sorting and screening in large-scale wood-plastic board production lines.
[0060] (3) By using the principal component analysis method in S33, the straight line at the edge of the label area is used as the principal axis, and based on the comparison of the slope value Xz of the principal axis with the slope of the straight line in the label area of the standard wood-plastic board, the tilt state of the label area can be accurately judged. This positioning method helps to accurately identify the position and direction of the label in the image space and improve the detection accuracy. Step S3 includes a multi-level analysis mechanism. When it is preliminarily judged that the label area is not tilted, the system will issue a secondary analysis instruction to further analyze the tangent angle Qjjd of each edge pixel point. This multi-level analysis mechanism can effectively reduce misjudgment and improve the reliability of judging the label state. By comparing the slope value of the principal axis and the tangent angle of each edge pixel point, the system can quickly identify whether there is an angle tilt phenomenon in the label area. Such an efficient recognition mechanism can significantly improve the speed and efficiency of label detection on the production line and reduce the time and cost of human intervention. When a tilt is detected in the label area, the system will automatically issue a second sorting instruction to sort the tilted wood-plastic board. This automated response mechanism reduces the need for manual judgment, reduces the error rate in the detection process, and improves the automation level of the overall detection process. In short, the analysis mechanism in step S3 not only relies on the main axis slope of the label area, but also deeply considers the local structure of the edge pixel points in the secondary analysis. This analysis method is flexible and can better cope with complex labeling situations, thereby improving the overall detection accuracy. Through systematic slope comparison and tangent angle analysis, it can ensure that the installation position and angle of the wood-plastic board label remain consistent during the production process. This consistency control is directly related to the stability of product quality, thereby improving the competitiveness of the final product in the market.
[0061] (4) After receiving the edge detection instruction, the system first analyzes whether the acquired edge pixel points coincide with the corresponding edge pixel points of the label in the standard wood-plastic board. This analysis step ensures the accuracy of the detection process and lays a solid foundation for the subsequent neighborhood feature extraction and tangent angle analysis. By setting the neighborhood window, the system not only pays attention to the edge pixel points themselves, but also analyzes the adjacent points around them. This detailed analysis of the local structure can effectively capture the detailed features of the image, thereby improving the overall image understanding ability. By calculating the tangent angle Qjjd and comparing it with the tangent angle at the corresponding edge pixel point of the label in the standard wood-plastic board, the system can effectively detect whether the label is tilted again. This tangent angle comparison method makes the detection more detailed and can promptly discover and correct possible deviations in the production process to ensure that the quality of the final product meets the standards. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of a method for detecting the levelness of a wood-plastic board label according to the present invention;
[0063] Figure 2 The present invention is a block diagram of a levelness detection system for a wood-plastic board label. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] Example 1
[0066] See also Figure 1 The present invention provides a method for detecting the levelness of a wood-plastic board label, comprising the following steps:
[0067] S1. Establish a plane coordinate system in the testing platform in advance, obtain the image of the wood-plastic board to be tested through the image detector, and obtain the label area in the image of the wood-plastic board to be tested through image edge recognition;
[0068] S2, based on the image edge recognition in S1, to identify and obtain several groups of edge pixel points in the label area, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, and compare the particle coordinates Zd (a1, b1) of the label area with the particle coordinates Zd (a2, b2) of the label in the standard wood-plastic board to preliminarily judge the qualified status of the wood-plastic board label. If qualified, an edge detection instruction is issued externally;
[0069] S3, after receiving the edge detection instruction, analyze whether the several groups of edge pixel points obtained in S2 coincide with the corresponding edge pixel points of the standard wood-plastic board inner label. If they coincide, set a neighborhood window at each edge pixel point in S2, and analyze and calculate the tangent angle Qjjd at each edge pixel point in S2 based on the setting of the neighborhood window at each edge pixel point. According to the value of the tangent angle Qjjd at each edge pixel point, determine whether the corresponding edge pixel point has an angle tilt phenomenon;
[0070] S4, based on S3, if the groups of edge pixel points obtained in S2 do not overlap with the corresponding edge pixel points of the label inside the standard wood-plastic board, then according to the wood-plastic board image to be detected, the surface smoothness Bphd of the label area in the wood-plastic board image to be detected is analyzed and calculated;
[0071] S5. Use convolutional neural network technology to build a qualified label model. Input the surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3 into the qualified label model, and after linear normalization, fit to obtain the levelness evaluation index Pjzs. Compare the levelness evaluation index Pjzs with the preset evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and take corresponding sorting measures based on the estimation results.
[0072] In this embodiment, by establishing a plane coordinate system in the detection table and using an image detector to perform image edge recognition, the method can accurately obtain the label area on the wood-plastic board to be detected. By comparing the edge pixel points and particle coordinates with the standard wood-plastic board label, the qualified state of the label can be preliminarily judged, which can not only effectively eliminate noise interference, but also grasp the accuracy of label positioning, and further introduce tangent angle analysis and surface smoothness calculation on this basis. This method calculates the tangent angle Qjjd at the edge pixel point through the neighborhood window, which helps to determine whether there is an angle tilt phenomenon at the edge of the label. If the edge pixel points do not overlap with the standard wood-plastic board label, a more comprehensive levelness detection index can be provided by calculating the surface smoothness Bphd of the label area. This multi-level comprehensive analysis can perform more detailed error analysis and deviation correction during the label detection process. This method constructs a qualified label model through convolutional neural network technology, takes the surface smoothness Bphd and the tangent angle Qjjd of the edge pixel points as input, and performs linear normalization processing to fit the levelness evaluation index Pjzs. This intelligent modeling method can adaptively optimize and update the detection algorithm, further enhancing the system's detection sensitivity and adaptability to different wood-plastic board labeling conditions. By comparing the levelness evaluation index Pjzs with the preset evaluation threshold H, a rapid comprehensive evaluation of the qualified status of the wood-plastic board label can be achieved, thereby effectively supporting the automated sorting process. This real-time and accurate quality control method not only reduces the need for manual intervention, but also improves the detection efficiency of the production line and the overall product quality pass rate. In general, this method significantly improves the detection accuracy, efficiency and automation level of wood-plastic board label levelness detection by combining image processing, geometric analysis, convolutional neural network and other technical means, and can provide wood-plastic board manufacturers with an efficient and reliable label quality control solution.
[0073] Example 2
[0074] Please refer to Figure 1 , specifically: S1 specific steps include:
[0075] S11, pre-establishing a plane coordinate system in the testing platform, and placing the wood-plastic board to be tested on the testing platform, so as to obtain an image of the wood-plastic board to be tested by an image detector;
[0076] S12, performing image preprocessing on the wood-plastic board image to be detected obtained in S11 to convert the wood-plastic board image to be detected into a grayscale image, extracting the label edge in the converted wood-plastic board image to be detected by using the Canny edge detection technology, obtaining each edge pixel point, which represents the obvious brightness change boundary in the image to form the outer contour line of the label, and obtaining the label area in the wood-plastic board image to be detected based on the label edge.
[0077] The specific steps of S1 also include:
[0078] S13, convert each edge pixel point in S12 into the Hough space, and construct a corresponding sine curve for each edge pixel point in combination with the polar coordinate equation, and monitor different points in the Hough space to detect whether the sine curves at each point intersect. If so, it is determined that there is a straight line at the edge of the current labeling area, and the number of intersecting sine curves at the corresponding point is recorded. By statistics, the point with the largest number of intersecting sine curves is extracted and used as the parameter of the straight line in the image space. At the same time, the point with the largest number of intersecting sine curves is marked as a node Jd (Dj, Jd); the image space here is the image of the wood-plastic board to be detected, and this is to better distinguish the Hough space;
[0079] S14. Based on the extracted node Jd (Dj, Jd), identify the straight line at the edge of the labeling area in the image space. The specific identification method is as follows:
[0080] S141, select two coordinate points in the image space as the first coordinate I (0, y) and the second coordinate I (x, 0), and combine the polar coordinate equation to respectively calculate the y value in the first coordinate I (0, y) and the x value in the second coordinate I (x, 0). The specific solution is as follows:
[0081] S1411. The y value in the first coordinate I (0, y) is obtained by setting the x in the first coordinate to 0 and finding the corresponding Where Dj is the shortest distance from the straight line to the origin in the image space, which can also be understood as the vertical distance of the straight line from the origin in the image space; Jd is the angle between the vertical line (the vertical line from the origin to the straight line) and the horizontal axis (X axis), which is usually expressed in radians or degrees, and the angle ranges from 0 to 180 degrees;
[0082] S1412, the x value in the second coordinate I (x, 0) is obtained by setting the y value in the second coordinate to 0 and finding the corresponding
[0083]
[0084] S142: Based on the y value in the first coordinate I(0, y) and the x value in the second coordinate I(x, 0) obtained in S1411 and S1412, identify the straight line at the edge of the labeling area in the image space.
[0085] Wherein, the polar coordinate equation is Dj=x*cos(Jd)+y*sin(Jd);
[0086] In this embodiment, by using the Canny edge detection technology in the image preprocessing process, the label edge in the converted wood-plastic board image to be detected can be effectively extracted. The technology can capture the obvious brightness change boundary in the image, thereby forming the outer contour line of the label. This accurate edge detection method ensures that when obtaining the label area, it can reduce misjudgment and noise interference, and improves the accuracy of detection. After converting each edge pixel point to the Hough space, the system uses the polar coordinate equation to construct the corresponding sine curve for these points, and accurately identifies the straight line at the edge of the label area by monitoring the intersection points in the Hough space. This method enables the straight line feature to be accurately found even in the presence of noise or deformation, thereby enhancing the robustness of straight line detection. By detecting the points where the sine curves intersect the most in the Hough space and marking them as nodes, this method can not only identify the straight lines at the edge of the label area, but also quantify these straight lines. The most dense intersection points are used as the parameters of the straight line to ensure the reliability of straight line detection in the image space, which provides a solid data foundation for subsequent analysis. The polar coordinate method is used to obtain the first and second coordinates in the image space respectively, and the coordinate values of these points are calculated through specific solution steps. The straight line detection results in the Hough space can be effectively mapped back to the original image space. This method makes the conversion from the Hough space to the image space more accurate, so that the horizontality and tilt state of the edge of the label area can be more accurately judged. By identifying and marking the straight line at the edge of the label area, combined with the calculated straight line parameters and the coordinate point position in the image space, the horizontality of the wood-plastic board label can be more accurately analyzed. This method can not only identify the tilt or deviation of the label in time, but also use this information to provide support for subsequent horizontality detection and adjustment, thereby improving the reliability and efficiency of the entire detection process. Overall, this method significantly improves the accuracy and stability of the horizontality detection of wood-plastic board labels by integrating Canny edge detection technology, Hough transform and polar coordinate analysis methods. This innovative multi-step process can maintain consistent detection results under different environmental conditions, providing an efficient and accurate solution for the quality control of wood-plastic board labels.
[0087] Example 3
[0088] Please refer to Figure 1 , specifically: S2 specific steps include:
[0089] S21, based on the image edge recognition in S1, to identify and obtain several groups of edge pixel points in the label area, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, specifically in the following way:
[0090]
[0091] Where N is the number of edge pixels, i = 1, 2, 3, ..., N, x i Represented as the X-axis coordinate value of the i-th edge pixel, y i Represented as the Y-axis coordinate value of the i-th edge pixel;
[0092] S22, pre-acquire the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, and compare it with the particle coordinates Zd (a1, b1) of the label area to preliminarily judge the qualified state of the wood-plastic board label. The specific comparison content is: if the particle coordinates Zd (a1, b1) of the label area coincide with the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, it is judged that the wood-plastic board label is temporarily in a qualified state, and an edge detection instruction will be issued outward at this time; if the particle coordinates Zd (a1, b1) of the label area do not coincide with the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, it is judged that the wood-plastic board label is not in a qualified state, and a second sorting instruction will be issued outward at this time.
[0093] In this embodiment, by using a formula to calculate the coordinates of the particles in the label area based on image edge recognition, the actual position of the label in the image can be accurately located. The calculation method of the particle coordinates is based on the distribution of edge pixels, taking into account the positions of all pixels. Such an algorithm can effectively reduce the impact of image noise on label position recognition, making the calculation results of the particle coordinates more accurate and reliable. By using the particle coordinates of the label in the standard wood-plastic board obtained in advance and accurately comparing them with the particle coordinates of the current label area, this method can effectively determine the qualified status of the wood-plastic board label. This comparison method can quickly screen out unqualified labels by determining whether the particle coordinates coincide, greatly reducing the subsequent complex detection workload and improving the efficiency of the entire detection process. When the coordinates of the particle points in the label area coincide with the coordinates of the standard particle points, the system will immediately issue an edge detection instruction to indicate that the current label area meets the preliminary inspection requirements; if the particle point coordinates do not coincide, the system will issue a second sorting instruction to quickly sort out the unqualified label area. This multi-level detection mechanism can not only identify label quality problems in a timely manner, but also further improve the detection and sorting speed through a flexible instruction response mechanism. By combining the edge detection and particle point coordinate comparison methods, the misjudgment caused by label position offset or irregularity can be significantly reduced. This method makes the wood-plastic board label detection process more scientific and automated through precise calculation and intelligent comparison, avoiding errors caused by human intervention and greatly improving the quality inspection efficiency of the production line. In summary, through the precise calculation of particle point coordinates and comparative evaluation with standard particle point coordinates, this detection method has significant advantages in label position identification and qualification judgment. It can achieve rapid automated detection and sorting while ensuring high precision, thereby significantly improving the overall detection efficiency and quality control capabilities of wood-plastic board labels.
[0094] Example 4
[0095] Please refer to Figure 1 , specifically: S3 specific steps include:
[0096] S31, after receiving the edge detection instruction, analyzing whether the groups of edge pixel points obtained in S2 coincide with the corresponding edge pixel points of the standard wood-plastic board inner label;
[0097] S32, if they overlap, then set a 3*3 neighborhood window at each edge pixel point in S2, which includes 8 neighboring points around the corresponding edge pixel point. This window can help us understand the local structure of the point. Based on setting the neighborhood window at each edge pixel point, obtain the X-axis brightness change vector Lb in each neighborhood window x and Y-axis brightness change vector Lb y , through the X-axis brightness change vector Lb in each neighborhood window xand Y-axis brightness change vector Lb y , we can obtain the local features of the point; based on the X-axis brightness change vector Lb in each neighborhood window x and Y-axis brightness change vector Lb y , in order to analyze and calculate the horizontal gradient St and vertical gradient Ct at each edge pixel in the image space, which can be obtained in the following way:
[0098]
[0099] In the formula, Rt(x+j, y+k) represents the pixel value of each adjacent point in the neighborhood window corresponding to the corresponding edge pixel point, Lb x Represented as the X-axis brightness change vector Lb in each neighborhood window x , Lb y Represented as the Y-axis brightness change vector Lb in each neighborhood window y , the range of j is -1, 0 and 1, indicating movement from the center point to the left, the center point and the right; the range of k is -1, 0 and 1, indicating movement from the center point to the top, the center point and the bottom.
[0100] Among them, the X-axis brightness change vector Lb in each neighborhood window x and Y-axis brightness change vector Lb y It is obtained based on the Sobel operator, and its specific expression is as follows:
[0101] X-axis brightness change vector The weight of the upper pixel is negative, emphasizing its suppression of the edge of the image; the weight of the middle pixel is zero, indicating that it has no effect on it; the weight of the lower pixel is positive, enhancing the influence of the lower area.
[0102] X-axis brightness change vector Lb x Used to detect changes in the horizontal direction of the image. When the X-axis brightness change vector Lb is applied to the image x When , it emphasizes the grayscale changes from left to right;
[0103] Y-axis brightness change vector The pixel weight on the left is negative, which enhances its suppression of the image edge; the pixel weight in the middle is zero, indicating that it has no effect on the point; the pixel weight on the right is positive, emphasizing the influence of the right area.
[0104] Y-axis brightness change vector Lb y Used to detect vertical changes in an image, it emphasizes grayscale changes from top to bottom.
[0105] The specific steps of S3 also include:
[0106] S33, based on the straight line at the edge of the labeling area in the image space identified in S142, the straight line is used as the principal axis in the principal component analysis (PCA), and the slope value Xz of the principal axis is obtained, by comparing the slope value Xz of the principal axis with the slope of the corresponding straight line in the labeling area of the standard wood-plastic board. If the slope value Xz of the principal axis is the same as the slope of the corresponding straight line in the labeling area of the standard wood-plastic board, it is preliminarily determined that there is no tilt state in the labeling area in the current image space, and a secondary analysis instruction will be issued at this time; if the slope value Xz of the principal axis is different from the slope of the corresponding straight line in the labeling area of the standard wood-plastic board, it is preliminarily determined that there is a tilt state in the labeling area in the current image space, and a second sorting instruction will be issued outward at this time;
[0107] S34, after receiving the secondary analysis instruction sent by S33, analyze and calculate the cut-off points at each edge pixel point in S2
[0108] The line angle Qjjd can be obtained by:
[0109] Qjjd = atan2(Ct, St);
[0110] Where atan2 is a function that calculates angles. It can correctly handle situations in different quadrants and is used to calculate the arc tangent of two numbers to determine the angle of a point on a plane.
[0111] S35, by comparing the tangent angle Qjjd at each edge pixel point in S2 with the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, to determine whether the corresponding edge pixel point has an angle tilt phenomenon; if the tangent angle Qjjd at each edge pixel point is ≠ the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, it will be determined that the corresponding edge pixel point has an angle tilt phenomenon; if the tangent angle Qjjd at each edge pixel point is equal to the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, it will be determined that the corresponding edge pixel point does not have an angle tilt phenomenon.
[0112] In this embodiment, after receiving the edge detection instruction, the system can analyze whether the edge pixel points obtained in S2 coincide with the corresponding edge pixel points of the label in the standard wood-plastic board. This precise matching mechanism ensures the effectiveness of the label, thereby improving the reliability and accuracy of the entire detection system and providing a solid data foundation for subsequent quality control. When the edge pixel points are detected to coincide, the system sets a 3×3 neighborhood window to analyze the local structure of these edge pixel points. By obtaining the brightness change vectors of the X-axis and Y-axis in the neighborhood window, the local features of each edge pixel point can be fully understood. This in-depth feature analysis helps identify potential quality problems and provides necessary information for subsequent judgments. By calculating the horizontal and vertical gradients of each edge pixel point in the image space, the system can effectively obtain subtle changes in the image. These gradient information is crucial for identifying the shape of the label, edge clarity, and other features that may affect the quality, and lays a data foundation for subsequent judgments and processing. By analyzing and calculating the tangent angles of each edge pixel point in S2, the system can monitor the angle changes of the edge in real time. This tangent angle detection can effectively identify whether the label has a tilt phenomenon, which is crucial for maintaining the overall quality and aesthetics of the label. By comparing the tangent angle of each edge pixel point with the tangent angle of the corresponding edge pixel point of the standard wood-plastic board label, the system can automatically determine whether there is an angle tilt phenomenon. This automated process reduces the necessity of manual intervention and can accurately identify and feedback unqualified labels in real time, thereby improving the overall efficiency of the production line. Overall, this method not only improves the detection accuracy of wood-plastic board labels, but also significantly enhances quality control capabilities through precise edge detection, detailed local feature analysis, and accurate angle monitoring. The rapid feedback mechanism can promptly handle unqualified products, reduce production costs, improve product quality, and ensure that the final product meets standard requirements.
[0113] Example 5
[0114] Please refer to Figure 1 , specifically: S4 specific steps include:
[0115] S41, if the groups of edge pixel points obtained in S2 do not overlap with the corresponding edge pixel points of the label in the standard wood-plastic board, then according to the wood-plastic board image to be detected, the surface smoothness Bphd of the label area in the wood-plastic board image to be detected is analyzed and calculated, and is specifically obtained in the following manner:
[0116]
[0117] Where m represents the pixel value of each pixel in the label area of the wood-plastic board image to be detected, p = 1, 2, 3, ..., m, Xsz pIt is represented as the pixel value of the pth pixel in the label area of the wood-plastic board image to be detected, Xsz avg It is represented by the average pixel value of all pixels in the label area of the wood-plastic board image to be detected.
[0118] The pixel value at each pixel point mentioned above can be obtained by converting light into an electrical signal through a CMOS sensor, and then converting it into a digital signal to obtain the value of each pixel.
[0119] In this embodiment, by calculating the surface smoothness Bphd of the label area in the image of the wood-plastic board to be detected, this step can quantitatively analyze the surface smoothness of the label. This quantification process provides a reliable indicator for product quality control, helping manufacturers to timely identify products with insufficient surface smoothness during the production process, so as to take corresponding improvement measures. When obtaining the pixel value of each pixel point in the label area, the system can calculate the average pixel value of the area by analyzing the values at all pixel points. This precise pixel value analysis ensures that the data used for judging the surface smoothness is more reliable and accurate, and reduces the erroneous judgment caused by data deviation. When the label area does not overlap with the edge pixel points of the standard wood-plastic board, by analyzing the surface smoothness, the system can intelligently judge the quality status of the label area. This intelligent detection mechanism enables the production line to quickly identify problematic products and remove or rework them, thereby improving overall production efficiency and reducing the outflow of unqualified products. The surface smoothness Bphd calculated in this step can provide data support for subsequent process improvements. When it is found during the production process that the smoothness of a batch of products is lower than the standard, the manufacturer can use this data to analyze the reasons and adjust the production process to ensure that the quality of subsequent products meets the requirements. By continuously monitoring the surface smoothness of the label area, the system can ensure that the surface quality of each piece of wood-plastic board meets the standard, thereby improving the consistency of the product. This consistency is crucial to customer satisfaction, can enhance customer trust in the brand, and promote word-of-mouth communication. In summary, through the calculation of the surface smoothness Bphd of the label area of the wood-plastic board to be tested, this step has significant positive effects in product quality control, production efficiency improvement, establishment of intelligent detection mechanism and subsequent process improvement. These effects can not only ensure the high quality of the final product, but also enhance customer satisfaction and brand competitiveness.
[0120] Example 6
[0121] Please refer to Figure 1 Specifically: S5 includes the following steps:
[0122] S51, through the surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3, combined with the qualified label model, after linear normalization processing, the levelness evaluation index Pjzs is obtained by fitting. The levelness evaluation index Pjzs is obtained by the following formula:
[0123]
[0124] In the formula, F1 and F2 represent the weight values of the tangent angle Qjjd and the surface smoothness Bphd respectively, and V represents the correction constant. The specific values of F1 and F2 are set by the user according to the situation, and the weight values can be obtained by referring to the hierarchical analysis method;
[0125] Among them, the convolutional neural network technology is used to construct the initial model, and the initial model is trained and tested with the surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point, and the trained initial model is used as the state recognition model, and the feature information in the state recognition model is obtained respectively, and the state recognition model is trained and tested with the obtained feature information, and the trained state recognition model is used as the qualified label model in combination with the edge detection instructions and secondary analysis instructions issued by the system.
[0126] The specific steps of S5 also include:
[0127] S52, pre-set the evaluation threshold H, wherein the evaluation threshold H includes the first evaluation threshold H1 and the second evaluation threshold H2, and the first evaluation threshold H1> the second evaluation threshold H2, and compare the levelness evaluation index Pjzs with the evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and the specific comparison content is as follows:
[0128] If the levelness evaluation index Pjzs≤No.2 evaluation threshold value H2, the current wood-plastic board label will be comprehensively judged to be in a qualified state, and No.1 sorting instruction will be issued to the outside to transport the current wood-plastic board to the qualified frame area through the conveying device;
[0129] If the second evaluation threshold H2 is less than the levelness evaluation index Pjzs ≤ the first evaluation threshold H1, the qualified status of the current wood-plastic board label will be comprehensively estimated, and the first sorting instruction will be issued to the outside to transport the current wood-plastic board to the qualified frame area through the conveying device;
[0130] If the levelness evaluation index Pjzs> the first evaluation threshold H1, it will be comprehensively judged that the current wood-plastic board label is not in a qualified state. At this time, a second sorting instruction will be issued to the outside to transport the current wood-plastic board to the unqualified frame area through the conveying device, waiting for manual inspection.
[0131] It should be noted that the hierarchical analysis method is a combination of qualitative and quantitative analysis methods. It can decompose complex problems into multiple levels. By comparing the importance of factors at each level, it can help decision makers make decisions on complex problems and determine the final decision plan. In this process, the hierarchical analysis method can be used to determine the weight values of these indicators.
[0132] In this embodiment, by combining the surface smoothness Bphd and the tangent angle Qjjd, the horizontality evaluation index Pjzs obtained by linear normalization can reflect the quality of the label in multiple aspects on the basis of excluding serious quality standards. This comprehensive evaluation method ensures the accuracy and reliability of the test results, and further avoids the judgment deviation that may be caused by relying on a single indicator. The method allows the user to set the weight value according to the actual situation and flexibly adjust the importance of the tangent angle and surface smoothness in the horizontality evaluation. This flexibility enables the detection method to adapt to different production environments and standard requirements, and improves its wide application and practicality. By setting the No. 1 evaluation threshold and the No. 2 evaluation threshold, the method provides a clear boundary for the qualified state of the label. This clear standard helps to make quick decisions, ensure that unqualified products can be handled in time during the production process, and reduce the impact on subsequent processes. The automatic sorting instructions issued according to the horizontality evaluation index Pjzs can significantly improve production efficiency. Qualified wood-plastic boards can be directly transported to the qualified frame area, while unqualified products enter the unqualified frame area to wait for manual inspection, thereby effectively reducing the need for manual intervention and improving the automation level of the overall production process. This method makes the quality control in the production process more dynamic and flexible by real-time monitoring of the levelness evaluation index. Real-time data feedback helps to promptly identify potential problems and take corrective measures to ensure that products always meet quality standards. By automatically judging the qualified status, the errors that may occur in manual sorting are reduced. This method of reducing human intervention ensures higher accuracy and consistency of products during the sorting process. Efficient label detection and qualified status assessment mechanism can improve product consistency and reliability, thereby improving customer satisfaction and market competitiveness. In summary, step S5 obtains the levelness evaluation index and sets the qualified standard by comprehensively analyzing the surface smoothness and tangent angle, which not only improves the quality inspection efficiency of wood-plastic board labels, but also provides enterprises with flexible and reliable quality control methods. This series of measures will bring significant benefits to the production management of enterprises and improve the overall production quality and efficiency.
[0133] By combining the surface smoothness Bphd and the tangent angle Qjjd, and using the horizontality evaluation index Pjzs obtained after linear normalization, the quality of the label can be comprehensively evaluated. This multi-dimensional evaluation method reduces the deviation that may be caused by a single indicator and improves the scientific nature of the evaluation. Users can set the weight values of the tangent angle and surface smoothness, as well as the correction constant according to actual conditions. This flexibility allows companies to adjust the evaluation model according to different production standards and needs to better adapt to market changes and customer needs. Through the preset No. 1 and No. 2 evaluation thresholds H, the qualified status of the label becomes clear and operational. This hierarchical evaluation standard enables the production line to make decisions quickly, reduces the time of manual intervention, and improves production efficiency. The comparison of the evaluation thresholds can provide real-time feedback on the qualified status of the label. If an unqualified situation occurs, a No. 2 sorting instruction will be issued to sort the unqualified wood-plastic board into the unqualified frame area. This real-time monitoring and feedback mechanism can effectively prevent unqualified products from entering the market, thereby enhancing brand reputation. Based on the rapid evaluation of the levelness evaluation index Pjzs, the production line can efficiently sort qualified and unqualified wood-plastic boards, reducing rework and waste caused by unqualified products, thereby significantly improving overall production efficiency. For unqualified wood-plastic boards, the system automatically sorts them into the unqualified frame area and waits for manual inspection. This automated sorting process can reduce the pressure of manual inspection, improve inspection efficiency, and ensure product quality. By collecting and analyzing relevant data on the levelness evaluation index Pjzs and evaluation thresholds, enterprises can establish a more scientific quality management system. This data-driven management method helps to formulate more effective quality control strategies and promote the continuous improvement and development of enterprises. In summary, the evaluation of the qualified status of the label in step S5 not only realizes the scientific evaluation of the quality of wood-plastic boards, but also improves production efficiency and product quality through flexible weight adjustment, clear judgment criteria and real-time feedback mechanism, providing strong support for enterprises in the fiercely competitive market.
[0134] Example 7
[0135] Please refer to Figure 2 ,Specifically: A levelness detection system for a wood-plastic board label includes an image capturing module, a preliminary investigation module, a direction analysis module, a three-dimensional analysis module and a detection feedback module;
[0136] The image capture module is used to establish a plane coordinate system in the detection platform in advance, obtain the image of the wood-plastic board to be detected through the image detector, and obtain the label area in the image of the wood-plastic board to be detected through image edge recognition;
[0137] The preliminary screening module is used to identify and obtain several groups of edge pixel points in the label area based on the image edge recognition in the image capture module, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, and compare the particle coordinates Zd (a1, b1) of the label area with the particle coordinates Zd (a2, b2) of the label in the standard wood-plastic board to preliminarily judge the qualified state of the wood-plastic board label. If qualified, an edge detection instruction is issued externally;
[0138] The direction analysis module is used to analyze whether the groups of edge pixel points obtained in the preliminary screening module coincide with the corresponding edge pixel points of the standard wood-plastic board inner label after receiving the edge detection instruction. If they coincide, a neighborhood window is set at each edge pixel point in the preliminary screening module. Based on the neighborhood window set at each edge pixel point, the tangent angle Qjjd at each edge pixel point in the preliminary screening module is analyzed and calculated. According to the value of the tangent angle Qjjd at each edge pixel point, it is determined whether the corresponding edge pixel point has an angle tilt phenomenon;
[0139] The three-dimensional analysis module is used to analyze and calculate the surface smoothness Bphd of the label area in the image of the wood-plastic board to be detected based on the direction analysis module if the groups of edge pixel points obtained in the preliminary screening module do not coincide with the corresponding edge pixel points of the label in the standard wood-plastic board.
[0140] The detection feedback module is used to construct a qualified label model using convolutional neural network technology. The surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3 are input into the qualified label model, and after linear normalization processing, the horizontality evaluation index Pjzs is fitted and obtained. The horizontality evaluation index Pjzs is compared with the preset evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and take corresponding sorting measures based on the estimation result.
[0141] The levelness test of wood-plastic board labels can reflect its impact on production efficiency and quality control. On the automated production line, the levelness test of labels is not only an inspection of product appearance, but also a control of production equipment and processes. If the levelness of the label does not meet the standard, it may mean that there is a problem with the equipment (such as insufficient precision of the labeling machine), thus affecting the stability and quality consistency of the entire production line.
[0142] Product traceability: For products that need to be traced (such as wood-plastic panels used in construction or decoration), the information and accuracy on the label directly affect the traceability of the product. If the label is skewed or damaged, it may lead to the loss of product information, which in turn affects quality traceability, after-sales service, etc. The unevenness of the label will affect its levelness. Conversely, the levelness can reflect the unevenness. If the unevenness is too serious, it will affect the recognition of users and manufacturers. Therefore, through the monitoring of the levelness, not only can the production line equipment (the stability of the labeling machine) be analyzed, but also the flatness of the labeling surface can be reflected;
[0143] If the label is not level, it may be easily affected by friction, collision or environmental factors during use and fall off or be damaged prematurely, affecting the long-term use effect and appearance of the product. Especially in the case of harsh external environment (such as outdoor decoration or building materials), the durability of the label is required to be higher.
[0144] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for detecting the levelness of a wood-plastic board label, characterized in that: The following steps are included: S1. Establish a plane coordinate system in the testing platform in advance, obtain the image of the wood-plastic board to be tested through the image detector, and obtain the label area in the image of the wood-plastic board to be tested through image edge recognition; S2, based on the image edge recognition in S1, to identify and obtain several groups of edge pixel points in the label area, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, and compare the particle coordinates Zd (a1, b1) of the label area with the particle coordinates Zd (a2, b2) of the label in the standard wood-plastic board to preliminarily judge the qualified status of the wood-plastic board label. If qualified, an edge detection instruction is issued externally; S3, after receiving the edge detection instruction, analyze whether the several groups of edge pixel points obtained in S2 coincide with the corresponding edge pixel points of the standard wood-plastic board inner label. If they coincide, set a neighborhood window at each edge pixel point in S2, and analyze and calculate the tangent angle Qjjd at each edge pixel point in S2 based on the setting of the neighborhood window at each edge pixel point. According to the value of the tangent angle Qjjd at each edge pixel point, determine whether the corresponding edge pixel point has an angle tilt phenomenon; S4, based on S3, if the groups of edge pixel points obtained in S2 do not overlap with the corresponding edge pixel points of the label inside the standard wood-plastic board, then according to the wood-plastic board image to be detected, the surface smoothness Bphd of the label area in the wood-plastic board image to be detected is analyzed and calculated; S5. Use convolutional neural network technology to build a qualified label model. Input the surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3 into the qualified label model, and after linear normalization, fit to obtain the levelness evaluation index Pjzs. Compare the levelness evaluation index Pjzs with the preset evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and take corresponding sorting measures based on the estimation results.
2. A method for detecting the levelness of a wood-plastic board label according to claim 1, characterized in that: The specific steps of S1 include: S11, pre-establishing a plane coordinate system in the testing platform, and placing the wood-plastic board to be tested on the testing platform, so as to obtain an image of the wood-plastic board to be tested by an image detector; S12, performing image preprocessing on the wood-plastic board image to be detected obtained in S11 to convert the wood-plastic board image to be detected into a grayscale image, extracting the label edge in the converted wood-plastic board image to be detected by using the Canny edge detection technology, obtaining each edge pixel point, and obtaining the label area in the wood-plastic board image to be detected based on the label edge.
3. A method for detecting the levelness of a wood-plastic board label according to claim 2, characterized in that: The specific steps of S1 also include: S13, convert each edge pixel point in S12 into the Hough space, and construct a corresponding sine curve for each edge pixel point in combination with the polar coordinate equation, and monitor different points in the Hough space to detect whether the sine curves at each point intersect. If so, it is determined that there is a straight line at the edge of the current labeling area, and the number of intersecting sine curves at the corresponding point is recorded. By statistics, the point with the largest number of intersecting sine curves is extracted and used as the parameter of the straight line in the image space, and the point with the largest number of intersecting sine curves is marked as the node Jd (Dj, Jd); S14. Based on the extracted node Jd (Dj, Jd), identify the straight line at the edge of the labeling area in the image space. The specific identification method is as follows: S141, select two coordinate points in the image space as the first coordinate I (0, y) and the second coordinate I (x, 0), and combine the polar coordinate equation to respectively calculate the y value in the first coordinate I (0, y) and the x value in the second coordinate I (x, 0). The specific solution is as follows: S1411. The y value in the first coordinate I (0, y) is obtained by setting the x in the first coordinate to 0 and finding the corresponding Where Dj represents the shortest distance from a straight line to the origin in the image space; Jd represents the angle between the vertical line and the horizontal axis; S1412, the x value in the second coordinate I (x, 0) is obtained by setting the y value in the second coordinate to 0 and finding the corresponding S142: Based on the y value in the first coordinate I(0, y) and the x value in the second coordinate I(x, 0) obtained in S1411 and S1412, identify the straight line at the edge of the labeling area in the image space.
4. A method for detecting the levelness of a wood-plastic board label according to claim 3, characterized in that: The specific steps of S2 include: S21, based on the image edge recognition in S1, to identify and obtain several groups of edge pixel points in the label area, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, specifically in the following way: Where N is the number of edge pixels, i = 1, 2, 3, ..., N, x i Represented as the X-axis coordinate value of the i-th edge pixel, y i Represented as the Y-axis coordinate value of the i-th edge pixel; S22, pre-acquire the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, and compare it with the particle coordinates Zd (a1, b1) of the label area to preliminarily judge the qualified state of the wood-plastic board label. The specific comparison content is: if the particle coordinates Zd (a1, b1) of the label area coincide with the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, it is judged that the wood-plastic board label is temporarily in a qualified state, and an edge detection instruction will be issued outward at this time; if the particle coordinates Zd (a1, b1) of the label area do not coincide with the particle coordinates Zd (a2, b2) of the label inside the standard wood-plastic board, it is judged that the wood-plastic board label is not in a qualified state, and a second sorting instruction will be issued outward at this time.
5. A method for detecting the levelness of a wood-plastic board label according to claim 4, characterized in that: The specific steps of S3 include: S31, after receiving the edge detection instruction, analyzing whether the groups of edge pixel points obtained in S2 coincide with the corresponding edge pixel points of the standard wood-plastic board inner label; S32, if they overlap, set a 3*3 neighborhood window at each edge pixel point in S2, and obtain the X-axis brightness change vector Lb in each neighborhood window based on the neighborhood window set at each edge pixel point x and Y-axis brightness change vector Lb y ; Based on the X-axis brightness change vector Lb in each neighborhood window x and Y-axis brightness change vector Lb y , in order to analyze and calculate the horizontal gradient St and vertical gradient Ct at each edge pixel in the image space, which can be obtained in the following way: In the formula, Rt(x+j, y+k) represents the pixel value of each adjacent point in the neighborhood window corresponding to the corresponding edge pixel point, Lb x Represented as the X-axis brightness change vector Lb in each neighborhood window x , Lb y Represented as the Y-axis brightness change vector Lb in each neighborhood window y , the range of j is -1, 0 and 1, indicating movement from the center point to the left, the center point and the right; the range of k is -1, 0 and 1, indicating movement from the center point to the top, the center point and the bottom.
6. A method for detecting the levelness of a wood-plastic board label according to claim 5, characterized in that: The specific steps of S3 also include: S33, based on the straight line at the edge of the labeling area in the image space identified in S142, the straight line is used as the principal axis in the principal component analysis, and the slope value Xz of the principal axis is obtained, by comparing the slope value Xz of the principal axis with the slope of the corresponding straight line in the labeling area of the standard wood-plastic board. If the slope value Xz of the principal axis is the same as the slope of the corresponding straight line in the labeling area of the standard wood-plastic board, it is preliminarily determined that there is no tilt state in the labeling area in the current image space, and a secondary analysis instruction will be issued at this time; if the slope value Xz of the principal axis is different from the slope of the corresponding straight line in the labeling area of the standard wood-plastic board, it is preliminarily determined that there is a tilt state in the labeling area in the current image space, and a second sorting instruction will be issued outward at this time; S34, after receiving the secondary analysis instruction sent by S33, analyze and calculate the tangent angle Qjjd at each edge pixel point in S2, which can be obtained in the following way: Qjjd = atan2(Ct, St); Where atan2 is a function that calculates angles; S35, by comparing the tangent angle Qjjd at each edge pixel point in S2 with the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, to determine whether the corresponding edge pixel point has an angle tilt phenomenon; if the tangent angle Qjjd at each edge pixel point is ≠ the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, it will be determined that the corresponding edge pixel point has an angle tilt phenomenon; if the tangent angle Qjjd at each edge pixel point is equal to the tangent angle at the corresponding edge pixel point of the standard wood-plastic board inner label, it will be determined that the corresponding edge pixel point does not have an angle tilt phenomenon.
7. A method for detecting the levelness of a wood-plastic board label according to claim 5, characterized in that: The specific steps of S4 include: S41, if the groups of edge pixel points obtained in S2 do not overlap with the corresponding edge pixel points of the label in the standard wood-plastic board, then according to the wood-plastic board image to be detected, the surface smoothness Bphd of the label area in the wood-plastic board image to be detected is analyzed and calculated, and is specifically obtained in the following manner: Where m represents the pixel value of each pixel in the label area of the wood-plastic board image to be detected, p = 1, 2, 3, ..., m, Xsz p It is represented as the pixel value of the pth pixel in the label area of the wood-plastic board image to be detected, Xsz avg It is represented by the average pixel value of all pixels in the label area of the wood-plastic board image to be detected.
8. The method for detecting the levelness of a wood-plastic board label according to claim 1, characterized in that: The specific steps of S5 include: S51, through the surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3, combined with the qualified label model, after linear normalization processing, the levelness evaluation index Pjzs is obtained by fitting. The levelness evaluation index Pjzs is obtained by the following formula: Wherein, F1 and F2 represent the weight values of the tangent angle Qjjd and the surface smoothness Bphd respectively, and V represents the correction constant. The specific values of F1 and F2 are set by the user according to the situation.
9. A method for detecting the levelness of a wood-plastic board label according to claim 1, characterized in that: The specific steps of S5 also include: S52, pre-set the evaluation threshold H, wherein the evaluation threshold H includes the first evaluation threshold H1 and the second evaluation threshold H2, and the first evaluation threshold H1> the second evaluation threshold H2, and compare the levelness evaluation index Pjzs with the evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and the specific comparison content is as follows: If the levelness evaluation index Pjzs≤No.2 evaluation threshold value H2, the current wood-plastic board label will be comprehensively judged to be in a qualified state, and No.1 sorting instruction will be issued to the outside to transport the current wood-plastic board to the qualified frame area through the conveying device; If the second evaluation threshold H2 is less than the levelness evaluation index Pjzs ≤ the first evaluation threshold H1, the qualified status of the current wood-plastic board label will be comprehensively estimated, and the first sorting instruction will be issued to the outside to transport the current wood-plastic board to the qualified frame area through the conveying device; If the levelness evaluation index Pjzs> the first evaluation threshold H1, it will be comprehensively judged that the current wood-plastic board label is not in a qualified state. At this time, a second sorting instruction will be issued to the outside to transport the current wood-plastic board to the unqualified frame area through the conveying device, waiting for manual inspection.
10. A levelness detection system for a wood-plastic board label, used to implement a levelness detection method for a wood-plastic board label according to any one of claims 1 to 9, characterized in that: It includes image capture module, preliminary screening module, direction analysis module, three-dimensional analysis module and detection feedback module; The image capture module is used to establish a plane coordinate system in the detection platform in advance, obtain the image of the wood-plastic board to be detected through the image detector, and obtain the label area in the image of the wood-plastic board to be detected through image edge recognition; The preliminary screening module is used to identify and obtain several groups of edge pixel points in the label area based on the image edge recognition in the image capture module, and analyze and calculate the particle coordinates Zd (a1, b1) of the label area, and compare the particle coordinates Zd (a1, b1) of the label area with the particle coordinates Zd (a2, b2) of the label in the standard wood-plastic board to preliminarily judge the qualified state of the wood-plastic board label. If qualified, an edge detection instruction is issued externally; The direction analysis module is used to analyze whether the groups of edge pixel points obtained in the preliminary screening module coincide with the corresponding edge pixel points of the standard wood-plastic board inner label after receiving the edge detection instruction. If they coincide, a neighborhood window is set at each edge pixel point in the preliminary screening module. Based on the neighborhood window set at each edge pixel point, the tangent angle Qjjd at each edge pixel point in the preliminary screening module is analyzed and calculated. According to the value of the tangent angle Qjjd at each edge pixel point, it is determined whether the corresponding edge pixel point has an angle tilt phenomenon; The three-dimensional analysis module is used to analyze and calculate the surface smoothness Bphd of the label area in the image of the wood-plastic board to be detected based on the direction analysis module if the groups of edge pixel points obtained in the preliminary screening module do not coincide with the corresponding edge pixel points of the label in the standard wood-plastic board. The detection feedback module is used to construct a qualified label model using convolutional neural network technology. The surface smoothness Bphd and the tangent angle Qjjd at each edge pixel point in S3 are input into the qualified label model, and after linear normalization processing, the horizontality evaluation index Pjzs is fitted and obtained. The horizontality evaluation index Pjzs is compared with the preset evaluation threshold H to comprehensively estimate the qualified status of the current wood-plastic board label, and take corresponding sorting measures based on the estimation result.