Structured light phase high calibration algorithm considering transverse dimension
By considering the calibration of lateral dimensions in the structured optical phase height calibration algorithm, and using the phase height method to obtain the phase-height mapping coefficient and height-height-transverse dimension mapping coefficient, the problem of complex and low efficiency of lateral dimension calibration in the prior art is solved, and the problem of low efficiency of lateral dimension calibration in the prior art is realized Efficient three-dimensional reconstruction.
Patent Information
- Application Number
- CN202411441419.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The prior art is difficult to effectively calibrate lateral dimensions, the calibration process is complex and the efficiency is low.
Provide a structured light phase height calibration algorithm that considers the lateral dimensions. By obtaining the images of checkerboard calibration plates at different positions and angles, single-target calibration and lens distortion correction are performed, phase height method is used to obtain phase height calibration data, and phase position is calculated. -Height mapping coefficient and height-lateral dimension mapping coefficient to realize the calibration of height and horizontal dimension.
The calibration process is simplified, the calibration efficiency is improved, and the calibration of phase-three coordinates is realized. There is no need for camera-optical joint calibration. Three-direction calibration is completed in just one translation platform calibration.
Smart Images

Figure CN119399293A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of camera calibration, and in particular to a structured light phase height calibration algorithm that takes lateral dimensions into consideration. Background Art
[0002] As a high-precision camera calibration method, the phase-height method collects the phase and plane height information of the standard plane with the help of equipment such as a translation stage, and calculates the mapping relationship between the phase difference and height between the standard plane and the reference plane pixel by pixel. According to the mapping relationship between the phase difference and the height, it is mainly divided into two types: the inverse linear phase-height model and the polynomial phase-height model, which can accurately estimate the height information of the measured object from the reference plane. However, the lateral size cannot be calibrated using the phase-height method alone. At present, the estimation of the lateral size often requires the help of the camera-optical machine joint calibration results, and the calibration process is complicated and inefficient. Summary of the invention
[0003] The purpose of this application is to provide a structured light phase height calibration algorithm that takes the lateral size into consideration, which can realize the calibration of the height-lateral size mapping coefficient based on the phase-height mapping coefficient calibration, simplify the calibration process, and improve the calibration efficiency.
[0004] To achieve the above objectives, this application provides the following solutions:
[0005] The present application provides a structured light phase height calibration algorithm considering the lateral size, comprising the following steps:
[0006] The images of the checkerboard calibration plate at different positions and angles are obtained, and the camera is subjected to single-target positioning and lens distortion correction to obtain the camera single-target positioning parameters.
[0007] The phase-height method is used to obtain phase-height method calibration data, and the phase-height mapping coefficient is calculated based on the phase-height method calibration data; the phase-height method calibration data is the image data of the checkerboard calibration plate at different heights collected during the process of controlling the moving block of the translation stage to drive the checkerboard calibration plate to translate from the reference plane position along the H direction.
[0008] For any optical path of the camera, the lateral size of the intersection of the optical path and the checkerboard calibration plates of different heights is calculated according to the camera single-target calibration parameters and the phase height method calibration data.
[0009] According to the lateral dimensions of the intersection of the optical path and the checkerboard calibration plate at different heights and the height value of the checkerboard calibration plate, the height-lateral dimension mapping coefficient is fitted; the phase-height mapping coefficient and the height-lateral dimension mapping coefficient can be used for three-dimensional reconstruction according to the camera imaging results.
[0010] Optionally, according to the images of the checkerboard calibration plate at different positions and angles, combined with the corner detection algorithm, Zhang's calibration method is used to perform single-target positioning and lens distortion correction on the camera to obtain the camera single-target positioning parameters; the three-dimensional coordinates of any corner point of the checkerboard calibration plate can be calculated based on the camera single-target positioning parameters.
[0011] Optionally, the phase height method is used to obtain phase height method calibration data, which specifically includes the following steps:
[0012] The moving block of the translation stage is controlled to drive the checkerboard calibration plate to translate along the H direction from the reference plane position, and an optical machine is used to project a coding pattern onto the surface of the checkerboard calibration plate.
[0013] In the above translation process, every time the checkerboard calibration plate is translated for a certain distance, the translation distance of the checkerboard calibration plate is recorded and the surface image data of the checkerboard calibration plate is collected by a camera to obtain the calibration data of the photo-height method.
[0014] Optionally, based on the phase-height method calibration data, a third-order polynomial phase-height model is used to calculate the phase-height mapping coefficient pixel by pixel; the phase-height mapping coefficient can be used to calculate the reconstructed height of any pixel point according to the phase value of the pixel point in the camera imaging result.
[0015] Optionally, for any optical path of the camera, according to the camera single-target calibration parameters and the phase height method calibration data, calculating the lateral size of the intersection of the optical path and the checkerboard calibration plate at different heights specifically includes the following steps:
[0016] The world coordinate system is constructed by taking any corner point of the reference plane as the origin of the world coordinate system, the horizontal direction of the chessboard calibration plate as the world coordinate system X-axis, the vertical direction as the world coordinate system Y-axis, and the translation direction of the chessboard calibration plate as the world coordinate system H-axis.
[0017] At any height, according to the camera single-target calibration parameters, the distance information from any point on the chessboard calibration plate at the height to the camera optical axis is determined.
[0018] The lateral size of the intersection of the optical path and the chessboard calibration plate at the height is determined according to the distance information from the intersection of the optical path and the chessboard calibration plate at the height to the camera optical axis and the distance information from the corner points around the intersection to the camera optical axis.
[0019] Optionally, determining the lateral size of the intersection of the optical path and the checkerboard calibration plate at the height according to the distance information from the intersection of the optical path and the checkerboard calibration plate at the height to the optical axis of the camera and the distance information from the corner points around the intersection to the optical axis of the camera specifically comprises the following steps:
[0020] On the chessboard calibration plate at the height, the front neighbor corner point and the back neighbor corner point of the intersection are determined.
[0021] A first right triangle is constructed with the line connecting the previous neighbor corner point and the intersection point as the hypotenuse.
[0022] A second right triangle is constructed with the line connecting the front neighbor corner point and the rear neighbor corner point as the hypotenuse.
[0023] The lengths of the right-angled sides of the first right triangle and the second right triangle are determined respectively according to the distance information from the front neighbor corner point to the camera optical axis, the distance information from the back neighbor corner point to the camera optical axis, and the distance information from the intersection point to the camera optical axis.
[0024] Based on the principle of similar triangles, the length of the hypotenuse of the first right triangle is determined according to the length of the right-angled side of the first right triangle and the length of the right-angled side of the second right triangle, and the lateral dimension of the intersection is obtained.
[0025] Optionally, the length of the right angle side of the first right triangle and the length of the right angle side of the second right triangle are determined according to the following formula:
[0026] Q m,h Q' m,v =Q m,h Q m,v -Q' m,v Q m,v =Q m,h Q m,v -P 0,h P 0,v
[0027] P 1,h P' 1,v =P 1,h P 1,v -P' 1,v P 1,v =P 1,h P 1,v -P 0,h P 0,v .
[0028] Among them, Q m,h represents the intersection of the optical path and the checkerboard calibration plate at the height, Q m,v represents the intersection of the perpendicular line between the intersection point and the camera optical axis and the camera optical axis, Q m,h Q' m,v represents the right angle side of the first right triangle, P 0,h represents the front neighbor corner point, P 0,v represents the intersection of the vertical line of the front neighbor corner point and the camera optical axis and the camera optical axis, P 1,h represents the back neighbor corner point, P 1,vrepresents the intersection of the perpendicular line between the back neighbor corner point and the camera optical axis and the camera optical axis, P 1,h P' 1,v represents the right angle side of the second right triangle, P 0,h P 0,v Indicates the distance information from the front neighbor corner point to the camera optical axis.
[0029] Optionally, determine the length of the hypotenuse of the first right triangle according to the following formula:
[0030]
[0031] Among them, x m is the length of the hypotenuse of the first right triangle, that is, the horizontal dimension of the intersection, Q m,h Q' m,v represents the right angle side of the first right triangle, P 1,h P' 1,v represents the right-angled side of the second right triangle, and d is the distance between the front neighbor corner point and the back neighbor corner point.
[0032] Optionally, the height-lateral dimension mapping coefficient is obtained by fitting according to the following formula:
[0033] x i,j =a i ·h j i∈[1,img_width],j∈[0,n].
[0034] Among them, x i,j is the lateral dimension of the intersection of the i-th optical path at the j-th height of the checkerboard calibration plate, a i is the height-to-lateral dimension mapping coefficient of the ith optical path, h j is the j-th height value, i is the light path number, j is the height number, img_width is the number of horizontal pixels of the camera imaging result, that is, the number of light paths, and n is the number of heights.
[0035] Optionally, the structured light phase height calibration algorithm considering the lateral size further includes the following steps:
[0036] For any pixel point of the camera imaging result, the reconstructed height of the pixel point is calculated according to the phase value of the pixel point and the phase-height mapping coefficient.
[0037] The lateral coordinate of the pixel point is calculated according to the reconstructed height of the pixel point and the height-lateral size mapping coefficient to complete the three-dimensional reconstruction.
[0038] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0039] The present application provides a structured light phase-height calibration algorithm that takes lateral dimensions into consideration. First, by acquiring images of a checkerboard calibration plate at different positions and angles, the camera is subjected to single-target calibration and lens distortion correction. Subsequently, the phase-height method is used to obtain phase-height method calibration data and the phase-height mapping coefficient is calculated. Then, for any optical path of the camera, the lateral dimensions of the intersection of the optical path and the checkerboard calibration plate at different heights are calculated according to the camera single-target calibration parameters and the phase-height method calibration data. The height coefficient is obtained by fitting according to the lateral dimensions of the intersection of the optical path and the checkerboard calibration plate at different heights and the height value of the checkerboard calibration plate. Degree-lateral dimension mapping coefficient; the above scheme of the present application analyzes from a geometric point of view, and derives and calculates the lateral dimension of the intersection of each optical path of the camera imaging result with the plane of the calibration plate of known height, and then solves the mapping coefficient of lateral dimension and height by pixel fitting. Compared with the existing scheme, the calibration of height-lateral dimension mapping coefficient is added on the basis of phase-height mapping coefficient calibration, thereby realizing the calibration of phase-three coordinates. Compared with the existing lateral dimension calibration method, there is no need to perform camera-optical-mechanical joint calibration, and only one translation stage calibration is required to complete the three-direction calibration, and the calibration efficiency is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A flowchart of a structured light phase height calibration algorithm considering lateral dimensions is provided in one embodiment of the present application.
[0042] Figure 2 A position relationship diagram of various components when performing phase height calibration of a structured light scanning device in a structured light phase height calibration algorithm that takes lateral dimensions into consideration provided in one embodiment of the present application.
[0043] Figure 3 A schematic diagram of the positional relationship between the intersection of light paths on a checkerboard calibration plate at different heights and surrounding corner points in a structured light phase height calibration algorithm that takes lateral dimensions into consideration provided in one embodiment of the present application.
[0044] Figure 4 This is a flowchart of step S3 in a structured light phase height calibration algorithm taking lateral dimensions into consideration provided in an embodiment of the present application.
[0045] Figure 5 This is a flowchart of step S33 in a structured light phase height calibration algorithm taking lateral dimensions into consideration provided in an embodiment of the present application.
[0046] Figure 6 A schematic diagram of the positional relationship between an image plane and calibration planes in a structured light phase height calibration algorithm taking lateral dimensions into consideration provided in an embodiment of the present application.
[0047] Figure 7 A schematic diagram of the functional modules of a structured light phase height calibration system taking lateral dimensions into consideration provided in one embodiment of the present application.
[0048] Figure 8 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0051] In an exemplary embodiment, Figure 1 As shown, a structured light phase height calibration algorithm considering the lateral size is provided, including the following steps:
[0052] S1, obtaining images of a checkerboard calibration plate at different positions and angles, performing single-target calibration and lens distortion correction on the camera, and obtaining camera single-target calibration parameters. In step S1, images of a checkerboard calibration plate at different positions and angles are captured within the camera depth of field to facilitate single-target calibration and lens distortion correction.
[0053] S2. Use the phase-height method to obtain phase-height method calibration data, and calculate the phase-height mapping coefficient based on the phase-height method calibration data; the phase-height method calibration data is the image data of the checkerboard calibration plate at different heights collected during the process of controlling the moving block of the translation stage to drive the checkerboard calibration plate to translate from the reference plane position along the H direction.
[0054] In this embodiment, when performing phase height calibration of the structured light scanning device, the position relationship of the camera, optical machine, translation stage, and calibration plate involved is as follows: Figure 2 As shown, the structured light scanning device is located at the end of the translation stage, and the checkerboard calibration plate is fixed on the moving block of the translation stage. The moving block of the translation stage can be controlled to achieve translation movement of the checkerboard calibration plate along the H direction for a known distance.
[0055] S3. For any optical path of the camera, according to the camera single-target calibration parameters and the phase height method calibration data, calculate the lateral size of the intersection of the optical path and the checkerboard calibration plates of different heights.
[0056] S4. According to the lateral dimensions of the intersection of the optical path and the checkerboard calibration plate at different heights and the height value of the checkerboard calibration plate, a height-lateral dimension mapping coefficient is fitted; the phase-height mapping coefficient and the height-lateral dimension mapping coefficient can be used for three-dimensional reconstruction according to the camera imaging result.
[0057] Specifically in this embodiment, in step S1, according to the chessboard calibration plate images at different positions and angles, combined with the corner point detection algorithm, the Zhang calibration method is used to perform single-target positioning and lens distortion correction on the camera to obtain the camera single-target positioning parameters; according to the camera single-target positioning parameters, the three-dimensional coordinates of any corner point of the chessboard calibration plate can be calculated.
[0058] Specifically in this embodiment, the phase height method is used to obtain the phase height method calibration data in step S2, which specifically includes the following steps:
[0059] S21, control the translation stage moving block to drive the checkerboard calibration plate to translate from the reference plane position along the H direction, and use the optical machine to project the coding pattern onto the surface of the checkerboard calibration plate. In an exemplary embodiment, the optical machine is used to project the coding pattern of the phase shift method + Gray code onto the calibration plate plane, and the translation stage moving block is controlled to drive the checkerboard calibration plate to translate from the reference plane position along the H direction, and the translation distances are h1, h2, ..., h n .
[0060] S22. During the above translation process, whenever the checkerboard calibration plate translates a certain distance, the translation distance of the checkerboard calibration plate is recorded and the surface image data of the checkerboard calibration plate is collected by the camera to obtain the phase-height calibration data. Whenever the checkerboard calibration plate completes a translation, the translation distance is recorded and the camera collects the image data of the checkerboard calibration plate with the coding pattern projected on the surface, i.e., the phase-height calibration data.
[0061] Specifically in this embodiment, step S2 is based on the phase-height method calibration data, and uses a third-order polynomial phase-height model to calculate the phase-height mapping coefficient pixel by pixel; the phase-height mapping coefficient can be used to calculate the reconstructed height of any pixel point according to the phase value of the pixel point in the camera imaging result.
[0062] Based on the pinhole imaging model, this application considers that the intersection points formed by an optical path and calibration planes at different heights have the same pixel coordinates on the imaging plane, such as Figure 3 Point P in 0,0 With Q m,h , both have the same pixel coordinates (u m ,vm ), and at the same time, one pixel corresponds to only one light path. Therefore, in an exemplary embodiment of the present application, Figure 4 In the flowchart shown, step S3 specifically includes the following steps:
[0063] S31, take any corner point of the reference plane as the origin of the world coordinate system, take the horizontal direction of the chessboard calibration plate as the world coordinate system X-axis, take the vertical direction as the world coordinate system Y-axis, take the translation direction of the chessboard calibration plate as the world coordinate system H-axis, and construct the world coordinate system. 0,0 Set as the origin of the world coordinate system, set the horizontal and vertical directions along the checkerboard calibration plate as the X and Y axes respectively, and set the plane translation direction of the calibration plate as the H axis. m,h The world coordinates of m ,y m ,h), where h is the translation stage moving height set in step S21, and x m With y m It can be calculated by combining the position information of the corner points around the point. m For example, y m The solution process of is similar.
[0064] S32: At any height, determine the distance information from any point on the checkerboard calibration plate at the height to the camera optical axis according to the camera single-target calibration parameters. The camera single-target calibration parameters of step S1 can be used to calculate the corner point P in the plane at the height h. 1,h With P 0,h In the camera coordinate system, the distance information from any point to the camera optical axis can be obtained, that is, Figure 3 Midline segment P 1,h P 1,v , P 0,h P 0,v , Q m,h Q m,v The length of is known.
[0065] S33, determining the lateral size of the intersection of the optical path and the checkerboard calibration plate at the height according to the distance information from the intersection of the optical path and the checkerboard calibration plate at the height to the camera optical axis and the distance information from the corner points around the intersection to the camera optical axis. Figure 5 In the flowchart shown, step S33 specifically includes the following steps:
[0066] S331, on the checkerboard calibration plate at the height, determine the front neighbor corner point and the back neighbor corner point of the intersection point. m,h , the front neighbor corner points and the back neighbor corner points on both sides are P 1,h With P0,h .
[0067] S332, construct the first right triangle with the line connecting the previous neighbor corner point and the intersection point as the hypotenuse, that is, ΔP 0,h Q m,h Q' m,v .
[0068] S333, construct a second right triangle with the line connecting the front neighbor corner point and the back neighbor corner point as the hypotenuse, that is, ΔP 0,h P 1, h P' 1,v .
[0069] S334, according to the distance information from the front neighbor corner point to the camera optical axis, the distance information from the back neighbor corner point to the camera optical axis, and the distance information from the intersection point to the camera optical axis, respectively determine the lengths of the right angle sides of the first right triangle and the second right triangle. In this embodiment, the lengths of the right angle sides of the first right triangle and the lengths of the right angle sides of the second right triangle are determined according to the following formula:
[0070] Q m,h Q' m,v =Q m,h Q m,v -Q' m,v Q m,v =Q m,h Q m,v -P 0,h P 0,v
[0071] P 1,h P' 1,v =P 1,h P 1,v -P' 1,v P 1,v =P 1,h P 1,v -P 0,h P 0,v .
[0072] Among them, Q m,h represents the intersection of the optical path and the checkerboard calibration plate at the height, Q m,v represents the intersection of the perpendicular line between the intersection point and the camera optical axis and the camera optical axis, Q m,h Q' m,v represents the right angle side of the first right triangle, P 0,h represents the front neighbor corner point, P 0,v represents the intersection of the vertical line of the front neighbor corner point and the camera optical axis and the camera optical axis, P 1,h represents the back neighbor corner point, P 1,v represents the intersection of the perpendicular line between the back neighbor corner point and the camera optical axis and the camera optical axis, P 1,h P'1,v represents the right angle side of the second right triangle, P 0,h P 0,v Indicates the distance information from the front neighbor corner point to the camera optical axis.
[0073] S335. Based on the principle of similar triangles, the length of the hypotenuse of the first right triangle is determined according to the length of the right angle of the first right triangle and the length of the right angle of the second right triangle, and the horizontal dimension of the intersection is obtained. The length of the hypotenuse of the first right triangle is determined according to the following formula:
[0074]
[0075] Among them, x m is the length of the hypotenuse of the first right triangle, that is, the horizontal dimension of the intersection, Q m,h Q' m,v represents the right angle side of the first right triangle, P 1,h P' 1,v represents the right angle side of the second right triangle, and d is the distance between the front neighbor corner point and the back neighbor corner point. In summary, h is known, and y is calculated m The steps are similar to those above for calculating x m The steps are the same as , then the world coordinates of the intersection of each optical path of the camera and the calibration plane can be calculated.
[0076] Any optical path and the calibration planes at different heights and the H axis will form several similar triangles, such as Figure 6 The position relationship diagram of the image plane and each calibration plane is shown. The image resolution is (img_width, img_height), the height used for calibration is n groups, and the i-th optical path and the calibration plane form n groups of similar triangles. It is not difficult to see that the lateral size x is linearly related to h. In an exemplary embodiment of the present application, the height-lateral size mapping coefficient is obtained by fitting according to the following formula in step S4:
[0077] x i,j =a i ·h j i∈[1,img_width],j∈[0,n].
[0078] Among them, x i,j is the lateral dimension of the intersection of the i-th optical path at the j-th height of the checkerboard calibration plate, a i is the height-to-lateral dimension mapping coefficient of the ith optical path, h j is the jth height value, i is the light path number, j is the height number, img_width is the number of horizontal pixels of the camera imaging result, that is, the number of light paths, and n is the number of heights. The Y-direction mapping coefficient calculation method is similar.
[0079] Thus, the phase-height mapping coefficient and the height-lateral dimension mapping coefficient are calculated pixel by pixel by the algorithm provided in this embodiment. Combined with the calibration results, high-precision three-dimensional reconstruction can be achieved. In another exemplary embodiment of the present application, the structured light phase height calibration algorithm considering the lateral dimension also includes the following steps:
[0080] S5. For any pixel point of the camera imaging result, calculate the reconstructed height of the pixel point according to the phase value of the pixel point and the phase-height mapping coefficient.
[0081] S6. Calculate the lateral coordinate of the pixel point according to the reconstructed height of the pixel point and the height-lateral size mapping coefficient to complete the three-dimensional reconstruction.
[0082] In the algorithm provided in this embodiment, from a geometric perspective, the lateral size of the intersection with the standard plane of known height is derived and calculated for each optical path, and then the mapping coefficient of the lateral size and height is solved by pixel-by-pixel fitting. There is no constraint on the relative position of the camera, optical machine and calibration plate plane. Compared with the method requiring the optical axis of the camera or optical machine to be perpendicular to the standard plane, the algorithm of this embodiment is more applicable; thanks to the calibration model along the optical path proposed in this algorithm, only two lateral size-height mapping coefficients are added to each pixel point on the basis of the phase-height mapping coefficient. Compared with other pixel-by-pixel calibration methods, this algorithm has less calibration data, less space occupancy, and high computational efficiency; this algorithm establishes the relationship between the lateral size and the phase by finding the mapping relationship between the lateral size and the height, and then realizes the calibration of the phase-three coordinates. Compared with other methods, this algorithm only needs one translation stage calibration to complete the XYH direction calibration, and the calibration efficiency is high.
[0083] Based on the same inventive concept, the embodiment of the present application also provides a system for implementing the structured light phase height calibration algorithm considering the lateral size involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above algorithm, so the specific limitations in one or more system embodiments provided below can refer to the limitations of the structured light phase height calibration algorithm considering the lateral size above, and will not be repeated here.
[0084] In an exemplary embodiment, Figure 7 As shown, a structured light phase height calibration system considering the lateral size is provided, including the following modules:
[0085] The camera single-target positioning module is used to obtain the chessboard calibration plate images at different positions and angles, perform single-target positioning and lens distortion correction on the camera, and obtain the camera single-target positioning parameters.
[0086] The phase-height mapping coefficient determination module is used to obtain phase-height method calibration data using the phase-height method, and calculate the phase-height mapping coefficient based on the phase-height method calibration data; the phase-height method calibration data is the image data of the chessboard calibration plate at different heights collected during the process of controlling the moving block of the translation stage to drive the chessboard calibration plate to translate from the reference plane position along the H direction.
[0087] The intersection lateral size determination module is used to calculate the lateral size of the intersection of any optical path of the camera and the checkerboard calibration plate of different heights according to the camera single-target calibration parameters and the phase height method calibration data.
[0088] The height-lateral dimension mapping coefficient determination module is used to fit the height-lateral dimension mapping coefficient according to the lateral dimension of the intersection of the optical path and the checkerboard calibration plate at different heights and the height value of the checkerboard calibration plate; the phase-height mapping coefficient and the height-lateral dimension mapping coefficient can be used for three-dimensional reconstruction according to the camera imaging results.
[0089] certainly, Figure 7 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different functions. Figure 7 One or at least two components of the system shown.
[0090] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned structured light phase height calibration algorithm considering the lateral size is implemented.
[0091] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0092] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment algorithm can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0093] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A structured light phase height calibration algorithm considering lateral dimensions, characterized in that: include: Obtain images of the checkerboard calibration plate at different positions and angles, perform single-target calibration and lens distortion correction on the camera, and obtain the single-target calibration parameters of the camera; The phase-height method is used to obtain phase-height method calibration data, and the phase-height mapping coefficient is calculated based on the phase-height method calibration data; the phase-height method calibration data is the image data of the checkerboard calibration plate at different heights collected during the process of controlling the moving block of the translation stage to drive the checkerboard calibration plate to translate from the reference plane position along the H direction; For any optical path of the camera, according to the camera single-target calibration parameters and the phase height method calibration data, calculate the lateral size of the intersection of the optical path and the checkerboard calibration plate of different heights; According to the lateral dimensions of the intersection of the optical path and the checkerboard calibration plate at different heights and the height value of the checkerboard calibration plate, the height-lateral dimension mapping coefficient is fitted; the phase-height mapping coefficient and the height-lateral dimension mapping coefficient can be used for three-dimensional reconstruction according to the camera imaging results.
2. The structured light phase height calibration algorithm considering lateral dimensions according to claim 1, characterized in that: According to the chessboard calibration plate images at different positions and angles, combined with the corner detection algorithm, the Zhang calibration method is used to perform single-target positioning and lens distortion correction on the camera to obtain the camera single-target positioning parameters; according to the camera single-target positioning parameters, the three-dimensional coordinates of any corner point of the chessboard calibration plate can be calculated.
3. The structured light phase height calibration algorithm considering lateral dimensions according to claim 1, characterized in that: The phase height method is used to obtain phase height method calibration data, including: Control the moving block of the translation stage to drive the checkerboard calibration plate to translate along the H direction from the reference plane position, and use an optical machine to project the coding pattern onto the surface of the checkerboard calibration plate; In the above translation process, every time the checkerboard calibration plate is translated for a certain distance, the translation distance of the checkerboard calibration plate is recorded and the surface image data of the checkerboard calibration plate is collected by a camera to obtain the calibration data of the photo-height method.
4. The structured light phase height calibration algorithm considering lateral dimensions according to claim 1, characterized in that: Based on the phase-height method calibration data, the phase-height mapping coefficient is calculated pixel by pixel using a third-order polynomial phase-height model; the phase-height mapping coefficient can be used to calculate the reconstructed height of any pixel point according to the phase value of the pixel point in the camera imaging result.
5. The structured light phase height calibration algorithm considering lateral dimensions according to claim 1, characterized in that: For any optical path of the camera, according to the camera single-target calibration parameters and the phase height method calibration data, the lateral size of the intersection of the optical path and the checkerboard calibration plate at different heights is calculated, specifically including: Take any corner point of the reference plane as the origin of the world coordinate system, take the horizontal direction of the chessboard calibration plate as the world coordinate system X-axis, take the vertical direction as the world coordinate system Y-axis, and take the translation direction of the chessboard calibration plate as the world coordinate system H-axis to construct the world coordinate system; At any height, according to the camera single-target calibration parameters, determine the distance information from any point on the checkerboard calibration plate at the height to the camera optical axis; The lateral size of the intersection of the optical path and the chessboard calibration plate at the height is determined according to the distance information from the intersection of the optical path and the chessboard calibration plate at the height to the camera optical axis and the distance information from the corner points around the intersection to the camera optical axis.
6. The structured light phase height calibration algorithm considering lateral dimensions according to claim 5, characterized in that: Determining the lateral size of the intersection of the optical path and the checkerboard calibration plate at the height according to the distance information from the intersection of the optical path and the checkerboard calibration plate at the height to the camera optical axis and the distance information from the corner points around the intersection to the camera optical axis specifically includes: On the checkerboard calibration plate at the height, determining the front neighbor corner point and the back neighbor corner point of the intersection point; Constructing a first right triangle with the line connecting the front neighbor corner point and the intersection point as the hypotenuse; Constructing a second right triangle with the line connecting the front neighbor corner point and the rear neighbor corner point as the hypotenuse; Determine the lengths of the right-angled sides of the first right triangle and the second right triangle respectively according to the distance information from the front neighbor corner point to the camera optical axis, the distance information from the rear neighbor corner point to the camera optical axis, and the distance information from the intersection point to the camera optical axis; Based on the principle of similar triangles, the length of the hypotenuse of the first right triangle is determined according to the length of the right-angled side of the first right triangle and the length of the right-angled side of the second right triangle, and the lateral dimension of the intersection is obtained.
7. The structured light phase height calibration algorithm considering lateral dimensions according to claim 6, characterized in that: Determine the length of the right angle of the first right triangle and the length of the right angle of the second right triangle according to the following formula: Among them, Q m,h represents the intersection of the optical path and the checkerboard calibration plate at the height, Q m,v represents the intersection of the perpendicular line between the intersection point and the camera optical axis and the camera optical axis, Q m,h Q' m,v represents the right angle side of the first right triangle, P 0,h represents the front neighbor corner point, P 0,v represents the intersection of the vertical line between the front neighbor corner point and the camera optical axis and the camera optical axis, P 1,h represents the back neighbor corner point, P 1,v represents the intersection of the perpendicular line between the back neighbor corner point and the camera optical axis and the camera optical axis, P 1,h P' 1,v represents the right angle side of the second right triangle, P 0,h P 0,v Indicates the distance information from the front neighbor corner point to the camera optical axis.
8. The structured light phase height calibration algorithm considering lateral dimensions according to claim 6, characterized in that: Determine the length of the hypotenuse of the first right triangle using the following formula: Among them, x m is the length of the hypotenuse of the first right triangle, that is, the horizontal dimension of the intersection, Q m,h Q' m,v represents the right angle side of the first right triangle, P 1,h P' 1,v represents the right-angled side of the second right triangle, and d is the distance between the front neighbor corner point and the back neighbor corner point.
9. The structured light phase height calibration algorithm considering lateral dimensions according to claim 6, characterized in that: The height-lateral dimension mapping coefficient is obtained by fitting according to the following formula: x i,j =a i ·h j i∈[1,img_width],j∈[0,n]; Among them, x i,j is the lateral dimension of the intersection of the i-th optical path at the j-th height of the checkerboard calibration plate, a i is the height-to-lateral dimension mapping coefficient of the ith optical path, h j is the j-th height value, i is the light path number, j is the height number, img_width is the number of horizontal pixels of the camera imaging result, that is, the number of light paths, and n is the number of heights.
10. The structured light phase height calibration algorithm considering lateral dimensions according to claim 1, characterized in that: Also includes: For any pixel point of the camera imaging result, the reconstructed height of the pixel point is calculated according to the phase value of the pixel point and the phase-height mapping coefficient; The lateral coordinate of the pixel point is calculated according to the reconstructed height of the pixel point and the height-lateral size mapping coefficient to complete the three-dimensional reconstruction.
Citation Information
Patent Citations
Laser radar and camera combined calibration method based on mobile calibration plate
CN111612845A
Real-time three-dimensional shape measurement method and system
CN114018175A
Distortion decoupling camera calibration method and system
CN118037859A
Cited By
Layered grating image auxiliary calibration system
CN120495144A