A method and system for identifying surface defects of wood composite board furniture
By adaptive grid division and mutual information calculation of texture and structural information on the images collected on the surface of wooden composite board furniture, the defect area is identified and positioned, and the problem of natural texture interference and insufficient recognition ability in the prior art is solved, and higher defect recognition accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510077339.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The prior art is difficult to eliminate interference from natural texture when identifying surface defects of wooden composite board furniture, especially when the texture is complex, it is easy to misjudgment, and the ability to identify small defects and minor changes is insufficient.
By adaptively meshing the wooden board image, texture direction information and high and low frequency texture components are extracted, the connecting graph model is constructed based on structural edge information, the local mutual information between the texture and the structure is calculated, the mutual information matrix is generated, and abnormal scores and correlation value calculations are performed to identify and locate defect areas.
It effectively reduces interference from natural textures, improves the ability to identify small defects and minor changes, improves the accuracy and reliability of defect recognition, and reduces misjudgment and misjudgment.
Smart Images

Figure CN119477929B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a method and system for identifying surface defects of wood composite board furniture. Background Art
[0002] Wood composite panels are lightweight, strong, stable, smooth and easy to process. They are environmentally friendly, durable and cost-effective, and are commonly used in furniture manufacturing. However, wood composite panels may have cracks, bubbles, warping, surface defects and uneven density, which will affect the quality and service life of the product.
[0003] The current existing technologies mainly detect defects in wood composite panels through image processing, machine learning and sensor technology. Common methods include: using computer vision and infrared imaging technology to detect surface cracks and bubbles, combining deep learning algorithms to identify textures and surface features to accurately locate defective areas; using non-destructive detection technologies such as ultrasound and laser scanning to determine internal defects such as voids or uneven density.
[0004] However, these technologies have not been able to completely eliminate the interference of the natural texture of wood, especially when there are complex textures on the wood surface, the defects are highly similar to the texture and are easily misjudged. At the same time, it is still difficult to identify small defects such as fine cracks and small color changes. These technologies usually rely on the significant features of larger defects, but are not sensitive enough to details, making it difficult to accurately identify small defects or minor changes, resulting in low accuracy in identifying surface defects of wood composite board furniture.
[0005] Therefore, a method and system for identifying surface defects of wood composite board furniture are proposed. Summary of the invention
[0006] The object of the present invention is to provide a method and system for identifying surface defects of wood composite board furniture, which are used to reduce the interference of natural texture and improve the defect identification of small defects and slight changes. A wood board image is collected from the surface of wood composite board furniture. The wood board image is adaptively gridded according to different scales, and texture direction information and high- and low-frequency texture components are extracted to obtain a texture feature map. The structural edge information of the wood board image is extracted to obtain a structural information map. The texture feature map and the structural information map are matched, and the local mutual information between the two in each area is calculated; resolution images of the wood board image at different scales are collected, and the mutual information matrix of the resolution image is calculated. Based on the mutual information matrix, an abnormality score is assigned to each matrix element; the grid is divided according to the abnormality score, the correlation value of adjacent grids is calculated, and the defect area is obtained based on the correlation value. The defect area is defect-classified. The present invention can reduce the interference of natural texture and improve the defect identification of small defects and slight changes.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for identifying surface defects of wood composite board furniture, comprising:
[0009] Data collection and preprocessing: collecting wood board images from the surface of wood composite board furniture and preprocessing the wood board images;
[0010] Texture feature extraction: Adaptively mesh the wood board image according to different scales to obtain multiple sub-regions; extract texture direction information from each sub-region, and then use Fourier transform to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region;
[0011] Structural information extraction: extracting structural edge information of the wooden board image, constructing a connected graph model, analyzing the connectivity between each structural sub-region in the connected graph model, and obtaining a structural information graph of each structural sub-region;
[0012] Calculation of the mutual information between texture and structure: matching the texture feature map and the structure information map in each region, and calculating the local mutual information between the two in each region; collecting the resolution images of the wooden board image at the different scales, and based on the resolution images, using the local mutual information calculation to obtain the mutual information matrix;
[0013] Abnormal area detection: Based on the mutual information matrix, an abnormal score is assigned to each matrix element; the area where the abnormal score is not less than the score threshold is divided into multiple grids, the correlation value of adjacent grids is calculated using the mutual information matrix, and the grids where the correlation value is not less than the correlation value threshold are classified as defective areas;
[0014] Defect classification: extract the contour of the defect area and detect the boundary; further analyze the morphological characteristics of the defect area according to the boundary and perform defect classification.
[0015] Furthermore, in the texture feature extraction, at different scales, according to the thickness and distribution density of the texture, the wooden board image is divided into a plurality of adaptive sub-regions using a block-based approach;
[0016] A filtering method based on local extreme points is used to extract texture direction information from each sub-region, and then Fourier transform is used to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region.
[0017] Furthermore, in the structural information extraction, Canny edge detection is used to extract the structural edge information of the wooden board image, and an opening and closing operation is performed to obtain a connected graph model;
[0018] Each node in the connected graph model represents a structural sub-region, and each edge represents the adjacency relationship between two structural sub-regions; the connectivity of each node and edge in the connected graph is analyzed, and the overall structural features in the wooden board image are captured through the topological structure of the graph to obtain the sub-structure information of each structural sub-region; the sub-structure information of each structural sub-region is used to form structural information.
[0019] Furthermore, in the calculation of the mutual information between the texture and the structure, the texture feature map and the structure information map in each region are matched one by one, the local mutual information between the two in each region is calculated, and the correlation between the texture feature and the structure information is evaluated;
[0020] The resolution images of the wooden board image at the different scales are collected, and the mutual information of each area in the resolution images at the different scales is calculated to obtain multi-scale mutual information; the multi-scale mutual information is fused and combined with the local mutual information to generate a mutual information matrix.
[0021] Further, in the abnormal region detection, a standard deviation is calculated based on each mutual information value in the mutual information matrix, and an abnormality score of each matrix element is calculated;
[0022] Divide the area where the abnormality score is not less than the score threshold into a plurality of grids, each of which contains a plurality of elements; calculate the correlation value of adjacent grids using the mutual information matrix to measure the similarity of texture and structure between adjacent grids;
[0023] The grids whose correlation values are not less than the correlation value threshold are merged and classified as defect areas.
[0024] A surface defect recognition system for wood composite board furniture, comprising:
[0025] A data acquisition and preprocessing unit, which acquires a board image from the surface of the wood composite board furniture and preprocesses the board image;
[0026] The texture feature extraction unit performs adaptive grid division on the wooden board image according to different scales to obtain a plurality of sub-regions; extracts texture direction information from each sub-region, and then uses Fourier transform to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region;
[0027] A structural information extraction unit extracts structural edge information of the wooden board image, constructs a connected graph model, analyzes connectivity between each structural sub-region in the connected graph model, and obtains a structural information graph of each structural sub-region;
[0028] The texture and structure mutual information calculation unit matches the texture feature map and the structure information map in each region, and calculates the local mutual information between the two in each region; collects the resolution images of the wooden board image at the different scales, and obtains the mutual information matrix based on the resolution images and the local mutual information calculation;
[0029] The abnormal area detection unit assigns an abnormal score to each matrix element based on the mutual information matrix; divides the area where the abnormal score is not less than the score threshold into a plurality of grids, calculates the correlation value of adjacent grids using the mutual information matrix, and classifies the grids where the correlation value is not less than the correlation value threshold as defective areas;
[0030] The defect classification unit extracts the contour of the defect area and detects the boundary; further analyzes the morphological characteristics of the defect area according to the boundary and performs defect classification.
[0031] Furthermore, in the texture feature extraction, at different scales, according to the thickness and distribution density of the texture, the wooden board image is divided into a plurality of adaptive sub-regions using a block-based approach;
[0032] A filtering method based on local extreme points is used to extract texture direction information from each sub-region, and then Fourier transform is used to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region.
[0033] Furthermore, in the structural information extraction, Canny edge detection is used to extract the structural edge information of the wooden board image, and an opening and closing operation is performed to obtain a connected graph model;
[0034] Each node in the connected graph model represents a structural sub-region, and each edge represents the adjacency relationship between two structural sub-regions; the connectivity of each node and edge in the connected graph is analyzed, and the overall structural features in the wooden board image are captured through the topological structure of the graph to obtain the sub-structure information of each structural sub-region; the sub-structure information of each structural sub-region is used to form structural information.
[0035] Furthermore, in the calculation of the mutual information between the texture and the structure, the texture feature map and the structure information map in each region are matched one by one, the local mutual information between the two in each region is calculated, and the correlation between the texture feature and the structure information is evaluated;
[0036] The resolution images of the wooden board image at the different scales are collected, and the mutual information of each area in the resolution images at the different scales is calculated to obtain multi-scale mutual information; the multi-scale mutual information is fused and combined with the local mutual information to generate a mutual information matrix.
[0037] Further, in the abnormal region detection, a standard deviation is calculated based on each mutual information value in the mutual information matrix as an abnormality score of each matrix element;
[0038] Divide the area where the abnormality score is not less than the score threshold into a plurality of grids, each of which contains a plurality of elements; calculate the correlation value of adjacent grids using the mutual information matrix to measure the similarity of texture and structure between adjacent grids;
[0039] The grids whose correlation values are not less than the correlation value threshold are merged and classified as defect areas.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] 1. The present invention can effectively identify and distinguish the structural features and potential defects of the wood surface by extracting the structural edge information of the wood board image and constructing a connectivity graph model. The connectivity graph model can capture the complex structural relationship of the wood surface and help identify the boundary between normal and abnormal areas. This method does not rely on pure texture information, but provides a more detailed description of wood surface defects by analyzing the connectivity and organizational pattern of each structural sub-area in the image, thereby effectively avoiding misjudgment caused by surface texture similarity and improving the accuracy and reliability of defect identification.
[0042] 2. The present invention achieves the fusion of texture and structural information by calculating the local mutual information between the texture feature map and the structural information map, thereby more comprehensively describing the characteristics of the wood surface. The local mutual information calculation can quantify the similarity between texture and structural information, providing strong support for the precise positioning of defective areas. Through multi-scale resolution images, subtle changes at different scales can be captured, avoiding information loss or errors at a single scale, and significantly improving the sensitivity and accuracy of defect detection.
[0043] 3. The present invention assigns an abnormality score to each area based on the mutual information matrix, and screens the defective area through the correlation value threshold, which helps to accurately identify and locate small defects and slight changes on the surface of the wooden board. By refining the grid division and calculating the correlation value, the abnormal area can be accurately detected, and the influence of external noise and texture interference can be reduced. This method effectively avoids the misjudgment that may be caused by the traditional detection method based on global features, improves the accuracy of defect location, and provides a reliable basis for subsequent defect classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of a knot defect of a wood composite board of the present invention;
[0045] Figure 2 A schematic diagram of crack defects of the wood composite board of the present invention;
[0046] Figure 3 A schematic diagram of a wormhole defect in a wood composite board of the present invention;
[0047] Figure 4 A method flow chart of a method for identifying surface defects of wood composite board furniture according to the present invention;
[0048] Figure 5 This is a system structure diagram of a surface defect recognition system for wood composite board furniture of the present invention. DETAILED DESCRIPTION
[0049] 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.
[0050] In order to reduce the interference of natural texture and improve the defect recognition of small defects and slight changes, the present invention provides a method and system for identifying surface defects of wood composite board furniture. In order to illustrate the function of the present invention, the effectiveness of the present invention will be described from the following examples.
[0051] Embodiment 1
[0052] like Figure 1 , Figure 2 and Figure 3 As shown in the figure, schematic diagrams of knots, cracks and wormholes of wood composite board are shown respectively. If these defects appear on the surface of wood composite board furniture, it will affect the quality and service life of the furniture. In order to improve the quality of wood composite board furniture, a certain A Smart Home Technology Co., Ltd. has deployed defect recognition equipment on the wood processing production line to achieve automated quality control. The defect recognition equipment uses a method for identifying surface defects of wood composite board furniture. Figure 4 , which is a flow chart of a method for identifying surface defects of wood composite board furniture.
[0053] Reference Figure 4 Step S01 in the data collection and preprocessing: collecting wood board images from the surface of wood composite board furniture and preprocessing the wood board images.
[0054] Specifically, the image of the wooden board surface is collected by a high-resolution camera, scanner or other imaging device, and the data contains interference such as noise, shadows and uneven lighting. Therefore, the next step is to use data preprocessing on the wooden board image.
[0055] The data preprocessing method includes denoising: using a filter to remove noise by weighted average of pixels in the board image, and recording the board image as , the specific formula is:
[0056] ;
[0057] in, Represents a wooden board image Position in represents the filter weight, Indicates the filter window size; Represents the filtered image.
[0058] Data preprocessing methods also include image enhancement: According to the texture characteristics of wood, adaptive contrast enhancement technology is used to locally adjust the contrast of the image to make the texture and cracks clearer. The principle of adaptive contrast enhancement technology is to divide the image into small blocks and perform histogram equalization independently in each small block, thereby improving local contrast and enhancing details. The specific calculation formula is:
[0059] ;
[0060] in, and Respectively represent the mean and standard deviation of the current small block; and denote the expected mean and standard deviation respectively; Represents the enhanced image.
[0061] Data preprocessing methods also include geometric transformation: correcting the perspective deviation or geometric deformation of the image, ensuring that all images are proportional and avoiding errors caused by shooting angles. Perform an affine transformation to correct the geometric distortion of the image through a linear transformation. The formula of the affine transformation is expressed as:
[0062] ;
[0063] in, Represents the enhanced image The coordinates of each pixel in; represents the transformation matrix; represents the translation vector; Represents the corrected pixel coordinates.
[0064] Further, refer to Figure 4Step S02 in the process is texture feature extraction: adaptively mesh the wood board image according to different scales to obtain multiple sub-regions; extract texture direction information from each sub-region, and then use Fourier transform to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region.
[0065] Specifically, at different scales, the wood board image is divided into blocks according to the thickness and distribution density of the texture. Divide into multiple adaptive sub-areas ,in, , Indicates the total number of sub-regions.
[0066] Furthermore, a filtering method based on local extreme points is used to filter each of the sub-regions. Extract texture direction information. Local extreme points refer to points with extreme pixel values in a certain neighborhood. By calculating the local extreme points in each sub-region, the texture direction information of each point is obtained. The calculation of local extreme points usually depends on the gradient information of the image. Assume that each sub-region The gradient of ,in Represents each sub-region The coordinates of the pixels in . Each pixel The texture direction information is expressed as follows:
[0067] ;
[0068] in, Represents pixels The texture direction; Represents the inverse tangent function.
[0069] Furthermore, Fourier transform is used to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region. Specifically, suppose each sub-region The gray value in , the Fourier transform formula is:
[0070] ;
[0071] in, Indicates Sub-areas Gray value within represents the frequency domain representation after Fourier transform; and represents the frequency domain coordinates; and Indicates the size of the sub-region; Represents the natural base; represents pi; Represents an imaginary unit. middle and The size of corresponds to the high-frequency and low-frequency texture components, and a texture feature map of each sub-region is obtained.
[0072] The problem of surface texture interference on wood composite board furniture is effectively solved through adaptive meshing and multi-scale texture feature extraction. By extracting texture direction information for each sub-region and using Fourier transform to separate high-frequency and low-frequency texture components, subtle texture changes can be captured more accurately. This method helps improve the ability to identify small defects and minor changes, reduce the interference of natural texture on defect detection, and thus improve the accuracy and reliability of defect identification.
[0073] Further, refer to Figure 4 Step S03 in the embodiment of the present invention is to extract structural information: extract structural edge information of the wooden board image, construct a connected graph model, analyze the connectivity between each structural sub-region in the connected graph model, and obtain a structural information graph of each structural sub-region.
[0074] Specifically, Canny edge detection is used to extract the structural edge information of the wooden board image to obtain an edge image . For edge images Use morphological operations, i.e. opening and closing operations, to transform the edge image Divided into multiple sub-areas ,in Indicates the number of sub-regions. The formula for expressing a sub-region is: ,in, Represents the pixels in the sub-region. Treated as a node in a connected graph , so the node set of the connected graph is for If Sub-areas and Sub-areas If there is a common boundary between them, an edge is established in the connectivity graph to connect the two nodes. The edge set for: ,in, Indicates sub-area The adjacency relationship between them.
[0075] Connectivity Graph Expressed as , analyzing the connectivity graph The connectivity of each node and edge in the graph captures the overall structural features of the wooden board image through the topological structure of the graph. , calculate the sub-region and other sub-regions Number of connections : ,in, Represents an element in the adjacency matrix. If the node With Node If there is an edge between ,otherwise Each sub-area Structural information It can be characterized by its topological features such as connectivity and degree in a connection graph.
[0076] By using Canny edge detection and opening and closing operations, the structural edge information of the wood board image can be effectively extracted, and the connected graph model can be further constructed to capture the overall structural features in the image. By analyzing the connectivity of each node and edge in the connected graph, the relationship between different structural sub-regions can be accurately described, thereby obtaining the structural information of each sub-region. This process can remove the interference of natural textures, making the identification of defective areas more accurate, and can better reveal the subtle changes and small defects on the surface of wood composite board furniture, providing a reliable basis for subsequent defect location and classification.
[0077] Further, refer to Figure 4 Step S04 in the above method calculates the mutual information between texture and structure: the texture feature map and the structure information map in each region are matched, and the local mutual information between the two in each region is calculated; resolution images of the wooden board image at different scales are collected, and based on the resolution images, the mutual information matrix is obtained by using the local mutual information calculation.
[0078] Specifically, the texture feature map and the structure information map in each region are matched one by one, the local mutual information between the two in each region is calculated, and the correlation between the texture feature and the structure information is evaluated. , an area in the structure information graph is recorded as , then the local mutual information between the two It can be calculated by the following formula:
[0079] ;
[0080] in, and Represents the corresponding areas in the texture feature map and the structure information map; Represents the probability distribution of texture feature maps; Representing the probability distribution of the structural information graph; represents the joint probability distribution, which represents the joint probability of the texture feature map and the structure information map in the corresponding area; Represents a logarithmic function.
[0081] At different scales, images with different resolutions are obtained. The texture feature map at each scale is denoted as , the structural information graph is recorded as . Then the mutual information at each scale is The calculation formula is:
[0082] ;
[0083] in, and Indicates The corresponding areas in the texture feature maps and structure information maps at different scales; Indicates Probability distribution of texture feature maps at different scales; Indicates Probability distribution of structural information graphs at different scales; Indicates The joint probability distribution at different scales represents the joint probability of the texture feature map and the structure information map in the corresponding area; Represents a logarithmic function.
[0084] Mutual information at each scale The multi-scale mutual information is fused and combined with the local mutual information to generate a mutual information matrix , the specific calculation formula is: ;
[0085] in, Indicates the number of scales; Indicates The weight of the scale.
[0086] The calculation of the mutual information between texture and structure can effectively evaluate the correlation between texture features and structural information, thereby improving the accuracy of defect recognition. By matching the texture feature map and the structural information map one by one and calculating the local mutual information, the interference of natural texture can be effectively reduced and the characteristics of the defect area can be highlighted. Further, through the fusion of multi-scale mutual information, subtle changes at different scales can be captured, so that the performance of defects at different resolutions can be fully analyzed. The final generated mutual information matrix provides an accurate basis for the detection and positioning of abnormal areas, and enhances the ability to identify small defects and minor changes.
[0087] Further, refer to Figure 4Step S05 in the method is abnormal area detection: based on the mutual information matrix, an abnormal score is assigned to each matrix element; the area with an abnormal score not less than the score threshold is divided into multiple grids, and the correlation values of adjacent grids are calculated using the mutual information matrix, and the grids with correlation values not less than the correlation value threshold are classified as defective areas.
[0088] Specifically, the mutual information matrix Each element in Indicates the corresponding area The standard deviation is calculated based on each mutual information value in the mutual information matrix, and the calculation formula is:
[0089] ;
[0090] in, Represents the mutual information matrix An element in represents the mutual information value of the region; Represents the mutual information matrix The standard deviation of , which indicates the dispersion of mutual information values; Represents the mutual information matrix The mean of Represents the mutual information matrix The number of elements in .
[0091] Based on standard deviation Calculate the anomaly score for each element , the calculation formula is:
[0092] ;
[0093] in, Represents the mutual information matrix An element in Represents the mutual information matrix The standard deviation of Represents the mutual information matrix The mean of .
[0094] The abnormal score The areas not less than the scoring threshold are divided into grids, each containing elements. For each grid ( is the grid number), calculate the average anomaly score of all elements in the grid .
[0095] Assume Grid and Grid If they are adjacent grids, then the correlation value between them is It can be measured by calculating the difference in the average anomaly scores between the two. The calculation formula is as follows:
[0096] ;
[0097] in, Representation Grid The average anomaly score of Representation Grid The average anomaly score of Measures the similarity of texture and structure between adjacent meshes.
[0098] The associated value Not less than the associated value threshold The meshes are merged and classified as defect areas.
[0099] By calculating the standard deviation of each element in the mutual information matrix, abnormal areas that are significantly different from the surrounding areas can be effectively identified. This method uses the change in mutual information values to reflect the significant deviation of texture and structure, thereby more accurately locating possible defective areas. By dividing the areas with abnormal scores above the threshold into grids and calculating the correlation values of adjacent grids, the identification of defective areas can be further refined to reduce misjudgments and missed judgments. This comprehensive analysis based on texture and structural information significantly improves the accuracy and reliability of defect identification, and helps to quickly and accurately detect minor defects on the surface of wood composite board furniture in actual production.
[0100] Further, refer to Figure 4 Step S06 in the process is defect classification: extracting the contour of the defect area and detecting the boundary; further analyzing the morphological features of the defect area according to the boundary and classifying the defect.
[0101] Specifically, an edge detection algorithm such as Canny edge detection is used to extract the contour of the defect area and identify the boundary of the defect area. Then, morphological features are calculated to describe the shape and size of the defect, including area, perimeter, aspect ratio and circularity. Finally, a classification algorithm, including but not limited to decision tree, support vector machine or K nearest neighbor algorithm, is used to classify the defects.
[0102] A Smart Home Technology Co., Ltd. used a wood composite board furniture surface defect recognition method to identify the surface defects of wood composite board furniture. The results are shown in Table 1, which shows some experimental data.
[0103] Table 1 Part of experimental data
[0104]
[0105] As can be seen from Table 1, the method for identifying surface defects of wood composite board furniture used in this embodiment has the highest accuracy in the identification of defects such as knots, cracks and wormholes. By combining texture features and structural information, this method can effectively reduce the interference of natural textures and improve the recognition accuracy of small defects and slight changes on the surface of wood composite board furniture. Adaptive grid division and Fourier transform are used to extract texture features, which enhances the sensitivity to defects of different scales. The combination of structural information extraction and mutual information calculation improves the detection and positioning capabilities of abnormal areas, and can more accurately identify and locate defects. Finally, defect classification is performed through morphological feature analysis, which further improves the accuracy of defect classification and enhances the reliability and efficiency of surface quality detection of wood composite boards.
[0106] Embodiment 2
[0107] Company B mainly undertakes wood processing and furniture repair business. During the processing of wood, various natural textures and uneven grains are prone to occur, which may affect the quality of the final product. When repairing furniture, accurately identifying the location and type of defects is also an important step. Therefore, Company B uses a wood composite board furniture surface defect recognition system. Figure 5 , which is a system structure diagram of a surface defect recognition system for wood composite board furniture.
[0108] The system comprises a data acquisition and preprocessing unit, which acquires a wood board image from the surface of wood composite board furniture and preprocesses the wood board image.
[0109] Specifically, the image of the wooden board surface is collected by a high-resolution camera, scanner or other imaging device, and the data contains interference such as noise, shadows and uneven lighting. Therefore, the next step is to use data preprocessing on the wooden board image.
[0110] The data preprocessing method includes denoising: using a filter to remove noise by weighted average of pixels in the board image, and recording the board image as , the specific formula is:
[0111] ;
[0112] in, Represents a wooden board image Position in represents the filter weight, Indicates the filter window size; Represents the filtered image.
[0113] Data preprocessing methods also include image enhancement: According to the texture characteristics of wood, adaptive contrast enhancement technology is used to locally adjust the contrast of the image to make the texture and cracks clearer. The principle of adaptive contrast enhancement technology is to divide the image into small blocks and perform histogram equalization independently in each small block, thereby improving local contrast and enhancing details. The specific calculation formula is:
[0114] ;
[0115] in, and Respectively represent the mean and standard deviation of the current small block; and denote the expected mean and standard deviation respectively; Represents the enhanced image.
[0116] Data preprocessing methods also include geometric transformation: correcting the perspective deviation or geometric deformation of the image, ensuring that all images are proportional and avoiding errors caused by shooting angles. Perform an affine transformation to correct the geometric distortion of the image through a linear transformation. The formula of the affine transformation is expressed as:
[0117] ;
[0118] in, Represents the enhanced image The coordinates of each pixel in; represents the transformation matrix; represents the translation vector; Represents the corrected pixel coordinates.
[0119] The system also includes a texture feature extraction unit, which adaptively grids the wooden board image according to different scales to obtain multiple sub-regions; extracts texture direction information for each sub-region, and then uses Fourier transform to extract high-frequency and low-frequency texture components to obtain a texture feature map for each sub-region.
[0120] Specifically, at different scales, the wood board image is divided into blocks according to the thickness and distribution density of the texture. Divide into multiple adaptive sub-areas ,in, , Indicates the total number of sub-regions.
[0121] Furthermore, a filtering method based on local extreme points is used to filter each of the sub-regions. Extract texture direction information. Local extreme points refer to points with extreme pixel values in a certain neighborhood. By calculating the local extreme points in each sub-region, the texture direction information of each point is obtained. The calculation of local extreme points usually depends on the gradient information of the image. Assume that each sub-region The gradient of ,in Represents each sub-region The coordinates of the pixels in . Each pixel The texture direction information is expressed as follows:
[0122] ;
[0123] in, Represents pixels The texture direction; Represents the inverse tangent function.
[0124] Furthermore, Fourier transform is used to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region. Specifically, suppose each sub-region The gray value in , the Fourier transform formula is:
[0125] ;
[0126] in, Indicates Sub-areas Gray value within represents the frequency domain representation after Fourier transform; and represents the frequency domain coordinates; and Indicates the size of the sub-region; Represents the natural base; represents pi; Represents an imaginary unit. middle and The size of corresponds to the high-frequency and low-frequency texture components, and a texture feature map of each sub-region is obtained.
[0127] The system also includes a structural information extraction unit, which extracts structural edge information of the wooden board image, constructs a connected graph model, analyzes the connectivity between each structural sub-region in the connected graph model, and obtains a structural information graph of each structural sub-region.
[0128] Specifically, Canny edge detection is used to extract the structural edge information of the wooden board image to obtain an edge image . For edge images Use morphological operations, i.e. opening and closing operations, to transform the edge image Divided into multiple sub-areas ,in Indicates the number of sub-regions. The formula for expressing a sub-region is: ,in, Represents the pixels in the sub-region. Treated as a node in a connected graph , so the node set of the connected graph is for If Sub-areas and Sub-areas If there is a common boundary between them, an edge is established in the connectivity graph to connect the two nodes. The edge set for: ,in, Indicates sub-area The adjacency relationship between them.
[0129] Connectivity Graph Expressed as , analyzing the connectivity graph The connectivity of each node and edge in the graph captures the overall structural features of the wooden board image through the topological structure of the graph. , calculate the sub-region and other sub-regions Number of connections : ,in, Represents an element in the adjacency matrix. If the node With Node If there is an edge between ,otherwise Each sub-area Structural information It can be characterized by its topological features such as connectivity and degree in a connection graph.
[0130] The system also includes a mutual information calculation unit for texture and structure, which matches the texture feature map and the structural information map in each area and calculates the local mutual information between the two in each area; collects resolution images of the wooden board image at different scales, and based on the resolution images, uses the local mutual information calculation to obtain a mutual information matrix.
[0131] Specifically, the texture feature map and the structure information map in each region are matched one by one, the local mutual information between the two in each region is calculated, and the correlation between the texture feature and the structure information is evaluated. , an area in the structure information graph is recorded as , then the local mutual information between the two It can be calculated by the following formula:
[0132] ;
[0133] in, and Represents the corresponding areas in the texture feature map and the structure information map; Represents the probability distribution of texture feature maps; Representing the probability distribution of the structural information graph; represents the joint probability distribution, which represents the joint probability of the texture feature map and the structure information map in the corresponding area; Represents a logarithmic function.
[0134] At different scales, images with different resolutions are obtained. The texture feature map at each scale is denoted as , the structural information graph is recorded as . Then the mutual information at each scale is The calculation formula is:
[0135] ;
[0136] in, and Indicates The corresponding areas in the texture feature maps and structure information maps at different scales; Indicates Probability distribution of texture feature maps at different scales; Indicates Probability distribution of structural information graphs at different scales; Indicates The joint probability distribution at different scales represents the joint probability of the texture feature map and the structure information map in the corresponding area; Represents a logarithmic function.
[0137] Mutual information at each scale The multi-scale mutual information is fused and combined with the local mutual information to generate a mutual information matrix , the specific calculation formula is:
[0138] ;
[0139] in, Indicates the number of scales; Indicates The weight of the scale.
[0140] The system also includes an abnormal area detection unit, which assigns an abnormal score to each matrix element based on the mutual information matrix; divides the area where the abnormal score is not less than the score threshold into multiple grids, calculates the correlation value of adjacent grids using the mutual information matrix, and classifies the grids where the correlation value is not less than the correlation value threshold as defective areas.
[0141] Specifically, the mutual information matrix Each element in Indicates the corresponding area The standard deviation is calculated based on each mutual information value in the mutual information matrix, and the calculation formula is:
[0142] ;
[0143] in, Represents the mutual information matrix An element in represents the mutual information value of the region; Represents the mutual information matrix The standard deviation of , which indicates the dispersion of mutual information values; Represents the mutual information matrix The mean of Represents the mutual information matrix The number of elements in .
[0144] Based on standard deviation Calculate the anomaly score for each element , the calculation formula is:
[0145] ;
[0146] in, Represents the mutual information matrix An element in Represents the mutual information matrix The standard deviation of Represents the mutual information matrix The mean of .
[0147] The abnormal score The areas not less than the scoring threshold are divided into grids, each containing elements. For each grid ( is the grid number), calculate the average anomaly score of all elements in the grid .
[0148] Assume Grid and Grid If they are adjacent grids, then the correlation value between them is It can be measured by calculating the difference in the average anomaly scores between the two. The calculation formula is as follows:
[0149] ;
[0150] in, Representation Grid The average anomaly score of Representation Grid The average anomaly score of Measures the similarity of texture and structure between adjacent meshes.
[0151] The associated value Not less than the associated value threshold The meshes are merged and classified as defect areas.
[0152] The system also includes a defect classification unit, which extracts the contour of the defect area and detects the boundary; further analyzes the morphological characteristics of the defect area according to the boundary and performs defect classification.
[0153] Specifically, an edge detection algorithm such as Canny edge detection is used to extract the contour of the defect area and identify the boundary of the defect area. Then, morphological features are calculated to describe the shape and size of the defect, including area, perimeter, aspect ratio and circularity. Finally, a classification algorithm, including but not limited to decision tree, support vector machine or K nearest neighbor algorithm, is used to classify the defects.
[0154] Company B used a wood composite board furniture surface defect recognition system to identify surface defects of wood composite board furniture. The results are shown in Table 2, which shows some experimental data.
[0155] Table 2 Partial experimental data
[0156]
[0157] It can be seen from Table 2 that the wood composite board furniture surface defect recognition system used in this embodiment has the highest accuracy in the recognition of defects on the surface of wood composite board furniture.
[0158] 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 identifying surface defects of wood composite board furniture, characterized in that: include: Data collection and preprocessing: collecting wood board images from the surface of wood composite board furniture and preprocessing the wood board images; Texture feature extraction: Adaptively mesh the wood board image according to different scales to obtain multiple sub-regions; extract texture direction information from each sub-region, and then use Fourier transform to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region; Structural information extraction: extracting structural edge information of the wooden board image, constructing a connected graph model, analyzing the connectivity between each structural sub-region in the connected graph model, and obtaining a structural information graph of each structural sub-region; Calculation of the mutual information between texture and structure: matching the texture feature map and the structure information map in each region, and calculating the local mutual information between the two in each region; in the calculation of the mutual information between texture and structure, matching the texture feature map and the structure information map in each region one by one, calculating the local mutual information between the two in each region, and evaluating the correlation between texture features and structure information; Collecting resolution images of the wooden board image at different scales, and obtaining a mutual information matrix based on the resolution images by using the local mutual information calculation; Collecting resolution images of the wooden board image at different scales, calculating the mutual information of each region in the resolution images at different scales, and obtaining multi-scale mutual information; Fusing the multi-scale mutual information and combining it with the local mutual information to generate a mutual information matrix; Abnormal region detection: Based on the mutual information matrix, an abnormal score is assigned to each matrix element; Divide the area where the abnormality score is not less than the score threshold into a plurality of grids, calculate the correlation values of adjacent grids using the mutual information matrix, and classify the grids where the correlation value is not less than the correlation value threshold as defective areas; Defect classification: extract the contour of the defect area and detect the boundary; further analyze the morphological characteristics of the defect area according to the boundary and perform defect classification.
2. The method for identifying surface defects of wood composite board furniture according to claim 1, characterized in that: In the texture feature extraction, at different scales, according to the thickness and distribution density of the texture, the wooden board image is divided into a plurality of adaptive sub-regions using a block-based method; A filtering method based on local extreme points is used to extract texture direction information from each sub-region, and then Fourier transform is used to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region.
3. The method for identifying surface defects of wood composite board furniture according to claim 1, characterized in that: In the structural information extraction, Canny edge detection is used to extract the structural edge information of the wooden board image, and an opening and closing operation is performed to obtain a connected graph model; Each node in the connectivity graph model represents a structural sub-region, and each edge represents an adjacency relationship between two structural sub-regions; The connectivity of each node and edge in the connected graph is analyzed, and the overall structural features in the wooden board image are captured through the topological structure of the graph to obtain the substructure information of each structural subregion; the substructure information of each structural subregion is used to form structural information.
4. The method for identifying surface defects of wood composite board furniture according to claim 1, characterized in that: In the abnormal region detection, a standard deviation is calculated based on each mutual information value in the mutual information matrix, and an abnormality score of each matrix element is calculated; Divide the area where the abnormality score is not less than the score threshold into a plurality of grids, each of the grids comprising a plurality of elements; The mutual information matrix is used to calculate the correlation value of adjacent grids to measure the similarity of texture and structure between adjacent grids; The grids whose correlation values are not less than the correlation value threshold are merged and classified as defect areas.
5. A surface defect recognition system for wood composite board furniture, characterized in that: A method for identifying surface defects of wood composite board furniture according to any one of claims 1 to 4, comprising: A data acquisition and preprocessing unit, which acquires a board image from the surface of the wood composite board furniture and preprocesses the board image; The texture feature extraction unit performs adaptive grid division on the wooden board image according to different scales to obtain a plurality of sub-regions; extracts texture direction information from each sub-region, and then uses Fourier transform to extract high-frequency and low-frequency texture components to obtain a texture feature map of each sub-region; A structural information extraction unit extracts structural edge information of the wooden board image, constructs a connected graph model, analyzes connectivity between each structural sub-region in the connected graph model, and obtains a structural information graph of each structural sub-region; The texture and structure mutual information calculation unit matches the texture feature map and the structure information map in each region, and calculates the local mutual information between the two in each region; collects the resolution images of the wooden board image at the different scales, and obtains the mutual information matrix based on the resolution images and the local mutual information calculation; The abnormal area detection unit assigns an abnormal score to each matrix element based on the mutual information matrix; divides the area where the abnormal score is not less than the score threshold into a plurality of grids, calculates the correlation value of adjacent grids using the mutual information matrix, and classifies the grids where the correlation value is not less than the correlation value threshold as defective areas; The defect classification unit extracts the contour of the defect area and detects the boundary; further analyzes the morphological characteristics of the defect area according to the boundary and performs defect classification.
Citation Information
Patent Citations
Efficient pixel point filling method and system based on adaptive boundary detection technology
CN119068007A
High-precision detection method based on image analysis
CN119251232A