TOF module calibration method, device and system
By calculating the coordinate difference between the infrared spot and the reference point under standard calibration environment and constructing the coordinates of the virtual reference point under non-standard environment, the problem of low calibration efficiency of existing TOF modules is solved, and efficient calibration of multiple TOF modules is achieved.
Patent Information
- Application Number
- CN202511034249.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-12-09
AI Technical Summary
Existing TOF module calibration methods have stringent requirements for the calibration environment, resulting in low calibration efficiency and the inability to calibrate multiple TOF modules simultaneously.
By determining the coordinate difference between the infrared light spot and the reference point under standard calibration environment, the distance between the light spot and the reference point in the checkerboard pattern is calculated, and the coordinates of the virtual reference point are constructed under non-standard environment to achieve the calibration of the TOF module under test.
There is no need to strictly limit the alignment of the center point of the transmitter end face of the TOF module under test with the checkerboard reference point, and multiple TOF modules can be calibrated simultaneously, which improves calibration efficiency.
Smart Images

Figure CN121095352A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of camera module calibration, and particularly relates to a TOF module calibration method, device and system. BACKGROUND
[0002] At present, the ranging in a three-dimensional scene is generally performed based on a time of flight (TOF) technology, for example, a 3D face recognition technology of a mobile terminal is to measure the distance between each organ of a face and a terminal device by using a TOF module.
[0003] The TOF module needs to be calibrated before use, and the calibration method in the prior art has very strict requirements on the calibration environment, for example, a chart needs to be parallel to the emission end face of the TOF module, the center point of the chart is a reference point, and it is necessary to ensure that the reference point is aligned with the center point of the emission end face of the TOF module. In this way, only one TOF module can be calibrated at a time, which seriously affects the calibration efficiency. SUMMARY
[0004] In view of the problems in the prior art, the embodiments of the present application provide a TOF module calibration method, device and system to solve or partially solve the technical problem of low calibration efficiency when calibrating a TOF module in the prior art.
[0005] The present application provides a TOF module calibration method, which comprises:
[0006] determining a first coordinate difference value of an infrared light spot emitted by a standard TOF module and a reference reference point in an X direction and a second coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference reference point in a Y direction in a first image; the first image is obtained by photographing a chart when the infrared light spot emitted by the standard TOF module is projected on the chart in a standard calibration environment; and the reference reference point is a preset reference point on the chart;
[0007] determining a first distance between the infrared light spot emitted by the standard TOF module and the reference reference point in the X direction in the chart based on the first coordinate difference value, and determining a second distance between the infrared light spot emitted by the standard TOF module and the reference reference point in the Y direction in the chart based on the second coordinate difference value;
[0008] determine coordinates of a virtual reference point based on the first distance, the second distance, coordinates of the infrared light spot emitted by the standard TOF module in the second image, an actual distance of a single grid in the chart, and a pixel size of the single grid;
[0009] calibrate each TOF module to be measured according to the coordinates of the virtual reference point.
[0010] In the above scheme, the first coordinate difference value between the infrared light spot emitted by the standard TOF module and the reference reference point in the X direction in the first image and the second coordinate difference value between the infrared light spot emitted by the standard TOF module and the reference reference point in the Y direction include:
[0011] determine the first horizontal coordinate and the first vertical coordinate of the infrared light spot emitted by the standard TOF module in the first image, and determine the second horizontal coordinate and the second vertical coordinate of the reference reference point in the first image;
[0012] determine the first coordinate difference value Diff_x according to the formula Diff_x=x g -x a
[0013] determine the second coordinate difference value Diff_y according to the formula Diff_y=y g -y a ; wherein,
[0014] the x a is the first horizontal coordinate, the x g is the second horizontal coordinate, the y a is the first vertical coordinate, and the y g is the second vertical coordinate.
[0015] In the above scheme, the first distance between the infrared light spot emitted by the standard TOF module and the reference reference point in the X direction in the chart is determined based on the first coordinate difference value, which includes:
[0016] obtain a pixel size of a single grid in the first image and determine an actual physical distance corresponding to the single grid in the chart;
[0017] determine the first distance D_x based on the formula D_x=C×Diff_x / S; wherein,
[0018] The C is an actual physical distance corresponding to a single checkerboard in the checkerboard chart, the Diff_x is the first coordinate difference value, and the S is a pixel size of a single checkerboard in the first image.
[0019] In the above solution, the second distance between the infrared light spot in the Y direction and the reference datum point in the checkerboard chart is determined based on the second coordinate difference value, and the method comprises the following steps of:
[0020] The second distance D_y is determined based on the formula D_y=C*Diff_y / S; wherein,
[0021] The C is an actual physical distance corresponding to a single checkerboard in the checkerboard chart, the Diff_y is the second coordinate difference value, and the S is a pixel size of a single checkerboard in the first image.
[0022] In the above solution, the coordinates of the virtual datum point are determined based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single checkerboard in the checkerboard chart, and the pixel size of a single checkerboard, and the method comprises the following steps of:
[0023] The horizontal coordinate Xg0 of the virtual datum point is determined according to the formula Xg0=X0+D_x*S0 / C;
[0024] The vertical coordinate Yg0 of the virtual datum point is determined according to the formula Yg0=Y0+D_y*S0 / C; wherein,
[0025] The X0 is the horizontal coordinate of the infrared light spot emitted by the standard TOF module in the second image, the Y0 is the vertical coordinate of the infrared light spot emitted by the standard TOF module in the second image, the D_x is the first distance, the D_y is the second distance, the S0 is a pixel size of a single checkerboard in the second image, and the C is an actual physical distance corresponding to a single checkerboard in the checkerboard chart.
[0026] In the above solution, each TOF module to be measured is calibrated according to the coordinates of the virtual datum point, and the method comprises the following steps of:
[0027] The coordinates of the infrared light spot emitted by each TOF module to be measured in a third image are determined; the third image is obtained by photographing the checkerboard chart when the infrared light spot emitted by each TOF module to be measured is projected on the checkerboard chart in a non-standard calibration environment;
[0028] determine a first distance difference of the virtual reference point and the infrared light spot emitted by each of the TOF modules in the X direction and a second distance difference of the virtual reference point and the infrared light spot emitted by each of the TOF modules in the Y direction based on the coordinates of the virtual reference point and the coordinates of the infrared light spot emitted by each of the TOF modules in the second image;
[0029] determine a current distance of the virtual reference point and the infrared light spot emitted by each of the TOF modules in the second image according to the first distance difference and the second distance difference;
[0030] determine a current distance of the virtual reference point and the infrared light spot emitted by each of the TOF modules in the second image according to the first distance difference and the second distance difference; calibrate a compensation angle of each of the TOF modules.
[0031] In a second aspect, the present application provides a calibration device for a TOF module, the device comprising:
[0032] a first determining unit configured to determine a first coordinate difference of an infrared light spot emitted by a standard TOF module and a reference reference point in the X direction and a second coordinate difference of the infrared light spot emitted by the standard TOF module and the reference reference point in the Y direction in a first image; the first image is obtained by photographing a chart when the infrared light spot emitted by the standard TOF module is projected on the chart in a standard calibration environment; the reference reference point is a preset reference point on the chart;
[0033] a second determining unit configured to determine a first distance between the infrared light spot emitted by the standard TOF module and the reference reference point in the X direction in the chart based on the first coordinate difference and determine a second distance between the infrared light spot emitted by the standard TOF module and the reference reference point in the Y direction in the chart based on the second coordinate difference;
[0034] a third determining unit configured to determine coordinates of a virtual reference point based on the first distance, the second distance, coordinates of the infrared light spot emitted by the standard TOF module in a second image, an actual distance of a single chart in the chart and a pixel size contained in the single chart; the second image is obtained by photographing the chart when the infrared light spot emitted by the standard TOF module is projected on the chart in a non-standard calibration environment;
[0035] a calibration unit configured to calibrate each of the TOF modules according to the coordinates of the virtual reference point.
[0036] In the above scheme, the first determining unit is specifically configured to:
[0037] determine a first horizontal coordinate and a first vertical coordinate of the infrared light spot emitted by the standard TOF module in the first image, and determine a second horizontal coordinate and a second vertical coordinate of the reference datum in the first image;
[0038] determine the first coordinate difference Diff_x according to the formula Diff_x=x g -x a
[0039] determine the second coordinate difference Diff_y according to the formula Diff_y=y g -y a
[0040] the x a is the first horizontal coordinate, the x g is the second horizontal coordinate, the y a is the first vertical coordinate, and the y g is the second vertical coordinate.
[0041] In the above scheme, the second determination unit is specifically configured to:
[0042] acquire a pixel size of a single checkerboard included in the first image, and determine an actual physical distance corresponding to a single checkerboard in the checkerboard chart;
[0043] determine the first distance D_x based on the formula D_x=C*Diff_x / S; wherein,
[0044] the C is the actual physical distance corresponding to a single checkerboard in the checkerboard chart, the Diff_x is the first coordinate difference, and the S is the pixel size of a single checkerboard included in the first image.
[0045] In a third aspect of the present application, a calibration system of a TOF module is provided, and the system comprises: an infrared camera, a checkerboard chart, a standard TOF module, and the calibration device of the second aspect; the infrared camera is placed on one side of the checkerboard chart according to a preset position.
[0046] The infrared camera is configured to, in a standard calibration environment, capture the checkerboard chart when the infrared light spot emitted by the standard TOF module is projected on the checkerboard chart, and obtain a first image; and in a non-standard calibration environment, capture the checkerboard chart when the infrared light spot emitted by the standard TOF module is projected on the checkerboard chart, and obtain a second image.
[0047] The calibration device is used to determine a first coordinate difference value of an infrared light spot emitted by a standard TOF module and a reference datum point in an X direction and a second coordinate difference value of the infrared light spot and the reference datum point in a Y direction in a first image; determine a first distance between the infrared light spot and the reference datum point in the X direction in a chessboard chart based on the first coordinate difference value, and determine a second distance between the infrared light spot and the reference datum point in the Y direction in the chessboard chart based on the second coordinate difference value; determine a coordinate of a virtual datum point based on the first distance, the second distance, a coordinate of the infrared light spot in a second image, an actual distance of a single chessboard in the chessboard chart, and a pixel size contained in the single chessboard; the second image is obtained by photographing the chessboard chart when the infrared light spot emitted by the standard TOF module is projected on the chessboard chart under a non-standard calibration environment; and calibrate each of the TOF modules to be tested according to the coordinate of the virtual datum point.
[0048] The application provides a TOF module calibration method, device and system, the method comprising: determining a first coordinate difference value of an infrared light spot emitted by a standard TOF module and a reference datum point in an X direction and a second coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in a Y direction in a first image; the first image is obtained by photographing a chart when the infrared light spot emitted by the standard TOF module is projected on the chart under a standard calibration environment; the reference datum point is a preset reference point on the chart; determining a first distance between the infrared light spot emitted by the standard TOF module and the reference datum point in the X direction in the chart based on the first coordinate difference value, and determining a second distance between the infrared light spot emitted by the standard TOF module and the reference datum point in the Y direction in the chart based on the second coordinate difference value; determining a coordinate of a virtual datum point based on the first distance, the second distance, a coordinate of the infrared light spot emitted by the standard TOF module in a second image, an actual distance of a single chart in the chart and a pixel size contained by the single chart; the second image is obtained by photographing the chart when the infrared light spot emitted by the standard TOF module is projected on the chart under a non-standard calibration environment; calibrating each TOF module to be measured according to the coordinate of the virtual datum point; in this way, first, the difference between the datum point and the infrared light spot on the chart is determined by the standard TOF module under the standard calibration environment, and then the coordinate of the virtual datum point is determined by the standard TOF module under the non-standard calibration environment based on the above difference; when calibrating the TOF module to be measured, even if the TOF module to be measured is not in the standard calibration environment (the center point of the emission end face of the TOF module to be measured is not aligned with the datum point of the chart), the TOF module to be measured can also be calibrated according to the virtual datum point; in this way, the alignment of the reference datum point and the center point of the emission end face of the TOF module to be measured is not strictly required during calibration, and therefore a plurality of TOF modules to be measured can be calibrated at the same time, thereby improving the calibration efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0049] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The detailed description is made with reference to the accompanying drawings.
[0050] Figure 1 A TOF module ranging correction principle schematic diagram according to one embodiment of the application is shown;
[0051] Figure 2 A schematic diagram of a calibration system for a TOF module according to an embodiment of the present invention is shown;
[0052] Figure 3 A schematic flowchart of a calibration method for a TOF module according to an embodiment of the present invention is shown;
[0053] Figure 4 A schematic diagram of a newly constructed virtual reference point according to an embodiment of the present invention is shown;
[0054] Figure 5 A schematic diagram illustrating the principle of determining the coordinates of a virtual reference point according to an embodiment of the present invention is shown;
[0055] Figure 6 A schematic diagram of a calibration device for a TOG module according to an embodiment of the present invention is shown. Detailed Implementation
[0056] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0057] To better understand the technical solution of this invention, the correction principle of TOF module ranging is first introduced here, such as... Figure 1 As shown, for the same actual physical distance d0, if the field of view of the infrared light spot A emitted by the TOF module increases, the corresponding test distance d also increases. Therefore, it is necessary to perform angle compensation on the actual physical distance, that is, it is necessary to pre-calibrate the field of view of each infrared light spot emitted by each TOF module.
[0058] refer to Figure 1 Assuming the reference point on the checkerboard chart is point G, the infrared light spot emitted by the TOF module is point A, and the distance between point G and point A is h, then the field of view of the infrared light spot can be calculated using the formula... Sure.
[0059] When using a TOF module for distance measurement, the measured distance d output by the TOF module needs to be combined with angle compensation to determine the accurate distance as: d×cosθ.
[0060] Therefore, for each TOF module, the field of view angle θ of the infrared light spot needs to be calibrated before use.
[0061] Existing calibration methods have very stringent requirements for the calibration environment. For example, the checkerboard chart needs to be parallel to the transmitter face of the TOF module, with the center point of the checkerboard chart serving as the reference point, and the reference point must be aligned with the center point of the transmitter face of the TOF module. This means that only one TOF module can be calibrated at a time.
[0062] Based on this, the present invention provides a calibration system for a TOF module, such as... Figure 2 As shown, the system includes: infrared camera 1, checkerboard chart Figure 2 Standard TOF module 3 and calibration equipment for TOF modules ( Figure 2 (Not shown); Infrared camera 1 is placed at a preset position on the checkerboard chart. Figure 2 On one side. The calibration equipment for the TOF module can be understood as a terminal device with data processing capabilities, such as a computer.
[0063] Infrared camera 1 is used to capture a first image of a checkerboard chart when the infrared light spot emitted by the standard TOF module 3 is projected onto the checkerboard chart under standard calibration conditions; and to capture a second image of a checkerboard chart when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart under non-standard calibration conditions.
[0064] The calibration equipment is used to determine, in the first image, the first coordinate difference in the X direction between the infrared light spot emitted by the standard TOF module and the reference reference point, and the second coordinate difference in the Y direction between the infrared light spot emitted by the standard TOF module and the reference reference point; based on the first coordinate difference, a first distance in the X direction between the infrared light spot and the reference reference point in the checkerboard chart is determined, and based on the second coordinate difference, a second distance in the Y direction between the infrared light spot emitted by the standard TOF module and the reference reference point in the checkerboard chart is determined; based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single checkerboard square in the checkerboard chart, and the pixel size contained in a single checkerboard square, the coordinates of a virtual reference point are determined; the second image is obtained by photographing the checkerboard chart in a non-standard calibration environment when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart; and each TOF module under test is calibrated according to the coordinates of the virtual reference point.
[0065] The specific implementation method on the calibration device side can be found in the detailed description of the subsequent embodiments, and will not be repeated here.
[0066] Based on the same inventive concept as the foregoing embodiments, the present application also provides a TOF module calibration method, applied in a TOF module calibration device, as shown in Figure 3 The method comprises the following steps:
[0067] S310, determining a first coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in the X direction, and a second coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in the Y direction in the first image; the first image is obtained by photographing the chart when the infrared light spot emitted by the standard TOF module is projected on the chart in a standard calibration environment; the reference datum point is a preset reference point on the chart.
[0068] In actual operation, a standard calibration environment needs to be constructed. Therefore, the standard TOF module needs to be placed on a support, and the height of the support needs to be adjusted so that the emission end face of the standard TOF module is parallel to the chart, and the center point of the emission end face of the standard TOF module is aligned with the reference datum point of the chart image. That is, the standard calibration environment is that the emission end face of the TOF module is parallel to the chart, and the center point of the emission end face of the TOF module is aligned with the reference datum point of the chart image. The standard TOF module is a TOF module that has been calibrated.
[0069] The reference datum point can be a preset dot on the chart, or a corner point (a corner point is an intersection of black and white grids) of the dot, or a chart corner point that is a predetermined grid away from the above-mentioned origin. The reflectivity difference between the black and white areas of the chart is 20%-50%, and the chart can be as shown in Figure 4 The reference datum point can be as shown by the mark 41 in Figure 4 .
[0070] After the standard calibration environment is constructed, the standard TOF module is turned on, the dot matrix infrared light spot is projected on the chart, the infrared camera is turned on, and the chart is photographed to obtain a first image. Therefore, the first image contains the reference datum point and the infrared light spot emitted by the standard TOF module.
[0071] Then, a first coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in the X direction, and a second coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in the Y direction in the first image are determined.
[0072] In an embodiment, determining the first coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in the X direction and the second coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in the Y direction in the first image comprises:
[0073] determining the first horizontal coordinate and the first vertical coordinate of the infrared light spot emitted by the standard TOF module in the first image and determining the second horizontal coordinate and the second vertical coordinate of the reference datum point in the first image;
[0074] determining the first coordinate difference value Diff_x according to the formula Diff_x = x g -x a
[0075] determining the second coordinate difference value Diff_y according to the formula Diff_y = y g -y a ; wherein,
[0076] x a is the first horizontal coordinate, x g is the second horizontal coordinate, y a is the first vertical coordinate, y g is the second vertical coordinate.
[0077] Specifically, in the first image, each pixel point has a unique coordinate, and the infrared camera can calculate the coordinate of each pixel point in the first image after shooting the first image. Therefore, for the infrared light spot emitted by the standard TOF module and the reference datum point, the corresponding coordinates can also be calculated.
[0078] Then, the coordinate difference between the reference datum point and the infrared light spot in the standard calibration environment is determined according to the coordinate of the infrared light spot emitted by the standard TOF module in the first image and the coordinate of the reference datum point in the first image.
[0079] S311, determining the first distance between the infrared light spot emitted by the standard TOF module and the reference datum point in the X direction in the chessboard chart based on the first coordinate difference value, and determining the second distance between the infrared light spot emitted by the standard TOF module and the reference datum point in the Y direction in the chessboard chart based on the second coordinate difference value.
[0080] After the first coordinate difference value and the second coordinate difference value are determined, the difference between the infrared light spot emitted by the standard TOF module and the reference datum point in the chessboard chart can be determined based on the first coordinate difference value and the second coordinate difference value.
[0081] That is, a first distance between the infrared light spot emitted by the standard TOF module in the chessboard chart and a reference datum in the X direction is determined according to the first coordinate difference value, and a second distance between the infrared light spot emitted by the standard TOF module in the chessboard chart and the reference datum in the Y direction is determined based on the second coordinate difference value.
[0082] In an embodiment, determining the first distance between the infrared light spot emitted by the standard TOF module in the chessboard chart and the reference datum in the X direction based on the first coordinate difference value comprises:
[0083] acquiring a pixel size of a single chessboard in the first image and determining an actual physical distance corresponding to the single chessboard in the chessboard chart;
[0084] determining the first distance D x based on a formula D x = C x Diff x / S; wherein,
[0085] C is the actual physical distance corresponding to the single chessboard in the chessboard chart, Diff x is the first coordinate difference value, and S is the pixel size of the single chessboard in the first image.
[0086] In an embodiment, determining the second distance between the infrared light spot in the chessboard chart and the reference datum in the Y direction based on the second coordinate difference value comprises:
[0087] determining the second distance D y based on a formula D y = C x Diff y / S; wherein,
[0088] C is the actual physical distance corresponding to the single chessboard in the chessboard chart, Diff y is the second coordinate difference value, and S is the pixel size of the single chessboard in the first image.
[0089] Specifically, the actual length of each chessboard (grid) in the chessboard chart picture is known (assuming C millimeters), and the pixel size S of each chessboard can also be determined, so that, taking the first distance as an example, the first distance, the first coordinate difference value, the actual length of each chessboard (grid), and the pixel size of each chessboard satisfy the principle of similar triangles, and thus it is obtained that:
[0090]
[0091] Thus, according to the formula, the first distance can be determined as:
[0092] D x = C x Diff x / S (2)
[0093] It is worth noting that since one pixel occupies more than one grid, the application determines the pixel size contained in a single grid by first determining the total pixel size contained in a preset number of grids in the first image (for example, determining the pixel size contained in 10 grids), and then determining the pixel size contained in a single grid by dividing the total pixel size by the preset number of grids.
[0094] In addition, the determination principle of the second distance is exactly the same as that of the first distance, which will not be described here.
[0095] S312, determining the coordinates of the virtual reference point based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single grid in the grid chart, and the pixel size contained in a single grid; the second image is obtained by photographing the grid chart when the infrared light spot emitted by the standard TOF module is projected on the grid chart under a non-standard calibration environment.
[0096] It can be understood that if the test distance is unchanged and the angle of the light spot emitted by the TOF module is unchanged, the distance between the infrared light spot emitted by the TOF module and the reference reference point in the grid chart in the standard calibration environment is consistent with the distance between the newly constructed virtual reference point and the infrared light spot emitted by the TOF module in the non-standard calibration environment.
[0097] That is, in the standard calibration environment, the first distance between the infrared light spot emitted by the standard TOF module and the reference reference point in the X direction in the grid chart is consistent with the distance between the infrared light spot emitted by the standard TOF module and the virtual reference point in the X direction in the non-standard environment.
[0098] Therefore, after determining the first distance and the second distance between the infrared light spot emitted by the standard TOF module and the reference reference point on the grid chart in the standard calibration environment, a new virtual reference point can be determined in the non-standard calibration environment according to the first distance and the second distance between the infrared light spot emitted by the standard TOF module and the reference reference point on the grid chart.
[0099] Specifically, in the non-standard calibration environment, the emission end face of the standard TOF module is aligned with the grid chart (without the need to ensure that the center point of the emission end face of the standard TOF module is aligned with the reference reference point of the grid chart), and then the standard TOF module emits a dot matrix infrared light spot, and at this time, the grid chart is still photographed by the infrared camera to obtain a second image.
[0100] Similarly, in the second image, each pixel also has a unique coordinate, and the infrared camera can calculate the coordinates of each pixel in the second image after shooting the second image. Then, for the infrared light spot emitted by the standard TOF module, the corresponding coordinates can also be calculated. In this way, the coordinates of the infrared light spot emitted by the standard TOF module in the second image are obtained.
[0101] Further based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single chessboard in the chessboard chart, and the pixel size contained in a single chessboard, the coordinates of the virtual reference point are determined, specifically including:
[0102] The horizontal coordinate Xg0 of the virtual reference point is determined according to the formula Xg0 = X0 + D_x × S0 / C;
[0103] The vertical coordinate Yg0 of the virtual reference point is determined according to the formula Yg0 = Y0 + D_y × S0 / C; wherein,
[0104] X0 is the horizontal coordinate of the infrared light spot emitted by the standard TOF module in the second image, Y0 is the vertical coordinate of the infrared light spot emitted by the standard TOF module in the second image, D_x is the first distance, D_y is the second distance, S0 is the pixel size contained in a single chessboard in the second image, and C is the actual physical distance corresponding to a single chessboard in the chessboard chart.
[0105] Specifically, in a non-standard environment, when a new virtual reference point is constructed, the distance between the infrared light spot emitted by the standard TOF module and the virtual reference point in the X direction in the chessboard chart is also D_x; then referring to Figure 5 , the distance between the virtual reference point G0 and the infrared light spot A emitted by the standard TOF module in the chessboard chart is D_x, so the pixel offset Xg0-X0 of the virtual reference point and point A in the second image, the pixel size S0 of a single chessboard in the second image, the distance D_x between the virtual reference point G0 and the infrared light spot A emitted by the standard TOF module in the chessboard chart, and the actual physical distance C corresponding to a single chessboard in the chessboard chart can satisfy the principle of similar triangles, and then the following can be obtained:
[0106]
[0107] From formula (3), it can be deduced that:
[0108] Xg0 = X0 + D_x × S0 / C (4)
[0109] Thus, the horizontal coordinate Xg0 of the virtual reference point is determined.
[0110] The same principle can also be used to determine the ordinate Yg0 of the virtual reference point.
[0111] Thus, when the field of view angle (compensation angle) of the infrared light spot is calibrated based on the newly constructed virtual reference point, even in a non-calibration environment, only the coordinates of the infrared light spot emitted by the TOF module to be measured in the third image need to be determined, and the distance between the infrared light spot and the virtual reference point is determined according to the coordinates and the coordinates of the virtual reference point, so that the compensation angle of each TOF module to be measured can be determined.
[0112] That is, without aligning the center point of the emission surface of each TOF module to be measured with the reference point of the chessboard chart, the compensation angle of each TOF module to be measured can be determined, so that a plurality of TOF modules to be measured can be calibrated at one time, and the calibration efficiency is improved.
[0113] S313, calibrating each TOF module to be measured according to the coordinates of the virtual reference point.
[0114] In an embodiment, calibrating each TOF module to be measured according to the coordinates of the virtual reference point comprises:
[0115] determining the coordinates of the infrared light spot emitted by each TOF module to be measured in the third image; the third image is obtained by photographing the chessboard chart when the infrared light spot emitted by each TOF module to be measured is projected on the chessboard chart in a non-standard calibration environment;
[0116] determining the first distance difference between the virtual reference point and the infrared light spot emitted by each TOF module to be measured in the X direction and the second distance difference between the virtual reference point and the infrared light spot emitted by each TOF module to be measured in the Y direction based on the coordinates of the virtual reference point and the coordinates of the infrared light spot emitted by each TOF module to be measured in the second image;
[0117] determining the current distance between the virtual reference point and the infrared light spot emitted by each TOF module to be measured in the second image according to the first distance difference and the second distance difference;
[0118] according to the formula calibrating the compensation angle θ of each TOF module to be measured.
[0119] Specifically, when calibrating the TOF module to be measured, the field of view angle of each infrared light spot emitted by the TOF module to be measured needs to be calibrated due to the time array infrared light spot. For any infrared light spot, if the coordinates of the virtual reference point are (Xg0, Yg0) and the coordinates of the infrared light spot are (Xg1, Yg1), then the formula determining the distance D between the virtual reference point and the infrared light spot.
[0120] determining the field of view angle of the infrared light spot according to the formula determining the field of view angle of the infrared light spot according to the formula
[0121] According to the above method, for any TOF module to be measured, the field of view angles corresponding to all the infrared light spots emitted by the TOF module to be measured can be determined, so as to complete the calibration of the compensation angle of the TOF module to be measured.
[0122] The present application first determines the difference between the reference point and the infrared light spot on the chessboard chart in the standard calibration environment by using the standard TOF module, and then determines the coordinates of the virtual reference point in the non-standard calibration environment based on the above difference. When calibrating the TOF module to be measured, even if the TOF module to be measured is not in the standard calibration environment (the center point of the emission end face of the TOF module to be measured is not aligned with the reference point of the chessboard chart), the TOF module to be measured can be calibrated according to the virtual reference point. Thus, it is not necessary to strictly limit the alignment of the reference point and the center point of the emission end face of the TOF module to be measured during calibration, and therefore multiple TOF modules to be measured can be calibrated at the same time, thereby improving the calibration efficiency.
[0123] Based on the same inventive concept as in the foregoing embodiments, the present embodiment also provides a calibration device for a TOF module, as shown in Figure 6 The calibration device comprises:
[0124] A first determining unit 61 is configured to determine a first coordinate difference value between the infrared light spot emitted by the standard TOF module and the reference point in the X direction and a second coordinate difference value between the infrared light spot emitted by the standard TOF module and the reference point in the Y direction in a first image; the first image is obtained by photographing the chessboard chart when the infrared light spot emitted by the standard TOF module is projected on the chessboard chart in the standard calibration environment; and the reference point is a preset reference point on the chessboard chart;
[0125] A second determining unit 62 is configured to determine a first distance between the infrared light spot emitted by the standard TOF module and the reference point in the X direction in the chessboard chart based on the first coordinate difference value, and determine a second distance between the infrared light spot emitted by the standard TOF module and the reference point in the Y direction in the chessboard chart based on the second coordinate difference value;
[0126] The third determining unit 63 is configured to determine the coordinates of the virtual reference point based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single chessboard in the chessboard chart, and the pixel size of the single chessboard.
[0127] The calibration unit 64 is configured to calibrate each TOF module to be tested according to the coordinates of the virtual reference point.
[0128] In an embodiment, the first determining unit 61 is specifically configured to:
[0129] determine the first horizontal coordinate and the first vertical coordinate of the infrared light spot emitted by the standard TOF module in the first image, and determine the second horizontal coordinate and the second vertical coordinate of the reference reference point in the first image;
[0130] determine the first coordinate difference Diff x according to the formula Diff x = x g - x a
[0131] determine the second coordinate difference Diff y according to the formula Diff y = y g - y a ; wherein,
[0132] x a is the first horizontal coordinate, x g is the second horizontal coordinate, y a is the first vertical coordinate, and y g is the second vertical coordinate.
[0133] In an embodiment, the second determining unit 62 is specifically configured to:
[0134] obtain the pixel size of a single chessboard in the first image and determine the actual physical distance corresponding to the single chessboard in the chessboard chart;
[0135] determine the first distance D x based on the formula D x = C × Diff x / S; wherein,
[0136] C is the actual physical distance corresponding to the single chessboard in the chessboard chart, Diff x is the first coordinate difference, and S is the pixel size of the single chessboard in the first image.
[0137] Since the device is used for implementing the calibration method of the TOF module of the embodiment of the present application, the specific structure and deformation of the device can be understood by those skilled in the art based on the method introduced in the embodiment of the present application, and thus will not be described here again. Any device used by the method of the embodiment of the present application belongs to the scope of the present application.
[0138] Through one or more embodiments of the present application, the present application has the following beneficial effects or advantages:
[0139] The present application provides a TOF module calibration method, device and system, the method comprising: determining the first coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in the X direction and the second coordinate difference value of the infrared light spot emitted by the standard TOF module and the reference datum point in the Y direction in the first image; the first image is obtained by shooting the chessboard chart when the infrared light spot emitted by the standard TOF module is projected on the chessboard chart under the standard calibration environment; the reference datum point is a preset reference point on the chessboard chart; determining the first distance between the infrared light spot emitted by the standard TOF module and the reference datum point in the X direction in the chessboard chart based on the first coordinate difference value, determining the second distance between the infrared light spot emitted by the standard TOF module and the reference datum point in the Y direction in the chessboard chart based on the second coordinate difference value; determining the coordinates of the virtual datum point based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single chessboard in the chessboard chart and the pixel size contained by a single chessboard; the second image is obtained by shooting the chessboard chart when the infrared light spot emitted by the standard TOF module is projected on the chessboard chart under the non-standard calibration environment; calibrating each TOF module to be tested according to the coordinates of the virtual datum point; in this way, first, the difference between the datum point and the infrared light spot on the chessboard chart is determined by using the standard TOF module in the standard calibration environment, and then the coordinates of the virtual datum point are determined by using the standard TOF module in the non-standard calibration environment based on the above difference; when calibrating the TOF module to be tested, even if the TOF module to be tested is not in the standard calibration environment (the center point of the emission end face of the TOF module to be tested is not aligned with the datum point of the chessboard chart), the TOF module to be tested can also be calibrated according to the virtual datum point; in this way, it is not necessary to strictly limit the alignment of the reference datum point and the center point of the emission end face of the TOF module to be tested during calibration, and thus multiple TOF modules to be tested can be calibrated at the same time, thereby improving the calibration efficiency.
[0140] While the preferred embodiments of the application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they have the benefit of the present disclosure. Therefore, the appended claims are intended to encompass all such variations and modifications as falling within the scope of the application.
[0141] The application is herein described, by way of example only, with reference to the accompanying drawings, without any intention of limiting the scope of the application. Obviously, many variations and modifications such as equivalent alternatives can be made to this application by those skilled in the art once they have the benefit of the present disclosure. It is intended that the scope of the application be defined by the claims appended hereto rather than by the description preceding them.
Claims
1. A calibration method for a TOF module, characterized in that, The method includes: In the first image, the first coordinate difference in the X direction between the infrared light spot emitted by the standard TOF module and the reference point, and the second coordinate difference in the Y direction between the infrared light spot emitted by the standard TOF module and the reference point are determined. The first image is obtained by photographing the checkerboard chart under standard calibration conditions when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart. The reference point is a preset reference point on the checkerboard chart. Based on the first coordinate difference, a first distance is determined between the infrared light spot emitted by the standard TOF module in the checkerboard chart in the X direction and the reference reference point; based on the second coordinate difference, a second distance is determined between the infrared light spot emitted by the standard TOF module in the Y direction and the reference reference point. The coordinates of the virtual reference point are determined based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single checkerboard grid in the checkerboard chart, and the pixel size contained in a single checkerboard grid. The second image is obtained by taking a picture of the checkerboard chart in a non-standard calibration environment when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart. Each TOF module under test is calibrated based on the coordinates of the virtual reference point.
2. The method as described in claim 1, characterized in that, The determination of the first coordinate difference in the X direction between the infrared light spot emitted by the standard TOF module and the reference point in the first image, and the second coordinate difference in the Y direction between the infrared light spot emitted by the standard TOF module and the reference point, includes: Determine the first abscissa and first ordinate of the infrared light spot emitted by the standard TOF module in the first image, and determine the second abscissa and second ordinate of the reference point in the first image; According to the formula Diff_x=x g -x a Determine the first coordinate difference value Diff_x; According to the formula Diff_y=y g -y a Determine the second coordinate difference value Diff_y; where, The x a Let x be the first x-coordinate. g The second abscissa, y a Let y be the first ordinate. g The second ordinate.
3. The method as described in claim 1, characterized in that, Determining the first distance between the infrared light spot emitted by the standard TOF module in the X direction and the reference point in the checkerboard chart based on the first coordinate difference includes: Obtain the pixel size of a single chessboard grid in the first image and determine the actual physical distance corresponding to a single chessboard grid in the chessboard chart. The first distance D_x is determined based on the formula D_x = C × Diff_x / S; where... C is the actual physical distance corresponding to a single chessboard grid in the chessboard chart, Diff_x is the first coordinate difference, and S is the pixel size contained in a single chessboard grid in the first image.
4. The method as described in claim 3, characterized in that, Determining the second distance between the infrared spot in the checkerboard chart in the Y direction and the reference point based on the second coordinate difference includes: The second distance D_y is determined based on the formula D_y = C × Diff_y / S; where... C is the actual physical distance corresponding to a single chessboard grid in the chessboard chart, Diff_y is the second coordinate difference, and S is the pixel size contained in a single chessboard grid in the first image.
5. The method as described in claim 1, characterized in that, The determination of the coordinates of the virtual reference point based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single checkerboard cell in the checkerboard chart, and the pixel size contained in a single checkerboard cell includes: The abscissa Xg0 of the virtual reference point is determined according to the formula Xg0=X0+D_x×S0 / C; The ordinate Yg0 of the virtual reference point is determined according to the formula Yg0=Y0+D_y×S0 / C; where... X0 is the horizontal coordinate of the infrared light spot emitted by the standard TOF module in the second image, Y0 is the vertical coordinate of the infrared light spot emitted by the standard TOF module in the second image, D_x is the first distance, D_y is the second distance, S0 is the pixel size of a single checkerboard grid in the second image, and C is the actual physical distance corresponding to a single checkerboard grid in the checkerboard chart.
6. The method as described in claim 1, characterized in that, Each TOF module under test is calibrated based on the coordinates of the virtual reference point, including: The coordinates of the infrared light spot emitted by each TOF module under test in the third image are determined; the third image is obtained by taking a picture of the checkerboard chart under a non-standard calibration environment when the infrared light spot emitted by each TOF module under test is projected onto the checkerboard chart. Based on the coordinates of the virtual reference point and the coordinates of the infrared light spots emitted by each of the TOF modules under test in the second image, the first distance difference between the virtual reference point and the infrared light spots emitted by each of the TOF modules under test in the X direction is determined, and the second distance difference between the virtual reference point and the infrared light spots emitted by each of the TOF modules under test in the Y direction is determined. The current distance between the virtual reference point and the infrared light spot emitted by each of the TOF modules under test in the second image is determined based on the first distance difference and the second distance difference. According to the formula The compensation angle of each of the TOF modules under test is calibrated.
7. A calibration device for a TOF module, characterized in that, The device includes: The first determining unit is used to determine, in the first image, the first coordinate difference in the X direction between the infrared light spot emitted by the standard TOF module and the reference point, and the second coordinate difference in the Y direction between the infrared light spot emitted by the standard TOF module and the reference point; the first image is obtained by taking a picture of the checkerboard chart under a standard calibration environment when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart; the reference point is a preset reference point on the checkerboard chart. The second determining unit is used to determine, based on the first coordinate difference, the first distance between the infrared light spot emitted by the standard TOF module in the checkerboard chart in the X direction and the reference reference point, and based on the second coordinate difference, the second distance between the infrared light spot emitted by the standard TOF module in the checkerboard chart in the Y direction and the reference reference point. The third determining unit is used to determine the coordinates of the virtual reference point based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single checkerboard grid in the checkerboard chart, and the pixel size contained in a single checkerboard grid; the second image is obtained by taking a picture of the checkerboard chart in a non-standard calibration environment when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart; The calibration unit is used to calibrate each TOF module under test according to the coordinates of the virtual reference point.
8. The device as described in claim 7, characterized in that, The first determining unit is specifically used for: Determine the first abscissa and first ordinate of the infrared light spot emitted by the standard TOF module in the first image, and determine the second abscissa and second ordinate of the reference point in the first image; According to the formula Diff_x=x g -x a Determine the first coordinate difference value Diff_x; According to the formula Diff_y=y g -y a Determine the second coordinate difference value Diff_y; where, The x a Let x be the first x-coordinate. g The second abscissa, y a Let y be the first ordinate. g The second ordinate.
9. The device as described in claim 7, characterized in that, The second determining unit is specifically used for: Obtain the pixel size of a single chessboard grid in the first image and determine the actual physical distance corresponding to a single chessboard grid in the chessboard chart. The first distance D_x is determined based on the formula D_x = C × Diff_x / S; where... C is the actual physical distance corresponding to a single chessboard grid in the chessboard chart, Diff_x is the first coordinate difference, and S is the pixel size contained in a single chessboard grid in the first image.
10. A calibration system for a TOF module, characterized in that, The system includes: an infrared camera, a checkerboard chart, a standard TOF module, and the calibration device as described in claim 7; the infrared camera is positioned on one side of the checkerboard chart according to a preset position; The infrared camera is used to capture a first image of the checkerboard chart when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart under a standard calibration environment; and to capture a second image of the checkerboard chart when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart under a non-standard calibration environment. The calibration device is used to determine, in the first image, a first coordinate difference in the X direction between the infrared light spot emitted by the standard TOF module and a reference point, and a second coordinate difference in the Y direction between the infrared light spot emitted by the standard TOF module and the reference point; based on the first coordinate difference, determine a first distance in the X direction between the infrared light spot in the checkerboard chart and the reference point, and based on the second coordinate difference, determine a second distance in the Y direction between the infrared light spot emitted by the standard TOF module and the reference point; based on the first distance, the second distance, the coordinates of the infrared light spot emitted by the standard TOF module in the second image, the actual distance of a single checkerboard grid in the checkerboard chart, and the pixel size contained in a single checkerboard grid, determine the coordinates of a virtual reference point; the second image is obtained by photographing the checkerboard chart in a non-standard calibration environment when the infrared light spot emitted by the standard TOF module is projected onto the checkerboard chart; and calibrate each TOF module under test according to the coordinates of the virtual reference point.