Imaging method, device, system and storage medium of a three-dimensional imaging system
By constructing an error compensation lookup table and a binocular imaging linear mathematical system in the 3D imaging system, and utilizing a displacement platform and coded fringe images, the calibration problem of a single-camera-projection system was solved, and high-precision 3D coordinate determination was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2026-03-31
AI Technical Summary
In existing 3D imaging systems with a single camera-projector configuration, it is difficult to achieve effective calibration through unidirectional projected fringes, which makes it impossible to establish the correspondence between the camera and the pixels of the projection display chip, thus affecting the imaging accuracy.
By moving the displacement platform to acquire coded stripe images at different locations, the three-dimensional coordinates and image coordinates of the marker points are obtained. A binocular imaging linear mathematical system and an error compensation lookup table are constructed. The error value is calculated using cubic linear interpolation to eliminate the error caused by unidirectional coded stripes and determine the accurate three-dimensional coordinates.
This invention enables the calibration of a 3D imaging system using only unidirectional coded stripes, improving imaging accuracy and applicable scenarios while reducing system errors.
Smart Images

Figure CN115719384B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of three-dimensional measurement technology, and in particular relates to an imaging method for a three-dimensional imaging system, a computer device, a three-dimensional imaging system, and a computer-readable storage medium. Background Technology
[0002] Three-dimensional imaging systems based on structured light projection typically consist of two different core hardware components: (1) two cameras on the left and right sides plus a projection mechanism; (2) a single camera plus a projection mechanism. When calibrating a three-dimensional imaging system consisting of a single camera and a projection mechanism, the projection mechanism is usually considered as the imaging camera. Based on the inverse camera model, the projection mechanism sequentially projects stripes in both horizontal and vertical directions. The camera obtains the stripe map and decodes it to obtain the pixel position of each stripe corresponding to the projection display chip. Then, using the pixel coordinates of the camera corresponding to the feature points on the calibration target and the pixel position coordinates of the projection chip of the projection mechanism, an optimization method is used to calibrate the three-dimensional imaging system. However, in many application scenarios, the calibration process is limited by the projection mechanism, which cannot project stripes in both horizontal and vertical directions, making it impossible to establish a correspondence between the camera and the pixels on the projection display chip. The preceding description is intended to provide general background information and does not necessarily constitute existing technology. Summary of the Invention
[0003] Based on this, it is necessary to address the above problems by proposing an imaging method, computer equipment, three-dimensional imaging system, and computer-readable storage medium for a three-dimensional imaging system.
[0004] The technical problem solved by this application is achieved by the following technical solution:
[0005] This application provides an imaging method for a three-dimensional imaging system. The three-dimensional imaging system includes a displacement platform, a projection device, and a data acquisition device. The displacement platform is used to move according to control, and a calibration target is set on the displacement platform. At least four marker points are set on the calibration target to assist in the calibration of the imaging system. The projection device is used to project unidirectional coded stripes onto the calibration target. The data acquisition device is used to acquire images of the coded stripes projected onto the surface of the calibration target. The method includes the following steps: moving the displacement platform to acquire images of coded stripes at different positions; obtaining the three-dimensional coordinates, first coordinates, and second coordinates of the marker points at different positions based on the coded stripe images. The three-dimensional coordinates are considered as true values for world coordinates used in calibration. The first coordinate is the image coordinate of the marker point in the data acquisition device, and the second coordinate is the image coordinate of the marker point in the projection device. The imaging system is calibrated based on the three-dimensional coordinates to construct a binocular imaging linear mathematical system and an error compensation lookup table. The first and second coordinates are substituted into the binocular imaging linear mathematical system to determine the initial three-dimensional coordinates of the marker points. The accurate three-dimensional coordinates of the marker points are determined by querying the error compensation lookup table based on the initial three-dimensional coordinates.
[0006] In an optional embodiment of this application, the imaging system is calibrated based on three-dimensional coordinates to construct a binocular imaging linear mathematical system, including: acquiring the first extrinsic and first intrinsic parameters of the acquisition device and the second extrinsic and second intrinsic parameters of the projection device; constructing a camera imaging linear model based on the first extrinsic and first intrinsic parameters, and constructing an inverse camera model based on the second extrinsic and second intrinsic parameters; acquiring binocular transformation parameters based on the first extrinsic and second extrinsic parameters; constructing an initial binocular imaging mathematical system and a three-dimensional coordinate analytical model of the marker points based on the pinhole imaging linear model of the acquisition device and the projection device; substituting the first coordinate, second coordinate, and three-dimensional coordinate into the three-dimensional coordinate analytical model to construct a first optimization objective function, and obtaining the system parameters of the calibrated binocular imaging linear mathematical system by solving the objective function; and substituting the binocular transformation parameters, system parameters, camera imaging linear model, and inverse camera model into the initial binocular imaging mathematical system to construct the binocular imaging linear mathematical system.
[0007] In an optional embodiment of this application, the imaging system is calibrated according to three-dimensional coordinates to construct an error compensation lookup table, including: determining the measurement space of the three-dimensional imaging system, dividing the measurement subspace into several subspaces; treating all marker points in the subspace as control points, obtaining the error values of all control points in the subspace; and constructing an error compensation lookup table based on the error values of the control points in the space.
[0008] In an optional embodiment of this application, obtaining the error values of all control points in the subspace includes: determining the initial position of the control points based on the three-dimensional coordinates, the first coordinate, and the second coordinate; assigning the control points to the corresponding subspaces based on the initial positions; treating the three-dimensional coordinates of all control points in the subspace as true values; and determining the error values of the control points based on the three-dimensional coordinates and the initial positions.
[0009] In an optional embodiment of this application, constructing an error compensation lookup table based on the error values of control points in the space includes: calculating the normalized distance from all control points in the subspace to the eight nodes of the subspace using cubic linear interpolation; performing linear interpolation on the three components of the x, y, and z axes of all control points in the subspace based on the normalized distance and the error value to obtain the error fitting value for each control point; constructing a second optimization objective function based on the error value and the error fitting value, solving the second optimization objective function to obtain the error compensation value corresponding to each sub-node; and constructing an error compensation lookup table using the three-dimensional coordinates of each node and the error compensation value.
[0010] In an optional embodiment of this application, determining the precise three-dimensional coordinates of a marker point by querying an error compensation lookup table based on the initial three-dimensional coordinates includes: determining the subspace where the marker point is located based on the initial three-dimensional coordinates; querying the error compensation lookup table based on the subspace to obtain the corresponding error compensation value; and obtaining the precise three-dimensional coordinates of the marker point using linear interpolation based on the initial three-dimensional coordinates and the error compensation value.
[0011] This application also provides a computer device including a processor and a memory: the processor is used to execute a computer program stored in the memory to implement the method as described above.
[0012] This application also provides a three-dimensional imaging system, including the computer equipment, displacement platform, projection device, and acquisition device described above; the computer equipment is connected to the displacement platform, projection device, and acquisition device respectively; the projection device is used to project unidirectional coded stripes onto the object to be measured set on the displacement platform; the acquisition device is used to acquire the image of the coded stripes projected on the surface of the object to be measured and send it to the computer equipment; the displacement platform is used to place the object to be measured and is moved under the control of the computer equipment.
[0013] In an optional embodiment of this application, a calibration target is further provided on the displacement platform. The calibration target includes multiple marker points. The calibration target is used to enable the computer equipment to calibrate the distortion nonlinearity of the three-dimensional imaging system in order to establish an error compensation lookup table.
[0014] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described above.
[0015] The embodiments of this application have the following beneficial effects:
[0016] This application can obtain the initial three-dimensional coordinates of the object being measured by projecting unidirectional coded stripes onto it. Furthermore, it can eliminate the errors that may be caused by the unidirectional coded stripes by using a pre-obtained error compensation lookup table, thereby finally determining the accurate three-dimensional coordinates of the object being measured. This allows the imaging method of the three-dimensional imaging system of the single camera-projection mechanism to complete the system calibration by projecting only unidirectional coded stripes, enabling this solution to be used in more implementation scenarios.
[0017] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it according to the contents of the specification, and to make the above and other objects, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit this application. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] in:
[0020] Figure 1 This is a flowchart illustrating an imaging method for a three-dimensional imaging system provided in Embodiment 1.
[0021] Figure 2 This is a schematic diagram of the projection and acquisition of coded stripe images of the three-dimensional imaging system provided in Embodiment 1;
[0022] Figure 3 A schematic diagram of a measurement space provided in Embodiment 1;
[0023] Figure 4 A schematic diagram of a subspace provided in Embodiment 1;
[0024] Figure 5 This is a schematic block diagram of a computer device provided in Embodiment 2;
[0025] Figure 6 This is a schematic block diagram of a three-dimensional imaging system provided in Embodiment 3. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0027] Example 1
[0028] Figure 1 This is a flowchart illustrating the imaging method of a three-dimensional imaging system provided in Embodiment 1. For a clearer description of the imaging method of the three-dimensional imaging system provided in Embodiment 1, please refer to... Figures 1-4 .
[0029] For a binocular system consisting of a single camera and a projector, the projector is treated as a reverse camera, and a camera model is used for mathematical modeling. The system calibration method involves acquiring multiple sets of planar target images from different angles and extracting information from the target's marker points for system calibration. Common open-source calibration toolboxes include MATLAB's calibration toolbox and OpenCV's camera and binocular system calibration module. However, for a binocular system consisting of a single camera and a projector, it is necessary to project horizontal and vertical orthogonal fringes to determine the correspondence between image points between the camera and the projector for system calibration. Furthermore, when the projector is treated as a camera, the differences in the imaging models between the projection lens and the camera lens are not considered, which introduces additional system errors. To address this, this application proposes an imaging method for a three-dimensional imaging system, specifically including steps S110 to S140, to eliminate system errors by projecting only unidirectional coded fringes.
[0030] Step S110: Acquire coded stripe images at different locations by moving the displacement platform, and obtain the three-dimensional coordinates, first coordinates, and second coordinates of the marker points at different locations based on the coded stripe images.
[0031] In one embodiment, the imaging method of the three-dimensional imaging system provided in this embodiment is applied to a three-dimensional imaging system, which includes a displacement platform, a projection device, and a data acquisition device. For the specific structure of the three-dimensional imaging device, please refer to... Figure 2 , Figure 2This is a schematic diagram of the projection and acquisition of coded stripe images by the 3D imaging system provided in Embodiment 1. As can be seen, the displacement platform holds the object to be measured (not shown in the diagram) and can be precisely moved under control. It is understood that the movement of the displacement platform is mainly for system calibration; it is also a crucial step in completing 3D reconstruction. For example, the Z-axis information in the 3D coordinate system, as described later, is obtained by precisely moving the calibration target on the displacement platform. Therefore, a certain level of precision is required, and the displacement control of the displacement platform during calibration must meet certain precision requirements. It is also understood that imaging needs vary widely in real life, most notably the size of the object being measured, thus the corresponding precision requirements are not uniform. Therefore, the specific conditions under which the precision requirements are met depend on the actual situation and are not specifically limited here. Furthermore, a calibration target is provided on the displacement platform. The calibration target is a plane facing the acquisition device with at least four marker points. In a preferred embodiment, the specific symbol on the calibration target used to assist in the calibration of the imaging system can be a dot. It is worth noting that a minimum of four marker points are required. In practice, more marker points will be used, such as when determining the compensation values of subspace nodes, which requires a large number of control points for calibration. Therefore, the specific number is not further limited here and depends on the actual situation and requirements. The projection device is used to project unidirectional coded stripes onto the object being measured on the displacement platform. In the preferred embodiment, the unidirectional coded stripes are vertical, but in other embodiments, they can also be horizontal or diagonal. There are no specific limitations, as long as they are unidirectional coded stripes. In addition, the projection device can be set at a certain angle to the vertical direction of the displacement platform. A general setting pattern can be referenced. Figure 2 The image is shown in the diagram. The acquisition device, which can be a camera or other photographic or video recording device, is set on a plane perpendicular to the displacement platform to acquire the coded stripe image reflected from the surface of the object being measured by the projection device. Figure 2 The dashed lines representing the projection device and the acquisition device illustrate the projection range of the unidirectional coded stripes projected by the projection device onto the mobile platform, and the acquisition range of the coded image acquired by the acquisition device, respectively. Therefore, at least three types of coordinates can be obtained from the acquired coded image: three-dimensional coordinates, a first coordinate, and a second coordinate. The three-dimensional coordinates are considered the true values for calibration (world coordinates); the first coordinate is the image coordinate of the marker point in the acquisition device; and the second coordinate is the image coordinate of the marker point in the projection device. The three-dimensional coordinates are used for system calibration, while the first and second coordinates are used for reconstruction, which will be described in detail later.
[0032] S120: The imaging system is calibrated based on three-dimensional coordinates to construct a binocular imaging linear mathematical system and an error compensation lookup table.
[0033] In one embodiment, as described above in the calibration of the binocular stereo vision system, only the distortion of the acquisition device's lens is considered. However, since the projection device cannot project bidirectional fringes, only the lateral coordinates (Up) of the projection chip can be obtained, not the longitudinal coordinates (Vp), meaning the nonlinear distortion of the projection lens cannot be solved. To compensate for the system error caused by projection distortion, an error compensation lookup table is established to improve the binocular reconstruction accuracy. Simultaneously, to obtain accurate coordinates, a model needs to be established to reconstruct the 3D information based on the information acquired by the acquisition device; this corresponds to the binocular imaging linear mathematical system. It is understood that the main difference between the method provided in this application and the prior art is that this application only projects unidirectional coded structured light during the imaging process. Therefore, to eliminate the influence of unidirectional coded structured light, this application achieves this by establishing an error compensation lookup table during the calibration process. It is also understood that the error compensation lookup tables corresponding to coded fringes in different directions are different, and each direction of coded fringes needs to be calibrated separately. In other words, the execution of step S120 can be regarded as a calibration process for the imaging system.
[0034] In one embodiment, step S120: calibrating the imaging system according to the three-dimensional coordinates to construct an error compensation lookup table includes: determining the measurement space of the three-dimensional imaging system, dividing the measurement subspace into several subspaces; treating all marker points in the subspace as control points, obtaining the error values of all control points in the subspace; and constructing an error compensation lookup table based on the error values of the control points in the space.
[0035] In one embodiment, obtaining the error values of all control points within a subspace includes: determining the initial position of the control points based on the three-dimensional coordinates, the first coordinate, and the second coordinate; assigning the control points to the corresponding subspaces based on the initial positions; treating the three-dimensional coordinates of all control points within the subspace as true values; and determining the error values of the control points based on the three-dimensional coordinates and the initial positions.
[0036] In an optional embodiment of this application, constructing an error compensation lookup table based on the error values of control points in the space includes: calculating the normalized distance from all control points in the subspace to the eight nodes of the subspace using cubic linear interpolation; performing linear interpolation on the three components of the x, y, and z axes of all control points in the subspace based on the normalized distance and the error value to obtain the error fitting value for each control point; constructing a second optimization objective function based on the error value and the error fitting value, solving the second optimization objective function to obtain the error compensation value corresponding to each sub-node; and constructing an error compensation lookup table using the three-dimensional coordinates of each node and the error compensation value.
[0037] In one embodiment, the specific process of establishing an error compensation lookup table for calibration can be as follows: First, control the moving displacement platform to determine the measurement space of the three-dimensional imaging system. It is understood that, as mentioned above, a calibration target is set on the displacement platform, and the calibration target has marker points. By moving the displacement platform and collecting the marker points on the positioning calibration target, the measurement space of the three-dimensional imaging system can be determined. Within the entire measurement space, divide it into Nx×Ny×Nz subspaces, each subspace having a size of dx×dy×dz, forming (Nx+1)×(Ny+1)×(Nz+1) nodes. Three lookup tables of size Xlut(i), Ylut(i), and Zlut(i) can be formed in the three different coordinate directions X, Y, and Z of the acquisition device: i = 1, 2, 3…k. The error compensation values for each subspace are determined, and the summation yields the error compensation lookup table for the measurement space. Specifically, for the measurement space, i.e., the relationship between subspaces and subnodes within the measurement space, refer to… Figure 3 , Figure 3 This is a schematic diagram of a measurement space provided for Embodiment 1. Furthermore, with... Figure 3 For example, the subspaces are independent of each other, and both the subspace and the measurement space are cubes in a preferred embodiment. This is just a form for easy understanding. In other embodiments, they can also be other polyhedrons, and there are no specific restrictions on this.
[0038] In one embodiment, for ease of understanding, the process of determining the error compensation value for each subspace can be referenced. Figure 4 , Figure 4 This is a schematic diagram of a subspace provided in Embodiment 1. Taking a cube as an example, the subspace t includes 8 child nodes: Q t1 Q t2 ...Q t8 and multiple control points P1, P2...P i Since the coordinates of the child nodes and control points are known, determining the value of each element in the three lookup tables is called lookup table calibration. The optimization objective is to optimize each control point P. iThe result after compensation using 8 grid points with cubic linear interpolation has the smallest error compared to the ideal result. First, through cubic linear search, the normalized distance between the coordinates of all control points in each subspace and the first node in that subspace, as well as the error value between the 3D reconstruction of the control point and the actual 3D coordinates, are calculated. Taking the calculation of the normalized distance between the control point Pi(xi, yi, zi) and the child node Qt1(xt1, yt1, zt1) as an example, the calculation process can be shown in Equation (1):
[0039]
[0040]
[0041]
[0042] Then, trilinear interpolation is performed on the three components of the x, y, and z axes respectively to obtain the interpolation function. Equation (2) shows the situation corresponding to the control point Pi (xi, yi, zi) and the child node Qt1 (xt1, yt1, zt1):
[0043] Pix′=xt1*(1-dxi)*(1-dyi)*(1-dzi)+xt2*(dxi)*(1-dyi)*(1-dzi)+xt5*(1-dxi)*(1-dyi)*(dzi)+xt6*(dxi)*(1-dyi) *(dzi)+xt4*(1-dxi)*(dyi)*(1-dzi)+xt3*(dxi)*(dyi)*(1-dzi)+xt8*(1-dxi)*(dyi)*(dzi)+xt7*(dxi)*(dyi)*(dzi)
[0044] Piy′=yt1*(1-dxi)*(1-dyi)*(1-dzi)+yt2*(dxi)*(1-dyi)*(1-dzi)+yt5*(1-dxi)*(1-dyi)*(dzi)+yt6*(dxi)*(1-dyi) *(dzi)+yt4*(1-dxi)*(dyi)*(1-dzi)+yt3*(dxi)*(dyi)*(1-dzi)+yt8*(1-dxi)*(dyi)*(dzi)+yt7*(dxi)*(dyi)*(dzi)
[0045] Piz′=zt1*(1-dxi)*(1-dyi)*(1-dzi)+zt2*(dxi)*(1-dyi)*(1-dzi)+zt5*(1-dxi)*(1-dyi)*(dzi)+zt6*(dxi)*(1-dyi) *(dzi)+zt4*(1-dxi)*(dyi)*(1-dzi)+zt3*(dxi)*(dyi)*(1-dzi)+zt8*(1-dxi)*(dyi)*(dzi)+zt7*(dxi)*(dyi)*(dzi) (2)
[0046] Based on the normalized distance and the interpolation function, the accumulation of each different subspace yields the second optimization objective function for xti, yti, and zti. The second optimization objective function can be expressed as shown in equation (3):
[0047]
[0048]
[0049]
[0050] Solving the three linear equations in the second optimization objective function yields the values of xti, yti, and zti, thus providing the error compensation value at each node. Accumulating the error compensation values at each child node of each subspace completes the calibration of the lookup table: Xlut(i), Ylut(i), Zlut(i), i = 1, 2, 3…k, k = (Nx+1)×(Ny+1)×(Nz+1). Summarizing the accumulated error compensation values constructs the error compensation lookup table.
[0051] In one embodiment, step S120: calibrating the imaging system based on three-dimensional coordinates to construct a binocular imaging linear mathematical system includes: acquiring the first extrinsic and first intrinsic parameters of the acquisition device and the second extrinsic and second intrinsic parameters of the projection device; constructing a camera imaging linear model based on the first extrinsic and first intrinsic parameters, and constructing an inverse camera model based on the second extrinsic and second intrinsic parameters; acquiring binocular transformation parameters based on the first extrinsic and second extrinsic parameters; constructing an initial binocular imaging mathematical system and a three-dimensional coordinate analytical model of the marker points based on the pinhole imaging linear model of the acquisition device and the projection device; substituting the first coordinate, second coordinate, and three-dimensional coordinate into the three-dimensional coordinate analytical model to construct a first optimization objective function, and obtaining the system parameters of the calibrated binocular imaging linear mathematical system by solving the objective function; and substituting the binocular transformation parameters, system parameters, camera imaging linear model, and inverse camera model into the initial binocular imaging mathematical system to construct the binocular imaging linear mathematical system.
[0052] In one embodiment, the linear model of camera imaging for the acquisition device can be expressed as equations (4) and (5):
[0053]
[0054]
[0055] in, (X,Y,Z) represents the three-dimensional coordinates of the marker points on the surface of the object being measured; R c T c The rotation and translation transformations from the world coordinate system to the first coordinate system are considered as external parameters of the data acquisition device, i.e., the first external parameter; K c This is the intrinsic parameter matrix of the acquisition device, also known as the first intrinsic parameter. Similarly, the projection device includes R obtained by rotation and translation transformation from the world coordinate system to the second coordinate system. p T p , is considered as the extrinsic parameter of the projection device, i.e., the second extrinsic parameter; and K is the intrinsic parameter matrix of the projection device. p Considered as the second intrinsic parameter of the projection device, the inverse camera model can be constructed according to equations (6) and (7):
[0056]
[0057]
[0058] Furthermore, the R values of the first extrinsic parameter, the second extrinsic parameter, and the binocular transformation parameter... s T s Following the relationship in equation (8), the binocular transformation parameters can be obtained based on the first and second extrinsic parameters. Equation (8) can be expressed as:
[0059]
[0060] Next, the binocular transformation parameters will be substituted into the camera imaging linear model and the inverse camera model to construct the binocular imaging linear mathematical model. Further, by simultaneously solving equations (5) and (7), the three-dimensional coordinate analytical model of the marker point is obtained. In addition, an initial binocular imaging mathematical system needs to be constructed based on the pinhole imaging linear model of the acquisition device and the projection device. The initial binocular imaging mathematical system is the initial state of the binocular imaging mathematical system, lacking various parameters for completion; the three-dimensional coordinate analytical model is used to construct the first optimized target parameters from the input first coordinate, second coordinate, and three-dimensional coordinate. The three-dimensional coordinate analytical model is expressed as follows:
[0061]
[0062] As can be seen from equation (9), the three-dimensional coordinates and the first intrinsic parameter Kc Second internal reference K p R of the binocular transformation parameters s T s The first coordinate (Uc, Vc) is related to the second coordinate (Up). Equation (9) represents the three-dimensional coordinates in the first coordinate system. The world coordinate system transformation model can be constructed based on the first external parameter, the second external parameter, and the binocular transformation parameters.
[0063]
[0064] The first optimization objective function is obtained based on the three-dimensional coordinate analytical model and the world coordinate system transformation model, that is, by combining equations (9) and (10):
[0065]
[0066] In the first optimization objective function To utilize the three-dimensional coordinates obtained by moving the calibration target on the displacement platform, The three-dimensional coordinates are estimated using equations (9) and (10), where Kc, Kp, and R are... s ,Ts,R c Tc are parameters to be optimized, which can be solved using the Levenberg-Marquardt algorithm. After establishing the first optimization objective function, it can be solved to obtain the system parameters of the calibrated binocular imaging linear mathematical system. After completing the construction of the initial model and the calculation of various parameters, the binocular transformation parameters, system parameters, camera imaging linear model, and inverse camera model can be substituted into the initial binocular imaging mathematical system to construct the binocular imaging linear mathematical system. The binocular imaging linear mathematical system can determine the initial three-dimensional coordinates of the marker point based on the input first and second coordinates.
[0067] Step S130: Substitute the first and second coordinates into the binocular imaging linear mathematical system to determine the initial three-dimensional coordinates of the marker point.
[0068] Step S140: Determine the precise three-dimensional coordinates of the marker point by querying the error compensation lookup table based on the initial three-dimensional coordinates.
[0069] In one embodiment, for a single-camera-projection 3D imaging system, a binocular imaging linear mathematical model can be established based on a pinhole imaging model. By solving a system of linear equations, the actual calculated values (x, y, z) of the target marker point in space can be obtained using the first coordinate (Uc, Vc) and its second coordinate (Up). The first coordinate is the image coordinate of the coded stripe image in the imaging chip of the acquisition device, and the second coordinate is the image coordinate of the coded stripe image in the display chip of the projection device. This coordinate is a relatively coarse initial coordinate, that is, the three-dimensional initial coordinate. As mentioned above, the three-dimensional initial coordinate Xw' of the object surface can be obtained through equations (4)-(11). However, since this 3D imaging system is ultimately scanned by unidirectional coded stripes, there is inevitably a certain error. How to eliminate the error, that is, can be eliminated by looking up the error compensation lookup table. The method of constructing the error compensation lookup table has been described in detail above, and will not be repeated here.
[0070] In one embodiment, the error compensation lookup table described above stores the error compensation values of the child nodes of each subspace. Therefore, the process of determining the precise three-dimensional coordinates of the object under test is as follows: First, determine the subspace in which the object is located based on its initial three-dimensional coordinates, i.e., the first subspace. Then, calculate the corresponding error compensation values for all the initial three-dimensional coordinates in the first space using the error compensation methods shown in equations (1) to (3). It can be understood that an object may exist in multiple subspaces at the same time, but each corresponding marker point will only exist in one subspace. Therefore, by solving and summarizing the initial three-dimensional coordinates and corresponding error compensation values of each marker point, the precise three-dimensional coordinates Xw of the object under test can be finally determined. Therefore, through the reconstruction process of steps S130 to S140, the precise three-dimensional coordinates of the object under test can be obtained solely from the unidirectional coded stripes.
[0071] Therefore, this application can obtain the initial three-dimensional coordinates of the object being measured by projecting unidirectional coded stripes onto the object, and further eliminate the errors that may be caused by the unidirectional coded stripes according to the pre-obtained error compensation lookup table, thereby finally determining the accurate three-dimensional coordinates of the object being measured. This allows the imaging method of the three-dimensional imaging system of the single camera-projection mechanism to complete the system calibration by projecting only unidirectional coded stripes, enabling this solution to be used in more implementation scenarios.
[0072] Example 2
[0073] Figure 5 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 5As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement an imaging method for a three-dimensional imaging system. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement an age recognition method. Those skilled in the art will understand that… Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0074] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the following steps: Step S110: Acquire coded stripe images at different positions by moving a displacement platform, and obtain the three-dimensional coordinates, first coordinates, and second coordinates of the marker points at different positions based on the coded stripe images; Step S120: Calibrate the imaging system based on the three-dimensional coordinates to construct a binocular imaging linear mathematical system and an error compensation lookup table; Step S130: Substitute the first coordinates and second coordinates into the binocular imaging linear mathematical system to determine the initial three-dimensional coordinates of the marker points; Step S140: Determine the precise three-dimensional coordinates of the marker points by querying the error compensation lookup table based on the initial three-dimensional coordinates.
[0075] The computer device provided in Embodiment 2 is capable of executing the imaging method of the three-dimensional imaging system as described in Embodiment 1. Therefore, the technical effects therein have been described in detail above, and will not be repeated here.
[0076] Example 3
[0077] Figure 6 This is a schematic block diagram of a three-dimensional imaging system provided in Embodiment 3. For a clear description of the three-dimensional imaging system 60 provided in Embodiment 3, please refer to... Figures 1-6 .
[0078] The three-dimensional imaging system 60 provided in Embodiment 3 includes the computer equipment 50, projection device 610, acquisition device 620, and displacement platform 630 described above.
[0079] In one embodiment, the computer device 50 is connected to the displacement platform 630, the projection device 610, and the acquisition device 620, respectively. The specific structure of the computer device 50 and the functions of each component therein have been described in detail in Embodiment 2 of this application, and will not be repeated here.
[0080] In one embodiment, the projection device 610 projects unidirectional coded stripes onto the object being measured, which is mounted on the displacement platform 630. In a preferred embodiment, the unidirectional coded stripes are vertical; however, in other embodiments they can be horizontal or diagonal, with no specific limitation, as long as they are unidirectional. It is understood that the error compensation lookup table corresponding to each direction of coded stripes is different, and each direction of coded stripes needs to be calibrated individually. Furthermore, the projection device 610 can be positioned at a certain angle to the vertical direction of the displacement platform 630.
[0081] In one embodiment, the acquisition device 620 is used to acquire an image of coded stripes projected onto the surface of the object being measured and send it to the computer device 50. The acquisition device 620, which can be a camera or other photographic / video recording device, is positioned perpendicular to the plane of the displacement platform 630 and is used to acquire the image of coded stripes reflected from the surface of the object being measured by the projection device 610. The arrangement of the acquisition device 620 and the projection device 610 relative to the displacement platform 630 can be found in [reference needed]. Figure 2 .
[0082] In one embodiment, the displacement platform 630 is used to place the object to be measured and is moved under the control of the computer device 50.
[0083] In one embodiment, a calibration target 631 is further provided on the displacement platform 630. The calibration target 631 includes at least four marker points. The calibration target 631 is used to calibrate the distortion nonlinearity of the three-dimensional imaging system 60 by the computer device 50, in order to establish an error compensation lookup table. Specifically, the specific process for establishing the error compensation lookup table has been described in this application.
[0084] Therefore, the three-dimensional imaging system 60 provided in Embodiment 3 of this application can obtain the initial three-dimensional coordinates of the object being measured by simply projecting unidirectional coded stripes onto the object being measured. Furthermore, it can eliminate the errors that may be caused by the unidirectional coded stripes by using a pre-obtained error compensation lookup table, thereby finally determining the accurate three-dimensional coordinates of the object being measured. This allows the imaging method of the three-dimensional imaging system of the single camera-projection mechanism to complete the system calibration by simply projecting unidirectional coded stripes, enabling this solution to be used in more implementation scenarios.
[0085] In one embodiment, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the imaging method of the three-dimensional imaging system as described in Embodiment 1.
[0086] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0087] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0088] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An imaging method of a three-dimensional imaging system, characterized by, The three-dimensional imaging system comprises a displacement platform, a projection device and an acquisition device, the displacement platform is used for displacement according to control, a calibration target is arranged on the displacement platform, at least four mark points are arranged on the calibration target, and the mark points are used for assisting completion of calibration of the imaging system; the projection device is used for projecting one-way coded stripes to the calibration target; and the acquisition device is used for acquiring coded stripe images projected on the surface of the calibration target. The method comprises the following steps: Different positions of the coded stripe images are acquired by moving the displacement platform, three-dimensional coordinates, first coordinates and second coordinates of the mark points at different positions are obtained according to the coded stripe images, the three-dimensional coordinates are world coordinates regarded as true values for calibration, the first coordinates are image coordinates of the mark points in the acquisition device, and the second coordinates are image coordinates of the mark points in the projection device; The imaging system is calibrated according to the three-dimensional coordinates to construct a binocular imaging linear mathematical system and an error compensation lookup table; The first coordinates and the second coordinates are substituted into the binocular imaging linear mathematical system to determine three-dimensional initial coordinates of the mark points; The three-dimensional accurate coordinates of the mark points are determined by querying the error compensation lookup table according to the three-dimensional initial coordinates; The imaging system is calibrated according to the three-dimensional coordinates to construct an error compensation lookup table, which comprises: A measurement space of the three-dimensional imaging system is determined, and the measurement space is divided into a plurality of subspaces; All the mark points in the subspaces are regarded as control points, and error values of all the control points in the subspaces are obtained; The error compensation lookup table is constructed according to the error values of the control points in the subspaces; The error values of all the control points in the subspaces are obtained, which comprises: Initial positions of the control points are determined according to the three-dimensional coordinates, the first coordinates and the second coordinates, and the control points are distributed into corresponding subspaces according to the initial positions; The three-dimensional coordinates of all the control points in the subspaces are regarded as true values, and the error values of the control points are determined according to the three-dimensional coordinates and the initial positions.
2. The imaging method of a three-dimensional imaging system as claimed in claim 1, characterized in that, The imaging system is calibrated according to the three-dimensional coordinates to construct a binocular imaging linear mathematical system, which comprises: First external parameters and first internal parameters of the acquisition device and second external parameters and second internal parameters of the projection device are obtained; a camera imaging linear model is constructed according to the first external parameters and the first internal parameters, an inverse camera model is constructed according to the second external parameters and the second internal parameters, and binocular transformation parameters are obtained according to the first external parameters and the second external parameters; Based on a pinhole imaging linear model of the acquisition device and the projection device, an initial binocular imaging mathematical system and a three-dimensional coordinate analytical model of the mark points are constructed; the first coordinates, the second coordinates and the three-dimensional coordinates are substituted into the three-dimensional coordinate analytical model to construct a first optimization objective function, and system parameters of the binocular imaging linear mathematical system are obtained by solving. The binocular transformation parameters, the system parameters, the camera imaging linear model and the inverse camera model are substituted into the initial binocular imaging mathematical system to construct the binocular imaging linear mathematical system.
3. The imaging method of a three-dimensional imaging system as claimed in claim 1, characterized in that, The error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of the control points in the space, and the error compensation lookup table is constructed according to the error values of 4. The imaging method of a three-dimensional imaging system as claimed in claim 1, characterized in that, 5. A computer device, comprising: 6. A three-dimensional imaging system characterized by, 7. The three-dimensional imaging system of claim 6, wherein, 8. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Three-dimensional reconstruction method based on one-dimensional scanning structured light system and related assembly thereof
CN112967348A