Rotary cutting machine and rotary cutting veneer surface defect online visual detection method

CN122989712APending Publication Date: 2026-10-27HANWEI (WEIHAI) INTELLIGENT EQUIPMENT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611414793.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-12
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0002]旋切单板是胶合板、木质复合地板、建筑模板等木制品的核心基材,其表面缺陷(活节、死节、裂纹、虫眼等)会直接降低下游产品的力学性能与外观品质,表面缺陷在线视觉检测因具备非接触、检测速度快、不影响产线连续运行的优势,已成为旋切产线的标配质控环节,但旋切产线单板输送速度普遍可达1~3m/s,工业相机单次曝光周期内单板位移可达数毫米至十余毫米,采集图像必然存在沿送料方向的运动模糊,模糊会导致缺陷边缘丢失、纹理混淆,大幅降低后续缺陷识别的准确率,是制约在线检测精度提升的核心瓶颈

Benefits of technology

[0046]本申请提供的旋切机及旋切单板表面缺陷在线视觉检测方法中,首先获取旋切单板的样本图像;基于旋切工艺参数构建不同旋切线速度下的运动模糊核,通过所有的运动模糊核对所述样本图像进行处理,生成包含不同模糊程度的合成图像数据集;嵌入可将图像特征分解至低频子带及多方向高频子带的小波节点,并引入由水平高频子带与垂直高频子带联合引导的空间注意力机制,进而构建出适配旋切单板纹理的运动模糊复原网络,利用所述合成图像数据集训练所述运动模糊复原网络,获得训练后的模糊复原模型;基于旋切单板的缺陷样本图像及其缺陷标注,以实时目标检测算法‌为基础检测框架,并在骨干网络中引入动态蛇形卷积模块构建表面缺陷识别模型并完成预训练;在线采集旋切单板表面的模糊图像,将所述模糊图像输入至所述模糊复原模型,输出复原图像,将所述复原图像输入至预训练的表面缺陷识别模型中进行缺陷识别。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989712A_ABST
    Figure CN122989712A_ABST
Patent Text Reader

Abstract

The application provides a rotary cutting machine and a rotary cutting veneer surface defect online visual detection method. A sample image of a rotary cutting veneer is obtained; a synthetic image dataset containing different blur degrees is generated based on rotary cutting process parameters and the sample image; a wavelet node capable of decomposing image features into low-frequency subbands and multi-direction high-frequency subbands is embedded, and a spatial attention mechanism jointly guided by horizontal high-frequency subbands and vertical high-frequency subbands is introduced, and then a motion blur restoration network suitable for the texture of the rotary cutting veneer is constructed; a blurred image of the surface of the rotary cutting veneer is collected online, the blurred image is input into the trained motion blur restoration network, a restored image is output, and the restored image is input into a pre-trained surface defect recognition model for defect recognition. By using the scheme of the application, the interference of directional texture and motion blur on the surface defect recognition of the rotary cutting veneer can be reduced in the high-speed rotary cutting production line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of veneer lamination technology, and more specifically, to a veneer lamination machine and an online visual inspection method for surface defects in veneer lamination. Background Technology

[0002] Rotary-cut veneer is the core substrate for wood products such as plywood, wood composite flooring, and building formwork. Surface defects (live knots, dead knots, cracks, wormholes, etc.) directly reduce the mechanical properties and appearance quality of downstream products. Online visual inspection of surface defects has become a standard quality control step in rotary-cutting production lines due to its advantages of being non-contact, fast, and not affecting the continuous operation of the production line. However, the veneer conveying speed in rotary-cutting production lines can generally reach 1~3m / s, and the veneer displacement can reach several millimeters to more than ten millimeters in a single exposure cycle of an industrial camera. The acquired image will inevitably have motion blur along the feeding direction. Blur will cause the defect edges to be lost and the texture to be confused, which will significantly reduce the accuracy of subsequent defect identification. This is the core bottleneck restricting the improvement of online inspection accuracy.

[0003] Existing motion blur restoration solutions for rotary-cut veneers mainly fall into two categories. One category relies on training deep learning models with clear-blurred paired data collected from real-world scenes. However, since veneers on the production line are always in high-speed motion, it is impossible to simultaneously acquire clear and blurred images of the same field of view. Acquiring paired data is extremely costly and has poor coverage of operating conditions. The other category uses a general motion blur kernel to synthesize training data, but it does not take into account the process parameters of the rotary-cutting production line and the texture characteristics of the veneer. The synthesized blurred image deviates significantly from the degradation features of the real operating conditions. Furthermore, the general restoration network is not optimized for the directional texture of veneer defects, resulting in severe loss of edge texture after restoration. It still cannot meet the requirements for high-precision defect recognition. Therefore, how to reduce the interference of directional texture and motion blur on the surface defect recognition of rotary-cut veneers in high-speed rotary-cutting production lines has become a challenge for the industry. Summary of the Invention

[0004] This application provides a veneer laminating machine and an online visual inspection method for surface defects of veneer laminating veneers, which can reduce the interference of directional texture and motion blur on the identification of surface defects of veneer laminating veneers in high-speed veneer laminating production lines.

[0005] In a first aspect, this application provides an online visual inspection method for surface defects in rotary-cut veneers, including:

[0006] Obtain sample images of rotary-cut veneers;

[0007] Motion blur kernels for different slitting linear velocities are constructed based on the slitting process parameters. The sample images are then processed using all the motion blur kernels to generate a synthetic image dataset containing different degrees of blur.

[0008] Embedding can decompose image features into wavelet nodes of low-frequency subband and multi-directional high-frequency subband, and introduce a spatial attention mechanism jointly guided by horizontal and vertical high-frequency subbands, thereby constructing a motion blur restoration network adapted to rotary-cut single-board texture. The motion blur restoration network is trained using the synthetic image dataset to obtain the trained blur restoration model.

[0009] Based on defect sample images and defect annotations of rotary-cut single boards, a real-time target detection algorithm is used as the basic detection framework. A dynamic serpentine convolution module is introduced into the backbone network to construct a surface defect recognition model and complete pre-training.

[0010] A blurred image of the surface of a rotary-cut veneer is acquired online, the blurred image is input into the blurred restoration model, the restored image is output, and the restored image is input into a pre-trained surface defect recognition model for defect recognition.

[0011] In some embodiments, constructing motion fuzzy kernels for different rotary cutting linear velocities based on rotary cutting process parameters specifically includes:

[0012] Obtain the rotary cutting process parameters of the rotary cutting production line;

[0013] Select a rotary cutting speed from the range of rotary cutting speed values ​​for the rotary cutting production line in the rotary cutting process parameters;

[0014] Based on the rotary cutting process parameters, and combined with random directional deviation and scale perturbation, the motion fuzzy kernel of the rotary-cut single board at the selected rotary cutting linear velocity is determined;

[0015] Select another rotary cutting line speed from the range of rotary cutting line speed values ​​in the rotary cutting process parameters as the new selected rotary cutting line speed, and repeat the above steps to obtain multiple motion fuzzy kernels under different rotary cutting line speeds.

[0016] In some embodiments, processing the sample images using all motion blur kernels to generate a synthetic image dataset containing different degrees of blur specifically includes:

[0017] Random noise is generated to simulate the vibration of the rotary cutting production line equipment based on the rotary cutting process parameters;

[0018] The sample images of the rotary-cut single board, the random noise, and each motion blur kernel are combined to obtain a synthetic image dataset containing different degrees of blur.

[0019] In some embodiments, the embedding can decompose image features into low-frequency sub-bands and multi-directional high-frequency sub-bands, and introduce a spatial attention mechanism jointly guided by horizontal and vertical high-frequency sub-bands, thereby constructing a motion blur restoration network adapted to rotary-cut single-layer textures. Specifically, this includes:

[0020] Establish a multi-scale encoding and decoding infrastructure with single input and multiple outputs;

[0021] Learnable discrete wavelet transform nodes are embedded in the encoder feature fusion segment and decoder unit of the encoding and decoding infrastructure, thereby adaptively decomposing the input features into low-frequency subbands and high-frequency subbands in the horizontal, vertical and diagonal directions.

[0022] A spatial attention mechanism jointly guided by high-frequency subbands in the horizontal and vertical directions is introduced into the decoding path;

[0023] The deep convolutional layers within the discrete wavelet transform nodes are replaced with lightweight structures.

[0024] A multi-scale output head is set at the end of the decoder of the encoding and decoding infrastructure, and a joint loss function corresponding to the multi-scale is configured for network training.

[0025] In some embodiments, training the motion blur restoration network using the synthetic image dataset to obtain the trained blur restoration model specifically includes:

[0026] The synthetic image dataset is divided into mutually exclusive training, validation, and test sets according to the classification of clear samples.

[0027] The images in the training set are standardized by preprocessing to unify the size and data distribution of the input images;

[0028] The learnable parameters of the motion blur restoration network are initialized using pre-trained weights;

[0029] Configure the training optimizer, initial learning rate, and maximum number of iterations, and set the multi-scale joint loss function as the optimization objective;

[0030] The training set is input into the initialized motion blur restoration network for iterative training, and the network parameters are updated through backpropagation.

[0031] Based on the performance evaluation results of the validation set, the model weights with the best overall performance are selected as the fuzzy restoration model after training.

[0032] In some embodiments, inputting the blurred image into the blurred restoration model and outputting the restored image specifically includes:

[0033] The blurred images of rotary-cut veneers acquired online are subjected to the same size scaling and normalization preprocessing as the training set.

[0034] The preprocessed blurred image is input into the trained blurred image restoration model, and the multi-scale restored image output is obtained through forward propagation calculation.

[0035] The scale that matches the resolution of the input blurred image is selected from the multi-scale restored image output as the final output restored image.

[0036] In some embodiments, sample images of the rotary-cut veneer are acquired using an industrial camera.

[0037] Secondly, this application provides a veneer laminating machine, which includes an online visual inspection unit for surface defects, the online visual inspection unit for surface defects comprising:

[0038] The acquisition module is used to acquire sample images of rotary-cut veneers;

[0039] The processing module is used to construct motion blur kernels for different slicing linear velocities based on the slicing process parameters, and to process the sample images using all the motion blur kernels to generate a synthetic image dataset containing different degrees of blur.

[0040] The processing module is also used to embed wavelet nodes that can decompose image features into low-frequency sub-bands and multi-directional high-frequency sub-bands, and introduce a spatial attention mechanism jointly guided by horizontal and vertical high-frequency sub-bands, thereby constructing a motion blur restoration network adapted to rotary-cut single-board textures. The motion blur restoration network is trained using the synthetic image dataset to obtain the trained blur restoration model.

[0041] The processing module is also used to collect defect sample images and their defect annotations based on rotary-cut single boards, and to build a surface defect recognition model and complete pre-training by introducing a dynamic snake convolution module into the backbone network based on a real-time target detection algorithm as the basic detection framework.

[0042] The execution module is used to acquire blurred images of the surface of a rotary-cut veneer online, input the blurred images into the blurred restoration model, output the restored images, and input the restored images into a pre-trained surface defect recognition model for defect recognition.

[0043] Thirdly, this application provides a computer device, the computer device including a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the above-described online visual inspection method for surface defects of rotary-cut veneer.

[0044] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described online visual inspection method for surface defects of rotary-cut veneer.

[0045] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects:

[0046] The online visual detection method for surface defects of a rotary laminating machine and rotary-laminated veneer provided in this application first acquires sample images of the rotary-laminated veneer; based on the rotary laminating process parameters, motion blur kernels are constructed for different rotary laminating linear speeds, and the sample images are processed through all motion blur kernels to generate a synthetic image dataset containing different degrees of blur; wavelet nodes that can decompose image features into low-frequency sub-bands and multi-directional high-frequency sub-bands are embedded, and a spatial attention mechanism jointly guided by horizontal and vertical high-frequency sub-bands is introduced to construct a motion blur restoration network adapted to the texture of the rotary-laminated veneer; the motion blur restoration network is trained using the synthetic image dataset to obtain a trained blur restoration model; based on the defect sample images and defect annotations of the rotary-laminated veneer, a real-time target detection algorithm is used as the basic detection framework, and a dynamic serpentine convolution module is introduced into the backbone network to construct a surface defect recognition model and complete pre-training; blurred images of the surface of the rotary-laminated veneer are acquired online, the blurred images are input into the blur restoration model, the restored images are output, and the restored images are input into the pre-trained surface defect recognition model for defect recognition.

[0047] Therefore, this application constructs motion blur kernels at different linear velocities using real process parameters of the rotary cutting production line, and generates a synthetic training dataset by superimposing random noise simulating equipment vibration. This eliminates the need for costly real clear-blurred pairing data collection, and through process parameter binding and perturbation superposition, the synthesized blurred image perfectly matches the real degradation characteristics of different speed levels and vibration disturbances on the production line, thus avoiding the deviation between general synthesis schemes and real working conditions from the data end. Furthermore, this application embeds learnable discrete wavelet transform nodes into the constructed restoration network, which can adaptively decompose the input features into low-frequency subbands and high-frequency subbands in multiple directions (horizontal, vertical, and diagonal). It also introduces a spatial attention mechanism jointly guided by horizontal and vertical high-frequency subbands, which precisely matches the texture direction characteristics of rotary-cut single-board defects, focusing on enhancing the recovery ability of defect edges and textures. Compared with general deblurring networks, it is more suitable for rotary-cut single-board scenarios. Finally, only the restored clear image needs to be input into the existing surface defect recognition model to complete the recognition, without modifying the existing production line recognition link, which can significantly improve the full-speed domain fuzziness adaptability of online detection and ensure the accuracy of defect recognition. In summary, the solution proposed in this application can reduce the interference of directional texture and motion blur on the identification of surface defects of rotary-cut veneers in high-speed rotary cutting production lines. Attached Figure Description

[0048] Figure 1 This is an exemplary flowchart of an online visual inspection method for surface defects of rotary-cut veneer according to some embodiments of this application;

[0049] Figure 2 This is an exemplary flowchart illustrating the determination of the motion blur kernel according to some embodiments of this application;

[0050] Figure 3 This is an exemplary flowchart illustrating the determination of a restored image according to some embodiments of this application;

[0051] Figure 4 This is a schematic diagram of the structure of an online visual inspection unit for surface defects according to some embodiments of this application;

[0052] Figure 5 This is a schematic diagram of the structure of a computer device for implementing an online visual inspection method for surface defects of rotary-cut veneers, according to some embodiments of this application. Detailed Implementation

[0053] To better understand the technical solution of this application, the technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] refer to Figure 1 The figure is an exemplary flowchart of an online visual inspection method for surface defects of rotary-cut veneer according to some embodiments of this application. The online visual inspection method for surface defects of rotary-cut veneer mainly includes the following steps:

[0055] In step 101, a sample image of the rotary-cut veneer is obtained.

[0056] In practice, the sample images of rotary-cut veneers can be obtained in the following way: During the production line debugging and calibration stage, a strobe light source or an ultra-short pulse light source is set up for the industrial camera at the online inspection station. The camera exposure time is adjusted to the microsecond level to freeze the high-speed moving rotary-cut veneers. The camera installation position, object distance, focal length, and supplementary lighting conditions are kept completely consistent with the subsequent online inspection conditions. Clear images of rotary-cut veneers without motion blur are collected. The acquisition process covers the veneer tree species, thickness, and surface condition specifications of veneers commonly produced on the production line. The obtained images are the required sample images.

[0057] In step 102, motion blur kernels for different slicing linear velocities are constructed based on the slicing process parameters. The sample images are then processed using all the motion blur kernels to generate a synthetic image dataset containing different degrees of blur.

[0058] In some embodiments, reference Figure 2 The figure is an exemplary flowchart illustrating the determination of motion fuzzy kernels according to some embodiments of this application. The construction of motion fuzzy kernels for different rotary cutting linear velocities based on rotary cutting process parameters in this application can be achieved using the following steps:

[0059] In step 1021, the rotary cutting process parameters of the rotary cutting production line are obtained;

[0060] In step 1022, a swirl cutting speed is selected from the range of swirl cutting speed values ​​for the swirl cutting production line in the swirl cutting process parameters as the selected swirl cutting speed;

[0061] In step 1023, the motion fuzzy kernel of the rotary cutting single board at the selected rotary cutting linear velocity is determined based on the rotary cutting process parameters and combined with random direction deviation and scale perturbation;

[0062] In step 1024, another rotary cutting speed is selected from the range of rotary cutting speed values ​​of the rotary cutting production line in the rotary cutting process parameters as the new selected rotary cutting speed, and the above steps are repeated to obtain multiple motion fuzzy kernels under different rotary cutting speeds.

[0063] In practical implementation, the veneer cutting process parameters of the veneer cutting production line can be obtained in the following way:

[0064] The normal production range of the veneer speed is retrieved from the electrical control system of the veneer production line. Simultaneously, the inherent parameters (including pixel size) and fixed debugging parameters (including exposure time, installation focal length, and object distance between the camera and the surface of the veneer plate) of the industrial camera at the online inspection station are obtained. Based on the actual allowable strip deviation of the production line and the vibration characteristics of the veneer equipment, the range of random directional deviation is determined. Based on the actual fluctuation range of the veneer speed of the production line, the range of dimensional disturbance is determined. Together, these constitute the set of veneer process parameters.

[0065] In specific implementation, selecting a swirl cutting speed from the range of swirl cutting speed values ​​in the swirl cutting process parameters can be achieved in the following ways: within the range of swirl cutting speed values, the speed value corresponding to the typical speed range of the production line's regular production (including the low-speed start-up section, the medium-speed steady-state production section, and the high-speed full-load section) can be selected as the first selected swirl cutting speed. Alternatively, the speed can be uniformly sampled and selected within the range at preset intervals to ensure that the selected speed covers the typical working conditions of the entire speed range of the production line.

[0066] In specific implementation, the motion fuzzy kernel of the rotary-cutting veneer at a selected rotary-cutting linear velocity, based on the rotary-cutting process parameters and combined with random direction deviation and scale perturbation, can be determined in the following way: First, based on the geometric optical mapping relationship, the length of the basic fuzzy kernel at this velocity is calculated by dividing the product of the selected rotary-cutting linear velocity v, the camera exposure time t, and the image distance magnification M = f / (z−f) (where f is the camera focal length and z is the object distance between the camera and the surface of the rotary-cutting veneer) by the pixel size P, i.e., Lbase = (vtf) / [(z−f)P]. When the object distance z is much larger than the focal length f, the image distance magnification can be approximated as M. ≈f / z, the corresponding basic blur kernel length can be simplified to Lbase≈(vtf) / (zP); then, the blur direction angle is obtained by independent sampling within the range of random direction deviation, and the length offset is obtained by independent sampling within the range of scale perturbation. The basic blur kernel length and the length offset are summed to obtain the final blur kernel length; with the blur direction angle as the main direction of the kernel and the final blur kernel length as the length of the kernel, a two-dimensional rectangular kernel matrix with a size adapted to the line segment is constructed. The pixel values ​​passed through by the line segment are set to 1 / Lfinal and normalized, and the remaining pixel values ​​are set to zero to obtain the linear motion blur kernel under the selected shear line velocity.

[0067] In specific implementation, another rotary cutting speed is selected from the range of rotary cutting speed values ​​of the rotary cutting production line in the rotary cutting process parameters as the new selected rotary cutting speed, and the above steps are repeated to obtain multiple motion fuzzy kernels under different rotary cutting speeds. This can be achieved in the following way: the remaining typical speed ranges or sampled speed values ​​in the range of rotary cutting speed values ​​are used as the new selected rotary cutting speeds in turn. After each round of selection, random direction deviations and scale disturbances are independently resampled, and the steps of fuzzy kernel length calculation, parameter disturbance superposition, and linear motion fuzzy kernel construction are repeated until all target speed points in the range of values ​​are covered, resulting in multiple sets of motion fuzzy kernels that match different rotary cutting speeds and different disturbance conditions. Each set of fuzzy kernels corresponds to the degradation scenarios that may actually occur on the production line.

[0068] In some embodiments, processing the sample images using all motion blur kernels to generate a synthetic image dataset containing different degrees of blur can be achieved through the following steps:

[0069] Random noise is generated to simulate the vibration of the rotary cutting production line equipment based on the rotary cutting process parameters;

[0070] The sample images of the rotary-cut single board, the random noise, and each motion blur kernel are combined to obtain a synthetic image dataset containing different degrees of blur.

[0071] In specific implementation, the random noise that simulates the vibration of the veneer production line equipment can be generated according to the veneer process parameters in the following way: Based on the noise amplitude range corresponding to the equipment vibration during full-speed operation of the veneer production line as pre-calibrated in the veneer process parameters, an additive random noise matrix that perfectly matches the sample image size and number of channels of the veneer plate is generated. The amplitude of the random noise falls within the noise amplitude range. Additive Gaussian white noise or uniformly distributed additive random noise is preferred to simulate the imaging grayscale disturbance caused by machine vibration and conveyor roller jumping during the operation of the veneer production line. Other noise types that conform to the characteristics of stable random distribution can also be selected according to the actual vibration characteristics.

[0072] In specific implementation, combining the sample images of the rotary-cut veneer, the random noise, and each motion blur kernel to obtain a synthetic image dataset containing different degrees of blur can be achieved in the following way: traverse all generated motion blur kernels, independently sample a set of random noise with a matching amplitude range for each motion blur kernel, sequentially convolve each sample image of the rotary-cut veneer with the motion blur kernel, and then add the convolution result to the sampled random noise pixel by pixel to obtain a paired data pair corresponding to the blur kernel, i.e., a synthetic blurred image and the corresponding original clear sample image; the same clear sample image can be matched with different motion blur kernels and different random noise instances to generate multiple pairs of paired data with different degrees of blur. After all motion blur kernels and all clear sample images have completed the above processing, summarize all paired data pairs to obtain a synthetic image dataset containing different degrees of blur that covers different rotary-cutting linear veneer ...

[0073] In step 103, wavelet nodes that can decompose image features into low-frequency sub-bands and multi-directional high-frequency sub-bands are embedded, and a spatial attention mechanism jointly guided by horizontal and vertical high-frequency sub-bands is introduced to construct a motion blur restoration network adapted to the texture of a rotary-cut single board. The motion blur restoration network is trained using the synthetic image dataset to obtain the trained blur restoration model.

[0074] In some embodiments, embedding wavelet nodes that decompose image features into low-frequency sub-bands and multi-directional high-frequency sub-bands, and introducing a spatial attention mechanism jointly guided by horizontal and vertical high-frequency sub-bands, can construct a motion blur restoration network adapted to the texture of a rotary-cut single-layer board. This can be achieved through the following steps:

[0075] Establish a multi-scale encoding and decoding infrastructure with single input and multiple outputs;

[0076] Learnable discrete wavelet transform nodes are embedded in the encoder feature fusion segment and decoder unit of the encoding and decoding infrastructure, thereby adaptively decomposing the input features into low-frequency subbands and high-frequency subbands in the horizontal, vertical and diagonal directions.

[0077] A spatial attention mechanism jointly guided by high-frequency subbands in the horizontal and vertical directions is introduced into the decoding path;

[0078] The deep convolutional layers within the discrete wavelet transform nodes are replaced with lightweight structures.

[0079] A multi-scale output head is set at the end of the decoder of the encoding and decoding infrastructure, and a joint loss function corresponding to the multi-scale is configured for network training.

[0080] In practical implementation, the single-input multiple-output multi-scale encoding and decoding infrastructure can be built in the following way: the network input is determined to be a spun-cut single-board blurred image, which is connected through a single input port. The encoder is composed of multiple levels of simple coding blocks stacked in series. Each level of simple coding block is followed by a downsampling layer to extract the features of the spun-cut single-board image at different scales. The decoder is composed of multiple levels of upsampling blocks, which correspond one-to-one with the multi-scale feature output of the encoder. The feature output of adjacent encoder scales is reserved for the transmission interface of the encoder feature fusion section. After each level of upsampling, the decoder sets the intermediate feature transmission interface and the restored image output port of the corresponding scale, thus forming a single-input multiple-output multi-scale encoding and decoding infrastructure. There is no need to perform manual low-resolution downsampling processing on the input blurred image, avoiding the introduction of additional noise and feature uncertainty.

[0081] In specific implementation, learnable discrete wavelet transform nodes are embedded in the encoder feature fusion segment and decoder unit of the encoding and decoding infrastructure to adaptively decompose the input features into low-frequency subbands and high-frequency subbands in the horizontal, vertical, and diagonal directions. This can be achieved as follows: Learnable one-dimensional low-pass decomposition filter a0 and one-dimensional high-pass decomposition filter a1 are initialized as decomposition filter groups, and corresponding one-dimensional low-pass reconstruction filter s0 and one-dimensional high-pass reconstruction filter s1 are initialized as reconstruction filter groups. Both filter groups are initialized using corresponding filters from wavelet bases (such as Daubechies and Symlets series wavelet bases) known in the field of machine vision, and the parameters are updated end-to-end during network training. The two sets of one-dimensional decomposition filters are multiplied pairwise to obtain four two-dimensional wavelet convolution kernels corresponding to the low-frequency subband, horizontal high-frequency subband, vertical high-frequency subband, and diagonal high-frequency subband, respectively. Learnable discrete wavelet transform nodes are inserted at the output interface of adjacent two levels of features of the encoder (i.e., the encoder feature fusion section). Learnable discrete wavelet transform nodes are also inserted in the feature processing unit (i.e., the decoder unit) after each level of upsampling of the decoder. The processing logic of each node is as follows: the input features are operated with the four two-dimensional wavelet convolution kernels in the form of grouped convolution. The number of output channels is expanded to 4 times that of the input features, and the resolution is reduced to 1 / 2 of the input features, which are four-directional subband features, realizing the decomposition of the input features into low-frequency subband and multi-directional high-frequency subband.

[0082] In specific implementation, the spatial attention mechanism jointly guided by the high-frequency subbands in the horizontal and vertical directions can be introduced into the decoding path in the following way: After the feature decomposition is completed at each learnable discrete wavelet transform node of the decoding path, the horizontal high-frequency subband and the vertical high-frequency subband are separated from the output four-directional subband features. The two types of subbands are concatenated along the channel dimension and then passed through a 1×1 convolutional layer, a normalization layer and a sigmoid activation function in sequence to generate a spatial attention weight map with a value range of [0,1]. The weight map is then multiplied element-wise with the decoder input features of the same scale to obtain the attention-enhanced decoding features, thus completing the introduction of the spatial attention mechanism.

[0083] In specific implementation, the lightweight structure replacement of the deep convolutional layer in the discrete wavelet transform node can be achieved in the following way: the original deep convolutional layer in the learnable discrete wavelet transform node is replaced with a lightweight deep convolutional structure with a smaller kernel size. This can be achieved using a depth-separable convolutional form. After the replacement, the overall input and output dimensions of the wavelet transform node and the processing logic of wavelet domain decomposition and reconstruction remain unchanged, ensuring that while reducing the number of node parameters and computational load, the wavelet node's ability to decompose and reconstruct multi-directional subband features is not affected.

[0084] In specific implementation, setting a multi-scale output head at the end of the decoder in the encoding and decoding infrastructure and configuring a joint loss function corresponding to the multi-scale can be achieved in the following way: a wavelet output head is connected after each upsampling module of the decoder. Each wavelet output head outputs a rotary-cut single-plate restoration image corresponding to the scale, forming a multi-scale output. The configured joint loss function consists of two parts: the first part is the multi-scale reconstruction loss, which preferentially adopts the L1 loss or Charbonnier loss known in the field of machine vision. After calculating the pixel-by-pixel difference between the restored image of each output and the clear label of the corresponding scale, it is weighted and summed according to the preset scale weights. The scale weights can be set inversely proportional to the encoder downsampling factor. The second part is the wavelet perfect reconstruction constraint loss, which is used to constrain the decomposition filter bank {a} within the learnable discrete wavelet transform node. The reconstructed filter bank {s0,s1} satisfies the biorthogonal perfect reconstruction time-domain conditions: first, a low-latency condition a0∗s0+a1∗s1=2δ(n−l) (where ∗ is the convolution operation, δ(n) is the unit impulse sequence, and l is the system integer delay, usually half the filter length); second, an anti-aliasing condition a0−∗s0+a1−∗s1=0 (where a−[n]=(−1)na[n] is the modulation sequence). This loss uses the sum of the absolute values ​​of the residuals on the left side of the above two equations as a constraint term to force the filter bank to satisfy the perfect reconstruction characteristics of wavelet transform, avoiding the filter from degenerating into a regular convolution kernel. During training, the synthetic image dataset is used as input, and the paired spin-cut single-plate clear sample images are used as labels. The network is trained end-to-end using the joint loss function until convergence, thus obtaining the required motion blur restoration network.

[0085] In some embodiments, training the motion blur restoration network using the synthetic image dataset to obtain the trained blur restoration model can be achieved through the following steps:

[0086] The synthetic image dataset is divided into mutually exclusive training, validation, and test sets according to the classification of clear samples.

[0087] The images in the training set are standardized by preprocessing to unify the size and data distribution of the input images;

[0088] The learnable parameters of the motion blur restoration network are initialized using pre-trained weights;

[0089] Configure the training optimizer, initial learning rate, and maximum number of iterations, and set the multi-scale joint loss function as the optimization objective;

[0090] The training set is input into the initialized motion blur restoration network for iterative training, and the network parameters are updated through backpropagation.

[0091] Based on the performance evaluation results of the validation set, the model weights with the best overall performance are selected as the fuzzy restoration model after training.

[0092] In specific implementation, the synthetic image dataset can be divided into mutually exclusive training, validation, and test sets according to the affiliation of clear samples in the following way: using the unique identifier of each clear sample image in the synthetic image dataset as the basis for division, all paired data pairs belonging to the same clear sample are grouped into the same set, and randomly divided into mutually exclusive training, validation, and test sets according to a preset ratio, to ensure that all synthetic blurred images derived from the same clear sample are not distributed across sets, thus avoiding information leakage during the training process.

[0093] In specific implementation, the images in the training set are standardized and preprocessed. The size and data distribution of the input images can be unified in the following way: perform a uniform size scaling operation on all clear sample images and corresponding synthetic blurred images in the training set, adjust the image resolution to the preset input size of the motion blur restoration network, and then normalize the image pixel values ​​to map the pixel value range to the fixed interval required by the network training, thereby unifying the data distribution of all input images.

[0094] In specific implementation, the initialization of the learnable parameters of the motion blur restoration network using pre-trained weights can be achieved in the following way: obtain publicly available pre-trained model weights consistent with the current motion blur restoration network architecture as pre-trained weights; for learnable parameters in the pre-trained weights that are completely matched with the current network layer structure and parameter dimensions, directly load the corresponding pre-trained parameters to complete the initialization; for newly added learnable parameters that do not exist in the pre-trained weights or whose parameter dimensions do not match the current network layer, initialize them using parameter initialization methods known in the field of machine vision; if there is a small amount of clear-blur paired pre-trained data collected from the same type of rotary cutting production line, pre-training weights adapted to the rotary cutting scenario can also be obtained based on this data before initialization, so as to improve the training convergence speed and the stability of the restoration effect.

[0095] In practical implementation, configuring the training optimizer, initial learning rate, and maximum number of iterations, and setting the multi-scale joint loss function as the optimization objective, can be achieved in the following way: Select the gradient descent optimizer, which is well-known in the field of machine vision, as the training optimizer, preferably AdamW or stochastic gradient descent (SGD) optimizer. According to the network size and the computing power of the deployed hardware, set the initial learning rate in the commonly used range of 1e-5 to 1e-3, and set the maximum number of iterations in the commonly used range of 1e4 to 1e5. It can also be combined with well-known learning rate adjustment strategies such as cosine annealing or step decay. Set the weighted sum of the network's preset multi-scale reconstruction loss and wavelet perfect reconstruction constraint loss as the multi-scale joint loss function, and use it as the optimization objective of the backpropagation process.

[0096] In specific implementation, the training set is input into the initialized motion blur restoration network for iterative training. The network parameters are updated through backpropagation in the following way: the preprocessed training set data is input into the initialized motion blur restoration network in batches according to a preset batch size. After forward propagation to obtain the restored images at each scale, the multi-scale joint loss value of the current batch is calculated. The gradient of each learnable parameter of the network is calculated through the backpropagation algorithm. The network parameters are iteratively updated according to the parameter update rules of the selected optimizer until the preset maximum number of iterations is reached.

[0097] In specific implementation, the model weights with the best overall performance can be selected as the fuzzy restoration model after training based on the performance evaluation results of the validation set. This can be achieved in the following way: during training, the restoration performance of the current network model is evaluated using the validation set at preset intervals, and the model weights corresponding to each evaluation node are saved synchronously. After training, all saved model weights are traversed, and the weight file with the lowest multi-scale joint loss value on the validation set and the restored image quality meets the preset requirements is selected as the final parameters of the fuzzy restoration model after training.

[0098] In step 104, based on the defect sample image and defect annotation of the rotary-cut single board, a real-time target detection algorithm is used as the basic detection framework, and a dynamic snake convolution module is introduced into the backbone network to construct a surface defect recognition model and complete pre-training.

[0099] It should be noted that the defect sample images and their defect annotations of the rotary-cut veneer in this application can be obtained in the following ways: the defect sample images can reuse the frames carrying defects in the clear sample images of the rotary-cut veneer obtained in the aforementioned steps, or they can be independently acquired under conditions of production line shutdown, low-speed crawling, or short exposure with stroboscopic flash. The acquisition process covers at least one type of defect among the tree species, thickness, and live knots, dead knots, cracks, and holes in the production line. The defect annotations are obtained by selecting and annotating the defect areas in the defect sample images according to categories using annotation tools (such as LabelImg) known in the field of machine vision. The annotation categories are consistent with the defect types of the rotary-cut veneer to be identified. In other embodiments, defect sample images and corresponding manual annotation results retained in the previous manual grading process of the production line can also be directly reused, or the annotation can be completed by a third-party annotation platform. The annotation format can match the input requirements of the selected surface defect recognition model.

[0100] In specific implementation, based on the defect sample images and defect annotations of rotary-cut veneers, a real-time target detection algorithm is used as the basic detection framework. A dynamic serpentine convolution module is introduced into the backbone network to construct a surface defect recognition model and complete pre-training. This can be achieved in the following ways: the YOLOv9-DSConv defect recognition model with a dynamic serpentine convolution module mentioned in the journal article "Defect Recognition Method Based on YOLOv9-DSConv Eucalyptus Rotary-Cut Veneer" can be selected, and the model training is completed according to the training method mentioned in the article. In other embodiments, other existing defect recognition models can also be selected, which are not limited here.

[0101] In step 105, a blurred image of the surface of the rotary-cut veneer is acquired online, the blurred image is input into the blurred restoration model, the restored image is output, and the restored image is input into the pre-trained surface defect recognition model for defect recognition.

[0102] In practice, the online acquisition of blurred images of the surface of the rotary-cut veneer can be achieved in the following way: Under the normal operation of the rotary-cutting production line, at the aforementioned online inspection station, using the same camera installation position, focal length, object distance, pixel size, and supplementary lighting conditions as when acquiring the sample image of the rotary-cut veneer, the camera exposure time is set to a conventional value that matches the current rotary-cutting linear speed, and the surface image of the rotary-cut veneer in motion is acquired in real time. The resulting image is the blurred image of the surface of the rotary-cut veneer acquired online. The acquisition process covers the veneer specifications and full-speed range operating conditions of the production line's conventional production, ensuring that the degradation characteristics match the blur distribution of the synthetic image dataset.

[0103] In some embodiments, reference Figure 3 The figure is an exemplary flowchart illustrating the determination of a restored image according to some embodiments of this application. In this application, the blurred image is input into the blurred restoration model, and the restored image is output by the following steps:

[0104] In step 1051, the blurred images of the rotary-cut veneer acquired online are subjected to the same size scaling and normalization preprocessing as the training set.

[0105] In step 1052, the preprocessed blurred image is input into the trained blurred restoration model, and the multi-scale restored image is output through forward propagation calculation.

[0106] In step 1053, a scale with the same resolution as the input blurred image is selected from the multi-scale restored image output as the final output restored image.

[0107] In practice, the following method can be used to perform the same size scaling and normalization preprocessing on the online acquired veneer blurry image as the training set: according to the preset input size set in the training set preprocessing stage, the size of the online acquired veneer blurry image is adjusted, and then the pixel values ​​are normalized to be completely consistent with the training set. The range of pixel values ​​is adjusted to the fixed interval used in the training stage to ensure that the distribution of input data is consistent with the training stage and to avoid distribution offset affecting the restoration effect.

[0108] In practice, the preprocessed blurred image is input into the trained fuzzy restoration model. The multi-scale restored image output is obtained through forward propagation. This can be achieved as follows: the preprocessed spun-cut single-plate blurred image is input into the trained fuzzy restoration model. It then passes through the encoder for multi-scale feature extraction, the learnable discrete wavelet transform node for multi-subband decomposition and cross-scale fusion, and the decoder for upsampling with high-frequency subband-guided spatial attention. The wavelet output heads at each level of the decoder output the corresponding scale of the spun-cut single-plate restored image, forming a multi-scale restored image output set. The entire inference process only performs forward computation and does not update the network's learnable parameters.

[0109] In practice, the final output restored image can be selected from the multi-scale restored image output at a scale with the same resolution as the input blurred image. This can be achieved by traversing all scales in the multi-scale restored image output set and selecting the restored image output from the deepest level of the decoder, whose spatial resolution is completely consistent with the preprocessed rotary-cut single-plate blurred image, as the final output. This scale restored image integrates deep semantic features and shallow texture details, achieving the highest restoration accuracy. No additional size adjustment operation is required for the output image, thus avoiding the introduction of interpolation artifacts.

[0110] In another aspect, in some embodiments, this application provides a veneer lathe that includes an online visual inspection unit for surface defects, referring to... Figure 4 The figure is a schematic diagram of the structure of an online visual inspection unit for surface defects according to some embodiments of this application. The online visual inspection unit 400 for surface defects includes: an acquisition module 401, a processing module 402, and an execution module 403, which are described below:

[0111] Acquisition module 401, in this application, is mainly used to acquire sample images of rotary-cut veneer;

[0112] Processing module 402, in this application, is mainly used to construct motion blur kernels under different spun cutting linear speeds based on spun cutting process parameters, and to process the sample images through all motion blur kernels to generate a synthetic image dataset containing different degrees of blur.

[0113] It should be noted that the processing module 402 in this application is also used to embed wavelet nodes that can decompose image features into low-frequency sub-bands and multi-directional high-frequency sub-bands, and introduce a spatial attention mechanism jointly guided by horizontal high-frequency sub-bands and vertical high-frequency sub-bands, thereby constructing a motion blur restoration network adapted to the texture of rotary-cut single board, and using the synthetic image dataset to train the motion blur restoration network to obtain the trained blur restoration model;

[0114] It should be noted that the processing module 402 in this application is also used for defect sample images and defect annotations based on rotary-cut single boards, with real-time target detection algorithm as the basic detection framework, and a dynamic snake convolution module is introduced into the backbone network to construct a surface defect recognition model and complete pre-training.

[0115] The execution module 403 in this application is mainly used to acquire blurred images of the surface of the rotary-cut veneer online, input the blurred images into the blurred restoration model, output the restored images, and input the restored images into the pre-trained surface defect recognition model for defect recognition.

[0116] In addition, this application also provides a computer device, the computer device including a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the above-described online visual inspection method for surface defects of rotary-cut veneer.

[0117] In some embodiments, reference Figure 5 The figure is a schematic diagram of the structure of a computer device for implementing an online visual inspection method for surface defects of rotary-cut veneer according to some embodiments of this application. The online visual inspection method for surface defects of rotary-cut veneer in the above embodiments can... Figure 5 The computer device shown is used to implement this, and the computer device 500 includes at least one processor 501, a communication bus 502, a memory 503, and at least one communication interface 504.

[0118] Processor 501 can be a general-purpose central processing unit (CPU) or an application-specific integrated circuit (ASIC).

[0119] The communication bus 502 can be used to transmit information between the aforementioned components.

[0120] Memory 503 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 503 may exist independently and be connected to processor 501 via communication bus 502. Memory 503 may also be integrated with processor 501.

[0121] The memory 503 stores program code for executing the solution of this application, and its execution is controlled by the processor 501. The processor 501 executes the program code stored in the memory 503. The program code may include one or more software modules. In the above embodiments, the online visual inspection method for surface defects of rotary-cut veneer can be implemented by the processor 501 and one or more software modules in the program code in the memory 503.

[0122] Communication interface 504 uses any transceiver-like device to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0123] In a specific implementation, as one example, a computer device may include multiple processors, each of which may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Here, a processor may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0124] The aforementioned computer device can be a general-purpose computer device or a special-purpose computer device. In specific implementations, the computer device can be a desktop computer, a portable computer, a network server, a handheld digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. This application does not limit the type of computer device.

[0125] In addition, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described online visual inspection method for surface defects of rotary-cut veneer.

[0126] In summary, the online visual detection method for surface defects of a rotary laminating machine and rotary-laminated veneer disclosed in this application firstly acquires sample images of the rotary-laminated veneer; based on the rotary laminating process parameters, motion blur kernels are constructed for different rotary laminating linear veneer speeds, and the sample images are processed using all motion blur kernels to generate a synthetic image dataset containing different degrees of blur; wavelet nodes that can decompose image features into low-frequency sub-bands and multi-directional high-frequency sub-bands are embedded, and a spatial attention mechanism jointly guided by horizontal and vertical high-frequency sub-bands is introduced to construct a motion blur restoration network adapted to the texture of the rotary-laminated veneer; the motion blur restoration network is trained using the synthetic image dataset to obtain a trained blur restoration model; based on the defect sample images and defect annotations of the rotary-laminated veneer, a real-time target detection algorithm is used as the basic detection framework, and a dynamic serpentine convolution module is introduced into the backbone network to construct a surface defect recognition model and complete pre-training; blurred images of the surface of the rotary-laminated veneer are acquired online, the blurred images are input into the blur restoration model, the restored images are output, and the restored images are input into the pre-trained surface defect recognition model for defect recognition.

[0127] Therefore, this application constructs motion blur kernels at different linear velocities using real process parameters of the rotary cutting production line, and generates a synthetic training dataset by superimposing random noise simulating equipment vibration. This eliminates the need for costly real clear-blurred pairing data collection, and through process parameter binding and perturbation superposition, the synthesized blurred image perfectly matches the real degradation characteristics of different speed levels and vibration disturbances on the production line, thus avoiding the deviation between general synthesis schemes and real working conditions from the data end. Furthermore, this application embeds learnable discrete wavelet transform nodes into the constructed restoration network, which can adaptively decompose the input features into low-frequency subbands and high-frequency subbands in multiple directions (horizontal, vertical, and diagonal). It also introduces a spatial attention mechanism jointly guided by horizontal and vertical high-frequency subbands, which precisely matches the texture direction characteristics of rotary-cut single-board defects, focusing on enhancing the recovery ability of defect edges and textures. Compared with general deblurring networks, it is more suitable for rotary-cut single-board scenarios. Finally, only the restored clear image needs to be input into the existing surface defect recognition model to complete the recognition, without modifying the existing production line recognition link, which can significantly improve the full-speed domain fuzziness adaptability of online detection and ensure the accuracy of defect recognition. In summary, the solution proposed in this application can reduce the interference of directional texture and motion blur on the identification of surface defects of rotary-cut veneers in high-speed rotary cutting production lines.

[0128] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0129] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. An online visual inspection method for surface defects in rotary-cut veneer, characterized in that, include: Obtain sample images of rotary-cut veneers; Motion blur kernels for different slitting linear velocities are constructed based on the slitting process parameters. The sample images are then processed using all the motion blur kernels to generate a synthetic image dataset containing different degrees of blur. Embedding can decompose image features into wavelet nodes of low-frequency subband and multi-directional high-frequency subband, and introduce a spatial attention mechanism jointly guided by horizontal and vertical high-frequency subbands, thereby constructing a motion blur restoration network adapted to the texture of rotary-cut single board. The motion blur restoration network is trained using the synthetic image dataset to obtain the trained blur restoration model. Based on defect sample images and defect annotations of rotary-cut single boards, a real-time target detection algorithm is used as the basic detection framework. A dynamic serpentine convolution module is introduced into the backbone network to construct a surface defect recognition model and complete pre-training. A blurred image of the surface of a rotary-cut veneer is acquired online, the blurred image is input into the blurred restoration model, the restored image is output, and the restored image is input into a pre-trained surface defect recognition model for defect recognition.

2. The method as described in claim 1, characterized in that, The specific construction of motion fuzzy kernels for different rotary cutting linear velocities based on rotary cutting process parameters includes: Obtain the rotary cutting process parameters of the rotary cutting production line; Select a rotary cutting speed from the range of rotary cutting speed values ​​for the rotary cutting production line in the rotary cutting process parameters; Based on the rotary cutting process parameters, and combined with random directional deviation and scale perturbation, the motion fuzzy kernel of the rotary-cut single board at the selected rotary cutting linear velocity is determined; Select another rotary cutting line speed from the range of rotary cutting line speed values ​​in the rotary cutting process parameters as the new selected rotary cutting line speed, and repeat the above steps to obtain multiple motion fuzzy kernels under different rotary cutting line speeds.

3. The method as described in claim 1, characterized in that, The sample images are processed using all motion blur kernels to generate a synthetic image dataset containing different degrees of blur. Specifically, this includes: Random noise is generated to simulate the vibration of the rotary cutting production line equipment based on the rotary cutting process parameters; The sample images of the rotary-cut single board, the random noise, and each motion blur kernel are combined to obtain a synthetic image dataset containing different degrees of blur.

4. The method as described in claim 1, characterized in that, Embedding decomposes image features into wavelet nodes in low-frequency and multi-directional high-frequency sub-bands, and introduces a spatial attention mechanism jointly guided by horizontal and vertical high-frequency sub-bands, thereby constructing a motion blur restoration network adapted to rotary-cut veneer textures, specifically including: Establish a multi-scale encoding and decoding infrastructure with single input and multiple outputs; Learnable discrete wavelet transform nodes are embedded in the encoder feature fusion segment and decoder unit of the encoding and decoding infrastructure, thereby adaptively decomposing the input features into low-frequency subbands and high-frequency subbands in the horizontal, vertical and diagonal directions. A spatial attention mechanism jointly guided by high-frequency subbands in the horizontal and vertical directions is introduced into the decoding path; The deep convolutional layers within the discrete wavelet transform nodes are replaced with lightweight structures. A multi-scale output head is set at the end of the decoder of the encoding and decoding infrastructure, and a joint loss function corresponding to the multi-scale is configured for network training.

5. The method as described in claim 1, characterized in that, Training the motion blur restoration network using the synthetic image dataset to obtain the trained blur restoration model specifically includes: The synthetic image dataset is divided into mutually exclusive training, validation, and test sets according to the classification of clear samples. The images in the training set are standardized by preprocessing to unify the size and data distribution of the input images; The learnable parameters of the motion blur restoration network are initialized using pre-trained weights; Configure the training optimizer, initial learning rate, and maximum number of iterations, and set the multi-scale joint loss function as the optimization objective; The training set is input into the initialized motion blur restoration network for iterative training, and the network parameters are updated through backpropagation. Based on the performance evaluation results of the validation set, the model weights with the best overall performance are selected as the fuzzy restoration model after training.

6. The method as described in claim 1, characterized in that, The process of inputting the blurred image into the blurred restoration model and outputting the restored image specifically includes: The blurred images of rotary-cut veneers acquired online are subjected to the same size scaling and normalization preprocessing as the training set. The preprocessed blurred image is input into the trained blurred image restoration model, and the multi-scale restored image output is obtained through forward propagation calculation. The scale that matches the resolution of the input blurred image is selected from the multi-scale restored image output as the final output restored image.

7. The method as described in claim 1, characterized in that, Sample images of the rotary-cut veneer are captured using an industrial camera.

8. A veneer laminating machine, comprising an online visual inspection unit for surface defects, characterized in that, The online visual inspection unit for surface defects includes: The acquisition module is used to acquire sample images of rotary-cut veneers; The processing module is used to construct motion blur kernels for different slicing linear velocities based on the slicing process parameters, and to process the sample images using all the motion blur kernels to generate a synthetic image dataset containing different degrees of blur. The processing module is also used to embed wavelet nodes that can decompose image features into low-frequency sub-bands and multi-directional high-frequency sub-bands, and introduce a spatial attention mechanism jointly guided by horizontal and vertical high-frequency sub-bands, thereby constructing a motion blur restoration network adapted to rotary-cut single-board textures. The motion blur restoration network is trained using the synthetic image dataset to obtain the trained blur restoration model. The processing module is also used to collect defect sample images and their defect annotations based on rotary-cut single boards, and to build a surface defect recognition model and complete pre-training by introducing a dynamic snake convolution module into the backbone network based on a real-time target detection algorithm as the basic detection framework. The execution module is used to acquire blurred images of the surface of a rotary-cut veneer online, input the blurred images into the blurred restoration model, output the restored images, and input the restored images into a pre-trained surface defect recognition model for defect recognition.

9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the online visual inspection method for surface defects of rotary-cut veneer as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the online visual inspection method for surface defects of rotary-cut veneer as described in any one of claims 1 to 7.