Fourier Coefficient Calculation Method, Device, Terminal Device and Medium
By correcting and calculating the measured distance data of the TOF module, the new Fourier coefficient is obtained, which solves the problem of low Fourier coefficient accuracy in the prior art and improves the accuracy of module error calibration.
Patent Information
- Application Number
- CN202111403393.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2041-11-24
AI Technical Summary
The Fourier coefficient accuracy obtained by table lookup in the prior art is not high, resulting in insufficient accuracy of TOF module error calibration.
By obtaining the measured distance data of the camera module and the original Fourier coefficient, correcting and calculating, the new Fourier coefficient is obtained to improve the accuracy of error calibration.
It improves the convenience and accuracy of Fourier coefficient calculation, and solves the problem of low accuracy of module error calibration.
Smart Images

Figure CN114168890B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a method and apparatus for calculating Fourier coefficients, a terminal device, and a medium. Background Art
[0002] A time of flight (TOF) module, as a ranging module, can emit a modulated optical signal to a target object and receive the modulated optical signal reflected by the target object, so as to measure the distance to the target object by using the round-trip time of the modulated optical signal.
[0003] There is often a certain error between the measured distance between the TOF module and the target object and the actual distance to the target object. Therefore, it is usually necessary to calibrate the error of the TOF module, so as to perform corresponding error compensation when the TOF module is applied.
[0004] Currently, most of the TOF modules are calibrated for periodic errors based on Fourier series (Fourier coefficients), and the Fourier coefficients are obtained by means of a look-up table, but the calibration accuracy of this method for error calibration is insufficient. Therefore, how to determine / calculate the Fourier coefficients required for module error calibration is an important problem that needs to be solved urgently at present. Summary of the Invention
[0005] By providing a method for calculating Fourier coefficients in an embodiment of the present application, the technical problem in the prior art that the accuracy of the Fourier coefficients obtained by means of a look-up table is not high, thereby resulting in low accuracy of module error calibration, is solved.
[0006] On the one hand, an embodiment of the present application provides a method for calculating Fourier coefficients, and the method includes the following steps:
[0007] S1. Obtain m measured distance data and original Fourier coefficients of a camera module, where m is a positive integer;
[0008] S2. Correct the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data;
[0009] S3. Calculate m distance error data based on the m corrected distance data and pre-stored actual distance data;
[0010] S4. Calculate new Fourier coefficients based on the m distance error data.
[0011] Optionally, the step S2 includes:
[0012] Calculate error data for the m measured distance data according to the original Fourier coefficients to obtain m swing error data;
[0013] Based on the m pieces of the swing error data, correct the m pieces of the measured distance data to obtain the m pieces of the corrected distance data.
[0014] Optionally, the method further includes:
[0015] In the next calculation, use the new Fourier coefficients as the original Fourier coefficients, and use the m pieces of the corrected distance data as the m pieces of the measured distance data, and repeat the above steps S1 to S4 until the number of calculations reaches a preset number and ends.
[0016] Optionally, the method further includes:
[0017] Save the new Fourier coefficients obtained in each calculation to the storage database.
[0018] Optionally, the method further includes:
[0019] Perform a weighting process on the new Fourier coefficients obtained in each calculation to obtain the target Fourier coefficients;
[0020] Use the target Fourier coefficients to perform error calibration on the camera module.
[0021] Optionally, the preset number is determined according to the calibration error obtained from the error calibration, so that the calibration error is less than a preset threshold.
[0022] On the other hand, the present application provides a Fourier coefficient calculation device through an embodiment of the present application. The device includes: an acquisition module, a correction module, and a calculation module, where:
[0023] The acquisition module is configured to acquire m pieces of measured distance data and the original Fourier coefficients of the camera module, where m is a positive integer;
[0024] The correction module is configured to correct the m pieces of the measured distance data according to the original Fourier coefficients to obtain m pieces of corrected distance data;
[0025] The calculation module is configured to calculate m pieces of distance error data according to the m pieces of the corrected distance data and the pre-stored theoretical distance data;
[0026] The calculation module is further configured to calculate new Fourier coefficients according to the m pieces of the distance error data.
[0027] For the content not introduced or described in the embodiments of the present application, reference can be made to the relevant introductions in the foregoing method embodiments correspondingly, and details are not described herein again.
[0028] On the other hand, an embodiment of the present application provides a terminal device, which includes: a processor, a memory, a communication interface, and a bus; the processor, the memory, and the communication interface are connected through the bus and communicate with each other; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the Fourier coefficient calculation method as described above.
[0029] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a program that executes the Fourier coefficient calculation method as described above when the program runs on a terminal device.
[0030] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: The present application obtains m measured distance data and original Fourier coefficients of a camera module, then corrects the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data, then calculates m distance error data according to the m corrected distance data and pre-stored actual distance data, and finally calculates new Fourier coefficients according to the m distance error data. In the above solution, the present application corrects the measured distance data of the camera module based on the original Fourier coefficients, and then calculates new Fourier coefficients using the distance error data between the corrected distance data and the actual distance data, so as to perform error calibration on the camera module based on the new Fourier coefficients, which is beneficial to improving the convenience and accuracy of Fourier coefficient calculation, thus solving the technical problem that the accuracy of the Fourier coefficients obtained by the look-up table method in the prior art is not high, and further resulting in low accuracy of module error calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0032] Figure 1 It is a flowchart of a Fourier coefficient calculation method provided by an embodiment of the present application.
[0033] Figure 2 It is a schematic diagram of discrete sampling points provided by an embodiment of the present application.
[0034] Figure 3 It is a schematic diagram of a Fourier coefficient fitting curve provided by an embodiment of the present application.
[0035] Figure 4 It is a schematic flowchart of another Fourier coefficient calculation method provided by an embodiment of the present application.
[0036] Figure 5 It is a schematic diagram of several error calibration results provided by an embodiment of the present application.
[0037] Figure 6 It is a schematic structural diagram of a Fourier coefficient calculation device provided by an embodiment of the present application.
[0038] Figure 7 It is a schematic structural diagram of a terminal device provided by an embodiment of the present application. Detailed implementation manners
[0039] By providing a Fourier coefficient calculation method, an embodiment of the present application solves the technical problem that the accuracy of the Fourier coefficients obtained by the existing table lookup method is not high, which in turn leads to low accuracy of module error calibration.
[0040] The technical solution of the embodiment of the present application for solving the above technical problem is generally as follows: Obtain m measured distance data of the camera module and the original Fourier coefficients, then correct the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data, then calculate m distance error data according to the m corrected distance data and the pre-stored actual distance data, and finally calculate new Fourier coefficients according to the m distance error data.
[0041] To better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings of the specification and specific implementation manners.
[0042] First, it should be noted that the term "and / or" appearing in this article is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the preceding and following associated objects.
[0043] Please refer to Figure 1 , which is a schematic flowchart of a Fourier coefficient calculation method provided by an embodiment of the present application. As Figure 1 shown, the method includes the following implementation steps:
[0044] S1. Obtain m measured distance data of the camera module and the original Fourier coefficients, where m is a positive integer.
[0045] The measured distance data described in this application refers to the measured distance between the camera module and the target object to be tested. The original Fourier coefficients refer to the Fourier coefficients of the Fourier expression required in the module error calibration process. The number of these coefficients is not limited in this application and can be one or more, which is determined according to the actual situation. The original Fourier coefficients described in this application can refer to the initial Fourier coefficients stored in a preset storage database (such as a look-up table), and the initial Fourier coefficients can be configured by the system itself, for example, customized according to the actual needs of the system.
[0046] This application can collect the measured distance data of m discrete sampling points respectively, so as to obtain m measured distance data, and then obtain the initial Fourier coefficients (i.e., the original Fourier coefficients) of the Fourier expression from the preset look-up table. For example, please refer to Figure 2 which shows a sampling schematic diagram of a possible discrete sampling point. As Figure 2 shown in it, the abscissa represents the measured distance data of each discrete sampling point (i.e., the measured distance data of m discrete sampling points respectively), and the ordinate represents the calibration error corresponding to each discrete sampling point.
[0047] Please refer to Figure 3 which shows a schematic diagram of a possible Fourier coefficient fitting curve based on sampling points. As Figure 3 shown in it, this application can perform Fourier coefficient fitting on Figure 2 each discrete sampling point in it, so as to fit the expression curve of the corresponding Fourier expression, and thus also obtain each original Fourier coefficient involved in this Fourier expression, which can be pre-stored in a preset look-up table for subsequent use.
[0048] In a possible implementation manner, during the single Fourier coefficient calculation process, the Fourier expression used in this application can be shown as the following formula (1):
[0049] y = a1 sin(2x) + a2 cos(2x) + a3 sin(4x) + a4 cos(4x)
[0050] Formula (1)
[0051] where a1, a2, a3, and a4 are all Fourier coefficients in the Fourier expression, x is the measured distance data, and y is the swing error after error calibration.
[0052] S2. Correct the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data.
[0053] In a specific embodiment, the present application can calculate the error of the m measured distance data according to the original Fourier coefficients to obtain m swing error data. Specifically, the present application can substitute the m measured distance data into the Fourier expression (as shown in formula (1) above) for calculation. At this time, the Fourier coefficients involved in the Fourier expression are the original Fourier coefficients, so as to obtain m calculation results, that is, m swing error data.
[0054] Furthermore, the present application then uses the m swing error data to correct the m measured distance data, so as to obtain m corrected distance data. Specifically, the present application can add each measured distance data to its corresponding swing error data to obtain the m corrected distance data.
[0055] It should be noted that each time the measured distance data is corrected, the present application needs to evaluate the calibration accuracy of the swing error data. Specifically, the present application can perform the correction on the m measured distance data based on the original Fourier coefficients multiple times according to the above specific correction steps until the swing error data is less than the preset error data (such as 2 millimeters, etc.) in the last correction process, then the process can be ended to obtain the finally corrected corrected distance data.
[0056] S3. Calculate and obtain m distance error data according to the m corrected distance data and the pre-stored actual distance data.
[0057] The actual distance data in the present application is the real distance between the camera module and the target object during each test, and the number of the actual distance data is not limited in the present application. Specifically, the present application can subtract the m corrected distance data from their respective corresponding actual distance data to obtain m distance error data.
[0058] S4. Calculate and obtain new Fourier coefficients according to the m distance error data.
[0059] In each calculation process of the Fourier coefficients, the present application can calculate and obtain new Fourier coefficients by using the m distance error data, simply referred to as new Fourier coefficients. Specifically, referring to the aforementioned formula (1), the present application can use the following formula (2) to calculate each new Fourier coefficient in the Fourier expression.
[0060]
[0061]
[0062] Among them, a1, a2, a3, and a4 are all the new Fourier coefficients calculated in the Fourier expression, x is the distance error data, and f(x) is y in the above formula (1).
[0063] Please refer to Figure 4 , which is a schematic flowchart of another Fourier coefficient calculation method provided by an embodiment of the present application. As Figure 4 shown, the method includes the following implementation steps:
[0064] S1. Obtain m measured distance data and original Fourier coefficients of the camera module, where m is a positive integer;
[0065] S2. Correct the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data;
[0066] S3. Calculate and obtain m distance error data according to the m corrected distance data and pre-stored actual distance data;
[0067] S4. Calculate and obtain new Fourier coefficients according to the m distance error data.
[0068] Regarding the above implementation steps S1-S4 of the present application, reference can be made to the relevant introduction in the foregoing Figure 1 method embodiment, which will not be elaborated here.
[0069] S5. Take the new Fourier coefficients as the original Fourier coefficients, and take the m corrected distance data as the m measured distance data, and repeat the above steps S1-S4 until the number of calculations reaches a preset number and ends.
[0070] The present application can use the new Fourier coefficients obtained in the previous calculation and the m corrected distances obtained in the previous correction to recalculate the new Fourier coefficients of the current time. Specifically, the present application can take the new Fourier coefficients obtained in the previous calculation as the original Fourier coefficients, and take the m corrected distance data obtained in the previous calculation as the m measured distance data, and repeat the above steps S1-S4 until the repeated calculation reaches a preset number and ends.
[0071] Among them, the preset number can be set by the system itself. For example, it can be specifically determined according to the calibration error calculated during the calibration of the camera module error, so that the calibration error is less than a preset threshold (such as 0.1% of the preset maximum error, etc.). The calibration error is related to the new Fourier coefficients obtained in each calculation, which will be elaborated in detail below.
[0072] In an alternative embodiment, the present application can save the new Fourier coefficients obtained in each calculation, for example, save them to a preset storage database, or save them to an electrically erasable programmable read-only memory (EEPROM), etc., which is not limited in the present application.
[0073] S6. Weight the newly obtained Fourier coefficients for each calculation to obtain the target Fourier coefficients.
[0074] In this application, the newly obtained Fourier coefficients for each calculation in the preset number of times can be weighted to obtain the corresponding target Fourier coefficients, and at the same time, an updated (or improved) Fourier expression is also obtained, which can be specifically shown in the following formula (3).
[0075]
[0076] Wherein, and refer to the target Fourier coefficients in the updated Fourier expression, n is the preset number of times, and i is a positive integer representing the i-th time.
[0077] S7. Use the target Fourier coefficients to calibrate the error of the camera module.
[0078] This application can use the target Fourier coefficients (specifically, the corresponding updated Fourier expression) to calibrate the error of the camera module. Specifically, this application can use the above formula (3) to perform the final error calculation on the m corrected distance data obtained in the i-th calculation to obtain the final m swing error data (which can also be called calibration error). When the calibration error is less than the preset threshold, the current calculation number (i) can be output as the preset number of times to control the final calibration error within a smaller range, specifically, for example, less than the preset threshold, etc., to meet the accuracy requirements of the module for error calibration.
[0079] For example, please refer to Figure 5 which is a schematic diagram of several error calibration results provided by an embodiment of this application. As Figure 5 shown, this application performs 6 error calibrations on the TOF module. The calibration errors of each error calibration are respectively shown by curves 1 to 6 in the figure. The abscissa in the figure represents the iterative calculation number (i.e., the preset number of times), and the ordinate represents the calibration error.
[0080] By implementing this application, this application can perform repeated iterative Fourier coefficient calibration calculations on the discrete m measured distance data, greatly reducing the calibration error of the module, and facilitating the improvement of the convenience and accuracy of Fourier coefficient calculation. At the same time, it also solves the technical problem that the accuracy of the Fourier coefficients obtained by the look-up table method in the prior art is not high, resulting in low accuracy of module error calibration.
[0081] Based on the same inventive concept, another embodiment of this application provides a device and a terminal device corresponding to the method described in the embodiment of this application.
[0082] Please refer to Figure 6 , which is a schematic structural diagram of a Fourier coefficient calculation device provided by an embodiment of the present application. As Figure 6 shown in the device, it includes: an acquisition module 601, a correction module 602, and a calculation module 603, where:
[0083] The acquisition module 601 is configured to acquire m measured distance data and original Fourier coefficients of the camera module, where m is a positive integer;
[0084] The correction module 602 is configured to correct the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data;
[0085] The calculation module 603 is configured to calculate and obtain m distance error data according to the m corrected distance data and pre-stored theoretical distance data;
[0086] The calculation module 603 is further configured to calculate and obtain new Fourier coefficients according to the m distance error data.
[0087] Optionally, the correction module 602 is specifically configured to:
[0088] Calculate error data for the m measured distance data according to the original Fourier coefficients to obtain m swing error data;
[0089] Correct the m measured distance data according to the m swing error data to obtain the m corrected distance data.
[0090] Optionally, the device further includes a processing module 604, and the processing module 604 is configured to:
[0091] In the next calculation, use the new Fourier coefficients as the original Fourier coefficients, and use the m corrected distance data as the m measured distance data, and repeatedly call the above acquisition module 601, correction module 602, and calculation module 603 to execute the corresponding functional steps until the number of calculations reaches a preset number and ends.
[0092] Optionally, the device further includes a storage module 605, and the storage module 605 is configured to:
[0093] Save the newly obtained Fourier coefficients in each calculation to a storage database.
[0094] Optionally,
[0095] The calculation module 603 is further configured to perform weighted processing on the newly obtained Fourier coefficients in each calculation to obtain target Fourier coefficients;
[0096] The processing module 604 is further configured to perform error calibration on the camera module by using the target Fourier coefficients.
[0097] Optionally, the preset number of times is determined according to the calibration error calculated by the error calibration, so that the calibration error is less than a preset threshold.
[0098] Please also refer to FIG. 7, which is a schematic structural diagram of a terminal device provided by an embodiment of the present application. As Figure 7 shown, the terminal device 70 includes: at least one processor 701, a communication interface 702, a user interface 703, and a memory 704. The processor 701, the communication interface 702, the user interface 703, and the memory 704 can be connected through a bus or other means. In the embodiment of the present invention, it is taken as an example of being connected through a bus 705. Among them,
[0099] The processor 701 may be a general-purpose processor, such as a central processing unit (CPU).
[0100] The communication interface 702 may be a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other terminals or websites. In the embodiment of the present invention, the communication interface 702 is specifically configured to obtain track parameters.
[0101] The user interface 703 may specifically be a touch panel, including a touch screen and a touch screen, for detecting operation instructions on the touch panel. The user interface 703 may also be a physical button or a mouse. The user interface 703 may also be a display screen for outputting and displaying images or data.
[0102] The memory 704 may include a volatile memory (such as a random access memory (RAM)); the memory may also include a non-volatile memory (such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD)); the memory 704 may also include a combination of the above types of memories. The memory 704 is used to store a set of program codes, and the processor 701 is used to call the program codes stored in the memory 704 to perform the following operations:
[0103] S1. Obtain m measured distance data and original Fourier coefficients of the camera module, where m is a positive integer;
[0104] S2. Correct the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data;
[0105] S3. Calculate m distance error data based on the m corrected distance data and the pre-stored actual distance data;
[0106] S4. Calculate new Fourier coefficients based on the m distance error data.
[0107] Optionally, step S2 includes:
[0108] Calculate error for the m measured distance data according to the original Fourier coefficients to obtain m swing error data;
[0109] Correct the m measured distance data according to the m swing error data to obtain the m corrected distance data.
[0110] Optionally, the processor 701 is further configured to:
[0111] In the next calculation, use the new Fourier coefficients as the original Fourier coefficients, and use the m corrected distance data as the m measured distance data, and repeat the above steps S1 - S4 until the number of calculations reaches a preset number and ends.
[0112] Optionally, the processor 701 is further configured to:
[0113] Save the newly obtained Fourier coefficients in each calculation to the storage database.
[0114] Optionally, the processor 701 is further configured to:
[0115] Perform weighted processing on the newly obtained Fourier coefficients in each calculation to obtain target Fourier coefficients;
[0116] Use the target Fourier coefficients to perform error calibration on the camera module.
[0117] Optionally, the preset number is determined according to the calibration error obtained from the error calibration, such that the calibration error is less than a preset threshold.
[0118] Since the terminal device introduced in this embodiment is the terminal device used to implement the method in the embodiments of the present application, based on the method introduced in the embodiments of the present application, those skilled in the art can understand the specific implementation manners and various variations of the terminal device in this embodiment. Therefore, the implementation of how this terminal device implements the method in the embodiments of the present application will not be described in detail here. As long as the terminal device used by those skilled in the art to implement the method in the embodiments of the present application belongs to the scope protected by the present application.
[0119] The technical solutions in the embodiments of the present application at least have the following technical effects or advantages:
[0120] In the present application, m measured distance data and original Fourier coefficients of a camera module are obtained, then the m measured distance data are corrected according to the original Fourier coefficients to obtain m corrected distance data. Then, m distance error data are calculated based on the m corrected distance data and pre-stored actual distance data. Finally, new Fourier coefficients are calculated based on the m distance error data. In the above solution, the present application corrects the measured distance data of the camera module based on the original Fourier coefficients, and then calculates new Fourier coefficients by using the distance error data between the corrected distance data and the actual distance data, so as to perform error calibration on the camera module based on the new Fourier coefficients, which is beneficial to improving the convenience and accuracy of Fourier coefficient calculation, thereby solving the technical problem that the accuracy of the Fourier coefficients obtained by the look-up table method in the prior art is not high, and further resulting in low accuracy of module error calibration.
[0121] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0122] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.
[0123] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that realizes the functions specified in Figure 1 one or more flows and / or blocksFigure 1 The functions specified in one or more boxes.
[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 process or more processes and / or boxes Figure 1 or more boxes.
[0125] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0126] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A method for obtaining Fourier coefficients, characterized in that The method includes the following steps: S1. Obtain m measured distance data and original Fourier coefficients of the camera module, where m is a positive integer; S2. Correct the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data; S3. Calculate m distance error data based on the m corrected distance data and pre-stored actual distance data; S4. Calculate new Fourier coefficients based on the m distance error data; The method further includes: In the next calculation, use the new Fourier coefficients as the original Fourier coefficients, and use the m corrected distance data as the m measured distance data, and repeat the above steps S1 to S4 until the number of calculations reaches a preset number and ends.
2. The method according to claim 1, characterized in that The step S2 includes: Calculate errors of the m measured distance data according to the original Fourier coefficients to obtain m swing error data; Correct the m measured distance data according to the m swing error data to obtain the m corrected distance data.
3. The method according to claim 1, wherein The method further includes: Save the new Fourier coefficients obtained in each calculation to a storage database.
4. The method according to claim 3, wherein The method further includes: Perform weighted processing on the new Fourier coefficients obtained in each calculation to obtain target Fourier coefficients; Use the target Fourier coefficients to calibrate the errors of the camera module.
5. The method according to claim 4, characterized in that, The preset number is determined according to the calibration error obtained from the error calibration, so that the calibration error is less than a preset threshold.
6. A Fourier coefficient acquisition device, characterized in that, The device includes: an acquisition module, a correction module, and a calculation module, where: The acquisition module is used to obtain m measured distance data and original Fourier coefficients of the camera module, where m is a positive integer; The correction module is used to correct the m measured distance data according to the original Fourier coefficients to obtain m corrected distance data; The calculation module is used to calculate m distance error data based on the m corrected distance data and pre-stored theoretical distance data; The calculation module is further used to calculate new Fourier coefficients based on the m distance error data; The processing module is used to: in the next calculation, use the new Fourier coefficients as the original Fourier coefficients, and use the m corrected distance data as the m measured distance data, and repeatedly call the acquisition module, the correction module, and the calculation module to execute the corresponding functional steps until the number of calculations reaches a preset number and ends.
7. The device according to claim 6, characterized in that, The correction module is specifically used for: Calculate errors of the m measured distance data according to the original Fourier coefficients to obtain m swing error data; Correct the m measured distance data according to the m swing error data to obtain the m corrected distance data.
8. A terminal device, characterized in that, The terminal device includes: a processor, a memory, a communication interface, and a bus; the processor, the memory, and the communication interface are connected through the bus and complete communication with each other; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the Fourier coefficient acquisition method described in any one of claims 1-5 above.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when running on a terminal device, executes the Fourier coefficient acquisition method described in any one of claims 1-5 above.
Citation Information
Patent Citations
Periodic error calibration method, periodic error calibration device and periodic error calibration system
CN111624582A
Determination Method for a Position Signal
US20070288187A1