Glancing type phase deflection smooth inner wall surface shape measurement method
Through the grazing phase deflection measurement method and the column coordinate system integration method, the problem of high-precision measurement of smooth inner wall surface shape is solved, and the effect of obtaining the complete surface shape is achieved in a single measurement, which improves the measurement accuracy.
Patent Information
- Application Number
- CN202510034947.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-01-09
AI Technical Summary
It is difficult for the prior art to achieve high-precision measurement of smooth inner wall surface shapes, especially in traditional phase deflection measurement methods, the single field of view measurement range is limited, and it depends on splicing, and the splicing accuracy is not high.
The grazing phase deflection measurement method is adopted to construct a measurement system, in which the camera, smooth surface shape and the screen are placed in sequence along the first direction, and the screen can be moved. Combined with the phase deflection principle and the column coordinate system integration method, the reconstruction point of the smooth inner wall is obtained to form a complete surface shape.
It can fully capture the entire surface shape of the smooth inner wall with one measurement, improving the measurement accuracy and avoiding the reduction in accuracy caused by splicing.
Smart Images

Figure CN119803353A_ABST
Abstract
Description
Technical Field
[0001] The 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 sleeves, ring gauges, multi-faceted optical free-form surfaces, etc.; due to processing errors in the manufacturing process, it is inevitable that there will be errors in the inner wall surface shape, so it is necessary to measure the inner wall surface shape to avoid affecting the final performance of the workpiece and causing irreparable losses; common measurement methods are mainly divided into two types: penetration measurement and non-penetration measurement. Penetration 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-penetration measurement uses line structured light measurement method and phase deflection measurement, but the object of line structured light measurement is often the size of the inner wall, and generally does not measure the surface shape of the inner wall;
[0003] The traditional phase deflection measurement method adopts a triangular layout, with the camera and screen on the same side of the part to be measured. Therefore, only partial surface data can be obtained when measuring the inner wall surface, and the entire surface shape cannot be obtained through a single measurement. The surface shapes measured multiple times need to be spliced, and the splicing of surface shapes will cause the accuracy of the entire surface shape to decrease. Therefore, there is currently a lack of methods for high-precision surface measurement of the smooth inner wall of a part. Summary of the invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable 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 glancing phase deflection smooth inner wall surface, which specifically comprises the following steps:
[0006] S100, constructing a measurement system, wherein the measurement system comprises a camera, a smooth surface member, and a screen arranged in sequence along a first direction, wherein a displacement platform is provided below the screen, and the displacement platform can drive the screen to move along the first direction, and the displacement platform has a proximal end close to the camera and a distal end far 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, making the screen display a full white image, photographing the smooth inner wall part, and obtaining third image information;
[0010] S500, processing the third image information to obtain a measurement area;
[0011] S600, using the measurement system to obtain fourth image information and fifth image information containing the measurement area;
[0012] S700, based on a phase deflection measurement method, marking the surface of the measurement area as a surface to be measured, processing the fourth image information and the fifth image information, and obtaining a number 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 using a cylindrical coordinate system integration method to obtain reconstruction points of the smooth inner wall, and combining a plurality 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] 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 of the initial feature points 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, obtaining the gradient information of the initial feature point and the corresponding initial normal vector in the cylindrical coordinate system through 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, based on the Southwell integral principle, the coordinates of the reconstruction point ρ are solved to obtain a number of reconstruction points ρ(i, j), wherein the integral formula group specifically includes the following formula:
[0022]
[0023] Among them, ρ(i,j) represents the corresponding height of the reconstructed point, d θ represents 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, converting the coordinate parameters of the reconstruction point ρ(i, j) from the cylindrical coordinate system to the Cartesian coordinate system through a second conversion formula group, wherein 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 reconstruction point ρ(i,j), and (x,y,z) represents the coordinates of the reconstruction 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 camera intrinsic parameter I0, and distortion r0 and t0;
[0031] S220, calibrating the screen by 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 comprises the following steps:
[0033] S910, obtaining the phase Pa on the fringe image corresponding to any feature point P on the surface to be measured;
[0034] S920, obtaining 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 corresponding image information through phase solution, obtaining 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 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 a point P corresponding to the first pixel point P1 through a 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, connecting point Pc and the camera optical center to form an outgoing light, connecting point P S2 and point P S1 Forming incident light;
[0038] S960, the intersection of the incident light ray and the outgoing light ray is the feature point P, and the normal line 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] Where F represents the value of the normal vector accuracy, I x represents the camera internal parameter, r x and t x represents the 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 using an optimization algorithm to obtain the minimum value F of the normal vector accuracy function min , the optimization algorithm includes a first formula, and the first formula 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 surface of the standard part, 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 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 positions of the standard parts are different each time, and performing steps S313 and S314 after each placement;
[0051] S313, moving the screen to the near end, making the screen display characteristic stripes, and photographing the surface of the standard part with the camera to obtain sixth image information;
[0052] S314, moving the screen to the far end, making the screen display characteristic stripes, using the camera to photograph the surface of the standard part to obtain seventh image information, wherein the sixth image information and the seventh image information both include a plurality of stripe images including 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 near end, making the screen display characteristic stripes, and photographing the smooth inner wall member with the camera to obtain fourth image information including the measurement area;
[0059] S620, moving the screen to the far end so that the screen displays characteristic stripes, using a camera to photograph the smooth inner wall member, and obtaining fifth image information including 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 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 beneficial effects of the present invention are:
[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 in the surface to be tested is obtained by phase solution and coordinate system conversion. S1 and point P S2 , and then through the corresponding point Pc of the feature point P on the camera imaging surface, the line connecting point Pc and the optical center of the camera forms an outgoing light. 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 vector n can be combined to form an initial surface shape. This grazing arrangement can completely capture the entire surface shape of the smooth inner wall at one time, solving the problem that the traditional phase deflection single field of view measurement range is limited, relies on splicing, and has low splicing 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, and after obtaining the gradient information, the integration processing is performed based on the Southwell integration principle, and then converted back to the Cartesian coordinate system after the integration processing, which solves the problem that the cylindrical surface cannot be integrated in the Cartesian coordinate system in the prior art, and converts the large curvature integral into the small curvature integral problem, which effectively improves the accuracy of the integration. The reconstructed points after the integration processing are more in line with the actual surface shape, and the measurement accuracy is higher;
[0069] 3. On the basis of the above, standard parts are used to optimize the system calibration results and 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 easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Other features, objects and advantages of the present invention will become more apparent from 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 of a grazing phase deflection method provided in an embodiment of the present application;
[0073] Figure 2 A schematic diagram of the structure of a measurement system of step S300 in a method for measuring a glancing phase-deflection smooth inner wall surface provided in an embodiment of the present application;
[0074] Figure 3 A schematic diagram of the structure of a measurement system of step S400 in a method for measuring a glancing phase-deflection smooth inner wall surface provided in an embodiment of the present application;
[0075] Figure 4 A schematic diagram of the structure of incident light and outgoing light in a grazing phase deflection smooth inner wall surface shape measurement method provided in an embodiment of the present application;
[0076] Figure 5 A schematic diagram of a smooth inner wall surface formed by a combination of reconstruction points in a grazing phase deflection smooth inner wall surface measurement method provided in an embodiment of the present application.
[0077] Numbers in the figure: 1, camera; 12, camera optical center; 2, smooth surface part; 21, standard part; 22, smooth inner wall part; 23, characteristic 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 in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0079] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments 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 Figure 1 to Figure 5 The embodiment of the present invention provides a method for measuring the smooth inner wall surface of a 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 platform 4 is provided below the screen 3, the displacement platform 4 can drive the screen 3 to move along the first direction, and the displacement platform 4 has a proximal end close to the camera 1 and a distal end far 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, calibrating the camera 1 by using the Zhang Zhengyou calibration method to obtain the initial calibration parameters of the camera, where the initial calibration parameters of the camera include the camera intrinsic parameter I0, and the distortion r0 and t0;
[0085] Among them, Zhang Zhengyou's calibration method is a common method for camera calibration, which will not be elaborated here. In addition, in Zhang Zhengyou's 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 Zhang Zhengyou's 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 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.
[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 point;
[0092] S222, performing phase calculation on each fringe image in the first image information to obtain a number 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 a 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 unfolding 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 number of second pixel points. Similarly, each phase in the fringe image of the first image information has a one-to-one correspondence with a number 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 first pixel point or the second pixel point corresponding to it in the screen pixel coordinate system can be obtained;
[0094] S223, performing monocular reconstruction on each first pixel point, and optimizing the position of screen 3 based on an optimization algorithm, wherein 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] Among them, monocular reconstruction refers to the technology of 3D reconstruction based on the image information obtained by a single camera. The reprojection error refers to the difference between the projection of the real 3D space point on the image plane (that is, the pixel point on the image) and the reprojection (actually the virtual pixel point obtained by our calculation value). The minimum error value is selected through the optimization algorithm to ensure the accuracy of the position of screen 3.
[0096] S224, moving the screen 3 to the far end, making the screen 3 display characteristic stripes, and photographing the screen 3 with 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 number of second pixel points on the screen 3 corresponding to each phase in the fringe image;
[0098] S226, performing monocular reconstruction on each second pixel point, and optimizing the position of screen 3 based on the optimization algorithm, wherein 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 the optimized calibration result; avoiding the situation where error accumulation 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, reconstructing the standard surface shape of the standard part 21 using the measurement system, and obtaining a number of reconstructed feature points and corresponding reconstructed normal vectors on the surface of the standard part 21; wherein the standard part 21 may use a standard plane mirror, 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 the standard component 21 is different each time, and performing steps S313 and S314 after each placement;
[0105] S313, moving the screen 3 to the near end, making the screen 3 display 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, making the screen 3 display characteristic stripes, using the camera 1 to photograph the surface of the standard component 21, and obtaining seventh image information, wherein the sixth image information and the seventh image information both include a plurality of stripe images including the characteristic stripes;
[0107] S315, based on the phase deflection 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 errors in the reconstruction process can be reduced and the optimization effect can be improved.
[0109] In some embodiments, the phase deflection measurement method specifically includes the following steps:
[0110] S910, obtaining the phase Pa of the fringe image corresponding to any feature point P on the surface to be measured; since the fringe images obtained by the screen 3 at the near end and the far end 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, and this is a supplementary description for the convenience of understanding the corresponding relationship; in addition, when executing S315, the sixth image information and the seventh image information are selected, and when executing step S700, the third image information is selected;
[0111] S920, obtaining 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, and when using the third transformation formula group, the rotation matrix R and the translation matrix T use the corresponding distortion r and t, that is, r0 and t0 are used when executing step S315, and r0 is used when executing step S700. ‘ and t ‘ ;
[0112] S930, by processing the corresponding image information through phase solution, 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 a point P corresponding to the first pixel point P1 through a third conversion formula group. S1 7, and the point P corresponding to the second pixel point P2 S28, where point P S1 7 and point P S2 The coordinate parameters of 8 are based on the camera coordinate system;
[0114] S950, the line point Pc61 and the camera optical center 12 form an outgoing light, and the line point P S2 8 and point P S1 7 forming incident light;
[0115] S960, the intersection of the incident light ray and the outgoing light ray 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, so the coordinate parameters of the above 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 pixel points correspond to the pixels in reality. The pixel has a size. Therefore, the coordinate parameters of the corresponding point 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, the coordinate parameters are 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] Where F represents the value of the normal vector accuracy, I x represents the camera internal parameter, r x and t x represents the 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, and the reconstructed normal vectors may be tilted and have an angle 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 into 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 in this way until the function value F is obtained x =F min , end the iteration, function value F min Corresponding to 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, minimum value F based on 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 an 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, performing binarization processing on the third image information to obtain a grayscale image; the binarization processing is to set the grayscale value of the image to 0 (black) or 255 (white), thereby forming an obvious contrast effect to facilitate subsequent recognition;
[0138] S520, perform connected domain processing on the grayscale image, identify the area where the inner wall of the smooth inner wall part is located, and mark it as the measurement area; wherein the connected domain processing is to convert the image area composed of pixel points with the same pixel value and adjacent positions in the image. The connected domain processing is an image recognition method, and can accurately identify the white area in the grayscale image, which is convenient for subsequent calculations and avoids calculation errors or large calculation amount caused by direct shooting.
[0139] S600, using a measurement system to 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, making the screen 3 display characteristic stripes, using the camera 1 to photograph the smooth inner wall member 22, and obtaining fourth image information including the measurement area;
[0142] S620, move the screen 3 to the far end, so that the screen 3 displays characteristic stripes, use the camera 1 to photograph the smooth inner wall part 22, and obtain the fifth image information including the measurement area. The fourth image information and the fifth image information both include several measurement area images containing characteristic stripes.
[0143] S700, based on the phase deflection measurement method, marking the surface of the measurement area as a surface to be measured, processing the fourth image information and the fifth image information, and obtaining 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 the translation matrix T are selected as R1 ’ and T1 ’ Similarly, when calculating the coordinate parameters of the second pixel point P2, the coordinate parameters are converted into the corresponding point P S2 When the coordinate parameters are 8, the rotation matrix R and the translation matrix T are R2 ’ and T2 ’ , compared to directly using R 10 , T 10 , R 20 and T 20 , R1 ’ 、T1 ’、 R2 ’ and T2 ’ are 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, it is more accurate to obtain the initial normal vector using these optimized parameters, thereby improving the accuracy of surface measurement.
[0145] S800, obtaining 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 combining several reconstruction points to form the smooth inner wall surface shape; the reconstructed surface shape is as follows Figure 5 As shown, 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, converting the initial feature points and the corresponding initial normal vectors into cylindrical coordinate system parameters through a first conversion formula group, wherein 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, and (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, obtaining 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 represents 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 a number of 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 θ represents 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, converting the coordinate parameters of the reconstruction point ρ(i, j) from the cylindrical coordinate system to the Cartesian coordinate system through 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 reconstruction point ρ(i,j), and (x,y,z) represents the coordinates of the reconstruction 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 transferred to the Cartesian coordinate system, which solves the problem that the cylindrical surface cannot be integrated in the Cartesian coordinate system in the prior art, and converts the large curvature integral into the small curvature integral problem, which effectively improves the accuracy of the integration. The reconstructed points after the integration processing are more in line with the actual surface shape and have higher measurement accuracy.
[0162] In the description of this specification, the terms "connection", "installation", "fixation" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0163] In the description of this specification, the description of the terms "one embodiment", "some embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0164] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for measuring the smooth inner wall surface shape by grazing phase deflection, characterized in that: The specific steps include: S100, constructing a measurement system, wherein the measurement system comprises a camera, a smooth surface member, and a screen arranged in sequence along a first direction, wherein a displacement platform is provided below the screen, and the displacement platform can drive the screen to move along the first direction, and the displacement platform has a proximal end close to the camera and a distal end far 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, making the screen display a full white image, photographing the smooth inner wall part, and obtaining third image information; S500, processing the third image information to obtain a measurement area; S600, using the measurement system to obtain fourth image information and fifth image information containing the measurement area; S700, based on a phase deflection measurement method, marking the surface of the measurement area as a surface to be measured, processing the fourth image information and the fifth image information, and obtaining a number 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 using a cylindrical coordinate system integration method to obtain reconstruction points of the smooth inner wall, and combining a plurality of the reconstruction points to form a smooth inner wall surface shape.
2. The method for measuring the smooth inner wall surface shape by 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 of the initial feature points 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, obtaining the gradient information of the initial feature point and the corresponding initial normal vector in the cylindrical coordinate system through 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, nx, ny represent the components of the initial normal vector in the x direction and y direction; S803, based on the Southwell integral principle, the coordinates of the reconstruction point ρ are solved to obtain a number of reconstruction points ρ(i, j), wherein the integral formula group specifically includes the following formula: Among them, ρ(i,j) represents the corresponding height of the reconstructed point, d θ represents 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; S804, converting the coordinate parameters of the reconstruction point ρ(i, j) from the cylindrical coordinate system to the Cartesian coordinate system through a second conversion formula group, wherein 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 reconstruction point ρ(i,j), and (x,y,z) represents the coordinates of the reconstruction point in the Cartesian coordinate system.
3. The method for measuring the smooth inner wall surface shape by grazing phase deflection according to claim 1, characterized in that: 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 camera intrinsic parameter I0, and distortion r0 and t0; S220, calibrating the screen by 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 of grazing phase deflection according to claim 3, characterized in that: The phase deflection measurement method specifically comprises the following steps: S910, obtaining the phase Pa on the fringe image corresponding to any feature point P on the surface to be measured; S920, obtaining 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 corresponding image information through phase solution, obtaining 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 coordinate parameters of the first pixel point P1 and the second pixel point P2 are based on the screen pixel coordinate system; S940: Obtain a point P corresponding to the first pixel point P1 through a 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, connecting point Pc and the camera optical center to form an outgoing light, connecting point P S2 and point P S1 Forming incident light; S960, the intersection of the incident light ray and the outgoing light ray is the feature point P, and the normal line 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 by grazing phase deflection according to claim 4, characterized in that: 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 ) Where F represents the value of the normal vector accuracy, I x represents the camera internal parameter, r x and t x represents the 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 using an optimization algorithm to obtain the minimum value F of the normal vector accuracy function min , the optimization algorithm includes a first formula, and the first formula 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 surface of the standard part, 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 shape by grazing phase deflection according to claim 5, characterized in that: 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 positions of the standard parts are different each time, and performing steps S313 and S314 after each placement; S313, moving the screen to the near end, making the screen display characteristic stripes, and photographing the surface of the standard part with the camera to obtain sixth image information; S314, moving the screen to the far end, making the screen display characteristic stripes, using the camera to photograph the surface of the standard part to obtain seventh image information, wherein the sixth image information and the seventh image information both include a plurality of stripe images including 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 by grazing phase deflection according to claim 1, characterized in that: 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 shape by grazing phase deflection according to claim 7, characterized in that: The step S600 specifically includes the following steps: S610, moving the screen to the near end, making the screen display characteristic stripes, and photographing the smooth inner wall member with the camera to obtain fourth image information including the measurement area; S620, moving the screen to the far end so that the screen displays characteristic stripes, using a camera to photograph the smooth inner wall member, and obtaining fifth image information including 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 by grazing phase deflection according to claim 6, characterized in that: 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: 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 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
Camera calibration method for optical surface shape measurement and device for realizing method
CN111862237A
Curved surface detection method based on phase deflection
CN114111638A
Mirror surface morphology measurement method and device based on projection imaging comparison
CN116576802A
Method and system for three-dimensional surface measurement with a mobile device
US20210029346A1