A surface roughness measurement method for a part based on normal vector statistical characteristics
Patent Information
- Application Number
- CN202310059675.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-01-19
AI Technical Summary
[0003]现有的测量方法主要分为触摸法、探针法和光学法,其中触摸法是有经验的操作工人通过手工触摸进行测量,这种方法可靠性不高,且触摸后会在零部件表面留下油脂,污染零部件表面;探针式方法利用金刚石触针沿被测表面缓慢滑行,金刚石触针的上下位移量转换为表面粗糙度数值,这种接触式测量方法会对表面造成伤害;光学方法将被测表面的形状误差以干涉条纹等图形显示出来,并利用显微镜等设备将光学图像放大后进行测量以得到粗糙值,这种方法成本高昂且测量系统难以小型化
[0045] Traditional roughness measurement methods based on touch or probes require direct contact with the target surface, which can contaminate and damage it. Traditional optical roughness measurement methods are only suitable for laboratory environments, and the measurement systems are expensive and difficult to miniaturize. This method uses the standard deviation of the surface normal vector to reflect the roughness of the target surface, offering advantages such as lower cost, higher accuracy, and miniaturization compared to the aforementioned two roughness measurement methods.
Smart Images

Figure CN116124048B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision technology, specifically relating to a method for measuring the surface roughness of components based on the statistical characteristics of normal vectors. Background Technology
[0002] Surface roughness refers to the microscopic geometric shape error of a machined surface, consisting of small gaps and peaks and valleys. It is generally caused by factors such as friction between the tool and the workpiece surface during machining, plastic deformation of the surface metal during chip separation, and high-frequency vibration in the machining system. Surface roughness is closely related to the fit properties, wear resistance, fatigue strength, contact stiffness, vibration, and noise of mechanical parts. Therefore, accurate measurement of the surface roughness of parts is of great significance in the design, production, and use of mechanical products.
[0003] Existing measurement methods are mainly divided into touch method, probe method and optical method. Among them, the touch method is to measure by experienced operators by touch. This method is not very reliable and leaves grease on the surface of the parts after touching, which contaminates the surface. The probe method uses a diamond stylus to slowly slide along the surface to be measured. The vertical displacement of the diamond stylus is converted into a surface roughness value. This contact measurement method can damage the surface. The optical method displays the shape error of the surface to be measured as interference fringes and other patterns. The optical image is magnified by equipment such as microscopes and then measured to obtain the roughness value. This method is expensive and the measurement system is difficult to miniaturize.
[0004] The measurement method based on infrared polarization imaging is a non-contact method. This method is based on the following experimental findings: the smaller the surface roughness of a component, the lower the dispersion of the surface normal vector and the closer the mean cosine similarity of the normal vector is to "1"; conversely, the greater the surface roughness, the higher the dispersion of the grayscale values in the polarization phase angle image and the closer the mean cosine similarity of the normal vector is to "0". Therefore, by establishing a correlation model between the mean cosine similarity of the surface normal vector and the roughness information, the roughness of the surface to be measured can be calculated using the model. This method is non-destructive to the surface of the measured component and has the advantages of high accuracy and miniaturized measurement system. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention provides a method for measuring the surface roughness of components based on the statistical characteristics of normal vectors. First, infrared images of the surface of a roughness comparison sample at four polarization angles are acquired. The polarization parameters of the infrared radiation are calculated by solving the Stokes vector, establishing the relationship between the polarization characteristics of the target infrared radiation and the surface normal vector. Next, a sample is selected from the roughness comparison samples, and the average normal vector of the region within that sample is extracted. Then, the mean cosine similarity is calculated, and the mean cosine similarity of the normal vectors for different standard roughness modules is obtained sequentially. Then, a least-squares fitting model is established to fit the mean cosine similarity of the normal vectors to the roughness function model of the roughness comparison sample surface. Finally, the mean cosine similarity of the normal vectors of the target surface to be measured is calculated and substituted into the model to obtain the roughness value. This method has the advantages of low cost, high accuracy, and miniaturization.
[0006] The technical solution adopted by this invention to solve its technical problem includes the following steps:
[0007] Step 1: Obtain infrared images of the surface of the roughness comparison sample at four polarization angles, and calculate the polarization parameters of the infrared radiation by solving the Stokes vector;
[0008] Step 2: Select a sample block from the roughness comparison sample blocks and extract region A within the sample block as the region to be measured; calculate the direction angle and zenith angle distribution information of the normal vector in region A using the polarization parameters obtained in Step 1, and obtain the distribution information of the normal vector in region A;
[0009] Step 3: Calculate the average value of all normal vectors in region A, then calculate the cosine similarity between the normal vectors in region A and the average value of the normal vectors, and take the average value; obtain the average cosine similarity of the normal vectors of different standard roughness modules in turn;
[0010] Step 4: Establish a least squares fitting model. Based on the mean cosine similarity of the normal vectors of all modules obtained in Step 3 and the corresponding different roughness values of the roughness comparison sample, fit the mean cosine similarity of the normal vectors of the roughness comparison sample surface to the roughness function model.
[0011] Step 5: Finally, calculate the mean cosine similarity of the surface normal vectors of the target and substitute it into the mean cosine similarity-roughness function model to obtain the roughness value.
[0012] Furthermore, the specific method of step 1 is as follows:
[0013] Infrared images of the roughness comparison sample surface at four polarization angles (0°, 45°, 90°, and 135°) were acquired using a focal plane infrared polarization camera or by mounting and rotating a linear polarizer in front of a regular infrared camera. The polarization phase angle and degree of polarization of the roughness comparison sample surface were calculated based on the Stokes vector.
[0014] Furthermore, the method for calculating the polarization parameters of infrared radiation by solving the Stokes vector is as follows:
[0015] The Stokes vector expression for the polarization state of light can be written in the following form:
[0016] S0 = 0.5 * (I0 + I 45 +I 90 +I 135 )
[0017] S1=I0-I 90
[0018] S2=I 45 -I 135
[0019] Among them, I0, I 45 I 90 I 135 These represent the radiation intensities at polarization directions of 0°, 45°, 90°, and 135°, respectively.
[0020] Based on the Stokes parameters, the polarization parameters, namely the degree of polarization DoLP and the polarization phase angle AoP, are further calculated using the following formulas:
[0021]
[0022]
[0023] Set the Stokes parameter S3 = 0.
[0024] Furthermore, the distribution information of the normal vector in region A is obtained as follows:
[0025] The azimuth angle θ is calculated using the following formula:
[0026]
[0027] Infrared radiation polarization degree DoLP and zenith angle The geometric expression is:
[0028]
[0029] in:
[0030]
[0031]
[0032] In the formula: n represents the real part of the refractive index of the object, and k represents the imaginary part of the refractive index of the object.
[0033] If the target surface is represented by z = f(x,y), then the normal vector of any point on the object surface is expressed by the following formula:
[0034]
[0035] Furthermore, the normal vector average cosine similarity-roughness function model is solved using the matrix method with least squares fitting, as detailed below:
[0036] Hypothesis function h θ The matrix representation of (x) is as follows:
[0037] h θ (x)=Xθ
[0038] Wherein, the hypothesis function h θ (x) = Xθ is an m×1 vector, θ is an n×1 vector, and X is an m×n matrix; m represents the number of samples and n represents the number of features of the samples;
[0039] The loss function is defined as Where y is the output vector of the sample, with a dimension of m×1;
[0040] According to the optimization method, in order to minimize the loss function, it is necessary to find the point where the derivative of the loss function is zero, as shown in the following equation:
[0041]
[0042] After simplifying the above derivative equation, we get:
[0043] θ=(X T X) -1 X T y
[0044] The beneficial effects of this invention are as follows:
[0045] Traditional roughness measurement methods based on touch or probes require direct contact with the target surface, which can contaminate and damage it. Traditional optical roughness measurement methods are only suitable for laboratory environments, and the measurement systems are expensive and difficult to miniaturize. This method uses the standard deviation of the surface normal vector to reflect the roughness of the target surface, offering advantages such as lower cost, higher accuracy, and miniaturization compared to the aforementioned two roughness measurement methods. Attached Figure Description
[0046] Figure 1 This is a lathe roughness comparison sample used in the embodiments of the present invention.
[0047] Figure 2 These are infrared images of the surface of the roughness comparison sample block at four polarization angles according to an embodiment of the present invention.
[0048] Figure 3 This embodiment of the invention extracts the test area A from the roughness comparison sample block.
[0049] Figure 4 It is the normal vector average cosine similarity-roughness function in the embodiments of the present invention.
[0050] Figure 5 It is the roughness measurement result obtained by calculating the mean cosine similarity of the normal vector - roughness function. Detailed Implementation
[0051] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0052] This invention provides a method for measuring the surface roughness of components based on the statistical properties of normal vectors, such as... Figure 1 As shown, a lathe roughness comparison block is used as the test object; as Figure 2 As shown, infrared images of the roughness comparison sample surface at four polarization angles (0°, 45°, 90°, and 135°) are first acquired. The degree of polarization and polarization angle of the infrared radiation are calculated by solving the Stokes vector, establishing the relationship between the target's infrared radiation polarization characteristics and the surface normal vector. Figure 3 As shown, a sample block is selected from the roughness comparison sample blocks, and region A within that sample block is extracted as the test area. The average value of all normal vectors in region A is calculated. The cosine similarity between the normal vectors in A and the average value of the normal vectors is calculated and averaged. The average cosine similarity of the normal vectors of different standard roughness modules is obtained sequentially, as shown. Figure 4 As shown, a least-squares fitting model is established to fit the mean cosine similarity of the normal vectors of the roughness comparison sample surface to the roughness function model; as shown... Figure 5 As shown, the roughness value can be obtained by calculating the average cosine similarity of the normal vectors of the target surface to be measured and substituting it into the fitting function model.
[0053] The specific steps are as follows:
[0054] Step 1, as follows Figure 2 As shown, infrared images of the roughness comparison sample surface at four polarization angles of 0°, 45°, 90°, and 135° were obtained.
[0055] Step 2: Calculate the polarization parameters of infrared radiation by solving the Stokes vector, and establish the relationship between the polarization characteristics of the target infrared radiation and the surface normal vector;
[0056] Step 3, as follows Figure 3As shown, a sample block is selected from the roughness comparison sample block and the region A of size a*a pixels in the sample block is extracted as the test region. The average value of all normal vectors in region A is calculated. The cosine similarity between the normal vector in A and the average value of the normal vector is calculated and the average value is taken. The average cosine similarity of the normal vectors of different standard roughness modules is obtained in turn.
[0057] Step 4, as follows Figure 4 As shown, a least squares fitting model is established to fit the mean cosine similarity of the normal vectors of the roughness comparison sample surface to the roughness function model.
[0058] Step 5, as follows Figure 5 As shown, the roughness value can be obtained by calculating the average cosine similarity of the normal vectors of the target surface to be measured and substituting it into the fitting function model.
[0059] In the technical solution of this invention, an infrared image of the surface of the target under test at four polarization angles (0°, 45°, 90°, and 135°) is acquired using a focal plane infrared polarization camera. The Stokes vector expression for the polarization state of light is written in the following form:
[0060] S0 = 0.5 * (I0 + I 45 +I 90 +I 135 )
[0061] S1=I0-I 90
[0062] S2=I 45 -I 135
[0063] Based on the Stokes parameters, the degree of polarization DoLP and the polarization phase angle AoP can be further calculated, as shown in the following formula:
[0064]
[0065]
[0066] This invention only considers the linear polarization case, therefore the Stokes parameter S3 = 0 is taken here.
[0067] Since the Stokes vector S1 gives the direction of the azimuth plane, this relationship can be used to eliminate the ambiguity between the polarization phase angle and the azimuth angle, and can be calculated using the following formula:
[0068]
[0069] Infrared radiation polarization degree DOLP and zenith angle The geometric expression is:
[0070]
[0071] That is, the zenith angle can be expressed by the refractive index and degree of polarization of the object as follows:
[0072]
[0073] In the above formula: n represents the real part of the refractive index of the object, and k represents the imaginary part of the refractive index of the object.
[0074] By determining the degree of polarization and phase angle of the infrared radiation from the target surface, the azimuth and zenith angles of the target surface can be calculated, thus obtaining the normal vector distribution of the target surface. The target surface is represented by z = f(x,y), and the normal vector at any point on the object surface can be expressed by the following formula:
[0075]
[0076] In the technical solution of this invention, based on the experimental finding that the smaller the surface roughness of a component, the lower the dispersion of the surface normal vector and the closer the mean cosine similarity of the normal vector is to "1"; and the larger the surface roughness of a component, the higher the dispersion of the grayscale values of the polarization phase angle image and the closer the mean cosine similarity of the normal vector is to "0", the least squares method is used to fit the required standard deviation-roughness function. Here, the matrix method is used to quickly solve the least squares fitting. The assumed function h... θ The matrix representation of (x) is as follows:
[0077] h θ (x)=Xθ
[0078] Wherein, the hypothesis function h θ (x) = X, where θ is an m×1 vector and X is an m×n matrix. m represents the number of samples and n represents the number of features of the samples.
[0079] The loss function is defined as Where y is the output vector of the sample, with a dimension of m×1.
[0080] According to the optimization method, in order to minimize the loss function, it is necessary to find the point where the derivative of the loss function is zero, as shown in the following equation:
[0081]
[0082] After simplifying the above derivative equation, we get:
[0083] θ=(X T X) -1 X T y
[0084] In the specific operation process of this invention, firstly, infrared images of the surface of the roughness comparison sample at four polarization angles are acquired. The polarization parameters of the infrared radiation are calculated by solving the Stokes vector, and the relationship between the polarization characteristics of the target infrared radiation and the surface normal vector is established. Secondly, a sample is selected from the roughness comparison sample, and region A within the sample is extracted as the region to be measured. The average value of all normal vectors in region A is calculated, and the cosine similarity between the normal vectors in A and the average value of the normal vectors is calculated and averaged. The average cosine similarity of the normal vectors of different standard roughness modules is obtained in turn. Then, a least squares fitting model is established to fit the average cosine similarity of the normal vectors of the roughness comparison sample surface to the roughness function model. Finally, the average cosine similarity of the normal vectors of the target surface to be measured is calculated and substituted into the fitting function model to obtain the roughness value. Specific implementation examples:
[0086] The camera used in this implementation example is a self-developed focal plane infrared polarization camera, and the measurement target is a lathe roughness comparison sample, such as... Figure 1 As shown. Infrared images of the roughness comparison sample surface at four polarization angles (0°, 45°, 90°, and 135°) were obtained. Figure 2 As shown. From the roughness comparison sample blocks, select one block and extract the region A of size a*a pixels within that block as the test area, as shown. Figure 3 As shown, the average value of all normal vectors in region A is calculated. The cosine similarity between the normal vectors in region A and this average value is calculated and averaged. The average cosine similarity of normal vectors for different standard roughness modules is obtained sequentially. A least-squares fitting model is established to fit the average cosine similarity of normal vectors to the roughness function model of the roughness comparison sample surface, as shown below. Figure 4 As shown; finally, the mean cosine similarity of the normal vectors of the target surface to be measured is calculated and substituted into the fitting function model to obtain the roughness value, as shown. Figure 5 As shown. Region A in the comparison sample blocks with different roughnesses Ra=0.8, Ra=1.6, Ra=3.2, and Ra=6.3 were obtained sequentially. i The average cosine similarity of the surface normal vectors was calculated, and the obtained data points are (0.8, 0.92), (1.6, 0.84), (3.2, 0.72), and (6.3, 0.62). The final standard deviation-roughness fitting function is:
[0087]
Claims
1. A method for measuring the surface roughness of components based on the statistical properties of normal vectors, characterized in that, Includes the following steps: Step 1: Obtain infrared images of the surface of the roughness comparison sample at four polarization angles, and calculate the polarization parameters of the infrared radiation by solving the Stokes vector; Step 2: Select a sample block from the roughness comparison sample blocks and extract region A within the sample block as the region to be measured; calculate the direction angle and zenith angle distribution information of the normal vector in region A using the polarization parameters obtained in Step 1, and obtain the distribution information of the normal vector in region A; Step 3: Calculate the average value of all normal vectors in region A, then calculate the cosine similarity between the normal vectors in region A and the average value of the normal vectors, and take the average value; obtain the average cosine similarity of the normal vectors of different standard roughness modules in turn; Step 4: Establish a least squares fitting model. Based on the mean cosine similarity of the normal vectors of all modules obtained in Step 3 and the corresponding different roughness values of the roughness comparison sample, fit the mean cosine similarity of the normal vectors of the roughness comparison sample surface to the roughness function model. Step 5: Finally, calculate the mean cosine similarity of the surface normal vectors of the target and substitute it into the mean cosine similarity-roughness function model to obtain the roughness value.
2. The method for measuring the surface roughness of components based on the statistical characteristics of normal vectors according to claim 1, characterized in that, The specific method for step 1 is as follows: Infrared images of the roughness comparison sample surface at four polarization angles (0°, 45°, 90°, and 135°) were acquired using a focal plane infrared polarization camera or by mounting and rotating a linear polarizer in front of a regular infrared camera. The polarization phase angle and degree of polarization of the roughness comparison sample surface were then calculated based on the Stokes vector.
3. The method for measuring the surface roughness of components based on the statistical characteristics of normal vectors according to claim 1, characterized in that, The method for calculating the polarization parameters of infrared radiation by solving the Stokes vector is as follows: The Stokes vector expression for the polarization state of light can be written in the following form: S0=0.5*(I0+I 45 +I 90 +I 135 ) S1=I0-I 90 S2=I 45 -I 135 Among them, I0, I 45 I 90 I 135 These represent the radiation intensities at polarization directions of 0°, 45°, 90°, and 135°, respectively. Based on the Stokes parameters, the polarization parameters, namely the degree of polarization DoLP and the polarization phase angle AoP, are further calculated using the following formulas: Set the Stokes parameter S3 = 0.
4. The method for measuring the surface roughness of a component based on the statistical characteristics of normal vectors according to claim 1, characterized in that, The distribution information of the normal vectors in region A is obtained as follows: The azimuth angle θ is calculated using the following formula: Infrared radiation polarization degree DoLP and zenith angle The geometric expression is: in: In the formula: n represents the real part of the refractive index of the object, and k represents the imaginary part of the refractive index of the object; If the target surface is represented by z = f(x,y), then the normal vector of any point on the object surface is expressed by the following formula:
5. The method for measuring the surface roughness of a component based on the statistical characteristics of normal vectors according to claim 1, characterized in that, The normal vector mean cosine similarity-roughness function model is solved using the matrix method with least squares fitting, as detailed below: Hypothesis function h θ The matrix representation of (x) is as follows: h θ (x)=Xθ Wherein, the hypothesis function h θ (x) = Xθ is an m×1 vector, θ is an n×1 vector, and X is an m×n matrix; m represents the number of samples and n represents the number of features of the samples; The loss function is defined as Where y is the output vector of the sample, with a dimension of m×1; According to the optimization method, in order to minimize the loss function, it is necessary to find the point where the derivative of the loss function is zero, as shown in the following equation: After simplifying the above derivative equation, we get: θ=(X T X) -1 X T y。
Citation Information
Patent Citations
Image-based support vector machine detection method and system for surface roughness of part
CN113989233A
Three-dimensional roughness detection device and method based on polarization imaging
CN114076579A