A method for measuring surface roughness of a part based on polarized imaging

By using polarization imaging technology and the standard deviation of the polarization phase angle image of the component surface, a least squares fitting model is established, which solves the problems of high cost, low accuracy and large equipment of traditional methods, and realizes low cost and high accuracy miniaturized measurement.

CN116255934BActive Publication Date: 2026-05-15NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTHWESTERN POLYTECHNICAL UNIV
Filing Date
2023-01-19
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing methods for measuring the surface roughness of parts are costly, have low accuracy, require bulky measuring equipment, and can damage or contaminate the surface.

Method used

A polarization-based imaging method is adopted to acquire grayscale images of four polarization angles on the surface of a component, calculate the standard deviation of the polarization phase angle image, and establish a least squares fitting model to reflect the surface roughness.

Benefits of technology

It achieves low-cost, high-precision surface roughness measurement of parts without damaging the surface, and the measurement system is miniaturized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116255934B_ABST
    Figure CN116255934B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on polarization imaging's roughness measurement method of part surface, first acquire roughness contrast sample block surface four polarization angle gray scale image, according to Stokes vector calculation roughness module's polarization phase angle image, from which extract out the region to be measured and calculate its pixel gray scale value's standard deviation, in turn acquire the standard deviation of different standard roughness module, establish least square fitting model, fit out the standard deviation-roughness function model of part surface, finally calculate the standard deviation of target surface to be measured and import fitting function model can realize the acquisition of roughness value.This method has the advantages of low cost, high precision, miniaturization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision technology, and specifically relates to a method for measuring the surface roughness of components; 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] Polarization imaging-based measurement is a non-contact method. This method is based on the experimental findings that the smaller the surface roughness of a component, the lower the dispersion of the grayscale values ​​in the polarization phase angle image; conversely, the greater the surface roughness, the higher the dispersion of the grayscale values. Therefore, by establishing a correlation model between the polarization phase angle image information and the roughness information of the component surface, the roughness of the measured surface can be calculated using the model. This method is non-destructive to the surface of the measured component and has the advantages of low cost, high accuracy, and miniaturization of the 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 polarization imaging. First, grayscale images of the surface of a roughness comparison sample at four polarization angles are acquired. Then, the polarization phase angle image of the roughness module is calculated using Stokes vectors. The area to be measured is extracted from this image, and the standard deviation of its pixel grayscale values ​​is calculated. The standard deviations of different standard roughness modules are obtained sequentially. A least-squares fitting model is established to fit the standard deviation-roughness function model of the component surface. Finally, the standard deviation of the target surface to be measured is calculated and substituted into the fitting function 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: The roughness comparison sample block includes N surface regions with different roughnesses; acquire grayscale images of the surface of the roughness comparison sample block at four polarization angles of 0°, 45°, 90°, and 135°, and extract N polarization phase angle sub-images A of size a*a pixels from the images. i As the test area, i = 1, 2, ..., N; each test area corresponds to a surface region with a different roughness.

[0008] Step 2: Calculate A for each sub-image i The standard deviation δ of the gray values ​​of all pixels in i ;

[0009] Step 3: Establish a least-squares fitting model based on the standard deviation δ of different surface roughness regions in the roughness comparison sample. i and the roughness value Ra of this region i Fit the standard deviation-roughness function of the component surface;

[0010] Step 4: Calculate the standard deviation of the target surface to be measured, and substitute it into the standard deviation-roughness function fitted in Step 3 to obtain the roughness value of the target surface to be measured.

[0011] Furthermore, the specific method for obtaining grayscale images in step 1 is as follows: using a split-focus plane polarization camera or by installing and rotating a linear polarizer in front of a CCD camera, grayscale images of the roughness comparison sample surface at four polarization angles of 0°, 45°, 90°, and 135° are obtained.

[0012] Furthermore, the grayscale image of the polarization angle is obtained using the Stokes vector method, as follows:

[0013] The polarization state of light is described by a vector consisting of four parameters, known as the Stokes vector:

[0014]

[0015] Where I represents the total illumination intensity, Q represents the illumination intensity of linearly polarized light at 0°, U represents the illumination intensity of linearly polarized light at 45°, and V represents the illumination intensity of circularly polarized light; I 0° I 45° I 90° I 135° I represents the light intensity at polarization directions of 0°, 45°, 90°, and 135°, respectively. lh I rh These represent the light intensities corresponding to left-handed and right-handed circularly polarized light, respectively.

[0016] The polarization phase angle of light is calculated using the Stokes vector, i.e.:

[0017]

[0018] Furthermore, the specific method for calculating the standard deviation in step 2 is as follows: calculate the polarization phase angle sub-image A. i The average grayscale value of all pixels is calculated, and the standard deviation of the grayscale value of each pixel relative to the average value is calculated sequentially. The average of the standard deviations of all pixels relative to the average value is taken as the standard deviation of module A1.

[0019] Furthermore, the specific method of step 4 is as follows: obtain a polarization phase angle sub-image of the target to be measured with a*a pixels according to the method of step 1, obtain the standard deviation of the polarization phase angle gray value of the area to be measured according to the method of step 2, and substitute the standard deviation of the polarization phase angle gray value into the fitting function obtained in step 3 to obtain the roughness value of the target to be measured.

[0020] Furthermore, the standard deviation-roughness function is solved using the matrix method with least squares fitting, as detailed below:

[0021] Hypothesis function h θ The matrix representation of (x) is as follows:

[0022] h θ (x)=Xθ

[0023] 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;

[0024] The loss function is defined as Where y is the output vector of the sample, with a dimension of m×1;

[0025] According to the optimization method, to minimize the loss function, we need to find the point where the derivative of the loss function is zero, as shown in the following equation:

[0026]

[0027] After simplifying the above derivative equation, we get:

[0028]

[0029] The beneficial effects of this invention are as follows:

[0030] 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 grayscale values ​​from a polarization phase angle image to reflect the roughness of the target surface. Compared with the two aforementioned roughness measurement methods, it has the advantages of low cost, high accuracy, and miniaturization. Attached Figure Description

[0031] Figure 1 This is the roughness comparison sample used in the embodiments of the present invention.

[0032] Figure 2 These are grayscale images of the surface of the roughness comparison sample block at four polarization angles according to an embodiment of the present invention.

[0033] Figure 3 This is a grayscale image of the polarization phase angle of the surface of the roughness comparison sample block in an embodiment of the present invention.

[0034] Figure 4 This is a polarization phase angle image of the surface to be tested in an embodiment of the present invention.

[0035] Figure 5 It is the standard deviation-roughness fitting function in the embodiments of the present invention.

[0036] Figure 6 This is the roughness result calculated by the embodiment of the present invention (the true value of the roughness within the red box is 3.2). Detailed Implementation

[0037] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0038] The purpose of this invention is to provide a method for measuring the surface roughness of components based on polarization imaging, so as to solve the problems of high cost, low accuracy and large size of existing methods for measuring the surface roughness of industrial components.

[0039] This invention provides a method for measuring the surface roughness of components based on polarization imaging, such as... Figure 1 As shown, the roughness comparison sample block of the planer is used as the test object; as Figure 2 As shown, grayscale images of the roughness comparison sample surface at four polarization angles (0°, 45°, 90°, and 135°) were obtained; Figure 3 As shown, a polarization phase angle image of a roughness contrast sample is calculated based on the Stokes vector; as... Figure 4 As shown, a sub-image A1 of a*a pixels in size is extracted from the polarization phase angle image as the region to be tested. The standard deviation δ1 of the gray values ​​of all pixels in sub-image A1 is calculated. Then, different modules A in the roughness comparison sample block are obtained sequentially. i Standard deviation δi ;like Figure 5 As shown, a least squares fitting model is established to fit the standard deviation-roughness function model of the component surface. Finally, the standard deviation of the target surface to be measured is calculated and substituted into the fitting function model to obtain the roughness value.

[0040] The method is implemented according to the following steps:

[0041] Step 1, as follows Figure 2 , Figure 3 As shown, grayscale images of the roughness comparison sample surface at four polarization angles of 0°, 45°, 90°, and 135° are obtained, and a polarization phase angle sub-image A1 of a*a pixels is extracted from the image as the area to be tested.

[0042] Step 2: Calculate the standard deviation δ1 of the gray values ​​of all pixels in sub-image A1, and sequentially obtain the data from module A in different roughness comparison samples. i Standard deviation δ i ;

[0043] Step 3, as follows Figure 5 As shown, a least-squares fitting model is established based on the standard deviation δ of different modules in the roughness comparison sample. i and the corresponding roughness value Ra i Fit the standard deviation-roughness quadratic function of the component surface;

[0044] Step 4, as follows Figure 6 As shown, the standard deviation of the target surface to be measured is calculated and substituted into the fitting function in step 3 to obtain the roughness value.

[0045] In the technical solution of this invention, the polarization phase angle image is obtained by the Stokes vector method. To simply and effectively describe the polarization state of light, GGStokes, in his study of polarized light, proposed using a vector composed of four parameters to describe the polarization state of light, namely the Stokes vector:

[0046]

[0047] Where I represents the total illumination intensity, Q represents the illumination intensity of linearly polarized light in the 0° direction, U represents the illumination intensity of linearly polarized light in the 45° direction, and V represents the illumination intensity of circularly polarized light. The circular polarization component can usually be ignored.

[0048] The polarization phase angle of light can be calculated using the Stokes vector, i.e.:

[0049]

[0050] 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 grayscale values ​​in the polarization phase angle image, and the larger the surface roughness of a component, the higher the dispersion of the grayscale values ​​in the polarization phase angle image, 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:

[0051] h θ (x)=Xθ

[0052] 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.

[0053] The loss function is defined as Where y is the output vector of the sample, with a dimension of m×1.

[0054] 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:

[0055]

[0056] After simplifying the above derivative equation, we get:

[0057]

[0058] In the specific operation process of this invention, firstly, grayscale images of the roughness comparison sample surface at four polarization angles (0°, 45°, 90°, and 135°) are acquired. From these images, a sub-image A1 of polarization phase angle with a pixel size of a*a is extracted as the area to be measured. Secondly, the standard deviation δ1 of the grayscale values ​​of all pixels in sub-image A1 is calculated, and different standard roughness modules A1 are sequentially acquired. i Standard deviation δ i Then, a least-squares fitting model is established, based on the standard deviation δ of different modules on the comparison sample surface. i and the corresponding roughness value Ra i The standard deviation-roughness function of the component surface is fitted; finally, the standard deviation of the target surface to be measured is calculated and substituted into the standard deviation-roughness fitting function to obtain the roughness value. Specific implementation examples:

[0060] The camera used in this implementation example is a LUCID focal plane polarizing camera, and the measurement target is a planer roughness comparison sample block (containing sample blocks with four roughness values: 0.8, 1.6, 3.2, and 6.4). Figure 1As shown. Grayscale images of the roughness comparison sample surface at four polarization angles (0°, 45°, 90°, and 135°) were obtained, as shown below. Figure 2 As shown. A polarization phase angle sub-image A1 of size a*a pixels is extracted from the image as the region to be measured, as shown. Figure 3 As shown. Calculate the standard deviation δ1 of the gray values ​​of all pixels in sub-image A1, and sequentially obtain the data from module A in different roughness comparison samples. i Standard deviation δ i The obtained data points are (10, 0.8), (14, 1.6), (25, 3.2), and (38, 6.4). The goal is to find a straight line that minimizes the distance between these three points and the line.

[0061]

[0062]

[0063] Since the vector formed by the linear combination of a1, a2, and a3 can only fall within the subspace S they form, while b is not in subspace S, to minimize the error e = (y - Xθ), e should be orthogonal to subspace S, that is:

[0064] X T e = 0

[0065] X T (y-Xθ)=0

[0066] Solving for:

[0067]

[0068] By collecting the standard deviation of surface roughness, the final standard deviation-roughness fitting function is:

[0069]

Claims

1. A method for measuring the surface roughness of components based on polarization imaging, characterized in that, Includes the following steps: Step 1: The roughness comparison sample block includes N surface regions with different roughnesses; acquire grayscale images of the surface of the roughness comparison sample block at four polarization angles of 0°, 45°, 90°, and 135°, and extract N polarization phase angle sub-images A of size a*a pixels from the images. i As the test area, i = 1, 2, ..., N; each test area corresponds to a surface region with a different roughness. Step 2: Calculate A for each sub-image i The standard deviation δ of the gray values ​​of all pixels in i ; Step 3: Establish a least-squares fitting model based on the standard deviation δ of different surface roughness regions in the roughness comparison sample. i and the roughness value Ra of this region i Fit the standard deviation-roughness function of the component surface; Step 4: Calculate the standard deviation of the target surface to be measured, and substitute it into the standard deviation-roughness function fitted in Step 3 to obtain the roughness value of the target surface to be measured.

2. The method for measuring the surface roughness of a component based on polarization imaging according to claim 1, characterized in that, The specific method for obtaining grayscale images in step 1 is as follows: using a split-focus plane polarization camera or by installing and rotating a linear polarizer in front of a CCD camera, grayscale images of the roughness comparison sample surface at four polarization angles of 0°, 45°, 90°, and 135° are obtained.

3. The method for measuring the surface roughness of a component based on polarization imaging according to claim 1, characterized in that, The grayscale image of the polarization angle is obtained by the Stokes vector method, as follows: The polarization state of light is described by a vector consisting of four parameters, known as the Stokes vector: Where I represents the total illumination intensity, Q represents the illumination intensity of linearly polarized light at 0°, U represents the illumination intensity of linearly polarized light at 45°, and V represents the illumination intensity of circularly polarized light; I 0o I 45o I 90o I 135o I represents the light intensity at polarization directions of 0°, 45°, 90°, and 135°, respectively. lh I rh These represent the light intensities corresponding to left-handed and right-handed circularly polarized light, respectively. The polarization phase angle of light is calculated using the Stokes vector, i.e.:

4. The method for measuring the surface roughness of a component based on polarization imaging according to claim 1, characterized in that, The specific method for calculating the standard deviation in step 2 is as follows: Calculate the polarization phase angle image A. i The average grayscale value of all pixels is calculated, and the standard deviation of the grayscale value of each pixel relative to the average value is calculated sequentially. The average of the standard deviations of all pixels relative to the average value is taken as the standard deviation of module A1.

5. The method for measuring the surface roughness of a component based on polarization imaging according to claim 1, characterized in that, The specific method of step 4 is as follows: obtain a polarization phase angle sub-image of the target to be measured with a*a pixels according to the method of step 1, obtain the standard deviation of the polarization phase angle gray value of the area to be measured according to the method of step 2, and substitute the standard deviation of the polarization phase angle gray value into the fitting function obtained in step 3 to obtain the roughness value of the target to be measured.

6. The method for measuring the surface roughness of a component based on polarization imaging according to claim 1, characterized in that, The standard deviation-roughness function 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, to minimize the loss function, we need 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。