A grazing phase deflection smooth inner wall surface measurement method
Through the grazing phase deflection method and column coordinate system integration technology, the problem of limited measurement range and insufficient accuracy of smooth inner wall surface shape in traditional phase deflection measurement is solved, and high-precision measurement of smooth inner wall surface shape is achieved.
Patent Information
- Application Number
- CN202510034947.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-01-09
AI Technical Summary
Traditional phase deflection measurement methods cannot obtain the complete surface shape of the smooth inner wall at one time, and the splicing accuracy is not high, resulting in insufficient measurement accuracy of the surface shape of the smooth inner wall.
The glazed phase deflection method is used to set the camera and the screen on the opposite side of the part to be tested respectively, and the screen moves between the proximal and distal ends. The normal vector of feature points is obtained through phase resolution and coordinate system conversion, and the smooth inner wall surface shape is reconstructed in combination with the column coordinate system integration method.
Complete measurement of the smooth inner wall surface shape is achieved, the measurement accuracy and accuracy are improved, and the problems of limited measurement range and low splicing accuracy in traditional methods are avoided.
Smart Images

Figure CN119803353B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smooth inner wall surface shape measurement, and in particular to a grazing incidence phase deflection smooth inner wall surface shape measurement method. Background Art
[0002] In industrial production applications, many parts have smooth inner walls, such as the inner wall of a sleeve, a ring gauge, and a multi-faceted optical free-form surface. Due to processing errors in the manufacturing process, errors in the inner wall shape are inevitable. Therefore, the inner wall shape needs to be measured to prevent it from affecting the final performance of the workpiece and causing irreparable losses. Common measurement methods are mainly divided into two types: penetrating measurement and non-penetrating measurement. Penetrating measurement requires the probe to penetrate the inner wall, so the measurement range is limited by the probe size, and a stable mechanical structure is required during measurement, which increases the cost. Non-penetrating measurement uses line structured light measurement and phase deflectometry. However, the object of line structured light measurement is often the size of the inner wall, and the surface shape of the inner wall is generally not measured.
[0003] Traditional phase deflectometry measurement methods use a triangular layout, with the camera and screen on the same side of the part being measured. Therefore, only partial surface data can be obtained when measuring the inner wall surface. The entire surface shape cannot be obtained through a single measurement. The surface shapes obtained from multiple measurements need to be spliced together, which reduces the accuracy of the entire surface shape. Therefore, there is currently a lack of methods for high-precision surface measurement of the smooth inner walls of parts. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a method for measuring the smooth inner wall surface shape using a grazing phase deflection method.
[0005] The present invention provides a method for measuring the smooth inner wall surface shape using grazing phase deflection, which specifically includes the following steps:
[0006] S100: Constructing a measurement system, the measurement system comprising a camera, a smooth surface member, and a screen arranged in sequence along a first direction, a translation stage being provided below the screen, the translation stage being capable of driving the screen to move along the first direction, the translation stage having a proximal end close to the camera and a distal end away from the camera;
[0007] S200, calibrating the measurement system to obtain a system calibration result;
[0008] S300, selecting a standard part as a smooth surface part, optimizing the system calibration result, and obtaining an optimized calibration result;
[0009] S400, replacing the standard part with a smooth inner wall part, causing the screen to display a completely white image, and photographing the smooth inner wall part to obtain third image information;
[0010] S500, processing the third image information to obtain a measurement area;
[0011] S600, using the measurement system, obtaining fourth image information and fifth image information containing the measurement area;
[0012] S700: Based on a phase deflectometry method, mark the surface of the measurement area as a surface to be measured, process the fourth image information and the fifth image information, and obtain a plurality of initial feature points and corresponding initial normal vectors on the surface of the measurement area;
[0013] S800 , reconstructing the initial feature points and the corresponding initial normal vectors by a cylindrical coordinate system integration method to obtain reconstruction points of the smooth inner wall, and combining several of the reconstruction points to form a smooth inner wall surface shape.
[0014] Preferably, the cylindrical coordinate system integration method in step S800 specifically includes the following steps:
[0015] S801: Convert the initial feature points and the corresponding initial normal vectors into cylindrical coordinate system parameters using a first conversion formula group, wherein the first conversion formula group specifically includes the following formulas:
[0016]
[0017] Among them, (x0, y0, z0) represents the coordinates of each of the initial feature points in the Cartesian coordinate system, ρ0, θ, z) represents the coordinates of each of the initial feature points in the cylindrical coordinate system, (n ρ ,n θ ,n z ) represents the normal vector of each initial feature point in the cylindrical coordinate system, (n x ,n y ,n z ) represents the normal vector of each of the initial feature points in the Cartesian coordinate system;
[0018] S802: Obtain gradient information of the initial feature point and the corresponding initial normal vector in a cylindrical coordinate system using a gradient formula group, wherein the gradient formula group is as follows:
[0019]
[0020] Among them, g θ represents the component of the gradient in the θ direction, g z represents the component of the gradient in the z direction, nx, ny represent the components of the initial normal vector in the x direction and y direction;
[0021] S803. Solve the coordinates of the reconstruction point ρ based on the Southwell integral principle to obtain several reconstruction points ρ(i, j). The integral formula group specifically includes the following formula:
[0022]
[0023] Among them, ρ(i,j) represents the corresponding height of the reconstructed point, d θ Denotes the distance between reconstruction points in the θ direction, d z Indicates the reconstruction point spacing in the z direction, g θ represents the component of the gradient in the θ direction, g z Represents the component of the gradient in the z direction;
[0024] S804: Convert the coordinate parameters of the reconstructed point ρ(i, j) from the cylindrical coordinate system to the Cartesian coordinate system using a second conversion formula group. The second conversion formula group is as follows:
[0025] x=[ρ+mean(ρ0-ρ)]·cosθ
[0026] y=[ρ+mean(ρ0-ρ)]·sinθ
[0027] z=z
[0028] Among them, (ρ0,θ,z) represents the coordinates of each initial feature point in the cylindrical coordinate system, mean(ρ0-ρ) represents the average value of the difference between the initial feature point and the corresponding reconstructed point ρ(i,j), and (x,y,z) represents the coordinates of the reconstructed point in the Cartesian coordinate system.
[0029] Preferably, the step S200 specifically includes the following steps:
[0030] S210, calibrating the camera using Zhang Zhengyou's calibration method to obtain initial camera calibration parameters, where the initial camera calibration parameters include a camera intrinsic parameter I0, and distortions r0 and t0;
[0031] S220, calibrate the screen using a screen calibration method to obtain a near-end initial calibration parameter R 10 and T 10 , and the remote initial calibration parameter R 20 and T 20 The camera initial calibration parameters, the near-end initial calibration parameters and the far-end initial calibration parameters are combined to form the system calibration result.
[0032] Preferably, the phase deflection measurement method specifically includes the following steps:
[0033] S910, obtaining the phase Pa of the fringe image corresponding to any feature point P on the surface to be measured;
[0034] S920: Obtain a point Pc located on the camera imaging plane corresponding to the phase Pa through a third conversion formula group, wherein the coordinate parameters of the phase Pa are based on the camera pixel coordinate system, and the coordinate parameters of the point Pc are based on the camera coordinate system;
[0035] S930, processing the corresponding image information through phase solution to obtain a first pixel point P1 corresponding to the phase Pa when the screen is at the near end, and a second pixel point P2 corresponding to the phase Pa when the screen is at the far end, wherein the coordinate parameters of the first pixel point P1 and the second pixel point P2 are based on the screen pixel coordinate system;
[0036] S940: Obtain the point P corresponding to the first pixel point P1 through the third conversion formula group. S1 , and the point P corresponding to the second pixel point P2 S2 , where point P S1 and point P S2 The coordinate parameters are based on the camera coordinate system;
[0037] S950, connect point Pc and the camera optical center to form an outgoing light, connect point P S2 and point P S1 Forming incident light;
[0038] S960: The intersection of the incident light and the outgoing light is the feature point P, and the normal between the two is the normal vector n corresponding to the feature point P.
[0039] Preferably, the step S300 specifically includes the following steps:
[0040] S310, reconstructing the standard surface shape of the standard part using the measurement system to obtain a number of reconstructed feature points and corresponding reconstructed normal vectors on the surface of the standard part;
[0041] S320, obtaining a normal vector accuracy function of the standard component:
[0042] F=f(I x ,r x ,t x ,R 1x ,T 1x ,R 2x ,T 2x )
[0043] Among them, F represents the value of the normal vector accuracy, I x represents the camera internal parameter, r x and t x represents camera distortion, R 1x and T 1x Represents the proximal calibration parameter, R 2x and T2x Indicates remote calibration parameters;
[0044] S330, optimizing the normal vector accuracy function by an optimization algorithm to obtain the minimum value F of the normal vector accuracy function min , the optimization algorithm includes a first formula, which is as follows:
[0045]
[0046] Among them, N diff is the optimization target, m represents the number of standard part placement positions, M represents the number of feature points on the standard part surface, n represents the reconstructed normal vector, and n0 represents the correct normal vector of the standard part;
[0047] S340, based on the minimum value F of the normal vector accuracy function min , obtain the minimum value F min Corresponding R1 ’ and T1 ’ As the proximal optimization calibration parameter, the corresponding R2 ’ and T2 ’ As the remote optimization calibration parameter, the corresponding I ‘ 、r ‘ and t ‘ As the camera optimization calibration parameters, the near-end optimization calibration parameters, the far-end optimization calibration parameters and the camera optimization calibration parameters are combined to form the optimization calibration result.
[0048] Preferably, the step S310 specifically includes the following steps:
[0049] S311, setting m placement positions around a first axis, where the first axis is a straight line passing through the optical center of the camera along a first direction;
[0050] S312, placing the standard parts m times, placing only one standard part each time, the corresponding placement position of the standard part being different each time, and executing steps S313 and S314 after each placement;
[0051] S313, moving the screen to the near end, causing the screen to display characteristic stripes, and photographing the surface of the standard part using the camera to obtain sixth image information;
[0052] S314, moving the screen to the far end, causing the screen to display characteristic stripes, and photographing the surface of the standard component using the camera to obtain seventh image information, wherein both the sixth image information and the seventh image information include a plurality of stripe images including the characteristic stripes;
[0053] S315 : Based on the phase deflection measurement method, mark the surface of the standard part as a surface to be measured, and obtain a plurality of reconstructed feature points and corresponding reconstructed normal vectors of the surface of the standard part.
[0054] Preferably, the step S500 specifically includes the following steps:
[0055] S510, performing binarization processing on the third image information to obtain a grayscale image;
[0056] S520: Perform connected domain processing on the grayscale image to identify the area where the inner wall of the smooth inner wall part is located, and mark it as a measurement area.
[0057] Preferably, the step S600 specifically includes the following steps:
[0058] S610, moving the screen to the proximal end, causing the screen to display characteristic stripes, and photographing the smooth inner wall member using the camera to obtain fourth image information including the measurement area;
[0059] S620: Move the screen to the far end so that the screen displays characteristic stripes, use a camera to photograph the smooth inner wall member, and obtain fifth image information containing the measurement area, wherein the fourth image information and the fifth image information both include several images of the measurement area containing characteristic stripes.
[0060] Preferably, the third conversion formula group includes a formula for converting pixel coordinate system to physical coordinate system and a formula for converting physical coordinate system to world coordinate system, wherein the formula for converting pixel coordinate system to physical coordinate system is as follows:
[0061]
[0062] Wherein, (u, v) is the coordinate parameter of the first pixel point P1 or the second pixel point P2 based on the screen pixel coordinate system, (X s ,Y s ) is the coordinate parameter of the corresponding point in the physical coordinate system of the screen, d x and d y is the pixel size, u0 and v0 are the pixel coordinates of the center of the screen;
[0063] The formula for converting the physical coordinate system to the world coordinate system is as follows:
[0064]
[0065] Among them, (X s ,Y s ,Z s ) is the coordinate parameter of the point corresponding to the first pixel point P1 or the second pixel point P2 in the physical coordinate system of the screen, and (X w ,Yw ,Z w ) is point P S1 Or click P S2 The coordinate parameters in the world coordinate system, R is the rotation matrix, and T is the translation matrix.
[0066] Compared with the prior art, the present invention has the following beneficial effects:
[0067] 1. Based on the principle of phase deflection, the screen and camera are set on the opposite sides of the object to be tested, and the screen can be moved between the near end and the far end. The feature point P on the surface to be tested is obtained by phase solution and coordinate system transformation. S1 and point P S2 , then pass through the corresponding point Pc of the feature point P on the camera imaging surface, connect the point Pc and the optical center of the camera to form an outgoing light, connect the point P S2 and point P S1 An incident ray is formed, and the intersection of the incident ray and the outgoing ray is a feature point P. The normal of the two is the normal vector n corresponding to the feature point P. All feature points P and the corresponding normal vectors n can be combined to form the initial surface shape. This grazing arrangement can completely capture the entire surface shape of the smooth inner wall at one time, solving the problem of the traditional phase deflectometry single field of view measurement being limited in range, relying on stitching, and having low stitching accuracy.
[0068] 2. On the basis of the above, the coordinate parameters of the initial normal vector n corresponding to the initial feature point P corresponding to the initial surface shape are based on the commonly used Cartesian coordinate system. In the present invention, the coordinate parameters of the two are first converted from the Cartesian coordinate system to the cylindrical coordinate system. After obtaining the gradient information, the integration processing is performed based on the Southwell integral principle. After the integration processing, it is converted back to the Cartesian coordinate system. This solves the problem of the existing technology that cylindrical surfaces cannot be integrated in the Cartesian coordinate system. The large curvature integral is converted into the small curvature integral problem, which effectively improves the accuracy of the integration. The reconstructed points after the integration processing are more consistent with the actual surface shape and have higher measurement accuracy.
[0069] 3. On the basis of the above, standard parts are also used to optimize the system calibration results to obtain optimized calibration results. Based on the relevant parameters of the optimized calibration results, the subsequent calculated values are more accurate and the surface shape measurement is more precise. Among them, the optimization of the system calibration results is based on the phase deflection measurement method to measure the standard surface shape of the standard parts. If the standard parts use plane mirrors, the normal vectors of the standard surface shape are parallel to each other. The minimum error value of the normal vector accuracy function is screened out through the optimization algorithm and the first formula, and the proximal optimization calibration parameters and distal optimization calibration parameters in the corresponding normal vector accuracy function are obtained. This method can improve the accuracy of the subsequent initial surface shape and avoid the error accumulation caused by the traditional calibration method.
[0070] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0072] Figure 1 A flowchart of a method for measuring the smooth inner wall surface using grazing phase deflection provided in an embodiment of the present application;
[0073] Figure 2 Schematic diagram of the structure of the measurement system of step S300 in the method for measuring the smooth inner wall surface shape using grazing phase deflection provided in an embodiment of the present application;
[0074] Figure 3 A schematic structural diagram of a measurement system for step S400 in a method for measuring a smooth inner wall surface using grazing phase deflection provided in an embodiment of the present application;
[0075] Figure 4 A schematic diagram of the structure of the incident light and the outgoing light in a grazing phase deflection smooth inner wall surface measurement method provided in an embodiment of the present application;
[0076] Figure 5 This is a schematic diagram of the smooth inner wall surface shape formed by the combination of reconstruction points in a grazing phase deflection smooth inner wall surface shape measurement method provided in an embodiment of the present application.
[0077] Reference numerals in the figure: 1, camera; 12, camera optical center; 2, smooth surface component; 21, standard component; 22, smooth inner wall component; 23, feature point P; 3, screen; 4, translation stage; 5, first axis; 6, camera imaging plane; 61, point Pc; 7, point P S1 8. Click P S2 . DETAILED DESCRIPTION
[0078] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.
[0079] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0080] Please refer to Figures 1 to 5 The embodiment of the present invention provides a method for measuring the smooth inner wall surface using grazing phase deflection, which specifically includes the following steps:
[0081] S100, constructing a measurement system, the measurement system comprising a camera 1, a smooth surface member 2, and a screen 3 arranged in sequence along a first direction, a displacement stage 4 being provided below the screen 3, the displacement stage 4 being capable of driving the screen 3 to move along the first direction, the displacement stage 4 having a proximal end close to the camera 1 and a distal end away from the camera 1; Figure 2 and Figure 3 As shown, the first direction is Figure 2 In the left and right directions, when the screen 3 is located at the near end or the far end, each point on the screen 3 has known world coordinate parameters.
[0082] S200, calibrating the measurement system to obtain a system calibration result;
[0083] In some embodiments, step S200 specifically includes the following steps:
[0084] S210, calibrate camera 1 using Zhang Zhengyou calibration method to obtain initial camera calibration parameters, where the initial camera calibration parameters include camera intrinsic parameter I0, and distortions r0 and t0;
[0085] Among them, the Zhang Zhengyou calibration method is a common method for camera calibration and will not be described in detail here. In addition, in the Zhang Zhengyou calibration method, a camera coordinate system with the camera optical center 12 as the origin and a world coordinate system are included. In order to facilitate subsequent measurement descriptions, the world coordinate system in this application coincides with the camera coordinate system, and in the Zhang Zhengyou calibration method, the subsequently captured images include a camera pixel coordinate system with the upper left endpoint as the origin, and a camera image coordinate system with the image center as the origin.
[0086] S220, calibrate screen 3 using the screen calibration method to obtain the near-end initial calibration parameter R 10 and T 10 , and the remote initial calibration parameter R 20 and T 20 ,The camera initial calibration parameters, the near-end initial calibration parameters and the far-end initial calibration parameters are combined to form the system calibration results.
[0087] Among them, the screen calibration method is an existing technology, which generally includes the following steps:
[0088] S221, moving the screen 3 to the near end, making the screen 3 display characteristic stripes, and photographing the screen 3 with the camera 1 to obtain first image information;
[0089] Among them, the characteristic stripes are black and white changing sinusoidal stripes, that is, sinusoidal stripe images with grayscale values varying between 0-255. The common stripe formula can be used to generate the characteristic stripes. The stripe formula is as follows:
[0090]
[0091] Among them, I k (x) is the grayscale value, A(x) is the ambient brightness value, B(x) is the screen brightness value, T is the period of the sinusoidal signal displayed on screen 3, N is the number of phase shift steps, k is the serial number of the displayed photo, and x is the coordinate of the screen pixel;
[0092] S222, performing phase calculation on each fringe image in the first image information to obtain a plurality of first pixel points on the screen 3 corresponding to each phase in the fringe image;
[0093] Phase calculation refers to obtaining the pixel point on the screen 3 corresponding to the phase according to the phase in the fringe image through the calculation formula, that is, through I k (x) In the process of inversely calculating x, phase solution is an existing technology, and a multi-frequency heterodyne method can be used to perform phase unwrapping calculations, which will not be described in detail here. After phase solution, each phase in the fringe image of the second image information has a one-to-one correspondence with a plurality of second pixel points. Similarly, each phase in the fringe image of the first image information has a one-to-one correspondence with a plurality of first pixel points. In other words, a phase in the fringe image is selected, and the phase has coordinate parameters in the camera pixel coordinate system. Through phase solution, the coordinate parameters of the corresponding first pixel point or second pixel point in the screen pixel coordinate system can be obtained;
[0094] S223, perform monocular reconstruction on each first pixel point, and optimize the position of screen 3 based on the optimization algorithm. The optimization goal is to minimize the reprojection error of the pixel points on screen 3, and obtain the position R of screen 3 when screen 3 is at the near end. 10 and T 10 ;
[0095] Monocular reconstruction refers to the technology of 3D reconstruction using image information obtained by a single camera. Reprojection error refers to the difference between the projection of a real 3D point on the image plane (that is, the pixel point on the image) and the reprojection (actually a virtual pixel point obtained using our calculated value). The minimum error value is selected through an optimization algorithm to ensure the accuracy of the screen 3 position.
[0096] S224, moving the screen 3 to the far end so that the screen 3 displays characteristic stripes, and photographing the screen 3 using the camera 1 to obtain second image information;
[0097] S225, performing phase calculation on each fringe image in the second image information to obtain a plurality of second pixel points on the screen 3 corresponding to each phase in the fringe image;
[0098] S226, perform monocular reconstruction on each second pixel point, and optimize the position of screen 3 based on the optimization algorithm. The optimization goal is to minimize the reprojection error of the pixel points on screen 3, and obtain the position R of screen 3 when screen 3 is at the far end. 20 and T 20 .
[0099] S300, selecting the standard part 21 as the smooth surface part 2, optimizing the system calibration result, and obtaining an optimized calibration result; avoiding the error accumulation that is easily caused by using only the traditional calibration method, and improving the accuracy of subsequent measurements.
[0100] In some embodiments, step S300 specifically includes the following steps:
[0101] S310, using the measurement system to reconstruct the standard surface shape of the standard part 21, and obtain a number of reconstructed feature points and corresponding reconstructed normal vectors on the surface of the standard part 21; wherein a standard plane mirror can be selected for the standard part 21, and each reconstructed feature point on the surface of the standard part 21 corresponds to a correct normal vector, and there is a deviation between the reconstructed normal vector and the correct normal vector;
[0102] In some embodiments, S310 specifically includes the following steps:
[0103] S311, setting m placement positions around a first axis 5, where the first axis 5 is a straight line passing through the camera optical center 12 along a first direction;
[0104] S312, placing the standard component 21 m times, placing only one standard component 21 each time, and the corresponding placement position of each standard component 21 is different. After each placement, step S313 and step S314 are executed;
[0105] S313, moving the screen 3 to the near end so that the screen 3 displays characteristic stripes, and using the camera 1 to photograph the surface of the standard component 21 to obtain sixth image information;
[0106] S314, moving the screen 3 to the far end so that the screen 3 displays the characteristic stripes, and using the camera 1 to photograph the surface of the standard component 21 to obtain seventh image information, where both the sixth image information and the seventh image information include a plurality of stripe images containing the characteristic stripes;
[0107] S315, based on the phase deflectometry measurement method, marking the surface of the standard component 21 as the surface to be measured, and obtaining a number of reconstructed feature points and corresponding reconstructed normal vectors on the surface of the standard component 21;
[0108] refer to Figure 2, where the sixth image information and the seventh image information are both m copies, so that the reconstructed feature points and corresponding reconstructed normal vectors of the standard part surface at m placement positions can be obtained. If there is only a single placement position, the reconstructed normal vector after reconstruction still has errors and randomness. By setting multiple placement positions, the error in the reconstruction process is reduced and the optimization effect is improved.
[0109] In some embodiments, the phase deflection measurement method specifically includes the following steps:
[0110] S910, obtain the phase Pa of the fringe image corresponding to any feature point P on the surface to be measured; since the fringe images obtained at the near end and the far end of the screen 3 are different, the phase Pa includes P a1 and P a2 , when the screen 3 is at the near end, the phase corresponding to the feature point P is P a1 , when the screen 3 is at the far end, the phase corresponding to the feature point P is P a2 , in fact, due to P a1 and P a2 Both correspond to the feature point P, so the coordinate parameters of the two based on the camera pixel coordinate system are consistent. This is a supplementary description to facilitate understanding of the corresponding relationship. In addition, when executing S315, the sixth image information and the seventh image information are selected, while when executing step S700, the third image information is selected.
[0111] S920. Obtain a point Pc61 on the camera imaging plane 6 corresponding to the phase Pa through the third transformation formula group, wherein the coordinate parameters of the phase Pa are based on the camera pixel coordinate system, and the coordinate parameters of the point Pc61 are based on the camera coordinate system; the camera imaging plane 6 is a plane based on the camera coordinate system. When using the third transformation formula group, the rotation matrix R and the translation matrix T are selected to correspond to the distortion r and t, that is, r0 and t0 are selected when executing step S315, and r is selected when executing step S700. ‘ and t ‘ ;
[0112] S930, process the corresponding image information through phase solution to obtain the first pixel point P1 corresponding to the phase Pa when the screen 3 is at the near end, and the second pixel point P2 corresponding to the phase Pa when the screen 3 is at the far end, wherein the coordinate parameters of the first pixel point P1 and the second pixel point P2 are based on the screen pixel coordinate system; wherein the phase corresponding to the first pixel point P1 is P a1 , and the phase corresponding to the second pixel point P2 is P a2 ;
[0113] S940: Obtain the point P corresponding to the first pixel point P1 through the third conversion formula group. S1 7, and the point P corresponding to the second pixel point P2 S28, where point P S1 7 and P S2 The coordinate parameters of 8 are based on the camera coordinate system;
[0114] S950, connecting point Pc61 and the camera optical center 12 to form an outgoing light, connecting point P S2 8 and point P S1 7 forms the incident light;
[0115] S960, the intersection of the incident light and the outgoing light is the feature point P, and the normal line between the two is the normal vector n corresponding to the feature point P;
[0116] like Figure 4 As shown in the figure, it can be seen that the line connecting the incident light and the outgoing light of the phase deflection measurement method, as well as the corresponding relationship between each point, the light reflected by the same feature point P is consistent, so the position of the phase Pa on the corresponding fringe image does not change. For the convenience of description, when the screen 3 is at the near end, the phase Pa is marked as P a1 , when screen 3 is at the near end, the phase Pa is marked as P a1 ;
[0117] In some embodiments, the third conversion formula group is an existing conversion formula, which includes a pixel coordinate system to physical coordinate system conversion formula and a physical coordinate system to world coordinate system conversion formula, wherein the pixel coordinate system to physical coordinate system conversion formula is as follows:
[0118]
[0119] Wherein, (u, v) is the coordinate parameter of the first pixel point P1 or the second pixel point P2 based on the screen pixel coordinate system, (X s ,Y s ) is the coordinate parameter of the corresponding point in the physical coordinate system of the screen, d x and d y is the pixel size, u0 and v0 are the pixel coordinates of the center of the screen 3;
[0120] The formula for converting the physical coordinate system to the world coordinate system is as follows:
[0121]
[0122] Among them, (X s ,Y s ,Z s ) is the coordinate parameter of the point corresponding to the first pixel point P1 or the second pixel point P2 in the physical coordinate system of the screen, and (X w ,Y w ,Z w ) is point P S1 7 or point P S28 Coordinate parameters in the world coordinate system, R is the rotation matrix, T is the translation matrix;
[0123] In this application, the world coordinate system and the camera coordinate system are overlapped. Therefore, the coordinate parameters of the above-mentioned world coordinate system are also the coordinate parameters of the camera coordinate system. Among them, the phase solution can only obtain the pixel points corresponding to the phase, and the pixels corresponding to the pixels in reality have sizes. Therefore, the coordinate parameters of the corresponding points in the physical coordinate system of the screen (with the center of the screen as the origin) are obtained through the formula of converting the pixel coordinate system to the physical coordinate system. Finally, the point P in the camera coordinate system (with the optical center of the camera as the origin) is obtained through the formula of converting the physical coordinate system to the world coordinate system. S1 7 or point P S2 8. It is convenient to unify the coordinate system and draw the incident and outgoing rays in the future;
[0124] When executing step S315, a phase deflection measurement method needs to be used, wherein the first pixel point P1 is calculated by the third conversion formula group to obtain the corresponding point P S1 7 Based on the coordinate parameters in the camera coordinate system, during the calculation process, the rotation matrix R and the translation matrix T are selected as R 10 and T 10 Similarly, when calculating the coordinate parameters of the second pixel point P2, it is converted into the corresponding point P S2 When the coordinate parameters are 8, the rotation matrix R and the translation matrix T are R 20 and T 20 .
[0125] S320. Obtain the normal vector accuracy function of the standard part:
[0126] F=f(I x ,r x ,t x ,R 1x ,T 1x ,R 2x ,T 2x )
[0127] Among them, F represents the value of the normal vector accuracy, I x represents the camera internal parameter, r x and t x represents camera distortion, R 1x and T 1x Represents the proximal calibration parameter, R 2x and T 2x Indicates remote calibration parameters;
[0128] S330, optimizing the normal vector accuracy function through an optimization algorithm to obtain the minimum value F of the normal vector accuracy function min , the optimization algorithm includes the first formula, which is as follows:
[0129]
[0130] Among them, N diff is the optimization target, m represents the number of positions of the standard part 21, M represents the number of characteristic points on the surface of the standard part 21, n represents the reconstructed normal vector, and n0 represents the correct normal vector of the standard part 21; in addition, the optimization algorithm can use the Levenberg-Marquardt algorithm, also known as the L-M algorithm, which is an algorithm for least squares estimation of regression parameters in nonlinear regression and can accurately obtain the minimum value F of the normal vector accuracy function min , where the standard part 21 can be a standard plane mirror, the correct normal vectors of its surface should be parallel to each other, the reconstructed normal vectors may be tilted and have angles between each other, when obtaining the minimum value F of the normal vector accuracy function min , the inclination angle of the reconstructed normal vector is the smallest and is closer to the correct normal vector;
[0131] When the algorithm is optimized, the system calibration results I0, r0, t0, R 10 ,T 10 ,R 20 ,T 20 Substitute the normal vector accuracy function to obtain the function value F0, and use the first formula to determine whether the current function value F0 is the minimum function value F min If not, it will be iterated. During the iteration, the optimization algorithm will update the relevant parameters of the normal vector accuracy function. x is the number of updates. After each update, a new function value F can be obtained. x , and iterate until the function value F is obtained x =F min , end the iteration, function value F min Corresponding R 1x and T 1x Marked as R1 ’ and T1 ’ , the corresponding R 2x and T 2x Marked as R2 ’ and T2 ’ , corresponding to I x 、r x , t x Marked as '
[0132] I, r, t.
[0133] S340, based on the minimum value F of the normal vector accuracy function min , and obtain the minimum value F min Corresponding R1 ’ and T1 ’ As the proximal optimization calibration parameter, the corresponding R2 ’and T2 ’ As the remote optimization calibration parameter, the corresponding I ‘ 、r ‘ and t ‘ As the camera optimization calibration parameters, the near-end optimization calibration parameters, the far-end optimization calibration parameters and the camera optimization calibration parameters are combined to form the optimization calibration result.
[0134] S400, replace the standard part 21 with the smooth inner wall part 22, make the screen 3 display a full white image, shoot the smooth inner wall part 22, and obtain third image information; Figure 3 As shown, the smooth inner wall member 22 is coaxially arranged with the first axis 5 , and the inner wall of the smooth inner wall member 22 will display the full white image on the screen 3 , so the third image information includes multiple images of the white area.
[0135] S500, processing the third image information to obtain a measurement area;
[0136] In some embodiments, step S500 specifically includes the following steps:
[0137] S510: Binarize the third image information to obtain a grayscale image. Binarization is to set the grayscale value of the image to 0 (black) or 255 (white), thereby forming a clear contrast effect to facilitate subsequent recognition.
[0138] S520. Perform connected domain processing on the grayscale image to identify the area where the inner wall of the smooth inner wall part is located and mark it as the measurement area. Connected domain processing is to convert the image area into an image area composed of pixels with the same pixel value and adjacent positions. Connected domain processing is an image recognition method that can accurately identify white areas in the grayscale image to facilitate subsequent calculations and avoid calculation errors or excessive calculations caused by direct photography.
[0139] S600: Using a measurement system, obtain fourth image information and fifth image information containing a measurement area;
[0140] In some embodiments, step S600 specifically includes the following steps:
[0141] S610, moving the screen 3 to the near end so that the screen 3 displays characteristic stripes, and using the camera 1 to photograph the smooth inner wall member 22 to obtain fourth image information including the measurement area;
[0142] S620, move the screen 3 to the far end so that the screen 3 displays the characteristic stripes, use the camera 1 to shoot the smooth inner wall part 22, and obtain the fifth image information containing the measurement area. The fourth image information and the fifth image information both include several measurement area images containing the characteristic stripes.
[0143] S700: Based on a phase deflectometry method, mark the surface of the measurement area as a surface to be measured, process the fourth image information and the fifth image information, and obtain a number of initial feature points and corresponding initial normal vectors on the surface of the measurement area;
[0144] When executing step S700, a phase deflection measurement method needs to be used, wherein the first pixel point P1 is calculated by the third conversion formula group to obtain the corresponding point P S1 7 Based on the coordinate parameters in the camera coordinate system, during the calculation process, the rotation matrix R and translation matrix T are selected as R1 ’ and T1 ’ Similarly, when calculating the coordinate parameters of the second pixel point P2, it is converted into the corresponding point P S2 When the coordinate parameters are 8, the rotation matrix R and translation matrix T are R2 ’ and T2 ’ Compared with directly using R 10 、T 10 、R 20 and T 20 , R1 ’ 、T1 ’、 R2 ’ and T2 ’ These are the optimized parameters. After reconstructing the surface of the standard part 21, the error of the reconstructed normal vector is minimized and closer to the correct normal vector. Therefore, using these optimized parameters to obtain the initial normal vector will be more accurate, thereby improving the accuracy of surface measurement.
[0145] S800, obtain the reconstruction points of the smooth inner wall through the initial feature points and the corresponding initial normal vectors of the cylindrical coordinate system integration method, and combine several reconstruction points to form the smooth inner wall surface shape; the reconstructed surface shape is as follows Figure 5 As shown in Figure 3, the initial feature points are converted into reconstruction points to make the reconstructed surface shape more accurate.
[0146] In some embodiments, the cylindrical coordinate system integration method in step S800 specifically includes the following steps:
[0147] S801: Convert the initial feature points and the corresponding initial normal vectors into cylindrical coordinate system parameters using a first conversion formula group. The first conversion formula group specifically includes the following formulas:
[0148]
[0149] Among them, (x0, y0, z0) represents the coordinates of each initial feature point in the Cartesian coordinate system, (ρ0, θ, z) represents the coordinates of each initial feature point in the cylindrical coordinate system, (n ρ ,n θ ,n z ) represents the normal vector of each initial feature point in the cylindrical coordinate system, (n x,n y ,n z ) represents the normal vector of each initial feature point in the Cartesian coordinate system;
[0150] S802: Obtain the gradient information of the initial feature point and the corresponding initial normal vector in the cylindrical coordinate system through the gradient formula group. The gradient formula group is as follows:
[0151]
[0152] Among them, g θ represents the component of the gradient in the θ direction, g z Represents the component of the gradient in the z direction, nx, ny represent the components of the initial normal vector in the x direction and y direction;
[0153] S803. Based on the Southwell integral principle, the coordinates of the reconstruction point ρ are solved to obtain several reconstruction points ρ(i, j). The integral formula group specifically includes the following formula:
[0154]
[0155] Among them, ρ(i,j) represents the corresponding height of the reconstructed point, d θ Denotes the distance between reconstruction points in the θ direction, d z Indicates the reconstruction point spacing in the z direction, g θ represents the component of the gradient in the θ direction, g z Represents the component of the gradient in the z direction;
[0156] S804: Convert the coordinate parameters of the reconstructed point ρ(i, j) from the cylindrical coordinate system to the Cartesian coordinate system using a second conversion formula group. The second conversion formula group is as follows:
[0157] x=[ρ+mean(ρ0-ρ)]·cosθ
[0158] y=[ρ+mean(ρ0-ρ)]·sinθ
[0159] z=z
[0160] Among them, (ρ0,θ,z) represents the coordinates of each initial feature point in the cylindrical coordinate system, mean(ρ0-ρ) represents the average value of the difference between the initial feature point and the corresponding reconstructed point ρ(i,j), and (x,y,z) represents the coordinates of the reconstructed point in the Cartesian coordinate system.
[0161] Among them, based on the coordinate parameters of the initial feature points and the corresponding initial normal vectors, the two are first converted from the Cartesian coordinate system to the cylindrical coordinate system. After obtaining the gradient information, integration processing is performed based on the Southwell integration principle. After integration processing, it is converted to the Cartesian coordinate system, which solves the problem that the existing technology cannot integrate cylindrical surfaces in the Cartesian coordinate system. The large curvature integral is converted into the small curvature integral problem, which effectively improves the accuracy of the integration. The reconstructed points after integration processing are more consistent with the actual surface shape and the measurement accuracy is higher.
[0162] In this specification, the terms "connect," "install," and "fix" should be understood broadly. For example, "connect" can refer to a fixed connection, a detachable connection, or an integral connection; it can refer to a direct connection or an indirect connection through an intermediary. Those skilled in the art will understand the specific meanings of these terms in this application based on the specific circumstances.
[0163] Throughout this specification, terms such as "one embodiment" or "some embodiments" mean that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0164] The above are merely preferred embodiments of the present application and are not intended to limit the present application. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for measuring the smooth inner wall surface shape using grazing phase deflection, characterized in that: The specific steps include: S100: Constructing a measurement system, the measurement system comprising a camera, a smooth surface member, and a screen arranged in sequence along a first direction, a translation stage being provided below the screen, the translation stage being capable of driving the screen to move along the first direction, the translation stage having a proximal end close to the camera and a distal end away from the camera; S200, calibrating the measurement system to obtain a system calibration result; S300, selecting a standard part as a smooth surface part, optimizing the system calibration result, and obtaining an optimized calibration result; S400, replacing the standard part with a smooth inner wall part, causing the screen to display a completely white image, and photographing the smooth inner wall part to obtain third image information; S500, processing the third image information to obtain a measurement area; S600, using the measurement system, obtaining fourth image information and fifth image information containing the measurement area; S700: Based on a phase deflectometry method, mark the surface of the measurement area as a surface to be measured, process the fourth image information and the fifth image information, and obtain a plurality of initial feature points and corresponding initial normal vectors on the surface of the measurement area; S800 , reconstructing the initial feature points and the corresponding initial normal vectors by a cylindrical coordinate system integration method to obtain reconstruction points of the smooth inner wall, and combining several of the reconstruction points to form a smooth inner wall surface shape.
2. The method for measuring the smooth inner wall surface shape using grazing phase deflection according to claim 1, characterized in that: The cylindrical coordinate system integration method in step S800 specifically includes the following steps: S801: Convert the initial feature points and the corresponding initial normal vectors into cylindrical coordinate system parameters using a first conversion formula group, wherein the first conversion formula group specifically includes the following formulas: z=z0 Wherein, (x0, y0, z0) represents the coordinates of each of the initial feature points in the Cartesian coordinate system, (ρ0, θ, z) represents the coordinates of each of the initial feature points in the cylindrical coordinate system, (n ρ ,n θ ,n z ) represents the normal vector of each initial feature point in the cylindrical coordinate system, (n x ,n y ,n z ) represents the normal vector of each of the initial feature points in the Cartesian coordinate system; S802: Obtain gradient information of the initial feature point and the corresponding initial normal vector in a cylindrical coordinate system using a gradient formula group, wherein the gradient formula group is as follows: Among them, g θ represents the component of the gradient in the θ direction, g z represents the component of the gradient in the z direction, n x , n y Represents the components of the initial normal vector in the x-direction and the y-direction; S803. Solve the coordinates of the reconstruction point ρ based on the Southwell integral principle to obtain several reconstruction points ρ(i, j). The integral formula group specifically includes the following formula: Among them, ρ(i,j) represents the corresponding height of the reconstructed point, d θ Represents the reconstruction point spacing in the θ direction, d z Indicates the reconstruction point spacing in the z direction, g θ represents the component of the gradient in the θ direction, g z Represents the component of the gradient in the z direction; S804: Convert the coordinate parameters of the reconstructed point ρ(i, j) from the cylindrical coordinate system to the Cartesian coordinate system using a second conversion formula group. The second conversion formula group is as follows: x=[ρ+mean(ρ0-ρ)]·cosθ y=[ρ+mean(ρ0-ρ)]·sinθ z=z Among them, (ρ0,θ,z) represents the coordinates of each initial feature point in the cylindrical coordinate system, mean(ρ0-ρ) represents the average value of the difference between the initial feature point and the corresponding reconstructed point ρ(i,j), and (x,y,z) represents the coordinates of the reconstructed point in the Cartesian coordinate system.
3. The method for measuring the smooth inner wall surface using grazing phase deflection according to claim 1, wherein: The step S200 specifically includes the following steps: S210, calibrating the camera using Zhang Zhengyou's calibration method to obtain initial camera calibration parameters, where the initial camera calibration parameters include a camera intrinsic parameter I0, and distortions r0 and t0; S220, calibrate the screen using a screen calibration method to obtain a near-end initial calibration parameter R 10 and T 10 , and the remote initial calibration parameter R 20 and T 20 The camera initial calibration parameters, the near-end initial calibration parameters and the far-end initial calibration parameters are combined to form the system calibration result.
4. The method for measuring the smooth inner wall surface shape using grazing phase deflection according to claim 3, wherein: The phase deflection measurement method specifically includes the following steps: S910, obtaining the phase Pa of the fringe image corresponding to any feature point P on the surface to be measured; S920: Obtain a point Pc located on the camera imaging plane corresponding to the phase Pa through a third conversion formula group, wherein the coordinate parameters of the phase Pa are based on the camera pixel coordinate system, and the coordinate parameters of the point Pc are based on the camera coordinate system; S930, processing the corresponding image information through phase solution to obtain a first pixel point P1 corresponding to the phase Pa when the screen is at the near end, and a second pixel point P2 corresponding to the phase Pa when the screen is at the far end, wherein the coordinate parameters of the first pixel point P1 and the second pixel point P2 are based on the screen pixel coordinate system; S940: Obtain the point P corresponding to the first pixel point P1 through the third conversion formula group. S1 , and the point P corresponding to the second pixel point P2 S2 , where point P S1 and point P S2 The coordinate parameters are based on the camera coordinate system; S950, connect point Pc and the camera optical center to form an outgoing light, connect point P S2 and point P S1 Forming incident light; S960: The intersection of the incident light and the outgoing light is the feature point P, and the normal between the two is the normal vector n corresponding to the feature point P.
5. The method for measuring the smooth inner wall surface shape using grazing phase deflection according to claim 4, wherein: The step S300 specifically includes the following steps: S310, reconstructing the standard surface shape of the standard part using the measurement system to obtain a number of reconstructed feature points and corresponding reconstructed normal vectors on the surface of the standard part; S320, obtaining a normal vector accuracy function of the standard component: F=f(I x ,r x ,t x ,R 1x ,T 1x ,R 2x ,T 2x ) Among them, F represents the value of the normal vector accuracy, I x represents the camera internal parameter, r x and t x represents camera distortion, R 1x and T 1x Represents the proximal calibration parameter, R 2x and T 2x Indicates remote calibration parameters; S330, optimizing the normal vector accuracy function by an optimization algorithm to obtain the minimum value F of the normal vector accuracy function min , the optimization algorithm includes a first formula, which is as follows: Among them, N diff is the optimization target, m represents the number of standard part placement positions, M represents the number of feature points on the standard part surface, n represents the reconstructed normal vector, and n0 represents the correct normal vector of the standard part; S340, based on the minimum value F of the normal vector accuracy function min , obtain the minimum value F min Corresponding R1 ’ and T1 ’ As the proximal optimization calibration parameter, the corresponding R2 ’ and T2 ’ As the remote optimization calibration parameter, the corresponding I ‘ 、r ‘ and t ‘ As the camera optimization calibration parameters, the near-end optimization calibration parameters, the far-end optimization calibration parameters and the camera optimization calibration parameters are combined to form the optimization calibration result.
6. The method for measuring the smooth inner wall surface using grazing phase deflection according to claim 5, wherein: The S310 specifically includes the following steps: S311, setting m placement positions around a first axis, where the first axis is a straight line passing through the optical center of the camera along a first direction; S312, placing the standard parts m times, placing only one standard part each time, the corresponding placement position of the standard part being different each time, and executing steps S313 and S314 after each placement; S313, moving the screen to the near end, causing the screen to display characteristic stripes, and photographing the surface of the standard part using the camera to obtain sixth image information; S314, moving the screen to the far end, causing the screen to display characteristic stripes, and photographing the surface of the standard component using the camera to obtain seventh image information, wherein both the sixth image information and the seventh image information include a plurality of stripe images including the characteristic stripes; S315 : Based on the phase deflection measurement method, mark the surface of the standard part as a surface to be measured, and obtain a plurality of reconstructed feature points and corresponding reconstructed normal vectors of the surface of the standard part.
7. The method for measuring the smooth inner wall surface shape using grazing phase deflection according to claim 1, wherein: The step S500 specifically includes the following steps: S510, performing binarization processing on the third image information to obtain a grayscale image; S520: Perform connected domain processing on the grayscale image to identify the area where the inner wall of the smooth inner wall part is located, and mark it as a measurement area.
8. The method for measuring the smooth inner wall surface using grazing phase deflection according to claim 7, characterized in that: The step S600 specifically includes the following steps: S610, moving the screen to the proximal end, causing the screen to display characteristic stripes, and photographing the smooth inner wall member using the camera to obtain fourth image information including the measurement area; S620: Move the screen to the far end so that the screen displays characteristic stripes, use a camera to photograph the smooth inner wall member, and obtain fifth image information containing the measurement area, wherein the fourth image information and the fifth image information both include several images of the measurement area containing characteristic stripes.
9. The method for measuring the smooth inner wall surface shape using grazing phase deflection according to claim 6, wherein: The third conversion formula group includes a formula for converting the pixel coordinate system to the physical coordinate system and a formula for converting the physical coordinate system to the world coordinate system. The formula for converting the pixel coordinate system to the physical coordinate system is as follows: Wherein, (u, v) is the coordinate parameter of the first pixel point P1 or the second pixel point P2 based on the screen pixel coordinate system, (X s ,Y s ) is the coordinate parameter of the corresponding point in the physical coordinate system of the screen, d x and d y is the pixel size, u0 and v0 are the pixel coordinates of the center of the screen; The formula for converting the physical coordinate system to the world coordinate system is as follows: Among them, (X s ,Y s ,Z s ) is the coordinate parameter of the point corresponding to the first pixel point P1 or the second pixel point P2 in the physical coordinate system of the screen, and (X w ,Y w ,Z w ) is point P S1 Or click P S2 The coordinate parameters in the world coordinate system, R is the rotation matrix, and T is the translation matrix.
Citation Information
Patent Citations
Aspherical mirror detection method based on phase measurement deflectometry
CN102183213A
Mirror surface morphology measurement method and device based on projection imaging comparison
CN116576802A