Surface topography detection method based on kalman filtering and polarized image cropping stacking
Patent Information
- Application Number
- CN202311810779.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-12-27
AI Technical Summary
但由于目标表面的粗糙纹理灰度值分布均匀使得揭示的粗糙度信息很少,传统视觉方法难以提取出足够数量和准确的特征点,这导致了粗糙度测量结果不稳定
[0052]传统基于探针的表面形貌粗糙度值测量方法需要直接接触被测目标,测量过程涉及表面划伤,因此不适合软质材料,其次探针的精度取决于其尖端半径,无法准确测量比触控笔尖端更小的裂缝表面,最后该方法测量时间长、对某些环境有额外要求且设置复杂;传统基于计算机视觉方法依赖于特征提取来量化目标表面形态并建立预测模型。然而目标表面的粗糙纹理灰度值分布均匀使得揭示的粗糙度信息很少,传统计算机视觉方法难以提取出足够数量和准确的特征点,导致了粗糙度测量结果不稳定。本方法利用目标表面的偏振特性获取法向量和偏振相角作为特征描述符,与上述两种表面形貌粗糙度值测量方法相比,具有非接触、测量速度快、系统小型化和受环境因素影响较低的优势,且由偏振统计特性可以获取准确且数量丰富的特征描述符,使得测量结果的稳定性更强。
Smart Images

Figure CN117893483B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision technology, specifically relating to a surface topography detection method based on Kalman filtering and polarization image cropping and stacking. Background Technology
[0002] Surface roughness is a crucial indicator for evaluating the surface quality of machined parts. It is closely related to the fit, wear resistance, fatigue strength, contact stiffness, vibration, and noise of mechanical components, and has a significant impact on product lifespan and reliability. Therefore, accurate measurement of the surface roughness of target surfaces is an important requirement in precision engineering and manufacturing.
[0003] Existing measurement methods are mainly divided into probe methods and computer vision-based methods. Probe methods utilize a diamond stylus that slowly slides along the surface being measured; the vertical displacement of the stylus is converted into surface roughness values. Probe-type measuring instruments have been applied in many industrial production workshops, but this method has some limitations. First, because the measurement process involves surface scratches, it is not suitable for soft materials. Second, the accuracy of the stylus depends on its tip radius, making it unable to accurately measure cracks smaller than the tip of a stylus. Finally, this method has long measurement times, additional requirements for certain environments, and complex setup. Computer vision methods rely on feature extraction to quantify the target surface morphology and build predictive models. However, because the grayscale values of the rough texture on the target surface are uniformly distributed, the revealed roughness information is limited, making it difficult for traditional vision methods to extract a sufficient number and accuracy of feature points, leading to unstable roughness measurement results. To address this problem, this invention proposes a novel surface morphology detection method based on Kalman filtering and polarization image cropping and stacking.
[0004] The surface topography detection method based on Kalman filtering and polarization image cropping and stacking is a non-contact method. Compared with the traditional probe method, this method does not damage the surface of the target object, can be applied to soft materials, and has the advantages of fast measurement speed, high accuracy, and miniaturized measurement system. Compared with the traditional computer vision method, this method can obtain accurate and abundant normal vector and polarization phase angle information as feature points by utilizing the statistical characteristics of polarization images. More and more accurate feature points make the roughness measurement results more stable. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention provides a surface topography detection method based on Kalman filtering and polarization image cropping and stacking. First, polarization images of the surface of a roughness comparison sample are acquired at four angles. The polarization parameters of the roughness comparison sample surface are calculated by solving the Stokes vector, establishing the relationship between the target surface polarization characteristics and the surface normal vector and polarization phase angle. Second, a sample is selected from the roughness comparison samples, and the area to be measured is extracted. The dispersion of all normal vectors and their average, and all polarization phase angles and their average, are calculated. The dispersion of the normal vectors and polarization phase angles of four different standard roughness modules is obtained sequentially. A least-squares fitting model is established to fit the surface normal vector dispersion-roughness value function model of the roughness comparison sample surface. A roughness value function model is used to determine the roughness. Then, a region within the roughness comparison sample is selected, and the dispersion of the normal vector and the dispersion of the polarization phase angle are calculated. These are then substituted into the fitting model to obtain the roughness value. The above experiment is repeated multiple times to obtain the standard deviation of the two calculation results. The fusion coefficient is calculated to obtain the optimal roughness estimation model. Finally, a region within the roughness comparison sample is selected, and the roughness value is calculated using the optimal roughness estimation model. This region is then cut into multiple independent, equal-area small squares. The roughness value of each small square region is calculated sequentially using the optimal roughness estimation model. The overall roughness value of the region is used as the estimated value input. The roughness values of the small square regions are stacked into a stack and used as the measured value input. The optimal roughness estimate is calculated using the Kalman filter method. This invention has the advantages of being non-contact, having a fast measurement speed, miniaturized system, and less affected by environmental factors. Furthermore, accurate and abundant feature descriptors can be obtained from the polarization statistical characteristics, resulting in stronger stability of the measurement results.
[0006] The technical solution adopted by this invention to solve its technical problem includes the following steps:
[0007] Step 1: Obtain polarization images of the surface of the roughness comparison sample at four angles;
[0008] Step 2: Calculate the polarization parameters of the roughness comparison sample surface by solving the Stokes vector, and establish the relationship between the polarization characteristics of the target surface and the surface normal vector and the surface polarization phase angle;
[0009] Step 3: Select a sample block from the roughness comparison sample block and extract region A as the test area. Calculate the average value of all normal vectors and polarization phase angles in this region. Calculate the dispersion of all normal vectors and the average value of normal vectors in A and take the average value. Calculate the dispersion of all polarization phase angles and the average value of polarization phase angles in A and take the average value. Sequentially obtain the dispersion measure values of normal vectors and polarization phase angles of four different standard roughness modules.
[0010] Step 4: Establish a least squares fitting model to fit the surface roughness comparison sample surface normal vector dispersion degree-roughness value function model and polarization phase angle dispersion degree-roughness value function model;
[0011] Step 5: Select region B in the roughness comparison sample block to be tested, calculate the dispersion of the normal vector and the dispersion of the polarization phase angle in B, and substitute them into the corresponding fitting model to obtain the roughness value. Ra AoP The standard deviations of the two calculation results were obtained by performing the calculation multiple times. σ AoP The fusion coefficients are calculated, and the optimal estimation model for roughness is obtained.
[0012] Step 6: Calculate the overall roughness value of the test area C using the optimal roughness estimation model. Cut the area C into n*n independent small squares of equal area, and calculate the roughness value Ra of each small square area using the estimation model. i i = 1, 2, ..., n*n;
[0013] Step 7: Set the roughness value of region C As the input for the estimate, the roughness values of all the small squares are stacked into a stack and then used as the input for the measurement. The optimal roughness estimate is then calculated using the Kalman filter method.
[0014] Further, the specific method of step 1 is as follows: using a split-focus plane polarization camera or by installing and rotating a linear polarizer in front of an ordinary camera, polarization images of the roughness comparison sample at four angles of 0°, 45°, 90°, and 135° are obtained.
[0015] Further, the specific method of step 2 is as follows: by solving the Stokes vector, the surface polarization degree and polarization phase angle information of the roughness comparison sample are calculated, the zenith angle and orientation angle information are obtained, and then the surface normal vector and polarization phase angle distribution are obtained;
[0016] The polarization state of light is described by a vector consisting of four parameters, known as the Stokes vector:
[0017]
[0018] Where S0 represents the total illumination intensity, S1 represents the illumination intensity of linearly polarized light at 0°, S2 represents the illumination intensity of linearly polarized light at 45°, S3 represents the illumination intensity of circularly polarized light, and I 0° I 45° I 90° I 135° These represent the light intensity captured by the camera when the linear polarizer is rotated to 0°, 45°, 90°, and 135°, respectively. lhI rh These represent left-handed and right-handed circularly polarized light, respectively.
[0019] Based on the Stokes parameters, the degree of polarization DoLP and the polarization phase angle AoP are further calculated using the following formulas:
[0020]
[0021]
[0022] Considering only the linear polarization case, the Stokes parameter S3 = 0 is taken here;
[0023] Normal vector zenith angle θ d The relationship with the degree of polarization ρ is as follows:
[0024]
[0025] Where n is the refractive index of the material;
[0026] The relationship between the normal vector azimuth angle φ and the polarization phase angle AoP is:
[0027]
[0028] Since the Stokes vector gives the direction of the azimuth plane, this relationship can be used to eliminate the ambiguity between the polarization phase angle AoP and the azimuth angle φ, and the following formula can be used for calculation:
[0029]
[0030] In the above formula, sgn() is a symbolic function;
[0031] by If a normal vector represents a point on the surface of an object, then the standard form of the normal vector can be expressed as:
[0032]
[0033] Where θ d φ is the zenith angle of the normal vector, and φ is the azimuth angle.
[0034] Further, the specific method of step 3 is as follows: select a sample block from the roughness comparison sample block and extract a square region A as the region to be tested. Calculate the average value of all normal vectors and polarization phase angles in region A. Then calculate the dispersion measure of all normal vectors and the average value of normal vectors in A and take the average value. Calculate the dispersion measure of all polarization phase angles and the average value of polarization phase angles in A and take the average value. Sequentially obtain the dispersion measure of normal vectors and polarization phase angles of four different standard roughness modules.
[0035] Further, the specific method of step 4 is as follows: establish a least squares fitting model, and use the average cosine similarity of the normal vectors of the four different standard roughness modules obtained in step 3 and their corresponding different roughness standard values Ra = 0.8, 1.6, 3.2, 6.3 to fit a normal vector average cosine similarity-roughness value function model. Use the average standard deviation of the orientation angle of the four different standard roughness modules obtained in step 3 and their corresponding different roughness standard values to fit a polarization phase angle average standard deviation-roughness value function model.
[0036] Furthermore, the specific method of step 5 is as follows: select region B in the roughness comparison sample block, calculate the dispersion of the normal vector of region B, and substitute it into the fitting function model in step 4 to obtain the roughness value. The degree of polarization phase angle dispersion in region B is calculated and substituted into the fitting function model in step 4 to obtain the roughness value Ra. AoP The standard deviations of the two calculation results were obtained by performing the calculation multiple times. σ AoP Assuming that both calculation results follow a normal distribution, the fusion coefficient is calculated and the optimal estimation model for roughness is obtained.
[0037] Furthermore, step 7 specifically includes:
[0038] First, polarization data of the target surface is acquired and polarization statistical characteristics are calculated. Then, a measurement area is selected, and the measurement result is obtained using the normal vector cosine similarity-roughness function model. The standard deviation was calculated through multiple measurements. The first measurement result Ra is obtained using the orientation angle standard deviation-roughness function model. AoP The standard deviation σ was calculated through multiple measurements. AoP The fused measurement data is denoted as The optimal roughness estimation model can then be written in the following form:
[0039]
[0040] Where λ represents the fusion coefficient, which can be calculated by the following formula:
[0041]
[0042] Select region C from the roughness comparison sample block to be tested, and calculate the roughness value of region C using the optimal estimation model. Use this as an estimate; divide region C into n*n independent and equal-area small squares, and use the optimal estimation model to calculate the roughness value Ra of each small square region in turn. i(i = 1, 2, ..., n*n), which can be used as the measured value, and the optimal estimate of roughness can be calculated using the Kalman filtering method;
[0043] Current roughness estimate:
[0044]
[0045] in, It is an estimate of the previous small area, K k It is the Kalman gain, Z k Let e be the current measured value, and let e be the estimation error and the measurement error respectively. EST e MEA Then the Kalman gain is:
[0046]
[0047] The roughness measurement process based on Kalman filtering is as follows:
[0048] Step 1: Calculate the Kalman gain
[0049] Step 2: Calculate the current roughness estimate
[0050] Step 3: Update the estimated error e of the current measurement. ESTk = (1-K) k )e ESTk-1 .
[0051] The beneficial effects of this invention are as follows:
[0052] Traditional probe-based methods for measuring surface roughness require direct contact with the target, involving surface scratches and thus unsuitable for soft materials. Secondly, the accuracy of the probe depends on its tip radius, making it inaccurate for measuring cracks smaller than a stylus tip. Finally, these methods are time-consuming, have additional environmental requirements, and are complex to set up. Traditional computer vision-based methods rely on feature extraction to quantify the target surface morphology and build a predictive model. However, the uniform distribution of grayscale values in the rough texture of the target surface reveals very little roughness information, making it difficult for traditional computer vision methods to extract a sufficient number and accuracy of feature points, leading to unstable roughness measurement results. This method utilizes the polarization characteristics of the target surface to obtain the normal vector and polarization phase angle as feature descriptors. Compared to the two methods mentioned above, this method offers advantages such as non-contact measurement, high measurement speed, system miniaturization, and lower susceptibility to environmental factors. Furthermore, the polarization statistical characteristics allow for the acquisition of accurate and abundant feature descriptors, resulting in stronger measurement stability. Attached Figure Description
[0053] Figure 1 This is the overall roadmap of the method of the present invention;
[0054] Figure 2 This is a planer roughness comparison sample used in the embodiments of the present invention;
[0055] Figure 3 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;
[0056] Figure 4 This embodiment of the invention extracts the test area A from the roughness comparison sample block;
[0057] Figure 5 This is the fitting function of mean cosine similarity of normal vectors - roughness value in the embodiments of the present invention;
[0058] Figure 6 This is the polarization phase angle standard deviation - roughness value fitting function in the embodiments of the present invention;
[0059] Figure 7 This embodiment of the invention extracts the test area B from the roughness comparison sample block;
[0060] Figure 8 This is a schematic diagram illustrating the calculation of the roughness value of region C as a whole and after trimming in an embodiment of the present invention;
[0061] Figure 9 This is a schematic diagram of the process for calculating the optimal roughness estimation result using Kalman filtering in an embodiment of the present invention;
[0062] Figure 10 This is the roughness value estimation result based on the Kalman filtering method in this embodiment of the invention (true value Ra = 3.2). Detailed Implementation
[0063] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0064] The purpose of this invention is to provide a surface topography detection method based on Kalman filtering and polarization image cropping and stacking, in order to solve the problem that the uniform distribution of gray values of rough texture on the target surface results in little roughness information, making it difficult for traditional computer vision methods to extract a sufficient number and accurate number of feature points, leading to unstable surface topography parameter roughness measurement results.
[0065] This invention provides a surface topography detection method based on Kalman filtering and polarization image cropping and stacking. For example... Figure 1 The diagram shown is an overall roadmap of the method of this invention. Figure 2 As shown, a planer roughness comparison sample block was used as the test object. Figure 3As shown, polarization images of the roughness comparison sample surface at four angles (0°, 45°, 90°, and 135°) were obtained. The polarization parameters of the roughness comparison sample surface were calculated by solving the Stokes vector, establishing the relationship between the target surface polarization characteristics and the surface normal vector and surface polarization phase angle. Figure 4 As shown, a sample block is selected from the roughness comparison sample blocks, and region A is extracted as the test region. The average values of all normal vectors and polarization phase angles in this region are calculated. The dispersion measure of all normal vectors and the average value of normal vectors in A is calculated and averaged. The dispersion measure of all polarization phase angles and the average value of polarization phase angles in A is calculated and averaged. The dispersion measures of normal vectors and polarization phase angles of four different standard roughness modules are obtained in sequence. Figure 5 As shown, a least-squares fitting model is established to fit the surface roughness comparison sample's surface normal vector dispersion-roughness value function model. Figure 6 As shown, a least-squares fitting model is established to fit the polarization phase angle dispersion-roughness value function model of the roughness comparison sample surface. Figure 7 As shown, region B in the roughness comparison sample block to be measured is selected. The dispersion of the normal vector and the dispersion of the polarization phase angle in B are calculated and substituted into the corresponding fitting model to obtain the roughness value. Ra AoP The standard deviations of the two calculation results were obtained by conducting the above experiments multiple times. σ AoP The fusion coefficients are calculated, and the optimal estimation model for roughness is obtained. For example... Figure 8 As shown, region C in the roughness comparison sample block is selected, and the overall roughness value of region C is calculated using the optimal roughness estimation model. Region C is cut into n*n independent small squares of equal area, and the roughness value Ra of each small square region is calculated sequentially using the estimation model. i (i=1, 2,...,n*n). like Figure 9 As shown, the roughness value of region C is... As the input for the estimate, the stack of roughness values of all small squares is used as the input for the measurement, and the optimal estimate of the roughness is calculated using the Kalman filtering method.
[0066] The method is implemented according to the following steps:
[0067] Step 1, as follows Figure 3 As shown, polarization images of the roughness comparison sample at four angles (0°, 45°, 90°, and 135°) are obtained by using a split-focus plane polarization camera or by mounting and rotating a linear polarizer in front of a regular camera.
[0068] Step 2: Calculate the surface polarization degree and polarization phase angle information of the roughness comparison sample by solving the Stokes vector, and obtain the zenith angle and orientation angle information, thereby obtaining the surface normal vector and polarization phase angle distribution;
[0069] Step 3, as follows Figure 4 As shown, a sample block is selected from the roughness comparison sample block and a square region A is extracted as the test area. The average values of all normal vectors and polarization phase angles in region A are calculated respectively. Then, the dispersion measure of all normal vectors and the average value of normal vectors in A is calculated and the average value is taken. The dispersion measure of all polarization phase angles and the average value of polarization phase angles in A is calculated and the average value is taken. The dispersion measure values of normal vectors and polarization phase angles of four different standard roughness modules are obtained in turn.
[0070] Step 4, as follows Figure 5 As shown, a least-squares fitting model is established. Using the average cosine similarity of the normal vectors of the four different standard roughness modules obtained in step three and their corresponding different roughness standard values (Ra = 0.8, 1.6, 3.2, 6.3), a normal vector average cosine similarity-roughness value function model is fitted; as shown... Figure 6 As shown, using the average standard deviation of the orientation angles of the four different standard roughness modules obtained in step three and their corresponding different roughness standard values, a function model of average standard deviation of polarization phase angle - roughness value is fitted.
[0071] Step 5, as follows Figure 7 As shown, region B in the roughness comparison sample is selected, the dispersion of the normal vector of region B is calculated, and the roughness value is obtained by substituting it into the fitting function model in step four. The degree of polarization phase angle dispersion in region B is calculated and substituted into the fitting function model in step four to obtain the roughness value Ra. AoP The standard deviations of the two calculation results were obtained by conducting the above experiments multiple times. σ AoP Assuming that both calculations follow a normal distribution, the fusion coefficient is calculated and the optimal estimation model for roughness is obtained;
[0072] Step 6, as follows Figure 8 As shown, region C in the roughness comparison sample block is selected, and the roughness value of C is calculated using the optimal roughness estimation model in step five. Cut C into n*n independent small squares of equal area, and calculate the roughness value Ra of each small square region sequentially using the optimal estimation model from step five. i (i = 1, 2, ..., n*n);
[0073] Step 7, as follows Figure 9 As shown, the roughness value of region C is... As an input for the estimate, the roughness values of the small squares are stacked into a stack and then used as the input for the measurement. The optimal roughness estimate is then calculated using a Kalman filter.
[0074] 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:
[0075]
[0076] Where S0 represents the total illumination intensity, S1 represents the illumination intensity of linearly polarized light in the 0° direction, S2 represents the illumination intensity of linearly polarized light in the 45° direction, S3 represents the illumination intensity of circularly polarized light, and I 0° I 45° I 90° I 135° These represent the light intensity captured by the camera when the linear polarizer is rotated to 0°, 45°, 90°, and 135°, respectively. lh I rh These represent left-handed and right-handed circularly polarized light, respectively.
[0077] 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:
[0078]
[0079]
[0080] This invention only considers the linear polarization case, therefore the Stokes parameter S3 = 0 is taken here.
[0081] Normal vector zenith angle θ d The relationship with the degree of polarization ρ is as follows:
[0082]
[0083] Where n is the refractive index of the material.
[0084] The relationship between the normal vector azimuth angle φ and the polarization phase angle AoP is:
[0085]
[0086] Since the Stokes vector gives the direction of the azimuth plane, this relationship can be used to eliminate the ambiguity between the polarization phase angle AoP and the azimuth angle φ, which can be calculated using the following formula:
[0087]
[0088] In the above formula, sgn() is a symbolic function.
[0089] by If a normal vector represents a point on the surface of an object, then the standard form of the normal vector can be expressed as:
[0090]
[0091] Where θ d φ is the zenith angle of the normal vector, and φ is the azimuth angle.
[0092] In the technical solution of this invention, based on the experimental finding that the smaller the surface roughness of the target object, the lower the dispersion of the surface normal vector distribution and the polarization phase angle distribution; and the larger the surface roughness of the target object, the higher the dispersion of the surface normal vector distribution and the polarization phase angle distribution, the least squares method is used to fit the required normal vector cosine similarity-roughness function model and the orientation angle standard deviation-roughness function model, respectively. 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:
[0093] h θ (x)=Xθ
[0094] 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.
[0095] The loss function is defined as Where y is the output vector of the sample, with a dimension of m×1.
[0096] 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:
[0097]
[0098] After simplifying the above derivative equation, we get:
[0099] θ=(X T X) -1 X T y
[0100] This invention uses a Kalman filter-based data processing method to fuse data obtained from two function models. First, polarization data of the target surface is acquired and polarization statistical characteristics are calculated. Then, a measurement area is selected, and a measurement result is obtained using the normal vector cosine similarity-roughness function model. The standard deviation was calculated through multiple measurements. The first measurement result Ra is obtained using the orientation angle standard deviation-roughness function model. AoP The standard deviation σ was calculated through multiple measurements. AoP The fused measurement data is denoted as The optimal roughness estimation model can then be written in the following form:
[0101]
[0102] Where λ represents the fusion coefficient, which can be calculated by the following formula:
[0103]
[0104] Select region C from the roughness comparison sample block and calculate the roughness value of region C using the optimal estimation model. Use this as an estimate; divide region C into n*n independent and equal-area small squares, and use the optimal estimation model to calculate the roughness value Ra of each small square region in turn. i (i = 1, 2, ..., n*n), using these as measured values, the optimal roughness estimate can be calculated using a Kalman filter.
[0105] Current roughness estimate:
[0106]
[0107] in, It is an estimate of the previous small region, K k It is the Kalman gain, Z k Let e be the current measured value, and let e be the estimation error and the measurement error respectively. EST e MEA Then the Kalman gain is:
[0108]
[0109] The roughness measurement process based on Kalman filtering is as follows:
[0110] Step 1: Calculate the Kalman gain
[0111] Step 2: Calculate the current roughness estimate
[0112] Step 3: Update the estimated error e of the current measurement. ESTk = (1-K) k )e ESTk-1 .
[0113] Example:
[0114] The camera used in this embodiment is a LUCID focal plane polarization camera. The overall roadmap of the method of this invention is as follows: Figure 1 As shown. The measurement target is a roughness comparison sample block for a planer (containing sample blocks with four roughness values: Ra = 0.8, 1.6, 3.2, and 6.3 respectively). Figure 2 As shown. Grayscale images of the roughness comparison sample surface at four polarization angles (0°, 45°, 90°, and 135°) were obtained, as shown below. Figure 3 As shown, the polarization parameters of the roughness comparison sample surface are calculated by solving the Stokes vector, and the relationship between the polarization characteristics of the target surface and the surface normal vector and surface polarization phase angle is established.
[0115] The process of calculating the normal vector dispersion-roughness value fitting model is as follows:
[0116] Using planer roughness comparison samples containing four roughness standard values (Ra=0.8, Ra=1.6, Ra=3.2, Ra=6.3) as targets, sub-images A of size a*a pixels are extracted from the image regions of the sample blocks of each of the four roughness standard values. 0.8 A 1.6 A 3.2 A 6.3 Calculate region A sequentially i Surface normal vector mean cosine similarity (A 0.8 =0.9174, A 1.6 =0.8449, A 3.2 =0.7111, A 6.3 =0.6125), and the obtained data points are (0.9174, 0.8), (0.8449, 1.6), (0.7111, 3.2), and (0.6125, 6.3). Now we want to find a curve such that the distance between these four points and the curve is as small as possible:
[0117]
[0118] 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:
[0119] X T e=0
[0120] X T (y-Xθ)=0
[0121] Solving for:
[0122]
[0123] The final fitting function for the normal vector discreteness-roughness value is:
[0124]
[0125] The process of calculating the polarization phase angle dispersion-roughness value fitting model is as follows:
[0126] Using planer roughness comparison samples containing four roughness standard values (Ra=0.8, Ra=1.6, Ra=3.2, Ra=6.3) as targets, sub-images A of size a*a pixels are extracted from the image regions of the sample blocks of each of the four roughness standard values. 0.8 A 1.6 A 3.2 A 6.3 Calculate region A sequentially i The degree of polarization phase angle dispersion (A) 0.8 =9.8178, A 1.6 =13.9219, A 3.2 =25.2861, A 6.3 =38.0826), and the obtained data points are (9.8178, 0.8), (13.9219, 1.6), (25.2861, 3.2), and (38.0826, 6.3). Now we want to find a curve such that the distance of these four points from the curve is as small as possible:
[0127]
[0128] 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:
[0129] X T e=0
[0130] X T (y-Xθ)=0
[0131] Solving for:
[0132]
[0133] The final fitting function for the polarization phase angle dispersion-roughness value is:
[0134]
[0135] The process of calculating the optimal roughness estimation model is as follows:
[0136] Select region B from the roughness comparison sample block to be measured, calculate the dispersion measure of the normal vector and the dispersion measure of the polarization phase angle in B, and substitute them into the fitting model to obtain the roughness value. Ra AoP =3.25, and the standard deviations of the two calculated results were obtained by repeating the above experiment multiple times. σ AoP =0.1378, the fusion coefficient is calculated using the following formula:
[0137]
[0138] The optimal roughness estimation model is:
[0139]
[0140] The process of calculating the optimal roughness estimate using Kalman filtering is as follows:
[0141] The overall roughness value of the measured region C is calculated using the optimal roughness estimation model. Region C is divided into independent 3x3 squares of equal area. The roughness value of each square is calculated sequentially using the estimation model: Ra1 = 3.31, Ra2 = 3.05, Ra3 = 3.22, Ra4 = 3.18, Ra5 = 3.13, Ra6 = 3.25, Ra7 = 3.40, Ra8 = 3.19, and Ra9 = 3.27. The roughness values of region C are then... As the estimated input, the roughness values of all nine small squares are stacked into a stack and then used as the measured input. The roughness value is calculated using the Kalman filter method. The calculation process is as follows: Figure 9 As shown. Finally, the optimal roughness estimate Ra = 3.2 was calculated using the Kalman filter method (the true value is Ra = 3.2), as shown. Figure 10 As shown.
[0142] This invention discloses a surface topography detection method based on Kalman filtering and polarization image cropping and stacking. This method is based on the following experimental findings: the smaller the surface roughness of the target object, the lower the dispersion of the surface normal vector distribution and the polarization phase angle distribution; the larger the surface roughness of the target object, the higher the dispersion of the surface normal vector distribution and the polarization phase angle distribution. First, polarization images of the roughness comparison sample surface at four angles are acquired. The polarization parameters of the roughness comparison sample surface are calculated by solving the Stokes vector, establishing the relationship between the target surface polarization characteristics and the surface normal vector and polarization phase angle. Second, a sample block is selected from the roughness comparison sample block, and region A is extracted as the test area. The dispersion of all normal vectors and their average, and all polarization phase angles and their average in A are calculated. The dispersion of the normal vectors and polarization phase angles of four different standard roughness modules is obtained sequentially. A least-squares fitting model is established to fit the surface roughness comparison sample surface normal vector dispersion-roughness value function model and polarization phase angle dispersion-roughness value function model. Then, region B in the roughness comparison sample block to be tested is selected, and the dispersion of the normal vectors and polarization phase angles in B are calculated and substituted into the fitting model to obtain the roughness value. Ra AoP The standard deviations of the two calculation results were obtained by conducting the above experiments multiple times. σ AoP The fusion coefficient is calculated to obtain the optimal roughness estimation model. Finally, region C in the roughness comparison sample block is selected, and the roughness value of C is calculated using the optimal roughness estimation model. Region C is then cut into n*n independent small squares of equal area, and the roughness value Ra of each small square region is calculated sequentially using the optimal roughness estimation model. i (i = 1, 2, ..., n*n), the roughness value of region C is used as the estimated value input, and the roughness values of small squares are stacked into a stack and used as the measured value input. The optimal estimation result of the surface topography parameter roughness value is calculated using a Kalman filter.
Claims
1. A surface topography detection method based on Kalman filtering and polarization image cropping and stacking, characterized in that, Includes the following steps: Step 1: Obtain polarization images of the surface of the roughness comparison sample at four angles; Step 2: Calculate the polarization parameters of the roughness comparison sample surface by solving the Stokes vector, and establish the relationship between the polarization characteristics of the target surface and the surface normal vector and the surface polarization phase angle; Step 3: Select a sample block from the roughness comparison sample block and extract region A as the test area. Calculate the average value of all normal vectors and polarization phase angles in this region. Calculate the dispersion of all normal vectors and the average value of normal vectors in A and take the average value. Calculate the dispersion of all polarization phase angles and the average value of polarization phase angles in A and take the average value. Sequentially obtain the dispersion measure values of normal vectors and polarization phase angles of four different standard roughness modules. Step 4: Establish a least squares fitting model to fit the surface roughness comparison sample surface normal vector dispersion degree-roughness value function model and polarization phase angle dispersion degree-roughness value function model; Step 5: Select region B in the roughness comparison sample block to be tested, calculate the dispersion of the normal vector and the dispersion of the polarization phase angle in B, and substitute them into the corresponding fitting model to obtain the roughness value. Ra AoP The standard deviations of the two calculation results were obtained by performing the calculation multiple times. σ AoP The fusion coefficients are calculated, and the optimal estimation model for roughness is obtained. Step 6: Calculate the overall roughness value of the test area C using the optimal roughness estimation model. Cut the area C into n*n independent small squares of equal area, and calculate the roughness value Ra of each small square area using the estimation model. i i = 1, 2, ..., n*n; Step 7: Set the roughness value of region C As the input for the estimate, the roughness values of all the small squares are stacked into a stack and then used as the input for the measurement. The optimal roughness estimate is then calculated using the Kalman filter method.
2. The surface topography detection method based on Kalman filtering and polarization image cropping and stacking according to claim 1, characterized in that, The specific method of step 1 is as follows: using a split-focus plane polarization camera or by installing and rotating a linear polarizer in front of an ordinary camera, polarization images of the roughness comparison sample at four angles of 0°, 45°, 90°, and 135° are obtained.
3. The surface topography detection method based on Kalman filtering and polarization image cropping and stacking according to claim 2, characterized in that, The specific method of step 2 is as follows: by solving the Stokes vector, the surface polarization degree and polarization phase angle information of the roughness comparison sample are calculated, the zenith angle and orientation angle information are obtained, and then the surface normal vector and polarization phase angle distribution are obtained; The polarization state of light is described by a vector consisting of four parameters, known as the Stokes vector: Where S0 represents the total illumination intensity, S1 represents the illumination intensity of linearly polarized light at 0°, S2 represents the illumination intensity of linearly polarized light at 45°, S3 represents the illumination intensity of circularly polarized light, and I 0° I 45° I 90° I 135° These represent the light intensity captured by the camera when the linear polarizer is rotated to 0°, 45°, 90°, and 135°, respectively. lh I rh These represent left-handed and right-handed circularly polarized light, respectively. Based on the Stokes parameters, the degree of polarization DoLP and the polarization phase angle AoP are further calculated using the following formulas: Considering only the linear polarization case, the Stokes parameter S3 = 0 is taken here; Normal vector zenith angle θ d The relationship with the degree of polarization ρ is as follows: Where n is the refractive index of the material; The relationship between the normal vector azimuth angle φ and the polarization phase angle AoP is: Since the Stokes vector gives the direction of the azimuth plane, this relationship can be used to eliminate the ambiguity between the polarization phase angle AoP and the azimuth angle φ, and the following formula can be used for calculation: In the above formula, sgn() is a symbolic function; by If a normal vector represents a point on the surface of an object, then the standard form of the normal vector is: Where θ d φ is the zenith angle of the normal vector, and φ is the azimuth angle.
4. The surface topography detection method based on Kalman filtering and polarization image cropping and stacking according to claim 3, characterized in that, The specific method of step 3 is as follows: Select a sample block from the roughness comparison sample block and extract a square region A as the region to be tested. Calculate the average value of all normal vectors and polarization phase angles in region A. Then calculate the dispersion measure of all normal vectors and the average value of normal vectors in A and take the average value. Calculate the dispersion measure of all polarization phase angles and the average value of polarization phase angles in A and take the average value. Sequentially obtain the dispersion measure of normal vectors and polarization phase angles of four different standard roughness modules.
5. The surface topography detection method based on Kalman filtering and polarization image cropping and stacking according to claim 4, characterized in that, The specific method of step 4 is as follows: establish a least squares fitting model, and use the average cosine similarity of the normal vectors of the four different standard roughness modules obtained in step 3 and their corresponding different roughness standard values Ra = 0.8, 1.6, 3.2, and 6.3 to fit a normal vector average cosine similarity-roughness value function model. Use the average standard deviation of the orientation angle of the four different standard roughness modules obtained in step 3 and their corresponding different roughness standard values to fit a polarization phase angle average standard deviation-roughness value function model.
6. The surface topography detection method based on Kalman filtering and polarization image cropping and stacking according to claim 5, characterized in that, The specific method of step 5 is as follows: Select region B in the roughness comparison sample block, calculate the dispersion of the normal vector of region B, and substitute it into the fitting function model in step 4 to obtain the roughness value. The degree of polarization phase angle dispersion in region B is calculated and substituted into the fitting function model in step 4 to obtain the roughness value Ra. AoP The standard deviations of the two calculation results were obtained by performing the calculation multiple times. σ AoP Assuming that both calculation results follow a normal distribution, the fusion coefficient is calculated and the optimal estimation model for roughness is obtained.
7. The surface topography detection method based on Kalman filtering and polarization image cropping and stacking according to claim 6, characterized in that, Step 7 specifically involves: First, polarization data of the target surface is acquired and polarization statistical characteristics are calculated. Then, a measurement area is selected, and the measurement result is obtained using the normal vector cosine similarity-roughness function model. The standard deviation was calculated through multiple measurements. The first measurement result Ra is obtained using the orientation angle standard deviation-roughness function model. AoP The standard deviation σ was calculated through multiple measurements. AoP The fused measurement data is denoted as The optimal roughness estimation model can then be written in the following form: Where λ represents the fusion coefficient, which can be calculated by the following formula: Select region C from the roughness comparison sample block to be tested, and calculate the roughness value of region C using the optimal estimation model. Use this as an estimate; divide region C into n*n independent and equal-area small squares, and use the optimal estimation model to calculate the roughness value Ra of each small square region in turn. i Using this as a measurement value, the optimal roughness estimate can be calculated using the Kalman filtering method; Current roughness estimate: in, It is an estimate of the previous small area, K k It is the Kalman gain, Z k Let e be the current measured value, and let e be the estimation error and the measurement error respectively. EST e MEA Then the Kalman gain is: The roughness measurement process based on Kalman filtering is as follows: Step 1: Calculate the Kalman gain Step 2: Calculate the current roughness estimate Step 3: Update the estimated error e of the current measurement. ESTk = (1-K) k )e ESTk-1 .
Citation Information
Patent Citations
Three-dimensional roughness detection device and method based on polarization imaging
CN114076579A
Roughness measuring device and method based on pBRDF and dynamic TS algorithm
CN116448020A