A wood edge defect detection method based on three-dimensional data

Through three-dimensional data-based methods, the detection of wood edge defects is solved, and the traditional method is sensitive to stains and light and shadow interference is achieved, efficient and accurate defect detection is achieved, and the production efficiency of the wood industry is improved.

CN116630278BActive Publication Date: 2025-09-02FUJIAN SHUNJING MACHINERY IND CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310611026.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2025-09-02
Estimated Expiration
2043-05-26

AI Technical Summary

Technical Problem

The prior art is sensitive to stains and light and shadow interference in wood edge defect detection, insufficient detection accuracy and speed, and cannot be applied to wood of different specifications and sizes.

Method used

Using a three-dimensional data-based method, the wood boundaries are obtained by setting the effective data length threshold, the interference data is eliminated, the width deviation and average value are calculated, the suspicious defect areas are screened, the defect areas are merged and corrected, and the defect classification is finally carried out.

Benefits of technology

Effectively overcome interference from complex industrial sites, improve the accuracy and speed of defect detection, reduce costs, improve production efficiency and detection robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116630278B_ABST
    Figure CN116630278B_ABST
Patent Text Reader

Abstract

The present invention relates to a wood edge defect detection method based on three-dimensional data. First, a threshold value of the effective data length of each row is set and used to calculate the upper and lower boundary positions of the wood. Secondly, the interference values ​​in each row of three-dimensional data are eliminated, and the actual width and left and right starting positions of each row of data are obtained, and the average value of the actual width is calculated to obtain the average width of the entire wood. The difference between the width of each row of wood data and the average width is calculated, and the suspected defect area is obtained according to the set difference range and the defect area length threshold. Finally, the suspected defect area is filtered and merged to obtain the final edge defect detection result. Applying the present invention to wood edge defect detection can effectively overcome various interferences and influences caused by complex industrial sites, and improve the defect detection speed and thus improve industrial production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of wood defect detection, and in particular relates to a wood edge defect detection method based on three-dimensional data. Background Art

[0002] The continuity and integrity of wood edges ensure that the wood can be processed subsequently, while wood edge defects directly reduce its integrity. Therefore, wood edge defect detection is an important part of the industrial wood production process.

[0003] In industry, wood materials used for processing have a large aspect ratio. Therefore, traditional wood edge defect detection typically uses line scan cameras to capture images and locate and classify edge defects through a combination of image processing and machine learning. However, these methods are highly sensitive to interference caused by stains and light in the images, and detection is time-consuming. Wood edge defect detection methods based on 3D data can effectively overcome noise and light interference caused by complex industrial environments, improving defect detection accuracy and speed.

[0004] Using 3D wood surface data captured by a depth camera to detect wood edge defects simplifies the extraction of the wood foreground and directly overcomes the interference of stains and light and shadow in wood images. By designing a data analysis method to analyze and locate wood edge defects, the reliability of edge information extraction and the accuracy of edge defect detection are improved. This edge defect detection method plays a significant role in the industrial production of wood.

[0005] The Chinese patent application number is: CN 202110518241.5, and its name is: A method for detecting product edge defects. The method first inputs a template image and a sample image, and then constructs a feature map by collecting information such as the centroid, target contour, centroid, and deflection of the template image and the sample image. Then, an iterative optimization method of the mapping model of the sample image to the template image is constructed with the minimum residual sum as the loss function, so as to match the feature map, and then obtain the global mapping matrix based on the matching results, complete the difference process, and obtain the defect area in the sample image. This method requires a defect-free image as a template to match the edge defect area on the sample image, but wood often does not have fixed specifications and sizes. This method cannot find a unified template image for matching, and is not suitable for edge defect detection of wood.

[0006] The Chinese patent application number is CN202110261731.1, entitled "A Method and Apparatus for Edge Defect Detection." This method determines a contour line based on the original image of the target; selects a portion of the contour points from the contour line, constructs sub-images of the original image based on the selected contour points, and processes the corresponding sub-images using a binarization threshold determined according to a specific method to determine the target defect detection result. This method uses the target's image data as the processing object and uses a binarization method to determine the defect area. However, it is highly sensitive to stains on the wood surface and light and shadow interference, and cannot meet the accuracy requirements for wood edge defect detection. Summary of the Invention

[0007] The purpose of the present invention is to provide a wood edge defect detection method based on three-dimensional data. First, a threshold value of the effective data length of each row is set and used to calculate the upper and lower boundary positions of the wood. Secondly, the interference values ​​in each row of three-dimensional data are eliminated, and the actual width and left and right starting positions of each row of data are obtained at the same time, and the average value of the actual width is calculated to obtain the average width of the entire wood. The difference between the width of each row of wood data and the average width is calculated, and the suspected defect area is obtained according to the set difference range and the defect area length threshold. Finally, the suspected defect area is filtered out and merged to obtain the final edge defect detection result. Applying the present invention to wood edge defect detection can effectively overcome the various interferences and influences caused by complex industrial sites, and improve the defect detection speed and thus improve industrial production efficiency.

[0008] To achieve the above-mentioned objectives, the technical solution of the present invention is as follows: a wood edge defect detection method based on three-dimensional data, applied to wood edge defect detection, firstly, setting a valid data length threshold for each row and using it to calculate the upper and lower boundary positions of the wood; secondly, removing interference values ​​in each row of three-dimensional data, and simultaneously calculating the actual width and left and right starting positions of each row of data, and calculating the average of the actual widths to obtain the average width of the entire wood; calculating the difference between the width of each row of wood data and the average width, and obtaining suspected defect areas based on the set difference range and defect area length threshold; finally, filtering and merging the suspected defect areas to obtain the final edge defect detection result; the specific implementation steps of this method are as follows:

[0009] (1) Obtaining three-dimensional data: Obtaining three-dimensional data of wood with a length and width size of H×W through a depth camera. The value of each position in the three-dimensional data represents the depth of the wood surface;

[0010] (2) Data preprocessing; the specific steps are as follows:

[0011] I. Let the i-th row vector of the three-dimensional data be V i ={v i,1 ,v i,2,…,v i,j ,…,v i,W}, where i = (1, 2, ..., H), v i,j represents the depth value of the i-th row and j-th column in the 3D data. 3D data with a depth value greater than 0 are considered valid wood data, and those with a depth value less than 0 are considered background data.

[0012] II. Eliminate abnormal interference data; record V i The minimum continuous data length with depth values ​​greater than 0 at both ends is α, and V is calculated. i The length of the continuous interval greater than 0 in the interval, if the length of the interval is less than α, then the v in the interval i,j All are set to 0;

[0013] III. Set the valid data length threshold to T allow , if the row vector V i The number of elements greater than 0 is L i , remember L i Meet L i >T allow The minimum and maximum values ​​of are the actual upper and lower boundary positions of the wood in the three-dimensional data, and all L that meet the conditions are recorded. i The number is N, and the effective three-dimensional data of the wood with a size of N×W is obtained after removing the background data above and below the wood;

[0014] (3) Extracting contour information; the specific steps are as follows:

[0015] I. Let the vector of the i-th row of valid three-dimensional data be U i ={u i,1 ,u i,2 ,…,u i,j ,…,u i,W}, where i=(1,2,…,N), u i,j Represents the depth value of the i-th row and j-th column of valid three-dimensional data;

[0016] II. Remember U i The position of the element value greater than 0 in is j, then the minimum and maximum values ​​in j are the left end contour position l of the wood three-dimensional data in the i-th row. i and the right end contour position r i ;

[0017] III. Let the left end of the wood contour position vector be L line ={l1,l2,…,l i ,…,l N}, the right end contour position vector is R line ={r1,r2,…,r i ,…,r N}, then the width vector of the wood is Wline ={w1,w2,…,w i ,…,w N}, where w i =r i -l i ;

[0018] (4) Calculate the width deviation; calculate the width vector as W line The average value of W0 is obtained, and the deviation vector D is obtained. line ={d1,d2,…,d i ,…,d N}, where d i =w i -W0;

[0019] (5) Obtain the suspected defect area; set the allowable range of width deviation to (B min ,B max ), if B min <d i max , then the i-th row is a defective row, and consecutive defective rows represent a defective area, so m suspected defective areas E can be obtained. k , k=(1,2,…,m);

[0020] (6) Secondary screening of defective areas; calculate E for each suspected defective area k Middle w i The average value W k , k=(1,2,…,m), set the width deviation threshold W allow , if |W k -W0|>W allow , the corresponding suspected defect area is regarded as a confirmed defect area, otherwise it is eliminated; finally, n defect areas E are screened out. k , whose length is

[0021] (7) Defective area correction; the specific steps are as follows:

[0022] I. Defective area E k The upper boundary of is extended outward to obtain the extended area The area extension length is L extend , set the width vector of the extension area to

[0023] II. Calculate the width vector of the extended area The first-order forward difference vector of d k,i =w k,i -w k,i-1 ​,i=(2,3,…,L extend ); Calculate the extended first-order forward difference vector The average value of

[0024] III. If the average value is greater than T diff , then the extended area is classified as the defect area E k Otherwise, the upper boundary of the defect area is extended inward to obtain a new extension area Repeat steps Ⅰ and Ⅱ to obtain the average value of the first-order difference vector of the inward extension area. If the value is greater than T diff , then the extended area is retained, otherwise it is removed;

[0025] IV. For defective area E k Repeat steps (7).Ⅰ, (7).Ⅱ and (7).Ⅲ to obtain the corrected defect area E k ;

[0026] (8) Merge defect areas; traverse all corrected defect areas E k , if the distance between two defect areas is less than the threshold T edge When , the two defect areas are merged into one defect area to obtain the merged defect area E k , k=(1,2,…,c), c is the number of defective areas after merging;

[0027] (9) Classification of defective areas; the specific steps are as follows:

[0028] I. Each defect area E calculated according to step (7). k The average value of the first-order forward difference information M k ;

[0029] II. Set the defect classification threshold to T defect ;

[0030] III. If the defect area E k Located inside the valid 3D data, the defect area belongs to the “defect” type edge defect; if the defect area E k Located at both ends of the valid three-dimensional data, then compare M k With T defect , if M k >T defect , then the defect area belongs to the “defect” type edge defect, otherwise the defect area belongs to the “large and small head” type edge defect.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] 1) The present invention analyzes the width changes of the wood surface based on the three-dimensional data of the wood and then detects the edge defects of the wood, effectively overcoming the interference of stains and light and shadow caused by complex industrial sites.

[0033] 2) The present invention is an unsupervised defect detection algorithm that does not require marking defects, effectively improving the detection efficiency of wood edge defects, saving labor costs, and improving the production efficiency of the wood industry.

[0034] 3) The present invention detects the three-dimensional contour data one by one and corrects the final result through merging and filtering operations, which effectively improves the accuracy and robustness of defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a flow chart of wood edge defect detection according to the present invention. DETAILED DESCRIPTION

[0036] The above and other advantages of the present invention will become more apparent through the following detailed description of the preferred embodiments of the present invention with reference to the accompanying drawings.

[0037] (1) Obtaining three-dimensional data: Obtain three-dimensional data of wood with a length and width size of 4000×950 through a depth camera. The value of each position in the three-dimensional data represents the depth of the wood surface.

[0038] (2) Data preprocessing; the specific steps are as follows:

[0039] I. Let the i-th row vector of the three-dimensional data be V i ={v i,1 ,v i,2 ,…,v i,j ,…,v i,W}, where i = (1, 2, ..., 4000), v i,j Represents the depth value of the i-th row and j-th column in the three-dimensional data;

[0040] II. Calculation of V i The length of the continuous interval greater than 0 in the interval, if the length is less than 7, then the v in the interval i,j All are set to 0;

[0041] III. Set the effective data length threshold to 10. If the row vector V i The number of elements greater than 0 L i ; Remember L i Meet L i The minimum and maximum values ​​of >10 are the actual upper and lower boundary positions of the wood in the three-dimensional data, and all L that meet the conditions are recorded. i The number is N (in this example, N = 950);

[0042] IV. removing the 3D data outside the upper and lower boundaries to obtain valid 3D data of size N × 950;

[0043] (3) Extracting contour information; the specific steps are as follows:

[0044] I. Let the vector of the i-th row of valid three-dimensional data be U i ={u i,1 ,u i,2 ,…,u i,j ,…,u i,W}, where i=(1,2,…,950), u i,j Represents the depth value of the i-th row and j-th column in the valid three-dimensional data;

[0045] II. Remember U i The position of the element value greater than 0 in is j, then the minimum and maximum values ​​in j are the left end contour position l of the wood three-dimensional data in the i-th row. i and the right end contour position r i ;

[0046] III. Let the left end of the wood contour position vector be L line ={l1,l2,…,l i ,…,l 950}, the right end contour position vector is R line ={r1,r2,…,r i ,…,r 950}, then the width vector of the wood is W line ={w1,w2,…,w i ,…,w 950}, where w i =r i -l i .

[0047] (4) Calculate the width deviation; calculate the width vector as W line The average value of W0 is obtained, and the deviation vector D is obtained. line ={d1,d2,…,d i ,…,d 950}, where d i =w i -W0.

[0048] (5) Obtain the suspected defect area; set the allowable range of width deviation to (12,20), if 12≤d i ≤20, then the i-th row is a defective row, and consecutive defective rows represent a defective area, so m suspected defective areas E can be obtained. k , k=(1,2,…,m).

[0049] (6) Secondary screening of defective areas; calculate E for each suspected defective area k Middle w i The average value W k , k=(1,2,…,m), set the width deviation threshold to 13, if |W k -W0|≥13, the corresponding suspected defect area is considered as a confirmed defect area, otherwise it is eliminated. Finally, n defect areas E are screened out. k , whose length is

[0050] (7) Defective area correction; the specific steps are as follows:

[0051] I. Defective area E k The upper boundary of is extended outward to obtain the extended area The area extension length is 10, and the width vector of the extension area is set to

[0052] II. Calculate the width vector of the extended area The first-order forward difference vector of d k,i =w k,i -w k,i-1 ,i=(2,3,…,10); Calculate the extended first-order forward difference vector The average value of

[0053] III. If the average value is greater than 4, the extended area is classified as defect area E k Otherwise, the upper boundary of the defect area is extended inward to obtain a new extension area Repeat steps I and II to obtain the average value of the first-order difference vector of the inward extension area. If the value is greater than 4, the extension area is retained, otherwise it is discarded.

[0054] IV. For defective area E k Repeat steps (7).Ⅰ, (7).Ⅱ and (7).Ⅲ to obtain the corrected defect area E k .

[0055] (8) Merge defect areas; traverse all corrected defect areas E k If the distance between two defective areas is less than the threshold value 30, the two defective areas are merged into one defective area to obtain the merged defective area E k , k=(1,2,…,c), c is the number of defective areas after merging.

[0056] (9) Classification of defective areas; the specific steps are as follows:

[0057] I. Each defect area E calculated according to step (7). k The average value of the first-order forward difference information M k ;

[0058] II. Set the defect classification threshold to 8;

[0059] III. If the defect area E k Located inside the valid 3D data, the defect area belongs to the “defect” type edge defect; if the defect area E k Located at both ends of the valid three-dimensional data, then compare M k With the size of 8, if M k >8, the defect area belongs to the “defect” type edge defect, otherwise the defect area belongs to the “large and small head” type edge defect.

[0060] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions and effects do not exceed the scope of the technical solution of the present invention, shall fall within the scope of protection of the present invention.

Claims

1. A wood edge defect detection method based on three-dimensional data, characterized in that: Applied to wood edge defect detection, the method first sets a threshold for the effective data length of each row and uses it to calculate the upper and lower boundary positions of the wood. Then, the interference values ​​in each row of 3D data are removed, and the actual width and left and right starting positions of each row of data are obtained. The average of the actual widths is calculated to obtain the average width of the entire wood. The difference between the width of each row of wood data and the average width is calculated. Obtain suspicious defect areas based on the set difference range and width deviation threshold, filter and merge the suspicious defect areas to obtain the final edge defect detection results, including: Obtain the suspected defect area according to the set difference range; calculate E for each suspected defect area k Middle w i The average value W k , k=(1,2,…,m), if |W k -W0|>width deviation threshold W allow , the corresponding suspected defect area is regarded as a confirmed defect area, otherwise it is eliminated; n defect areas E are screened out k , the length is I. The defect area E k The upper boundary of is extended outward to obtain the extended area The area extension length is L extend , the width vector of the extended area is II. Calculation The first-order forward difference vector of d k,i =w k,i -w k,i-1 ,i=(2,3,…,L extend );calculate The average value of III. If The average value is greater than T diff , the extended area is divided into the defect area E k Otherwise, the upper boundary of the defect area is extended inward to obtain a new extension area, and the average value of the first-order difference vector of the new extension area is obtained. If the average value is greater than T diff , the extended area is retained, otherwise it is removed; For defect area E k Repeat steps Ⅰ, Ⅱ and Ⅲ to obtain the corrected defect area E k ; Traverse all defect areas E after correction k , if the distance between two defect areas is less than the threshold T edge , merge the two defect areas into one defect area, and obtain the merged defect area E k , k=(1,2,…,c), c is the number of defective areas after merging; The calculated defect area E k The average value of the first-order forward difference information M k ; If E k Located inside the valid 3D data, the defect area belongs to the "defect" type edge defect; if E k Located at both ends of the valid three-dimensional data, and if M k >Defect classification threshold T defect , the defect area belongs to the "defect" type edge defect, otherwise the defect area belongs to the "large and small head" type edge defect.

2. The method for detecting wood edge defects based on three-dimensional data according to claim 1, characterized in that: The specific implementation steps of this method are as follows: (1) Obtaining three-dimensional data: Obtaining three-dimensional data of wood with a length and width size of H×W through a depth camera. The value of each position in the three-dimensional data represents the depth of the wood surface; (2) Data preprocessing; the specific steps are as follows: I. Let the i-th row vector of the three-dimensional data be V i ={v i,1 ,v i,2 ,…,v i,j ,…,v i,W }, where i = (1, 2, ..., H), v i,j represents the depth value of the i-th row and j-th column in the 3D data. 3D data with a depth value greater than 0 are considered valid wood data, and those with a depth value less than 0 are considered background data. II. Eliminate abnormal interference data; record V i The minimum continuous data length with depth values ​​greater than 0 at both ends is α, and V is calculated. i The length of the continuous interval greater than 0 in the interval, if the length of the interval is less than α, then the v in the interval i,j All are set to 0; III. Set the valid data length threshold to T allow , if the row vector V i The number of elements greater than 0 is L i , remember L i Meet L i >T allow The minimum and maximum values ​​of are the actual upper and lower boundary positions of the wood in the three-dimensional data, and all L that meet the conditions are recorded. i The number is N, and the effective three-dimensional data of the wood with a size of N×W is obtained after removing the background data above and below the wood; (3) Extracting contour information; The specific steps are as follows: I. Let the vector of the i-th row of valid three-dimensional data be U i ={u i,1 ,u i,2 ,…,u i,j ,…,u i,W }, where i=(1,2,…,N), u i,j Represents the depth value of the i-th row and j-th column of valid three-dimensional data; II. Remember U i The position of the element value greater than 0 in is j, then the minimum and maximum values ​​in j are the left end contour position l of the wood three-dimensional data in the i-th row. i and the right end contour position r i ; III. Let the left end of the wood contour position vector be L line ={l1,l2,…,l i ,…,l N }, the right end contour position vector is R line ={r1,r2,…,r i ,…,r N }, then the width vector of the wood is W line ={w1,w2,…,w i ,…,w N }, where w i =r i -l i ; (4) Calculate width deviation; Calculate the width vector W line The average value of W0 is obtained, and the deviation vector D is obtained. line ={d1,d2,…,d i ,…,d N }, where d i =w i -W0; (5) Obtaining suspected defect areas; Set the allowable range of width deviation to (B min ,B max ), if B min <d i max , then the i-th row is a defective row, and consecutive defective rows represent a defective area, so m suspected defective areas E can be obtained. k , k=(1,2,…,m).​

Citation Information

Patent Citations

  • Edge defect detection method and device

    CN113034447A

  • A method for detecting product edge defects

    CN113450307B

  • Automobile tire quality 3D visual holographic detection method, device, equipment and medium

    CN115661045A

  • Wood defect detector and method therefor

    JP2011095109A