Wood board surface defect detection method and system

By acquiring images from multiple polarization angles on the surface of a wooden board, reconstructing the Stokes parameter field and solving the distribution field of the microplane normal vector, an enhanced feature map is generated, which solves the problem of not being able to distinguish between optical artifacts and physical defects in the existing technology, and realizes efficient and reliable detection of defects on the surface of wooden boards.

CN122049538APending Publication Date: 2026-05-15JINING DEMENTE WENCHANG WOOD IND CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610235367.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-27
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In the detection of defects on the surface of wood boards, especially under conditions of highly reflective surfaces, conventional RGB image-based or ordinary machine vision methods cannot effectively distinguish between optical artifacts caused by specular reflection and real physical defects. This results in a high false alarm rate and poor reliability of the detection system, which cannot meet the practical requirements of industrial quality inspection.

Method used

A multi-exposure image sequence of the wooden board surface to be inspected is acquired from four non-collinear polarization angles. Stokes parameter field is reconstructed by high dynamic range fusion based on gradient domain and polarization state vector solution, microplane normal vector distribution field is calculated, and multi-scale feature fusion and adaptive mapping are performed to generate enhanced feature map. Defect localization and classification are performed using a pre-trained recognition network.

Benefits of technology

It effectively distinguishes between optical artifacts and physical defects, reduces false alarm rates, improves the reliability and detection rate of defects on highly reflective wood surfaces with high-gloss paint and glossy film, enhances the detection rate of minute and ambiguous defects, and strengthens the algorithm's generalization ability and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122049538A_ABST
    Figure CN122049538A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial visual inspection, and particularly discloses a wood board surface defect detection method and system.The method comprises the steps that firstly, a multi-exposure image sequence of the surface of a wood board is collected from multiple polarization angles, an unsaturation intensity graph is reconstructed through high-dynamic-range fusion, and a Stokes parameter field representing the whole surface point polarization state is solved; performing physical inversion on the parameter field, resolving a micro-plane normal vector distribution field for describing the surface microscopic geometrical morphology, performing multi-scale decomposition and adaptive fusion on the intensity graph and the normal vector field, generating an enhanced feature graph for simultaneously coding appearance texture and bottom layer geometrical physical information, inputting the feature graph into a pre-trained identification process, and identifying the appearance texture and the bottom layer geometrical physical information. A normal vector field is introduced as an internal geometric consistency constraint for feature correction and guidance, so that accurate positioning, classification and confidence evaluation of defects are realized; according to the method, the accuracy, the robustness and the practicability in surface defect detection of the high-reflection wood board are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial visual inspection technology, specifically to a method and system for detecting defects on the surface of wooden boards. Background Technology

[0002] In the field of wood panel manufacturing and processing, especially for finished or semi-finished panels with high appearance requirements such as cabinet doors, wooden doors, and wall panels, automated inspection of surface defects is a crucial step in ensuring product quality. Traditional inspection methods mainly rely on manual visual inspection or automated inspection systems based on two-dimensional machine vision. Manual visual inspection is inefficient, labor-intensive, and its standards are easily affected by the subjective experience and fatigue of personnel, making it difficult to meet the quality control requirements of modern large-scale production.

[0003] In the detection of defects on the surface of wood boards, especially under conditions of highly reflective surfaces, conventional methods based on RGB images or ordinary machine vision cannot effectively distinguish between "optical artifacts" (such as glare white spots) caused by specular reflection and real "physical defects" (such as bubbles and dents). This results in a high false alarm rate and poor reliability of the detection system, which cannot meet the practical requirements of industrial quality inspection. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for detecting defects on the surface of wooden boards, so as to solve the problems mentioned above.

[0005] The objective of this invention can be achieved through the following technical solutions:

[0006] A method for detecting defects on the surface of a wooden board includes the following steps:

[0007] S1: Acquire a multi-exposure image sequence of the surface of the wooden board under inspection from four non-collinear polarization angles to form the original polarization image set;

[0008] S2: Perform gradient domain-based high dynamic range fusion on the original polarization image set to reconstruct the unsaturated intensity map at each polarization angle; solve the polarization state vector pixel by pixel based on the unsaturated intensity map to obtain the Stokes parameter field characterizing the complete polarization state of all points on the surface.

[0009] S3: Invert the Stokes parameter field to obtain the distribution field of microplane normal vectors describing the spatial orientation of surface micro-element elements;

[0010] S4: Encode the unsaturated intensity map at at least one polarization angle with the microplane normal vector distribution field, establish an adaptive mapping relationship between appearance texture features and underlying geometric and physical features, and generate an enhanced feature map with physical interpretability;

[0011] S5: The enhanced feature map is input into the pre-trained recognition network. The recognition network uses the microplane normal vector distribution field as an internal geometric consistency constraint to perform defect localization and classification, and outputs the detection results including confidence.

[0012] As a further aspect of the present invention: the reconstructing of the unsaturated intensity map at each polarization angle specifically includes:

[0013] Frequency division processing is performed on multiple exposure images under the same polarization angle in the original polarization image set to separate the basic illumination layer and detail texture layer of each image;

[0014] In the gradient domain, the base illumination layers of multiple images are fused using multi-scale gradient fields based on adaptive weights to generate a base layer with dynamic range expansion.

[0015] The base layer with expanded dynamic range is reconstructed together with the detail texture layer synthesized by pixel-level confidence weighting to generate an unsaturated intensity map at the corresponding polarization angle.

[0016] As a further aspect of the present invention: obtaining the Stokes parameter field characterizing the complete polarization state of all points on the entire surface specifically includes:

[0017] Extract the polarization component intensity values ​​corresponding to the preset polarization direction from the unsaturated intensity map at each polarization angle;

[0018] Based on the fundamental equations of polarization optics, the intensity values ​​of polarization components are solved by least squares vector parameters, and the first three Stokes parameters of each pixel are calculated.

[0019] By using the first three Stokes parameters, the polarization degree and polarization angle of each pixel are calculated to construct a complete Stokes parameter field.

[0020] As a further aspect of the present invention: S3 specifically includes:

[0021] Establish the physical mapping relationship between the degree of polarization and the polarization angle in the Stokes parameter field with respect to the normal direction of the surface micro-element and the observation geometry;

[0022] Based on the physical mapping relationship, a set of polarization measurement equations is constructed with the normal direction vector as the unknown quantity.

[0023] A numerical method with iterative optimization is used to solve the polarization measurement equations, calculate the optimal normal direction for each pixel to satisfy the global polarization consistency constraint, and generate the microplane normal vector distribution field.

[0024] As a further aspect of the present invention: the generation of the microplane normal vector distribution field specifically includes:

[0025] Using the Stokes parameter field and the preset observation geometry as input, a normal direction is initialized for each pixel to form an initial normal vector distribution field;

[0026] An objective function is constructed that integrates polarization measurement residuals and constraint terms based on neighborhood normal smoothness priors;

[0027] By using numerical optimization methods, the initial normal vector distribution field is iteratively updated within the feasible region of the normal direction until the objective function converges to a preset threshold, at which point the globally optimal microplane normal vector distribution field is obtained.

[0028] As a further aspect of the present invention: S4 specifically includes:

[0029] Multi-scale spatial pyramid decomposition is performed on the unsaturated intensity map and the microplane normal vector distribution field to generate corresponding multi-scale texture feature sets and multi-scale geometric feature sets.

[0030] Based on cross-scale feature correlation calculation, adaptive fusion weight coefficients are generated for the corresponding feature layers in the multi-scale texture feature set and the multi-scale geometric feature set.

[0031] Based on the adaptive fusion weight coefficients, the multi-scale texture feature set and the multi-scale geometric feature set are weighted and fused, and the enhanced feature map is reconstructed through upsampling and feature aggregation operations.

[0032] As a further aspect of the present invention: the generation of the corresponding multi-scale texture feature set and multi-scale geometric feature set specifically includes:

[0033] For unsaturated intensity maps, multiple downsampling rates are adaptively determined based on the local contrast of the image, non-uniform spatial downsampling is performed, and a set of multi-scale texture base layers are generated.

[0034] Along the three spatial component directions of the normal vector of the distribution field of the microplane normal vector, a multi-scale Gaussian difference operation based on direction-sensitive filtering is performed to generate a set of multi-scale geometric differential feature layers.

[0035] The multi-scale texture base layer is paired with the corresponding multi-scale geometric differential feature layer to form a multi-scale texture feature set and a multi-scale geometric feature set, respectively.

[0036] As a further aspect of the present invention: S5 specifically includes:

[0037] Multi-level deep feature extraction is performed on the enhanced feature map to generate a preliminary deep feature set;

[0038] By utilizing the distribution field of microplane normal vectors, the local geometric continuity measure at each spatial location is calculated, and an adaptive spatial correction kernel is generated to perform geometric consistency-guided feature correction on the preliminary depth feature set.

[0039] The corrected features are subjected to multi-stage feature aggregation and spatial relationship decoding, and the precise location information, category label and corresponding confidence level of the defect are output in parallel.

[0040] A system for detecting defects on the surface of wood panels, comprising:

[0041] The polarization image acquisition module is used to acquire a multi-exposure image sequence of the surface of the wooden board under inspection from four non-collinear polarization angles, forming an original polarization image set.

[0042] The polarization parameter analysis module is used to perform gradient domain-based high dynamic range fusion on the original polarization image set to reconstruct the unsaturated intensity map at each polarization angle; and to solve the polarization state vector pixel by pixel based on the unsaturated intensity map to obtain the Stokes parameter field characterizing the complete polarization state of all points on the surface.

[0043] The geometric feature inversion module inverts the Stokes parameter field and calculates the distribution field of micro-plane normal vectors describing the spatial orientation of surface micro-elements.

[0044] The cross-modal feature fusion module encodes the unsaturated intensity map at at least one polarization angle with the microplane normal vector distribution field, establishes an adaptive mapping relationship between appearance texture features and underlying geometric and physical features, and generates an enhanced feature map with physical interpretability.

[0045] The defect recognition output module inputs the enhanced feature map into the pre-trained recognition network. The recognition network uses the microplane normal vector distribution field as an internal geometric consistency constraint to perform defect localization and classification, and outputs the detection results including confidence scores.

[0046] The beneficial effects of this invention are:

[0047] (1) This invention acquires multi-angle polarization images and analyzes the Stokes parameter field, thereby reversing the distribution field of micro-plane normal vectors that characterizes the micro-geomorphology and is unaffected by surface brightness. This physical field can clearly reveal the true unevenness of the surface: real defects cause continuous and ordered geometric abrupt changes in the normal vector field, while "glare white spots" only manifest as discrete and disordered optical noise. This provides the subsequent identification process with the essential basis for distinguishing between optical artifacts and physical deformations, thereby reducing the false alarm rate and improving the reliability of defect detection on high-gloss painted surfaces and highly reflective wood surfaces with glossy films.

[0048] (2) This invention performs multi-scale adaptive fusion of the unsaturated intensity map (appearance texture) and the micro-plane normal vector distribution field (underlying geometry) to generate enhanced features with physical interpretability. These features not only contain appearance information but also incorporate the physical essence of microscopic geometric distortions caused by defects. In the recognition stage, the normal vector field is further used as an internal geometric consistency constraint to correct the depth features and suppress false responses caused by texture interference. This method makes the detection algorithm less sensitive to the texture differences and color fluctuations of the wood itself, and allows it to focus on physical geometric anomalies caused by defects, thereby significantly improving the detection rate of minute and ambiguous defects, and enhancing the algorithm's generalization ability and overall robustness on different tree species and different processed wood panel surfaces. Attached Figure Description

[0049] The invention will now be further described with reference to the accompanying drawings.

[0050] Figure 1 This is a flowchart of the method of the present invention;

[0051] Figure 2 This is a system block diagram of the present invention. Detailed Implementation

[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0053] Please see Figure 1 As shown, the present invention is a method for detecting defects on the surface of a wooden board, comprising the following steps:

[0054] S1: Acquire a multi-exposure image sequence of the surface of the wooden board under inspection from four non-collinear polarization angles to form the original polarization image set;

[0055] S2: Perform gradient domain-based high dynamic range fusion on the original polarization image set to reconstruct the unsaturated intensity map at each polarization angle; solve the polarization state vector pixel by pixel based on the unsaturated intensity map to obtain the Stokes parameter field characterizing the complete polarization state of all points on the surface.

[0056] S3: Invert the Stokes parameter field to obtain the distribution field of microplane normal vectors describing the spatial orientation of surface micro-element elements;

[0057] S4: Encode the unsaturated intensity map at at least one polarization angle with the microplane normal vector distribution field, establish an adaptive mapping relationship between appearance texture features and underlying geometric and physical features, and generate an enhanced feature map with physical interpretability;

[0058] S5: The enhanced feature map is input into the pre-trained recognition network. The recognition network uses the microplane normal vector distribution field as an internal geometric consistency constraint to perform defect localization and classification, and outputs the detection results including confidence.

[0059] In step S1, a light source containing a linear polarizer illuminates the surface of the wooden board to be inspected. Simultaneously, another linear polarizer, controlled by a precision stepper motor, is mounted in front of the lens of an industrial camera. The polarizer in front of the camera lens is rotated sequentially to four specific angles: 0°, 45°, 90°, and 135°. At each polarization angle, the camera rapidly captures three images in succession at three different exposure times (short, medium, and long), thereby capturing all information from dark details to bright areas. Ultimately, for each inspection point, a raw polarization image set is obtained, consisting of three different exposure images at each of the four polarization angles, providing a complete raw data foundation for subsequent high dynamic range fusion and polarization analysis.

[0060] In S2, gradient-domain-based high dynamic range fusion is performed on the original polarization image set to reconstruct unsaturated intensity maps at each polarization angle. Specifically, for multiple images acquired at the same polarization angle with different exposures, image frequency division processing is performed. This processing uses a guided filtering algorithm to decompose each image into a base illumination layer that carries the overall illumination variation and a detail texture layer that contains detailed information. The base illumination layer reflects the low-frequency components of the image, while the detail texture layer preserves the high-frequency edges and texture information of the image.

[0061] The underlying illumination layers of multiple images are fused in the gradient domain. For each pixel location, the gradient value of its corresponding pixel in all underlying illumination layers is calculated. To maintain natural boundary transitions while expanding the dynamic range, an adaptive fusion weight is assigned to each pixel location for each underlying illumination layer. The calculation of this weight relies on a difference metric. For a pixel in the k-th underlying illumination layer, the difference metric at that location from its corresponding pixel in all other underlying illumination layers is obtained by calculating the sum of the absolute values ​​of the differences between its intensity values ​​and those of its corresponding pixels in all other underlying illumination layers. Let there be a total of... The first basic lighting layer, then the second The difference metric for each image is calculated as follows: for that pixel, calculate the absolute value of the intensity difference between it and the corresponding pixel in every other image, and then... The absolute values ​​are summed. This difference measure reflects the uniqueness of the information at this pixel location in the image. Based on this difference measure, the pixel at the 1st... Blending weight coefficient in the base illumination layer Calculated using the following formula: ;

[0062] in, It is a preset positive smoothing coefficient. Indicates the first A measure of the difference at a specific pixel location in a base illumination layer image. Indicates the first A measure of the difference at the same pixel location in two base illumination layer images. This represents the number of base lighting layers and is used to control the sensitivity of the weights to differences. Its value is set based on the image noise level, for example, taking an integer between 10 and 50. This formula ensures that images with smaller differences (i.e., images where intensity values ​​are relatively common at that pixel and less prone to overexposure or underexposure) receive larger fusion weights. The calculated weight coefficients are then used... ,right The base illumination layers are weighted and fused in the gradient domain to obtain a fused gradient field. This fused gradient field is then reconstructed by solving the Poisson equation, generating a new base layer with an effectively expanded dynamic range.

[0063] Detail texture layers from multiple images are fused. For each detail texture layer, a pixel-level confidence score based on local contrast and saturation is calculated for each pixel. Regions with high local contrast and pixels with intermediate gray values ​​(neither close to 0 nor close to 255) have higher confidence scores. Using this confidence score as a weight, a weighted average is applied to multiple detail texture layers to synthesize a fused detail layer. Finally, the newly generated dynamic range extended base layer is added to the fused detail layer for reconstruction, generating an unsaturated intensity map with no overexposure or underexposure at that polarization angle. This process is repeated for all four polarization angles to obtain four unsaturated intensity maps, denoted as follows: ,in These represent polarization angles, namely 0°, 45°, 90°, and 135°.

[0064] The polarization state vector is solved pixel-by-pixel based on four unsaturated intensity maps to obtain the Stokes parameter field characterizing the complete polarization state of all points on the surface. For each pixel in the image, four intensity values ​​corresponding to that pixel are extracted from the four unsaturated intensity maps. , , and According to the physical principles of polarization optics, the first three parameters of the Stokes vector of a fully polarized light ( , , There is a linear relationship between these measured intensity values ​​and the values. Specifically, by establishing an overdetermined system of four measurement equations and solving the system using the least squares method, the first three Stokes parameters of the pixel can be obtained. , and The least squares solution. The calculation process is as follows: construct a 4×1 column vector from the four intensity measurements, perform matrix operations on the coefficient matrix (a 4×3 matrix) corresponding to the measurement equation, and solve for the solution that minimizes the sum of squared residuals. , , )value.

[0065] To obtain the first three Stokes parameters for each pixel , and Next, the polarization characteristic parameters of each pixel are further calculated. The degree of linear polarization of this pixel is then determined. The calculation formula is: Linear polarization degree This indicates the degree of polarization of light at that point, with a value ranging from 0 to 1. The polarization angle of this pixel. The calculation expression is: Its polarization angle This indicates the direction of the polarization plane of light. By traversing all pixels and performing the above calculations, a final structure is constructed from... field, field, The complete Stokes parameter field, composed of the field of polarization, the linear polarization degree field, and the polarization angle field, comprehensively describes the polarization state of reflected light at every point on the surface of the wooden board.

[0066] In S3, firstly, a physical mapping relationship is established between the degree of polarization and the polarization angle in the Stokes parameter field with respect to the normal direction of the surface micro-element and the observation geometry. This relationship is based on a polarization bidirectional reflection distribution function model of a non-ideal diffuse reflective surface. This model describes how the polarization state of linearly polarized light incident from a specific direction changes with the normal direction of the surface element, the incident light direction, and the observation direction after reflection by the surface micro-element. Specifically, for a given surface micro-element, its normal direction determines the incident angle and the reflection angle. Based on the Fresnel reflection coefficient and the shading function, the theoretical degree of polarization and polarization angle of the reflected light from the surface element can be calculated. Thus, a physical mapping relationship is established from the normal direction vector and the known observation geometry (i.e., the fixed light source direction and camera observation direction) to the theoretical polarization parameters (degree of polarization and polarization angle).

[0067] The physical mapping relationship uses the unit normal vector of the surface micro-element, the preset unit vector of the light source incident direction, the unit vector of the camera observation direction, and the relative refractive index of the paint film on the wooden board surface as inputs to the polarization bidirectional reflection distribution function model. The incident angle and observation angle are obtained by calculating the geometric relationship between the normal and the incident / observation directions, and then the amplitude reflectivity of the parallel and perpendicular components is calculated based on the Fresnel equations. Combining the geometric attenuation function characterizing the micro-element shading effect, the intensity components of the reflected light in the two characteristic polarization directions are synthesized, and finally, the theoretical linear polarization degree and theoretical polarization angle of the surface element under given observation conditions are derived as outputs.

[0068] Based on the aforementioned physical mapping relationship, a set of polarization measurement equations is constructed with the normal direction vector as the unknown. For each pixel in the acquired image, the measured polarization parameters of its corresponding surface point (i.e., the degree of polarization and polarization angle of that pixel obtained from the aforementioned Stokes parameter field) are known. Substituting the measured degree of polarization and polarization angle of each pixel into the aforementioned physical mapping relationship yields a set of equations with the normal direction vector of the surface micro-element corresponding to that pixel as the unknown. Since the degree of polarization and polarization angle provide two constraints, and the normal direction vector has two degrees of freedom in space (e.g., represented by tilt angle and azimuth angle), theoretically, the normal direction can be solved by solving this set of equations. This process is repeated for all pixels, thus constructing a set of polarization measurement equations covering the entire field of view.

[0069] The polarization measurement equations are solved using an iterative optimization numerical method to calculate the optimal normal direction for each pixel that satisfies the global polarization consistency constraint, thereby generating the microplane normal vector distribution field. The specific implementation process includes three sub-steps. The first step is initialization. Using the Stokes parameter field and a preset observation geometry as input, an initial normal direction is calculated for each pixel. A feasible initialization method is to perform a coarse estimation based on a simplified model (e.g., assuming the surface is a Lambertian body and utilizing polarization angle information), thereby constructing an initial normal vector distribution field.

[0070] The second step is to construct the objective function. This objective function incorporates two constraints. The first is the polarization measurement residual, which is the sum of squares of the differences between the theoretical polarization parameter calculated from the currently estimated normal direction through a physical mapping relationship at each pixel and the measured polarization parameter at that pixel. This constraint forces that the solved normal direction must match the polarization measurement data. The second is a priori constraint based on neighborhood normal smoothness. This constraint is constructed by calculating the sum of squares of the differences between the normal direction of each pixel and the cosine values ​​of the angles between them and the normal directions of all pixels in its eight neighborhoods. This constraint encourages spatially adjacent pixels to have continuously varying normal directions, consistent with the physical characteristic of local smoothness on most wooden surfaces. The final objective function is a weighted sum of the polarization measurement residual term and the neighborhood smoothness constraint term. The weighting coefficients used to balance the effects of the two terms need to be pre-set according to the surface characteristics; for example, the weight of the smoothness term can be set to 0.1 to 0.5 times the weight of the measurement residual term.

[0071] The third step is to iteratively solve the problem using numerical optimization methods. A nonlinear least squares optimization algorithm, such as the Gauss-Newton method or the Levenberg-Marquardt method, is employed, guided by the previously constructed objective function, to iteratively update the initial normal vector distribution field within the feasible region of the normal direction vector. In each iteration, the algorithm calculates the gradient of the objective function with respect to the normal direction variable of each pixel and updates the estimated normal direction value along the direction that causes the objective function to decrease. A preset convergence threshold is set. The iterative update process continues until the change in the objective function value is less than the preset convergence threshold. At this point, the optimization process is considered to have converged, and the resulting normal vector distribution field is the globally optimal micro-plane normal vector distribution field that satisfies the global polarization consistency constraint and the local smoothness constraint. Each vector in this distribution field represents the precise orientation of the corresponding surface micro-element in three-dimensional space.

[0072] In S4, firstly, a multi-scale spatial pyramid decomposition is performed on the unsaturated intensity map and the micro-plane normal vector distribution field, generating corresponding multi-scale texture feature sets and multi-scale geometric feature sets. For the unsaturated intensity map, the multi-scale decomposition process is as follows: A local contrast map of the entire image is calculated. The local contrast is obtained by calculating the standard deviation of grayscale values ​​within a small neighborhood (e.g., a circular region with a radius of 5 pixels) around each pixel. Based on this local contrast map, three downsampling rates are adaptively determined. Specifically, in regions with high local contrast (e.g., where the standard deviation is greater than the average of the entire image), a smaller downsampling rate (e.g., 1 / 2 of the original image size) is used to preserve more details; in flat regions with low local contrast, a larger downsampling rate (e.g., 1 / 4 or 1 / 8 of the original image size) is used. Based on these adaptive downsampling rates, a non-uniform spatial downsampling operation is performed on the original unsaturated intensity map, generating three images with different spatial resolutions that collectively cover information from details to overall shape, forming a set of multi-scale texture base layers. For the microplane normal vector distribution field, the decomposition process is performed separately for the three spatial components of the field data (corresponding to the X, Y, and Z direction components in the three-dimensional coordinate system). For each component map, a set of Gaussian kernel functions with increasing scales (e.g., standard deviations of 1, 2, and 4 pixels) are used for convolution, resulting in multiple versions with different levels of blur. Then, versions with adjacent levels of blur are subtracted, i.e., the result of the smaller-scale Gaussian convolution is subtracted from the result of the larger-scale convolution. This series of subtracted results constitutes a set of Gaussian difference features for that component. After performing this operation on the three normal vector components separately, the results of the three components at the same Gaussian difference scale are combined to form a set of multi-scale geometric differential feature layers. Each layer reflects the rate of change and pattern of the surface normal direction in space at different scales.

[0073] Secondly, based on cross-scale feature correlation calculation, adaptive fusion weight coefficients are generated for the corresponding feature layers in the aforementioned multi-scale texture feature set and multi-scale geometric feature set. Here, "corresponding feature layers" refers to the texture base layer and geometric differential feature layer representing similar physical scales (i.e., similar spatial resolutions). For each pair of corresponding layers, the normalized cross-correlation coefficient between them is calculated. The specific calculation process is as follows: the texture base layer and geometric differential feature layer are each divided into several overlapping small image patches (e.g., each patch is 16 pixels by 16 pixels). For each pair of spatially corresponding image patches, the covariance between their pixel values ​​is calculated, and then divided by the product of the standard deviation of the pixel values ​​of each of the two image patches and the standard deviation of the pixel values ​​of the other image patch, to obtain the local correlation coefficient at that image patch location. Finally, the average of the local correlation coefficients at all image patch locations is taken as the overall correlation measure of the corresponding feature layer pair. This correlation measure is input into a preset S-shaped function for mapping. The output value of this function ranges from 0 to 1, and the mapped result is used as the adaptive fusion weight coefficient for this pair of feature layers. The higher the correlation, the closer the weight coefficient is to 1, indicating that the geometric features and texture features at this scale are highly consistent and should occupy a higher proportion in the fusion.

[0074] Finally, based on the calculated adaptive fusion weight coefficients of each layer, the multi-scale texture feature set and the multi-scale geometric feature set are weighted and fused, and an enhanced feature map is reconstructed through upsampling and feature aggregation operations. Specifically, for each scale, the texture base layer and the corresponding geometric differential feature layer are added pixel-by-pixel to obtain a preliminary fusion layer. Then, using the adaptive fusion weight coefficients corresponding to that scale, the preliminary fusion layer is weighted by pixel-by-pixel multiplication. Afterward, all weighted fusion layers are upsampled to restore them all to the same spatial resolution as the original unsaturated intensity map. Upsampling is performed using bilinear interpolation. Finally, all weighted fusion layers upsampled to the same resolution are concatenated along the channel dimension to form a multi-channel feature stack. A 1x1 convolution operation is applied to this feature stack (i.e., a linear combination of all channel values ​​at each spatial location), aggregating it into a three-channel enhanced feature map. This feature map simultaneously encodes the surface texture information and the microscopic geometric information obtained from polarization physics inversion. The two are intrinsically related through adaptive weight reconstruction, thus possessing physical interpretability and laying the foundation for subsequent accurate differentiation between optical artifacts and real physical defects.

[0075] In S5, multi-level deep feature extraction is performed on the enhanced feature maps to generate a preliminary deep feature set. This extraction process is implemented through a pre-trained deep network structure containing multiple cascaded convolutional layers. Each convolutional layer group consists of two consecutive convolutional layers and a cross-layer connection, where the convolutional operations use 3x3 convolutional kernels, and a downsampling operation with a stride of 2 is introduced after some layers to expand the receptive field. The network receives three-channel enhanced feature maps as input and processes them sequentially through four such layers. The feature maps output from each convolutional layer group are extracted; these feature maps have different spatial resolutions and semantic depths, collectively forming the preliminary deep feature set, which contains multi-level information ranging from fine textures to macroscopic structures.

[0076] Using the microplane normal vector distribution field, a local geometric continuity measure is calculated at each spatial location, and this is used to generate an adaptive spatial correction kernel to perform geometric consistency-guided feature correction on the initial depth feature set. For each target pixel in the distribution field, the cosine value of the angle between its normal vector and the normal vectors of all pixels in its eight neighboring regions is calculated. Then, the variance of these cosine values ​​is calculated as a local geometric continuity measure for that target pixel. The smaller the variance, the more consistent and smooth the geometric orientation of the point with the surrounding area. Based on this measure, a weight value is calculated using a preset nonlinear function. This function maps lower variances to weights close to one and higher variances to weights close to zero. Using this weight value, a 3x3 spatial correction kernel is dynamically constructed, where the central coefficient is the weight value, and the remaining peripheral coefficients are evenly distributed with the remaining weights. Using this generated adaptive spatial correction kernel, a channel-wise convolution operation is performed on each feature map in the initial deep feature set. This operation can suppress feature responses located in geometrically discontinuous regions (which may correspond to defect edges) while preserving features in smooth regions, thereby achieving geometric consistency-guided feature correction.

[0077] The corrected features undergo multi-stage feature aggregation and spatial relationship decoding, outputting the precise location information, category label, and corresponding confidence score of the defect in parallel. The corrected feature maps from different depths are upsampled to the same intermediate resolution and then concatenated. Spatial pyramid pooling is used to aggregate multi-scale contextual information on the concatenated features. Subsequently, multiple decoding layers, alternating between 3x3 convolutions and double upsampling operations, gradually recover the spatial details of the feature maps, ultimately outputting a dense feature map with the same resolution as the input image. On this final feature map, three independent 1x1 convolutional layers are connected in parallel: the first convolutional layer outputs a probability score map of each pixel location belonging to the defect region; thresholding (e.g., probability greater than 0.5) and connected component analysis yield the precise location and contour of the defect; the second convolutional layer assigns a category label to each pixel identified as a defect; and the third convolutional layer outputs a confidence score for each defect prediction, learned by the network during training, comprehensively reflecting the reliability of the prediction.

[0078] Please see Figure 2 As shown, a wood panel surface defect detection system includes:

[0079] The polarization image acquisition module is used to acquire a multi-exposure image sequence of the surface of the wooden board under inspection from four non-collinear polarization angles, forming an original polarization image set.

[0080] The polarization parameter analysis module is used to perform gradient domain-based high dynamic range fusion on the original polarization image set to reconstruct the unsaturated intensity map at each polarization angle; and to solve the polarization state vector pixel by pixel based on the unsaturated intensity map to obtain the Stokes parameter field characterizing the complete polarization state of all points on the surface.

[0081] The geometric feature inversion module inverts the Stokes parameter field and calculates the distribution field of micro-plane normal vectors describing the spatial orientation of surface micro-elements.

[0082] The cross-modal feature fusion module encodes the unsaturated intensity map at at least one polarization angle with the microplane normal vector distribution field, establishes an adaptive mapping relationship between appearance texture features and underlying geometric and physical features, and generates an enhanced feature map with physical interpretability.

[0083] The defect recognition output module inputs the enhanced feature map into the pre-trained recognition network. The recognition network uses the microplane normal vector distribution field as an internal geometric consistency constraint to perform defect localization and classification, and outputs the detection results including confidence scores.

[0084] The working principle of this invention is as follows: A multi-exposure image sequence of a wooden board surface is acquired from multiple non-collinear polarization angles. A high dynamic range fusion technique based on the gradient domain is used to reconstruct an unsaturated intensity image, and the Stokes parameter field is solved pixel-by-pixel to fully characterize the polarization state of the reflected light from the surface. Next, the polarization parameter field is physically inverted to calculate the distribution field of micro-plane normal vectors describing the surface's micro-geometry. The intensity image and the normal vector field are then multi-scale decomposed and adaptively weighted and fused to generate an enhanced feature map that simultaneously encodes the appearance texture and underlying geometric physical information. Finally, this feature map is input into a pre-trained recognition process, and the normal vector field is introduced as a geometric consistency constraint to correct the features. Through multi-stage aggregation and decoding, accurate location, classification, and confidence assessment of defects are achieved. This method effectively distinguishes between the optical artifact of "glare white spots" (high-gloss white spots) and real physical defects by using polarization information, improving the accuracy and robustness in detecting defects on highly reflective wooden board surfaces.

[0085] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A method for detecting defects on the surface of a wooden board, characterized in that, Includes the following steps: S1: Acquire a multi-exposure image sequence of the surface of the wooden board under inspection from four non-collinear polarization angles to form the original polarization image set; S2: Perform gradient domain-based high dynamic range fusion on the original polarization image set to reconstruct the unsaturated intensity map at each polarization angle; solve the polarization state vector pixel by pixel based on the unsaturated intensity map to obtain the Stokes parameter field characterizing the complete polarization state of all points on the surface. S3: Invert the Stokes parameter field to obtain the distribution field of microplane normal vectors describing the spatial orientation of surface micro-element elements; S4: Encode the unsaturated intensity map at at least one polarization angle with the microplane normal vector distribution field, establish an adaptive mapping relationship between appearance texture features and underlying geometric and physical features, and generate an enhanced feature map with physical interpretability; S5: The enhanced feature map is input into the pre-trained recognition network. The recognition network uses the microplane normal vector distribution field as an internal geometric consistency constraint to perform defect localization and classification, and outputs the detection results including confidence.

2. The method for detecting surface defects of wood panels according to claim 1, characterized in that, The reconstructed unsaturated intensity maps at each polarization angle specifically include: Frequency division processing is performed on multiple exposure images under the same polarization angle in the original polarization image set to separate the basic illumination layer and detail texture layer of each image; In the gradient domain, the base illumination layers of multiple images are fused using multi-scale gradient fields based on adaptive weights to generate a base layer with dynamic range expansion. The base layer with expanded dynamic range is reconstructed together with the detail texture layer synthesized by pixel-level confidence weighting to generate an unsaturated intensity map at the corresponding polarization angle.

3. The method for detecting surface defects of wood panels according to claim 1, characterized in that, The process of obtaining the Stokes parameter field characterizing the complete polarization state of all points on the surface specifically includes: Extract the polarization component intensity values ​​corresponding to the preset polarization direction from the unsaturated intensity map at each polarization angle; Based on the fundamental equations of polarization optics, the intensity values ​​of polarization components are solved by least squares vector parameters, and the first three Stokes parameters of each pixel are calculated. By using the first three Stokes parameters, the polarization degree and polarization angle of each pixel are calculated to construct a complete Stokes parameter field.

4. The method for detecting surface defects in wood panels according to claim 1, characterized in that, S3 specifically includes: Establish the physical mapping relationship between the degree of polarization and the polarization angle in the Stokes parameter field with respect to the normal direction of the surface micro-element and the observation geometry; Based on the physical mapping relationship, a set of polarization measurement equations is constructed with the normal direction vector as the unknown quantity. A numerical method with iterative optimization is used to solve the polarization measurement equations, calculate the optimal normal direction for each pixel to satisfy the global polarization consistency constraint, and generate the microplane normal vector distribution field.

5. The method for detecting surface defects of wood panels according to claim 4, characterized in that, The generated microplane normal vector distribution field specifically includes: Using the Stokes parameter field and the preset observation geometry as input, a normal direction is initialized for each pixel to form an initial normal vector distribution field; An objective function is constructed that integrates polarization measurement residuals and constraint terms based on neighborhood normal smoothness priors; By using numerical optimization methods, the initial normal vector distribution field is iteratively updated within the feasible region of the normal direction until the objective function converges to a preset threshold, at which point the globally optimal microplane normal vector distribution field is obtained.

6. The method for detecting surface defects of wood panels according to claim 1, characterized in that, S4 specifically includes: Multi-scale spatial pyramid decomposition is performed on the unsaturated intensity map and the microplane normal vector distribution field to generate corresponding multi-scale texture feature sets and multi-scale geometric feature sets. Based on cross-scale feature correlation calculation, adaptive fusion weight coefficients are generated for the corresponding feature layers in the multi-scale texture feature set and the multi-scale geometric feature set. Based on the adaptive fusion weight coefficients, the multi-scale texture feature set and the multi-scale geometric feature set are weighted and fused, and the enhanced feature map is reconstructed through upsampling and feature aggregation operations.

7. The method for detecting surface defects of wood panels according to claim 6, characterized in that, The generation of the corresponding multi-scale texture feature set and multi-scale geometric feature set specifically includes: For unsaturated intensity maps, multiple downsampling rates are adaptively determined based on the local contrast of the image, non-uniform spatial downsampling is performed, and a set of multi-scale texture base layers are generated. Along the three spatial component directions of the normal vector of the distribution field of the microplane normal vector, a multi-scale Gaussian difference operation based on direction-sensitive filtering is performed to generate a set of multi-scale geometric differential feature layers. The multi-scale texture base layer is paired with the corresponding multi-scale geometric differential feature layer to form a multi-scale texture feature set and a multi-scale geometric feature set, respectively.

8. The method for detecting surface defects of wood panels according to claim 1, characterized in that, S5 specifically includes: Multi-level deep feature extraction is performed on the enhanced feature map to generate a preliminary deep feature set; By utilizing the distribution field of microplane normal vectors, the local geometric continuity measure at each spatial location is calculated, and an adaptive spatial correction kernel is generated to perform geometric consistency-guided feature correction on the preliminary depth feature set. The corrected features are subjected to multi-stage feature aggregation and spatial relationship decoding, and the precise location information, category label and corresponding confidence level of the defect are output in parallel.

9. A system for detecting defects on the surface of wooden boards, characterized in that, A method for detecting surface defects in wood panels according to any one of claims 1-8, comprising: The polarization image acquisition module is used to acquire a multi-exposure image sequence of the surface of the wooden board under inspection from four non-collinear polarization angles, forming an original polarization image set. The polarization parameter analysis module is used to perform gradient domain-based high dynamic range fusion on the original polarization image set to reconstruct the unsaturated intensity map at each polarization angle; and to solve the polarization state vector pixel by pixel based on the unsaturated intensity map to obtain the Stokes parameter field characterizing the complete polarization state of all points on the surface. The geometric feature inversion module inverts the Stokes parameter field and calculates the distribution field of micro-plane normal vectors describing the spatial orientation of surface micro-elements. The cross-modal feature fusion module encodes the unsaturated intensity map at at least one polarization angle with the microplane normal vector distribution field, establishes an adaptive mapping relationship between appearance texture features and underlying geometric and physical features, and generates an enhanced feature map with physical interpretability. The defect recognition output module inputs the enhanced feature map into the pre-trained recognition network. The recognition network uses the microplane normal vector distribution field as an internal geometric consistency constraint to perform defect localization and classification, and outputs the detection results including confidence scores.