Aluminum veneer special-shaped cutting track planning method and system based on visual positioning

By combining anisotropic guided filters and non-uniform rational B-spline contour descriptors with feature processing networks, the problems of low efficiency and insufficient precision in special-shaped cutting of aluminum veneers are solved, high-precision and high-quality cutting trajectory planning is achieved, and the intelligent manufacturing level of aluminum veneer processing is improved.

CN120580230BActive Publication Date: 2025-10-17SHAANXI OMET IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511075297.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-10-17
Estimated Expiration
2045-08-01

AI Technical Summary

Technical Problem

The existing technology has problems such as low efficiency, insufficient precision, unstable cutting quality and high scrap rate in the special-shaped cutting of aluminum veneers. This is mainly due to the high reflectivity and texture characteristics of the aluminum surface, which leads to unstable image acquisition quality, lack of effective mapping of material properties and process parameters, difficulty in accurately modeling areas with drastic curvature changes in special-shaped contours, and lack of a unified optimization framework for cutting trajectory generation and process parameters.

Method used

Anisotropic guided filters are used for image preprocessing. Combined with the surface microstructure characteristics of aluminum materials, high-precision fitting of the special-shaped contours of aluminum veneers and cutting trajectory generation are achieved through a non-uniform rational B-spline profile descriptor and a feature processing network. Image features and process parameters are integrated to establish a collaborative optimization framework for cutting trajectory and process parameters.

Benefits of technology

It significantly improves the precision and quality of special-shaped cutting of aluminum veneer panels, reduces material waste and processing time, improves production efficiency and product consistency, and provides an innovative solution for intelligent manufacturing in the field of aluminum veneer processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120580230B_ABST
    Figure CN120580230B_ABST
Patent Text Reader

Abstract

The application discloses a visual positioning-based aluminum veneer special-shaped cutting track planning method and system, relates to the technical field of visual positioning, and comprises the following steps: adopting an anisotropic guide filter to pre-process an aluminum veneer image, and keeping edge features through multi-scale filtering and adaptive weight fusion; then, edge enhancement processing is performed in combination with material characteristics; then, a non-uniform rational B-spline contour descriptor is used to extract contour features, wherein the control point density and the local curvature are in an exponential relationship; finally, a cutting track is generated based on a feature processing network, so that accurate cutting control of the special-shaped contour of the aluminum veneer is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to visual positioning technology, and in particular to an aluminum veneer irregular cutting trajectory planning method and system based on visual positioning. BACKGROUND

[0002] Aluminum veneer irregular cutting is an important process in modern architectural decoration and industrial manufacturing fields. Traditional aluminum veneer cutting trajectory planning methods mainly rely on manual measurement and experience design, which have problems such as low efficiency and insufficient precision. With the development of computer vision technology, image-based cutting trajectory automatic planning methods have gradually been applied in actual production. However, existing visual-based trajectory planning methods face many challenges when dealing with aluminum veneer: the high reflectivity and texture characteristics of the aluminum surface lead to unstable image acquisition quality; there is a lack of effective mapping relationship between the material characteristics of aluminum veneer and the cutting process parameters; it is difficult to accurately model the regions with sharp changes in curvature of irregular profiles; and there is insufficient correlation between process parameters and geometric features. These problems result in low cutting precision, unstable cutting quality, and high scrap rate.

[0003] Existing technologies usually use standard image processing algorithms for edge detection and contour extraction, lacking specific consideration of aluminum characteristics; contour modeling often uses a uniform sampling control point distribution strategy, which cannot adapt to local feature changes of complex irregular profiles; cutting trajectory generation and process parameter setting are often fragmented, lacking a unified optimization framework. These technical bottlenecks seriously restrict the improvement of aluminum veneer irregular cutting automation level. Especially in high-precision and high-quality scenarios, existing technologies are difficult to meet the growing demand for customized production. The industry urgently needs a comprehensive trajectory planning method that fully combines aluminum characteristics, image features, and processing technology to improve the precision, efficiency, and quality of aluminum veneer irregular cutting. SUMMARY

[0004] In view of the deficiencies of the prior art, the present application provides an aluminum veneer irregular cutting trajectory planning method and system based on visual positioning, which can solve the problems in the prior art.

[0005] In a first aspect of an embodiment of the present application, an aluminum veneer irregular cutting trajectory planning method based on visual positioning is provided, comprising:

[0006] The obtained aluminum veneer image is input to an anisotropic guided filter for preprocessing, the kernel function of the anisotropic guided filter being determined by the microstructure characteristics of the aluminum surface, and the anisotropic guided filter performing filtering operations in multiple scale spaces, respectively, and the filtering results of each scale space being fused by adaptive weights based on edge preservation degree;

[0007] An edge enhancement process is performed on the aluminum veneer image processed by the anisotropic direction filter, and an edge detection operator is used in the edge enhancement process, and a response function of the edge detection operator is combined with material characteristic information of the aluminum veneer;

[0008] Image features obtained by the edge enhancement process are input into a non-uniform rational B-spline contour descriptor, a control point density of the non-uniform rational B-spline contour descriptor is in an exponential relationship with a local curvature of a special-shaped contour of the aluminum veneer, and selection of the control point is based on a saliency analysis of edge pixels, and the saliency analysis simultaneously considers edge intensity, direction consistency and local structure complexity;

[0009] A feature processing network is constructed based on an output of the non-uniform rational B-spline contour descriptor, a node feature vector of the feature processing network includes image feature parameters and process parameters, and a cutting trajectory is generated based on an output of the feature processing network.

[0010] Optionally,

[0011] The obtained aluminum veneer image is input into an anisotropic direction filter for preprocessing, a kernel function of the anisotropic direction filter is determined by a microstructure characteristic of an aluminum surface, and the anisotropic direction filter performs filtering operations in multiple scale spaces, and a filtering result of each scale space is fused through an adaptive weight based on an edge retention degree, and the step of fusing the filtering result of each scale space through the adaptive weight based on the edge retention degree includes:

[0012] A basic kernel function of the anisotropic direction filter is constructed, and the basic kernel function is modulated by a material characteristic adaptive modulation function of the aluminum veneer surface to obtain a final kernel function, the material characteristic adaptive modulation function includes a local material uniformity term and a reflectivity gradient term, and the final kernel function further includes a local texture complexity modulation term, and the local texture complexity modulation term is determined by a local variance and a local correlation of the aluminum veneer image;

[0013] An adaptive scale decomposition is performed on the aluminum veneer image, a scale parameter of the adaptive scale decomposition is determined by a local entropy value of the aluminum veneer image, and the adaptive scale decomposition generates a corresponding feature image in each scale space;

[0014] An edge response metric value is calculated for the feature image in each scale space, the edge response metric value is determined by a gradient intensity and a direction consistency of the feature image, and the direction consistency is calculated by using the feature images in adjacent scale spaces;

[0015] A feature fusion weight of the feature image is calculated, the feature fusion weight includes an edge response weight term and a detail retention weight term, the edge response weight term is determined by the edge response metric value, and the detail retention weight term is determined by a ratio of a Laplacian response value to a blur metric value of the feature image.

[0016] The feature fusion weight is applied to the feature image to obtain an enhanced feature image, and the enhanced feature image is subjected to detail enhancement through a difference between the feature image and a feature image of an adjacent scale space thereof, and an enhancement coefficient of the detail enhancement is proportional to the edge response weight term.

[0017] Optionally,

[0018] The construction process of the final kernel function comprises:

[0019] The basic kernel function is an anisotropic Gaussian kernel function, a principal direction of the anisotropic Gaussian kernel function is determined by a local gradient direction of the aluminum veneer image, and a standard deviation of the anisotropic Gaussian kernel function is determined by a local gray scale distribution of the aluminum veneer image.

[0020] The local material uniformity term in the material property adaptive modulation function is obtained by calculating a dispersion degree of pixel gray scale values in a preset neighborhood, the reflectivity gradient term in the material property adaptive modulation function is obtained by calculating a reflectivity difference between adjacent pixels in the preset neighborhood, the local material uniformity term has a value range of zero to one, and the reflectivity gradient term has a value range of zero to one.

[0021] The local variance in the local texture complexity modulation term is obtained by calculating a statistical variance of pixel gray scale values in a preset neighborhood, and the local correlation in the local texture complexity modulation term is obtained by calculating a correlation coefficient between a center pixel and surrounding pixels in the preset neighborhood.

[0022] The product of the basic kernel function and the material property adaptive modulation function is multiplied by the product of the local texture complexity modulation term to obtain a final kernel function.

[0023] Optionally,

[0024] An edge enhancement process is performed on the aluminum veneer image processed by the anisotropic directional filter, the edge enhancement process adopts an edge detection operator, and the step of combining material property information of the aluminum veneer into a response function of the edge detection operator comprises:

[0025] A width of a thermal deformation zone of the aluminum veneer at a specified temperature is obtained, a convolution kernel weight of a standard Sobel operator is modulated based on the width of the thermal deformation zone to obtain an improved Sobel operator, and the convolution kernel weight of the improved Sobel operator is positively correlated with the width of the thermal deformation zone.

[0026] constructing a primary direction edge detection operator and a secondary direction edge detection operator; a response value of the primary direction edge detection operator is determined by a local gradient intensity and an edge continuity, the local gradient intensity is obtained by calculating a sum of squares of horizontal and vertical gradients of the image, and the edge continuity is obtained by calculating a deviation degree of a local gradient direction from a primary direction; a response value of the secondary direction edge detection operator is determined by a local texture directionality and an edge sharpness, the local texture directionality is obtained by calculating a normalized difference of eigenvalues of a structure tensor, and the edge sharpness is obtained by calculating a nonlinear mapping of the local gradient intensity;

[0027] obtaining a local density gradient value of the aluminum veneer, fusing the response value of the primary direction edge detection operator and the response value of the secondary direction edge detection operator by weighting, and obtaining an edge response image by modulating a fusion result by the local density gradient value, wherein a weight of the weighted fusion is related to the response value of the primary direction edge detection operator and the response value of the secondary direction edge detection operator, and an intensity of the modulation is proportional to an amplitude of the local density gradient value; performing adaptive threshold segmentation on the edge response image to obtain a final edge enhancement result.

[0028] Optionally,

[0029] inputting an image feature obtained by the edge enhancement processing into a non-uniform rational B-spline contour descriptor, a control point density of the non-uniform rational B-spline contour descriptor is in an exponential relationship with a local curvature of the aluminum veneer profile, and the selection of the control points is based on a saliency analysis of edge pixels, the saliency analysis simultaneously considering steps of an edge intensity, a direction consistency and a local structure complexity, wherein:

[0030] the edge intensity is obtained by calculating an image gradient amplitude, the direction consistency is obtained by calculating a cosine similarity of gradient directions in a local neighborhood, and the local structure complexity is obtained by calculating a quadratic norm of principal curvatures;

[0031] fusing the edge intensity, the direction consistency and the local structure complexity by weighting to obtain a comprehensive saliency metric value, the comprehensive saliency metric value is used to determine a control point candidate set, and a saliency metric value of a point in the control point candidate set is greater than a preset saliency threshold value;

[0032] calculating a local curvature value of the aluminum veneer profile, constructing a control point density function based on the local curvature value, the control point density function adopts an exponential mapping form, and an output value of the control point density function is in an exponential relationship with an absolute value of the local curvature value; screening the points in the control point candidate set based on the control point density function, and a Euclidean distance between any two retained control points is not less than a minimum value of reciprocals of control point density functions at the two points;

[0033] Constructing a non-uniform rational B-spline curve based on the reserved control points, a node vector of the non-uniform rational B-spline curve being generated by a cumulative chord length parameterization method, and a base function of the non-uniform rational B-spline curve adopting a recursively defined p-order base function.

[0034] Optionally,

[0035] Constructing a feature processing network based on an output of the non-uniform rational B-spline contour descriptor, a node feature vector of the feature processing network containing image feature parameters and process parameters; and generating a cutting trajectory based on an output of the feature processing network, the step including:

[0036] The node feature vector of the feature processing network includes control point feature parameters, curve feature parameters and process parameters, the control point feature parameters including control point coordinates, weight values, local curvature values and control point density values, the curve feature parameters including curve positions, curve derivatives, normal vectors and tangent vectors, and the process parameters including plate thickness, elastic modulus, yield strength, thermal expansion coefficient, cutting speed, cutting power, feed rate and kerf width;

[0037] Performing multi-scale feature aggregation on the node feature vector to obtain fused features, constructing a feature propagation mechanism based on the fused features, the feature propagation mechanism including a message passing function between nodes and a feature update rule, the message passing function being based on features of adjacent nodes and edge features to calculate propagation information between nodes, and the feature update rule being based on a feature of a node itself and propagation information of all adjacent nodes to update the feature of the node;

[0038] Performing nonlinear mapping on the updated node feature to obtain control parameters of the cutting trajectory, the control parameters including a sampling density coefficient and an offset compensation amount;

[0039] Generating cutting trajectory points and process parameters based on the control parameters, a sampling density of the cutting trajectory points being in an exponential relationship with a local curvature of the curve, a coordinate of the cutting trajectory points being obtained by superimposing a curve position on a normal vector offset, a cutting speed being in an inverse proportional relationship with the local curvature of the curve, and a cutting power being in a linear combination relationship with the plate thickness and the cutting speed;

[0040] Performing optimization and smoothing processing on the cutting trajectory, limiting a curvature change rate of the cutting trajectory to be not greater than a preset maximum curvature change rate, and limiting an acceleration of the cutting speed to be not greater than a preset maximum acceleration, to obtain a final cutting trajectory satisfying a continuity constraint.

[0041] Optionally,

[0042] performing multi-scale feature aggregation on the node feature vector to obtain fusion features, constructing a feature propagation mechanism based on the fusion features, the feature propagation mechanism including a message passing function between nodes and a feature update rule, the message passing function calculating propagation information between nodes based on features of adjacent nodes and edge features, and the feature update rule updating node features based on a node feature and propagation information of all adjacent nodes, the steps including:

[0043] inputting the node feature vector into a plurality of scale transformation matrices for feature decomposition to obtain decomposition features of multiple scales, calculating importance weights of the decomposition features of each scale using a multi-layer perception, and performing weighted fusion on the decomposition features of multiple scales based on the importance weights to obtain fusion features;

[0044] calculating a node attention score based on the fusion features through a nonlinear transformation;

[0045] constructing an edge feature enhanced attention mechanism, the edge feature enhanced attention mechanism concatenating the fusion features of adjacent nodes, edge features, and the node attention score and inputting the same into a nonlinear transformation function to obtain edge feature attention weights;

[0046] constructing a multi-head attention message passing mechanism based on the edge feature attention weights, each attention head corresponding to a feature transformation matrix, transforming the fusion features of adjacent nodes through the feature transformation matrix, multiplying the transformed fusion features with the corresponding edge feature attention weights to obtain attention messages, and performing weighted aggregation on the attention messages of all attention heads to obtain aggregated messages of the nodes;

[0047] constructing a gating update mechanism, concatenating the fusion features of the nodes and the aggregated messages, inputting the same into a gating unit to obtain update gate information, selectively updating the node features based on the update gate information, and performing residual connection and normalization processing on the updated node features and the original fusion features to obtain final node features;

[0048] adopting a dynamic optimization strategy for the feature propagation process and performing norm constraint on gradient values.

[0049] In a second aspect, an aluminum veneer irregular cutting trajectory planning system based on visual positioning is provided, including:

[0050] A first unit is configured to input an obtained aluminum veneer image into an anisotropic guided filter for preprocessing, a kernel function of the anisotropic guided filter being determined by surface microstructure characteristics of aluminum materials, the anisotropic guided filter performing filtering operations in multiple scale spaces respectively, and filtering results of each scale space being fused through adaptive weights based on edge preservation degrees;

[0051] A second unit is configured to perform edge enhancement processing on the aluminum veneer image processed by the anisotropic direction filter, and the edge enhancement processing adopts an edge detection operator, and a response function of the edge detection operator is combined with material characteristic information of the aluminum veneer;

[0052] A third unit is configured to input image features obtained by the edge enhancement processing into a non-uniform rational B-spline (NURBS) profile descriptor, a density of control points of the NURBS profile descriptor is in an exponential relationship with local curvatures of the irregular profile of the aluminum veneer, and selection of the control points is based on a saliency analysis of edge pixels, and the saliency analysis simultaneously considers edge strength, direction consistency and local structure complexity;

[0053] A fourth unit is configured to construct a feature processing network based on an output of the NURBS profile descriptor, a node feature vector of the feature processing network contains image feature parameters and process parameters, and a cutting trajectory is generated based on an output of the feature processing network.

[0054] In a third aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the method.

[0055] The present application realizes the whole-process optimization from image acquisition to cutting trajectory generation by organically combining the aluminum material characteristics, image processing technology and geometric modeling method. The anisotropic direction filter is used for pre-processing the image, the filter kernel function is specially designed for the microstructure characteristics of the aluminum material surface, and the problems of aluminum veneer surface reflection and texture interference are effectively solved, and the precision and stability of edge extraction are significantly improved. The edge enhancement processing stage fuses the aluminum veneer material characteristic information, so that the edge detection result is more in line with the actual processing demand, and lays a foundation for subsequent accurate modeling.

[0056] The NURBS profile descriptor of the present application innovatively establishes the exponential relationship mapping between the control point density and the local curvature, realizes the high-precision fitting of the complex irregular profile, and significantly improves the model precision in the area with sharp curvature change. The feature processing network organically fuses the image feature parameters and the process parameters, establishes the mapping relationship from the geometric features to the cutting process, realizes the collaborative optimization of the cutting trajectory and the process parameters. The overall scheme greatly improves the precision and quality of the aluminum veneer irregular cutting, reduces the material waste and processing time, improves the production efficiency and product consistency, provides an innovative technical solution for intelligent manufacturing in the field of aluminum veneer processing, and has significant economic benefits and application prospect. BRIEF DESCRIPTION OF DRAWINGS

[0057] Figure 1 FIG. 1 is a flowchart of an aluminum veneer irregular cutting trajectory planning method based on visual positioning according to an embodiment of the present application. DETAILED DESCRIPTION

[0058] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.

[0059] Figure 1 A flowchart of an aluminum veneer irregular cutting trajectory planning method based on visual positioning of the present application is shown in FIG. 1, which comprises the following steps: Figure 1

[0060] The obtained aluminum veneer image is input to an anisotropic guided filter for preprocessing, the kernel function of the anisotropic guided filter being determined by the microstructure characteristics of the aluminum surface, the anisotropic guided filter performing filtering operations in multiple scale spaces respectively, and the filtering results of each scale space being fused by adaptive weights based on the edge preservation degree;

[0061] Edge enhancement processing is performed on the aluminum veneer image processed by the anisotropic guided filter, the edge enhancement processing using an edge detection operator, and the response function of the edge detection operator combining material characteristic information of the aluminum veneer;

[0062] The image features obtained by the edge enhancement processing are input to a non-uniform rational B-spline contour descriptor, the control point density of the non-uniform rational B-spline contour descriptor being in an exponential relationship with the local curvature of the aluminum veneer irregular contour, the selection of the control points being based on a saliency analysis of edge pixels, and the saliency analysis considering edge intensity, direction consistency and local structure complexity at the same time;

[0063] A feature processing network is constructed based on the output of the non-uniform rational B-spline contour descriptor, the node feature vector of the feature processing network containing image feature parameters and process parameters; and a cutting trajectory is generated based on the output of the feature processing network.

[0064] Optionally,

[0065] The obtained aluminum veneer image is input to an anisotropic guided filter for preprocessing, the kernel function of the anisotropic guided filter being determined by the microstructure characteristics of the aluminum surface, the anisotropic guided filter performing filtering operations in multiple scale spaces respectively, and the filtering results of each scale space being fused by adaptive weights based on the edge preservation degree;

[0066] ​A basic kernel function of the anisotropic guided filter is constructed, and a final kernel function is obtained by modulating the basic kernel function by a material property adaptive modulation function of the surface of the aluminum veneer, the material property adaptive modulation function including a local material uniformity term and a reflectivity gradient term, the final kernel function further including a local texture complexity modulation term, the local texture complexity modulation term being determined by a local variance and a local correlation of the aluminum veneer image.

[0067] An adaptive scale decomposition is performed on the aluminum veneer image, a scale parameter of the adaptive scale decomposition being determined by a local entropy value of the aluminum veneer image, the adaptive scale decomposition generating corresponding feature images in each scale space.

[0068] An edge response metric value is calculated for the feature image of each scale space, the edge response metric value being determined by a gradient intensity and a direction consistency of the feature image, the direction consistency being calculated by the feature images of adjacent scale spaces.

[0069] A feature fusion weight of the feature image is calculated, the feature fusion weight including an edge response weight term and a detail preservation weight term, the edge response weight term being determined by the edge response metric value, the detail preservation weight term being determined by a ratio of a Laplacian response value of the feature image to a blur metric value.

[0070] The feature fusion weight is applied to the feature image to obtain an enhanced feature image, the enhanced feature image being enhanced in details by a difference between the feature image and a feature image of an adjacent scale space of the feature image, an enhancement coefficient of the detail enhancement being proportional to the edge response weight term.

[0071] An exemplary basic kernel function of the anisotropic guided filter is constructed. The basic kernel function can adopt a Gaussian function form, having two characteristics of directionality and scale. For the basic kernel function at a pixel point (x, y), its parameters include a kernel radius r and a direction θ. In practical applications, the kernel radius r can be taken as a value between 3 and 15 pixels, and the direction θ can be uniformly sampled in a range of 0 to 180 degrees, for example, with an interval of 15 degrees, to obtain 12 basic kernel functions of directions.

[0072] The adaptive modulation function includes two key components: a local material uniformity term and a reflectivity gradient term. The local material uniformity term is measured by calculating the standard deviation of the pixel gray values in the local region centered on the pixel point (x, y). The smaller the standard deviation, the higher the local uniformity of the material, and the larger the corresponding modulation coefficient. For example, when the standard deviation of the gray scale in the local region is less than 10, the modulation coefficient can be set to 1.5; when the standard deviation is between 10 and 30, the modulation coefficient is linearly reduced to 0.8; and when the standard deviation is greater than 30, the modulation coefficient is set to 0.5. The reflectivity gradient term is determined by calculating the gradient amplitude of the local region. The larger the gradient amplitude, the more intense the reflectivity change, and the smaller the corresponding modulation coefficient. For example, when the local gradient amplitude is less than 20, the modulation coefficient is set to 1.2; when the gradient amplitude is between 20 and 50, the modulation coefficient is linearly reduced to 0.7; and when the gradient amplitude is greater than 50, the modulation coefficient is set to 0.4.

[0073] The local material uniformity term and the reflectivity gradient term are weighted and fused to obtain the material characteristic adaptive modulation function. In practical applications, the weights of the two terms can be set to 0.6 and 0.4, respectively, to balance the material uniformity and edge preservation ability. Then, the modulation function is multiplied by the basic kernel function to obtain the kernel function after preliminary modulation.

[0074] Further, a local texture complexity modulation term is introduced to fine-tune the kernel function. The local texture complexity is determined by the local variance and the local correlation of the aluminum veneer image. The local variance is obtained by calculating the variance of the pixel values in a 5x5 or 7x7 window centered on the pixel point (x, y). The local correlation is obtained by calculating the autocorrelation coefficient between adjacent pixels in the window. When the local variance is large and the local correlation is small, the region texture complexity is high, and the modulation coefficient should be small to preserve the detail information; otherwise, the modulation coefficient should be large to enhance the smoothing effect. For example, when the local variance is greater than 40 and the local correlation is less than 0.3, the local texture complexity modulation coefficient can be set to 0.7; when the local variance is less than 15 and the local correlation is greater than 0.8, the modulation coefficient can be set to 1.3; and in other cases, the modulation coefficient can be determined by linear interpolation.

[0075] The local texture complexity modulation term is multiplied by the aforementioned modulated kernel function to obtain the final anisotropic direction filter kernel function. This kernel function fully considers the material characteristics and texture characteristics of the aluminum veneer surface, and can adaptively perform targeted filtering processing on different regions.

[0076] An adaptive scale decomposition is performed on the image of the aluminum veneer. The purpose of scale decomposition is to capture the feature information of the image in different scale spaces. The local entropy value of the image of the aluminum veneer is calculated to determine the parameters of scale decomposition. The local entropy value can be measured by calculating the entropy of the pixel gray values in the local region centered at the pixel point (x, y). The greater the entropy value, the more abundant the information, and the smaller the corresponding scale parameter should be; the smaller the entropy value, the less the information, and the larger the corresponding scale parameter should be. Three to five scale levels can be set, for example, when the entropy value is higher than 4.5, the scale parameter is set to {1.0, 2.0, 3.0}; when the entropy value is between 3.0 and 4.5, the scale parameter is set to {1.5, 3.0, 4.5}; and when the entropy value is lower than 3.0, the scale parameter is set to {2.0, 4.0, 6.0}.

[0077] Using the determined scale parameters and the aforementioned constructed anisotropic steering filter kernel function, the image of the aluminum veneer is subjected to multi-scale filtering to generate feature images in multiple scale spaces. For example, the original image is filtered using three scale parameters to obtain three feature images F1, F2 and F3, wherein F1 corresponds to the smallest scale and retains the most detailed information; F3 corresponds to the largest scale and retains the most prominent structural information.

[0078] For each feature image in the scale space, an edge response metric value is calculated. The edge response metric value is determined by the gradient strength and the direction consistency of the feature image. The gradient strength can be calculated by calculating the horizontal and vertical gradients of the feature image using the Sobel operator and obtaining the gradient amplitude. The direction consistency is determined by calculating the gradient direction difference of the feature images in adjacent scale spaces. For example, for the feature image F2, the gradient direction difference with F1 and F3 can be calculated, and if the difference is small, it indicates that the edge direction at this position has high consistency. When the gradient strength is greater than 25 and the direction consistency is higher than 0.85, it can be considered that the position has a significant edge response.

[0079] Based on the edge response metric, the feature fusion weights of the feature image are calculated. The feature fusion weights include an edge response weight and a detail-preserving weight. The edge response weight is directly determined by the edge response metric; higher response metric values ​​increase the weight. The detail-preserving weight is determined by the ratio of the Laplacian response value of the feature image to the blur metric value. The Laplacian response value, calculated using the Laplacian operator, represents the second-order derivative information around the pixel. The blur metric value is determined by calculating the high-frequency component energy of the local region. A larger ratio indicates richer detail information at that location, and the larger the detail-preserving weight is. For example, when the ratio of the Laplacian response value to the blur metric value is greater than 3.0, the detail-preserving weight can be set to 1.2; when the ratio is between 1.0 and 3.0, the weight decreases linearly to 0.8; when the ratio is less than 1.0, the weight is set to 0.5. The edge response weight and the detail-preserving weight are weighted and combined to obtain the final feature fusion weight. In practical applications, the weight ratio of the two items can be adjusted according to the specific characteristics of the aluminum veneer. For example, for aluminum veneer with a relatively smooth surface, the ratio of the edge response weight item can be set to 0.7, and the ratio of the detail preservation weight item can be set to 0.3; for aluminum veneer with rich surface texture, the ratio of the two items can be adjusted to 0.4 and 0.6.

[0080] The feature fusion weights are applied to the feature image to obtain an enhanced feature image. Specifically, detail enhancement is performed by taking the difference between the feature image and the feature images of adjacent scale spaces. The enhancement coefficient is proportional to the edge response weight term. For example, for feature image F2, the difference between F2 and F3 is calculated, multiplied by the corresponding enhancement coefficient (e.g., the edge response weight term multiplied by 1.5), and then added back to F2 to obtain the enhanced feature image. The enhanced feature images of each scale space are weightedly fused according to their respective feature fusion weights to obtain the final preprocessing result.

[0081] The anisotropic guided filter preprocessing method of the present invention can effectively process the noise and interference caused by material properties in aluminum veneer images while retaining edge and detail information; it fully considers the microstructural characteristics of the aluminum surface, adopts multi-scale spatial filtering and adaptive weight fusion strategy, and significantly improves the accuracy and stability of subsequent edge detection and contour extraction.

[0082] Optional,

[0083] The construction process of the final kernel function includes:

[0084] The basic kernel function is an anisotropic Gaussian kernel function, the main direction of the anisotropic Gaussian kernel function is determined by the local gradient direction of the aluminum veneer image, and the standard deviation of the anisotropic Gaussian kernel function is determined by the local grayscale distribution of the aluminum veneer image;

[0085] The local material uniformity term in the material property adaptive modulation function is obtained by calculating the dispersion degree of the pixel gray values in the preset neighborhood, and the reflectivity gradient term in the material property adaptive modulation function is obtained by calculating the reflectivity difference of adjacent pixels in the preset neighborhood, the value range of the local material uniformity term is zero to one, and the value range of the reflectivity gradient term is zero to one;

[0086] The local variance in the local texture complexity modulation term is obtained by calculating the statistical variance of the pixel gray values in the preset neighborhood, and the local correlation in the local texture complexity modulation term is obtained by calculating the correlation coefficient of the center pixel and the surrounding pixels in the preset neighborhood;

[0087] The product of the basis kernel function and the material property adaptive modulation function is multiplied by the product of the local texture complexity modulation term as the final kernel function.

[0088] For example, the embodiment adopts an anisotropic Gaussian kernel function as the basis kernel function. The anisotropic Gaussian kernel function has a directional feature, and the main direction and the standard deviation thereof need to be adaptively determined according to the local characteristics of the aluminum veneer image. For any pixel point (x, y) in the image, the main direction of the Gaussian kernel function is determined by calculating the gradient direction in the local region centered on the point. Specifically, the Sobel operator can be used to calculate the horizontal direction gradient Gx and the vertical direction gradient Gy, and then the gradient direction angle is calculated by the arctangent function. In actual application, a local window of 7*7 or 9*9 can be selected to calculate the gradient direction, and the gradient direction in the window is weighted and averaged, and the weight can be set as a function of the gradient amplitude, so that the pixel point with large gradient amplitude contributes more to the main direction. For example, when the gradient amplitude of a certain point in the window is greater than 50, the weight can be set to 1.0; when the gradient amplitude is between 20 and 50, the weight can be linearly reduced to 0.5; and when the gradient amplitude is less than 20, the weight can be set to 0.2.

[0089] The standard deviation of the anisotropic Gaussian kernel function is determined by the local gray distribution of the aluminum veneer image. The standard deviation σ1 along the main direction and the standard deviation σ2 perpendicular to the main direction are usually different to reflect the anisotropic property of the kernel function. The two standard deviations can be determined by calculating the gray value distribution characteristics along the main direction and perpendicular to the main direction in the local region. Specifically, a plurality of points can be sampled in the main direction, and the standard deviation of the gray values of these points is calculated as the reference value of σ1; similarly, a plurality of points can be sampled perpendicular to the main direction, and the standard deviation of the gray values of these points is calculated as the reference value of σ2. In actual application, in order to enhance the edge preservation capability, σ1 is usually set to be greater than σ2, for example, σ1 can be set to be 1.5 to 2.5 times of σ2. For the region with gentle gray change, σ1 can be set to be 3 to 5, and σ2 can be set to be 1.5 to 2.5; for the region with severe gray change, σ1 can be set to be 2 to 3, and σ2 can be set to be 1 to 1.5.

[0090] After determining the principal direction and standard deviation, the anisotropic Gaussian kernel function can be constructed. For a point with pixel coordinates (i, j), its coordinates in the principal direction coordinate system relative to the center point (x, y) can be calculated, and then substituted into the Gaussian function to calculate the kernel function value. The size of the kernel function is usually an odd number, such as 7x7, 9x9, or 11x11, to ensure the symmetry of the kernel function.

[0091] The material property adaptive modulation function includes two key components: the local material uniformity term and the reflectance gradient term. The local material uniformity term reflects the uniformity of the aluminum veneer surface material, which is obtained by calculating the dispersion of the gray value of the pixels in the preset neighborhood. The dispersion can be measured by the coefficient of variation, which is the ratio of the standard deviation to the mean. In order to map the coefficient of variation to the range of 0 to 1, an exponential decay function can be used for conversion. For example, when the coefficient of variation is 0, the local material uniformity term takes the value of 1; when the coefficient of variation increases, the local material uniformity term decays exponentially. In practical applications, a coefficient of variation threshold can be set, for example, when the coefficient of variation is greater than 0.5, the local material uniformity term takes the value of 0.1; when the coefficient of variation is between 0 and 0.5, the local material uniformity term can decay from 1 to 0.1 according to the exponential function.

[0092] The reflectance gradient term is obtained by calculating the reflectance difference of adjacent pixels in the preset neighborhood, reflecting the degree of change of the reflectance of the aluminum veneer surface. The gradient operator can be used to calculate the reflectance gradient in the local area, and then the gradient value is mapped to the range of 0 to 1 by a normalization function. The normalization function can use the Sigmoid function, so that when the gradient value is small, the reflectance gradient term is close to 1; when the gradient value is large, the reflectance gradient term is close to 0. In practical applications, a gradient threshold can be set, for example, when the gradient value is less than 10, the reflectance gradient term takes a value greater than 0.9; when the gradient value is greater than 50, the reflectance gradient term takes a value less than 0.1; when the gradient value is between 10 and 50, the reflectance gradient term smoothly transitions from 0.9 to 0.1 according to the Sigmoid function. The local material uniformity term and the reflectance gradient term are combined by weighting to obtain the material property adaptive modulation function. The combination weight can be adjusted according to the specific application scenario, for example, for an aluminum veneer with smooth surface but strong reflection, the weight of the local material uniformity term can be set to 0.3, and the weight of the reflectance gradient term can be set to 0.7; for an aluminum veneer with rough surface but weak reflection, the weights of the two terms can be set to 0.7 and 0.3, respectively.

[0093] The local texture complexity modulation term is determined by the local variance and the local correlation, and is used to adjust the degree of response of the kernel function to the texture details. The local variance is obtained by calculating the statistical variance of the gray values of the pixels in a preset neighborhood, and reflects the intensity of the gray variation in the local region. In order to adapt to images of different intensity levels, the statistical variance can be divided by the square of the mean value of the local region to obtain the normalized local variance. In practical applications, a local window of 5x5 or 7x7 can be selected to calculate the statistical variance, and a threshold range can be set, for example, when the normalized local variance is less than 0.01, the region texture is considered simple; when the normalized local variance is greater than 0.1, the region texture is considered complex; when the normalized local variance is between 0.01 and 0.1, the region texture complexity is moderate.

[0094] The local correlation is obtained by calculating the correlation coefficient of the center pixel and the surrounding pixels in a preset neighborhood, and reflects the structure of the local region texture. The correlation coefficient can be measured by calculating the correlation of the gray values of the center pixel and its four-neighborhood or eight-neighborhood pixels. The correlation coefficient close to 1 indicates that the local region has strong structure, and the correlation coefficient close to 0 indicates that the local region texture is random. In practical applications, the average correlation coefficient of the center pixel and its eight-neighborhood pixels can be calculated as a measure of local correlation. For example, when the average correlation coefficient is greater than 0.8, the local region is considered to have strong structure; when the average correlation coefficient is less than 0.3, the local region texture is considered random; when the average correlation coefficient is between 0.3 and 0.8, the local region structure is moderate.

[0095] Based on the local variance and the local correlation, the local texture complexity modulation term is constructed. When the local variance is large and the local correlation is small, it indicates that the region contains complex non-structural texture, at this time the modulation term should take a smaller value to preserve the texture details; when the local variance is small and the local correlation is large, it indicates that the region contains simple structural texture, at this time the modulation term can take a larger value to enhance the smoothing effect. Specifically, the local texture complexity modulation term can be designed as a function of the local variance and the local correlation. For example, when the normalized local variance is less than 0.01 and the average correlation coefficient is greater than 0.8, the modulation term can be set to 1.5; when the normalized local variance is greater than 0.1 and the average correlation coefficient is less than 0.3, the modulation term can be set to 0.5; otherwise, the modulation term can be determined by two-dimensional interpolation.

[0096] The product of the basic kernel function and the material property adaptive modulation function is multiplied by the product of the local texture complexity modulation term to obtain the final kernel function. Specifically, for each element in the kernel function, the basic kernel function value is multiplied by the material property adaptive modulation function value, and then multiplied by the local texture complexity modulation term value to obtain the final kernel function value. In order to maintain the normalization characteristics of the kernel function, the final kernel function can be normalized so that the sum of all elements is 1.

[0097] The kernel function constructed by the present application fully considers the characteristics of the aluminum veneer image, and can adaptively adjust the filtering parameters according to the material characteristics, reflection characteristics and texture characteristics of the aluminum material surface. While retaining the edge and structure information of the aluminum veneer, the kernel function effectively suppresses noise and interference, and improves the accuracy and stability of subsequent edge detection. Compared with the traditional isotropic filter or fixed-parameter anisotropic filter, the kernel function constructed by the present application has stronger adaptability and pertinence, and can better process the complex texture and reflection characteristics in the aluminum veneer image, thereby providing a high-quality image basis for aluminum veneer irregular cutting trajectory planning.

[0098] Optionally,

[0099] An edge enhancement process is performed on the aluminum veneer image processed by the anisotropic guided filter, and the edge enhancement process adopts an edge detection operator, and the step of combining the material characteristic information of the aluminum veneer into the response function of the edge detection operator includes:

[0100] The width of the thermal deformation zone of the aluminum veneer at a specified temperature is obtained, and the convolution kernel weight of the standard Sobel operator is modulated based on the width of the thermal deformation zone to obtain an improved Sobel operator, and the convolution kernel weight of the improved Sobel operator is positively correlated with the width of the thermal deformation zone.

[0101] A primary direction edge detection operator and a secondary direction edge detection operator are constructed; the response value of the primary direction edge detection operator is determined by a local gradient intensity and an edge continuity, the local gradient intensity is obtained by calculating the sum of squares of horizontal and vertical gradients of the image, and the edge continuity is obtained by calculating the deviation degree of the local gradient direction from the primary direction; the response value of the secondary direction edge detection operator is determined by a local texture directionality and an edge sharpness, the local texture directionality is obtained by calculating the normalized difference of the eigenvalues of the structure tensor, and the edge sharpness is obtained by calculating a nonlinear mapping of the local gradient intensity;

[0102] A local density gradient value of the aluminum veneer is obtained, the response value of the primary direction edge detection operator and the response value of the secondary direction edge detection operator are fused by weighting, and the fusion result is modulated by the local density gradient value to obtain an edge response image, wherein the weight of the weighted fusion is related to the response value of the primary direction edge detection operator and the secondary direction edge detection operator, and the intensity of the modulation is proportional to the amplitude of the local density gradient value; the local entropy value and the local gradient variance of the edge response image are calculated, an adaptive threshold value is determined based on the local entropy value and the local gradient variance, the adaptive threshold value increases with the increase of the local entropy value and the local gradient variance, and the edge response image is adaptively threshold segmented to obtain a final edge enhancement result.

[0103] For example, the width of the thermal deformation zone of the aluminum veneer at a specified temperature is obtained. The aluminum veneer will produce thermal deformation during cutting, resulting in a certain width of the heat-affected zone at the cutting edge. The width of the thermal deformation zone is closely related to the material and thickness of the aluminum plate and the cutting temperature. In practical applications, the width of the thermal deformation zone of different aluminum alloy materials at different temperatures can be obtained by experimental measurement or material database query. For example, for a common 5052 aluminum alloy, the width of the thermal deformation zone is about 0.6 mm at a cutting temperature of 300°C and a thickness of 3 mm; for a 6061 aluminum alloy, the width of the thermal deformation zone is about 0.8 mm under the same conditions; and for a 7075 aluminum alloy, the width of the thermal deformation zone is about 0.5 mm under the same conditions. Convert the width of the thermal deformation zone to image pixel units, assuming an image resolution of 0.1 mm / pixel, then the above thermal deformation zone widths correspond to 6 pixels, 8 pixels and 5 pixels, respectively.

[0104] The kernel weight of the standard Sobel operator is modulated based on the width of the thermal deformation zone to obtain an improved Sobel operator. The standard Sobel operator is a 3x3 convolution kernel, including two kernels in the horizontal and vertical directions. In the modulation process, the structure of the Sobel operator is kept unchanged, but the weight values are adjusted. Specifically, the weight values of the standard Sobel operator are multiplied by a modulation coefficient, which is positively related to the width of the thermal deformation zone. For example, the modulation coefficient can be set as 1+0.05x the width of the thermal deformation zone (in pixel units). For the above three types of aluminum alloys, the modulation coefficients are 1.3, 1.4 and 1.25, respectively. After applying the modulation coefficient, "1" in the standard Sobel operator becomes "1.3", "1.4" or "1.25", "2" becomes "2.6", "2.8" or "2.5", and "0" remains unchanged. The modulated Sobel operator corresponds to the characteristics of the edge of the thermal deformation zone and can more accurately detect the edge of the aluminum veneer.

[0105] The main direction edge detection operator focuses on detecting the main edge in the image, and its response value is determined by the local gradient intensity and the edge continuity. The local gradient intensity is obtained by calculating the sum of the squares of the horizontal and vertical gradients of the image. Specifically, the improved Sobel operator is used to calculate the horizontal gradient Gx and the vertical gradient Gy, and then the square root of the sum of the squares is calculated as the gradient intensity G. The edge continuity is obtained by calculating the deviation of the local gradient direction from the main direction. The gradient direction can be obtained by calculating the ratio of Gy and Gx using the arctangent function. The main direction can be obtained by calculating the histogram of the gradient direction in the local area, and taking the direction with the highest frequency in the histogram as the main direction. The deviation can be obtained by calculating the cosine value of the angle between the local gradient direction and the main direction. The smaller the angle, the closer the cosine value to 1, indicating better edge continuity.

[0106] For example, for a certain pixel point, if the gradient intensity G is 80 and the angle between the local gradient direction and the main direction is 15 degrees, the cosine value is approximately 0.966, indicating good edge continuity. At this time, the response value of the main direction edge detection operator can be set as the product of the gradient intensity and the edge continuity, that is, 80 x 0.966 ≈ 77.28. If the angle increases to 45 degrees, the cosine value decreases to 0.707, and the response value decreases to 80 x 0.707 ≈ 56.56, indicating that the edge continuity decreases.

[0107] The secondary direction edge detection operator focuses on detecting secondary edges and texture features in the image, and its response value is determined by local texture directionality and edge sharpness. Local texture directionality is obtained by calculating the normalized difference of eigenvalues of the structure tensor. The structure tensor can be obtained by calculating the average of the outer product of gradients in the local region, and then solving the eigenvalues λ1 and λ2 (λ1 ≥ λ2 ≥ 0). The normalized difference can be expressed as (λ1-λ2) / (λ1+λ2+ε), where ε is a small positive number to prevent the denominator from being zero. The closer this value is to 1, the more obvious the local texture directionality is; the closer it is to 0, the more isotropic the local texture is.

[0108] Edge sharpness is obtained by calculating the nonlinear mapping of local gradient intensity. The nonlinear mapping can use the S-shaped function, which is close to 0 when the gradient intensity is below a certain threshold T1, close to 1 when the gradient intensity is above a certain threshold T2, and smoothly transitions when the gradient intensity is between T1 and T2. For example, set T1 = 20 and T2 = 60, for gradient intensity G = 40, the mapping value is approximately 0.5; for G = 10, the mapping value is close to 0; for G = 80, the mapping value is close to 1.

[0109] The product of local texture directionality and edge sharpness is taken as the response value of the secondary direction edge detection operator. For example, if the local texture directionality is 0.8 and the edge sharpness is 0.7, the response value of the secondary direction edge detection operator is 0.8 x 0.7 = 0.56.

[0110] Obtain the local density gradient value of the aluminum veneer. The density of the aluminum veneer may have local changes, which will affect the accuracy of edge detection. The density distribution information can be obtained through X-ray absorption images or ultrasonic detection data of the aluminum veneer, and then the spatial gradient of the density is calculated. In the absence of professional equipment, the density distribution can be estimated according to the material and processing technology of the aluminum veneer. For example, for cold-rolled aluminum plate, the density distribution is relatively uniform, and the local density gradient value can be assumed to be small, such as 0.1-0.2; for cast aluminum plate, the density distribution may not be uniform, and the local density gradient value may be larger, such as 0.3-0.5.

[0111] The response value of the main direction edge detection operator and the response value of the secondary direction edge detection operator are fused by weighting, and the weight of the weighted fusion can be adaptively determined according to the relative size of the response value. For example, when the main direction response value is much larger than the secondary direction response value, the main direction weight can be set to 0.8, and the secondary direction weight is 0.2; when they are close, they can be set to 0.6 and 0.4 respectively; when the secondary direction response value is much larger than the main direction response value, they can be set to 0.3 and 0.7 respectively. In the modulation process, the fusion result can be multiplied by (1+α×local density gradient value), wherein α is a modulation coefficient, which can be set to 2-5. For example, if the fusion result is 70, the local density gradient value is 0.3, and α=3, then the modulated result is 70×(1+3×0.3)=70×1.9=133.

[0112] The local entropy value and the local gradient variance of the edge response image are calculated, and the adaptive threshold is determined based on the two indexes. The local entropy value reflects the information amount of the local region of the image, which can be obtained by calculating the probability distribution entropy of the gray value in the local window centered on the pixel point. The local gradient variance reflects the dispersion degree of the gradient distribution, which can be obtained by calculating the statistical variance of the gradient value in the local window. The adaptive threshold can be set as the sum of the basic threshold and the adjustment term, and the adjustment term is proportional to the local entropy value and the local gradient variance. For example, the basic threshold can be set to 30, and the adjustment term can be set to 2×local entropy value+0.05×local gradient variance. For a region with a local entropy value of 3 and a local gradient variance of 200, the adaptive threshold is 30+2×3+0.05×200=30+6+10=46; for a region with a local entropy value of 1.5 and a local gradient variance of 100, the adaptive threshold is 30+2×1.5+0.05×100=30+3+5=38.

[0113] The edge response image is subjected to adaptive threshold segmentation to obtain the final edge enhancement result. Specifically, for each pixel point in the image, if its edge response value is greater than the corresponding adaptive threshold, the point is marked as an edge point; otherwise, the point is marked as a non-edge point. In order to improve the continuity of the edge, morphological processing such as thinning, connecting broken points and the like can be performed on the preliminary segmentation result.

[0114] The present application combines the physical characteristics information of the aluminum single plate, such as the thermal deformation characteristics and the material density distribution, to construct a special edge detection operator, and designs an adaptive threshold segmentation strategy. Compared with the traditional edge detection method, this method can more accurately identify the edge of the aluminum single plate, especially in the thermal deformation area and the material density change area, significantly improving the accuracy and robustness of edge detection. At the same time, the fusion strategy of the main and secondary direction edge detection operators effectively utilizes the various feature information in the image, improving the integrity and continuity of the edge.

[0115] Optionally,

[0116] inputting the image features obtained by the edge enhancement processing into a non-uniform rational B-spline contour descriptor, a control point density of the non-uniform rational B-spline contour descriptor being in an exponential relationship with a local curvature of the aluminum veneer irregular contour, the selection of the control points being based on a saliency analysis of the edge pixels, the saliency analysis considering the edge strength, the direction consistency and the local structure complexity simultaneously, the saliency analysis including:

[0117] inputting the image features obtained by the edge enhancement processing into a non-uniform rational B-spline contour descriptor, performing a saliency analysis on the image features, the saliency analysis including calculating the edge strength, the direction consistency and the local structure complexity, the edge strength being obtained by calculating the image gradient magnitude, the direction consistency being obtained by calculating the cosine similarity of the gradient directions in the local neighborhood, the local structure complexity being obtained by calculating the quadratic norm of the principal curvatures;

[0118] performing a weighted fusion of the edge strength, the direction consistency and the local structure complexity to obtain a comprehensive saliency measure, the comprehensive saliency measure being used to determine a control point candidate set, the saliency measure of the points in the control point candidate set being greater than a preset saliency threshold;

[0119] calculating a local curvature value of the aluminum veneer irregular contour, constructing a control point density function based on the local curvature value, the control point density function adopting an exponential mapping form, an output value of the control point density function being in an exponential relationship with an absolute value of the local curvature value, performing a screening on the points in the control point candidate set based on the control point density function, a Euclidean distance between any two retained control points being not less than a minimum value of the reciprocal of the control point density function at the two points;

[0120] constructing a non-uniform rational B-spline curve based on the retained control points, a node vector of the non-uniform rational B-spline curve being generated by a cumulative chord length parameterization method, a basis function of the non-uniform rational B-spline curve adopting a recursively defined p-th order basis function, obtaining the irregular contour feature of the aluminum veneer.

[0121] For example, input the image features obtained by the edge enhancement processing into a non-uniform rational B-spline contour descriptor, and perform a saliency analysis on the image features. The saliency analysis includes calculating three key indicators, i.e., the edge strength, the direction consistency and the local structure complexity. The edge strength is obtained by calculating the image gradient magnitude. In actual implementation, the Sobel operator can be used to calculate the horizontal direction gradient and the vertical direction gradient, and then the module length of the gradient vector is calculated as the edge strength. For an 8-bit grayscale image, the edge strength usually ranges from 0 to 255. In actual application, the gradient magnitude of the edge region of the aluminum veneer is usually large, for example, at the obvious edge, the gradient magnitude can be more than 150; while in the non-edge region, the gradient magnitude is usually less than 30.

[0122] Directional consistency is achieved by calculating the cosine similarity of gradient directions within a local neighborhood. For each pixel in the image, a local window (e.g., 7×7 or 9×9 pixels) centered at that pixel is selected. The gradient directions of all pixels within the window are calculated, and the average cosine similarity between these gradient directions and the gradient direction at the center point is then calculated. Cosine similarity ranges from -1 to 1, with values ​​closer to 1 indicating higher directional consistency. Directional consistency is typically high at regular edges of aluminum veneers, with cosine similarities potentially exceeding 0.8. However, in areas with complex textures or noise, directional consistency is lower, with cosine similarities potentially less than 0.4.

[0123] The local structural complexity is obtained by calculating the quadratic norm of the principal curvature. For each pixel in the image, the Hessian matrix of the point is first calculated. The Hessian matrix describes the second-order derivative information of the image at that point. Then the eigenvalues ​​of the Hessian matrix are solved, which correspond to the principal curvature at that point. The quadratic norm of the principal curvature can be obtained by calculating the square root of the sum of the squares of the eigenvalues, which reflects the complexity of the local structure. In smooth areas, the quadratic norm of the principal curvature is close to 0; at simple edges, the quadratic norm of the principal curvature presents a medium value; at corners or complex intersections, the quadratic norm of the principal curvature is larger. For example, at the straight edge of an aluminum veneer, the quadratic norm of the principal curvature may be between 5 and 15; at corners where the curvature changes dramatically, the value may reach more than 30.

[0124] Edge strength, directional consistency, and local structural complexity are weighted and fused. During the fusion process, the weights of each indicator can be adjusted according to the specific application scenario. For example, for aluminum veneer with clear edges, the weight of edge strength can be set to 0.5, the weight of directional consistency to 0.3, and the weight of local structural complexity to 0.2. For aluminum veneer with blurred edges or a large amount of texture, the weights of the three can be adjusted to 0.4, 0.4, and 0.2 respectively. Before fusion, each indicator needs to be normalized to ensure that its value range is consistent. For example, edge strength can be normalized by dividing it by 255; directional consistency can be mapped to the range of 0 to 1; and local structural complexity can be mapped to the range of 0 to 1 using a nonlinear function (such as the Sigmoid function).

[0125] The control point candidate set is determined based on the integrated saliency measure value. A saliency threshold is set, and only the points with saliency measure value greater than the threshold are reserved as control point candidates. The saliency threshold is related to the image quality and edge sharpness, and can be set between 0.6 and 0.8. For example, for high-quality images with sharp edges, the threshold can be set to 0.75; for low-quality images with blurred edges, the threshold can be reduced to 0.65 to ensure a sufficient number of candidate points. In addition, to reduce the amount of calculation, the edge pixels can be preliminarily sampled, such as selecting one point every 3 to 5 pixels for saliency analysis.

[0126] The local curvature value of the irregular profile of the aluminum veneer is calculated. For a discrete set of edge points, the curvature can be estimated by a method of locally fitting a circle. Specifically, for each point on the edge, a number of points near the point (such as 5 points before and after) are selected, and a circle is fitted using the least squares method, and the reciprocal of the radius of the circle is the curvature estimate value at the point. The sign of the curvature represents the concave-convex of the curve, and the absolute value of the curvature represents the size of the curvature. At the straight edge of the aluminum veneer, the curvature is close to 0; at the gentle bend, the absolute value of the curvature is small, such as 0.01 to 0.05; at the sharp bend, the absolute value of the curvature is large, and can reach more than 0.1.

[0127] The control point density function is constructed based on the local curvature value. The control point density function adopts an exponential mapping form, representing the number of control points that should be distributed per unit arc length. Specifically, the control point density function can be designed in the form of an exponential function of the absolute value of the curvature, i.e., the control point density is equal to the base density multiplied by the a-th power of the absolute value of the curvature plus the base density, where a is an exponential parameter greater than 0, and the base density is a constant that ensures the minimum control point density. In practical applications, the base density can be set to 0.05 (indicating that on a straight line segment with a curvature of 0, an average of one control point is placed every 20 units of length), and the exponential parameter a is set to between 0.5 and 1.5. For example, when a = 1, in a region with an absolute value of the curvature of 0.01, the control point density is 0.05 x (1 + 0.01) = 0.0505, indicating that an average of one control point is placed every 19.8 units of length; in a region with an absolute value of the curvature of 0.1, the control point density is 0.05 x (1 + 0.1) = 0.055, indicating that an average of one control point is placed every 18.2 units of length; in a region with an absolute value of the curvature of 0.5, the control point density is 0.05 x (1 + 0.5) = 0.075, indicating that an average of one control point is placed every 13.3 units of length.

[0128] The points in the control point candidate set are screened based on a control point density function. The screening principle is that the Euclidean distance between any two retained control points is not less than the minimum value of the reciprocal of the control point density function at the two points. The reciprocal of the control point density function represents the ideal distance between adjacent control points. For example, for a region with a control point density of 0.05, the reciprocal of the control point density function is 20, indicating that the ideal distance between adjacent control points is 20 units of length. The screening process can use a greedy strategy: first, sort all candidate points in descending order of significance measure value, then start from the most significant point, and check each candidate point in turn. If the distance between the point and the selected control points meets the above condition, the point is added to the control point set, otherwise it is discarded.

[0129] A non-uniform rational B-spline curve is constructed based on the retained control points. First, the order p of the B-spline curve is determined, which can usually be selected as a 3-order (quartic) or 4-order (quintic) B-spline to balance the smoothness and local controllability of the curve. Then, a node vector is generated by the cumulative chord length parameterization method. Specifically, the Euclidean distances between adjacent control points are calculated, the distances are accumulated to obtain chord length parameters, and then the chord length parameters are normalized to generate the node vector. For a p-order B-spline, p+1 nodes are repeated at both ends of the node vector (usually 0 and 1), and the internal nodes are determined according to the normalized chord length parameters. A p-order B-spline basis function is constructed. The p-order B-spline basis function is defined recursively, starting from the 0-order basis function, and gradually constructing higher-order basis functions. The 0-order basis function is a piecewise constant function, taking the value 1 in the corresponding node interval and 0 in other intervals. Higher-order basis functions are obtained by linear combination of lower-order basis functions, and the combination coefficients are related to the parameter values and node values. For each control point, a corresponding B-spline basis function is assigned, and the sum of the product of the control point coordinates and the basis functions is obtained to obtain a non-uniform B-spline curve.

[0130] In order to handle the sharp corners or high curvature regions that may exist in the aluminum veneer irregular profile, a rational B-spline can be introduced, i.e. a weight value is assigned to each control point. The weight value can be set according to the curvature and significance at the control point, for example, control points in high curvature regions can be assigned a larger weight, such as 1.5 to 2.5; control points in low curvature regions can be assigned a standard weight of 1.0. Finally, a complete non-uniform rational B-spline curve is constructed by the control point coordinates, weight values, B-spline basis functions and node vector, accurately describing the irregular profile characteristics of the aluminum veneer.

[0131] The non-uniform rational B-spline contour description method provided by the application realizes adaptive distribution of control points, significantly reduces the number of control points while ensuring contour description accuracy. The method is particularly suitable for describing the special-shaped contour of an aluminum veneer, increases the control point density in areas with sharp curvature changes, and reduces the control point density in areas with flat curvature, so that the generated contour curve is both accurate and smooth. Compared with the traditional uniform sampling method, the non-uniform rational B-spline curve constructed by the method has better local controllability and global smoothness.

[0132] Optionally,

[0133] A feature processing network is constructed based on the output of the non-uniform rational B-spline contour descriptor, and a node feature vector of the feature processing network includes image feature parameters and process parameters; the step of generating a cutting trajectory based on the output of the feature processing network includes:

[0134] A feature processing network is constructed based on the output of the non-uniform rational B-spline contour descriptor, and a node feature vector of the feature processing network includes control point feature parameters, curve feature parameters and process parameters, the control point feature parameters include control point coordinates, weight values, local curvature values and control point density values, the curve feature parameters include curve positions, curve derivatives, normal vectors and tangent vectors, and the process parameters include plate thickness, elastic modulus, yield strength, thermal expansion coefficient, cutting speed, cutting power, feed rate and slit width;

[0135] The node feature vectors are subjected to multi-scale feature aggregation to obtain fused features, a feature propagation mechanism is constructed based on the fused features, the feature propagation mechanism includes a message passing function between nodes and a feature update rule, the message passing function calculates propagation information between nodes based on the features of adjacent nodes and edge features, and the feature update rule updates the node features based on the node features and the propagation information of all adjacent nodes;

[0136] The updated node features are subjected to nonlinear mapping to obtain control parameters of the cutting trajectory, and the control parameters include a sampling density coefficient and an offset compensation amount;

[0137] Cutting trajectory points and process parameters are generated based on the control parameters, the sampling density of the cutting trajectory points has an exponential relationship with the local curvature of the curve, the coordinates of the cutting trajectory points are obtained by superimposing the curve position and the normal vector offset, the cutting speed has an inverse relationship with the local curvature of the curve, and the cutting power has a linear combination relationship with the plate thickness and the cutting speed;

[0138] The cutting trajectory is subjected to optimization and smoothing processing, the curvature change rate of the cutting trajectory is limited to be not greater than a preset maximum curvature change rate, and the acceleration of the cutting speed is limited to be not greater than a preset maximum acceleration, so as to obtain a final cutting trajectory satisfying a continuity constraint.

[0139] For example, a feature processing network is constructed based on the output of the non-uniform rational B-spline profile descriptor. The feature processing network adopts a graph structure, where nodes correspond to key points on the profile and edges correspond to the connection relationship between nodes. Each node contains a rich feature vector composed of three types of parameters: control point feature parameters, curve feature parameters, and process parameters. Control point feature parameters include control point coordinates, weight values, local curvature values, and control point density values. Control point coordinates directly use the control point coordinates of the non-uniform rational B-spline curve, weight values correspond to the control point weights in the rational B-spline, local curvature values are calculated by the second derivative of the curve at the corresponding parameter position, and control point density values are obtained from the control point density function of the profile descriptor. For example, for a control point, its two-dimensional coordinates are (120.5, 85.3), the weight value is 1.2, the local curvature value is 0.08, and the control point density value is 0.06.

[0140] Curve feature parameters include curve position, curve derivative, normal vector, and tangent vector. Curve position is the point coordinate of the B-spline curve at the corresponding parameter, curve derivative is the first derivative of the curve at that point, tangent vector is the normalized vector of the first derivative, and normal vector is the unit vector obtained by rotating the tangent vector counterclockwise by 90 degrees. For example, the curve position of a certain point is (150.2, 90.5), the curve derivative is (0.8, 0.6), the tangent vector is (0.8, 0.6) divided by the vector modulus to get (0.8, 0.6) / 1.0 = about (0.8, 0.6), and the normal vector is (-0.6, 0.8).

[0141] Process parameters include sheet thickness, elastic modulus, yield strength, thermal expansion coefficient, cutting speed, cutting power, feed rate, and kerf width. Sheet thickness, elastic modulus, yield strength, and thermal expansion coefficient are inherent physical properties of aluminum veneer, which can be obtained by looking up the table according to the aluminum plate model. For example, for 5052 aluminum alloy, the thickness is 3mm, the elastic modulus is 70GPa, the yield strength is 193MPa, and the thermal expansion coefficient is 23.8x10^-6 / K. Cutting speed, cutting power, feed rate, and kerf width are process parameters of the cutting process, and the initial values can be set as empirical values, such as cutting speed of 5mm / s, cutting power of 2000W, feed rate of 300mm / min, and kerf width of 0.2mm.

[0142] The node feature vector is subjected to multi-scale feature aggregation, which is realized through feature transformation and weighted combination. First, the original feature vector is transformed using linear mapping matrices of different scales to obtain feature representations of multiple scales. For example, three scales of feature transformation can be designed to capture local details, medium-scale structures, and global information, respectively. For a 128-dimensional original feature vector, three different linear mapping matrices can be used to convert it into a 64-dimensional feature, each mapping matrix capturing information of different scales. Then, the importance weights of each scale feature are calculated, which can be determined by an attention mechanism or learnable parameters. For example, for a certain node, the weights of the three scales may be [0.3, 0.5, 0.2], indicating that the medium-scale information is the most important. Finally, the scale features are weighted and combined according to the weights to obtain the fused features.

[0143] Based on the fused features, a feature propagation mechanism is constructed, including an inter-node message passing function and a feature update rule. The message passing function is responsible for calculating the information flow between nodes, based on the features of adjacent nodes and edge features to calculate the propagation information. Specifically, for adjacent nodes i and j, the propagation information from node i to node j can be calculated based on the features of node i, the features of node j, and the edge features connecting the two nodes. For example, the fused features of node i, the fused features of node j, and the edge features can be connected into a large vector, and then transformed through a multi-layer perceptron network to obtain the propagation information. For a pair of adjacent nodes, if the fused features of node i are 64-dimensional vectors, the fused features of node j are also 64-dimensional vectors, and the edge features are 32-dimensional vectors, then the large vector after connection is 160-dimensional, and after multi-layer perceptron network transformation, a 32-dimensional propagation information vector can be obtained.

[0144] The feature update rule is responsible for updating the node features based on the node's own features and the propagation information of all adjacent nodes. For node j, its updated features can be obtained by combining its own fused features and the propagation information from all adjacent nodes. The combination method can use weighted summation, and the weights can be calculated by an attention mechanism. For example, for node j with three adjacent nodes, the weights of the propagation information from these nodes may be [0.4, 0.3, 0.3]. The update process can be iterated multiple times to achieve sufficient propagation of information. For example, the number of propagation iterations can be set to 3, and after each iteration, the node features become richer, containing a wider range of context information.

[0145] Nonlinear mapping is performed on the updated node features to obtain the control parameters of the cutting trajectory. The control parameters include the sampling density coefficient and the offset compensation. Nonlinear mapping can be achieved through a multi-layer neural network, mapping high-dimensional node features to low-dimensional control parameters. For example, a three-layer fully connected network can be used, with the input being the 128-dimensional updated node features, the hidden layers being 64 and 32 dimensions respectively, and the output being the sampling density coefficient and the offset compensation, a total of 2 dimensions. The sampling density coefficient determines the density of the cutting trajectory points and is usually a positive number, such as 1.2, which indicates a 20% increase over the baseline density. The offset compensation determines the offset distance of the cutting trajectory relative to the original contour and can be positive or negative, such as 0.5mm, which indicates an outward offset of 0.5mm, and -0.3mm, which indicates an inward offset of 0.3mm.

[0146] The cutting path points and process parameters are generated based on the control parameters. The sampling density of the cutting path points is exponentially related to the local curvature of the curve, which can be expressed as the basic sampling density multiplied by the sampling density coefficient multiplied by the power of the absolute value of the curvature plus the basic sampling density. For example, if the basic sampling density is 0.5 points per mm, the sampling density coefficient is 1.2, and the curvature power is 0.7, then for an area with an absolute curvature value of 0.1, the sampling density is 0.5×1.2×(1+0.1 0.7 )≈0.5×1.2×1.07≈0.64 points / mm, which is equivalent to sampling one point every 1.56 mm; for the area with an absolute value of curvature of 0.5, the sampling density is 0.5×1.2×(1+0.5 0.7 )≈0.5×1.2×1.41≈0.85 points / mm, which is equivalent to sampling one point every 1.18 mm.

[0147] The coordinates of a cutting path point are calculated by superimposing the normal offset on the curve. The offset distance is equal to the offset compensation, and the direction is the normal direction. For example, if a point on the curve is located at (150.2, 90.5), the normal is (-0.6, 0.8), and the offset is 0.5 mm, the coordinates of the cutting path point are (150.2, 90.5) + 0.5 × (-0.6, 0.8) = (150.2 - 0.3, 90.5 + 0.4) = (149.9, 90.9).

[0148] The cutting speed is inversely proportional to the local curvature of the curve and can be expressed as the base cutting speed divided by (1 plus the absolute value of the curvature multiplied by the speed coefficient). For example, if the base cutting speed is 5 mm / s and the speed coefficient is 10, then for an area with an absolute curvature value of 0.1, the cutting speed is 5 / (1+0.1×10)=5 / 2=2.5 mm / s; for an area with an absolute curvature value of 0.5, the cutting speed is 5 / (1+0.5×10)=5 / 6≈0.83 mm / s.

[0149] The cutting power is in linear combination with the plate thickness and the cutting speed, which can be expressed as the basic power plus the thickness coefficient multiplied by the plate thickness plus the speed coefficient multiplied by the cutting speed. For example, if the basic power is 1500W, the thickness coefficient is 200W / mm, and the speed coefficient is 50W / (mm / s), for a thickness of 3mm and a cutting speed of 2.5mm / s, the cutting power is 1500+200*3+50*2.5=1500+600+125=2225W; for a thickness of 3mm and a cutting speed of 0.83mm / s, the cutting power is 1500+200*3+50*0.83=1500+600+41.5≈2142W.

[0150] The cutting trajectory is optimized and smoothed. The curvature change rate of the cutting trajectory is limited to be not greater than a preset maximum curvature change rate, such as 0.02 / mm, which means that the curvature change per millimeter is not greater than 0.02. In specific implementation, the curvature change rate of each point on the cutting trajectory is detected, and if the curvature change rate exceeds the threshold, the curvature change rate is reduced by locally adjusting the point coordinate. At the same time, the acceleration of the cutting speed is limited to be not greater than a preset maximum acceleration, such as 0.5mm / s 2 , which means that the cutting speed change per second is not greater than 0.5mm / s. The implementation method is to calculate the speed change between adjacent sampling points, and if the speed change divided by the time interval is greater than the maximum acceleration, the cutting speed is adjusted to meet the acceleration constraint. Through these optimization processes, the final cutting trajectory that meets the continuity constraint is obtained.

[0151] The present application establishes an end-to-end mapping relationship from contour description to cutting trajectory by fusing geometric features and process parameters; fully considers the material properties of aluminum veneer and the cutting process requirements, and adaptively adjusts the key parameters such as sampling density, offset compensation, cutting speed and power, to realize high-precision generation of cutting trajectory. Especially in the area with sharp curvature change, through the exponential relationship of sampling density and the inverse relationship of cutting speed adjustment, the problem of overcut or undercut easily produced by traditional methods is effectively solved, while the cutting quality and efficiency are guaranteed. The optimization and smoothing process further improves the continuity and smoothness of the trajectory, meets the motion control requirements of high-precision cutting equipment, and provides a complete technical solution for aluminum veneer cutting.

[0152] Optionally,

[0153] The node feature vector is aggregated to obtain a fusion feature, and a feature propagation mechanism is constructed based on the fusion feature, the feature propagation mechanism including a message passing function between nodes and a feature update rule, the message passing function calculating propagation information between nodes based on features of adjacent nodes and edge features, and the feature update rule updating a node feature based on a node feature itself and propagation information of all adjacent nodes, and the step includes:

[0154] inputting the node feature vector into a plurality of scale transformation matrices for feature decomposition to obtain a plurality of scale decomposition features, calculating an importance weight of each scale decomposition feature by using a multi-layer perception, and obtaining a fusion feature by weighting and fusing the plurality of scale decomposition features based on the importance weight;

[0155] calculating an inter-node attention score based on the fusion feature by a nonlinear transformation;

[0156] constructing an edge feature enhanced attention mechanism, which inputs the fusion feature of adjacent nodes, edge feature and inter-node attention score into a nonlinear transformation function after splicing to obtain an edge feature attention weight;

[0157] constructing a multi-head attention message passing mechanism based on the edge feature attention weight, each attention head corresponding to a feature transformation matrix, multiplying the fusion feature of adjacent nodes by the feature transformation matrix to obtain an attention message, and weighting and aggregating the attention messages of all attention heads to obtain an aggregated message of the node;

[0158] constructing a gating update mechanism, which inputs the fusion feature of the node and the aggregated message into a gating unit to obtain an update gate information, selectively updates the node feature based on the update gate information, and performs residual connection and normalization processing on the updated node feature and the original fusion feature to obtain a final node feature;

[0159] adopting a dynamic optimization strategy for the feature propagation process, and performing norm constraint on the gradient value.

[0160] For example, the node feature vector is input into a plurality of scale transformation matrices for feature decomposition to obtain a plurality of scale decomposition features. The node feature vector contains control point feature parameters, curve feature parameters and process parameters, and the dimension is usually high. For example, for a node feature vector with a dimension of 128, three transformation matrices of different scales can be designed to focus on local details, medium-range structures and global information. Specifically, the first transformation matrix can be designed as a 128x64 matrix to extract local detail features; the second transformation matrix can also be designed as a 128x64 matrix, but with a different weight structure to extract medium-range structure features; and the third transformation matrix is also a 128x64 matrix to extract global information features. Through the three transformation matrices, the original 128-dimensional feature vector is transformed into three 64-dimensional decomposition feature vectors.

[0161] The design of the transformation matrix can be based on a combination of prior knowledge and data-driven methods. For example, the first transformation matrix can enhance the weight of detailed features such as control point coordinates and local curvatures; the second transformation matrix can enhance the weight of medium-range features such as curve shape and tangent vector; the third transformation matrix can enhance the weight of features such as process parameters and global geometry. In practical applications, the values of the transformation matrix can be automatically adjusted through parameter optimization methods to adapt to different aluminum veneer cutting scenarios.

[0162] The importance weights of each scale decomposition feature are calculated using a multi-layer perceptron. The multi-layer perceptron consists of two fully connected layers, with the input being the decomposition features of each scale and the output being the corresponding importance weights. For example, for a 64-dimensional decomposition feature, the first layer can map it to a 32-dimensional hidden feature, and the second layer can map the hidden feature to a 1-dimensional importance score. Specifically, the first layer can use a weight matrix of shape 64x32 and a bias vector of 32 dimensions, and the second layer can use a weight matrix of shape 32x1 and a bias vector of 1 dimension. A ReLU activation function is applied after each layer, and a Softmax function is applied after the last layer to ensure that the sum of the importance weights of the three scales is 1. For example, the importance weights of the three scales may be [0.3, 0.5, 0.2], indicating that the medium-range structural features are the most important, the global information features are the second most important, and the local detailed features are relatively less important.

[0163] The decomposition features of multiple scales are weighted and fused based on the importance weights to obtain the fused features. Specifically, each decomposition feature is multiplied by its corresponding importance weight, and then the weighted features are added to obtain the fused features. For example, if the three 64-dimensional decomposition features are F1, F2, and F3, and the corresponding importance weights are 0.3, 0.5, and 0.2, then the fused feature F is 0.3xF1 + 0.5xF2 + 0.2xF3. The fused feature remains 64-dimensional but integrates information of different scales.

[0164] The inter-node attention score is calculated based on the fused feature through a nonlinear transformation. For any two adjacent nodes i and j, first, their fused features Fi and Fj are concatenated to obtain a 128-dimensional concatenated vector. Then, a weight vector of shape 128x1 is used to perform linear transformation on the concatenated vector to obtain a scalar value. Finally, a LeakyReLU activation function is applied to the scalar value to obtain the attention score eij of node i to node j. The attention score represents the importance or correlation of node i to node j, and the larger the value, the stronger the correlation. For example, for two nodes with similar features, the attention score may be 1.5; for nodes with large feature differences, the attention score may be 0.3.

[0165] Edge feature contains the attribute information of the edge connecting two nodes, such as the length, direction and curvature of the edge. Assuming that the dimension of the edge feature is 32, then for the edge between node i and node j, its edge feature is a 32-dimensional vector Eij. The edge feature enhanced attention mechanism concatenates the fusion feature Fi of node i, the fusion feature Fj of node j, the edge feature Eij and the inter-node attention score eij to obtain a 161-dimensional concatenation vector (64+64+32+1=161). Then, a two-layer fully connected network is used to perform nonlinear transformation on the concatenation vector to obtain the edge feature attention weight. The first layer can use a weight matrix with a shape of 161x64 and a bias vector with a dimension of 64, and the second layer can use a weight matrix with a shape of 64x1 and a bias vector with a dimension of 1. ReLU activation function is applied after each layer, and Sigmoid function is applied after the last layer to ensure that the edge feature attention weight is between 0 and 1. For example, for node pairs with similar features and significant edge features, the edge feature attention weight is 0.9; for node pairs with large feature differences and insignificant edge features, the weight is 0.2.

[0166] Based on the edge feature attention weight, a multi-head attention message passing mechanism is constructed. The multi-head attention mechanism captures different aspects of feature relationships through multiple parallel attention calculation units (attention heads). For example, 8 attention heads can be set, each corresponding to a feature transformation matrix with a shape of 64x8, which transforms the 64-dimensional fusion feature into an 8-dimensional feature representation. For all neighboring nodes i of node j, the fusion feature of node i is transformed by the corresponding feature transformation matrix and multiplied by the edge feature attention weight from node i to node j to obtain the attention message from node i. For example, if the feature of node i transformed by the first attention head is [0.5, 0.3, 0.2, 0.7, 0.4, 0.6, 0.1, 0.8], and the edge feature attention weight is 0.9, then the attention message is [0.45, 0.27, 0.18, 0.63, 0.36, 0.54, 0.09, 0.72].

[0167] For each attention head, the attention messages of all neighboring nodes of node j are summed to obtain the aggregated message of the attention head. Then, the aggregated messages of the 8 attention heads are concatenated to obtain a 64-dimensional concatenation vector (8x8=64). Finally, a weight matrix with a shape of 64x64 is used to perform linear transformation on the concatenation vector to obtain the final aggregated message of node j. This step is equivalent to weighting and combining the information of different attention heads to obtain a more comprehensive message representation.

[0168] A gating update mechanism is constructed. The fusion feature Fj of node j is spliced with the aggregated message Mj to obtain a 128-dimensional spliced vector. Then, a weight matrix with a shape of 128x64 and a bias vector with a dimension of 64 are used to map the spliced vector to a hidden feature with a dimension of 64. Then, another weight matrix with a shape of 64x64 and a bias vector with a dimension of 64 are used to map the hidden feature to an update gate vector Zj with a dimension of 64. The update gate vector is processed by a Sigmoid function, so that the value of each element is between 0 and 1, indicating the proportion of the original feature and the introduced new information.

[0169] The node feature is selectively updated based on the update gate information. Specifically, the update gate vector Zj is multiplied element-wise with the aggregated message Mj to represent the introduced new information; 1 is subtracted from the update gate vector Zj and then multiplied element-wise with the node fusion feature Fj to represent the preserved original feature. Then, the two parts are added to obtain the updated node feature F'j. For example, if an element of the update gate vector is 0.7, then 70% of the feature at the corresponding position comes from the aggregated message and 30% comes from the original fusion feature.

[0170] The updated node feature F'j is connected in residual with the original fusion feature Fj, i.e., the two are added, and then layer normalization processing is performed to obtain the final node feature F''j. The residual connection helps to alleviate the gradient vanishing problem, and the layer normalization helps to stabilize the training process. The final node feature maintains a dimension of 64 but contains rich information from neighboring nodes.

[0171] A dynamic optimization strategy is adopted for the feature propagation process. An adaptive learning rate adjustment strategy is used to optimize the feature propagation process, and the adaptive learning rate is calculated based on the ratio of the first-order momentum and the second-order momentum. Specifically, the historical gradient (first-order momentum) and the historical gradient square (second-order momentum) of parameter update are tracked, the first-order momentum reflects the direction of the gradient, and the second-order momentum reflects the amplitude of the gradient. The adaptive learning rate can be set to the base learning rate multiplied by the absolute value of the first-order momentum divided by the square root of the second-order momentum plus a small constant. For example, the base learning rate can be set to 0.001 and the small constant can be set to 0.00001. This adaptive learning rate strategy makes the parameter update more stable and efficient.

[0172] The gradient in the feature propagation process is norm-constrained to limit the gradient value within a preset threshold range. Specifically, the norm (L2 norm) of the gradient is calculated, and if the norm exceeds the preset threshold (such as 5.0), the gradient is scaled down so that its norm equals the threshold; if the norm is less than the preset threshold, the gradient remains unchanged. Gradient norm constraint helps to prevent gradient explosion and improve training stability.

[0173] The application effectively captures multi-granularity information of node features through multi-scale feature decomposition and fusion, realizes efficient message passing and feature updating through a multi-head attention mechanism enhanced by edge features, balances the preservation of original information and the introduction of new information through a gating mechanism and residual connection, and improves the stability and efficiency of the optimization process through adaptive learning rate and gradient constraint.

[0174] In a second aspect, an aluminum veneer irregular cutting trajectory planning system based on visual positioning is provided, comprising:

[0175] A first unit is configured to input an acquired aluminum veneer image to an anisotropic guided filter for preprocessing, wherein a kernel function of the anisotropic guided filter is determined by surface microstructure characteristics of the aluminum material, and the anisotropic guided filter performs filtering operations in multiple scale spaces respectively, and filtering results of each scale space are fused through adaptive weights based on edge retention degrees.

[0176] A second unit is configured to perform edge enhancement processing on the aluminum veneer image processed by the anisotropic guided filter, wherein the edge enhancement processing adopts an edge detection operator, and a response function of the edge detection operator is combined with material characteristic information of the aluminum veneer.

[0177] A third unit is configured to input image features obtained through the edge enhancement processing to a non-uniform rational B-spline contour descriptor, wherein a control point density of the non-uniform rational B-spline contour descriptor is in an exponential relationship with a local curvature of an irregular contour of the aluminum veneer, and selection of the control points is based on saliency analysis of edge pixels, and the saliency analysis simultaneously considers edge intensity, direction consistency and local structure complexity.

[0178] A fourth unit is configured to construct a feature processing network based on an output of the non-uniform rational B-spline contour descriptor, wherein a node feature vector of the feature processing network contains image feature parameters and process parameters, and a cutting trajectory is generated based on an output of the feature processing network.

[0179] In a third aspect, a computer readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.

Claims

1. A trajectory planning method for aluminum veneer special-shaped cutting based on visual positioning, characterized in that: include: The acquired aluminum veneer image is input into an anisotropic guided filter for preprocessing, wherein the kernel function of the anisotropic guided filter is determined by the microstructural characteristics of the aluminum surface, including: constructing a basic kernel function of the anisotropic guided filter, and modulating the basic kernel function by the material property adaptive modulation function of the aluminum veneer surface to obtain a final kernel function, wherein the material property adaptive modulation function includes a local material uniformity term and a reflectivity gradient term, and the final kernel function also includes a local texture complexity modulation term, and the local texture complexity modulation term is jointly determined by the local variance and local correlation of the aluminum veneer image; wherein the basic kernel function is an anisotropic Gaussian kernel function, and the main direction of the anisotropic Gaussian kernel function is determined by The local gradient direction of the aluminum veneer image is determined, and the standard deviation of the anisotropic Gaussian kernel function is determined by the local grayscale distribution of the aluminum veneer image; the local material uniformity term is obtained by calculating the discrete degree of the pixel grayscale value in a preset neighborhood, and the reflectivity gradient term is obtained by calculating the reflectivity difference between adjacent pixels in a preset neighborhood; the local variance in the local texture complexity modulation term is obtained by calculating the statistical variance of the pixel grayscale value in a preset neighborhood, and the local correlation in the local texture complexity modulation term is obtained by calculating the correlation coefficient between the central pixel and the surrounding pixels in a preset neighborhood; the product of the basic kernel function and the material property adaptive modulation function and the product of the local texture complexity modulation term is used as the final kernel function; The anisotropic guided filter performs filtering operations in multiple scale spaces respectively, and the filtering results of each scale space are fused through adaptive weights based on the degree of edge preservation; Performing edge enhancement processing on the aluminum veneer image processed by the anisotropic guided filter, wherein the edge enhancement processing uses an edge detection operator, and the response function of the edge detection operator is combined with material property information of the aluminum veneer; Inputting the image features obtained by the edge enhancement processing into a non-uniform rational B-spline profile descriptor, wherein the control point density of the non-uniform rational B-spline profile descriptor is exponentially related to the local curvature of the aluminum veneer profile, and the control points are selected based on the significance analysis of the edge pixels, and the significance analysis simultaneously considers the edge strength, directional consistency and local structural complexity; A feature processing network is constructed based on the output of the non-uniform rational B-spline contour descriptor, wherein the node feature vectors of the feature processing network include image feature parameters and process parameters; and a cutting trajectory is generated based on the output of the feature processing network.

2. The method according to claim 1, characterized in that The obtained aluminum veneer image is input into an anisotropic guided filter for preprocessing. The kernel function of the anisotropic guided filter is determined by the surface microstructure characteristics of the aluminum material. The anisotropic guided filter performs filtering operations in multiple scale spaces respectively. The filtering results of each scale space are fused using adaptive weights based on the degree of edge preservation. The steps include: Performing adaptive scale decomposition on the aluminum veneer image, wherein a scale parameter of the adaptive scale decomposition is determined by a local entropy value of the aluminum veneer image, and the adaptive scale decomposition generates a corresponding feature image in each scale space; Calculating an edge response metric for the feature image in each scale space, where the edge response metric is determined by both the gradient strength and the directional consistency of the feature image, where the directional consistency is calculated from the feature images in adjacent scale spaces; Calculating a feature fusion weight of the feature image, the feature fusion weight including an edge response weight item and a detail preservation weight item, the edge response weight item being determined by the edge response metric value, and the detail preservation weight item being determined by a ratio of a Laplace response value to a blur metric value of the feature image; The feature fusion weight is applied to the feature image to obtain an enhanced feature image, and the enhanced feature image is enhanced in detail by the difference between the feature image and the feature image of its adjacent scale space, and the enhancement coefficient of the detail enhancement is proportional to the edge response weight item.

3. The method according to claim 1, characterized in that The step of performing edge enhancement processing on the aluminum veneer image processed by the anisotropic guided filter, wherein the edge enhancement processing adopts an edge detection operator, and the response function of the edge detection operator is combined with the material characteristic information of the aluminum veneer, comprises: Obtaining a width of a thermal deformation zone of the aluminum veneer, and modulating a convolution kernel weight of a standard Sobel operator based on the width of the thermal deformation zone to obtain an improved Sobel operator, wherein the convolution kernel weight of the improved Sobel operator is positively correlated with the width of the thermal deformation zone; Constructing a main direction edge detection operator and a secondary direction edge detection operator; the response value of the main direction edge detection operator is determined by local gradient strength and edge continuity, the local gradient strength is obtained by calculating the sum of the squares of the horizontal gradient and the vertical gradient of the image, and the edge continuity is obtained by calculating the degree of deviation between the local gradient direction and the main direction; the response value of the secondary direction edge detection operator is determined by local texture directionality and edge clarity, the local texture directionality is obtained by calculating the normalized difference of the structure tensor eigenvalues, and the edge clarity is obtained by calculating the nonlinear mapping of the local gradient strength; The local density gradient value of the aluminum veneer is obtained, the response value of the main direction edge detection operator and the response value of the secondary direction edge detection operator are weightedly fused, and the fusion result is modulated by the local density gradient value to obtain an edge response image, wherein the weight of the weighted fusion is related to the response value of the main direction edge detection operator and the secondary direction edge detection operator, and the intensity of the modulation is proportional to the amplitude of the local density gradient value; the edge response image is adaptively thresholded to obtain the final edge enhancement result.

4. The method according to claim 1, wherein The image features obtained by the edge enhancement process are input into a non-uniform rational B-spline profile descriptor. The control point density of the non-uniform rational B-spline profile descriptor is exponentially related to the local curvature of the aluminum veneer profile. The control points are selected based on the significance analysis of edge pixels. The significance analysis simultaneously considers edge strength, directional consistency and local structural complexity. The steps include: The edge strength is obtained by calculating the image gradient amplitude, the directional consistency is obtained by calculating the cosine similarity of the gradient directions in the local neighborhood, and the local structural complexity is obtained by calculating the quadratic norm of the principal curvature; Performing a weighted fusion of the edge strength, directional consistency, and local structure complexity to obtain a comprehensive saliency metric value, wherein the comprehensive saliency metric value is used to determine a control point candidate set, wherein the saliency metric value of the points in the control point candidate set is greater than a preset saliency threshold; Calculate the local curvature value of the aluminum veneer profile, construct a control point density function based on the local curvature value, wherein the control point density function adopts an exponential mapping form, and the output value of the control point density function is exponentially related to the absolute value of the local curvature value; based on the control point density function, screen the points in the control point candidate set, and the Euclidean distance between any two retained control points is not less than the minimum value of the inverse of the control point density function at the two points; A non-uniform rational B-spline curve is constructed based on the retained control points. The node vectors of the non-uniform rational B-spline curve are generated by a cumulative chord length parameterization method. The basis function of the non-uniform rational B-spline curve adopts a recursively defined p-order basis function.

5. The method according to claim 1, wherein A feature processing network is constructed based on the output of the non-uniform rational B-spline contour descriptor, wherein the node feature vectors of the feature processing network include image feature parameters and process parameters; and the step of generating a cutting trajectory based on the output of the feature processing network includes: The node feature vectors of the feature processing network include control point feature parameters, curve feature parameters and process parameters, wherein the control point feature parameters include control point coordinates, weight values, local curvature values ​​and control point density values; the curve feature parameters include curve position, curve derivative, normal vector and tangent vector; and the process parameters include plate thickness, elastic modulus, yield strength, thermal expansion coefficient, cutting speed, cutting power, feed rate and kerf width; Performing multi-scale feature aggregation on the node feature vector to obtain a fused feature, and constructing a feature propagation mechanism based on the fused feature. The feature propagation mechanism includes a message passing function between nodes and a feature update rule. The message passing function calculates propagation information between nodes based on features of adjacent nodes and edge features. The feature update rule updates node features based on the node's own features and the propagation information of all adjacent nodes. Performing nonlinear mapping on the updated node features to obtain control parameters of the cutting trajectory, wherein the control parameters include a sampling density coefficient and an offset compensation amount; Based on the control parameters, cutting trajectory points and process parameters are generated. The sampling density of the cutting trajectory points is exponentially related to the local curvature of the curve. The coordinates of the cutting trajectory points are obtained by superimposing the normal vector offset on the curve position. The cutting speed is inversely proportional to the local curvature of the curve. The cutting power is linearly combined with the plate thickness and the cutting speed. The cutting trajectory is optimized and smoothed to obtain the final cutting trajectory that meets the continuity constraint.

6. The method according to claim 5, characterized in that Multi-scale feature aggregation is performed on the node feature vector to obtain a fused feature, and a feature propagation mechanism is constructed based on the fused feature. The feature propagation mechanism includes a message passing function between nodes and a feature update rule. The message passing function calculates propagation information between nodes based on the features of adjacent nodes and edge features. The feature update rule updates the node feature based on the node's own features and the propagation information of all adjacent nodes. The steps include: Input the node feature vector into multiple scale transformation matrices for feature decomposition to obtain decomposition features at multiple scales, use a multi-layer perceptron to calculate the importance weight of each scale decomposition feature, and perform weighted fusion of the decomposition features at multiple scales based on the importance weight to obtain a fused feature; Calculating the inter-node attention score through nonlinear transformation based on the fusion feature; Constructing an edge feature enhanced attention mechanism, which concatenates the fusion features, edge features, and inter-node attention scores of adjacent nodes and inputs them into a nonlinear transformation function to obtain edge feature attention weights; A multi-head attention message transmission mechanism is constructed based on the edge feature attention weight. Each attention head corresponds to a feature transformation matrix. The fusion features of adjacent nodes are transformed by the feature transformation matrix and multiplied by the corresponding edge feature attention weight to obtain an attention message. The attention messages of all attention heads are weightedly aggregated to obtain the aggregated message of the node. Construct a gated update mechanism, concatenate the node's fusion features with the aggregated message and input them into the gating unit to obtain the update gate information. Based on the update gate information, the node features are selectively updated, and the updated node features are residually connected and normalized with the original fusion features to obtain the final node features. A dynamic optimization strategy is adopted for the feature propagation process, and the norm constraint is imposed on the gradient value.

7. A system for planning the trajectory of aluminum veneer special-shaped cutting based on visual positioning, used to implement the method described in any one of claims 1 to 6, characterized in that: include: The first unit is configured to input the acquired aluminum veneer image into an anisotropic guided filter for preprocessing. The kernel function of the anisotropic guided filter is determined by the surface microstructure characteristics of the aluminum material. The anisotropic guided filter performs filtering operations in multiple scale spaces, and the filtering results of each scale space are fused using an adaptive weight based on the degree of edge preservation. A second unit is configured to perform edge enhancement processing on the aluminum veneer image processed by the anisotropic guided filter, wherein the edge enhancement processing uses an edge detection operator, and a response function of the edge detection operator is combined with material property information of the aluminum veneer; A third unit is configured to input the image features obtained by the edge enhancement processing into a non-uniform rational B-spline profile descriptor, wherein the control point density of the non-uniform rational B-spline profile descriptor is exponentially related to the local curvature of the aluminum veneer profile, and the control points are selected based on a significance analysis of edge pixels, wherein the significance analysis simultaneously considers edge strength, directional consistency, and local structural complexity; The fourth unit is used to construct a feature processing network based on the output of the non-uniform rational B-spline contour descriptor, wherein the node feature vector of the feature processing network includes image feature parameters and process parameters; and generate a cutting trajectory based on the output of the feature processing network.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • ETFE film cutting control method and system based on image recognition

    CN120088366A

  • Angle dependent anisotropic filtering

    TW201535317A