Calibration method and device of electronic equipment and electronic equipment
By data correction on the slot of the electronic device on the slot of the calibration device, the gyroscope calibration method is performed to solve the problem of low precision precision accuracy of gyroscope in the existing technology, which significantly improves the image stabilization effect.
Patent Information
- Application Number
- CN202411418980.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, the gyroscope calibration accuracy of electronic devices is low, resulting in poor anti-shake effect.
By obtaining electronic equipment on the position of the positive and negative direction of a single coordinate axis on the tank of the calibration equipment, the data of the rotating dataset is corrected first, and then the gyroscope calibration is performed to reduce the slot error errors. Influence.
The calibration accuracy of the gyroscope of the electronic device is improved, the error of the gyroscope is reduced, and the anti -shake effect of the electronic equipment is improved.
Smart Images

Figure CN119374631A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a calibration method and device for electronic equipment, and the electronic equipment. Background Art
[0002] As electronic devices become more and more popular, people are using them to take photos and record videos. The smaller the error of the gyroscope on the electronic device, the better the anti-shake effect of the photo.
[0003] At present, before electronic equipment leaves the factory, it is usually necessary to calibrate the gyroscope in the electronic equipment first. The specific calibration method is to place the electronic equipment in the slot of the gyroscope calibration device and calibrate the gyroscope in the electronic equipment based on the gyroscope calibration device. However, the above solution has low calibration accuracy for the gyroscope. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a calibration method, device and electronic device for an electronic device, so as to accurately calibrate a gyroscope in the electronic device, reduce the error of the gyroscope, and improve the anti-shake effect of the electronic device.
[0005] In a first aspect, an embodiment of the present application provides a calibration method for an electronic device, the method comprising:
[0006] Acquire a first rotation data set of a first electronic device in a first slot of a calibration device and a calibration parameter of the first slot, wherein each rotation data in the first rotation data set is data obtained by rotating the first electronic device in the first slot around a first coordinate axis of the first slot along a first direction, the first coordinate axis is any coordinate axis among the coordinate axes of the first slot, and the first direction is a positive direction or a negative direction;
[0007] Performing slot correction on each rotation data in the first rotation data set based on the calibration parameters to obtain a second rotation data set;
[0008] Based on the second rotation data set, the gyroscope of the first electronic device is calibrated to obtain a calibrated first electronic device.
[0009] In a second aspect, an embodiment of the present application provides a calibration device for an electronic device, the device comprising:
[0010] A first acquisition module is used to acquire a first rotation data set of a first electronic device in a first slot of a calibration device and a calibration parameter of the first slot, wherein each rotation data in the first rotation data set is respectively data obtained by rotating the first electronic device in the first slot around a first coordinate axis of the first slot along a first direction, the first coordinate axis is any coordinate axis of the first slot, and the first direction is a positive direction or a negative direction;
[0011] a correction module, configured to perform slot correction on each rotation data in the first rotation data set based on the correction parameters to obtain a second rotation data set;
[0012] The calibration module is used to calibrate the gyroscope of the first electronic device based on the second rotation data set to obtain a calibrated first electronic device.
[0013] In a third aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0016] In an embodiment of the present application, by obtaining data obtained by rotating the first electronic device in the first slot of the calibration device around the positive and negative directions of a single coordinate axis of the first slot, and the calibration parameters of the first slot, each rotation data in the first rotation data set can be slot-calibrated based on the calibration parameters. After the slot calibration of the first slot, the gyroscope of the first electronic device is calibrated. In this way, compared with the scheme of directly calibrating the gyroscope of the first electronic device in the prior art, the embodiment of the present application first performs slot calibration on the first slot of the calibration device where the first electronic device is placed before calibrating the gyroscope, so as to avoid interference of the slot error of the calibration device with the calibration of the gyroscope of the first electronic device. Through the calibration method of the embodiment of the present application, the calibration accuracy of the gyroscope of the electronic device is improved, the error of the gyroscope is reduced, and the anti-shake effect of the electronic device is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1is a schematic diagram of the structure of the slots of the calibration device provided in some embodiments of the present application;
[0018] Figure 2 is a flowchart of a calibration method for an electronic device provided in some embodiments of the present application;
[0019] Figure 3 is a schematic diagram of the relationship between the calibration device coordinate system and the slot coordinate system provided in some embodiments of the present application;
[0020] Figure 4 is a flowchart of a method for determining calibration parameters of a first slot provided in some embodiments of the present application;
[0021] Figure 5 is a flowchart of a calibration method for a first electronic device provided in some embodiments of the present application;
[0022] Figure 6 is a schematic structural diagram of a calibration device for an electronic device shown in some embodiments of the present application;
[0023] Figure 7 is a schematic diagram of the structure of an electronic device shown in some embodiments of the present application;
[0024] Figure 8 It is a schematic diagram of the hardware structure of an electronic device shown in some embodiments of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or N. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0027] Before introducing the technical solution of the embodiment of the present application, the background technology of the embodiment of the present application is first introduced:
[0028] At present, before electronic equipment leaves the factory, it is usually necessary to calibrate the gyroscope in the electronic equipment first. The specific calibration method is to place the electronic equipment in the slot of the gyroscope calibration device and calibrate the gyroscope in the electronic equipment based on the gyroscope calibration device. However, the above solution has low calibration accuracy for the gyroscope.
[0029] The inventors have discovered that when using a calibration device to calibrate a gyroscope, the error of a slot in the calibration device for placing an electronic device has a significant impact on the calibration error of the gyroscope. Therefore, before calibrating the gyroscope, the slot in the calibration device may be calibrated first to reduce the error in gyroscope calibration and improve the anti-shake effect of the electronic device.
[0030] In order to solve the above problems, the embodiments of the present application provide a calibration method, device and electronic device for an electronic device. By obtaining data obtained by rotating a first electronic device in a first slot of a calibration device around a single coordinate axis of the first slot in the positive and negative directions, and the calibration parameters of the first slot, each rotation data in the first rotation data set can be slot-calibrated based on the calibration parameters. After the slot calibration of the first slot, the gyroscope of the first electronic device is calibrated. In this way, compared with the scheme of directly calibrating the gyroscope of the first electronic device in the prior art, the embodiments of the present application firstly performs slot calibration on the first slot of the calibration device where the first electronic device is placed before calibrating the gyroscope, so as to avoid interference of the slot error of the calibration device with the calibration of the gyroscope of the first electronic device. Through the calibration method of the embodiments of the present application, the calibration accuracy of the gyroscope of the electronic device is improved, the error of the gyroscope is reduced, and the anti-shake effect of the electronic device is improved.
[0031] The technical solution of the embodiment of the present application can be applied to the scenario of calibrating the gyroscope of an electronic device.
[0032] Before introducing the calibration method of the electronic device provided in the embodiment of the present application, the professional terms involved in the embodiment of the present application are first introduced:
[0033] Calibration equipment: also known as gyroscope calibration equipment, used to calibrate the gyroscope of electronic equipment.
[0034] Slot: A slot in the calibration device used to place electronic equipment.
[0035] refer to Figure 1 , Figure 1 is a schematic diagram of the structure of the slots on the calibration device. The number of slots in the calibration device can be at least one, and an electronic device is placed in each slot, such as Figure 1 As shown, the slot 11 is provided with an electronic device 12 .
[0036] It should be noted that Figure 1 Only four slots are shown, but the number of slots on the calibration device is not limited to four. The number of slots on the specific calibration device can be set according to user needs and is not limited in the embodiments of the present application.
[0037] It should be noted that there are certain angle errors between the four slots of the calibration device and the X-axis, Y-axis and Z-axis of the calibration device. If each slot is not calibrated, the calibration accuracy of the electronic device's gyroscope will be affected, resulting in the gyroscope calibration accuracy failing to meet the specified requirements, ultimately affecting the anti-shake effect of the electronic device's camera.
[0038] The following describes in detail the calibration method of the electronic device provided in the embodiment of the present application through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0039] Figure 2 It is a flow chart of a calibration method for an electronic device provided in an embodiment of the present application. The executor of the calibration method for the electronic device may be a calibration device, which may include a control center, and the control center may be used to execute the calibration method for the electronic device provided in this embodiment.
[0040] like Figure 2 As shown, the calibration method of an electronic device provided in an embodiment of the present application may include steps 210 to 230.
[0041] Step 210: Obtain a first rotation data set of a first electronic device in a first slot of a calibration device and a calibration parameter of the first slot.
[0042] The first electronic device may be an electronic device that is to undergo gyroscope calibration, that is, the first electronic device is a device that has not undergone gyroscope calibration.
[0043] The first slot may be any one of the multiple slots of the calibration device, and the first slot is used to place the first electronic device.
[0044] The first rotation data set may be a set of data collected when the first electronic device is placed in the first slot and the first electronic device is rotated along a first direction around a first coordinate axis of the first slot, where the first direction may be a positive direction or a negative direction. That is, each rotation data in the first rotation data set may be data obtained when the first electronic device is rotated in the first slot around a single coordinate axis of the first slot in a positive or negative direction.
[0045] In one example, reference Figure 1Taking the electronic device 12 as the first electronic device and the slot 11 as the first slot as an example, the rotation data 1 collected after the electronic device 12 rotates around the positive direction of the X-coordinate axis of the calibration device, the rotation data 2 collected after the electronic device 12 rotates around the negative direction of the X-coordinate axis of the calibration device, the rotation data 3 collected after the electronic device 12 rotates around the positive direction of the Y-coordinate axis of the calibration device, the rotation data 4 collected after the electronic device 12 rotates around the negative direction of the Y-coordinate axis of the calibration device, the rotation data 5 collected after the electronic device 12 rotates around the positive direction of the Z-coordinate axis of the calibration device, and the rotation data 6 collected after the electronic device 12 rotates around the negative direction of the Z-coordinate axis of the calibration device can be obtained respectively, and the rotation data 1, the rotation data 2, the rotation data 3, the rotation data 4, the rotation data 5 and the rotation data 6 are used as the rotation data in the first rotation data set.
[0046] The calibration parameter of the first slot may be a parameter for calibrating the first slot.
[0047] In some embodiments of the present application, the calibration parameters of the first slot may be obtained when it is determined that the calibration device has the calibration parameters of the first slot, specifically, when the control center has the calibration parameters of the first slot.
[0048] Step 220: Perform slot correction on each rotation data in the first rotation data set based on the calibration parameters to obtain a second rotation data set.
[0049] The second rotation data set may be a rotation data set obtained by performing slot correction on each rotation data in the first rotation data set based on the correction parameters.
[0050] In some embodiments of the present application, when it is determined that the calibration device has a calibration parameter of a first slot, each rotation data in the first rotation data set is slot-corrected based on the calibration parameter to obtain a second rotation data set.
[0051] In some embodiments of the present application, before using the calibration parameters to perform slot calibration on each rotation data in the first rotation data set, the calibration parameters of the first slot must first be obtained. Therefore, before step 220, the above method may further include:
[0052] Acquire a third rotation data set of the second electronic device placed in the first slot, the third rotation data set being a rotation data set of the second electronic device collected during the process of the calibration device rotating according to each rotation data in the fourth rotation data set, each rotation data in the fourth rotation data set being rotation data of the calibration device rotating around a second direction of a second coordinate axis of the calibration device;
[0053] A calibration parameter of the first slot is determined according to the third rotated data set and the fourth rotated data set.
[0054] The second electronic device may be an electronic device different from the first electronic device.
[0055] The third rotation data set may be a rotation data set of the second electronic device collected, and specifically may be a rotation data set of the second electronic device collected during the rotation of the calibration device according to each rotation data in the fourth rotation data set. Each rotation data in the fourth rotation data set here is rotation data of the calibration device rotating along the second direction around the second coordinate axis of the calibration device. The second coordinate axis may be any coordinate axis of the coordinate axes of the calibration device. The second direction may be a positive direction or a negative direction.
[0056] In one example, reference Figure 1 , taking the electronic device 12 as the second electronic device and the slot 11 as the first slot as an example, the calibration device can be respectively rotated by a first angle around the positive direction of the X-coordinate axis of the calibration device to collect rotation data 10 of the second electronic device placed in the slot 11, the calibration device can be rotated by a second angle around the negative direction of the X-coordinate axis of the calibration device to collect rotation data 20 of the second electronic device placed in the slot 11, the calibration device can be rotated by a third angle around the positive direction of the Y-coordinate axis of the calibration device to collect rotation data 30 of the second electronic device placed in the slot 11, the calibration device can be rotated by a fourth angle around the negative direction of the Y-coordinate axis of the calibration device to collect rotation data 40 of the second electronic device placed in the slot 11, the calibration device can be rotated by a fifth angle around the positive direction of the Z-coordinate axis of the calibration device to collect rotation data 50 of the second electronic device placed in the slot 11, and the calibration device can be rotated by a sixth angle around the negative direction of the Z-coordinate axis of the calibration device to collect rotation data 60 of the second electronic device placed in the slot 11. The first angle, the second angle, the third angle, the fourth angle, the fifth angle and the sixth angle of the calibration device rotated as described above are the rotation data in the fourth rotation data set, and the rotation data 10, the rotation data 20, the rotation data 30, the rotation data 40, the rotation data 50 and the rotation data 60 collected of the second electronic device placed in the slot 11 are the rotation data in the third rotation data set.
[0057] After the third rotation data set is acquired, the calibration parameters of the first slot may be determined according to the third rotation data set and the fourth rotation data set.
[0058] In an embodiment of the present application, when the second electronic device is placed on the first slot, a third rotation data set of the second electronic device collected during the process of the calibration device rotating according to each rotation data in the fourth rotation data set is obtained, and then the calibration parameters of the first slot can be directly determined based on the third rotation data set and the fourth rotation data set. In this way, the calibration parameters of the first slot are quantitatively calculated, thereby improving the accuracy of determining the calibration parameters of the first slot.
[0059] In some embodiments of the present application, the fourth rotation data set is a rotation data set in a first coordinate system corresponding to the calibration device, and the first coordinate system here may be a coordinate system corresponding to the calibration device.
[0060] The third rotation data set is a rotation data set in a second coordinate system corresponding to the first slot, where the second coordinate system may be a coordinate system corresponding to the first slot.
[0061] In some embodiments of the present application, there may be a certain deviation between the first coordinate system and the second coordinate system, such as Figure 3 As shown, Figure 3 is a schematic diagram of the first coordinate system and the second coordinate system, wherein the O-XYZ coordinate system is the coordinate system of the calibration device, that is, the first coordinate system, OX g Y g Z g The coordinate system is the coordinate system of the first slot, that is, the second coordinate system. Figure 3 Medium θ x ,θ y ,θ z They are O-XYZ coordinate system and OX g Y g Z g Angular error between coordinate systems.
[0062] In order to further improve the accuracy of determining the calibration parameters, determining the calibration parameters of the first slot according to the third rotated data set and the fourth rotated data set may specifically include:
[0063] Performing coordinate transformation on corresponding data in the fourth rotated data set in the first coordinate system and the third rotated data set in the second coordinate system to obtain a transformation matrix between the first coordinate system and the second coordinate system;
[0064] Use the transformation matrix as the calibration parameter.
[0065] In some embodiments of the present application, although Figure 3 We can use θ x ,θ y ,θ z To describe the O-XYZ coordinate system and OX g Y g Z gThe angle error between the coordinate systems is difficult to describe with a mathematical model, so the O-XYZ coordinate system and OX g Y g Z g The transformation matrix between coordinate systems is used to describe the O-XYZ coordinate system and the OX g Y g Z g The angle error between the coordinate systems, that is, the O-XYZ coordinate system and the OX g Y g Z g The transformation matrix between the coordinate systems is used as the calibration parameter of the first slot.
[0066] Since the fourth rotation data set can be used to represent the data in the first coordinate system, and the third rotation data set can be used to represent the data in the second coordinate system, the corresponding data in the fourth rotation data set in the first coordinate system and the third rotation data set in the second coordinate system can be transformed to calculate the transformation matrix between the first coordinate system and the second coordinate system, that is, the calibration parameters of the first slot can be described by the following formula (1):
[0067] TestValue 3×6 =SlotCoef 3×4 TrueValue 4×6 (1)
[0068] In the above formula (1), TestValue 3×6 For the fourth rotation data set, TrueValue 4×6 For the third suspension rotation dataset, SlotCoef 3×4 SlotCoef is the calibration parameter of the first slot. 3×4 It is a matrix with 3 rows and 4 columns.
[0069] It should be noted that TestValue 3×6 is a matrix of 3 rows and 6 columns, where TestValue 3×6 The reason for 3 rows and 6 columns is to collect the rotation data of the calibration device around each coordinate axis in the positive and negative directions. There are 6 data in total. Each data includes X coordinate, Y coordinate and Z coordinate. That is, each rotation data has 3 coordinate values. Therefore, TestValue 3×6 There are 3 rows and 6 columns.
[0070] TrueValue 4×6 is a matrix of 4 rows and 6 columns, where TrueValue 4×6 The reason for 4 rows and 6 columns is that the first 3 rows are related to TestValue 3×6 The same, no further description is given here, TrueValue4×6 The last row is a constant, all 1.
[0071] In the SlotCoef in formula (1) 3×4 When solving, the least square method can be used to solve SlotCoef in formula (1) 3×4 Solve and get formula (2): SlotCoef 3×4 =TestValue 3×6 ·(TestValue 3×6 ) Τ ·(TrueValue 4×6 ·(TrueValue 4×6 ) Τ ) -1 (2)
[0072] In the above formula (2), () Τ is the transpose of the matrix, () -1 is the inverse matrix of the matrix.
[0073] In an embodiment of the present application, by performing coordinate transformation on corresponding data in the fourth rotation data set in the first coordinate system and the third rotation data set in the second coordinate system, a transformation matrix between the first coordinate system and the second coordinate system is obtained, and the transformation matrix is used as a calibration parameter of the first slot. In this way, the calibration parameter of the first slot can be accurately obtained.
[0074] In some embodiments of the present application, in order to further improve the accuracy of determining the calibration parameters of the first slot, before acquiring the third rotation data set of the second electronic device placed in the first slot, the method involved above may further include:
[0075] detecting a calibration state of a gyroscope of a second electronic device;
[0076] The acquiring of the third rotation data set of the second electronic device placed in the first slot may specifically include:
[0077] When it is determined that the calibration state is that the gyroscope of the second electronic device has been calibrated, a third rotation data set of the second electronic device placed in the first slot is acquired.
[0078] The calibration status may be a status used to describe whether the gyroscope of the second electronic device is calibrated.
[0079] In some embodiments of the present application, before obtaining the third rotation data set of the second electronic device placed in the first slot, it is necessary to first ensure that the gyroscope of the second electronic device has been calibrated. If the third rotation data set obtained in this way has an error with the fourth rotation data set, it can be determined that the error is only caused by the first slot. In this way, based on the third rotation data set and the fourth rotation data set, the determined error is the calibration parameter of the first slot.
[0080] In an embodiment of the present application, the third rotation data set of the second electronic device placed in the first slot is obtained only when it is determined that the calibration state is that the gyroscope of the second electronic device has been calibrated. If the third rotation data set thus obtained has an error with the fourth rotation data set, it can be determined that the error is only caused by the first slot, thereby avoiding the influence of the uncalibrated gyroscope of the second electronic device itself on the error of the first slot, thereby improving the accuracy of the calibration parameters of the first slot.
[0081] In some embodiments of the present application, as shown in the above formula (1) and formula (2), the calibration parameter SlotCoef of the first slot is 3×4 It is a matrix with 3 rows and 4 columns. The calibration parameter SlotCoef 3×4 It can be expressed as the following formula (3):
[0082]
[0083] As shown in formula (3), the calibration parameter SlotCoef 3×4 It includes an error parameter set and a residual parameter set. The error parameter set here can be a factor set used to describe the error between the first coordinate system and the second coordinate system, and the residual parameter set can be a factor set used to describe the residual between the first coordinate system and the second coordinate system.
[0084] The error parameter set may be a set consisting of the first three columns of elements in the following formula (3), and the error parameter set may include multiple error parameters, and the multiple error parameters are used to characterize the errors of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system. That is, the elements sc in the first three columns of the first row in formula (3) are xx ,sc yx and sc zx Respectively represent OX g Y g Z g X coordinate system g Axis, Y g Axis and Z g The error parameters of the axes under the X axis of the O-XYZ coordinate system are respectively. Similarly, the elements of the first three columns in the second row of formula (3) represent the error parameters of OX g Y g Zg X coordinate system g Axis, Y g Axis and Z g The error parameters of the axes under the Y axis of the O-XYZ coordinate system are respectively, and the elements of the first three columns in the third row of formula (3) represent the error parameters of OX g Y g Z g X coordinate system g Axis, Y g Axis and Z g The error parameters of the axes under the Z axis of the O-XYZ coordinate system.
[0085] The residual parameter set may be a set of elements in the fourth column of formula (3). The residual parameter set may include multiple residual parameters, and the multiple residual parameters are used to represent the residuals of each coordinate axis in the first coordinate system under each coordinate axis in the second coordinate system. That is, the first element in the fourth column of formula (3) represents OX g Y g Z g X coordinate system g Axis, Y g Axis and Z g The residual parameter of the axis under the X axis of the O-XYZ coordinate system. The second element of the fourth column in formula (3) represents OX g Y g Z g X coordinate system g Axis, Y g Axis and Z g The residual parameter of the axis under the Y axis of the O-XYZ coordinate system. The third element of the fourth column in formula (3) represents OX g Y g Z g X coordinate system g Axis, Y g Axis and Z g The residual parameter of the axis under the Z axis of the O-XYZ coordinate system.
[0086] In order to improve the accuracy of calibrating the gyroscope of the first electronic device, the method of performing slot correction on each rotation data in the first rotation data set based on the calibration parameter to obtain a second rotation data set includes:
[0087] For each rotation data in the first rotation data set, calculate the product of the error parameter set and the rotation data to obtain a first value;
[0088] Calculate the difference between the first value and the residual parameter set to obtain a second value;
[0089] Using the second value as the rotation data after slot correction is performed on the rotation data;
[0090] A second rotation data set is obtained according to the rotation data after slot correction is performed on each rotation data in the first rotation data set.
[0091] The first value may be a value obtained by multiplying the calculated error parameter set and the rotation data.
[0092] The second value may be a value obtained by calculating the difference between the first value and the residual parameter set.
[0093] In some embodiments of the present application, for each rotation data in the first rotation data set, each rotation data can be slot-corrected according to the following formula (4), and then a second rotation data set can be obtained based on the rotation data after the slot correction of each rotation data in the first rotation data set. When slot correction is performed on each rotation data according to formula (4), specifically, the product of the error parameter set and the rotation data is first calculated to obtain a first value, and then the difference between the first value and the residual parameter set is calculated to obtain a second value, and the second value is used as the rotation data after the slot correction of the rotation data.
[0094] CaliData 3×1 =Slot C 3×3 RawData 3×1 -SlotB 3×1 (4)
[0095] Among them, RawData 3×1 is any rotation data in the first rotation data set. The rotation data is the data obtained by rotating around a certain coordinate axis in the positive or negative direction. 3×1 Data with 3 rows and 1 column; CaliData 3×1 For RawData 3×1 The data obtained after slot calibration, i.e., the second value, is data of 3 rows and 1 column; SlotC 3×3 and SlotB 3×1 For calibration parameters, specifically, SlotC 3×3 The first three columns of the calibration parameters, namely the error parameter set, SlotB 3×1 It is the fourth column element of the calibration parameter, that is, the residual parameter set.
[0096] In an embodiment of the present application, for each rotation data in the first rotation data set, slot correction is first performed on each rotation data, and then a second rotation data set can be obtained based on the rotation data after slot correction for each rotation data in the first rotation data set. In this way, slot correction can be performed on each direction of each coordinate axis of the first slot to obtain an accurate second rotation data set, thereby improving the accuracy of gyroscope calibration of the first electronic device.
[0097] Step 230: calibrate the gyroscope of the first electronic device based on the second rotation data set to obtain a calibrated first electronic device.
[0098] In some embodiments of the present application, after slot correction is performed on the first rotation data set, the gyroscope of the first electronic device can be calibrated based on the rotation data set after slot correction, so that the calibrated first electronic device is not affected by the first slot error, and the error of the gyroscope of the calibrated first electronic device is smaller and the anti-shake effect is better.
[0099] It should be noted that the solution of the embodiment of the present application is not limited to the calibration of the gyroscope of the electronic device, but can also be applied to the error calibration of the accelerometer.
[0100] In order to better understand the scheme of the embodiment of the present application, the calibration method of the electronic device provided by the embodiment of the present application is described in detail below with specific examples. The calibration method of the electronic device provided by the embodiment of the present application is divided into two parts. The first part is to determine the calibration parameters of the first slot, and the second part is to calibrate the first electronic device based on the calibration parameters determined in the first part.
[0101] refer to Figure 4 , Figure 4 4 is a flow chart of a method for determining calibration parameters of a first slot. The flow chart of determining calibration parameters of a first slot may include steps 410 to 460.
[0102] Step 410: Set the calibration device to slot calibration mode.
[0103] In step 410, when determining the calibration parameters of the first slot, it is first determined that the calibration device is in a slot calibration mode. The slot calibration mode may be a mode for indicating calibration of the slot of the calibration device.
[0104] Step 420: Place the second electronic device in the first slot of the calibration device.
[0105] In step 420, the gyroscope of the second electronic device is calibrated.
[0106] Step 430: The calibration device rotates according to each rotation data in the fourth rotation data set to collect rotation data of the second electronic device.
[0107] Step 440 , whether the rotation data in the third rotation data set has been collected, if so, execute step 450 , if not, return to execute step 430 .
[0108] In step 430-step 440, the calibration device is rotated according to each rotation data in the fourth rotation data set, and then the rotation data of the second electronic device is collected. It is determined whether the rotation data of the second electronic device is collected during the rotation of the calibration device according to each rotation data in the fourth rotation data set, that is, whether each rotation data in the third rotation data set in the above embodiment is collected. If so, execute step 450, if not, return to step 430 to continue collecting the rotation data of the second electronic device.
[0109] Step 450: Send the third rotation data set to the control center.
[0110] It should be noted that the calibration device may include a control center, and the execution subject of the above steps 430 to 440 may be the second electronic device.
[0111] Step 460: The control center determines the calibration parameters of the first slot according to the third rotation data set and the fourth rotation data set.
[0112] In step 460, after the control center determines the calibration parameters of the first slot, the calibration parameters may be saved in the calibration device.
[0113] refer to Figure 5 , Figure 5 4 is a flow chart of a calibration method for a first electronic device. The calibration method for the first electronic device may include steps 510 to 550.
[0114] Step 510: Start the calibration device.
[0115] Step 520 , determine whether there are calibration parameters for the first slot in the calibration device. If so, execute step 530 ; if not, return to step 510 .
[0116] Step 530: Obtain calibration parameters of the first slot.
[0117] Step 540: Perform slot correction on the first rotated data set of the first electronic device according to the calibration parameters to obtain a second rotated data set.
[0118] Step 550: calibrate the gyroscope of the first electronic device based on the second rotation data set to complete the calibration of the first electronic device.
[0119] The above steps 540 to 550 are consistent with the steps 220 to 230 in the above embodiment and will not be described in detail here.
[0120] The electronic device calibration method provided in the embodiment of the present application may be executed by a calibration device for the electronic device. The electronic device calibration method provided in the embodiment of the present application is described by taking the electronic device calibration device executing the electronic device calibration method as an example.
[0121] Figure 6 FIG. 1 is a schematic diagram showing a structure of a calibration device for an electronic device according to an exemplary embodiment. Figure 6 As shown, the calibration device 600 of the electronic device may include:
[0122] A first acquisition module 610 is used to acquire a first rotation data set of a first electronic device in a first slot of a calibration device and a calibration parameter of the first slot, wherein each rotation data in the first rotation data set is respectively data obtained by rotating the first electronic device in the first slot around a first coordinate axis of the first slot along a first direction, the first coordinate axis is any coordinate axis of each coordinate axis of the first slot, and the first direction is a positive direction or a negative direction;
[0123] A correction module 620, configured to perform slot correction on each rotation data in the first rotation data set based on the calibration parameters to obtain a second rotation data set;
[0124] The calibration module 630 is configured to calibrate the gyroscope of the first electronic device based on the second rotation data set to obtain a calibrated first electronic device.
[0125] In an embodiment of the present application, by obtaining data obtained by rotating the first electronic device in the first slot of the calibration device around the positive and negative directions of a single coordinate axis of the first slot, and the calibration parameters of the first slot, each rotation data in the first rotation data set can be slot-calibrated based on the calibration parameters. After the slot calibration of the first slot, the gyroscope of the first electronic device is calibrated. In this way, compared with the scheme of directly calibrating the gyroscope of the first electronic device in the prior art, the embodiment of the present application first performs slot calibration on the first slot of the calibration device where the first electronic device is placed before calibrating the gyroscope, so as to avoid interference of the slot error of the calibration device with the calibration of the gyroscope of the first electronic device. Through the calibration method of the embodiment of the present application, the calibration accuracy of the gyroscope of the electronic device is improved, the error of the gyroscope is reduced, and the anti-shake effect of the electronic device is improved.
[0126] In some embodiments of the present application, the above-mentioned device may further include:
[0127] a second acquisition module, configured to acquire a third rotation data set of a second electronic device placed in the first slot before performing slot correction on the first rotation data set based on the calibration parameters to obtain a second rotation data set, wherein the third rotation data set is a rotation data set of the second electronic device collected during a process in which the calibration device rotates according to each rotation data in a fourth rotation data set, and each rotation data in the fourth rotation data set is rotation data of the calibration device rotating around a second coordinate axis of the calibration device along a second direction, wherein the second coordinate axis is any coordinate axis of the coordinate axes of the calibration device, and the second direction is a positive direction or a negative direction;
[0128] The first determination module is used to determine the calibration parameters of the first slot according to the third rotation data set and the fourth rotation data set.
[0129] In some embodiments of the present application, the fourth rotation data set is a rotation data set in a first coordinate system corresponding to the calibration device, and the third rotation data set is a rotation data set in a second coordinate system corresponding to the first slot;
[0130] The first determining module is specifically used for:
[0131] performing coordinate transformation on corresponding data in the fourth rotated data set in the first coordinate system and the third rotated data set in the second coordinate system to obtain a transformation matrix between the first coordinate system and the second coordinate system;
[0132] The conversion matrix is used as the calibration parameter.
[0133] In some embodiments of the present application, the calibration parameters include an error parameter set and a residual parameter set, the error parameter set includes multiple error parameters, and the multiple error parameters are respectively used to characterize the errors of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system, and the residual parameter set includes multiple residual parameters, and the multiple residual parameters are respectively used to characterize the residuals of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system;
[0134] The correction module 620 is specifically used for:
[0135] For each rotation data in the first rotation data set, calculate the product of the error parameter set and the rotation data to obtain a first value;
[0136] Calculating a difference between the first value and the residual parameter set to obtain a second value;
[0137] Using the second value as rotation data after slot correction is performed on the rotation data;
[0138] The second rotation data set is obtained according to the rotation data after slot correction is performed on each rotation data in the first rotation data set.
[0139] In some embodiments of the present application, the above-mentioned device may further include:
[0140] a detection module, configured to detect a calibration state of a gyroscope of the second electronic device placed in the first slot before acquiring a third rotation data set of the second electronic device;
[0141] The second acquisition module is specifically used for:
[0142] When it is determined that the calibration state is that the gyroscope of the second electronic device has been calibrated, a third rotation data set of the second electronic device placed in the first slot is acquired.
[0143] The calibration device of the electronic device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmentedreality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobilepersonal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0144] The calibration device of the electronic device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0145] The electronic device calibration device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0146] Alternatively, if Figure 7 As shown, an embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702, wherein the memory 702 stores programs or instructions that can be executed on the processor 701, and when the program or instructions are executed by the processor 701, the various steps of the calibration method embodiment of the above-mentioned electronic device are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0147] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0148] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0149] The electronic device 800 includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810 and other components.
[0150] Those skilled in the art will appreciate that the electronic device 800 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 810 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0151] Among them, the processor 810 is used to obtain a first rotation data set of a first electronic device in a first slot of a calibration device and a calibration parameter of the first slot, wherein each rotation data in the first rotation data set is data obtained by rotating the first electronic device in the first slot around a first coordinate axis of the first slot along a first direction, the first coordinate axis is any coordinate axis among the coordinate axes of the first slot, and the first direction is a positive direction or a negative direction; based on the calibration parameters, each rotation data in the first rotation data set is slot corrected to obtain a second rotation data set; based on the second rotation data set, the gyroscope of the first electronic device is calibrated to obtain a calibrated first electronic device.
[0152] In this way, by obtaining the data obtained by rotating the first electronic device in the first slot of the calibration device around the single coordinate axis of the first slot in the positive and negative directions, and the calibration parameters of the first slot, each rotation data in the first rotation data set can be slot-calibrated based on the calibration parameters. After the slot calibration of the first slot, the gyroscope of the first electronic device is calibrated. In this way, compared with the scheme of directly calibrating the gyroscope of the first electronic device in the prior art, the embodiment of the present application first performs slot calibration on the first slot of the calibration device where the first electronic device is placed before calibrating the gyroscope, so as to avoid interference of the slot error of the calibration device with the calibration of the gyroscope of the first electronic device. Through the calibration method of the embodiment of the present application, the calibration accuracy of the gyroscope of the electronic device is improved, the error of the gyroscope is reduced, and the anti-shake effect of the electronic device is improved.
[0153] Optionally, the processor 810 is further used to obtain a third rotation data set of a second electronic device placed in the first slot before performing slot correction on the first rotation data set based on the calibration parameters to obtain a second rotation data set, the third rotation data set being a rotation data set of the second electronic device collected during the process of the calibration device rotating according to each rotation data in the fourth rotation data set, each rotation data in the fourth rotation data set being rotation data of the calibration device rotating along a second direction around a second coordinate axis of the calibration device, the second coordinate axis being any coordinate axis of the calibration device, and the second direction being a positive direction or a negative direction; the calibration parameters of the first slot are determined based on the third rotation data set and the fourth rotation data set.
[0154] In this way, when the second electronic device is placed on the first slot, the third rotation data set of the second electronic device collected during the rotation of the calibration device according to each rotation data in the fourth rotation data set is obtained, and then the calibration parameters of the first slot can be directly determined based on the third rotation data set and the fourth rotation data set. In this way, the calibration parameters of the first slot are quantitatively calculated, thereby improving the accuracy of determining the calibration parameters of the first slot.
[0155] Optionally, the fourth rotation data set is a rotation data set in a first coordinate system corresponding to the calibration device, and the third rotation data set is a rotation data set in a second coordinate system corresponding to the first slot; the processor 810 is also used to perform coordinate transformation on corresponding data in the fourth rotation data set in the first coordinate system and the third rotation data set in the second coordinate system to obtain a transformation matrix between the first coordinate system and the second coordinate system; and use the transformation matrix as a calibration parameter for the first slot.
[0156] In this way, by performing coordinate transformation on the corresponding data in the fourth rotation data set in the first coordinate system and the third rotation data set in the second coordinate system, the transformation matrix between the first coordinate system and the second coordinate system is obtained, and the transformation matrix is used as the calibration parameter of the first slot. In this way, the calibration parameter of the first slot can be accurately obtained.
[0157] Optionally, the calibration parameters include an error parameter set and a residual parameter set, the error parameter set includes multiple error parameters, and the multiple error parameters are respectively used to characterize the errors of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system, and the residual parameter set includes multiple residual parameters, and the multiple residual parameters are respectively used to characterize the residuals of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system; the processor 810 is also used to calculate the product of the error parameter set and the rotation data for each rotation data in the first rotation data set to obtain a first value; calculate the difference between the first value and the residual parameter set to obtain a second value; use the second value as the rotation data after slot correction of the rotation data; and obtain the second rotation data set based on the rotation data after slot correction of each rotation data in the first rotation data set.
[0158] In this way, for each rotation data in the first rotation data set, slot correction is first performed on each rotation data, and then a second rotation data set can be obtained based on the rotation data after slot correction for each rotation data in the first rotation data set. In this way, slot correction can be performed on each direction of each coordinate axis of the first slot to obtain an accurate second rotation data set, thereby improving the accuracy of the gyroscope calibration of the first electronic device.
[0159] Optionally, the processor 810 is further used to detect a calibration status of a gyroscope of the second electronic device placed in the first slot before obtaining a third rotation data set of the second electronic device placed in the first slot; and when it is determined that the calibration status is that the gyroscope of the second electronic device has been calibrated, obtain the third rotation data set of the second electronic device placed in the first slot.
[0160] In this way, the third rotation data set of the second electronic device placed in the first slot is obtained only when it is determined that the calibration state is that the gyroscope of the second electronic device has been calibrated. If the third rotation data set obtained in this way has an error with the fourth rotation data set, it can be determined that the error is only caused by the first slot, thereby avoiding the influence of the uncalibrated gyroscope of the second electronic device itself on the error of the first slot, thereby improving the accuracy of the calibration parameters of the first slot.
[0161] It should be understood that in the embodiment of the present application, the input unit 804 may include a graphics processor (Graphics Processing Unit, GPU) 8041 and a microphone 8042, and the graphics processor 8041 processes the image data of the static picture or video obtained by the image capture device (such as a color camera) in the video capture mode or the image capture mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0162] The memory 809 can be used to store software programs and various data. The memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 809 may include a volatile memory or a non-volatile memory, or the memory 809 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 809 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0163] The processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 810.
[0164] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the calibration method embodiment of the above-mentioned electronic device are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0165] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0166] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned electronic device calibration method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0167] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0168] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the calibration method embodiment of the electronic device as described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0169] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0171] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A calibration method for an electronic device, characterized in that: The method comprises: Acquire a first rotation data set of a first electronic device in a first slot of a calibration device and a calibration parameter of the first slot, wherein each rotation data in the first rotation data set is data obtained by rotating the first electronic device in the first slot around a first coordinate axis of the first slot along a first direction, the first coordinate axis is any coordinate axis among the coordinate axes of the first slot, and the first direction is a positive direction or a negative direction; Performing slot correction on each rotation data in the first rotation data set based on the calibration parameters to obtain a second rotation data set; Based on the second rotation data set, the gyroscope of the first electronic device is calibrated to obtain a calibrated first electronic device.
2. The method according to claim 1, characterized in that Before performing slot correction on the first rotated data set based on the calibration parameters to obtain the second rotated data set, the method further includes: Acquire a third rotation data set of the second electronic device placed in the first slot, the third rotation data set being a rotation data set of the second electronic device collected during a rotation process of the calibration device according to each rotation data in a fourth rotation data set, each rotation data in the fourth rotation data set being rotation data of the calibration device rotating around a second coordinate axis of the calibration device along a second direction, the second coordinate axis being any coordinate axis of the calibration device, and the second direction being a positive direction or a negative direction; A calibration parameter of the first slot is determined according to the third rotated data set and the fourth rotated data set.
3. The method according to claim 2, characterized in that The fourth rotation data set is a rotation data set in the first coordinate system corresponding to the calibration device, and the third rotation data set is a rotation data set in the second coordinate system corresponding to the first slot; The step of determining the calibration parameters of the first slot according to the third rotation data set and the fourth rotation data set includes: performing coordinate transformation on corresponding data in the fourth rotated data set in the first coordinate system and the third rotated data set in the second coordinate system to obtain a transformation matrix between the first coordinate system and the second coordinate system; The conversion matrix is used as the calibration parameter.
4. The method according to claim 3, characterized in that The calibration parameters include an error parameter set and a residual parameter set, the error parameter set includes a plurality of error parameters, and the plurality of error parameters are respectively used to characterize the errors of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system, and the residual parameter set includes a plurality of residual parameters, and the plurality of residual parameters are respectively used to characterize the residuals of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system; The step of performing slot correction on each rotation data in the first rotation data set based on the calibration parameters to obtain a second rotation data set includes: For each rotation data in the first rotation data set, calculate the product of the error parameter set and the rotation data to obtain a first value; Calculating a difference between the first value and the residual parameter set to obtain a second value; Using the second value as rotation data after slot correction is performed on the rotation data; The second rotation data set is obtained according to the rotation data after slot correction is performed on each rotation data in the first rotation data set.
5. The method according to claim 2, characterized in that: Before acquiring a third rotation data set of the second electronic device placed in the first slot, the method further includes: detecting a calibration state of a gyroscope of the second electronic device; The step of acquiring a third rotation data set of the second electronic device placed in the first slot includes: When it is determined that the calibration state is that the gyroscope of the second electronic device has been calibrated, a third rotation data set of the second electronic device placed in the first slot is acquired.
6. A calibration device for an electronic device, characterized in that: The device comprises: A first acquisition module is used to acquire a first rotation data set of a first electronic device in a first slot of a calibration device and a calibration parameter of the first slot, wherein each rotation data in the first rotation data set is respectively data obtained by rotating the first electronic device in the first slot around a first coordinate axis of the first slot along a first direction, the first coordinate axis is any coordinate axis of the first slot, and the first direction is a positive direction or a negative direction; a correction module, configured to perform slot correction on each rotation data in the first rotation data set based on the correction parameters to obtain a second rotation data set; The calibration module is used to calibrate the gyroscope of the first electronic device based on the second rotation data set to obtain a calibrated first electronic device.
7. The device according to claim 6, characterized in that The device also includes: a second acquisition module, configured to acquire a third rotation data set of a second electronic device placed in the first slot before performing slot correction on the first rotation data set based on the calibration parameters to obtain a second rotation data set, wherein the third rotation data set is a rotation data set of the second electronic device collected during a process in which the calibration device rotates according to each rotation data in a fourth rotation data set, and each rotation data in the fourth rotation data set is rotation data of the calibration device rotating around a second coordinate axis of the calibration device along a second direction, wherein the second coordinate axis is any coordinate axis of the coordinate axes of the calibration device, and the second direction is a positive direction or a negative direction; The first determination module is used to determine the calibration parameters of the first slot according to the third rotation data set and the fourth rotation data set.
8. The device according to claim 7, characterized in that The fourth rotation data set is a rotation data set in the first coordinate system corresponding to the calibration device, and the third rotation data set is a rotation data set in the second coordinate system corresponding to the first slot; The first determining module is specifically used for: performing coordinate transformation on corresponding data in the fourth rotated data set in the first coordinate system and the third rotated data set in the second coordinate system to obtain a transformation matrix between the first coordinate system and the second coordinate system; The conversion matrix is used as the calibration parameter.
9. The device according to claim 8, characterized in that The calibration parameters include an error parameter set and a residual parameter set, the error parameter set includes a plurality of error parameters, and the plurality of error parameters are respectively used to characterize the errors of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system, and the residual parameter set includes a plurality of residual parameters, and the plurality of residual parameters are respectively used to characterize the residuals of each coordinate axis in the second coordinate system under each coordinate axis in the first coordinate system; The correction module is specifically used for: For each rotation data in the first rotation data set, calculate the product of the error parameter set and the rotation data to obtain a first value; Calculating a difference between the first value and the residual parameter set to obtain a second value; Using the second value as rotation data after slot correction is performed on the rotation data; The second rotation data set is obtained according to the rotation data after slot correction is performed on each rotation data in the first rotation data set.
10. The device according to claim 7, characterized in that The device also includes: a detection module, configured to detect a calibration state of a gyroscope of the second electronic device placed in the first slot before acquiring a third rotation data set of the second electronic device; The second acquisition module is specifically used for: When it is determined that the calibration state is that the gyroscope of the second electronic device has been calibrated, a third rotation data set of the second electronic device placed in the first slot is acquired.
11. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the calibration method of the electronic device as described in any one of claims 1 to 5 are implemented.