WO2019134305A1 - Method and apparatus for determining pose, smart device, storage medium, and program product - Google Patents

Method and apparatus for determining pose, smart device, storage medium, and program product Download PDF

Info

Publication number
WO2019134305A1
WO2019134305A1 PCT/CN2018/084233 CN2018084233W WO2019134305A1 WO 2019134305 A1 WO2019134305 A1 WO 2019134305A1 CN 2018084233 W CN2018084233 W CN 2018084233W WO 2019134305 A1 WO2019134305 A1 WO 2019134305A1
Authority
WO
WIPO (PCT)
Prior art keywords
posture
magnetic force
force vector
smart device
gesture
Prior art date
Application number
PCT/CN2018/084233
Other languages
French (fr)
Chinese (zh)
Inventor
杨宇
王冉冉
Original Assignee
青岛海信电器股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 青岛海信电器股份有限公司 filed Critical 青岛海信电器股份有限公司
Publication of WO2019134305A1 publication Critical patent/WO2019134305A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality

Definitions

  • the present application relates to the field of pose tracking technology, and in particular, to a method, device, smart device, storage medium and program product for determining a posture.
  • Embodiments of the present application provide a method, an apparatus, a smart device, a storage medium, and a program product for determining a gesture.
  • a method of determining a pose is provided, the method comprising:
  • the posture of the smart device determines a first posture
  • the gesture mapping table is used to indicate a magnetic force vector and a posture Correspondence between
  • the current posture of the smart device is determined based on the first posture and the second posture.
  • an apparatus for determining a pose comprising:
  • a first acquiring module configured to acquire, when the motion data collected by the inertial measurement unit IMU in the smart device is received at the current sampling moment, the posture of the smart device determined last time before the current sampling moment;
  • a first determining module configured to determine a first posture based on the motion data and the posture of the smart device that is last determined
  • a second acquiring module configured to acquire a first magnetic force vector collected by a magnetic sensor in the smart device
  • a first searching module configured to search, according to the first magnetic force vector, a second posture from a stored attitude mapping table, where the gesture mapping table is used to indicate a correspondence between a magnetic force vector and a posture;
  • a second determining module configured to determine a current posture of the smart device based on the first posture and the second posture when the second posture is found.
  • the third aspect provides a virtual reality VR device, where the VR device includes:
  • a magnetic sensor for acquiring a magnetic force vector
  • a memory for storing the processor executable instructions
  • the processor is configured as the steps of any of the methods described in the above first aspect.
  • a computer readable storage medium having stored thereon instructions that, when executed by a processor, implement the steps of any of the methods of the first aspect described above.
  • a computer program product which, when run on a computer, causes the computer to perform any of the methods described above in the first aspect.
  • Figure 1A is a schematic view showing a roll angle, a pitch angle, and a yaw angle
  • FIG. 1B is a flowchart of a method for determining a posture according to an embodiment of the present application
  • FIG. 2 is a flowchart of another method for determining a posture provided by an embodiment of the present application.
  • 3A is a schematic structural diagram of an apparatus for determining a posture according to an embodiment of the present application.
  • FIG. 3B is a schematic structural diagram of an apparatus for determining a posture according to an embodiment of the present application.
  • 3C is a schematic structural diagram of a first searching module according to an embodiment of the present application.
  • 3D is a schematic structural diagram of a second determining module provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a smart device for determining a posture provided by an embodiment of the present application.
  • the smart device can determine the current posture of the smart device according to the actions that the user makes with the user. For example, the user can wear a VR head-mounted display and drive the VR head-mounted display together by rotating the head. At this time, the VR head-mounted display can determine its current posture, that is, the VR headset The display can determine its current roll angle, pitch angle, and yaw angle relative to the standard coordinate system, and characterize its current pose by roll angle, pitch angle, and yaw angle. As another example, a user can hold a smartphone and rotate the smartphone in different directions and planes.
  • the smartphone can respond accordingly by determining its own posture and according to the determined posture.
  • the method for determining the posture provided in the embodiment of the present application may be applied to the foregoing scenario, and when the smart device such as a VR device, an AR device, or a smart phone moves along with the user action, determining the posture according to the embodiment of the present application. The method determines its current posture and provides data support for the next step of response.
  • an IMU Inertial Measurement Unit
  • a magnetic sensor disposed in the smart device, wherein the IMU generally includes a gyroscope and an accelerometer, and the smart device can calculate the first by integrating the angular velocity measured by the gyroscope. Roll angle, first pitch angle and first yaw angle. Afterwards, the smart device can correct the first roll angle and the first pitch angle according to the acceleration measured by the accelerometer, and calculate the second yaw angle according to the magnetic data measured by the magnetic sensor, and the first yaw angle by the second yaw angle The yaw angle is corrected, and the corrected roll angle, pitch angle, and yaw angle can be used to characterize the current posture of the smart device.
  • the IMU Inertial Measurement Unit
  • the smart device can calculate the first by integrating the angular velocity measured by the gyroscope. Roll angle, first pitch angle and first yaw angle.
  • the smart device can correct the first roll angle and the first pitch angle according to
  • FIG. 1A is a schematic view of a roll angle, a pitch angle, and a yaw angle.
  • the coordinate system is established by the smart device, with the center of mass of the smart device as the origin, the X axis is perpendicular to the front of the smart device and points to the direction of the front of the smart device, and the Y axis is perpendicular to the X axis to point to the smart device.
  • the Z axis is perpendicular to the X and Y axes and points to the top of the smart device.
  • the angle of rotation is the roll angle.
  • the angle of rotation is the pitch angle
  • the angle of rotation is the yaw angle.
  • FIG. 1B is a flowchart of a method for determining a posture according to an embodiment of the present application.
  • the method can be applied to an intelligent device, where the IMU and the magnetic sensor are configured, and the smart device can be a smart device such as a smart phone, a tablet computer, a VR device, or an AR device.
  • the method includes the following steps:
  • Step 101 When receiving the motion data collected by the IMU in the smart device at the current sampling moment, acquiring the posture of the smart device determined last time before the current sampling moment, and determining the motion device based on the motion data and the posture of the smart device determined last time. The first gesture.
  • the IMU can collect data according to the preset duration, and the time at which the data is collected is the sampling moment. After the IMU collects the motion data at each sampling time, the IMU can send the data to the smart device. Additionally, the IMU can include a gyroscope and an accelerometer, based on which the data acquired by the IMU can include angular velocity data acquired by the gyroscope, which can include angular velocity components of the smart device on three axes of the world coordinate system. In addition, the data collected by the IMU may also include gravity data acquired by the accelerometer.
  • Step 102 Acquire a first magnetic force vector acquired by a magnetic sensor in the smart device, and search for a second posture from the stored attitude mapping table based on the first magnetic force vector.
  • the gesture mapping table is used to indicate a correspondence between the magnetic force vector and the posture, or to indicate a correspondence between the magnetic force vector, the posture, and the score. That is to say, the gesture map can store multiple records, and each record is a correspondence between a set of magnetic vectors and gestures, or each record is a set of magnetic vectors, poses and scores. Correspondence between them.
  • the magnetic sensor can also perform data acquisition according to the preset duration, that is, the magnetic sensor and the IMU synchronize data acquisition.
  • the sampling period of the data collected by the magnetic sensor may be other integer multiples of the preset duration, that is, the sampling period of the data collected by the magnetic sensor is greater than the sampling period of the IMU, and the moment when the magnetic sensor performs data collection is also the IMU. Sampling moment.
  • the sampling period of the data collected by the magnetic sensor is greater than the sampling period of the IMU, and the sampling timing is not synchronized.
  • the magnetic sensor collects the readings on the three coordinate axes of the world coordinate system when collecting data, that is, the magnetic component on each axis in the world coordinate system, and the smart device can The first magnetic force vector is obtained from the three components.
  • Step 103 Determine the current posture of the smart device based on the first posture and the second posture when the second posture is found.
  • the first posture may be corrected according to the second posture, thereby obtaining the current posture of the smart device. If the first posture and the second posture are the same, the first posture may be determined as the current posture of the smart device.
  • the posture of the smart device determines a first posture, acquires a first magnetic force vector collected by the magnetic sensor in the smart device, and searches for a second posture from the stored posture mapping table based on the first magnetic force vector, and when the second posture is found, A current posture of the smart device is determined based on the first posture and the second posture.
  • the embodiment of the present application does not directly calculate the yaw angle of the posture according to the first magnetic force vector, but uses the first magnetic force vector according to the indication in the stored posture mapping table.
  • the correspondence between the magnetic force vector and the posture determines the second posture.
  • the first magnetic force vector is directly used to calculate the yaw angle of the attitude, since the first magnetic force vector directly participates in the operation, the requirement of the magnetic field environment that affects the accuracy of the first magnetic vector is very strict, and in the embodiment of the present application, Determining the second posture according to the stored attitude map by using the first magnetic force vector, the first magnetic vector does not need to directly participate in the operation to obtain the second posture, and therefore, compared to directly calculating the yaw angle by using the first magnetic vector, The requirements of the surrounding magnetic field are more relaxed and applicable to a wider range of applications.
  • FIG. 2 is a flowchart of another method for determining a gesture provided by an embodiment of the present application.
  • the method can be applied to an intelligent device, where the IMU and the magnetic sensor are configured, and the smart device can be a smart device such as a smart phone, a tablet computer, a VR device, or an AR device.
  • the method includes the following steps:
  • Step 201 When receiving the motion data collected by the IMU in the smart device at the current sampling moment, acquiring the posture of the smart device determined last time before the current sampling moment, and determining the motion device based on the motion data and the posture of the smart device determined last time. The first gesture.
  • the IMU can collect three angular velocities, and the smart device can integrate the three angular velocities according to the three angular velocities and the sampling period of the IMU to determine the smart device from the last sampling moment to the current sampling moment.
  • the amount of change in posture Thereafter, the smart device may acquire the posture of the smart device that was last determined before the current sampling time, and determine the first posture according to the determined posture change amount and the posture of the smart device determined last time.
  • the posture of the smart device determined last time before the current sampling moment may be the current sampling.
  • the attitude of the smart device determined at the last sampling moment of the moment if the smart device only receives the data collected by the IMU at the last sampling time, but does not receive the data collected by the magnetic sensor, the posture of the smart device determined at the last sampling moment may be based on the previous one.
  • the posture calculated by the data collected by the IMU received at the sampling time may also be the posture determined according to the data collected by the IMU received at the last sampling time and the magnetic data collected last time before the last sampling time.
  • the posture of the smart device determined at the last sampling moment may be the data collected by the received IMU and the magnetic sensor at the last sampling time.
  • the acquired data determines the resulting pose.
  • the posture of the smart device may be represented by a quaternion, and in this case, the amount of posture change may also be represented by a quaternion.
  • the amount of change in posture is dQ
  • dQ [x, y, z, w].
  • the smart device can calculate from x, y, z, and w by the following formulas (1)-(4).
  • ⁇ x , ⁇ y and ⁇ z are components of the angular velocity on three axes, respectively, and dt is the time interval between the current sampling instant and the last sampling instant.
  • the gesture can be represented not only by the quaternion but also by the Euler angle or the matrix.
  • the quaternion is taken as an example.
  • the attitude is expressed by the Euler angle or the matrix form
  • the principle of determining the amount of posture change is constant, and the amount of posture change is determined by integrating the angular velocity, and the specific implementation manner can be based on the reference.
  • the mathematical algorithms in different forms are performed, and the embodiments of the present application will not be described again.
  • the smart device may calculate the first posture by the following formula (5):
  • Q is the first posture
  • Q 1 is the posture of the smart device that was last determined before the current sampling time
  • dQ is the posture change amount of the smart device between the last sampling time and the current sampling time determined by the foregoing formula.
  • Step 202 Acquire a first magnetic force vector acquired by a magnetic sensor in the smart device.
  • the smart device can acquire the first magnetic force vector acquired by the magnetic sensor in the smart device.
  • the sampling period of the magnetic sensor may be greater than the sampling period of the IMU, and may also be the same as the sampling period of the IMU. If the sampling period of the magnetic sensor is the same as the sampling period of the IMU, the data collected by the magnetic sensor can also be received while receiving the data collected by the IMU at the current sampling time. If the sampling period of the magnetic sensor is greater than the sampling period of the IMU, then there will be two cases. In the first case, the sampling period of the magnetic sensor is an integer multiple of the sampling period of the IMU, and the sampling moment of the magnetic sensor is also the sampling moment of the IMU, so that at the current sampling moment, the smart device may receive the first collection of the magnetic sensor.
  • the magnetic vector may also not receive the first magnetic vector acquired by the magnetic sensor.
  • the second case is that the sampling period of the magnetic sensor and the sampling period of the IMU are not integer multiples, and the sampling moment of the magnetic sensor is not necessarily the sampling moment of the IMU, so that the smart device is also likely to receive at the current sampling moment. It is also possible that the first magnetic vector acquired by the magnetic sensor does not receive the first magnetic vector acquired by the magnetic sensor.
  • the smart device when the smart device acquires the first magnetic force vector acquired by the magnetic sensor, it may first determine whether the magnetic force vector collected by the magnetic sensor is received at the current sampling time, if the magnetic sensor is received at the current sampling time. The magnetic vector, then, the smart device can determine the received magnetic vector as the first magnetic vector. If the magnetic force vector acquired by the magnetic sensor is not received at the current sampling time, the smart device can acquire the magnetic force vector acquired last time before the current sampling time, and use the acquired magnetic force vector as the first magnetic force vector.
  • the magnetic sensor collects data, it is the magnetic component on the three axes acquired, and according to the three magnetic components, the first magnetic vector can be obtained.
  • the smart device can automatically calibrate the magnetic sensor.
  • the method for automatically calibrating the magnetic sensor by the smart device may be calibrated according to the point cloud image of the magnetic sensor and the sampled data point in the related art, and the embodiment of the present application is no longer used herein. Narration.
  • Step 203 Find a second magnetic force vector similar to the first magnetic force vector from the stored attitude mapping table.
  • the gesture mapping table may be stored in the smart device, and the gesture mapping table may include at least one record or may not have any records. When multiple records are included, each record may include a magnetic force vector corresponding to the magnetic vector.
  • the posture, or, each record may include a magnetic force vector, a posture corresponding to the magnetic force vector, and a score.
  • the smart device may look up a second magnetic force vector similar to the first magnetic force vector from the stored attitude mapping table.
  • the smart device may determine that the second magnetic force vector similar to the first magnetic force vector is not found.
  • the smart device may acquire the magnetic force vector in the record A, and compare the acquired magnetic force vector with the first magnetic vector. It is determined whether the acquired magnetic force vector is similar to the first magnetic force vector.
  • each magnetic force vector is composed of three magnetic components, and based on mathematical common knowledge, the closer the two vectors are, the smaller the angle between the two vectors is. Therefore, when calculating two When the magnetic vectors are similar, the smart device can calculate the angle between the two magnetic vectors. When the angle between the acquired magnetic force vector and the first magnetic force vector is less than or equal to the preset angle, the smart device can determine that the acquired magnetic force vector is similar to the first magnetic force vector; otherwise, the acquired magnetic vector can be determined A magnetic vector is not similar.
  • the smart device calculates the angle between the two magnetic vectors, reference may be made to the related art, which is not repeatedly described in this embodiment of the present application.
  • the preset angle is a maximum angle that can be considered to be close to the two vectors, which is preset after considering the error.
  • the preset angle may be a value of 5 degrees, 3 degrees, etc., which is not specifically limited in this embodiment of the present application.
  • the acquired magnetic vector may be used as the second magnetic vector, that is, the smart device may determine that the second magnetic vector is found in the gesture mapping table. Otherwise, the smart device can continue to compare whether the magnetic force vector in the other records in the attitude mapping table is similar to the first magnetic force vector until all the records in the attitude mapping table are compared, if the first magnetic vector is still not found. A similar second magnetic force vector, then the smart device can determine that a second magnetic force vector similar to the first magnetic force vector is not found.
  • step 204 may be performed, and if the smart device finds the second magnetic force vector, steps 205-207 may be performed.
  • Step 204 When the second magnetic force vector is not found, the first magnetic force vector, the first posture, and the first preset score are correspondingly stored in the gesture mapping table, and the first posture is determined as the current posture of the smart device.
  • the second magnetic force vector may not be found to include two cases.
  • the record does not include any record, and naturally does not include the second magnetic vector similar to the first magnetic vector.
  • This situation usually occurs when the smart device has not loaded or recorded any data at the first moment after the restart, or it may be that the smart device first starts adding records in the gesture mapping table at the time of initialization.
  • the smart device may re-establish each record in the gesture mapping table every time it is restarted, or may complete the establishment of multiple records in the gesture mapping table only during initialization. Then, when the smart device is powered off, the gesture mapping table is stored, and when the smart device is restarted, only the stored gesture mapping table can be retrieved.
  • the stored attitude map includes at least one record, but none of the magnetic vectors in the record is similar to the first magnetic vector.
  • the gesture map is not yet included. Recording of the first magnetic vector.
  • the smart device can establish the first magnetic force vector.
  • the record that is, the first magnetic force vector and the first posture calculated according to the motion data collected by the IMU are stored in the gesture mapping table.
  • the gesture mapping table may further be used to indicate a correspondence between a magnetic force vector, a posture, and a score.
  • the smart device may set the first magnetic force vector, the first posture, and the first The preset score correspondingly is stored in the gesture mapping table.
  • the score in the record is used to indicate the reliability of the record. Specifically, it is used to indicate the reliability of the magnetic vector and the corresponding pose in the record. The higher the score, the higher the reliability of the record.
  • the record sets an initial score, that is, a first preset score, which is the initial reliability of the newly created record, and the subsequent smart device can continuously update the score in the record, and The reliability of the record is further judged with the extension of time based on the updated score.
  • the first preset score may be an arbitrary value, for example, it may be 10 points, because the first preset score is equivalent to an initial reference. Further, if the upper and lower limits of the scores allowed in the gesture mapping table are set in the smart device, the first preset score may be an intermediate value of the upper and lower limits. For example, the upper limit value of the score in the gesture mapping table is 100 points, and the lower limit value is 0 minutes. Then, the first preset score may be 50 minutes.
  • the above is only the value of several exemplary first preset scores given in the embodiment of the present application, and the first preset score may have other possibilities, and the embodiment of the present application does not do this. Specifically limited.
  • the gesture mapping table for indicating the correspondence between the magnetic force vector, the posture, and the score may include a preset number of records, that is, the number of records included in the gesture mapping table may exist.
  • the upper limit value for example, can set the upper limit value of the number of records allowed in the gesture mapping table to 1000.
  • the smart device may update the new record by updating or deleting the existing record in the gesture mapping table. Added to the pose map.
  • the smart device adds the first magnetic force vector, the first posture, and the first preset score to the gesture mapping table, which is equivalent to The first record in the gesture mapping table is established.
  • the smart device may repeatedly perform the above steps 201-204 multiple times, thereby establishing more in the gesture mapping table. Records to get a pose map containing multiple records.
  • the deviation of the first posture is mainly caused by the integration of the angular velocity, and the error is gradually accumulated over time, and in the process of initially adding the recording, due to the time of the process Relatively short, therefore, the error accumulation is relatively small, and the reliability of the multiple records added to the attitude map in this period of time is also high, or, in other words, before the cumulative deviation occurs, the pose map Multiple records in the middle have been created.
  • the smart device can directly determine the first pose as the current pose of the smart device.
  • Step 205 When the second magnetic force vector is found, the second posture is searched from the stored attitude mapping table based on the first magnetic force vector.
  • the smart device determines the current pose when the second magnetic force vector is not found is described in step 204.
  • the smart device may acquire the posture corresponding to the second magnetic force vector from the stored attitude mapping table to obtain the third posture; when the first posture and the third posture
  • the score corresponding to the third gesture is updated to the first score, and the third gesture is used as the second gesture, and the first score is corresponding to the third gesture.
  • the score of the score is increased by the second preset score; when the similarity between the first pose and the third pose is not greater than the preset similarity, the score corresponding to the third pose is updated to the second score; When the second score is greater than 0, the third gesture is used as the second gesture, and when the second score is not greater than 0, it is determined that the second gesture is not found, wherein the second score is corresponding to the third gesture. The score is reduced by the second preset score.
  • the smart device may further determine whether the first posture and the third posture are similar, thereby determining whether the third posture can be used as the second The gesture, if the third gesture can be used as the second gesture, it can be considered that the second gesture is found, otherwise, it is considered that the second gesture is not found.
  • the smart device may calculate an angle between the quaternion representing the first pose and the quaternary representing the third pose, thereby characterizing the relationship between the first pose and the third pose by the magnitude of the angle Similarity.
  • the smart device can calculate the angle between the two poses by the following formula (6).
  • is the angle between the first posture and the third posture.
  • the smart device may determine whether the angle is less than a preset angle, and when the angle is less than the preset angle, the smart device may determine the first posture and The similarity between the third postures is greater than the preset similarity, otherwise, it may be determined that the similarity between the first posture and the third posture is not greater than the preset similarity.
  • the smart device may update the score corresponding to the third gesture to a first score, that is, increase the score corresponding to the third gesture by a second preset score. In order to indicate the increase in the reliability of the record.
  • the smart device can use the third gesture as the second gesture, and at this time, the smart device can determine that the second gesture is found.
  • the smart device may update the score corresponding to the third gesture to a second score, that is, reduce the score corresponding to the third gesture to the second preset.
  • a score is used to indicate that the reliability of the record is declining.
  • the smart device may further determine whether the score of the record is greater than the score. The lower limit value of the value is used to determine whether the third posture included in the record is used as the second posture to correct the first posture.
  • the lower limit value of the score may be 0, and the smart device may determine whether the second score corresponding to the third gesture is greater than 0, and when the second score is greater than 0, the third value may be The gesture is the second gesture, that is, the smart device can determine that the second gesture is found.
  • the second score is not greater than 0, it indicates that the third gesture cannot be the second gesture, that is, the smart device can determine that the second gesture is not found. That is, if the second score is greater than 0, then the third pose can be considered still available. If the second score is not greater than 0, then the reliability of the record is considered to be too low, and the third gesture is no longer available. At this time, it indicates that the third gesture cannot be used as the second gesture, that is, intelligence.
  • the device did not find the second pose in the pose mapping table. At the same time, since the reliability of the record is too low, the score is already lower than the lower limit, and the third pose is no longer available. Therefore, the smart device can set the second magnetic vector, the third pose, and the corresponding score.
  • the strip record is deleted from the gesture mapping table, and the first magnetic force vector, the first posture and the first preset score are stored in the gesture mapping table, or the smart device can directly use the first magnetic force vector and the first posture.
  • the record including the second magnetic force vector, the third posture, and the corresponding score in the gesture mapping table is updated with the first preset score.
  • the second preset score may be a value smaller than the first preset score.
  • the second preset score may be 1 point, that is, the score in the gesture mapping table is updated once. That is, increase or decrease by 1 point.
  • the sampling period of the IMU data is short, that is, the interval between each adjacent two sampling moments is relatively short, based on which, if the second preset score is set to be larger, the first pre- Let the score be set relatively small with respect to the upper limit of the score. Then, when the score in a record is continuously decreased at consecutive multiple sampling times, the score in the record is in a very short time. The value will be reduced to the lower limit of the score.
  • the second preset score can also be set based on comprehensively considering the first preset score, the upper limit of the score, and the lower limit of the score.
  • the smart device may further update according to the degree of similarity between the third gesture and the first gesture.
  • the smart device since the third posture and the first posture are similarly determined by calculating an angle between the two postures, the smart device can further divide the two postures according to the angle between the two postures.
  • the degree of similarity when the two poses are similar, the higher the degree of similarity, the more the score corresponding to the third pose increases, that is, the second preset score is larger, the degree of similarity is lower. The less the score corresponding to the third gesture is increased, that is, the second preset score is smaller.
  • the score corresponding to the third pose is reduced, that is, the second preset score is larger.
  • the lower the degree of dissimilarity the less the score corresponding to the third gesture is reduced, that is, the second preset score is smaller.
  • the smart device may divide the angular range between 0 degrees and the preset angle into multiple intervals, each interval corresponding to a similarity degree and a score, and the closer to the 0 degree interval, the higher the similarity degree.
  • the corresponding score is larger. For example, if the preset angle is ⁇ , the smart device can divide [0, ⁇ ] into three intervals, respectively with among them, The corresponding degree of similarity is the highest, and the corresponding score is also the largest, assuming 3 points. Corresponding similarity is lower than Corresponding degree of similarity, the corresponding score is also greater than Corresponding to the score, it can be 2 points. The corresponding similarity is the lowest, and the corresponding score is also the smallest, which can be 1 point.
  • step 206 may be performed; otherwise, step 207 may be performed.
  • Step 206 When the second posture is found, determining the current posture of the smart device based on the first posture and the second posture.
  • the smart device may correct the first gesture by using the second gesture to determine the current posture of the smart device.
  • the smart device may obtain the second weight corresponding to the second posture, and determine the first weight based on the second weight, after which the smart device may determine the smart device based on the first posture, the first weight, the second posture, and the second weight. Current posture.
  • the second gesture is actually a gesture acquired from the stored gesture mapping table according to the first magnetic force vector, and for the gesture acquired from the gesture mapping table, the smart device may uniformly set a fixed weight to indicate The magnitude of the effect of the second gesture in the process of correcting the first pose, this fixed weight is also the second weight, in other words, the second weight may be the preset weight.
  • the smart device may also determine the second weight according to the score corresponding to the second gesture.
  • the second gesture is actually a third gesture corresponding to the second magnetic force vector obtained from the stored gesture mapping table, and the smart device may determine the second weight according to the score corresponding to the third gesture.
  • the higher the corresponding score the higher the reliability of the record, that is, the higher the reliability of the second gesture.
  • the second weight can be set correspondingly, that is, The greater the effect of the second pose in correcting the first pose. In this way, the smart device can determine the second weight corresponding to the second posture according to the reliability of the second posture.
  • the second weight is set relatively larger, so that the first posture is corrected according to the second posture.
  • the more accurate the current posture of the obtained smart device is the second weight is correspondingly reduced when the reliability of the second posture is low, and the influence of the second posture in the process of correcting the first posture can be reduced, thereby effectively avoiding Large deviations appear.
  • the smart device may determine the second weight in real time by other means, for example, the smart device may be based on The magnitude of the angular velocity collected by the IMU is used to determine the speed of the movement of the smart device. When the motion is slower, the deviation of the first posture calculated by the smart device is smaller. At this time, the weight of the second posture for correcting the first posture is Can be set relatively small.
  • the smart device can determine the first weight based on the second weight.
  • the smart device may determine the current posture of the smart device in the following two manners.
  • the smart device may calculate the current posture of the smart device by using the following formulas (7) and (8) based on the first posture, the first weight, the second posture, and the second weight;
  • Slerp(Q,q,gain) is the current posture of the smart device
  • Q is the first posture
  • q is the second posture
  • gain is the second weight
  • (1-gain) is the first weight
  • sin( ⁇ ) is The sine function
  • cos( ⁇ ) is a cosine function.
  • the second mode the smart device may calculate the current posture of the smart device by using the following formula (9) based on the first posture, the first weight, the second posture, and the second weight;
  • Lerp(Q, q, gain) is the current posture of the smart device
  • Q is the first posture
  • q is the second posture
  • gain is the second weight
  • (1-gain) is the first weight
  • Step 207 When the second posture is not found, the first posture is determined as the current posture of the smart device.
  • the second gesture is not found in the stored gesture mapping table by step 205, it means that there is no qualified second posture in the stored gesture mapping table that can correct the first posture.
  • the intelligence The device can directly determine the first posture as the current posture of the smart device.
  • the smart device may determine the first posture according to the motion data collected by the IMU and the posture of the smart device determined last time, after which the smart device may extract the magnetic vector from the stored magnetic force vector based on the first magnetic force vector collected by the magnetic sensor.
  • Finding a second gesture in the gesture mapping table of the gesture and the score If the second gesture is found, the smart device can correct the first gesture by using the second gesture, thereby obtaining the current posture of the smart device, if not found.
  • the second gesture then, the smart device can directly determine the first gesture as the current posture of the smart device. Therefore, in the embodiment of the present application, the smart device does not directly calculate the second posture according to the first magnetic force vector.
  • the first magnetic force vector is directly used to calculate the yaw angle of the posture, since the first magnetic force vector directly participates in the operation, Therefore, the requirement of the magnetic field environment that affects the accuracy of the first magnetic force vector is very strict.
  • the first magnetic force vector is used to find the second posture according to the stored attitude mapping table, and the first magnetic vector does not need to be used. Direct participation in the calculation to obtain the second attitude, therefore, compared to the direct use of the first magnetic vector to calculate the yaw angle, the requirements for the surrounding magnetic field are more relaxed, and the application is more extensive.
  • each record in the stored gesture mapping table includes not only a magnetic force vector and a corresponding posture, but also a score for indicating the reliability of the posture corresponding to the magnetic force vector in the record, such that In the process of searching for the second posture, in the case that the first magnetic force vector is similar to the magnetic vector in the record, the corresponding score is updated by comparing the posture in the record with the first posture. Therefore, the reliability of the record is updated.
  • the record can be deleted and updated in time, thereby ensuring the accuracy of the record in the pose mapping table, thereby ensuring The accuracy of the second posture for correcting the first posture found in the attitude mapping table indirectly ensures the accuracy of the current posture of the obtained smart device.
  • the smart device may further determine, according to the score, a weight occupied by the second gesture in calculating a current posture of the smart device, and when the score corresponding to the second posture is smaller, indicating that the second posture is reliable The performance is low.
  • the score corresponding to the second posture by reducing the weight corresponding to the second posture, the role of the second posture in determining the current posture of the smart device can be reduced, and the second posture is effectively reduced.
  • the score corresponding to the second posture is large, it indicates that the reliability of the second posture is high.
  • the second posture can be increased to determine the current posture of the smart device.
  • the role played by the process which in turn improves the accuracy of the current posture of the identified smart device.
  • the method for real-time updating and deleting the records in the stored gesture mapping table in the embodiment of the present application can also effectively resist the magnetic field interference, so that the smart device can adapt to the magnetic field change very well.
  • the embodiments of the present application will explain the beneficial effects of the above-mentioned anti-magnetic field interference that can be achieved by the following specific examples.
  • the first case assuming that the surrounding magnetic field changes, for example, the process of change is less than 1 second (hereinafter referred to as 1 second), and then the original magnetic field is restored, that is, the smart device is subjected to extremely short time interference, and then recovered.
  • the first posture calculated according to the data collected by the IMU is not similar to the second posture obtained according to the first magnetic force vector, that is, the stored attitude map.
  • the score corresponding to the second gesture in the table will decrease in a short time, and in the process of decreasing the score corresponding to the second gesture, when the current posture of the smart device is determined based on the first posture and the second posture, The existence of the second weight, within this 1 second, even if there is an error, it will not be very large, especially when the second weight is determined according to the corresponding score, then the second gesture determines the current posture of the smart device.
  • the weight of the process will decrease with the decrease of the score, and the disturbance of the magnetic field will have less interference to the smart device.
  • the score corresponding to the second posture in the stored attitude map is gradually updated, and a more accurate record conforming to the current magnetic field environment is newly established.
  • the second case assuming that the surrounding magnetic field changes and does not return to the original magnetic field, but eventually stabilizes under another magnetic field.
  • the scores in each record in the stored pose map may be reduced due to the dissimilarity of the first pose and the second pose due to the change of the magnetic field
  • the finally stored pose map The records in the record are gradually deleted or updated, that is, the records included in the pose mapping table are gradually updated one by one due to the change of the magnetic field, and finally the attitude map corresponding to the other magnetic field state after stabilization is obtained. It is equivalent to the smart device finally adapting to the stable magnetic field environment, and the process of adaptation is a smooth transition.
  • an embodiment of the present application provides a device 300 for determining a posture, where the device 300 can be integrated into a smart device, where the IMU and a magnetic sensor are configured, and the smart device can be a smart phone or a tablet computer. Smart devices such as VR devices and AR devices.
  • the device 300 includes:
  • the first obtaining module 301 is configured to acquire, when the motion data collected by the inertial measurement unit IMU in the smart device is received at the current sampling moment, the posture of the smart device determined last time before the current sampling moment;
  • the first determining module 302 is configured to determine the first posture based on the motion data and the posture of the last determined smart device;
  • a second acquiring module 303 configured to acquire a first magnetic force vector collected by a magnetic sensor in the smart device
  • the first searching module 304 is configured to search for a second posture from the stored gesture mapping table based on the first magnetic force vector, where the gesture mapping table is used to indicate a correspondence between the magnetic force vector and the posture;
  • the second determining module 305 is configured to determine a current posture of the smart device based on the first posture and the second posture when the second posture is found.
  • the second obtaining module 303 includes:
  • a determining sub-module configured to determine whether a magnetic force vector acquired by the magnetic sensor is received at the current sampling time
  • a first determining submodule configured to determine the received magnetic force vector as the first magnetic force vector when the magnetic force vector acquired by the magnetic sensor is received at the current sampling moment
  • the first acquiring submodule is configured to acquire a magnetic force vector acquired last time before the current sampling moment when the magnetic force vector acquired by the magnetic sensor is not received at the current sampling moment, and use the acquired magnetic force vector as the first magnetic force vector.
  • the gesture mapping table is further used to indicate a correspondence between a magnetic force vector, a posture, and a score;
  • the device 300 also includes:
  • a second searching module 306, configured to search, from the stored attitude mapping table, a second magnetic force vector similar to the first magnetic force vector
  • the triggering module 307 is configured to: when the second magnetic force vector is found, trigger the first searching module to search for the second posture from the stored attitude mapping table based on the first magnetic force vector;
  • the third determining module 308 is configured to: when the second magnetic force vector is not found, store the first magnetic force vector, the first posture, and the first preset score in the gesture mapping table, and determine the first posture as the smart The current posture of the device.
  • the first lookup module 304 includes:
  • a second obtaining sub-module 3041 configured to acquire a posture corresponding to the second magnetic force vector from the attitude mapping table, to obtain a third posture
  • a second determining sub-module 3042 configured to: when the similarity between the first posture and the third posture is greater than the preset similarity, update the score corresponding to the third posture to the first score, and the third posture As the second posture, the first score is obtained by increasing the score corresponding to the third gesture by a second preset score;
  • the sub-module 3043 is configured to: when the similarity between the first posture and the third posture is not greater than the preset similarity, update the score corresponding to the third posture to a second score, where the second score is The score corresponding to the third gesture is decreased by the second preset score;
  • the third determining sub-module 3044 is configured to: when the second score is greater than 0, use the third gesture as the second gesture; and when the second score is not greater than 0, determine that the second gesture is not found.
  • the first lookup module 304 is further configured to:
  • the apparatus 300 is further configured to:
  • the first gesture is determined as the current posture of the smart device.
  • the second determining module 305 includes:
  • the third obtaining sub-module 3051 is configured to acquire a second weight corresponding to the second posture, and determine a first weight corresponding to the first posture based on the second weight, where the second weight is a preset weight, or is corresponding to the second posture The score is determined;
  • the fourth determining submodule 3052 is configured to determine a current posture of the smart device based on the first posture, the first weight, the second posture, and the second weight.
  • the fourth determining submodule 3052 is specifically configured to:
  • the current posture of the smart device is calculated by the following formulas (7) and (8).
  • the fourth determining submodule 3052 is specifically configured to:
  • the current posture of the smart device is calculated by the following formula (9).
  • the embodiment of the present application does not directly calculate the yaw angle of the posture according to the first magnetic force vector, but uses the first magnetic force vector to determine the first according to the stored correspondence relationship. Two gestures. If the first magnetic force vector is directly used to calculate the yaw angle of the attitude, since the first magnetic force vector directly participates in the operation, the requirement of the magnetic field environment that affects the accuracy of the first magnetic vector is very strict, and in the embodiment of the present application, Determining the second posture according to the stored attitude map by using the first magnetic force vector, the first magnetic vector does not need to directly participate in the operation to obtain the second posture, and therefore, compared to directly calculating the yaw angle by using the first magnetic vector, The requirements of the surrounding magnetic field are more relaxed and applicable to a wider range of applications.
  • the apparatus for determining the posture provided by the foregoing embodiment is only illustrated by the division of each functional module, and in actual application, the function distribution may be completed by different functional modules as needed.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the apparatus for determining the posture provided by the foregoing embodiment is the same as the method embodiment for determining the posture, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • FIG. 4 is a structural block diagram of a smart device 400 provided by an exemplary embodiment of the present application.
  • the smart device 400 can be: a smart phone, a tablet computer, a VR device, an AR device, an MP3 player (Moving Picture Experts Group Audio Layer III), and a MP4 (Moving Picture Experts Group Audio Layer IV). , motion imaging experts compress the standard audio layer 4) player.
  • the smart device 400 includes a processor 401 and a memory 402.
  • Processor 401 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 401 can use at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve.
  • the processor 401 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby.
  • the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of content that needs to be displayed on the display screen.
  • the processor 401 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 402 can include one or more computer readable storage media, which can be non-transitory. Memory 402 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer readable storage medium in memory 402 is for storing at least one instruction for execution by processor 401 to implement the determined pose provided by the method embodiments of the present application. Methods.
  • the smart device 400 also optionally includes a peripheral device interface 403 and at least one peripheral device.
  • the processor 401, the memory 402, and the peripheral device interface 403 may be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 403 via a bus, signal line or circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 404, a display screen 405, a camera assembly 406, an audio circuit 407, a positioning component 408, and a power source 409.
  • the peripheral device interface 403 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 401 and the memory 402.
  • processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any of processor 401, memory 402, and peripheral interface 403 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the RF circuit 404 is configured to receive and transmit an RF (Radio Frequency) signal, also referred to as an electromagnetic signal.
  • Radio frequency circuit 404 communicates with the communication network and other communication devices via electromagnetic signals.
  • the RF circuit 404 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal.
  • the radio frequency circuit 404 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
  • Radio frequency circuitry 404 can communicate with other smart devices via at least one wireless communication protocol.
  • the wireless communication protocols include, but are not limited to, the World Wide Web, a metropolitan area network, an intranet, generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks.
  • the radio frequency circuit 404 may further include a NFC (Near Field Communication) related circuit, which is not limited in this application.
  • the display screen 405 is used to display a UI (User Interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • display 405 is a touch display
  • display 405 also has the ability to acquire touch signals over the surface or surface of display 405.
  • the touch signal can be input to the processor 401 for processing as a control signal.
  • the display screen 405 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
  • the display screen 405 may be one, and the front panel of the smart device 400 is disposed; in other embodiments, the display screen 405 may be at least two, respectively disposed on different surfaces of the smart device 400 or in a folded design.
  • the display screen 405 can be a flexible display screen disposed on a curved surface or a folded surface of the smart device 400. Even the display screen 405 can be set to a non-rectangular irregular pattern, that is, a profiled screen.
  • the display screen 405 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
  • Camera component 406 is used to capture images or video.
  • camera assembly 406 includes a front camera and a rear camera.
  • the front camera is placed on the front panel of the smart device and the rear camera is placed on the back of the smart device.
  • the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions.
  • camera assembly 406 can also include a flash.
  • the flash can be a monochrome temperature flash or a two-color temperature flash.
  • the two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
  • the audio circuit 407 can include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing to the processor 401 for processing, or input to the RF circuit 404 for voice communication.
  • the microphones may be multiple, and are respectively disposed at different parts of the smart device 400.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is then used to convert electrical signals from the processor 401 or the RF circuit 404 into sound waves.
  • the speaker can be a conventional film speaker or a piezoelectric ceramic speaker.
  • audio circuit 407 can also include a headphone jack.
  • the location component 408 is used to locate the current geographic location of the smart device 400 to implement navigation or LBS (Location Based Service).
  • the positioning component 408 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, or a Russian Galileo system.
  • Power source 409 is used to power various components in smart device 400.
  • the power source 409 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
  • the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery.
  • a wired rechargeable battery is a battery that is charged by a wired line
  • a wireless rechargeable battery is a battery that is charged by a wireless coil.
  • the rechargeable battery can also be used to support fast charging technology.
  • smart device 400 also includes one or more sensors 410.
  • the one or more sensors 410 include, but are not limited to, an acceleration sensor 411, a gyro sensor 412, a pressure sensor 413, a fingerprint sensor 414, an optical sensor 415, a proximity sensor 416, and a magnetic sensor 417.
  • the acceleration sensor 411 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the smart device 400.
  • the acceleration sensor 411 can be used to detect components of gravity acceleration on three coordinate axes.
  • the processor 401 can control the touch display screen 405 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 411.
  • the acceleration sensor 411 can also be used for the acquisition of game or user motion data.
  • the gyro sensor 412 can detect the body direction and the rotation angle of the smart device 400, and the gyro sensor 412 can cooperate with the acceleration sensor 411 to collect the user's 3D motion on the smart device 400.
  • the processor 401 can realize functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation, based on the data collected by the gyro sensor 412.
  • the pressure sensor 413 can be disposed on a side border of the smart device 400 and/or a lower layer of the touch display screen 405.
  • the pressure sensor 413 When the pressure sensor 413 is disposed on the side frame of the smart device 400, the user's holding signal to the smart device 400 can be detected, and the processor 401 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 413.
  • the operability control on the UI interface is controlled by the processor 401 according to the user's pressure on the touch display screen 405.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 414 is used to collect the fingerprint of the user.
  • the processor 401 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 401 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like.
  • the fingerprint sensor 414 can be disposed on the front, back, or side of the smart device 400. When the smart device 400 is provided with a physical button or vendor logo, the fingerprint sensor 414 can be integrated with a physical button or vendor logo.
  • Optical sensor 415 is used to collect ambient light intensity.
  • the processor 401 can control the display brightness of the touch display screen 405 based on the ambient light intensity acquired by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 405 is lowered.
  • the processor 401 can also dynamically adjust the shooting parameters of the camera assembly 406 based on the ambient light intensity acquired by the optical sensor 415.
  • Proximity sensor 416 also referred to as a distance sensor, is typically disposed on the front panel of smart device 400. Proximity sensor 416 is used to capture the distance between the user and the front of smart device 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front of the smart device 400 is getting smaller, the touch screen 405 is controlled by the processor 401 to switch from the bright screen state to the touch screen state; when the proximity sensor 416 When it is detected that the distance between the user and the front side of the smart device 400 gradually becomes larger, the processor 401 controls the touch display screen 405 to switch from the state of the screen to the bright state.
  • the magnetic sensor 417 also called geomagnetic and magnetic sensor, can detect the magnetic field strength and direction of the environment in which the smart device 400 is located.
  • the acceleration sensor 411, the gyro sensor 412, and the magnetic sensor 417 may be combined to determine the current posture of the smart device.
  • FIG. 4 does not constitute a limitation to smart device 400, may include more or fewer components than illustrated, or may combine certain components, or employ different component arrangements.
  • the embodiment of the present application provides a computer readable storage medium having instructions stored thereon, the instructions being executed by a processor to implement the steps of any of the foregoing method embodiments.
  • the embodiment of the present application provides a computer program product that, when run on a computer, causes the computer to perform the steps of any of the above method embodiments.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

Provided are a method and apparatus for determining a pose, a smart device, a storage medium, and a program product. The method for determining a pose comprises: determining a first pose on the basis of movement data acquired by an IMU and the most recently determined pose of a smart device (101); obtaining a first magnetic vector acquired by a magnetic sensor and searching a stored pose mapping table for a second pose on the basis of the first magnetic vector (102); and when the second pose is found, determining the current pose of the smart device on the basis of the first pose and the second pose (103). According to the method and apparatus for determining a pose, the smart device, the storage medium, and the program product, the requirements for the magnetic field in a surrounding environment are reduced.

Description

确定姿态的方法、装置、智能设备、存储介质和程序产品Method, device, smart device, storage medium and program product for determining posture
本申请要求于2018年1月3日提交中国专利局、申请号为201810003966.9、申请名称为“确定姿态的方法、装置及VR设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201810003966.9 filed on Jan. 3, 2018, the entire disclosure of which is incorporated herein by reference. In the application.
技术领域Technical field
本申请涉及位姿追踪技术领域,特别涉及一种确定姿态的方法、装置、智能设备、存储介质和程序产品。The present application relates to the field of pose tracking technology, and in particular, to a method, device, smart device, storage medium and program product for determining a posture.
背景技术Background technique
目前,诸如智能手机、VR(Virtual Reality,虚拟现实)设备、AR(Augmented Reality,增强现实)设备等智能设备的应用越来越普遍。当诸如此类的智能设备随着用户一起动作时,智能设备可以根据自身随着用户做出的动作来确定智能设备当前的姿态,进而根据当前的姿态做出响应。At present, applications of smart devices such as smart phones, VR (Virtual Reality) devices, and AR (Augmented Reality) devices are becoming more and more popular. When a smart device such as this moves along with the user, the smart device can determine the current posture of the smart device according to the action that the user performs with the user, and then respond according to the current posture.
发明内容Summary of the invention
本申请实施例提供了一种确定姿态的方法、装置、智能设备、存储介质和程序产品。第一方面,提供了一种确定姿态的方法,所述方法包括:Embodiments of the present application provide a method, an apparatus, a smart device, a storage medium, and a program product for determining a gesture. In a first aspect, a method of determining a pose is provided, the method comprising:
当在当前采样时刻接收到由智能设备中的惯性测量单元IMU采集的运动数据时,获取当前采样时刻之前最近一次确定的所述智能设备的姿态,并基于所述运动数据和所述最近一次确定的所述智能设备的姿态确定第一姿态;Obtaining, when the motion data collected by the inertial measurement unit IMU in the smart device is received at the current sampling moment, the posture of the smart device that was last determined before the current sampling time, and determining based on the motion data and the last time The posture of the smart device determines a first posture;
获取由所述智能设备中的磁力传感器采集的第一磁力向量,并基于所述第一磁力向量从存储的姿态映射表中查找第二姿态,所述姿态映射表用于指示磁力向量与姿态之间的对应关系;Obtaining a first magnetic force vector acquired by a magnetic sensor in the smart device, and searching for a second posture from the stored attitude mapping table based on the first magnetic force vector, the gesture mapping table is used to indicate a magnetic force vector and a posture Correspondence between
当查找到所述第二姿态时,基于所述第一姿态和所述第二姿态,确定所述智能设备当前的姿态。When the second gesture is found, the current posture of the smart device is determined based on the first posture and the second posture.
第二方面,提供一种确定姿态的装置,所述装置包括:In a second aspect, an apparatus for determining a pose is provided, the apparatus comprising:
第一获取模块,用于当在当前采样时刻接收到由智能设备中的惯性测量单元IMU采集的运动数据时,获取当前采样时刻之前最近一次确定的所述智能设 备的姿态;a first acquiring module, configured to acquire, when the motion data collected by the inertial measurement unit IMU in the smart device is received at the current sampling moment, the posture of the smart device determined last time before the current sampling moment;
第一确定模块,用于基于所述运动数据和所述最近一次确定的所述智能设备的姿态确定第一姿态;a first determining module, configured to determine a first posture based on the motion data and the posture of the smart device that is last determined;
第二获取模块,用于获取由所述智能设备中的磁力传感器采集的第一磁力向量;a second acquiring module, configured to acquire a first magnetic force vector collected by a magnetic sensor in the smart device;
第一查找模块,用于基于所述第一磁力向量从存储的姿态映射表中查找第二姿态,所述姿态映射表用于指示磁力向量与姿态之间的对应关系;a first searching module, configured to search, according to the first magnetic force vector, a second posture from a stored attitude mapping table, where the gesture mapping table is used to indicate a correspondence between a magnetic force vector and a posture;
第二确定模块,用于当查找到所述第二姿态时,基于所述第一姿态和所述第二姿态,确定所述智能设备当前的姿态。And a second determining module, configured to determine a current posture of the smart device based on the first posture and the second posture when the second posture is found.
第三方面,提供一种虚拟现实VR设备,其特征在于,所述VR设备包括:The third aspect provides a virtual reality VR device, where the VR device includes:
IMU,用于采集运动数据;IMU for collecting motion data;
磁力传感器,用于采集磁力向量;a magnetic sensor for acquiring a magnetic force vector;
处理器;processor;
用于存储所述处理器可执行指令的存储器;a memory for storing the processor executable instructions;
其中,所述处理器被配置为上述第一方面所述的任一项方法的步骤。The processor is configured as the steps of any of the methods described in the above first aspect.
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述第一方面所述的任一项方法的步骤。In a fourth aspect, a computer readable storage medium is provided having stored thereon instructions that, when executed by a processor, implement the steps of any of the methods of the first aspect described above.
第五方面,提供一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的任一项方法。In a fifth aspect, a computer program product is provided, which, when run on a computer, causes the computer to perform any of the methods described above in the first aspect.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1A是示出的翻滚角、俯仰角以及偏航角的示意图;Figure 1A is a schematic view showing a roll angle, a pitch angle, and a yaw angle;
图1B是本申请实施例提供的一种确定姿态的方法的流程图;FIG. 1B is a flowchart of a method for determining a posture according to an embodiment of the present application; FIG.
图2是本申请实施例提供的另一种确定姿态的方法的流程图;2 is a flowchart of another method for determining a posture provided by an embodiment of the present application;
图3A是本申请实施例提供的确定姿态的装置的结构示意图;3A is a schematic structural diagram of an apparatus for determining a posture according to an embodiment of the present application;
图3B是本申请实施例提供的确定姿态的装置的结构示意图;FIG. 3B is a schematic structural diagram of an apparatus for determining a posture according to an embodiment of the present application; FIG.
图3C是本申请实施例提供的第一查找模块的结构示意图;3C is a schematic structural diagram of a first searching module according to an embodiment of the present application;
图3D是本申请实施例提供的第二确定模块的结构示意图;3D is a schematic structural diagram of a second determining module provided by an embodiment of the present application;
图4是本申请实施例提供的用于确定姿态的智能设备的结构示意图。FIG. 4 is a schematic structural diagram of a smart device for determining a posture provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objects, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
在对本申请实施例进行详细的解释说明之前,先对本申请实施例涉及的应用场景予以介绍。Before the detailed description of the embodiments of the present application, the application scenarios involved in the embodiments of the present application are introduced.
当前,诸如智能手机、VR设备、AR设备等智能设备的应用越来越普遍。当诸如此类的智能设备随着用户一起动作时,智能设备可以根据自身随着用户做出的动作来确定智能设备当前的姿态。例如,用户可以佩戴VR头戴式显示器,并通过转动头部带动该VR头戴式显示器一起动作,此时,该VR头戴式显示器即可以确定自身当前的姿态,也即是,VR头戴式显示器可以确定自身当前相对于标准坐标系的翻滚角、俯仰角和偏航角,并通过翻滚角、俯仰角和偏航角来表征自身当前的姿态。再例如,用户可以手持智能手机并在不同的方向和平面上对智能手机进行转动,在这种情况下,智能手机可以通过确定自身姿态,并根据确定的姿态做出相应的响应。本申请实施例中提供的确定姿态的方法即可以应用于上述场景中,在诸如VR设备、AR设备或者智能手机等智能设备随着用户动作一起动作时,根据本申请实施例提供的确定姿态的方法来确定自身当前的姿态,进而为下一步做出响应提供数据支持。Currently, applications such as smart phones, VR devices, and AR devices are becoming more and more popular. When a smart device such as this moves with the user, the smart device can determine the current posture of the smart device according to the actions that the user makes with the user. For example, the user can wear a VR head-mounted display and drive the VR head-mounted display together by rotating the head. At this time, the VR head-mounted display can determine its current posture, that is, the VR headset The display can determine its current roll angle, pitch angle, and yaw angle relative to the standard coordinate system, and characterize its current pose by roll angle, pitch angle, and yaw angle. As another example, a user can hold a smartphone and rotate the smartphone in different directions and planes. In this case, the smartphone can respond accordingly by determining its own posture and according to the determined posture. The method for determining the posture provided in the embodiment of the present application may be applied to the foregoing scenario, and when the smart device such as a VR device, an AR device, or a smart phone moves along with the user action, determining the posture according to the embodiment of the present application. The method determines its current posture and provides data support for the next step of response.
相关技术中,智能设备中设置有IMU(Inertial measurement unit,惯性测量单元)和磁力传感器,其中,IMU一般包括陀螺仪和加速度计,智能设备可以通过对陀螺仪测量的角速度进行积分来计算第一翻滚角、第一俯仰角和第一偏航角。之后,智能设备可以根据加速度计测量的加速度来对第一翻滚角和第一俯仰角进行校正,并根据磁力传感器测量的磁力数据计算第二偏航角,通过第二偏航角对第一偏航角进行校正,校正后的翻滚角、俯仰角以及偏航角即可以 用于表征智能设备当前的姿态。图1A是翻滚角、俯仰角以及偏航角的示意图。如图1A所示,以智能设备建立坐标系,以智能设备的质心为原点,X轴垂直于智能设备的正面且指向智能设备的正面所朝的方向,Y轴垂直于X轴指向智能设备的右侧,Z轴与X轴和Y轴垂直且指向智能设备的顶部。如图1A中所示,当智能设备绕着X轴旋转时,旋转的角度即为翻滚角,当智能设备绕着Y轴旋转时,旋转的角度即为俯仰角,当智能设备绕着Z轴旋转时,旋转的角度即为偏航角。In the related art, an IMU (Inertial Measurement Unit) and a magnetic sensor are disposed in the smart device, wherein the IMU generally includes a gyroscope and an accelerometer, and the smart device can calculate the first by integrating the angular velocity measured by the gyroscope. Roll angle, first pitch angle and first yaw angle. Afterwards, the smart device can correct the first roll angle and the first pitch angle according to the acceleration measured by the accelerometer, and calculate the second yaw angle according to the magnetic data measured by the magnetic sensor, and the first yaw angle by the second yaw angle The yaw angle is corrected, and the corrected roll angle, pitch angle, and yaw angle can be used to characterize the current posture of the smart device. FIG. 1A is a schematic view of a roll angle, a pitch angle, and a yaw angle. As shown in FIG. 1A, the coordinate system is established by the smart device, with the center of mass of the smart device as the origin, the X axis is perpendicular to the front of the smart device and points to the direction of the front of the smart device, and the Y axis is perpendicular to the X axis to point to the smart device. On the right side, the Z axis is perpendicular to the X and Y axes and points to the top of the smart device. As shown in FIG. 1A, when the smart device rotates around the X axis, the angle of rotation is the roll angle. When the smart device rotates around the Y axis, the angle of rotation is the pitch angle, when the smart device is around the Z axis. When rotated, the angle of rotation is the yaw angle.
然而,在上述确定姿态的过程中,由于磁力传感器容易受到周围环境磁场的影响,因此,当周围环境磁场不均匀时,会导致测得的磁力数据不准确,而根据该磁力数据计算得到的第二偏航角就会存在偏差,在此基础上,为了保证通过该第二偏航角能够确定得到更准确的姿态,就需要确保磁力数据的准确性,而为了确保磁力数据的准确性,就需要对当前智能设备所处的环境的磁场有严格的要求,换句话说,相关技术中通过磁力数据确定第二偏航角的方法对应用环境的磁场有严格的要求,导致相关技术中确定姿态的方法的适用范围较窄。However, in the above process of determining the posture, since the magnetic sensor is susceptible to the influence of the surrounding magnetic field, when the surrounding magnetic field is not uniform, the measured magnetic data is inaccurate, and the calculated data is based on the magnetic data. There will be deviations in the yaw angle. On this basis, in order to ensure that a more accurate attitude can be determined by the second yaw angle, it is necessary to ensure the accuracy of the magnetic data, and in order to ensure the accuracy of the magnetic data, There is a strict requirement on the magnetic field of the environment in which the current smart device is located. In other words, the method of determining the second yaw angle by the magnetic force data in the related art has strict requirements on the magnetic field of the application environment, resulting in determining the posture in the related art. The method of application has a narrow scope.
接下来对本申请实施例提供的确定姿态的方法进行介绍。Next, a method for determining a posture provided by an embodiment of the present application is introduced.
图1B是本申请实施例提供的一种确定姿态的方法的流程图。该方法可以应用于智能设备中,该智能设备中配置有IMU和磁力传感器,该智能设备可以为智能手机、平板电脑、VR设备、AR设备等智能设备。参见图1B,该方法包括以下步骤:FIG. 1B is a flowchart of a method for determining a posture according to an embodiment of the present application. The method can be applied to an intelligent device, where the IMU and the magnetic sensor are configured, and the smart device can be a smart device such as a smart phone, a tablet computer, a VR device, or an AR device. Referring to FIG. 1B, the method includes the following steps:
步骤101:当在当前采样时刻接收到由智能设备中的IMU采集的运动数据时,获取当前采样时刻之前最近一次确定的智能设备的姿态,并基于运动数据和最近一次确定的智能设备的姿态确定第一姿态。Step 101: When receiving the motion data collected by the IMU in the smart device at the current sampling moment, acquiring the posture of the smart device determined last time before the current sampling moment, and determining the motion device based on the motion data and the posture of the smart device determined last time. The first gesture.
其中,IMU可以按照预设时长进行数据采集,每次采集数据的时刻即为采样时刻。IMU在每个采样时刻采集到运动数据之后,可以将该数据发送给智能设备。另外,IMU可以包括陀螺仪和加速度计,基于此,IMU采集的数据可以包括由陀螺仪采集的角速度数据,该角速度数据可以包括该智能设备在世界坐标系的三个轴上的角速度分量。除此之外,IMU采集到的数据还可以包括加速度计采集的重力数据。The IMU can collect data according to the preset duration, and the time at which the data is collected is the sampling moment. After the IMU collects the motion data at each sampling time, the IMU can send the data to the smart device. Additionally, the IMU can include a gyroscope and an accelerometer, based on which the data acquired by the IMU can include angular velocity data acquired by the gyroscope, which can include angular velocity components of the smart device on three axes of the world coordinate system. In addition, the data collected by the IMU may also include gravity data acquired by the accelerometer.
步骤102:获取由智能设备中的磁力传感器采集的第一磁力向量,并基于第一磁力向量从存储的姿态映射表中查找第二姿态。Step 102: Acquire a first magnetic force vector acquired by a magnetic sensor in the smart device, and search for a second posture from the stored attitude mapping table based on the first magnetic force vector.
其中,姿态映射表用于指示磁力向量与姿态之间的对应关系,或者用于指示磁力向量、姿态与分值之间的对应关系。也就是说,该姿态映射表中可以存储有多条记录,且每一条记录均是一组磁力向量与姿态之间的对应关系,或者说每一条记录均是一组磁力向量、姿态与分值之间的对应关系。The gesture mapping table is used to indicate a correspondence between the magnetic force vector and the posture, or to indicate a correspondence between the magnetic force vector, the posture, and the score. That is to say, the gesture map can store multiple records, and each record is a correspondence between a set of magnetic vectors and gestures, or each record is a set of magnetic vectors, poses and scores. Correspondence between them.
还需要说明的是,磁力传感器同样可以按照预设时长进行数据采集,也就是说,磁力传感器和IMU同步进行数据采集。或者,该磁力传感器采集数据的采样周期可以是预设时长的其他整数倍,也即是,该磁力传感器采集数据的采样周期大于IMU的采样周期,并且,该磁力传感器进行数据采集的时刻也是IMU的采样时刻。或者,该磁力传感器采集数据的采样周期大于IMU的采样周期,且采样时刻不同步。It should also be noted that the magnetic sensor can also perform data acquisition according to the preset duration, that is, the magnetic sensor and the IMU synchronize data acquisition. Alternatively, the sampling period of the data collected by the magnetic sensor may be other integer multiples of the preset duration, that is, the sampling period of the data collected by the magnetic sensor is greater than the sampling period of the IMU, and the moment when the magnetic sensor performs data collection is also the IMU. Sampling moment. Alternatively, the sampling period of the data collected by the magnetic sensor is greater than the sampling period of the IMU, and the sampling timing is not synchronized.
另外,在本申请实施例中,磁力传感器在采集数据时采集的是世界坐标系的三个坐标轴上的读数,也即是,在世界坐标系下每个轴上的磁力分量,智能设备可以根据这三个分量得到第一磁力向量。In addition, in the embodiment of the present application, the magnetic sensor collects the readings on the three coordinate axes of the world coordinate system when collecting data, that is, the magnetic component on each axis in the world coordinate system, and the smart device can The first magnetic force vector is obtained from the three components.
步骤103:当查找到第二姿态时,基于第一姿态和第二姿态,确定智能设备当前的姿态。Step 103: Determine the current posture of the smart device based on the first posture and the second posture when the second posture is found.
当确定第一姿态和第二姿态之后,如果第一姿态和第二姿态不同,则可以根据通过第二姿态对第一姿态进行校正,从而得到智能设备当前的姿态。如果第一姿态和第二姿态相同,则可以将第一姿态确定为智能设备当前的姿态。After determining the first posture and the second posture, if the first posture and the second posture are different, the first posture may be corrected according to the second posture, thereby obtaining the current posture of the smart device. If the first posture and the second posture are the same, the first posture may be determined as the current posture of the smart device.
本申请实施例中,当在当前采样时刻接收到由智能设备中的IMU采集的运动数据时,获取当前采样时刻之前最近一次确定的智能设备的姿态,并基于该运动数据和最近一次确定的智能设备的姿态确定第一姿态,获取由智能设备中的磁力传感器采集的第一磁力向量,并基于第一磁力向量从存储的姿态映射表中查找第二姿态,当查找到第二姿态时,则基于第一姿态和第二姿态,确定智能设备当前的姿态。由此可见,本申请实施例在获取到第一磁力向量之后,并不是直接根据第一磁力向量计算得到姿态的偏航角,而是利用该第一磁力向量,根据存储的姿态映射表中指示的磁力向量和姿态之间的对应关系来确定第二姿态。如果直接采用第一磁力向量计算姿态的偏航角,由于第一磁力向量直接参与运算,因此,对影响该第一磁力向量的准确性的磁场环境的要求将非常严格,而本申请实施例中利用第一磁力向量根据存储的姿态映射表确定第二姿态,第一磁力向量并不需要直接参与运算得到第二姿态,因此,相较于直接采用第一 磁力向量计算偏航角而言,对周围环境磁场的要求更加宽松,适用场合更加广泛。In the embodiment of the present application, when the motion data collected by the IMU in the smart device is received at the current sampling moment, the posture of the smart device determined last time before the current sampling moment is acquired, and based on the motion data and the last determined intelligence. The posture of the device determines a first posture, acquires a first magnetic force vector collected by the magnetic sensor in the smart device, and searches for a second posture from the stored posture mapping table based on the first magnetic force vector, and when the second posture is found, A current posture of the smart device is determined based on the first posture and the second posture. Therefore, after obtaining the first magnetic force vector, the embodiment of the present application does not directly calculate the yaw angle of the posture according to the first magnetic force vector, but uses the first magnetic force vector according to the indication in the stored posture mapping table. The correspondence between the magnetic force vector and the posture determines the second posture. If the first magnetic force vector is directly used to calculate the yaw angle of the attitude, since the first magnetic force vector directly participates in the operation, the requirement of the magnetic field environment that affects the accuracy of the first magnetic vector is very strict, and in the embodiment of the present application, Determining the second posture according to the stored attitude map by using the first magnetic force vector, the first magnetic vector does not need to directly participate in the operation to obtain the second posture, and therefore, compared to directly calculating the yaw angle by using the first magnetic vector, The requirements of the surrounding magnetic field are more relaxed and applicable to a wider range of applications.
图2是本申请实施例提供的另一种确定姿态的方法的流程图。该方法可以应用于智能设备中,该智能设备中配置有IMU和磁力传感器,该智能设备可以为智能手机、平板电脑、VR设备、AR设备等智能设备。参见图2,该方法包括以下步骤:FIG. 2 is a flowchart of another method for determining a gesture provided by an embodiment of the present application. The method can be applied to an intelligent device, where the IMU and the magnetic sensor are configured, and the smart device can be a smart device such as a smart phone, a tablet computer, a VR device, or an AR device. Referring to Figure 2, the method includes the following steps:
步骤201:当在当前采样时刻接收到由智能设备中的IMU采集的运动数据时,获取当前采样时刻之前最近一次确定的智能设备的姿态,并基于运动数据和最近一次确定的智能设备的姿态确定第一姿态。Step 201: When receiving the motion data collected by the IMU in the smart device at the current sampling moment, acquiring the posture of the smart device determined last time before the current sampling moment, and determining the motion device based on the motion data and the posture of the smart device determined last time. The first gesture.
其中,基于前述描述可知,IMU可以采集到三个角速度,智能设备可以根据三个角速度和IMU的采样周期,对这三个角速度进行积分,以确定从上一采样时刻到当前采样时刻智能设备的姿态变化量。之后,智能设备可以获取当前采样时刻之前最近一次确定的智能设备的姿态,并根据确定的姿态变化量和最近一次确定的智能设备的姿态确定得到第一姿态。According to the foregoing description, the IMU can collect three angular velocities, and the smart device can integrate the three angular velocities according to the three angular velocities and the sampling period of the IMU to determine the smart device from the last sampling moment to the current sampling moment. The amount of change in posture. Thereafter, the smart device may acquire the posture of the smart device that was last determined before the current sampling time, and determine the first posture according to the determined posture change amount and the posture of the smart device determined last time.
需要说明的是,在本申请实施例中,由于智能设备是按照接收到的IMU采集的运动数据的时刻来反馈姿态的,因此,当前采样时刻之前最近一次确定的智能设备的姿态可以是当前采样时刻的上一采样时刻确定的智能设备的姿态。在一些实施方式中,如果智能设备在上一采样时刻只接收到IMU采集的数据,但是,未接收到磁力传感器采集的数据,那么,上一采样时刻确定的智能设备的姿态可以是根据上一采样时刻接收到的IMU采集的数据计算得到的姿态,也可以是根据上一采样时刻接收到的IMU采集的数据以及上一采样时刻之前最近一次采集到的磁力数据确定的姿态。当然,如果上一采样时刻同时接收到了IMU采集的数据以及磁力传感器采集的数据,那么,上一采样时刻确定的智能设备的姿态可以是上一采样时刻根据接收到的IMU采集的数据以及磁力传感器采集的数据确定得到的姿态。It should be noted that, in the embodiment of the present application, since the smart device feeds back the posture according to the time of the received motion data collected by the IMU, the posture of the smart device determined last time before the current sampling moment may be the current sampling. The attitude of the smart device determined at the last sampling moment of the moment. In some embodiments, if the smart device only receives the data collected by the IMU at the last sampling time, but does not receive the data collected by the magnetic sensor, the posture of the smart device determined at the last sampling moment may be based on the previous one. The posture calculated by the data collected by the IMU received at the sampling time may also be the posture determined according to the data collected by the IMU received at the last sampling time and the magnetic data collected last time before the last sampling time. Of course, if the data collected by the IMU and the data collected by the magnetic sensor are received at the same sampling time, the posture of the smart device determined at the last sampling moment may be the data collected by the received IMU and the magnetic sensor at the last sampling time. The acquired data determines the resulting pose.
在一些实施方式中,在本申请实施例中,智能设备的姿态可以通过四元数来表示,在这种情况下,姿态变化量也可以通过四元数来表示。假设姿态变化量为dQ,那么,当用四元数来表示时,dQ=[x,y,z,w]。其中,智能设备可以通过下述公式(1)-(4)来计算得到从x、y、z和w。In some embodiments, in the embodiment of the present application, the posture of the smart device may be represented by a quaternion, and in this case, the amount of posture change may also be represented by a quaternion. Assuming that the amount of change in posture is dQ, then when expressed by a quaternion, dQ = [x, y, z, w]. Among them, the smart device can calculate from x, y, z, and w by the following formulas (1)-(4).
Figure PCTCN2018084233-appb-000001
Figure PCTCN2018084233-appb-000001
Figure PCTCN2018084233-appb-000002
Figure PCTCN2018084233-appb-000002
Figure PCTCN2018084233-appb-000003
Figure PCTCN2018084233-appb-000003
Figure PCTCN2018084233-appb-000004
Figure PCTCN2018084233-appb-000004
其中,ω x、ω y和ω z分别为角速度在三个轴上的分量,dt为当前采样时刻与上一采样时刻之间的时间间隔。 Where ω x , ω y and ω z are components of the angular velocity on three axes, respectively, and dt is the time interval between the current sampling instant and the last sampling instant.
需要说明的是,在本申请实施例中,不仅可以通过四元数来表示姿态,还可以通过欧拉角或者是矩阵的形式来表示姿态,本申请实施例中仅是以四元数为例进行解释说明。在实际应用中,当通过欧拉角或者矩阵的形式来表示姿态时,确定姿态变化量的原理是不变的,均是通过对角速度进行积分来确定姿态变化量,具体的实现方式可以根据参考不同形式下的数学运算法则进行,本申请实施例对此不再赘述。It should be noted that, in the embodiment of the present application, the gesture can be represented not only by the quaternion but also by the Euler angle or the matrix. In the embodiment of the present application, only the quaternion is taken as an example. Explain. In practical applications, when the attitude is expressed by the Euler angle or the matrix form, the principle of determining the amount of posture change is constant, and the amount of posture change is determined by integrating the angular velocity, and the specific implementation manner can be based on the reference. The mathematical algorithms in different forms are performed, and the embodiments of the present application will not be described again.
当确定上一采样时刻到当前采样时刻之间的智能设备的姿态变化量之后,智能设备可以通过下述公式(5)计算第一姿态:After determining the amount of change in the posture of the smart device between the last sampling time and the current sampling time, the smart device may calculate the first posture by the following formula (5):
Q=Q 1*dQ    (5) Q=Q 1 *dQ (5)
其中,Q为第一姿态,Q 1为当前采样时刻之前最近一次确定得到的智能设备的姿态,dQ为通过前述公式确定得到的上一采样时刻到当前采样时刻之间的智能设备的姿态变化量。 Where Q is the first posture, Q 1 is the posture of the smart device that was last determined before the current sampling time, and dQ is the posture change amount of the smart device between the last sampling time and the current sampling time determined by the foregoing formula. .
步骤202:获取由智能设备中的磁力传感器采集的第一磁力向量。Step 202: Acquire a first magnetic force vector acquired by a magnetic sensor in the smart device.
当确定第一姿态之后,智能设备可以获取由智能设备中的磁力传感器采集的第一磁力向量。After determining the first gesture, the smart device can acquire the first magnetic force vector acquired by the magnetic sensor in the smart device.
需要说明的是,通常情况下,磁力传感器的采样周期有可能大于IMU的采样周期,也有可能与IMU的采样周期相同。如果磁力传感器的采样周期与IMU的采样周期相同,那么,当在当前采样时刻接收到IMU采集的数据的同时,也可以接收到磁力传感器采集的数据。如果磁力传感器的采样周期大于IMU的采 样周期,那么,将会存在两种情况。第一种情况是磁力传感器的采样周期是IMU采样周期的整数倍,磁力传感器的采样时刻也正是IMU的采样时刻,这样,在当前采样时刻,智能设备有可能接收到磁力传感器采集的第一磁力向量,也有可能接收不到磁力传感器采集的第一磁力向量。第二种情况是磁力传感器的采样周期和IMU的采样周期之间不是整数倍的关系,且磁力传感器的采样时刻不一定是IMU的采样时刻,这样,在当前采样时刻,智能设备同样有可能接收到磁力传感器采集的第一磁力向量,也有可能接收不到磁力传感器采集的第一磁力向量。基于上述各种情况,当智能设备获取磁力传感器采集的第一磁力向量时,首先可以判断在当前采样时刻是否接收到由磁力传感器采集的磁力向量,如果在当前采样时刻接收到由磁力传感器采集的磁力向量,那么,智能设备可以将接收到的磁力向量确定为第一磁力向量。如果在当前采样时刻未接收到由磁力传感器采集的磁力向量,那么,智能设备则可以获取当前采样时刻之前最近一次采集到的磁力向量,并将获取的磁力向量作为第一磁力向量。It should be noted that, in general, the sampling period of the magnetic sensor may be greater than the sampling period of the IMU, and may also be the same as the sampling period of the IMU. If the sampling period of the magnetic sensor is the same as the sampling period of the IMU, the data collected by the magnetic sensor can also be received while receiving the data collected by the IMU at the current sampling time. If the sampling period of the magnetic sensor is greater than the sampling period of the IMU, then there will be two cases. In the first case, the sampling period of the magnetic sensor is an integer multiple of the sampling period of the IMU, and the sampling moment of the magnetic sensor is also the sampling moment of the IMU, so that at the current sampling moment, the smart device may receive the first collection of the magnetic sensor. The magnetic vector may also not receive the first magnetic vector acquired by the magnetic sensor. The second case is that the sampling period of the magnetic sensor and the sampling period of the IMU are not integer multiples, and the sampling moment of the magnetic sensor is not necessarily the sampling moment of the IMU, so that the smart device is also likely to receive at the current sampling moment. It is also possible that the first magnetic vector acquired by the magnetic sensor does not receive the first magnetic vector acquired by the magnetic sensor. Based on the above various situations, when the smart device acquires the first magnetic force vector acquired by the magnetic sensor, it may first determine whether the magnetic force vector collected by the magnetic sensor is received at the current sampling time, if the magnetic sensor is received at the current sampling time. The magnetic vector, then, the smart device can determine the received magnetic vector as the first magnetic vector. If the magnetic force vector acquired by the magnetic sensor is not received at the current sampling time, the smart device can acquire the magnetic force vector acquired last time before the current sampling time, and use the acquired magnetic force vector as the first magnetic force vector.
需要说明的是,磁力传感器在采集数据时,是采集的三个轴上的磁力分量,根据这三个磁力分量,则可以得到第一磁力向量。It should be noted that when the magnetic sensor collects data, it is the magnetic component on the three axes acquired, and according to the three magnetic components, the first magnetic vector can be obtained.
在一些实施方式中,为了提高磁力传感器采集的数据的准确度,智能设备可以自动对磁力传感器进行校准。在一些实施方式中,智能设备自动对磁力传感器进行校准的方法可以参考相关技术中根据磁力传感器的点云图以及采样的数据点进行椭球拟合的方式进行校准,本申请实施例在此不再赘述。In some embodiments, to increase the accuracy of the data acquired by the magnetic sensor, the smart device can automatically calibrate the magnetic sensor. In some embodiments, the method for automatically calibrating the magnetic sensor by the smart device may be calibrated according to the point cloud image of the magnetic sensor and the sampled data point in the related art, and the embodiment of the present application is no longer used herein. Narration.
步骤203:从存储的姿态映射表中查找与第一磁力向量相似的第二磁力向量。Step 203: Find a second magnetic force vector similar to the first magnetic force vector from the stored attitude mapping table.
其中,智能设备中可以存储有姿态映射表,该姿态映射表中可能包括至少一条记录,也可能没有任何记录,当包括多条记录时,每条记录中可以包括一个磁力向量和该磁力向量对应的姿态,或者,每条记录中可以包括一个磁力向量、该磁力向量对应的姿态以及分值。The gesture mapping table may be stored in the smart device, and the gesture mapping table may include at least one record or may not have any records. When multiple records are included, each record may include a magnetic force vector corresponding to the magnetic vector. The posture, or, each record may include a magnetic force vector, a posture corresponding to the magnetic force vector, and a score.
当获取到第一磁力向量之后,智能设备可以从存储的姿态映射表中查找与第一磁力向量相似的第二磁力向量。After acquiring the first magnetic force vector, the smart device may look up a second magnetic force vector similar to the first magnetic force vector from the stored attitude mapping table.
其中,当姿态映射表中不包括任何记录时,智能设备可以确定未查找与第一磁力向量相似的第二磁力向量。Wherein, when no record is included in the gesture mapping table, the smart device may determine that the second magnetic force vector similar to the first magnetic force vector is not found.
当姿态映射表中包括至少一条记录时,对于该至少一条记录中的任一条记录A,智能设备可以获取该条记录A中的磁力向量,并将获取的磁力向量和第 一磁力向量进行比较,以确定获取的磁力向量与第一磁力向量是否相似。When at least one record is included in the gesture mapping table, for any one of the at least one record A, the smart device may acquire the magnetic force vector in the record A, and compare the acquired magnetic force vector with the first magnetic vector. It is determined whether the acquired magnetic force vector is similar to the first magnetic force vector.
在一些实施方式中,由于每个磁力向量是由三个磁力分量构成的,并且,基于数学常识可知,两个向量越相近,这两个向量之间的夹角越小,因此,当计算两个磁力向量是否相似时,智能设备可以计算这两个磁力向量之间的夹角。当获取的磁力向量和第一磁力向量之间的夹角小于或等于预设角度时,智能设备即可以确定获取的磁力向量与第一磁力向量相似,否则,则可以确定获取的磁力向量与第一磁力向量不相似。其中,智能设备计算两个磁力向量之间的夹角的具体实现方式可以参考相关技术,本申请实施例对此不再赘述。In some embodiments, since each magnetic force vector is composed of three magnetic components, and based on mathematical common knowledge, the closer the two vectors are, the smaller the angle between the two vectors is. Therefore, when calculating two When the magnetic vectors are similar, the smart device can calculate the angle between the two magnetic vectors. When the angle between the acquired magnetic force vector and the first magnetic force vector is less than or equal to the preset angle, the smart device can determine that the acquired magnetic force vector is similar to the first magnetic force vector; otherwise, the acquired magnetic vector can be determined A magnetic vector is not similar. For a specific implementation manner in which the smart device calculates the angle between the two magnetic vectors, reference may be made to the related art, which is not repeatedly described in this embodiment of the present application.
还需要说明的是,在本申请实施例中,该预设角度是在考虑误差后预先设置的能够认为两个向量相近的最大夹角。例如,该预设角度可以为5度、3度等数值,本申请实施例对此不做具体限定。It should be noted that, in the embodiment of the present application, the preset angle is a maximum angle that can be considered to be close to the two vectors, which is preset after considering the error. For example, the preset angle may be a value of 5 degrees, 3 degrees, etc., which is not specifically limited in this embodiment of the present application.
当智能设备确定获取的磁力向量与第一磁力向量相似时,即可以将获取的磁力向量作为第二磁力向量,也即是,智能设备可以确定在该姿态映射表中查找到了第二磁力向量,否则,智能设备则可以继续比较该姿态映射表中其他记录中的磁力向量是否与第一磁力向量相似,直到比较完该姿态映射表中的所有记录为止,如果还是未查找到与第一磁力向量相似的第二磁力向量,那么,智能设备可以确定未查找到与该第一磁力向量相似的第二磁力向量。When the smart device determines that the acquired magnetic vector is similar to the first magnetic vector, the acquired magnetic vector may be used as the second magnetic vector, that is, the smart device may determine that the second magnetic vector is found in the gesture mapping table. Otherwise, the smart device can continue to compare whether the magnetic force vector in the other records in the attitude mapping table is similar to the first magnetic force vector until all the records in the attitude mapping table are compared, if the first magnetic vector is still not found. A similar second magnetic force vector, then the smart device can determine that a second magnetic force vector similar to the first magnetic force vector is not found.
如果智能设备未查找到第二磁力向量,则可以执行步骤204,如果智能设备查找到第二磁力向量,则可以执行步骤205-207。If the smart device does not find the second magnetic force vector, step 204 may be performed, and if the smart device finds the second magnetic force vector, steps 205-207 may be performed.
步骤204:当未查找到第二磁力向量时,将第一磁力向量、第一姿态和第一预设分值对应存储在姿态映射表中,并将第一姿态确定为智能设备当前的姿态。Step 204: When the second magnetic force vector is not found, the first magnetic force vector, the first posture, and the first preset score are correspondingly stored in the gesture mapping table, and the first posture is determined as the current posture of the smart device.
基于前述描述可知,未查找到第二磁力向量可能包括两种情况,一种情况是姿态映射表中不包括有任何的记录,自然也就不包括有与第一磁力向量相似的第二磁力向量,这种情况通常是智能设备在重启后的第一个时刻还未载入或记录任何数据时出现的,也有可能是智能设备在初始化时第一次开始在该姿态映射表中添加记录。换句话说,在本申请实施例中,该智能设备可以在每次重启时重新建立姿态映射表中的每条记录,也可以只在初始化时在该姿态映射表中完成多条记录的建立,之后,当智能设备关机时则存储该姿态映射表,当智能设备重启时,只需调取该存储的姿态映射表即可。另一种情况是存储的姿态映射表中包括有至少一条记录,但是没有任何一条记录中的磁力向量与第一磁 力向量相似,在这种情况下,说明该姿态映射表中还未建立包括有第一磁力向量的记录。然而,无论上述哪种情况,当未查找到第二磁力向量时,都可以说明在姿态映射表中还没有建立包含有第一磁力向量的记录,因此,智能设备可以建立包含有第一磁力向量的记录,也即是,将第一磁力向量、根据IMU采集的运动数据计算得到的第一姿态对应存储在该姿态映射表中。进一步地,基于前述描述可知,姿态映射表还可以用于指示磁力向量、姿态和分值之间的对应关系,在这种情况下,智能设备可以将第一磁力向量、第一姿态和第一预设分值对应存储在该姿态映射表中。Based on the foregoing description, the second magnetic force vector may not be found to include two cases. In one case, the record does not include any record, and naturally does not include the second magnetic vector similar to the first magnetic vector. This situation usually occurs when the smart device has not loaded or recorded any data at the first moment after the restart, or it may be that the smart device first starts adding records in the gesture mapping table at the time of initialization. In other words, in the embodiment of the present application, the smart device may re-establish each record in the gesture mapping table every time it is restarted, or may complete the establishment of multiple records in the gesture mapping table only during initialization. Then, when the smart device is powered off, the gesture mapping table is stored, and when the smart device is restarted, only the stored gesture mapping table can be retrieved. In another case, the stored attitude map includes at least one record, but none of the magnetic vectors in the record is similar to the first magnetic vector. In this case, the gesture map is not yet included. Recording of the first magnetic vector. However, in either case, when the second magnetic force vector is not found, it can be stated that the record containing the first magnetic force vector has not been established in the attitude mapping table, and therefore, the smart device can establish the first magnetic force vector. The record, that is, the first magnetic force vector and the first posture calculated according to the motion data collected by the IMU are stored in the gesture mapping table. Further, based on the foregoing description, the gesture mapping table may further be used to indicate a correspondence between a magnetic force vector, a posture, and a score. In this case, the smart device may set the first magnetic force vector, the first posture, and the first The preset score correspondingly is stored in the gesture mapping table.
需要说明的是,对于姿态映射表中的每条记录,该记录中的分值是用来指示该条记录的可靠性的。具体的说,是用来指示该条记录中磁力向量和对应的姿态的可靠性的。分值越高,则说明该条记录的可靠性越高。对于新建立的记录,由于记录中的磁力向量和姿态均是根据智能设备采集的数据直接得到的,因此,所有新建立的记录的可靠性是相同的,基于此,智能设备可以为新建立的记录设置一个初始的分值,也即第一预设分值,该第一预设分值即是新建立的记录的初始可靠性,后续智能设备可以不断对记录中的分值进行更新,并根据更新后的分值进一步地判断随着时间的延长该条记录的可靠性。It should be noted that, for each record in the gesture mapping table, the score in the record is used to indicate the reliability of the record. Specifically, it is used to indicate the reliability of the magnetic vector and the corresponding pose in the record. The higher the score, the higher the reliability of the record. For newly created records, since the magnetic vector and posture in the record are directly obtained from the data collected by the smart device, the reliability of all newly created records is the same, and based on this, the smart device can be newly established. The record sets an initial score, that is, a first preset score, which is the initial reliability of the newly created record, and the subsequent smart device can continuously update the score in the record, and The reliability of the record is further judged with the extension of time based on the updated score.
其中,由于该第一预设分值相当于是给定一个初始基准,因此,该第一预设分值可以为任意值,例如,可以为10分。进一步地,如果智能设备中设置有姿态映射表中分值允许达到的上下限值,那么,该第一预设分值可以是该上下限值的中间值。例如,该姿态映射表中分值允许达到的上限值为100分,下限值为0分,那么,该第一预设分值可以是50分。当然,上述仅是本申请实施例给出的几种示例性的第一预设分值的取值,该第一预设分值还可以有其他的可能性,本申请实施例对此不做具体限定。The first preset score may be an arbitrary value, for example, it may be 10 points, because the first preset score is equivalent to an initial reference. Further, if the upper and lower limits of the scores allowed in the gesture mapping table are set in the smart device, the first preset score may be an intermediate value of the upper and lower limits. For example, the upper limit value of the score in the gesture mapping table is 100 points, and the lower limit value is 0 minutes. Then, the first preset score may be 50 minutes. Of course, the above is only the value of several exemplary first preset scores given in the embodiment of the present application, and the first preset score may have other possibilities, and the embodiment of the present application does not do this. Specifically limited.
另外,值得注意的是,用于指示磁力向量、姿态和分值之间的对应关系的姿态映射表中可以包括预设数量的记录,也即是,该姿态映射表中包括的记录数可以存在上限值,例如,可以设置该姿态映射表中允许的记录数的上限值为1000条。当姿态映射表中包括的记录数达到上限值,则智能设备又确定得到需要新添加的记录时,智能设备可以通过对姿态映射表中已存在的记录进行更新或删除来将新得到的记录添加到该姿态映射表中。In addition, it is worth noting that the gesture mapping table for indicating the correspondence between the magnetic force vector, the posture, and the score may include a preset number of records, that is, the number of records included in the gesture mapping table may exist. The upper limit value, for example, can set the upper limit value of the number of records allowed in the gesture mapping table to 1000. When the number of records included in the gesture mapping table reaches the upper limit value, and the smart device determines that the newly added record is needed, the smart device may update the new record by updating or deleting the existing record in the gesture mapping table. Added to the pose map.
在一些实施方式中,如果存储的姿态映射表中不包括有任何的记录,那么, 智能设备将第一磁力向量、第一姿态和第一预设分值添加到该姿态映射表中,相当于是建立了该姿态映射表中的第一条记录,在接下来的一段时间内的多个采样时刻,智能设备可能会重复执行上述步骤201-204多次,从而在该姿态映射表中建立得到多条记录,以便得到包括有多条记录的姿态映射表中。其中,由于根据IMU计算第一姿态时,第一姿态的偏差主要是由于对角速度进行积分,随着时间延长误差逐渐累积造成的,而在最初的添加记录的这个过程中,由于这个过程的时间相对较短,因此,误差累计的相对较小,在这一段时间内向姿态映射表中添加的多条记录的可靠性也较高,或者,换句话说,在累积偏差出现之前,该姿态映射表中的多条记录已经建立完成。In some embodiments, if the stored gesture mapping table does not include any records, the smart device adds the first magnetic force vector, the first posture, and the first preset score to the gesture mapping table, which is equivalent to The first record in the gesture mapping table is established. During multiple sampling moments in the next period of time, the smart device may repeatedly perform the above steps 201-204 multiple times, thereby establishing more in the gesture mapping table. Records to get a pose map containing multiple records. Wherein, since the first posture is calculated according to the IMU, the deviation of the first posture is mainly caused by the integration of the angular velocity, and the error is gradually accumulated over time, and in the process of initially adding the recording, due to the time of the process Relatively short, therefore, the error accumulation is relatively small, and the reliability of the multiple records added to the attitude map in this period of time is also high, or, in other words, before the cumulative deviation occurs, the pose map Multiple records in the middle have been created.
当未查找到第二磁力向量时,除了进行上述操作之外,由于存储的姿态映射表中并不存在与第一磁力向量相似的第二磁力向量,也就无法获取到相应地第二姿态来对第一姿态进行校正,因此,智能设备可以直接将第一姿态确定为智能设备当前的姿态。When the second magnetic force vector is not found, in addition to performing the above operation, since the second magnetic force vector similar to the first magnetic force vector does not exist in the stored attitude mapping table, the corresponding second posture cannot be obtained. The first pose is corrected, so the smart device can directly determine the first pose as the current pose of the smart device.
步骤205:当查找到第二磁力向量时,基于第一磁力向量从存储的姿态映射表中查找第二姿态。Step 205: When the second magnetic force vector is found, the second posture is searched from the stored attitude mapping table based on the first magnetic force vector.
步骤204中介绍了当未查找到第二磁力向量时,智能设备确定当前的姿态的方式。当查找到与第一磁力向量相似的第二磁力向量时,智能设备则可以从存储的姿态映射表中获取该第二磁力向量所对应的姿态,得到第三姿态;当第一姿态与第三姿态之间的相似度大于预设相似度时,将第三姿态所对应的分值更新为第一分值,并将第三姿态作为第二姿态,第一分值是将第三姿态所对应的分值增加第二预设分值得到;当第一姿态与第三姿态之间的相似度不大于预设相似度时,将第三姿态所对应的分值更新为第二分值;当第二分值大于0时,将第三姿态作为第二姿态,当第二分值不大于0时,则确定未查找到第二姿态,其中,第二分值是将第三姿态所对应的分值减小第二预设分值得到。The manner in which the smart device determines the current pose when the second magnetic force vector is not found is described in step 204. When the second magnetic force vector similar to the first magnetic force vector is found, the smart device may acquire the posture corresponding to the second magnetic force vector from the stored attitude mapping table to obtain the third posture; when the first posture and the third posture When the similarity between the gestures is greater than the preset similarity, the score corresponding to the third gesture is updated to the first score, and the third gesture is used as the second gesture, and the first score is corresponding to the third gesture. The score of the score is increased by the second preset score; when the similarity between the first pose and the third pose is not greater than the preset similarity, the score corresponding to the third pose is updated to the second score; When the second score is greater than 0, the third gesture is used as the second gesture, and when the second score is not greater than 0, it is determined that the second gesture is not found, wherein the second score is corresponding to the third gesture. The score is reduced by the second preset score.
在一些实施方式中,智能设备在获取到第二磁力向量对应的姿态也即第三姿态之后,可以进一步的判断第一姿态和第三姿态是否相似,从而判断该第三姿态是否可以作为第二姿态,如果该第三姿态可以作为第二姿态,则可以认为查找到了第二姿态,否则,则认为未查找到第二姿态。In some embodiments, after acquiring the posture corresponding to the second magnetic force vector, that is, the third posture, the smart device may further determine whether the first posture and the third posture are similar, thereby determining whether the third posture can be used as the second The gesture, if the third gesture can be used as the second gesture, it can be considered that the second gesture is found, otherwise, it is considered that the second gesture is not found.
其中,在实际应用中,两个姿态之间的夹角越小,这两个姿态就越相似,并且,基于前述描述可知,在本申请实施例中,可以用四元数来表示姿态,因 此,智能设备可以计算用于表示第一姿态的四元数和用于表示第三姿态的四元数之间的夹角,从而通过夹角的大小来表征第一姿态和第三姿态之间的相似度。其中,当用四元数来表示姿态时,假设第一姿态Q 1=(Q x1,Q y1,Q z1,Q w1),第三姿态Q 2=(Q x2,Q y2,Q z2,Q w2),智能设备可以通过下述公式(6)来计算两个姿态之间的夹角。 In the actual application, the smaller the angle between the two postures, the more similar the two postures are, and based on the foregoing description, in the embodiment of the present application, the quaternion can be used to represent the posture, The smart device may calculate an angle between the quaternion representing the first pose and the quaternary representing the third pose, thereby characterizing the relationship between the first pose and the third pose by the magnitude of the angle Similarity. Wherein, when the gesture is represented by a quaternion, it is assumed that the first posture Q 1 = (Q x1 , Q y1 , Q z1 , Q w1 ), and the third posture Q 2 = (Q x2 , Q y2 , Q z2 , Q W2 ), the smart device can calculate the angle between the two poses by the following formula (6).
Figure PCTCN2018084233-appb-000005
Figure PCTCN2018084233-appb-000005
其中,θ即为第一姿态和第三姿态之间的夹角。Where θ is the angle between the first posture and the third posture.
当确定第一姿态和第三姿态之间的夹角之后,智能设备可以判断该夹角是否小于预设夹角,当该夹角小于预设夹角时,智能设备则可以确定第一姿态和第三姿态之间的相似度大于预设相似度,否则,则可以确定第一姿态和第三姿态之间的相似度不大于预设相似度。After determining the angle between the first posture and the third posture, the smart device may determine whether the angle is less than a preset angle, and when the angle is less than the preset angle, the smart device may determine the first posture and The similarity between the third postures is greater than the preset similarity, otherwise, it may be determined that the similarity between the first posture and the third posture is not greater than the preset similarity.
当第一姿态和第三姿态相似时,智能设备可以将该第三姿态对应的分值更新为第一分值,也即是,将该第三姿态对应的分值增加第二预设分值,以此来指示该条记录的可靠性的上升。与此同时,智能设备可以将该第三姿态作为第二姿态,此时,智能设备可以确定查找到了第二姿态。When the first posture and the third posture are similar, the smart device may update the score corresponding to the third gesture to a first score, that is, increase the score corresponding to the third gesture by a second preset score. In order to indicate the increase in the reliability of the record. At the same time, the smart device can use the third gesture as the second gesture, and at this time, the smart device can determine that the second gesture is found.
当第一姿态和第三姿态不相似时,智能设备可以将该第三姿态对应的分值更新为第二分值,也即是,将该第三姿态对应的分值减小第二预设分值,以此来指示该条记录的可靠性在下降。当将第三姿态对应的分值更新为第二分值之后,由于第二分值相较于之前的分值减小了,因此,智能设备可以进一步的判断该条记录的分值是否大于分值的下限值,从而来决定是否将该条记录中包括的第三姿态作为第二姿态来对第一姿态进行校正。When the first posture and the third posture are not similar, the smart device may update the score corresponding to the third gesture to a second score, that is, reduce the score corresponding to the third gesture to the second preset. A score is used to indicate that the reliability of the record is declining. After updating the score corresponding to the third gesture to the second score, since the second score is reduced compared to the previous score, the smart device may further determine whether the score of the record is greater than the score. The lower limit value of the value is used to determine whether the third posture included in the record is used as the second posture to correct the first posture.
其中,在本申请实施例中,分值的下限值可以为0,智能设备可以判断第三姿态对应的第二分值是否大于0,当第二分值大于0时,则可以将第三姿态作为第二姿态,也即是,智能设备可以确定查找到了第二姿态。当第二分值不大于0,则说明该第三姿态不能作为第二姿态,也即是,智能设备可以确定未查找到第二姿态。也就是说,如果第二分值大于0,那么,则可以认为第三姿态仍可用。如果第二分值不大于0,那么,则认为该条记录的可靠性太低,第三姿态已不可用,此时,则说明该第三姿态不可以作为第二姿态,也即是,智能设备未在姿态映射表中查找到第二姿态。于此同时,由于该条记录的可靠性太低,分值已经低于下限值,第三姿态已不可用,因此,智能设备可以将第二磁力向量、第 三姿态和对应的分值这条记录从姿态映射表中删除,并将第一磁力向量、第一姿态和第一预设分值存储在所述姿态映射表中,或者,智能设备可以直接用第一磁力向量、第一姿态和第一预设分值对该姿态映射表中包括第二磁力向量、第三姿态和对应的分值的记录进行更新。In the embodiment of the present application, the lower limit value of the score may be 0, and the smart device may determine whether the second score corresponding to the third gesture is greater than 0, and when the second score is greater than 0, the third value may be The gesture is the second gesture, that is, the smart device can determine that the second gesture is found. When the second score is not greater than 0, it indicates that the third gesture cannot be the second gesture, that is, the smart device can determine that the second gesture is not found. That is, if the second score is greater than 0, then the third pose can be considered still available. If the second score is not greater than 0, then the reliability of the record is considered to be too low, and the third gesture is no longer available. At this time, it indicates that the third gesture cannot be used as the second gesture, that is, intelligence. The device did not find the second pose in the pose mapping table. At the same time, since the reliability of the record is too low, the score is already lower than the lower limit, and the third pose is no longer available. Therefore, the smart device can set the second magnetic vector, the third pose, and the corresponding score. The strip record is deleted from the gesture mapping table, and the first magnetic force vector, the first posture and the first preset score are stored in the gesture mapping table, or the smart device can directly use the first magnetic force vector and the first posture. The record including the second magnetic force vector, the third posture, and the corresponding score in the gesture mapping table is updated with the first preset score.
需要说明的是,第二预设分值可以为小于第一预设分值的数值,例如,第二预设分值可以为1分,也即是,姿态映射表中的分值更新一次,即增加或减少1分。进一步的,由于IMU采集数据的采样周期较短,也就说,每相邻两个采样时刻之间的间隔比较短,基于此,如果第二预设分值设置的较大,而第一预设分值相对于分值的上限值设置的较小,那么,当某条记录中的分值在连续的多个采样时刻连续减小时,在极短的时间内,该条记录中的分值将会减小到分值的下限值。由此可知,该第二预设分值还可以在综合考虑第一预设分值、分值的上限值和分值的下限值的基础上进行设置。It should be noted that the second preset score may be a value smaller than the first preset score. For example, the second preset score may be 1 point, that is, the score in the gesture mapping table is updated once. That is, increase or decrease by 1 point. Further, since the sampling period of the IMU data is short, that is, the interval between each adjacent two sampling moments is relatively short, based on which, if the second preset score is set to be larger, the first pre- Let the score be set relatively small with respect to the upper limit of the score. Then, when the score in a record is continuously decreased at consecutive multiple sampling times, the score in the record is in a very short time. The value will be reduced to the lower limit of the score. It can be seen that the second preset score can also be set based on comprehensively considering the first preset score, the upper limit of the score, and the lower limit of the score.
在一种实现方式中,智能设备在更新第三姿态所对应的分值时,还可以根据第三姿态与第一姿态之间的相似程度进行更新。其中,由于第三姿态和第一姿态是否相似是通过计算两个姿态之间的夹角来确定的,因此,智能设备还可以进一步的根据两个姿态之间的夹角来划分两个姿态之间的相似程度,当两个姿态之间相似时,相似程度越高,则第三姿态所对应的分值增加的越多,也即是,第二预设分值越大,相似程度越低,则第三姿态所对应的分值增加的越少,也即是,第二预设分值越小。同理,当两个姿态之间不相似时,如果两个姿态之间不相似的程度越高,则第三姿态所对应的分值减少的越多,也即第二预设分值越大,不相似的程度越低,则第三姿态所对应的分值减少的越少,也即第二预设分值越小。In an implementation manner, when updating the score corresponding to the third gesture, the smart device may further update according to the degree of similarity between the third gesture and the first gesture. Wherein, since the third posture and the first posture are similarly determined by calculating an angle between the two postures, the smart device can further divide the two postures according to the angle between the two postures. The degree of similarity, when the two poses are similar, the higher the degree of similarity, the more the score corresponding to the third pose increases, that is, the second preset score is larger, the degree of similarity is lower. The less the score corresponding to the third gesture is increased, that is, the second preset score is smaller. Similarly, when the two poses are not similar, if the degree of dissimilarity between the two poses is higher, the score corresponding to the third pose is reduced, that is, the second preset score is larger. The lower the degree of dissimilarity, the less the score corresponding to the third gesture is reduced, that is, the second preset score is smaller.
在一些实施方式中,智能设备可以将0度到预设角度之间的角度范围划分为多个区间,每个区间对应一个相似程度和一个分值,越靠近0度的区间,相似程度越高,对应的分值越大。例如,预设角度为α,智能设备可以将[0,α]划分为三个区间,分别为
Figure PCTCN2018084233-appb-000006
Figure PCTCN2018084233-appb-000007
其中,
Figure PCTCN2018084233-appb-000008
对应的相似程度最高,对应的分值也最大,假设为3分。
Figure PCTCN2018084233-appb-000009
对应的相似程度低于
Figure PCTCN2018084233-appb-000010
对应的相似程度,对应的分值也大于
Figure PCTCN2018084233-appb-000011
对应分值,可以为2分,
Figure PCTCN2018084233-appb-000012
对应的相似程度最低,对应的分值也最小,可以为1分。
In some embodiments, the smart device may divide the angular range between 0 degrees and the preset angle into multiple intervals, each interval corresponding to a similarity degree and a score, and the closer to the 0 degree interval, the higher the similarity degree. The corresponding score is larger. For example, if the preset angle is α, the smart device can divide [0, α] into three intervals, respectively
Figure PCTCN2018084233-appb-000006
with
Figure PCTCN2018084233-appb-000007
among them,
Figure PCTCN2018084233-appb-000008
The corresponding degree of similarity is the highest, and the corresponding score is also the largest, assuming 3 points.
Figure PCTCN2018084233-appb-000009
Corresponding similarity is lower than
Figure PCTCN2018084233-appb-000010
Corresponding degree of similarity, the corresponding score is also greater than
Figure PCTCN2018084233-appb-000011
Corresponding to the score, it can be 2 points.
Figure PCTCN2018084233-appb-000012
The corresponding similarity is the lowest, and the corresponding score is also the smallest, which can be 1 point.
如果智能设备通过上述方法查找到第二姿态,则可以执行步骤206,否则, 则可以执行步骤207。If the smart device finds the second gesture by the above method, step 206 may be performed; otherwise, step 207 may be performed.
步骤206:当查找到第二姿态时,基于第一姿态和第二姿态,确定智能设备当前的姿态。Step 206: When the second posture is found, determining the current posture of the smart device based on the first posture and the second posture.
如果智能设备从存储的姿态映射表中查找到第二姿态,那么,智能设备则可以通过该第二姿态对第一姿态进行校正,从而确定得到智能设备当前的姿态。If the smart device finds the second gesture from the stored gesture mapping table, the smart device may correct the first gesture by using the second gesture to determine the current posture of the smart device.
其中,智能设备可以获取第二姿态对应的第二权重,并基于第二权重确定第一权重,之后,智能设备可以基于第一姿态、第一权重、第二姿态和第二权重,确定智能设备当前的姿态。The smart device may obtain the second weight corresponding to the second posture, and determine the first weight based on the second weight, after which the smart device may determine the smart device based on the first posture, the first weight, the second posture, and the second weight. Current posture.
在一些实施方式中,第二姿态实际上是根据第一磁力向量从存储的姿态映射表中获取的姿态,对于从姿态映射表中获取的姿态,智能设备可以统一的设置一个固定的权重来指示第二姿态在校正第一姿态的过程中所起的作用的大小,这个固定的权重也即第二权重,换句话说,第二权重可以是预设权重。In some embodiments, the second gesture is actually a gesture acquired from the stored gesture mapping table according to the first magnetic force vector, and for the gesture acquired from the gesture mapping table, the smart device may uniformly set a fixed weight to indicate The magnitude of the effect of the second gesture in the process of correcting the first pose, this fixed weight is also the second weight, in other words, the second weight may be the preset weight.
在一些实施方式中,智能设备也可以根据第二姿态所对应的分值来确定第二权重。基于前述描述可知,第二姿态实际上就是从存储的姿态映射表中获取的第二磁力向量对应的第三姿态,智能设备可以根据该第三姿态所对应的分值来确定第二权重,当对应的分值越高时,说明该条记录的可靠性越高,也即是,该第二姿态的可靠性越高,此时,该第二权重相应地可以设置的越大,也即是,第二姿态在校正第一姿态中所起的作用越大。这样,智能设备可以根据第二姿态的可靠性来确定第二姿态对应的第二权重,当第二姿态较可靠时,第二权重设置的相对较大,这样,根据第二姿态校正第一姿态得到的智能设备当前的姿态越准确,当第二姿态可靠性较低时,相应地减小第二权重,可以减小第二姿态在对第一姿态校正的过程中的影响,从而有效的避免较大偏差的出现。In some embodiments, the smart device may also determine the second weight according to the score corresponding to the second gesture. Based on the foregoing description, the second gesture is actually a third gesture corresponding to the second magnetic force vector obtained from the stored gesture mapping table, and the smart device may determine the second weight according to the score corresponding to the third gesture. The higher the corresponding score, the higher the reliability of the record, that is, the higher the reliability of the second gesture. In this case, the second weight can be set correspondingly, that is, The greater the effect of the second pose in correcting the first pose. In this way, the smart device can determine the second weight corresponding to the second posture according to the reliability of the second posture. When the second posture is more reliable, the second weight is set relatively larger, so that the first posture is corrected according to the second posture. The more accurate the current posture of the obtained smart device is, the second weight is correspondingly reduced when the reliability of the second posture is low, and the influence of the second posture in the process of correcting the first posture can be reduced, thereby effectively avoiding Large deviations appear.
需要说明的是,上述仅是本申请实施例提供的两种可能的确定第二权重的方式,除此之外,智能设备还可以通过其他方式来实时确定第二权重,例如,智能设备可以根据IMU采集的角速度的大小,来判断智能设备运动的快慢,当运动越慢时,智能设备计算的第一姿态的偏差越小,此时,用于校正该第一姿态的第二姿态的权重就可以设置的相对较小一些。It should be noted that the above is only two possible methods for determining the second weight provided by the embodiment of the present application. In addition, the smart device may determine the second weight in real time by other means, for example, the smart device may be based on The magnitude of the angular velocity collected by the IMU is used to determine the speed of the movement of the smart device. When the motion is slower, the deviation of the first posture calculated by the smart device is smaller. At this time, the weight of the second posture for correcting the first posture is Can be set relatively small.
当获取到第二权重之后,由于在确定智能设备当前的姿态时,是基于第一姿态和第二姿态两个姿态来确定,因此,第二权重和第一权重的和可以为1。基于此,智能设备可以基于第二权重确定得到第一权重。After the second weight is acquired, since the determination is made based on the first posture and the second posture when determining the current posture of the smart device, the sum of the second weight and the first weight may be 1. Based on this, the smart device can determine the first weight based on the second weight.
当确定得到第一权重和第二权重之后,智能设备可以通过以下两种方式来确定智能设备当前的姿态。After determining that the first weight and the second weight are obtained, the smart device may determine the current posture of the smart device in the following two manners.
第一种方式:智能设备可以基于第一姿态、第一权重、第二姿态和第二权重,通过下述公式(7)、公式(8)计算智能设备当前的姿态;The first mode: the smart device may calculate the current posture of the smart device by using the following formulas (7) and (8) based on the first posture, the first weight, the second posture, and the second weight;
Figure PCTCN2018084233-appb-000013
Figure PCTCN2018084233-appb-000013
cosΩ=Q·q             (8)cosΩ=Q·q (8)
其中,Slerp(Q,q,gain)为智能设备当前的姿态,Q为第一姿态,q为第二姿态,gain为第二权重,(1-gain)为第一权重,sin(·)为正弦函数,cos(·)为余弦函数。Where Slerp(Q,q,gain) is the current posture of the smart device, Q is the first posture, q is the second posture, gain is the second weight, (1-gain) is the first weight, and sin(·) is The sine function, cos(·) is a cosine function.
第二种方式:智能设备可以基于第一姿态、第一权重、第二姿态和第二权重,通过下述公式(9)计算智能设备当前的姿态;The second mode: the smart device may calculate the current posture of the smart device by using the following formula (9) based on the first posture, the first weight, the second posture, and the second weight;
Lerp(Q,q,gain)=(1-gain)×Q+gain×q          (9)Lerp(Q,q,gain)=(1-gain)×Q+gain×q (9)
其中,Lerp(Q,q,gain)为智能设备当前的姿态,Q为第一姿态,q为第二姿态,gain为第二权重,(1-gain)为第一权重。Wherein, Lerp(Q, q, gain) is the current posture of the smart device, Q is the first posture, q is the second posture, gain is the second weight, and (1-gain) is the first weight.
步骤207:当未查找到第二姿态时,将第一姿态确定为智能设备当前的姿态。Step 207: When the second posture is not found, the first posture is determined as the current posture of the smart device.
当通过步骤205在存储的姿态映射表中未查找到第二姿态,也就说明存储的姿态映射表中没有符合条件的可以对第一姿态进行校正的第二姿态,在这种情况下,智能设备可以直接将第一姿态确定为智能设备当前的姿态。When the second gesture is not found in the stored gesture mapping table by step 205, it means that there is no qualified second posture in the stored gesture mapping table that can correct the first posture. In this case, the intelligence The device can directly determine the first posture as the current posture of the smart device.
在本申请实施例中,智能设备可以根据IMU采集的运动数据和最近一次确定的智能设备的姿态确定第一姿态,之后,智能设备可以基于磁力传感器采集的第一磁力向量从存储的磁力向量、姿态和分值的姿态映射表中查找第二姿态,如果查找到第二姿态,那么,智能设备可以通过该第二姿态对第一姿态进行校正,从而得到智能设备当前的姿态,如果未查找到第二姿态,那么,智能设备则可以直接将第一姿态确定为智能设备当前的姿态。由此可见,在本申请实施例中,智能设备并没有直接根据第一磁力向量来计算第二姿态,如果直接采用第一磁力向量计算姿态的偏航角,由于第一磁力向量直接参与运算,因此,对影响该第一磁力向量的准确性的磁场环境的要求将非常严格,而本申请实施例中利用第一磁力向量根据存储的姿态映射表查找第二姿态,第一磁力向量并不需要直接参与运算得到第二姿态,因此,相较于直接采用第一磁力向量计算偏航角而言,对周围环境磁场的要求更加宽松,适用场合更加广泛。另外,在本申请实施例中,存储的姿态映射表中每条记录中不仅包括磁力向量和对应的姿 态,还包括用于指示该条记录中磁力向量对应的姿态的可靠性的分值,这样,每次在查找第二姿态的过程中,在第一磁力向量与记录中的磁力向量相似的情况下,通过将记录中的姿态与第一姿态进行比对来对对应的分值进行更新,从而对该条记录的可靠性进行更新,当该条记录的可靠性不满足条件时,则可以及时对该条记录进行删除和更新,从而保证该姿态映射表中的记录的准确性,进而保证从该姿态映射表中查找到的用于校正第一姿态的第二姿态的准确性,间接的保证了确定得到的智能设备当前的姿态的准确性。在一些实施方式中,智能设备还可以根据分值确定第二姿态在计算智能设备当前的姿态的过程中所占的权重,当第二姿态所对应的分值较小时,表明第二姿态的可靠性较低,此时,通过减小第二姿态所对应的权重,可以减小第二姿态在确定智能设备当前的姿态的过程中所起的作用,有效减小了由于第二姿态不可靠而导致出现姿态偏差的风险。当第二姿态所对应的分值较大时,表明第二姿态的可靠性较高,此时,通过增大第二姿态所对应的权重,可以增大第二姿态在确定智能设备当前的姿态的过程中所起的作用,进而提高确定的智能设备当前的姿态的准确性。In the embodiment of the present application, the smart device may determine the first posture according to the motion data collected by the IMU and the posture of the smart device determined last time, after which the smart device may extract the magnetic vector from the stored magnetic force vector based on the first magnetic force vector collected by the magnetic sensor. Finding a second gesture in the gesture mapping table of the gesture and the score. If the second gesture is found, the smart device can correct the first gesture by using the second gesture, thereby obtaining the current posture of the smart device, if not found. The second gesture, then, the smart device can directly determine the first gesture as the current posture of the smart device. Therefore, in the embodiment of the present application, the smart device does not directly calculate the second posture according to the first magnetic force vector. If the first magnetic force vector is directly used to calculate the yaw angle of the posture, since the first magnetic force vector directly participates in the operation, Therefore, the requirement of the magnetic field environment that affects the accuracy of the first magnetic force vector is very strict. In the embodiment of the present application, the first magnetic force vector is used to find the second posture according to the stored attitude mapping table, and the first magnetic vector does not need to be used. Direct participation in the calculation to obtain the second attitude, therefore, compared to the direct use of the first magnetic vector to calculate the yaw angle, the requirements for the surrounding magnetic field are more relaxed, and the application is more extensive. In addition, in the embodiment of the present application, each record in the stored gesture mapping table includes not only a magnetic force vector and a corresponding posture, but also a score for indicating the reliability of the posture corresponding to the magnetic force vector in the record, such that In the process of searching for the second posture, in the case that the first magnetic force vector is similar to the magnetic vector in the record, the corresponding score is updated by comparing the posture in the record with the first posture. Therefore, the reliability of the record is updated. When the reliability of the record does not satisfy the condition, the record can be deleted and updated in time, thereby ensuring the accuracy of the record in the pose mapping table, thereby ensuring The accuracy of the second posture for correcting the first posture found in the attitude mapping table indirectly ensures the accuracy of the current posture of the obtained smart device. In some embodiments, the smart device may further determine, according to the score, a weight occupied by the second gesture in calculating a current posture of the smart device, and when the score corresponding to the second posture is smaller, indicating that the second posture is reliable The performance is low. At this time, by reducing the weight corresponding to the second posture, the role of the second posture in determining the current posture of the smart device can be reduced, and the second posture is effectively reduced. The risk of causing a deviation in posture. When the score corresponding to the second posture is large, it indicates that the reliability of the second posture is high. At this time, by increasing the weight corresponding to the second posture, the second posture can be increased to determine the current posture of the smart device. The role played by the process, which in turn improves the accuracy of the current posture of the identified smart device.
除此之外,通过本申请实施例中对存储的姿态映射表中的记录进行实时更新和删除的方法,还可以有效的对抗磁场干扰,使得智能设备能够很好的适应磁场变化。接下来,本申请实施例将通过以下的具体示例来对上述所能达到的对抗磁场干扰的有益效果进行说明。In addition, the method for real-time updating and deleting the records in the stored gesture mapping table in the embodiment of the present application can also effectively resist the magnetic field interference, so that the smart device can adapt to the magnetic field change very well. Next, the embodiments of the present application will explain the beneficial effects of the above-mentioned anti-magnetic field interference that can be achieved by the following specific examples.
第一种情况:假设周围环境磁场发生变化,例如变化的过程小于1秒(下文中以1秒代称),之后恢复了原本的磁场,也即是,智能设备受到极短时间的干扰,之后恢复到了原来的磁场环境。在这种情况下,在这1秒内,由于磁场发生变化,根据IMU采集的数据计算的第一姿态与根据第一磁力向量查找到第二姿态将不相似,也即是,存储的姿态映射表中第二姿态对应的分值将在短时间内减小,而在第二姿态对应的分值减小的过程中,当基于第一姿态和第二姿态确定智能设备当前的姿态时,由于第二权重的存在,在这1秒内,即使出现误差,也不会很大,尤其是当第二权重是根据对应的分值进行确定时,那么,第二姿态在确定智能设备当前的姿态的过程中所占的权重会随着分值的减小不断减小,磁场变化对智能设备的干扰就更小。当1秒之后恢复到原本的磁场时,存储的姿态映射表中的第二姿态对应的分值又会逐渐更新,重新建立起符合当前磁场环境的更为准确的记录。The first case: assuming that the surrounding magnetic field changes, for example, the process of change is less than 1 second (hereinafter referred to as 1 second), and then the original magnetic field is restored, that is, the smart device is subjected to extremely short time interference, and then recovered. In the original magnetic field environment. In this case, in this 1 second, due to the change of the magnetic field, the first posture calculated according to the data collected by the IMU is not similar to the second posture obtained according to the first magnetic force vector, that is, the stored attitude map. The score corresponding to the second gesture in the table will decrease in a short time, and in the process of decreasing the score corresponding to the second gesture, when the current posture of the smart device is determined based on the first posture and the second posture, The existence of the second weight, within this 1 second, even if there is an error, it will not be very large, especially when the second weight is determined according to the corresponding score, then the second gesture determines the current posture of the smart device. The weight of the process will decrease with the decrease of the score, and the disturbance of the magnetic field will have less interference to the smart device. When the original magnetic field is restored after 1 second, the score corresponding to the second posture in the stored attitude map is gradually updated, and a more accurate record conforming to the current magnetic field environment is newly established.
第二种情况:假设周围环境磁场发生变化且未恢复到原本的磁场,而是最终稳定在另一种磁场状态下。在这种情况下,一段时间内基于第一姿态和第二姿态确定智能设备当前的姿态时可能会存在误差,但是,由于第二权重的存在,误差相对较小,也即是,可以有效的抵抗磁场干扰。并且,由于在这个过程中,存储的姿态映射表中的每条记录中的分值会由于磁场变化导致的第一姿态和第二姿态不相似而一直减小,因此,最终存储的姿态映射表中的记录会逐渐被删除或更新,也即是,该姿态映射表中包括的记录将由于磁场变化而逐渐被一一更新,最终得到稳定后的另一种磁场状态所对应的姿态映射表,相当于智能设备最终适应了稳定后的磁场环境,并且适应的过程是平缓过渡的。The second case: assuming that the surrounding magnetic field changes and does not return to the original magnetic field, but eventually stabilizes under another magnetic field. In this case, there may be an error when determining the current posture of the smart device based on the first posture and the second posture for a period of time, but due to the existence of the second weight, the error is relatively small, that is, it can be effective. Resist magnetic field interference. Moreover, since in this process, the scores in each record in the stored pose map may be reduced due to the dissimilarity of the first pose and the second pose due to the change of the magnetic field, the finally stored pose map The records in the record are gradually deleted or updated, that is, the records included in the pose mapping table are gradually updated one by one due to the change of the magnetic field, and finally the attitude map corresponding to the other magnetic field state after stabilization is obtained. It is equivalent to the smart device finally adapting to the stable magnetic field environment, and the process of adaptation is a smooth transition.
接下来对本申请实施例提供的确定姿态的装置进行介绍。Next, an apparatus for determining a posture provided by an embodiment of the present application will be described.
参见图3A,本申请实施例提供了一种确定姿态的装置300,该装置300可以集成于智能设备中,该智能设备中配置有IMU和磁力传感器,该智能设备可以为智能手机、平板电脑、VR设备、AR设备等智能设备。该装置300包括:Referring to FIG. 3A, an embodiment of the present application provides a device 300 for determining a posture, where the device 300 can be integrated into a smart device, where the IMU and a magnetic sensor are configured, and the smart device can be a smart phone or a tablet computer. Smart devices such as VR devices and AR devices. The device 300 includes:
第一获取模块301,用于当在当前采样时刻接收到由智能设备中的惯性测量单元IMU采集的运动数据时,获取当前采样时刻之前最近一次确定的智能设备的姿态;The first obtaining module 301 is configured to acquire, when the motion data collected by the inertial measurement unit IMU in the smart device is received at the current sampling moment, the posture of the smart device determined last time before the current sampling moment;
第一确定模块302,用于基于运动数据和最近一次确定的智能设备的姿态确定第一姿态;The first determining module 302 is configured to determine the first posture based on the motion data and the posture of the last determined smart device;
第二获取模块303,用于获取由智能设备中的磁力传感器采集的第一磁力向量;a second acquiring module 303, configured to acquire a first magnetic force vector collected by a magnetic sensor in the smart device;
第一查找模块304,用于基于第一磁力向量从存储的姿态映射表中查找第二姿态,姿态映射表用于指示磁力向量与姿态之间的对应关系;The first searching module 304 is configured to search for a second posture from the stored gesture mapping table based on the first magnetic force vector, where the gesture mapping table is used to indicate a correspondence between the magnetic force vector and the posture;
第二确定模块305,用于当查找到第二姿态时,基于第一姿态和第二姿态,确定智能设备当前的姿态。The second determining module 305 is configured to determine a current posture of the smart device based on the first posture and the second posture when the second posture is found.
在一些实施方式中,第二获取模块303包括:In some embodiments, the second obtaining module 303 includes:
判断子模块,用于判断在当前采样时刻是否接收到由磁力传感器采集的磁力向量;a determining sub-module, configured to determine whether a magnetic force vector acquired by the magnetic sensor is received at the current sampling time;
第一确定子模块,用于当在当前采样时刻接收到由磁力传感器采集的磁力向量时,将接收到的磁力向量确定为第一磁力向量;a first determining submodule, configured to determine the received magnetic force vector as the first magnetic force vector when the magnetic force vector acquired by the magnetic sensor is received at the current sampling moment;
第一获取子模块,用于当在当前采样时刻未接收到由磁力传感器采集的磁力向量时,获取当前采样时刻之前最近一次采集到的磁力向量,并将获取的磁力向量作为第一磁力向量。The first acquiring submodule is configured to acquire a magnetic force vector acquired last time before the current sampling moment when the magnetic force vector acquired by the magnetic sensor is not received at the current sampling moment, and use the acquired magnetic force vector as the first magnetic force vector.
在一些实施方式中,参见图3B,所述姿态映射表还用于指示磁力向量、姿态与分值之间的对应关系;In some embodiments, referring to FIG. 3B, the gesture mapping table is further used to indicate a correspondence between a magnetic force vector, a posture, and a score;
该装置300还包括:The device 300 also includes:
第二查找模块306,用于从存储的姿态映射表中查找与第一磁力向量相似的第二磁力向量;a second searching module 306, configured to search, from the stored attitude mapping table, a second magnetic force vector similar to the first magnetic force vector;
触发模块307,用于当查找到第二磁力向量时,触发第一查找模块基于第一磁力向量从存储的姿态映射表中查找第二姿态;The triggering module 307 is configured to: when the second magnetic force vector is found, trigger the first searching module to search for the second posture from the stored attitude mapping table based on the first magnetic force vector;
第三确定模块308,用于当未查找到第二磁力向量时,将第一磁力向量、第一姿态和第一预设分值对应存储在姿态映射表中,并将第一姿态确定为智能设备当前的姿态。The third determining module 308 is configured to: when the second magnetic force vector is not found, store the first magnetic force vector, the first posture, and the first preset score in the gesture mapping table, and determine the first posture as the smart The current posture of the device.
在一些实施方式中,参见图3C,第一查找模块304包括:In some embodiments, referring to FIG. 3C, the first lookup module 304 includes:
第二获取子模块3041,用于从姿态映射表中获取第二磁力向量所对应的姿态,得到第三姿态;a second obtaining sub-module 3041, configured to acquire a posture corresponding to the second magnetic force vector from the attitude mapping table, to obtain a third posture;
第二确定子模块3042,用于当第一姿态与第三姿态之间的相似度大于预设相似度时,将第三姿态所对应的分值更新为第一分值,并将第三姿态作为第二姿态,第一分值是将第三姿态所对应的分值增加第二预设分值得到;a second determining sub-module 3042, configured to: when the similarity between the first posture and the third posture is greater than the preset similarity, update the score corresponding to the third posture to the first score, and the third posture As the second posture, the first score is obtained by increasing the score corresponding to the third gesture by a second preset score;
查找子模块3043,用于当第一姿态与第三姿态之间的相似度不大于预设相似度时,将第三姿态所对应的分值更新为第二分值,第二分值是将第三姿态所对应的分值减小第二预设分值得到;The sub-module 3043 is configured to: when the similarity between the first posture and the third posture is not greater than the preset similarity, update the score corresponding to the third posture to a second score, where the second score is The score corresponding to the third gesture is decreased by the second preset score;
第三确定子模块3044,用于当第二分值大于0时,将第三姿态作为第二姿态;当第二分值不大于0时,确定未查找到第二姿态。The third determining sub-module 3044 is configured to: when the second score is greater than 0, use the third gesture as the second gesture; and when the second score is not greater than 0, determine that the second gesture is not found.
在一些实施方式中,第一查找模块304还用于:In some embodiments, the first lookup module 304 is further configured to:
将第二磁力向量、第三姿态和第三姿态对应的分值在姿态映射表中的记录进行删除,并将第一磁力向量、第一姿态和第一预设分值对应存储在姿态映射表中。Deleting the records corresponding to the second magnetic force vector, the third posture, and the third posture in the gesture mapping table, and storing the first magnetic force vector, the first posture, and the first preset score in the attitude mapping table. in.
在一些实施方式中,该装置300还用于:In some embodiments, the apparatus 300 is further configured to:
当未查找到第二姿态时,将第一姿态确定为智能设备当前的姿态。When the second gesture is not found, the first gesture is determined as the current posture of the smart device.
在一些实施方式中,参见图3D,第二确定模块305包括:In some embodiments, referring to FIG. 3D, the second determining module 305 includes:
第三获取子模块3051,用于获取第二姿态对应的第二权重,并基于第二权重确定第一姿态对应的第一权重,第二权重为预设权重,或者是根据第二姿态对应的分值确定得到;The third obtaining sub-module 3051 is configured to acquire a second weight corresponding to the second posture, and determine a first weight corresponding to the first posture based on the second weight, where the second weight is a preset weight, or is corresponding to the second posture The score is determined;
第四确定子模块3052,用于基于第一姿态、第一权重、第二姿态和第二权重,确定智能设备当前的姿态。The fourth determining submodule 3052 is configured to determine a current posture of the smart device based on the first posture, the first weight, the second posture, and the second weight.
在一些实施方式中,第四确定子模块3052具体用于:In some embodiments, the fourth determining submodule 3052 is specifically configured to:
基于第一姿态、第一权重、第二姿态和第二权重,通过下述公式(7)、公式(8)计算智能设备当前的姿态。Based on the first posture, the first weight, the second posture, and the second weight, the current posture of the smart device is calculated by the following formulas (7) and (8).
在一些实施方式中,第四确定子模块3052具体用于:In some embodiments, the fourth determining submodule 3052 is specifically configured to:
基于第一姿态、第一权重、第二姿态和第二权重,通过下述公式(9)计算智能设备当前的姿态。Based on the first posture, the first weight, the second posture, and the second weight, the current posture of the smart device is calculated by the following formula (9).
综上所述,本申请实施例在获取到第一磁力向量之后,并不是直接根据第一磁力向量计算得到姿态的偏航角,而是利用该第一磁力向量,根据存储的对应关系确定第二姿态。如果直接采用第一磁力向量计算姿态的偏航角,由于第一磁力向量直接参与运算,因此,对影响该第一磁力向量的准确性的磁场环境的要求将非常严格,而本申请实施例中利用第一磁力向量根据存储的姿态映射表确定第二姿态,第一磁力向量并不需要直接参与运算得到第二姿态,因此,相较于直接采用第一磁力向量计算偏航角而言,对周围环境磁场的要求更加宽松,适用场合更加广泛。In summary, after acquiring the first magnetic force vector, the embodiment of the present application does not directly calculate the yaw angle of the posture according to the first magnetic force vector, but uses the first magnetic force vector to determine the first according to the stored correspondence relationship. Two gestures. If the first magnetic force vector is directly used to calculate the yaw angle of the attitude, since the first magnetic force vector directly participates in the operation, the requirement of the magnetic field environment that affects the accuracy of the first magnetic vector is very strict, and in the embodiment of the present application, Determining the second posture according to the stored attitude map by using the first magnetic force vector, the first magnetic vector does not need to directly participate in the operation to obtain the second posture, and therefore, compared to directly calculating the yaw angle by using the first magnetic vector, The requirements of the surrounding magnetic field are more relaxed and applicable to a wider range of applications.
需要说明的是:上述实施例提供的确定姿态的装置在确定姿态时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的确定姿态的装置与确定姿态的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when determining the posture, the apparatus for determining the posture provided by the foregoing embodiment is only illustrated by the division of each functional module, and in actual application, the function distribution may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for determining the posture provided by the foregoing embodiment is the same as the method embodiment for determining the posture, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
图4示出了本申请一个示例性实施例提供的智能设备400的结构框图。该智能设备400可以是:智能手机、平板电脑、VR设备、AR设备、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面 3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器。FIG. 4 is a structural block diagram of a smart device 400 provided by an exemplary embodiment of the present application. The smart device 400 can be: a smart phone, a tablet computer, a VR device, an AR device, an MP3 player (Moving Picture Experts Group Audio Layer III), and a MP4 (Moving Picture Experts Group Audio Layer IV). , motion imaging experts compress the standard audio layer 4) player.
通常,智能设备400包括有:处理器401和存储器402。Generally, the smart device 400 includes a processor 401 and a memory 402.
处理器401可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器401可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器401也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器401可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器401还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。 Processor 401 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 401 can use at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve. The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of content that needs to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
存储器402可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器402还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器402中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器401所执行以实现本申请中方法实施例提供的确定姿态的方法。 Memory 402 can include one or more computer readable storage media, which can be non-transitory. Memory 402 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer readable storage medium in memory 402 is for storing at least one instruction for execution by processor 401 to implement the determined pose provided by the method embodiments of the present application. Methods.
在一些实施例中,智能设备400还可选包括有:外围设备接口403和至少一个外围设备。处理器401、存储器402和外围设备接口403之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口403相连。具体地,外围设备包括:射频电路404、显示屏405、摄像头组件406、音频电路407、定位组件408和电源409中的至少一种。In some embodiments, the smart device 400 also optionally includes a peripheral device interface 403 and at least one peripheral device. The processor 401, the memory 402, and the peripheral device interface 403 may be connected by a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 403 via a bus, signal line or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 404, a display screen 405, a camera assembly 406, an audio circuit 407, a positioning component 408, and a power source 409.
外围设备接口403可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器401和存储器402。在一些实施例中,处理器401、存储器402和外围设备接口403被集成在同一芯片或电路板上;在一些其他实施例中,处理器401、存储器402和外围设备接口403中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 403 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 401 and the memory 402. In some embodiments, processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any of processor 401, memory 402, and peripheral interface 403 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路404用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路404通过电磁信号与通信网络以及其他通信设备进行通信。射频电路404将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路404包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路404可以通过至少一种无线通信协议来与其它智能设备进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路404还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The RF circuit 404 is configured to receive and transmit an RF (Radio Frequency) signal, also referred to as an electromagnetic signal. Radio frequency circuit 404 communicates with the communication network and other communication devices via electromagnetic signals. The RF circuit 404 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. Radio frequency circuitry 404 can communicate with other smart devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to, the World Wide Web, a metropolitan area network, an intranet, generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 404 may further include a NFC (Near Field Communication) related circuit, which is not limited in this application.
显示屏405用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏405是触摸显示屏时,显示屏405还具有采集在显示屏405的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器401进行处理。此时,显示屏405还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏405可以为一个,设置智能设备400的前面板;在另一些实施例中,显示屏405可以为至少两个,分别设置在智能设备400的不同表面或呈折叠设计;在再一些实施例中,显示屏405可以是柔性显示屏,设置在智能设备400的弯曲表面上或折叠面上。甚至,显示屏405还可以设置成非矩形的不规则图形,也即异形屏。显示屏405可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 405 is used to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When display 405 is a touch display, display 405 also has the ability to acquire touch signals over the surface or surface of display 405. The touch signal can be input to the processor 401 for processing as a control signal. At this time, the display screen 405 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display screen 405 may be one, and the front panel of the smart device 400 is disposed; in other embodiments, the display screen 405 may be at least two, respectively disposed on different surfaces of the smart device 400 or in a folded design. In still other embodiments, the display screen 405 can be a flexible display screen disposed on a curved surface or a folded surface of the smart device 400. Even the display screen 405 can be set to a non-rectangular irregular pattern, that is, a profiled screen. The display screen 405 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
摄像头组件406用于采集图像或视频。可选地,摄像头组件406包括前置摄像头和后置摄像头。通常,前置摄像头设置在智能设备的前面板,后置摄像头设置在智能设备的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件406还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。 Camera component 406 is used to capture images or video. Optionally, camera assembly 406 includes a front camera and a rear camera. Typically, the front camera is placed on the front panel of the smart device and the rear camera is placed on the back of the smart device. In some embodiments, the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions. In some embodiments, camera assembly 406 can also include a flash. The flash can be a monochrome temperature flash or a two-color temperature flash. The two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
音频电路407可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器401进行处理,或者输入至射频电路404以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在智能设备400的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器401或射频电路404的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路407还可以包括耳机插孔。The audio circuit 407 can include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing to the processor 401 for processing, or input to the RF circuit 404 for voice communication. For the purpose of stereo acquisition or noise reduction, the microphones may be multiple, and are respectively disposed at different parts of the smart device 400. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is then used to convert electrical signals from the processor 401 or the RF circuit 404 into sound waves. The speaker can be a conventional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can the electrical signal be converted into human audible sound waves, but also the electrical signal can be converted into sound waves that are inaudible to humans for ranging and the like. In some embodiments, audio circuit 407 can also include a headphone jack.
定位组件408用于定位智能设备400的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件408可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统或俄罗斯的伽利略系统的定位组件。The location component 408 is used to locate the current geographic location of the smart device 400 to implement navigation or LBS (Location Based Service). The positioning component 408 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, or a Russian Galileo system.
电源409用于为智能设备400中的各个组件进行供电。电源409可以是交流电、直流电、一次性电池或可充电电池。当电源409包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。 Power source 409 is used to power various components in smart device 400. The power source 409 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 409 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged by a wired line, and a wireless rechargeable battery is a battery that is charged by a wireless coil. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,智能设备400还包括有一个或多个传感器410。该一个或多个传感器410包括但不限于:加速度传感器411、陀螺仪传感器412、压力传感器413、指纹传感器414、光学传感器415、接近传感器416以及磁力传感器417。In some embodiments, smart device 400 also includes one or more sensors 410. The one or more sensors 410 include, but are not limited to, an acceleration sensor 411, a gyro sensor 412, a pressure sensor 413, a fingerprint sensor 414, an optical sensor 415, a proximity sensor 416, and a magnetic sensor 417.
加速度传感器411可以检测以智能设备400建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器411可以用于检测重力加速度在三个坐标轴上的分量。处理器401可以根据加速度传感器411采集的重力加速度信号,控制触摸显示屏405以横向视图或纵向视图进行用户界面的显示。加速度传感器411还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 411 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the smart device 400. For example, the acceleration sensor 411 can be used to detect components of gravity acceleration on three coordinate axes. The processor 401 can control the touch display screen 405 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 can also be used for the acquisition of game or user motion data.
陀螺仪传感器412可以检测智能设备400的机体方向及转动角度,陀螺仪传感器412可以与加速度传感器411协同采集用户对智能设备400的3D动作。处理器401根据陀螺仪传感器412采集的数据,可以实现如下功能:动作感应 (比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 412 can detect the body direction and the rotation angle of the smart device 400, and the gyro sensor 412 can cooperate with the acceleration sensor 411 to collect the user's 3D motion on the smart device 400. The processor 401 can realize functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation, based on the data collected by the gyro sensor 412.
压力传感器413可以设置在智能设备400的侧边框和/或触摸显示屏405的下层。当压力传感器413设置在智能设备400的侧边框时,可以检测用户对智能设备400的握持信号,由处理器401根据压力传感器413采集的握持信号进行左右手识别或快捷操作。当压力传感器413设置在触摸显示屏405的下层时,由处理器401根据用户对触摸显示屏405的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 413 can be disposed on a side border of the smart device 400 and/or a lower layer of the touch display screen 405. When the pressure sensor 413 is disposed on the side frame of the smart device 400, the user's holding signal to the smart device 400 can be detected, and the processor 401 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed on the lower layer of the touch display screen 405, the operability control on the UI interface is controlled by the processor 401 according to the user's pressure on the touch display screen 405. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
指纹传感器414用于采集用户的指纹,由处理器401根据指纹传感器414采集到的指纹识别用户的身份,或者,由指纹传感器414根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器401授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器414可以被设置智能设备400的正面、背面或侧面。当智能设备400上设置有物理按键或厂商Logo时,指纹传感器414可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 414 is used to collect the fingerprint of the user. The processor 401 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 401 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like. The fingerprint sensor 414 can be disposed on the front, back, or side of the smart device 400. When the smart device 400 is provided with a physical button or vendor logo, the fingerprint sensor 414 can be integrated with a physical button or vendor logo.
光学传感器415用于采集环境光强度。在一个实施例中,处理器401可以根据光学传感器415采集的环境光强度,控制触摸显示屏405的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏405的显示亮度;当环境光强度较低时,调低触摸显示屏405的显示亮度。在另一个实施例中,处理器401还可以根据光学传感器415采集的环境光强度,动态调整摄像头组件406的拍摄参数。Optical sensor 415 is used to collect ambient light intensity. In one embodiment, the processor 401 can control the display brightness of the touch display screen 405 based on the ambient light intensity acquired by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 405 is lowered. In another embodiment, the processor 401 can also dynamically adjust the shooting parameters of the camera assembly 406 based on the ambient light intensity acquired by the optical sensor 415.
接近传感器416,也称距离传感器,通常设置在智能设备400的前面板。接近传感器416用于采集用户与智能设备400的正面之间的距离。在一个实施例中,当接近传感器416检测到用户与智能设备400的正面之间的距离逐渐变小时,由处理器401控制触摸显示屏405从亮屏状态切换为息屏状态;当接近传感器416检测到用户与智能设备400的正面之间的距离逐渐变大时,由处理器401控制触摸显示屏405从息屏状态切换为亮屏状态。Proximity sensor 416, also referred to as a distance sensor, is typically disposed on the front panel of smart device 400. Proximity sensor 416 is used to capture the distance between the user and the front of smart device 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front of the smart device 400 is getting smaller, the touch screen 405 is controlled by the processor 401 to switch from the bright screen state to the touch screen state; when the proximity sensor 416 When it is detected that the distance between the user and the front side of the smart device 400 gradually becomes larger, the processor 401 controls the touch display screen 405 to switch from the state of the screen to the bright state.
磁力传感器417也叫地磁、磁感器,可以检测智能设备400所处环境的磁场强度和方向。在本申请实施例中,可以将加速度传感器411、陀螺仪传感器 412和磁力传感器417结合起来确定智能设备当前的姿态。The magnetic sensor 417, also called geomagnetic and magnetic sensor, can detect the magnetic field strength and direction of the environment in which the smart device 400 is located. In the embodiment of the present application, the acceleration sensor 411, the gyro sensor 412, and the magnetic sensor 417 may be combined to determine the current posture of the smart device.
本领域技术人员可以理解,图4中示出的结构并不构成对智能设备400的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art will appreciate that the structure illustrated in FIG. 4 does not constitute a limitation to smart device 400, may include more or fewer components than illustrated, or may combine certain components, or employ different component arrangements.
本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述任一方法实施例的步骤。The embodiment of the present application provides a computer readable storage medium having instructions stored thereon, the instructions being executed by a processor to implement the steps of any of the foregoing method embodiments.
本申请实施例提供一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一方法实施例的步骤。The embodiment of the present application provides a computer program product that, when run on a computer, causes the computer to perform the steps of any of the above method embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the protection of the present application. Within the scope.

Claims (17)

  1. 一种确定姿态的方法,其特征在于,所述方法包括:A method for determining a posture, the method comprising:
    当在当前采样时刻接收到由智能设备中的惯性测量单元IMU采集的运动数据时,获取当前采样时刻之前最近一次确定的所述智能设备的姿态,并基于所述运动数据和所述最近一次确定的所述智能设备的姿态确定第一姿态;Obtaining, when the motion data collected by the inertial measurement unit IMU in the smart device is received at the current sampling moment, the posture of the smart device that was last determined before the current sampling time, and determining based on the motion data and the last time The posture of the smart device determines a first posture;
    获取由所述智能设备中的磁力传感器采集的第一磁力向量,并基于所述第一磁力向量从存储的姿态映射表中查找第二姿态,所述姿态映射表用于指示磁力向量与姿态之间的对应关系;Obtaining a first magnetic force vector acquired by a magnetic sensor in the smart device, and searching for a second posture from the stored attitude mapping table based on the first magnetic force vector, the gesture mapping table is used to indicate a magnetic force vector and a posture Correspondence between
    当查找到所述第二姿态时,基于所述第一姿态和所述第二姿态,确定所述智能设备当前的姿态。When the second gesture is found, the current posture of the smart device is determined based on the first posture and the second posture.
  2. 根据权利要求1所述的方法,其特征在于,所述获取由所述智能设备中的磁力传感器采集的第一磁力向量,包括:The method according to claim 1, wherein the acquiring the first magnetic force vector collected by the magnetic sensor in the smart device comprises:
    判断在当前采样时刻是否接收到由所述磁力传感器采集的磁力向量;Determining whether a magnetic force vector acquired by the magnetic sensor is received at a current sampling time;
    当在当前采样时刻接收到由所述磁力传感器采集的磁力向量时,将接收到的磁力向量确定为所述第一磁力向量;When the magnetic force vector acquired by the magnetic sensor is received at the current sampling moment, the received magnetic force vector is determined as the first magnetic force vector;
    当在当前采样时刻未接收到由所述磁力传感器采集的磁力向量时,获取当前采样时刻之前最近一次采集到的磁力向量,并将获取的磁力向量作为所述第一磁力向量。When the magnetic force vector acquired by the magnetic sensor is not received at the current sampling time, the magnetic force vector acquired last time before the current sampling time is acquired, and the acquired magnetic force vector is taken as the first magnetic force vector.
  3. 根据权利要求1所述的方法,其特征在于,所述姿态映射表还用于指示磁力向量、姿态与分值之间的对应关系;所述基于所述第一磁力向量从存储的姿态映射表中查找第二姿态之前,还包括:The method according to claim 1, wherein the gesture mapping table is further configured to indicate a correspondence between a magnetic force vector, a posture and a score; and the gesture map based on the first magnetic force vector is stored. Before looking for the second pose, it also includes:
    从所述姿态映射表中查找与所述第一磁力向量相似的第二磁力向量;Finding a second magnetic force vector similar to the first magnetic force vector from the attitude mapping table;
    当查找到所述第二磁力向量时,执行所述基于所述第一磁力向量从存储的姿态映射表中查找第二姿态的步骤;And when the second magnetic force vector is found, performing the step of searching for a second posture from the stored attitude mapping table based on the first magnetic force vector;
    当未查找到所述第二磁力向量时,将所述第一磁力向量、所述第一姿态和第一预设分值对应存储在所述姿态映射表中,并将所述第一姿态确定为所述智能设备当前的姿态。When the second magnetic force vector is not found, the first magnetic force vector, the first posture, and the first preset score are correspondingly stored in the attitude mapping table, and the first posture is determined. The current posture of the smart device.
  4. 根据权利要求3所述的方法,其特征在于,所述基于所述第一磁力向量从存储的姿态映射表中查找第二姿态,包括:The method according to claim 3, wherein the finding the second gesture from the stored gesture mapping table based on the first magnetic force vector comprises:
    从所述姿态映射表中获取所述第二磁力向量所对应的姿态,得到第三姿态;Acquiring a posture corresponding to the second magnetic force vector from the attitude mapping table to obtain a third posture;
    当所述第一姿态与所述第三姿态之间的相似度大于预设相似度时,将所述第三姿态所对应的分值更新为第一分值,并将所述第三姿态作为所述第二姿态,所述第一分值是将所述第三姿态所对应的分值增加第二预设分值得到;When the similarity between the first posture and the third posture is greater than a preset similarity, updating the score corresponding to the third posture to a first score, and using the third gesture as In the second posture, the first score is obtained by adding a score corresponding to the third gesture to a second preset score;
    当所述第一姿态与所述第三姿态之间的相似度不大于所述预设相似度时,将所述第三姿态所对应的分值更新为第二分值,所述第二分值是将所述第三姿态所对应的分值减小所述第二预设分值得到;When the similarity between the first posture and the third posture is not greater than the preset similarity, updating the score corresponding to the third posture to a second score, the second score The value is obtained by decreasing the score corresponding to the third gesture by the second preset score;
    当所述第二分值大于0时,将所述第三姿态作为所述第二姿态;When the second score is greater than 0, the third gesture is taken as the second gesture;
    当所述第二分值不大于0时,确定未查找到所述第二姿态。When the second score is not greater than 0, it is determined that the second gesture is not found.
  5. 根据权利要求4所述的方法,其特征在于,所述确定未查找到所述第二姿态之后,还包括:The method according to claim 4, wherein after the determining does not find the second gesture, the method further comprises:
    将所述第二磁力向量、所述第三姿态和所述第三姿态对应的分值在所述姿态映射表中的记录进行删除,并将所述第一磁力向量、所述第一姿态和所述第一预设分值对应存储在所述姿态映射表中。Deleting the records in the gesture mapping table by the scores corresponding to the second magnetic force vector, the third posture, and the third posture, and the first magnetic force vector, the first posture and The first preset score is correspondingly stored in the gesture mapping table.
  6. 根据权利要求1-5任一所述的方法,其特征在于,所述基于所述第一磁力向量从存储的姿态与映射表中查找第二姿态之后,还包括:The method according to any one of claims 1-5, wherein after the searching for the second gesture from the stored posture and the mapping table based on the first magnetic force vector, the method further comprises:
    当未查找到所述第二姿态时,将所述第一姿态确定为所述智能设备当前的姿态。When the second gesture is not found, the first gesture is determined as the current posture of the smart device.
  7. 根据权利要求1-5任一所述的方法,其特征在于,所述基于所述第一姿态和所述第二姿态,确定所述智能设备当前的姿态,包括:The method according to any one of claims 1-5, wherein the determining the current posture of the smart device based on the first posture and the second posture comprises:
    获取所述第二姿态对应的第二权重,并基于所述第二权重确定所述第一姿态对应的第一权重,所述第二权重为预设权重,或者是根据所述第二姿态对应的分值确定得到;Obtaining a second weight corresponding to the second posture, and determining, according to the second weight, a first weight corresponding to the first posture, where the second weight is a preset weight, or corresponding to the second posture The score is determined;
    基于所述第一姿态、所述第一权重、所述第二姿态和所述第二权重,确定所述智能设备当前的姿态。Determining a current posture of the smart device based on the first posture, the first weight, the second posture, and the second weight.
  8. 根据权利要求7所述的方法,其特征在于,所述基于所述第一姿态、所述第一权重、所述第二姿态和所述第二权重,确定所述智能设备当前的姿态,包括:The method according to claim 7, wherein the determining the current posture of the smart device based on the first posture, the first weight, the second posture, and the second weight comprises :
    基于所述第一姿态、所述第一权重、所述第二姿态和所述第二权重,通过下述公式计算所述智能设备当前的姿态;Calculating a current posture of the smart device by using a formula according to the first posture, the first weight, the second posture, and the second weight;
    Figure PCTCN2018084233-appb-100001
    Figure PCTCN2018084233-appb-100001
    cosΩ=Q·qcosΩ=Q·q
    其中,所述Slerp(Q,q,gain)为所述智能设备当前的姿态,所述Q为所述第一姿态,所述q为所述第二姿态,所述gain为所述第二权重,所述(1-gain)为所述第一权重,sin(·)为正弦函数,cos(·)为余弦函数。The Slerp (Q, q, gain) is the current posture of the smart device, the Q is the first posture, the q is the second posture, and the gain is the second weight The (1-gain) is the first weight, sin(·) is a sine function, and cos(·) is a cosine function.
  9. 根据权利要求7所述的方法,其特征在于,所述基于所述第一姿态、所述第一权重、所述第二姿态和所述第二权重,确定所述智能设备当前的姿态,包括:The method according to claim 7, wherein the determining the current posture of the smart device based on the first posture, the first weight, the second posture, and the second weight comprises :
    基于所述第一姿态、所述第一权重、所述第二姿态和所述第二权重,通过下述公式计算所述智能设备当前的姿态;Calculating a current posture of the smart device by using a formula according to the first posture, the first weight, the second posture, and the second weight;
    Lerp(Q,q,gain)=(1-gain)×Q+gain×qLerp(Q,q,gain)=(1-gain)×Q+gain×q
    其中,所述Lerp(Q,q,gain)为所述智能设备当前的姿态,所述Q为所述第一姿态,所述q为所述第二姿态,所述gain为所述第二权重,所述(1-gain)为所述第一权重。The Lerp (Q, q, gain) is the current posture of the smart device, the Q is the first posture, the q is the second posture, and the gain is the second weight The (1-gain) is the first weight.
  10. 一种确定姿态的装置,其特征在于,所述装置包括:A device for determining a posture, characterized in that the device comprises:
    第一获取模块,用于当在当前采样时刻接收到由智能设备中的惯性测量单元IMU采集的运动数据时,获取当前采样时刻之前最近一次确定的所述智能设备的姿态;a first acquiring module, configured to acquire, when the motion data collected by the inertial measurement unit IMU in the smart device is received at the current sampling moment, the posture of the smart device that is determined last time before the current sampling moment;
    第一确定模块,用于基于所述运动数据和所述最近一次确定的所述智能设备的姿态确定第一姿态;a first determining module, configured to determine a first posture based on the motion data and the posture of the smart device that is last determined;
    第二获取模块,用于获取由所述智能设备中的磁力传感器采集的第一磁力向量;a second acquiring module, configured to acquire a first magnetic force vector collected by a magnetic sensor in the smart device;
    第一查找模块,用于基于所述第一磁力向量从存储的姿态映射表中查找第二姿态,所述姿态映射表用于指示磁力向量与姿态之间的对应关系;a first searching module, configured to search, according to the first magnetic force vector, a second posture from a stored attitude mapping table, where the gesture mapping table is used to indicate a correspondence between a magnetic force vector and a posture;
    第二确定模块,用于当查找到所述第二姿态时,基于所述第一姿态和所述第二姿态,确定所述智能设备当前的姿态。And a second determining module, configured to determine a current posture of the smart device based on the first posture and the second posture when the second posture is found.
  11. 根据权利要求10所述的装置,其特征在于,所述第二获取模块包括:The apparatus according to claim 10, wherein the second obtaining module comprises:
    判断子模块,用于判断在当前采样时刻是否接收到由所述磁力传感器采集的磁力向量;a determining submodule, configured to determine whether a magnetic force vector acquired by the magnetic sensor is received at a current sampling time;
    第一确定子模块,用于当在当前采样时刻接收到由所述磁力传感器采集的磁力向量时,将接收到的磁力向量确定为所述第一磁力向量;a first determining submodule, configured to determine the received magnetic force vector as the first magnetic force vector when receiving the magnetic force vector acquired by the magnetic sensor at the current sampling moment;
    第一获取子模块,用于当在当前采样时刻未接收到由所述磁力传感器采集的磁力向量时,获取当前采样时刻之前最近一次采集到的磁力向量,并将获取的磁力向量作为所述第一磁力向量。a first acquiring submodule, configured to: when the magnetic force vector acquired by the magnetic sensor is not received at the current sampling moment, acquire a magnetic force vector acquired last time before the current sampling time, and use the acquired magnetic force vector as the first A magnetic vector.
  12. 根据权利要求10所述的装置,其特征在于,所述姿态映射表还用于指示磁力向量、姿态与分值之间的对应关系;The apparatus according to claim 10, wherein the gesture mapping table is further configured to indicate a correspondence between a magnetic force vector, a posture, and a score;
    所述装置还包括:The device also includes:
    第二查找模块,用于从所述姿态映射表中查找与所述第一磁力向量相似的第二磁力向量;a second searching module, configured to search, from the gesture mapping table, a second magnetic force vector similar to the first magnetic force vector;
    触发模块,用于当查找到所述第二磁力向量时,触发所述第二确定模块基于所述第一磁力向量从存储的姿态映射表中查找第二姿态;a triggering module, configured to: when the second magnetic force vector is found, trigger the second determining module to search for a second posture from the stored attitude mapping table based on the first magnetic force vector;
    第三确定模块,用于当未查找到所述第二磁力向量时,将所述第一磁力向量、所述第一姿态和第一预设分值对应存储在所述姿态映射表中,并将所述第一姿态确定为所述智能设备当前的姿态。a third determining module, configured to: when the second magnetic force vector is not found, store the first magnetic force vector, the first posture, and the first preset score in the gesture mapping table, and The first posture is determined as the current posture of the smart device.
  13. 根据权利要求12所述的装置,其特征在于,所述第一查找模块包括:The device according to claim 12, wherein the first lookup module comprises:
    第二获取子模块,用于从存储的姿态映射表中获取所述第二磁力向量所对应的姿态,得到第三姿态;a second acquiring submodule, configured to acquire a posture corresponding to the second magnetic force vector from the stored attitude mapping table, to obtain a third posture;
    第二确定子模块,用于当所述第一姿态与所述第三姿态之间的相似度大于预设相似度时,将所述第三姿态所对应的分值更新为第一分值,并将所述第三 姿态作为所述第二姿态,所述第一分值是将所述第三姿态所对应的分值增加第二预设分值得到;a second determining submodule, configured to update a score corresponding to the third gesture to a first score when a similarity between the first gesture and the third gesture is greater than a preset similarity, And the third gesture is used as the second posture, and the first score is obtained by adding a score corresponding to the third gesture to a second preset score;
    查找子模块,用于当所述第一姿态与所述第三姿态之间的相似度不大于所述预设相似度时,将所述第三姿态所对应的分值更新为第二分值,所述第二分值是将所述第三姿态所对应的分值减小所述第二预设分值得到;a sub-module, configured to update a score corresponding to the third gesture to a second score when a similarity between the first gesture and the third gesture is not greater than the preset similarity The second score is obtained by reducing the score corresponding to the third gesture by the second preset score;
    第三确定子模块,用于当所述第二分值大于0时,将所述第三姿态作为所述第二姿态;当所述第二分值不大于0时,确定未查找到所述第二姿态。a third determining submodule, configured to: when the second score is greater than 0, use the third gesture as the second gesture; when the second score is not greater than 0, determine that the The second gesture.
  14. 根据权利要求13所述的装置,其特征在于,所述第一查找模块还用于:The device according to claim 13, wherein the first search module is further configured to:
    将所述第二磁力向量、所述第三姿态和所述第三姿态对应的分值在所述姿态映射表中的记录进行删除,并将所述第一磁力向量、所述第一姿态和所述第一预设分值对应存储在所述姿态映射表中。Deleting the records in the gesture mapping table by the scores corresponding to the second magnetic force vector, the third posture, and the third posture, and the first magnetic force vector, the first posture and The first preset score is correspondingly stored in the gesture mapping table.
  15. 一种智能设备,其特征在于,所述智能设备包括:A smart device, characterized in that the smart device comprises:
    IMU,用于采集运动数据;IMU for collecting motion data;
    磁力传感器,用于采集磁力向量;a magnetic sensor for acquiring a magnetic force vector;
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;a memory for storing the processor executable instructions;
    其中,所述处理器被配置为权利要求1-9所述的任一项方法的步骤。Wherein the processor is configured as the steps of any of the methods of claims 1-9.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述权利要求1-9任一项所述的方法的步骤。A computer readable storage medium, wherein the computer readable storage medium stores instructions that, when executed by a processor, perform the steps of the method of any of the preceding claims 1-9.
  17. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得计算机执行上述权利要求1-9任一项所述的方法的步骤。A computer program product, wherein the computer program product, when run on a computer, causes the computer to perform the steps of the method of any of the preceding claims 1-9.
PCT/CN2018/084233 2018-01-03 2018-04-24 Method and apparatus for determining pose, smart device, storage medium, and program product WO2019134305A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810003966.9A CN108196701B (en) 2018-01-03 2018-01-03 Method and device for determining posture and VR equipment
CN201810003966.9 2018-01-03

Publications (1)

Publication Number Publication Date
WO2019134305A1 true WO2019134305A1 (en) 2019-07-11

Family

ID=62587544

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/084233 WO2019134305A1 (en) 2018-01-03 2018-04-24 Method and apparatus for determining pose, smart device, storage medium, and program product

Country Status (2)

Country Link
CN (1) CN108196701B (en)
WO (1) WO2019134305A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958483A (en) * 2018-06-29 2018-12-07 深圳市未来感知科技有限公司 Rigid body localization method, device, terminal device and storage medium based on interaction pen
CN110530356B (en) * 2019-09-04 2021-11-23 海信视像科技股份有限公司 Pose information processing method, device, equipment and storage medium
CN111522453A (en) * 2020-04-29 2020-08-11 北京小米移动软件有限公司 Data processing method and device and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007086826A1 (en) * 2005-01-18 2007-08-02 Honeywell International Inc. Systems and methods for shock compensation utilizing an adaptive control technique algorithm
CN103822633A (en) * 2014-02-11 2014-05-28 哈尔滨工程大学 Low-cost attitude estimation method based on second-order measurement update
CN106989773A (en) * 2017-04-07 2017-07-28 浙江大学 A kind of attitude transducer and posture renewal method
CN107202597A (en) * 2017-05-09 2017-09-26 深圳市金立通信设备有限公司 A kind of geomagnetic data calibration method and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101915580B (en) * 2010-07-14 2012-09-12 中国科学院自动化研究所 Self-adaptation three-dimensional attitude positioning method based on microinertia and geomagnetic technology
US10353491B2 (en) * 2016-02-17 2019-07-16 Outlyer, LLC System and method for motion processing in mobile devices
CN106095113B (en) * 2016-06-27 2019-02-12 南京睿悦信息技术有限公司 A kind of measuring and calculating of user's posture and virtual reality follow-up method of the fusion of nine axle sensors
CN106767776A (en) * 2016-11-17 2017-05-31 上海兆芯集成电路有限公司 Mobile device and the method for asking for mobile device attitude
CN106598230B (en) * 2016-11-24 2019-07-19 北京小鸟看看科技有限公司 A kind of virtual implementing helmet and the method and apparatus for tracking its spatial attitude information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007086826A1 (en) * 2005-01-18 2007-08-02 Honeywell International Inc. Systems and methods for shock compensation utilizing an adaptive control technique algorithm
CN103822633A (en) * 2014-02-11 2014-05-28 哈尔滨工程大学 Low-cost attitude estimation method based on second-order measurement update
CN106989773A (en) * 2017-04-07 2017-07-28 浙江大学 A kind of attitude transducer and posture renewal method
CN107202597A (en) * 2017-05-09 2017-09-26 深圳市金立通信设备有限公司 A kind of geomagnetic data calibration method and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHENG, WEI ET AL.: "3D Pedestrian Trajectory Tracking Based on Inertial/Magnetic Sensors", ROBOT, vol. 38, no. 4, 15 July 2016 (2016-07-15), pages 445 - 446, XP55618391 *

Also Published As

Publication number Publication date
CN108196701B (en) 2020-06-02
CN108196701A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
US11205282B2 (en) Relocalization method and apparatus in camera pose tracking process and storage medium
US11158083B2 (en) Position and attitude determining method and apparatus, smart device, and storage medium
CN110544280B (en) AR system and method
CN108596976B (en) Method, device and equipment for relocating camera attitude tracking process and storage medium
WO2019205851A1 (en) Pose determination method and device, intelligent apparatus, and storage medium
CN108682038B (en) Pose determination method, pose determination device and storage medium
WO2019205853A1 (en) Method, device and apparatus for repositioning in camera orientation tracking process, and storage medium
US11276183B2 (en) Relocalization method and apparatus in camera pose tracking process, device, and storage medium
WO2019154231A1 (en) Image processing method, electronic device and storage medium
JP7026819B2 (en) Camera positioning method and equipment, terminals and computer programs
CN109166150B (en) Pose acquisition method and device storage medium
CN110986930B (en) Equipment positioning method and device, electronic equipment and storage medium
CN110134744B (en) Method, device and system for updating geomagnetic information
CN109558837B (en) Face key point detection method, device and storage medium
CN111127509B (en) Target tracking method, apparatus and computer readable storage medium
CN108682037B (en) Method, device and equipment for relocating camera attitude tracking process and storage medium
WO2020108041A1 (en) Detection method and device for key points of ear region and storage medium
CN111897429A (en) Image display method, image display device, computer equipment and storage medium
WO2019134305A1 (en) Method and apparatus for determining pose, smart device, storage medium, and program product
WO2022199102A1 (en) Image processing method and device
CN111385525B (en) Video monitoring method, device, terminal and system
WO2021218926A1 (en) Image display method and apparatus, and computer device
CN109388732B (en) Music map generating and displaying method, device and storage medium
CN108347672B (en) Method, device and storage medium for playing audio
WO2019233299A1 (en) Mapping method and apparatus, and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18898721

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18898721

Country of ref document: EP

Kind code of ref document: A1