A surface topography analysis method and device based on anisotropic diffusion filtering

CN117670962BActive Publication Date: 2026-09-04ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311644843.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2026-09-04
Estimated Expiration
2043-12-04

AI Technical Summary

Technical Problem

[0004]本申请为解决上述提到的在对工件表面进行表面形貌分析时,由于现有扩散滤波方法在梯度方向上存在局限性,并且在处理结构复杂的数据时,容易导致边界效应等问题,提出一种基于各向异性扩散滤波的表面形貌分析方法及装置,其具体方案如下:

Benefits of technology

[0044] In this application, when performing surface topography analysis on a workpiece surface based on anisotropic diffusion filtering, the point cloud data of the acquired workpiece surface is first converted to obtain image data. Based on the image data, first gradient parameters corresponding to at least five directions are calculated, and a corresponding first diffusion rate is obtained according to each first gradient parameter and a first preset function. Based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and a first boundary operator, the image data is iteratively processed to obtain a target error component. Based on the image data and the target error component, a texture component is obtained, and the texture component is analyzed. By calculating the first gradient parameters and first diffusion rates corresponding to at least five directions of the image data, and by introducing a first boundary operator to iteratively process the image data to obtain the target error component, the limitations of existing diffusion filtering methods in gradient directions and the tendency to cause boundary effects when processing structurally complex data can be effectively avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117670962B_ABST
    Figure CN117670962B_ABST
Patent Text Reader

Abstract

The application discloses a surface topography analysis method and device based on anisotropic diffusion filtering. The method comprises the following steps: performing transformation processing on point cloud data of a workpiece surface to obtain image data; calculating first gradient parameters corresponding to at least five directions based on the image data, and obtaining corresponding first diffusion rates according to each first gradient parameter and a first preset function; performing iterative processing on the image data based on all the first gradient parameters, the first diffusion rates corresponding to each first gradient parameter and a first boundary operator to obtain a target error component; obtaining a texture component based on the image data and the target error component, and performing analysis processing on the texture component. The application can effectively avoid the limitations of existing diffusion filtering methods in the gradient direction, and can effectively avoid the problems of boundary effects and the like when processing complex structure data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of surface filtering technology, and specifically relates to a surface morphology analysis method and apparatus based on anisotropic diffusion filtering. Background Technology

[0002] With the development and advancement of high-end manufacturing, a large number of complex surface parts with high processing difficulty and stringent performance requirements have emerged. These parts typically feature thin-walled overhangs, extremely large aspect ratios, multiple cavities, and intersecting hole systems. Their surfaces exhibit numerous pores, multi-scale roughness, complex forming, and poor consistency, resulting in discontinuous surfaces, such as brake disc rotors, engine cylinder blocks and heads, and transmission valve bodies. Surface filtering technology is a crucial method for separating errors at various scales on the workpiece surface. By extracting effective information from the surface signal, it quantitatively characterizes morphological errors at different scales, forming the basis for analyzing the mapping relationship between processing errors, process systems, and part performance. Currently, filtering methods applied to workpiece surfaces include standard Gaussian filters, wavelet transforms, and mode decomposition. However, these methods are prone to convolution distortion at surface boundaries and pores, easily leading to boundary effects or mode aliasing.

[0003] In recent years, a filtering method based on partial differential equations has emerged. Its core idea is to simulate the process of material diffusion or heat conduction and adjust the diffusion intensity according to the gradient changes in the image, resulting in less diffusion at boundaries and more diffusion in flat areas. However, existing diffusion filtering methods have limitations in the gradient direction and are prone to boundary effects when processing complex data. Summary of the Invention

[0004] To address the limitations of existing diffusion filtering methods in the gradient direction and the tendency to cause boundary effects when processing complex data, this application proposes a surface topography analysis method and apparatus based on anisotropic diffusion filtering. The specific scheme is as follows:

[0005] In a first aspect, this application provides a surface topography analysis method based on anisotropic diffusion filtering, including:

[0006] The point cloud data of the acquired workpiece surface is transformed and processed to obtain image data;

[0007] The first gradient parameters corresponding to at least five directions are calculated based on the image data, and the corresponding first diffusion rate is obtained according to each first gradient parameter and the first preset function.

[0008] Based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the image data is iteratively processed to obtain the target error components;

[0009] Texture components are obtained based on image data and target error components, and then analyzed and processed.

[0010] In one alternative approach of the first aspect, the acquired point cloud data of the workpiece surface is transformed to obtain image data, including:

[0011] Acquire point cloud data of the workpiece surface;

[0012] Interpolation processing is performed on the point cloud data to obtain a two-dimensional matrix;

[0013] Image data is obtained by normalizing the two-dimensional matrix based on the maximum and minimum values ​​in the matrix.

[0014] In another alternative to the first aspect, first gradient parameters corresponding to at least five directions are calculated based on image data, including:

[0015] Based on the nth data point in the image data, determine the neighborhood data point that is closest to the nth data point in at least five directions; where n is a positive integer and not greater than the total number of data points in the image data;

[0016] The difference between the nth data point and the neighborhood data points corresponding to each direction is calculated to obtain the gradient calculation value corresponding to each direction of the nth data point.

[0017] The gradient values ​​for each direction of all data points in the image data are merged to obtain the first gradient parameter for each direction of the image data.

[0018] In another alternative to the first aspect, before iteratively processing the image data to obtain the target error component based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the method further includes:

[0019] Perform null detection on all neighborhood data points of the nth data point to obtain the boundary operator calculation value corresponding to the neighborhood data point in each direction;

[0020] The boundary operator values ​​corresponding to each direction of all data points in the image data are merged to obtain the first boundary operator corresponding to each direction of the image data.

[0021] In another alternative to the first aspect, after calculating the first gradient parameters corresponding to at least five directions based on image data, and before obtaining the corresponding first diffusion rate based on each first gradient parameter and a first preset function, the method further includes:

[0022] If the first gradient parameter is 0, then the first preset function is 1;

[0023] If the first gradient parameter is not 0, the diffusion parameter is obtained based on all the first gradient parameters and the first boundary operator;

[0024] Based on the diffusion parameters, the first preset function is determined.

[0025] In another alternative to the first aspect, the target error components are obtained by iteratively processing the image data based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, including:

[0026] Based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the image data is filtered to obtain the first error component;

[0027] The second gradient parameters corresponding to at least five directions are calculated based on the first error component, and the corresponding second diffusion rate is obtained according to each second gradient parameter and the second preset function.

[0028] Based on all the second gradient parameters, the second diffusion rate corresponding to each second gradient parameter, and the second boundary operator, the first error component is iteratively processed to obtain the target error component.

[0029] In another alternative to the first aspect, texture components are obtained based on image data and target error components, and the texture components are analyzed and processed, including:

[0030] The texture component is obtained by calculating the difference between the image data and the target error component;

[0031] Based on the formulas for calculating the height parameter in the texture components and surface property parameters, as well as the formulas for calculating the composite parameters in the surface property parameters, the height parameter and the composite parameter are calculated.

[0032] The height parameter and composite parameter are analyzed and processed to obtain the surface morphology analysis results of the workpiece surface.

[0033] Secondly, this application provides a surface topography analysis device based on anisotropic diffusion filtering, comprising:

[0034] The data conversion module is used to convert and process the acquired point cloud data of the workpiece surface to obtain image data;

[0035] The parameter calculation module is used to calculate the first gradient parameters corresponding to at least five directions based on the image data, and to obtain the corresponding first diffusion rate according to each first gradient parameter and a first preset function.

[0036] An iterative processing module is used to iteratively process the image data based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator to obtain the target error components;

[0037] The analysis and processing module is used to obtain texture components based on image data and target error components, and to analyze and process the texture components.

[0038] Thirdly, this application provides a surface topography analysis device based on anisotropic diffusion filtering, including a processor and a memory;

[0039] The processor is connected to the memory;

[0040] Memory, used to store executable program code;

[0041] The processor reads executable program code stored in memory to run a program corresponding to the executable program code, so as to implement the method for detecting peripheral signals of the die casting machine provided by the first aspect or any implementation of the first aspect of the embodiments of this application.

[0042] Fourthly, this application provides a computer storage medium storing a computer program, which includes program instructions. When executed by a processor, the program instructions can implement the surface topography analysis method based on anisotropic diffusion filtering provided in the first aspect or any implementation of the first aspect of the embodiments of this application.

[0043] Beneficial effects:

[0044] In this application, when performing surface topography analysis on a workpiece surface based on anisotropic diffusion filtering, the point cloud data of the acquired workpiece surface is first converted to obtain image data. Based on the image data, first gradient parameters corresponding to at least five directions are calculated, and a corresponding first diffusion rate is obtained according to each first gradient parameter and a first preset function. Based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and a first boundary operator, the image data is iteratively processed to obtain a target error component. Based on the image data and the target error component, a texture component is obtained, and the texture component is analyzed. By calculating the first gradient parameters and first diffusion rates corresponding to at least five directions of the image data, and by introducing a first boundary operator to iteratively process the image data to obtain the target error component, the limitations of existing diffusion filtering methods in gradient directions and the tendency to cause boundary effects when processing structurally complex data can be effectively avoided. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 A schematic flowchart illustrating a surface topography analysis method based on anisotropic diffusion filtering, provided for an embodiment of this application;

[0047] Figure 2 A two-dimensional topographic image of an engine cylinder head surface provided in an embodiment of this application;

[0048] Figure 3 A model diagram of anisotropic diffusion filtering of image data provided in an embodiment of this application;

[0049] Figure 4 A schematic diagram of anisotropic diffusion filtering of image data provided in an embodiment of this application;

[0050] Figure 5 A two-dimensional topographic image of a surface region 1 of an engine cylinder head provided in an embodiment of this application;

[0051] Figure 6 An error composition diagram of surface region 1 of an engine cylinder head provided in an embodiment of this application;

[0052] Figure 7 A texture composition map of surface region 1 of an engine cylinder head provided in an embodiment of this application;

[0053] Figure 8 A schematic diagram of a surface topography analysis device based on anisotropic diffusion filtering provided in this application embodiment;

[0054] Figure 9 This is a schematic diagram of another surface topography analysis device based on anisotropic diffusion filtering provided in an embodiment of this application. Detailed Implementation

[0055] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0056] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.

[0057] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.

[0058] Please see Figure 1 , Figure 1 The diagram shows a schematic flowchart of a surface topography analysis method based on anisotropic diffusion filtering provided in an embodiment of this application.

[0059] like Figure 1 As shown, the surface topography analysis method based on anisotropic diffusion filtering may include at least the following steps:

[0060] Step 102: Convert the point cloud data of the acquired workpiece surface to obtain image data.

[0061] The surface topography analysis method based on anisotropic diffusion filtering in this application embodiment can be applied, but is not limited to, terminal devices capable of data analysis, such as computers. The terminal device calculates the first gradient parameters and the first diffusion rate corresponding to the image data in at least five directions, and iteratively processes the image data by introducing a first boundary operator to obtain the target error components. This effectively avoids the limitations of existing diffusion filtering methods in the gradient direction and the problems such as boundary effects that easily occur when processing structurally complex data.

[0062] Specifically, the surface of the workpiece is measured using precision measuring equipment to calculate the three-dimensional coordinates of the workpiece surface morphology, thereby obtaining point cloud data of the workpiece surface morphology. The data points in the point cloud data are inserted into a two-dimensional matrix with equal row and column spacing. Then, each data point in the two-dimensional matrix is ​​normalized according to the maximum and minimum values ​​in the two-dimensional matrix to obtain image data.

[0063] As an optional embodiment of this application, the point cloud data of the acquired workpiece surface is transformed to obtain image data, including:

[0064] Acquire point cloud data of the workpiece surface;

[0065] Interpolation processing is performed on the point cloud data to obtain a two-dimensional matrix;

[0066] Image data is obtained by normalizing the two-dimensional matrix based on the maximum and minimum values ​​in the matrix.

[0067] Specifically, the surface of a workpiece is measured using precision measuring equipment, and the three-dimensional coordinates of the workpiece surface morphology are calculated, thereby obtaining point cloud data of the workpiece surface. For example, but not limited to, using a non-contact laser holographic interferometry instrument to measure the surface morphology of an engine cylinder head, and after processing the measurement results, 1,796,720 three-dimensional coordinates of the engine cylinder head surface morphology can be obtained, thus obtaining point cloud data of the engine cylinder head surface.

[0068] Next, the data points in the point cloud data are inserted into a two-dimensional matrix with equally spaced rows and columns. For example, but not limited to, the three-dimensional coordinates [x, y, z] of a data point in the point cloud data are inserted into the position of the x-th row and y-th column of the matrix, with the value z.

[0069] Next, the maximum and minimum values ​​in the two-dimensional matrix are identified, and each data point in the two-dimensional matrix is ​​normalized according to the grayscale image calculation formula formed by the maximum and minimum values ​​in the two-dimensional matrix to obtain image data. For example, but not limited to, after converting the point cloud data of the surface topography of the engine cylinder head into image data, the following can be obtained: Figure 2 The image shown is a two-dimensional topographic image of the engine cylinder head surface. The grayscale image calculation formula is shown below, for example, but not limited to:

[0070]

[0071] In the above formula: img(i,j) is the value of the data point in the i-th row and j-th column of the grayscale image matrix, M is a two-dimensional matrix, M(i,j) is the value of the data point in the i-th row and j-th column of the two-dimensional matrix, max(z) is the maximum value in M, and min(z) is the minimum value in M.

[0072] Step 104: Calculate the first gradient parameters corresponding to at least five directions based on the image data, and obtain the corresponding first diffusion rate according to each first gradient parameter and the first preset function.

[0073] Specifically, firstly, the nearest neighborhood data points to each data point in the image data in at least five directions are identified. Next, the difference between each data point and its corresponding neighborhood data points in each direction is calculated to obtain the gradient value for each data point in each direction. Then, the gradient values ​​for all data points in the image data in each direction are merged to obtain the first gradient parameter for each direction. Finally, the first diffusion rate is obtained based on the first gradient parameter for each direction and a first preset function.

[0074] As another optional embodiment of this application, the first gradient parameters corresponding to at least five directions are calculated based on image data, including:

[0075] Based on the nth data point in the image data, determine the neighborhood data point that is closest to the nth data point in at least five directions; where n is a positive integer and not greater than the total number of data points in the image data;

[0076] The difference between the nth data point and the neighborhood data points corresponding to each direction is calculated to obtain the gradient calculation value corresponding to each direction of the nth data point.

[0077] The gradient values ​​for each direction of all data points in the image data are merged to obtain the first gradient parameter for each direction of the image data.

[0078] Specifically, based on the nth data point of the image data, the nearest neighborhood data points to the nth data point in at least five directions are determined. Examples, but not limited to, include... Figure 3 The anisotropic diffusion filtering model shown has eight directions. The value of the nth data point in the image data is img. x,y Then the gray values ​​of the vertical neighborhood positions are respectively img x,y-1 and img x,y+1 The gray values ​​of the horizontal neighborhood positions are respectively img x-1,y and img x+1,y The grayscale values ​​of the neighborhood positions in the 45° direction are respectively img x+1,y-1 and img x-1,y+1 The gray values ​​of the neighborhood positions in the 135° direction are respectively img x-1,y-1 and img x+1,y+1 Where n is a positive integer and is not greater than the total number of data points in the image data.

[0079] Next, the difference between the nth data point and the corresponding neighborhood data points in each direction is calculated to obtain the gradient value of the nth data point in each direction. For example, but not limited to... Figure 3 As shown, the gradient calculation formula is used to calculate img. x,y The gradient in the 45° direction; where the gradient calculation formula is as follows:

[0080]

[0081]

[0082] In the above formula: for img x,y The gradients in different directions are indicated by the subscripts WS and EN, which represent the southwest and northeast directions at 45°, respectively.

[0083] Next, the gradient calculation values ​​corresponding to all data points in the image data in each direction are merged to obtain the first gradient parameters of the image data in each direction.

[0084] As another optional embodiment of this application, before iteratively processing the image data to obtain the target error component based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the method further includes:

[0085] Perform null detection on all neighborhood data points of the nth data point to obtain the boundary operator calculation value corresponding to the neighborhood data point in each direction;

[0086] The boundary operator values ​​corresponding to each direction of all data points in the image data are merged to obtain the first boundary operator corresponding to each direction of the image data.

[0087] Specifically, for all neighborhood data points of the nth data point, a null check is performed. If a neighborhood data point is null, the boundary operator corresponding to that data point is calculated as 0; if a neighborhood data point is not null, the boundary operator corresponding to that data point is calculated as 1. For example, but not limited to... Figure 4 As shown, img x-1,y-1 ,img x+1,y and img x,y+1 All are null values ​​(NULL), i.e., img x-1,y-1 ,img x+1,y and img x,y+1 The corresponding boundary operator values ​​are all 0; img x,y-1 ,img x-1,y ,img x+1,y-1 ,img x-1,y+1 and img x+1,y+1 None of them are NULL, that is, img x,y-1 ,img x-1,y ,imgx+1,y-1 ,img x-1,y+1 and img x+1,y+1 ,img x,y+1 The calculated value of the corresponding boundary operators is 1.

[0088] Next, the boundary operator calculation values ​​corresponding to each direction of all data points in the image data are merged to obtain the first boundary operator corresponding to each direction of the image data.

[0089] As another optional embodiment of this application, after calculating the first gradient parameters corresponding to at least five directions based on image data, and before obtaining the corresponding first diffusion rate based on each first gradient parameter and a first preset function, the method further includes:

[0090] If the first gradient parameter is 0, then the first preset function is 1;

[0091] If the first gradient parameter is not 0, the diffusion parameter is obtained based on all the first gradient parameters and the first boundary operator;

[0092] Based on the diffusion parameters, the first preset function is determined.

[0093] Specifically, it is determined whether the first gradient parameter is 0. If the first gradient parameter is 0, the first preset function is 1; if the first gradient parameter is not 0, the diffusion parameter is obtained based on all first gradient parameters and the first boundary operator. Then, based on the diffusion parameter, the first preset function is determined. The first preset function is, for example, but not limited to, the following adaptive transfer function g:

[0094]

[0095] In the above formula: Here, is the gradient parameter, and K is the diffusion parameter; the diffusion parameter K is calculated according to the following formula:

[0096]

[0097] In the above formula: for img x,y The gradients in different directions, b is the boundary operator corresponding to the gradients in different directions, the subscripts N and S are the north and south directions in the vertical direction, the subscripts E and E are the east and west directions in the horizontal direction, NW and ES are the northwest and southeast directions in the 135° direction, and the subscripts WS and EN are the southwest and northeast directions in the 45° direction.

[0098] Specifically, after determining the first preset function, the corresponding first diffusion rate can be obtained based on each first gradient parameter and the first preset function. For example, but not limited to, such as... Figure 3As shown, the img value is calculated using the first preset function. x,y The diffusion rate in the 45° direction; where the formula for calculating the diffusion rate is as follows:

[0099]

[0100]

[0101] In the above formula: c is the diffusion rate corresponding to the gradient in different directions, and the subscripts WS and EN represent the southwest and northeast directions at 45°, respectively.

[0102] Step 106: Based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, iteratively process the image data to obtain the target error components.

[0103] Specifically, based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the image data is filtered to obtain a first error component. Next, based on the first error component, second gradient parameters corresponding to at least five directions are calculated, and a corresponding second diffusion rate is obtained according to each second gradient parameter and a second preset function. Then, based on all second gradient parameters, the second diffusion rate corresponding to each second gradient parameter, and the second boundary operator, the first error component is iteratively processed to obtain a target error component. The target error component is the result obtained after filtering the image data for a preset number of iterations.

[0104] As another optional embodiment of this application, the target error component is obtained by iteratively processing the image data based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, including:

[0105] Based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the image data is filtered to obtain the first error component;

[0106] The second gradient parameters corresponding to at least five directions are calculated based on the first error component, and the corresponding second diffusion rate is obtained according to each second gradient parameter and the second preset function.

[0107] Based on all the second gradient parameters, the second diffusion rate corresponding to each second gradient parameter, and the second boundary operator, the first error component is iteratively processed to obtain the target error component.

[0108] Specifically, when iteratively processing the image data, a first error component is obtained by filtering the image data based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and a first boundary operator. Next, second gradient parameters corresponding to at least five directions are calculated based on the first error component, and a corresponding second diffusion rate is obtained according to each second gradient parameter and a second preset function. Then, the first error component is iteratively processed based on all second gradient parameters, the second diffusion rate corresponding to each second gradient parameter, and a second boundary operator to obtain the target error component. For example, but not limited to, for... Figure 2 as well as Figure 5 The surface region 1 of the engine cylinder head shown is subjected to iterative processing to obtain the following result: Figure 6 The error components of surface region 1 of the engine cylinder head shown.

[0109] For example, but not limited to the diffusion equation shown below, the target error components can be obtained by iteratively processing the image data:

[0110]

[0111] In the above formula: diffusion time t refers to the number of iterations of the algorithm during the diffusion process, img t+1 This is the result of filtering the image data t times. (img) t This is the result after filtering the image data t-1 times. for img x,y The gradients in different directions, b is the boundary operator corresponding to the gradients in different directions, c is the diffusion rate corresponding to the gradients in different directions, the subscripts N and S are the north and south directions in the vertical direction, the subscripts E and W are the east and west directions in the horizontal direction, NW and ES are the northwest and southeast directions in the 135° direction, the subscripts WS and EN are the southwest and northeast directions in the 45° direction, and λ is the cutoff wavelength in the x and y directions.

[0112] It should be noted that the diffusion time y determines the smoothness of the workpiece surface, and also refers to the number of iterations. The region Gaussian filter is a kernel convolution filtering method. In workpiece surface topography analysis, the region Gaussian filter can be used to determine the relationship between the diffusion time y and the cutoff wavelength λ. In two-dimensional space, the region Gaussian filter weight function S(x, y) is defined as shown in the formula:

[0113]

[0114] In the formula, (x, y) are the coordinates in two-dimensional space, and α is defined as shown in the formula:

[0115]

[0116] There is a relationship between regional Gaussian filters and diffusion filters. The relationship between diffusion time t and the standard deviation σ of the Gaussian filter is shown in the formula.

[0117]

[0118]

[0119] The relationship between the diffusion time t and the cutoff wavelength λ, as shown in the formula, can be derived:

[0120]

[0121] Step 108: Obtain texture components based on image data and target error components, and analyze and process the texture components.

[0122] Specifically, the difference between the image data and the target error component is calculated to obtain the texture component; then, the texture component is analyzed based on the height parameter and composite parameter in the surface property parameters to obtain the surface morphology analysis results of the workpiece surface.

[0123] As another optional embodiment of this application, texture components are obtained based on image data and target error components, and the texture components are analyzed and processed, including:

[0124] The texture component is obtained by calculating the difference between the image data and the target error component;

[0125] Based on the formulas for calculating the height parameter in the texture components and surface property parameters, as well as the formulas for calculating the composite parameters in the surface property parameters, the height parameter and the composite parameter are calculated.

[0126] The height parameter and composite parameter are analyzed and processed to obtain the surface morphology analysis results of the workpiece surface.

[0127] Specifically, after obtaining the target error component, the difference between the image data and the target error component is calculated to obtain the texture component. Then, based on the texture component, the height parameter calculation formula in the surface property parameters, and the composite parameter calculation formula in the surface property parameters, the height parameter and composite parameter are calculated. The height parameter and composite parameter are then analyzed to obtain the surface morphology analysis results of the workpiece surface. For example, but not limited to, for... Figure 2 as well as Figure 5 The two-dimensional topographic image of region 1 on the surface of the engine cylinder head shown is as follows: Figure 6 The error components of surface region 1 of the engine cylinder head shown are calculated by difference, and the result is as follows: Figure 7 The texture composition of surface region 1 of the engine cylinder head shown; then, as Figure 7Quantitative analysis of the texture components of region 1 on the surface of the engine cylinder head was performed, and the height parameter was calculated. The results show that the maximum peak height S p and maximum valley depth S v The alternating changes, specifically the large undulations in area 1 of the engine cylinder head surface, can lead to interference or overfitting during assembly, thus affecting the surface sealing performance.

[0128] It should be noted that the height parameter includes the arithmetic mean height S. a Root mean square height S q Maximum height S z Maximum peak height S p Maximum valley depth S v skewness S sk and kurtosis S ku The composite parameter includes the root mean square slope S. dq and the interface expansion area ratio S dr .

[0129] Specifically, the arithmetic mean height S a S represents the arithmetic mean of the absolute values ​​of the heights of all points on the surface of surface region A, i.e., the distances from the data points to the reference surface. a It describes the surface roughness of precision-machined parts; different machining processes result in different surface roughness values. a The values ​​vary considerably, therefore the processing technology can be determined by detecting changes in height characteristics within region A. Arithmetic mean height S a The calculation formula is as follows:

[0130]

[0131] Root mean square height S q The root mean square (RMS) height represents the height of each point on the surface of surface region A, which is also the standard deviation of the height at each point. RMS height S q The calculation formula is as follows:

[0132]

[0133] Maximum height S z S represents the maximum peak height within surface region A. p and maximum valley depth S v The sum and evaluation parameters S z The value varies considerably for different regions and surface sizes, but is relatively stable on continuously processed surfaces. Maximum height S z The calculation formula is as follows:

[0134] S z =S p +S v

[0135] Skewness S sk This indicates the degree of symmetry in the distribution of surface heights near the average height within surface region A. If the surface heights are symmetrical, then S... sk =0. If the surface height distribution is higher than the average height reference plane, then S sk <0; conversely, S sk >0. Skewness S sk The calculation formula is as follows:

[0136]

[0137] Kubularity S ku This indicates the sharpness of the roughness within surface region A. It can also describe the distribution of microscopic surface height. If both sharp and gentle surface heights coexist, then S... ku =0. If the surface height distribution is sharp, then S ku >3; conversely, S ku <3. Calculate the kurtosis S ku It can reflect the surface quality and surface pressure-bearing capacity of a workpiece. Kurtosis (S) ku The calculation formula is as follows:

[0138]

[0139] Root mean square slope S dq S represents the root mean square error of the slope of all data points within surface region A. If the surface is perfectly flat, then S dq =0. If the surface has a tilt component, then S dq It will increase when the tilt angle of the tilted component is 45°, S dq =1. Root mean square slope S dq The calculation formula is as follows:

[0140]

[0141] Interface expansion area ratio S dr S represents the percentage increase in area containing surface components within surface region A relative to the total area of ​​region A. If the surface is perfectly flat, then S... dr =0. If the surface has a tilt component, then S dr It will increase when the tilt angle of the tilted component is 45°, S dr =0.414 means the area increased by 41.4%. The interface area expansion is greater than S. dr The calculation formula is as follows:

[0142]

[0143] The following will be combined with the appendix Figure 8 This application provides a detailed description of the detection device for peripheral signals of a die-casting machine according to embodiments. It should be noted that... Figure 8 The detection device for peripheral signals of the die-casting machine shown is used to perform the functions described in this application. Figure 1 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figure 1 The example shown.

[0144] Please see Figure 8 , Figure 8 A schematic diagram of a surface topography analysis device based on anisotropic diffusion filtering, provided in an embodiment of this application, is shown.

[0145] like Figure 8 As shown, the detection device for signals around the die-casting machine may include at least a data conversion module 801, a parameter calculation module 802, an iterative processing module 803, and an analysis and processing module 804, wherein:

[0146] The data conversion module 801 is used to convert and process the acquired point cloud data of the workpiece surface to obtain image data.

[0147] The parameter calculation module 802 is used to calculate the first gradient parameters corresponding to at least five directions based on the image data, and to obtain the corresponding first diffusion rate according to each first gradient parameter and a first preset function.

[0148] The iterative processing module 803 is used to iteratively process the image data based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator to obtain the target error component;

[0149] The analysis and processing module 804 is used to obtain texture components based on image data and target error components, and to analyze and process the texture components.

[0150] In one alternative approach to the second aspect, the data transformation module specifically includes:

[0151] The data acquisition unit is used to acquire point cloud data of the workpiece surface;

[0152] The first data processing unit is used to interpolate point cloud data to obtain a two-dimensional matrix;

[0153] The data transformation unit is used to normalize the two-dimensional matrix based on the maximum and minimum values ​​in the matrix to obtain image data.

[0154] In another alternative solution to the second aspect, the parameter calculation module specifically includes:

[0155] The data determination unit, based on the nth data point of the image data, determines the neighborhood data point that is closest to the nth data point in at least five directions; where n is a positive integer and not greater than the total number of data points in the image data;

[0156] The first data calculation unit is used to perform difference calculation on the nth data point and the corresponding neighborhood data points in each direction to obtain the gradient calculation value corresponding to each direction of the nth data point.

[0157] The first data merging unit is used to merge the gradient calculation values ​​corresponding to each direction of all data points in the image data to obtain the first gradient parameter corresponding to each direction of the image data.

[0158] In another alternative to the second aspect, prior to the iterative processing module, it also includes:

[0159] The second data processing unit is used to perform empty detection processing on all neighborhood data points of the nth data point to obtain the boundary operator calculation value corresponding to the neighborhood data point in each direction;

[0160] The second data merging unit is used to merge the boundary operator calculation values ​​corresponding to each direction of all data points in the image data to obtain the first boundary operator corresponding to each direction of the image data.

[0161] In another alternative embodiment of the second aspect, the parameter calculation module further includes a function determination unit, which is specifically used for:

[0162] If the first gradient parameter is 0, then the first preset function is 1;

[0163] If the first gradient parameter is not 0, the diffusion parameter is obtained based on all the first gradient parameters and the first boundary operator;

[0164] Based on the diffusion parameters, the first preset function is determined.

[0165] In another alternative solution to the second aspect, the iterative processing module specifically includes:

[0166] The second data calculation unit is used to filter the image data based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator to obtain the first error component.

[0167] The third data calculation unit is used to calculate the second gradient parameters corresponding to at least five directions based on the first error component, and to obtain the corresponding second diffusion rate according to each second gradient parameter and the second preset function.

[0168] The fourth data calculation unit is used to iteratively process the first error component to obtain the target error component based on all the second gradient parameters, the second diffusion rate corresponding to each second gradient parameter, and the second boundary operator.

[0169] In another alternative solution to the second aspect, the analysis and processing module specifically includes:

[0170] The fifth data calculation unit is used to calculate the difference between the image data and the target error components to obtain the texture components;

[0171] The sixth data calculation unit is used to calculate the height parameter and the composite parameter based on the texture component, the height parameter calculation formula in the surface property parameters, and the composite parameter calculation formula in the surface property parameters.

[0172] The data analysis unit is used to analyze and process height parameters and composite parameters to obtain the surface morphology analysis results of the workpiece surface.

[0173] Those skilled in the art will clearly understand that the technical solutions of the embodiments of this application can be implemented by means of software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware capable of independently completing or cooperating with other components to complete a specific function, wherein the hardware may be, for example, a Field-Programmable Gate Array (FPGA), an Integrated Circuit (IC), etc.

[0174] Please see Figure 9 , Figure 9 This illustration shows a structural schematic diagram of another detection device for peripheral signals of a die-casting machine provided in an embodiment of this application. For example... Figure 9 As shown, the detection device 900 for peripheral signals of the die-casting machine may include: at least one processor 901, at least one network interface 904, user interface 903, memory 905, and at least one communication bus 902.

[0175] The communication bus 902 can be used to realize the connection and communication of the above components.

[0176] The user interface 903 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0177] The network interface 904 may include, but is not limited to, Bluetooth modules, NFC modules, Wi-Fi modules, etc.

[0178] The processor 901 may include one or more processing cores. The processor 901 connects to various parts within the electronic device 900 using various interfaces and lines. It executes instructions, programs, code sets, or instruction sets stored in the memory 905, and calls data stored in the memory 905 to perform various functions and process data within the routing device 900. Optionally, the processor 901 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 901 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 901 and may be implemented as a separate chip.

[0179] The memory 905 may include RAM or ROM. Optionally, the memory 905 may include a non-transitory computer-readable medium. The memory 905 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 905 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 905 may also be at least one storage device located remotely from the aforementioned processor 901. Figure 9 As shown, the memory 905, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for detecting peripheral signals of the die-casting machine.

[0180] Specifically, the processor 901 can be used to call the detection application for peripheral signals of the die-casting machine stored in the memory 905, and specifically perform the following operations:

[0181] The point cloud data of the acquired workpiece surface is transformed and processed to obtain image data;

[0182] The first gradient parameters corresponding to at least five directions are calculated based on the image data, and the corresponding first diffusion rate is obtained according to each first gradient parameter and the first preset function.

[0183] Based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the image data is iteratively processed to obtain the target error components;

[0184] Texture components are obtained based on image data and target error components, and then analyzed and processed.

[0185] In some possible embodiments, the acquired point cloud data of the workpiece surface is transformed to obtain image data, including:

[0186] Acquire point cloud data of the workpiece surface;

[0187] Interpolation processing is performed on the point cloud data to obtain a two-dimensional matrix;

[0188] Image data is obtained by normalizing the two-dimensional matrix based on the maximum and minimum values ​​in the matrix.

[0189] In some possible embodiments, first gradient parameters corresponding to at least five directions are calculated based on image data, including:

[0190] Based on the nth data point in the image data, determine the neighborhood data points that are closest to the nth data point in at least five directions; where n is a positive integer and not greater than the total number of data points in the image data;

[0191] The difference between the nth data point and the neighborhood data points corresponding to each direction is calculated to obtain the gradient calculation value corresponding to each direction of the nth data point.

[0192] The gradient values ​​for each direction of all data points in the image data are merged to obtain the first gradient parameter for each direction of the image data.

[0193] In some possible embodiments, before iteratively processing the image data to obtain the target error component based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the method further includes:

[0194] Perform null detection on all neighborhood data points of the nth data point to obtain the boundary operator calculation value corresponding to the neighborhood data point in each direction;

[0195] The boundary operator values ​​corresponding to each direction of all data points in the image data are merged to obtain the first boundary operator corresponding to each direction of the image data.

[0196] In some possible embodiments, after calculating the first gradient parameters corresponding to at least five directions based on image data, and before obtaining the corresponding first diffusion rate based on each first gradient parameter and a first preset function, the method further includes:

[0197] If the first gradient parameter is 0, then the first preset function is 1;

[0198] If the first gradient parameter is not 0, the diffusion parameter is obtained based on all the first gradient parameters and the first boundary operator;

[0199] Based on the diffusion parameters, the first preset function is determined.

[0200] In some possible embodiments, the target error component is obtained by iteratively processing the image data based on all first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and a first boundary operator, including:

[0201] Based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the image data is filtered to obtain the first error component;

[0202] The second gradient parameters corresponding to at least five directions are calculated based on the first error component, and the corresponding second diffusion rate is obtained according to each second gradient parameter and the second preset function.

[0203] Based on all the second gradient parameters, the second diffusion rate corresponding to each second gradient parameter, and the second boundary operator, the first error component is iteratively processed to obtain the target error component.

[0204] In some possible embodiments, texture components are obtained based on image data and target error components, and the texture components are analyzed and processed, including:

[0205] The texture component is obtained by calculating the difference between the image data and the target error component;

[0206] Based on the formulas for calculating the height parameter in the texture components and surface property parameters, as well as the formulas for calculating the composite parameters in the surface property parameters, the height parameter and the composite parameter are calculated.

[0207] The height parameter and composite parameter are analyzed and processed to obtain the surface morphology analysis results of the workpiece surface.

[0208] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0209] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0210] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0211] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.

[0212] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0213] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0214] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0215] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0216] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A surface topography analysis method based on anisotropic diffusion filtering, characterized in that, include: The point cloud data of the acquired workpiece surface is transformed and processed to obtain image data; Based on the image data, first gradient parameters corresponding to eight directions are calculated, and a corresponding first diffusion rate is obtained according to each first gradient parameter and a first preset function. The eight directions are the vertical direction, the horizontal direction, the 45º direction, and the 135º direction. Based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the image data is iteratively processed to obtain the target error component; Texture components are obtained based on the image data and the target error components, and the texture components are analyzed and processed. The calculation of the first gradient parameters corresponding to the eight directions based on the image data includes: Based on the nth data point of the image data, determine the neighborhood data point that is closest to the nth data point in eight directions; where n is a positive integer and not greater than the total number of data points in the image data; The difference is calculated for the nth data point and the corresponding neighborhood data points in each direction to obtain the gradient calculation value for each direction of the nth data point; The gradient calculation values ​​corresponding to each direction of all data points in the image data are merged to obtain the first gradient parameter corresponding to each direction of the image data; Before iteratively processing the image data to obtain the target error component based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the method further includes: Perform a null detection process on all the neighborhood data points of the nth data point to obtain the boundary operator calculation value corresponding to the neighborhood data point in each direction; The boundary operator calculation values ​​corresponding to each direction of all data points in the image data are merged to obtain the first boundary operator corresponding to each direction of the image data; The step of iteratively processing the image data based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator to obtain the target error component includes: Based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator, the image data is filtered to obtain the first error component; The second gradient parameters corresponding to the eight directions are calculated based on the first error components, and the corresponding second diffusion rate is obtained according to each second gradient parameter and the second preset function. The target error component is obtained by iteratively processing the first error component based on all the second gradient parameters, the second diffusion rate corresponding to each second gradient parameter, and the second boundary operator.

2. The method according to claim 1, characterized in that, The process of converting the acquired point cloud data of the workpiece surface to obtain image data includes: Acquire point cloud data of the workpiece surface; The point cloud data is interpolated to obtain a two-dimensional matrix; The image data is obtained by normalizing the two-dimensional matrix based on the maximum and minimum values ​​in the matrix.

3. The method according to claim 1, characterized in that, After calculating the first gradient parameters corresponding to the eight directions based on the image data, and before obtaining the corresponding first diffusion rate according to each of the first gradient parameters and the first preset function, the method further includes: If the first gradient parameter is 0, then the first preset function is 1; If the first gradient parameter is not 0, the diffusion parameter is obtained based on all the first gradient parameters and the first boundary operator; Based on the diffusion parameters, the first preset function is determined.

4. The method according to claim 1, characterized in that, The process of obtaining texture components based on the image data and the target error components, and analyzing and processing the texture components, includes: The texture component is obtained by calculating the difference between the image data and the target error component; Based on the formula for calculating the height parameter in the texture components and surface property parameters, and the formula for calculating the composite parameter in the surface property parameters, the height parameter and the composite parameter are calculated. The height parameter and the composite parameter are analyzed and processed to obtain the surface morphology analysis results of the workpiece surface.

5. A surface topography analysis device based on anisotropic diffusion filtering, characterized in that, include: The data conversion module is used to convert and process the acquired point cloud data of the workpiece surface to obtain image data; The parameter calculation module is used to calculate the first gradient parameters corresponding to eight directions based on the image data, and to obtain the corresponding first diffusion rate according to each first gradient parameter and a first preset function. The eight directions are the vertical direction, the horizontal direction, the 45º direction, and the 135º direction. An iterative processing module is used to iteratively process the image data based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator to obtain the target error component; An analysis and processing module is used to obtain texture components based on the image data and the target error components, and to analyze and process the texture components. The parameter calculation module specifically includes: The data determination unit, based on the nth data point of the image data, determines the neighborhood data point that is closest to the nth data point in eight directions; where n is a positive integer and not greater than the total number of data points in the image data; The first data calculation unit is used to perform difference calculation on the nth data point and the corresponding neighborhood data points in each direction to obtain the gradient calculation value corresponding to each direction of the nth data point. The first data merging unit is used to merge the gradient calculation values ​​corresponding to each direction of all data points in the image data to obtain the first gradient parameter corresponding to each direction of the image data. Prior to the iterative processing module, the following is also included: The second data processing unit is used to perform empty detection processing on all neighborhood data points of the nth data point to obtain the boundary operator calculation value corresponding to the neighborhood data point in each direction; The second data merging unit is used to merge the boundary operator calculation values ​​corresponding to each direction of all data points in the image data to obtain the first boundary operator corresponding to each direction of the image data. The iterative processing module specifically includes: The second data calculation unit is used to filter the image data based on all the first gradient parameters, the first diffusion rate corresponding to each first gradient parameter, and the first boundary operator to obtain the first error component. The third data calculation unit is used to calculate the second gradient parameters corresponding to the eight directions based on the first error components, and to obtain the corresponding second diffusion rate according to each second gradient parameter and the second preset function. The fourth data calculation unit is used to iteratively process the first error component to obtain the target error component based on all the second gradient parameters, the second diffusion rate corresponding to each second gradient parameter, and the second boundary operator.

6. A surface topography analysis device based on anisotropic diffusion filtering, characterized in that, Including the processor and memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code stored in the memory to perform the steps of the method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer or processor, cause the computer or processor to perform the steps of the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Improved algorithm of image smoothing based on anisotropic diffusion

    CN104392418A

  • Adaptive edge preserving denoising method based on anisotropic diffusion model

    CN114022384A