Method and device for realizing wood board liquid leakage prevention judgment based on machine vision, processor and computer readable storage medium thereof

The use of machine vision to automatically determine the liquid resistance of wood panels solves the problems of low efficiency and low accuracy of manual testing, and achieves efficient and accurate judgment of the liquid resistance of wood panels.

CN122175904APending Publication Date: 2026-06-09SHANGHAI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI UNIV
Filing Date
2026-03-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, the ability of wooden boards to prevent leakage relies on manual testing, which is inefficient, inaccurate, lacks standardized criteria, and makes data traceability difficult.

Method used

By employing machine vision methods and image processing steps such as grayscale conversion, edge recognition, feature point extraction, filtering, and linear fitting, the angle between the tangent of the growth ring of the wood board and the center line of the board thickness is calculated, thereby enabling automated judgment of the wood board's liquid-proof properties.

Benefits of technology

It improves the efficiency and accuracy of judging the liquid resistance of wooden boards, reduces the need for manpower, achieves objective and consistent data judgment, and facilitates subsequent processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175904A_ABST
    Figure CN122175904A_ABST
Patent Text Reader

Abstract

This invention relates to a method for judging the liquid resistance of wood panels based on machine vision, comprising the following steps: acquiring an original image containing the target to be detected; determining the position and size of the wood panel in the image; determining whether a pixel is a feature point; calculating the number of other feature points within a preset area for each feature point; performing linear fitting on each sub-region; traversing the candidate regions and obtaining the angles through fitting; and determining the liquid resistance performance of the wood panel. The method, apparatus, processor, and computer-readable storage medium of this invention for judging the liquid resistance of wood panels based on machine vision, by establishing a complete set of target measurement methods, can measure the liquid resistance of wood panels using an industrial camera. The machine vision-based calculation of the angle between the tangent of the wood panel growth ring and the center line of the panel thickness is used to judge the liquid resistance performance, which can effectively improve the accuracy of judging the liquid resistance performance of wood panels, reduce manpower requirements, and increase production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision, and more particularly to the field of wood processing, specifically to a method, apparatus, processor, and computer-readable storage medium for judging the liquid-proof properties of wood boards based on machine vision. Background Technology

[0002] Currently, the classification of wood panel processing commonly relies on manual visual inspection of the liquid resistance of the panels to aid in subsequent processing. This method suffers from the following problems: 1. Low efficiency and inability to achieve precise judgment; 2. Subjective influence on human judgment standards, hindering objective and unified standards; 3. Difficulty in data traceability and the inability to obtain accurate data. These are all issues that those skilled in the art would find undesirable, thus necessitating an urgent method for assessing the liquid resistance of wood panels that improves both measurement efficiency and accuracy. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device, processor and computer-readable storage medium for judging the liquid-proof properties of wooden boards based on machine vision, which has high measurement efficiency, high measurement accuracy and wide applicability.

[0004] To achieve the above objectives, the present invention provides a method, apparatus, processor, and computer-readable storage medium for determining the liquid-proof properties of wood panels based on machine vision, as follows: The main feature of this machine vision-based method for determining the liquid-proof properties of wooden boards is that the method includes the following steps: (1) Obtain the original image containing the target to be detected, convert the original image into a grayscale image, and then perform binarization operation according to the set threshold; (2) Starting from the perimeter of the grayscale image and searching towards the center, identify and locate the edge contour information of the wooden board to determine the position and size of the wooden board in the image; (3) Using a feature point extraction algorithm, calculate the location of each pixel in the image. The maximum difference between the three components and other pixels within a preset range is used to determine whether the pixel is a feature point based on the summation result. (4) Using a filtering algorithm, calculate the number of other feature points in the preset area for each feature point, and determine whether it is a discrete feature point. Filter out discrete feature points and retain the dense area of ​​feature points. (5) Divide the image of the wooden board region into multiple sub-regions, and perform linear fitting on each sub-region to obtain the angle between the growth ring tangent and the center line of the board thickness in each sub-region; (6) Establish candidate regions, add the left and lower edge regions of the sub-regions into the candidate regions respectively, traverse the candidate regions by fitting the angles, and calculate the position of the next possible candidate region in turn; (7) If the absolute difference between the angle between the current candidate region and the next region exceeds the set threshold, ignore it; otherwise, add the next region to the candidate region and iteratively execute (6) to determine whether it can be extended to the target edge region in the sub-region. If it can, then determine that the anti-leakage performance of the wooden board is weak.

[0005] Preferably, step (2) specifically includes the following steps: (2.1) Scan from the top midpoint, bottom midpoint, left midpoint and right midpoint of the binarized image containing the target to be detected towards the center point of the image. When the pixel value of the pixel is not 0 during the scanning process, stop scanning and record the corresponding position point. (2.2) Assume that the four location points of the scan result are defined as follows: , , , The starting point of the area of ​​the wooden board is , length is , width is .

[0006] Preferably, step (3) specifically includes the following steps: (3.1) Traverse all pixels and select The point is the current point, calculate its... The remaining pixels within the range and The points are respectively at Calculate the eigenvalue by finding the maximum difference among the three components; (3.2) Let the feature point judgment threshold be... The threshold value is used to determine whether a point is a feature point.

[0007] Preferably, step (3.1) specifically includes the following steps: Select The point is the current point, with Calculate its center point The remaining pixels within the range and The points are respectively at The maximum difference among the three components is denoted as the value within the range. In terms of quantity and The maximum difference between points is ,exist In terms of quantity and The maximum difference between points is ,exist In terms of quantity and The maximum difference between points is All pixels are set to 1 to 2. Number; Components and Perform the same steps for each component; The eigenvalues ​​are calculated as follows: Calculate the eigenvalues ​​using the following formula: in, For all pixels within the range Pixel values ​​in the component For the Dot at The pixel values ​​in the component are similar to those in the other two components.

[0008] Preferably, step (4) specifically includes the following steps: Traverse the feature points calculated by (3); assuming the current selection The point is the current point; with Using the point as the center point, calculate its Total number of feature points within the range ;when If the number of other feature points exceeds the threshold, meaning there are enough other feature points within the range, then the current point will be determined. Points that are dense feature points will be retained; otherwise, they will be determined as isolated feature points and deleted.

[0009] Preferably, step (5) specifically includes the following steps: (5.1) Divide the wooden board image into a specified number of sub-regions, and calculate the number of feature points in each sub-region. If the number of feature points If the number of feature points is less than the minimum requirement, it is determined that the number of feature points in the current area is insufficient, and no fitting is performed. (5.2) Perform linear fitting on regions with a sufficient number of feature points, for each feature point The predicted value of the fitted straight line is The error is Assuming the number of feature points is The sum of squared errors was calculated. ; (5.3) Minimize the squared error For the square of the error Find the partial derivative and rearrange. (5.4) The slope is calculated. ; (5.5) Based on the slope The included angle was calculated. ; Preferably, step (6) specifically includes the following steps: (6.1) Establish candidate regions by adding the left edge sub-region of the calculated angle to the candidate regions; (6.2) Traverse all current candidate regions and determine the angle between the current sub-regions. Calculate the possible location of the next region; (6.3) If the included angle of the next candidate region and If the absolute difference is greater than the threshold or has been marked, it is determined that it does not meet the conditions; otherwise, the sub-region is added to the candidate region and prepared for the next round of judgment. (6.4) Remove and mark the sub-regions that have already been calculated; (6.5) Repeat steps (6.2) to (6.4) until the number of candidate regions is 0 or the target edge sub-region is reached; if the number of candidate regions is 0 and the target edge sub-region is not reached, the wooden board has strong liquid resistance; if the target edge region is reached, the wooden board has weak liquid resistance. (6.6) Starting from another edge sub-region, re-establish the candidate region, add the lower edge sub-region with the calculated angle to the candidate region, repeat steps (6.2) to (6.5) and determine the liquid-proof performance of the wooden board.

[0010] The main feature of this machine vision-based device for determining the liquid-proof properties of wooden boards is that the device includes: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the various steps of the above-described method for determining the liquid-proof properties of wood panels based on machine vision.

[0011] The processor for judging the liquid resistance of wood boards based on machine vision is characterized in that the processor is configured to execute computer-executable instructions, and when the computer-executable instructions are executed by the processor, the various steps of the above-mentioned method for judging the liquid resistance of wood boards based on machine vision are implemented.

[0012] The main feature of this computer-readable storage medium is that it stores a computer program thereon, which can be executed by a processor to implement the various steps of the above-described method for determining the liquid-proofness of wooden boards based on machine vision.

[0013] This invention employs a machine vision-based method, apparatus, processor, and computer-readable storage medium for judging the liquid resistance of wood panels. By establishing a complete set of target measurement methods to complete the process, the liquid resistance of wood panels can be measured using an industrial camera. The angle between the tangent of the wood panel's growth ring and the center line of the panel thickness is calculated based on machine vision to determine the liquid resistance, effectively improving the accuracy of judging the liquid resistance of wood panels, reducing manpower requirements, and increasing production efficiency. Compared with existing technologies, this method can accurately and quickly measure the liquid resistance of wood panels, demonstrating good application effects and promising prospects for widespread adoption. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the process for measuring the angle between the tangent of the growth ring and the center line of the board thickness in the method for judging the liquid-proof properties of wood boards based on machine vision, as described in this invention.

[0015] Figure 2 This is a schematic diagram of the wood board positioning method of the present invention, which is based on machine vision to determine the liquid-proof properties of wood boards.

[0016] Figure 3 This is a schematic diagram illustrating the feature point calculation of the method for determining the liquid-proof properties of wooden boards based on machine vision according to the present invention.

[0017] Figure 4 This is a schematic diagram of the feature point filtering of the wooden board in the method for judging the liquid-proofness of wooden boards based on machine vision according to the present invention.

[0018] Figure 5 This is a schematic diagram of multi-region linear fitting for the method of judging the liquid-proof properties of wooden boards based on machine vision according to the present invention.

[0019] Figure 6 This is a result diagram of an embodiment of the method for judging the liquid-proof properties of wooden boards based on machine vision according to the present invention, showing the linear fitting of all sub-regions during use.

[0020] Figure 7 This is a result diagram of Example 2 of the method for judging the liquid-proof properties of wooden boards based on machine vision according to the present invention, which shows the linear fitting of all sub-regions during use.

[0021] Figure 8 This is a schematic diagram of a path that can reach other edge areas in the method of judging the liquid-proofness of wooden boards based on machine vision according to the present invention. Detailed Implementation

[0022] To more clearly describe the technical content of the present invention, the following description is provided in conjunction with specific embodiments.

[0023] The method for determining the liquid-proof properties of wood panels based on machine vision according to the present invention includes the following steps: (1) Obtain the original image containing the target to be detected, convert the original image into a grayscale image, and then perform binarization operation according to the set threshold; (2) Starting from the perimeter of the grayscale image and searching towards the center, identify and locate the edge contour information of the wooden board to determine the position and size of the wooden board in the image; (3) Using a feature point extraction algorithm, calculate the location of each pixel in the image. The maximum difference between the three components and other pixels within a preset range is used to determine whether the pixel is a feature point based on the summation result. (4) Using a filtering algorithm, calculate the number of other feature points in the preset area for each feature point, and determine whether it is a discrete feature point. Filter out discrete feature points and retain the dense area of ​​feature points. (5) Divide the image of the wooden board region into multiple sub-regions, and perform linear fitting on each sub-region to obtain the angle between the growth ring tangent and the center line of the board thickness in each sub-region; (6) Establish candidate regions, add the left and lower edge regions of the sub-regions into the candidate regions respectively, traverse the candidate regions by fitting the angles, and calculate the position of the next possible candidate region in turn; (7) If the absolute difference between the angle between the current candidate region and the next region exceeds the set threshold, ignore it; otherwise, add the next region to the candidate region and iteratively execute (6) to determine whether it can be extended to other edge regions in the sub-region. If it can, then determine that the anti-leakage performance of the wooden board is weak.

[0024] In a preferred embodiment of the present invention, step (2) specifically includes the following steps: (2.1) Scan from the top midpoint, bottom midpoint, left midpoint and right midpoint of the binarized image containing the target to be detected towards the center point of the image. When the pixel value of the pixel is not 0 during the scanning process, stop scanning and record the corresponding position point. (2.2) Assume that the four location points of the scan result are defined as follows: , , , The starting point of the area of ​​the wooden board is , length is , width is .

[0025] In a preferred embodiment of the present invention, step (3) specifically includes the following steps: (3.1) Traverse all pixels and select The point is the current point, calculate its... The remaining pixels within the range and The points are respectively at Calculate the eigenvalue by finding the maximum difference among the three components; (3.2) Let the feature point judgment threshold be... The threshold value is used to determine whether a point is a feature point.

[0026] In a preferred embodiment of the present invention, step (3.1) specifically includes the following steps: Select The point is the current point, with Calculate its center point The remaining pixels within the range and The points are respectively at The maximum difference among the three components is denoted as the value within the range. In terms of quantity and The maximum difference between points is ,exist In terms of quantity and The maximum difference between points is ,exist In terms of quantity and The maximum difference between points is All pixels are set to 1 to 2. Number; Components and Perform the same steps for each component; The eigenvalues ​​are calculated as follows: Calculate the eigenvalues ​​using the following formula: in, For all pixels within the range Pixel values ​​in the component For the Dot at The pixel values ​​in the component are similar to those in the other two components.

[0027] In a preferred embodiment of the present invention, step (4) specifically includes the following steps: Traverse the feature points calculated by (3); assuming the current selection The point is the current point; with Using the point as the center point, calculate its Total number of feature points within the range ;when If the number of other feature points exceeds the threshold, meaning there are enough other feature points within the range, then the current point will be determined. Points that are dense feature points will be retained; otherwise, they will be determined as isolated feature points and deleted.

[0028] In a preferred embodiment of the present invention, step (5) specifically includes the following steps: (5.1) Divide the wooden board image into a specified number of sub-regions, and calculate the number of feature points in each sub-region. If the number of feature points If the number of feature points is less than the minimum requirement, it is determined that the number of feature points in the current area is insufficient, and no fitting is performed. (5.2) Perform linear fitting on regions with a sufficient number of feature points, for each feature point The predicted value of the fitted straight line is The error is Assuming the number of feature points is The sum of squared errors was calculated. ; (5.3) Minimize the squared error For the square of the error Find the partial derivative and rearrange. (5.4) The slope is calculated. ; (5.5) Based on the slope The included angle was calculated. ; In a preferred embodiment of the present invention, step (6) specifically includes the following steps: (6.1) Establish candidate regions by adding the left edge sub-region of the calculated angle to the candidate regions; (6.2) Traverse all current candidate regions and determine the angle between the current sub-regions. Calculate the possible location of the next region; (6.3) If the included angle of the next candidate region and If the absolute difference is greater than the threshold or has been marked, it is determined that it does not meet the conditions; otherwise, the sub-region is added to the candidate region and prepared for the next round of judgment. (6.4) Remove and mark the sub-regions that have already been calculated; (6.5) Repeat steps (6.2) to (6.4) until the number of candidate regions is 0 or the target edge sub-region is reached; if the number of candidate regions is 0 and the target edge sub-region is not reached, the wooden board has strong liquid resistance; if the target edge region is reached, the wooden board has weak liquid resistance. (6.6) Starting from another edge sub-region, re-establish the candidate region, add the lower edge sub-region with the calculated angle to the candidate region, repeat steps (6.2) to (6.5) and determine the liquid-proof performance of the wooden board.

[0029] The device of the present invention for determining the liquid-proof properties of wood panels based on machine vision, wherein the device comprises: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the various steps of the above-described method for determining the liquid-proof properties of wood panels based on machine vision.

[0030] The processor of the present invention for determining the liquid-proof properties of wood panels based on machine vision is configured to execute computer-executable instructions. When the computer-executable instructions are executed by the processor, the various steps of the above-described method for determining the liquid-proof properties of wood panels based on machine vision are implemented.

[0031] The computer-readable storage medium of the present invention stores a computer program thereon, which can be executed by a processor to implement the various steps of the above-described method for determining the liquid-proofness of wooden boards based on machine vision.

[0032] This invention relates to a machine vision-based method for judging the liquid resistance of wood boards. This method uses the angle between the tangent of the growth rings and the center line of the board thickness as the criterion. The basic process involves converting the wood board image into a grayscale image and binarizing it. The position and size of the wood board are located from the periphery towards the center, and the position information is extracted. Then, feature points, such as pores and growth rings, unique structures of wood growth, are found by using the sum of the maximum pixel value differences between each pixel and its surrounding pixels in the RGB components. These feature points are then filtered to remove discrete feature points, retaining dense feature points. Finally, multiple regions are divided and linearly fitted to obtain the angle between sub-regions. Finally, starting from the left and bottom edges of the sub-regions, the angle between each region is used to determine whether the target edge sub-region can be reached. If a path can be reached, the liquid resistance is weak. This method is based on machine vision operation, making parameter adjustment easy and highly interpretable. It avoids the fatigue and errors of manual inspection, and can efficiently and accurately detect the liquid resistance of wood boards, facilitating further wood board classification and processing.

[0033] The purpose of this invention is to propose a method for determining the liquid resistance of a wood board by calculating the angle between the tangent of the growth ring and the center line of the board thickness based on machine vision. This method can accurately and quickly determine the liquid resistance of the wood board.

[0034] The invention concept of this technical solution is as follows: The size and position of the wooden board are located from the periphery towards the center using a grayscale image. Then, feature points are found in the original image by utilizing the pixel value differences in the three components of the pixel with the surrounding pixels. These feature points are then filtered to retain dense feature points. The image is divided into multiple regions for linear fitting. Finally, starting from the left and lower edge regions, the slope of each region is used to determine whether the target edge region can be reached. If a path exists to reach it, the leak-proof performance is weak.

[0035] For a detailed description of the embodiments of the present invention, please refer to [link / reference]. Figure 1 The diagram shows a method for measuring the angle between the tangent of the growth ring and the center line of the board thickness. The method includes the following steps: S1: Obtain the original image containing the target to be detected, convert the original image into a grayscale image, and then perform a binarization operation according to the set threshold. S2: As shown in Figure 2, starting from the outer edges of the grayscale image and searching towards the center, the edge contour information of the wooden plank is identified and located to determine the position and size of the plank in the image. Unless otherwise specified, only the wooden plank portion of the original image is processed; the non-plank portions are left unprocessed. A preferred step S2 specifically includes the following steps: S2-1: Scan from the four midpoints (top, bottom, left, and right) of the binarized image containing the target to be detected towards the center point of the image. Stop scanning and record the corresponding position when a non-zero pixel value is encountered during the scan.

[0036] S2-2: Assume that the four location points of the scan result are defined as follows: , , , Therefore, the starting point of the area of ​​the wooden board is... , length is , width is .

[0037] S3: Employ a feature point extraction algorithm to calculate the location of each pixel in the image. The maximum difference between the three components and other pixels within a preset range is used to determine whether the pixel is a feature point based on the summation result. Figure 3 As shown. The feature points described in this technical solution mainly refer to structures unique to wood growth processes, such as pores and growth rings, and are not feature points in the broad sense of the image processing field. The preferred S3 step specifically includes the following steps: S3-1: Traverse all pixels. Assume we select... The point is the current point, with Calculate any point as the center The remaining pixels within the range and The points are respectively at The maximum difference among the three components. Assume the range is within... In terms of quantity and The maximum difference between points is ,exist In terms of quantity and The maximum difference between points is ,exist In terms of quantity and The maximum difference between points is All pixels are set to 1 to 2. Numbering, using Represents all pixels within the range Component pixel values, For the Dot at Pixel values ​​in the component. Components and Perform similar operations on the components.

[0038] Calculate the eigenvalues ​​using the following expression: Specifically, the minimum eigenvalue is 0, and the maximum sum of the eigenvalues ​​is no more than 255.

[0039] S3-2: Assume the feature point judgment threshold is... Determine whether a point is a feature point using the following expression: S4: Employ a filtering algorithm to calculate the number of other feature points within a preset neighborhood for each feature point. Based on this, determine whether it is a discrete feature point, filter out discrete feature points, and retain densely populated regions of feature points. Figure 4 As shown; The preferred S4 procedure specifically includes the following steps: S4-1: Traverse the feature points calculated in S3. Assume the current selection is... The point is the current point; with Using the point as the center point, calculate its Total number of feature points within the range Only when When the number of other feature points exceeds a threshold, i.e., there are enough other feature points within the range, the current point is determined. Points that are dense feature points are retained; otherwise, they are considered isolated feature points and are deleted.

[0040] S5: Divide the image of the wooden board region into multiple sub-regions, and perform linear fitting on each sub-region to obtain the angle between the tangent of the growth ring and the center line of the board thickness in each sub-region, such as... Figure 5 As shown.

[0041] The preferred S5 procedure specifically includes the following steps: S5-1: Divide the wooden board image into a specified number of sub-regions. For each sub-region, calculate the number of feature points within that region. ,when If the number of feature points is less than the minimum required number, it is determined that the number of feature points in the current region is insufficient, and no fitting is performed.

[0042] S5-2: Perform linear fitting on regions with a sufficient number of feature points, for each feature point... The predicted value of the fitted straight line is The error is Assuming the number of feature points is Sum of squared errors ( )for: Minimize then Taking the partial derivative and rearranging, we get: Solve the equation to obtain the desired slope. : Finally, the included angle It can be determined by the slope Based on the arctangent function, we get: Specifically, the included angle The range is If the calculated angle does not fall within this range, correction is required. (See fitting results for reference.) Figure 6 and Figure 7 . Figure 6 and Figure 7 This is a graph showing the linear fitting results for all sub-regions during the use of this invention.

[0043] S6: Establish candidate regions. Add the left and bottom edge regions of the sub-regions to the candidate regions. Traverse the candidate regions using the fitted angles and calculate the position of the next possible candidate region. If the absolute difference between the angle between the current candidate region and the next region exceeds a set threshold, ignore it; otherwise, add the next region to the candidate region and iteratively execute the process described in S6 to determine if it can extend to other edge regions of the sub-region. If it can, then the wood board is determined to have weak leak-proof performance. Figure 8 As shown.

[0044] The preferred S6 procedure specifically includes the following steps: S6-1: Create candidate regions by adding the left edge sub-regions whose included angle can be calculated into the candidate regions.

[0045] S6-2: Traverse all current candidate regions and determine the angle between the current sub-regions. The specific method for calculating the possible location of the next region is as follows: 1. The possible locations are the bottom and lower right sides; 2. The possible locations are the right side and the lower right side; 3. The possible locations are the right side, the lower right side, and the upper right side; 4. The possible location is on the right side or the upper right side; 5. The possible locations are the top and upper right sides; S6-3: After calculating the possible locations of the next candidate regions, if the included angle of the next candidate regions... and If the absolute difference is greater than the threshold or has already been marked, it is determined that the condition is not met and is ignored. Otherwise, the sub-region is added to the candidate region for the next round of judgment.

[0046] S6-4: Remove and mark sub-regions that have already been calculated to avoid duplicate calculations.

[0047] S6-5: Repeat steps S6-2 to S6-4 until the number of candidate regions is 0 or the target edge sub-region is reached. If the number of candidate regions is 0 and the target edge sub-region is not reached, the wooden board is considered to have strong liquid resistance. If the target edge region is reached, the wooden board is considered to have weak liquid resistance.

[0048] S6-6: Starting from another edge sub-region, re-establish the candidate region, add the lower edge sub-region where the included angle can be calculated into the candidate region, repeat the operations from S6-2 to S6-5 and determine the liquid-proof performance of the wooden board.

[0049] Specifically, if starting from the left edge region, it should be determined whether the upper or lower edge regions can be reached; if starting from the lower side, it should be determined whether the left or right edge regions can be reached.

[0050] For the specific implementation scheme of this embodiment, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0051] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0052] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.

[0053] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0054] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0055] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The corresponding program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0056] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0057] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0058] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0059] This invention employs a machine vision-based method, apparatus, processor, and computer-readable storage medium for judging the liquid resistance of wood panels. By establishing a complete set of target measurement methods to complete the process, the liquid resistance of wood panels can be measured using an industrial camera. The angle between the tangent of the wood panel's growth ring and the center line of the panel thickness is calculated based on machine vision to determine the liquid resistance, effectively improving the accuracy of judging the liquid resistance of wood panels, reducing manpower requirements, and increasing production efficiency. Compared with existing technologies, this method can accurately and quickly measure the liquid resistance of wood panels, demonstrating good application effects and promising prospects for widespread adoption.

[0060] In this specification, the invention has been described with reference to specific embodiments thereof. However, it will be apparent that various modifications and variations can be made without departing from the spirit and scope of the invention. Therefore, the specification and drawings should be considered illustrative rather than restrictive.

Claims

1. A method for determining the liquid-proof properties of wooden boards based on machine vision, characterized in that, The method includes the following steps: (1) Obtain the original image containing the target to be detected, convert the original image into a grayscale image, and then perform binarization operation according to the set threshold; (2) Starting from the perimeter of the grayscale image and searching towards the center, identify and locate the edge contour information of the wooden board to determine the position and size of the wooden board in the image; (3) Using a feature point extraction algorithm, calculate the position of each pixel in the image. The maximum difference between the three components and other pixels within a preset range is used to determine whether the pixel is a feature point based on the summation result. (4) Using a filtering algorithm, calculate the number of other feature points in the preset area for each feature point, and determine whether it is a discrete feature point. Filter out discrete feature points and retain the dense area of ​​feature points. (5) Divide the image of the wooden board region into multiple sub-regions, and perform linear fitting on each sub-region to obtain the angle between the growth ring tangent and the center line of the board thickness in each sub-region; (6) Establish candidate regions, add the left and lower edge regions of the sub-regions into the candidate regions respectively, traverse the candidate regions by fitting the angles, and calculate the position of the next possible candidate region in turn; (7) If the absolute difference between the angle between the current candidate region and the next region exceeds the set threshold, ignore it; otherwise, add the next region to the candidate region and iteratively execute (6) to determine whether it can be extended to other edge regions in the sub-region. If it can, then determine that the anti-leakage performance of the wooden board is weak.

2. The method for determining the liquid-proofness of wooden boards based on machine vision according to claim 1, characterized in that, Step (2) specifically includes the following steps: (2.1) Scan from the top midpoint, bottom midpoint, left midpoint and right midpoint of the binarized image containing the target to be detected towards the center point of the image. When the pixel value of the pixel is not 0 during the scanning process, stop scanning and record the corresponding position point. (2.2) Assume that the four location points of the scan result are defined as follows: , , , The starting point of the area of ​​the wooden board is , length is , width is .

3. The method for determining the liquid-proofness of wooden boards based on machine vision according to claim 1, characterized in that, Step (3) specifically includes the following steps: (3.1) Traverse all pixels and select The point is the current point, calculate its... The remaining pixels within the range and The points are respectively at Calculate the eigenvalue by finding the maximum difference among the three components; (3.2) Let the feature point judgment threshold be... The threshold value is used to determine whether a point is a feature point.

4. The method for determining the liquid-proofness of wooden boards based on machine vision according to claim 3, characterized in that, Step (3.1) specifically includes the following steps: Select The point is the current point, with Calculate its center point The remaining pixels within the range and The points are respectively at The maximum difference among the three components is denoted as the value within the range. In terms of quantity and The maximum difference between points is ,exist In terms of quantity and The maximum difference between points is ,exist In terms of quantity and The maximum difference between points is All pixels are set to 1 to 2. Number; to Components and Perform the same steps for each component; The eigenvalues ​​are calculated as follows: Calculate the eigenvalues ​​using the following formula: in, For all pixels within the range Pixel values ​​in the component For the Dot at The same applies to the pixel values ​​of the components, and the other two types as well.

5. The method for determining the liquid-proofness of wooden boards based on machine vision according to claim 1, characterized in that, Step (4) specifically includes the following steps: Traverse the feature points calculated by (3); assuming the current selection The point is the current point; with Using the point as the center point, calculate its Total number of feature points within the range ;when If the number of other feature points exceeds the threshold, meaning there are enough other feature points within the range, then the current point will be determined. Points that are dense feature points will be retained; otherwise, they will be determined as isolated feature points and deleted.

6. The method for determining the liquid-proofness of wooden boards based on machine vision according to claim 1, characterized in that, Step (5) specifically includes the following steps: (5.1) Divide the wooden board image into a specified number of sub-regions, and calculate the number of feature points in each sub-region. If the number of feature points If the number of feature points is less than the minimum requirement, it is determined that the number of feature points in the current area is insufficient, and no fitting is performed. (5.2) Perform linear fitting on regions with a sufficient number of feature points, for each feature point The predicted value of the fitted straight line is The error is Assuming the number of feature points is The sum of squared errors was calculated. ; (5.3) Minimize the squared error For the square of the error Find the partial derivative and rearrange. (5.4) The slope is calculated. ; (5.5) Based on the slope The included angle was calculated. .

7. The method for determining the liquid-proofness of wooden boards based on machine vision according to claim 1, characterized in that, Step (6) specifically includes the following steps: (6.1) Establish candidate regions by adding the left edge sub-region of the calculated angle to the candidate regions; (6.2) Traverse all current candidate regions and determine the angle between the current sub-regions. Calculate the possible location of the next region; (6.3) If the included angle of the next candidate region and If the absolute difference is greater than the threshold or has been marked, it is determined that it does not meet the conditions; otherwise, the sub-region is added to the candidate region and prepared for the next round of judgment. (6.4) Remove and mark the sub-regions that have already been calculated; (6.5) Repeat steps (6.2) to (6.4) until the number of candidate regions is 0 or the target edge sub-region is reached; if the number of candidate regions is 0 and the target edge sub-region is not reached, the wooden board has strong liquid resistance; if the target edge region is reached, the wooden board has weak liquid resistance. (6.6) Starting from another edge sub-region, re-establish the candidate region, add the lower edge sub-region with the calculated angle to the candidate region, repeat steps (6.2) to (6.5) and determine the liquid-proof performance of the wooden board.

8. A device for determining the liquid-proof properties of wooden boards based on machine vision, characterized in that, The device includes: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the steps of the method for determining the liquid-proof properties of wood panels based on machine vision, as described in any one of claims 1 to 7.

9. A processor for determining the liquid-proof properties of wooden boards based on machine vision, characterized in that, The processor is configured to execute computer-executable instructions, which, when executed by the processor, implement each step of the method for determining the liquid-proofness of wood panels based on machine vision, as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that can be executed by a processor to implement the steps of the method for determining the liquid-proofness of wood panels based on machine vision, as described in any one of claims 1 to 7.