Head-mounted device, data processing method thereof, and computer-readable storage medium

文档序号:1233667 发布日期:2020-09-11 浏览:24次 中文

阅读说明:本技术 头戴设备及其数据处理方法、计算机可读存储介质 (Head-mounted device, data processing method thereof, and computer-readable storage medium ) 是由 杜文彬 姜滨 迟小羽 于 2020-06-08 设计创作,主要内容包括:本发明公开了一种头戴设备及其数据处理方法、计算机可读存储介质。该头戴设备的数据处理方法包括:获取头戴设备到人体的相对位置,并获取头戴设备的移动数据;将所述相对位置与预设阈值进行比对,根据比对结果确定目标校准系数;根据所述目标校准系数对所述移动数据进行校准处理,得到目标移动数据。本发明能够实现对头戴设备的移动数据进行智能校准,以保证游戏控制数据的准确性,避免影响游戏操作的精确性。(The invention discloses a head-mounted device, a data processing method thereof and a computer readable storage medium. The data processing method of the head-mounted equipment comprises the following steps: acquiring the relative position of the head-mounted equipment to the human body, and acquiring the movement data of the head-mounted equipment; comparing the relative position with a preset threshold value, and determining a target calibration coefficient according to a comparison result; and calibrating the mobile data according to the target calibration coefficient to obtain target mobile data. The invention can realize intelligent calibration of the mobile data of the head-mounted device, so as to ensure the accuracy of the game control data and avoid influencing the accuracy of game operation.)

1. A data processing method of a head-mounted device, the data processing method of the head-mounted device comprising the steps of:

acquiring the relative position of the head-mounted equipment to the human body, and acquiring the movement data of the head-mounted equipment;

comparing the relative position with a preset threshold value, and determining a target calibration coefficient according to a comparison result;

and calibrating the mobile data according to the target calibration coefficient to obtain target mobile data.

2. The data processing method of the head-mounted device according to claim 1, wherein the step of acquiring the relative position of the head-mounted device to the human body comprises:

emitting infrared light through a proximity sensor, and receiving the reflected infrared light to obtain a time interval between the emission time and the receiving time of the infrared light;

and calculating the relative position of the head-mounted equipment to the human body according to the time interval.

3. The data processing method of a head-mounted device according to claim 1, wherein the step of acquiring the movement data of the head-mounted device comprises:

acquiring the angular velocity of the head-wearing device through a gyroscope sensor, and acquiring the linear acceleration of the head-wearing device through an acceleration sensor;

wherein the movement data of the head-mounted device comprises the angular velocity and the linear acceleration.

4. The data processing method of the head-mounted device according to claim 1, wherein the preset threshold includes a first preset threshold and a second preset threshold, the first preset threshold is smaller than the second preset threshold, the comparing the relative position with the preset threshold, and the determining the target calibration coefficient according to the comparison result includes:

comparing the relative position with the first preset threshold and the second preset threshold to obtain a comparison result;

and obtaining a first target calibration coefficient and a second target calibration coefficient according to the comparison result and a mapping relation between a preset position range and a calibration coefficient, wherein the target calibration coefficient comprises the first target calibration coefficient and the second target calibration coefficient.

5. The data processing method of the head-mounted device according to claim 4, wherein before the step of obtaining the first target calibration coefficient and the second target calibration coefficient according to the comparison result and the mapping relationship between the preset position range and the calibration coefficient, the method further comprises:

acquiring a first calibration value of the gyroscope sensor and a second calibration value of the acceleration sensor when the relative position is greater than or equal to the first preset threshold and smaller than the second preset threshold range;

acquiring a third calibration value of the gyroscope sensor and a fourth calibration value of the acceleration sensor when the relative position is in a range smaller than the first preset threshold;

acquiring a fifth calibration value of the gyroscope sensor and a sixth calibration value of the acceleration sensor when the relative position is in a range larger than or equal to the second preset threshold;

and constructing a mapping relation between a position range and a calibration coefficient according to the first calibration value, the second calibration value, the third calibration value, the fourth calibration value, the fifth calibration value and the sixth calibration value.

6. The data processing method of the head-mounted device according to claim 4, wherein the step of constructing the mapping relationship between the obtained position range and the calibration coefficient based on the first calibration value, the second calibration value, the third calibration value, the fourth calibration value, the fifth calibration value, and the sixth calibration value comprises:

carrying out division operation on the third calibration value and the first calibration value to obtain a first calibration coefficient;

dividing the fourth calibration value and the second calibration value to obtain a second calibration coefficient;

performing division operation on the fifth calibration value and the first calibration value to obtain a third calibration coefficient;

dividing the sixth calibration value and the second calibration value to obtain a fourth calibration coefficient;

and constructing a mapping relation between the obtained position range and the calibration coefficient according to the first calibration coefficient, the second calibration coefficient, the third calibration coefficient, the fourth calibration coefficient and a preset calibration coefficient.

7. The data processing method of the head-mounted device according to claim 4, wherein the step of performing calibration processing on the movement data according to the target calibration coefficient to obtain target movement data comprises:

multiplying the first target calibration coefficient by the angular velocity in the mobile data to obtain a target angular velocity;

multiplying the second target calibration coefficient by the linear acceleration in the movement data to obtain a target linear acceleration;

wherein the target movement data includes the target angular velocity and the target linear acceleration.

8. The data processing method of a head-mounted device according to any one of claims 1 to 7, further comprising:

and sending the target movement data to a game end so that the game end can execute corresponding game control operation based on the target movement data.

9. A head-mounted device, characterized in that the head-mounted device comprises: memory, a processor and a data processing program stored on the memory and executable on the processor, the data processing program, when executed by the processor, implementing the steps of the data processing method of a head-mounted device according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that a data processing program is stored thereon, which when executed by a processor implements the steps of the data processing method of a head-mounted device according to any one of claims 1 to 8.

Technical Field

The present invention relates to the field of data processing technologies, and in particular, to a head-mounted device, a data processing method thereof, and a computer-readable storage medium.

Background

With the development of VR (Virtual Reality)/AR (Augmented Reality) technology, VR/AR technology is widely used in various fields. At present, the main application field of the VR/AR technology is the field of games, and the product form is mainly based on the VR/AR product of the external host. The external host-based VR/AR product can provide the best experience to the consumer by virtue of the powerful data processing capability and image rendering capability of the external host (e.g., PC, game host, etc.).

In the game process, the movement data of the head of the human body is adopted through the VR/AR head-mounted equipment and then transmitted to the external host computer, so that the external host computer converts the movement data into game control data, and then corresponding game control operation is executed. However, the VR/AR headset is usually manufactured in a standard way, and when worn by different people, accuracy of the obtained result of the mobile data is affected, so that game control data is inaccurate, and accuracy of game operation is affected.

Disclosure of Invention

The invention mainly aims to provide a head-mounted device, a data processing method thereof and a computer readable storage medium, aiming at realizing intelligent calibration of mobile data of the head-mounted device, so as to ensure the accuracy of game control data and avoid influencing the accuracy of game operation.

In order to achieve the above object, the present invention provides a data processing method of a head-mounted device, the data processing method of the head-mounted device further including:

acquiring the relative position of the head-mounted equipment to the human body, and acquiring the movement data of the head-mounted equipment;

comparing the relative position with a preset threshold value, and determining a target calibration coefficient according to a comparison result;

and calibrating the mobile data according to the target calibration coefficient to obtain target mobile data.

Optionally, the step of acquiring the relative position of the head-mounted device to the human body comprises:

emitting infrared light through a proximity sensor, and receiving the reflected infrared light to obtain a time interval between the emission time and the receiving time of the infrared light;

and calculating the relative position of the head-mounted equipment to the human body according to the time interval.

Optionally, the step of acquiring movement data of the head-mounted device comprises:

acquiring the angular velocity of the head-wearing device through a gyroscope sensor, and acquiring the linear acceleration of the head-wearing device through an acceleration sensor;

wherein the movement data of the head-mounted device comprises the angular velocity and the linear acceleration.

Optionally, the preset threshold includes a first preset threshold and a second preset threshold, the first preset threshold is smaller than the second preset threshold, the step of comparing the relative position with the preset threshold and determining the target calibration coefficient according to the comparison result includes:

comparing the relative position with the first preset threshold and the second preset threshold to obtain a comparison result;

and obtaining a first target calibration coefficient and a second target calibration coefficient according to the comparison result and a mapping relation between a preset position range and a calibration coefficient, wherein the target calibration coefficient comprises the first target calibration coefficient and the second target calibration coefficient.

Optionally, before the step of obtaining the first target calibration coefficient and the second target calibration coefficient according to the comparison result and the mapping relationship between the preset position range and the calibration coefficient, the method further includes:

acquiring a first calibration value of the gyroscope sensor and a second calibration value of the acceleration sensor when the relative position is greater than or equal to the first preset threshold and smaller than the second preset threshold range;

acquiring a third calibration value of the gyroscope sensor and a fourth calibration value of the acceleration sensor when the relative position is in a range smaller than the first preset threshold;

acquiring a fifth calibration value of the gyroscope sensor and a sixth calibration value of the acceleration sensor when the relative position is in a range larger than or equal to the second preset threshold;

and constructing a mapping relation between a position range and a calibration coefficient according to the first calibration value, the second calibration value, the third calibration value, the fourth calibration value, the fifth calibration value and the sixth calibration value.

Optionally, the step of constructing a mapping relationship between the position range and the calibration coefficient according to the first calibration value, the second calibration value, the third calibration value, the fourth calibration value, the fifth calibration value and the sixth calibration value includes:

carrying out division operation on the third calibration value and the first calibration value to obtain a first calibration coefficient;

dividing the fourth calibration value and the second calibration value to obtain a second calibration coefficient;

performing division operation on the fifth calibration value and the first calibration value to obtain a third calibration coefficient;

dividing the sixth calibration value and the second calibration value to obtain a fourth calibration coefficient;

and constructing a mapping relation between the obtained position range and the calibration coefficient according to the first calibration coefficient, the second calibration coefficient, the third calibration coefficient, the fourth calibration coefficient and a preset calibration coefficient.

Optionally, the step of processing the movement data according to the target calibration coefficient to obtain target movement data includes:

multiplying the first target calibration coefficient by the angular velocity in the mobile data to obtain a target angular velocity;

multiplying the second target calibration coefficient by the linear acceleration in the movement data to obtain a target linear acceleration;

wherein the target movement data includes the target angular velocity and the target linear acceleration.

Optionally, the data processing method of the head-mounted device further includes:

and sending the target movement data to a game end so that the game end can execute corresponding game control operation based on the target movement data.

Further, to achieve the above object, the present invention also provides a head-mounted device including: a memory, a processor and a data processing program stored on the memory and executable on the processor, the data processing program, when executed by the processor, implementing the steps of the data processing method of a head-mounted device as described above.

Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a data processing program which, when executed by a processor, realizes the steps of the data processing method of a head-mounted device as described above.

The invention provides a data processing method and a data processing device of head-mounted equipment and a computer readable storage medium, wherein the relative position of the head-mounted equipment to a human body is obtained, and the movement data of the head-mounted equipment is obtained; then, comparing the relative position with a preset threshold value, and determining a target calibration coefficient according to a comparison result; and then, calibrating the mobile data according to the target calibration coefficient to obtain target mobile data. According to the method and the device, the research finds that the mobile data of the head-mounted device is influenced by the relative position of the head-mounted device to the human body, so that the relative position of the head-mounted device to the human body is obtained, the target calibration coefficient is determined, the mobile data is calibrated, the target mobile data is obtained, the mobile data can be intelligently calibrated according to the condition that different users wear the head-mounted device, the accuracy of the target mobile data can be ensured, namely the accuracy of game control data is ensured, and the accuracy of game operation is prevented from being influenced.

Drawings

Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention;

FIG. 2 is a flowchart illustrating a data processing method of a headset according to a first embodiment of the present invention;

fig. 3 is a flowchart illustrating a data processing method of a head-mounted device according to a second embodiment of the present invention.

The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.

Detailed Description

It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

Referring to fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.

The terminal in the embodiment of the present invention may be a VR (Virtual Reality)/AR (augmented Reality) headset.

As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU (Central Processing Unit), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wi-Fi interface, Wireless-Fidelity, Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.

Optionally, the terminal may also include sensors, Wi-Fi modules, and the like. Among them are sensors such as proximity sensors, gyroscope sensors, acceleration sensors, and others. Specifically, the proximity sensor may include an infrared emitting device and an infrared receiving device, and by emitting infrared light and receiving reflected infrared light, a time interval between emission time and reception time of the infrared light is obtained to calculate a relative position of the head-mounted device to the human body. The gyroscope sensor is a simple and easy-to-use positioning and control system based on free space movement and gestures, and can be used for acquiring angular velocity. The acceleration sensor is used for measuring linear acceleration, and can comprise a capacitance type, an inductance type, a strain type, a piezoresistive type, a piezoelectric type and the like; of course, the terminal may also be configured with other sensors such as a gravity sensor and an infrared sensor, which are not described herein again.

Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.

As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include an operating system, a network communication module, and a data processing program therein.

In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client and performing data communication with the client; and the processor 1001 may be configured to call a data processing program stored in the memory 1005 and perform the following operations:

acquiring the relative position of the head-mounted equipment to the human body, and acquiring the movement data of the head-mounted equipment;

comparing the relative position with a preset threshold value, and determining a target calibration coefficient according to a comparison result;

and calibrating the mobile data according to the target calibration coefficient to obtain target mobile data.

Further, the processor 1001 may call the data processing program stored in the memory 1005, and also perform the following operations:

emitting infrared light through a proximity sensor, and receiving the reflected infrared light to obtain a time interval between the emission time and the receiving time of the infrared light;

and calculating the relative position of the head-mounted equipment to the human body according to the time interval.

Further, the processor 1001 may call the data processing program stored in the memory 1005, and also perform the following operations:

acquiring the angular velocity of the head-wearing device through a gyroscope sensor, and acquiring the linear acceleration of the head-wearing device through an acceleration sensor;

wherein the movement data of the head-mounted device comprises the angular velocity and the linear acceleration.

Further, the processor 1001 may call the data processing program stored in the memory 1005, and also perform the following operations:

comparing the relative position with the first preset threshold and the second preset threshold to obtain a comparison result;

and obtaining a first target calibration coefficient and a second target calibration coefficient according to the comparison result and a mapping relation between a preset position range and a calibration coefficient, wherein the target calibration coefficient comprises the first target calibration coefficient and the second target calibration coefficient.

Further, the processor 1001 may call the data processing program stored in the memory 1005, and also perform the following operations:

acquiring a first calibration value of the gyroscope sensor and a second calibration value of the acceleration sensor when the relative position is greater than or equal to the first preset threshold and smaller than the second preset threshold range;

acquiring a third calibration value of the gyroscope sensor and a fourth calibration value of the acceleration sensor when the relative position is in a range smaller than the first preset threshold;

acquiring a fifth calibration value of the gyroscope sensor and a sixth calibration value of the acceleration sensor when the relative position is in a range larger than or equal to the second preset threshold;

and constructing a mapping relation between a position range and a calibration coefficient according to the first calibration value, the second calibration value, the third calibration value, the fourth calibration value, the fifth calibration value and the sixth calibration value.

Further, the processor 1001 may call the data processing program stored in the memory 1005, and also perform the following operations:

carrying out division operation on the third calibration value and the first calibration value to obtain a first calibration coefficient;

dividing the fourth calibration value and the second calibration value to obtain a second calibration coefficient;

performing division operation on the fifth calibration value and the first calibration value to obtain a third calibration coefficient;

dividing the sixth calibration value and the second calibration value to obtain a fourth calibration coefficient;

and constructing a mapping relation between the obtained position range and the calibration coefficient according to the first calibration coefficient, the second calibration coefficient, the third calibration coefficient, the fourth calibration coefficient and a preset calibration coefficient.

Further, the processor 1001 may call the data processing program stored in the memory 1005, and also perform the following operations:

multiplying the first target calibration coefficient by the angular velocity in the mobile data to obtain a target angular velocity;

multiplying the second target calibration coefficient by the linear acceleration in the movement data to obtain a target linear acceleration;

wherein the target movement data includes the target angular velocity and the target linear acceleration.

Further, the processor 1001 may call the data processing program stored in the memory 1005, and also perform the following operations:

and sending the target movement data to a game end so that the game end can execute corresponding game control operation based on the target movement data.

Based on the above hardware structure, embodiments of the data processing method of the head-mounted device according to the present invention are provided.

The invention provides a data processing method of a head-mounted device.

Referring to fig. 2, fig. 2 is a schematic flow chart of a data processing method of a head-mounted device according to a first embodiment of the present invention.

In this embodiment, the data processing method of the head-mounted device includes:

step S10, acquiring the relative position of the head-mounted device to the human body, and acquiring the movement data of the head-mounted device;

in this embodiment, the data processing method of the head-mounted device can be used for calibrating the movement data of the head-mounted device when a user connects the VR/AR wearable device to a PC terminal or a game terminal to control a game, so that the accuracy of the game control data can be ensured, and the accuracy of the game operation can be prevented from being affected. The terminal of the embodiment of the invention can be VR/AR wearable equipment.

In this embodiment, the relative position of the head-mounted device to the human body is obtained first, and the movement data of the head-mounted device is obtained. The relative position can be the distance from a main board in the head-mounted device to the head of the user, the acquisition opportunity of the relative position can be successful for detecting that the head-mounted device is worn, and when the relative position is connected with the PC end or the game end, the relative position only needs to be acquired once for determining the target calibration coefficient. It will be appreciated that when it is detected that the head-mounted device is removed and re-worn, the relative position of the head-mounted device to the body needs to be retrieved. The time for acquiring the movement data of the head-mounted device can be acquired in real time, because the game is controlled in real time according to the movement data of the head-mounted device when the game is controlled.

Further, the step of "acquiring the relative position of the head-mounted device to the human body" includes:

a1, emitting infrared light through a proximity sensor, and receiving reflected infrared light to obtain the time interval between the emitting time and the receiving time of the infrared light;

and a step a2, calculating the relative position of the head-mounted equipment to the human body according to the time interval.

The acquisition process of the relative position of the head-mounted device to the human body is as follows:

the infrared light is emitted by the infrared light emitting device of the proximity sensor, and the reflected infrared light is received by the infrared light receiving device of the proximity sensor, so that the time interval between the emitting time and the receiving time of the infrared light is obtained. Specifically, the timing may be started when the infrared light is emitted, and the timing may be ended when the reflected infrared light is received, where the counted length is the time interval between the emission time and the reception time. Or, a first current time (i.e., a transmission time) is obtained when the infrared light is transmitted, a second current time (i.e., a reception time) is obtained when the reflected infrared light is received, and a difference between the reception time and the transmission time is calculated, that is, the time interval.

Then, the relative position of the head-mounted device to the human body is calculated according to the time interval. Wherein the content of the first and second substances,the relative position L is c · t/2, where c represents the propagation speed of light and is 3 × 108m/s; t represents a time interval.

Further, the step of "acquiring movement data of the head-mounted device" includes:

step a3, acquiring the angular velocity of the head-wearing device through a gyroscope sensor, and acquiring the linear acceleration of the head-wearing device through an acceleration sensor;

wherein the movement data of the head-mounted device comprises the angular velocity and the linear acceleration.

The process of acquiring the movement data of the head-mounted device is as follows:

the method comprises the steps of collecting angular velocity of the head-mounted device through a gyroscope sensor, and collecting linear acceleration of the head-mounted device through an acceleration sensor, wherein the movement data of the head-mounted device comprises the angular velocity and the linear acceleration.

It should be noted that the gyroscopic sensor utilizes coriolis force, which is the tangential force to which a rotating object is subjected when there is radial motion. When the object is in rotary motion, when the angular velocity is constant and the distance from the rotation center is farther, the linear velocity is larger, and when the linear velocity of the object is larger, the resistance is larger, and the influence on the gyroscope sensor and the acceleration sensor is larger. This is due to: the air resistance is calculated in a mode of F being 1/2C rho SV2, wherein C is an air resistance coefficient, and the value is usually an experimental value and is related to the characteristic area (windward area) of the object, the smoothness degree of the object and the overall shape; rho is air density, normal dry air can be 1.293g/l, and the monitoring can be carried out on site under special conditions; s is the windward area of the object; v is the relative velocity of the object and air (i.e., linear velocity). From the above formula, the magnitude of the air resistance is in direct proportion to the air resistance coefficient and the windward area under normal conditions, and in direct proportion to the square of the linear velocity. The relationship between the linear velocity and the angular velocity is v ═ r × ω, and the linear velocity is proportional to the distance of the object from the center point, so that it can be found that the air resistance F is proportional to the square of the distance of the object from the center point.

Based on the above analysis, the resistance of the object is affected by the distance from the center point of the object, and the larger the resistance is, the larger the influence on the gyro sensor and the acceleration sensor is, so that the movement data collected by the gyro sensor and the acceleration sensor needs to be calibrated, that is, the angular velocity and the linear acceleration need to be calibrated. Thus, the acquired movement data of the head-mounted device includes angular velocity and linear acceleration.

Step S20, comparing the relative position with a preset threshold value, and determining a target calibration coefficient according to the comparison result;

and then, comparing the relative position with a preset threshold value, and determining a target calibration coefficient according to a comparison result.

The preset threshold comprises a first preset threshold and a second preset threshold, the relative position can be compared with the first preset threshold and the second preset threshold to obtain a comparison result, and then a first target calibration coefficient and a second target calibration coefficient are obtained according to the comparison result and a mapping relation between a preset position range and the calibration coefficients, wherein the target calibration coefficients comprise a first target calibration coefficient and a second target calibration coefficient, the first target calibration coefficient is used for calibrating angular velocity, and the second target calibration coefficient is used for calibrating linear acceleration. For a specific process of obtaining the target calibration coefficient, reference may be made to the following second embodiment, which is not described herein again.

And step S30, calibrating the movement data according to the target calibration coefficient to obtain target movement data.

And finally, calibrating the mobile data according to the target calibration coefficient to obtain target mobile data.

The target calibration coefficients comprise a first target calibration coefficient and a second target calibration coefficient, the movement data comprise angular velocity and linear acceleration, and correspondingly, the target movement data comprise target angular velocity and target linear acceleration. And meanwhile, multiplying the second target calibration coefficient by the linear acceleration to obtain a target linear acceleration, namely the target linear acceleration is the linear acceleration.

Further, after the step S30, the data processing method of the head-mounted device further includes:

and E, sending the target movement data to a game end so that the game end can execute corresponding game control operation based on the target movement data.

In this embodiment, after the collected movement data of the head-mounted device is calibrated, the target movement data is sent to the game end, so that the game end executes a corresponding game control operation based on the target movement data. The specific game control operation may be determined based on the target movement data and a preset game control operation, which will not be described in detail herein. Of course, it can be understood that, in the specific implementation, in addition to sending the target movement data to the game end, other data (such as the gravity acceleration) may be collected and sent to the game end for game control, and only the movement data that needs to be calibrated is considered in this embodiment.

In addition, in the implementation, step S30 can be executed on the game end. After the target calibration coefficient is determined according to the comparison result, the target calibration coefficient and the mobile data are sent to the game terminal, so that the game terminal can calibrate the mobile data, and then the corresponding game control operation is executed based on the calibrated target mobile data.

The embodiment of the invention provides a data processing method of a head-mounted device, which comprises the steps of acquiring the relative position of the head-mounted device to a human body and acquiring the movement data of the head-mounted device; then, comparing the relative position with a preset threshold value, and determining a target calibration coefficient according to a comparison result; and then, calibrating the mobile data according to the target calibration coefficient to obtain target mobile data. In the embodiment of the invention, the research finds that the mobile data of the head-mounted device is influenced by the relative position of the head-mounted device to the human body, so that the target mobile data is obtained by acquiring the relative position of the head-mounted device to the human body and then determining the target calibration coefficient to calibrate the mobile data, the intelligent calibration of the mobile data according to the conditions that different users wear the head-mounted device can be realized, the accuracy of the target mobile data can be ensured, namely the accuracy of the game control data is ensured, and the accuracy of the game operation is prevented from being influenced.

Further, based on the above-described first embodiment, a second embodiment of the data processing method of the head-mounted device of the present invention is proposed. Referring to fig. 3, fig. 3 is a flowchart illustrating a data processing method of a head-mounted device according to a second embodiment of the present invention.

In this embodiment, the preset threshold includes a first preset threshold and a second preset threshold, and step S20 includes:

step S21, comparing the relative position with the first preset threshold and the second preset threshold to obtain a comparison result;

in this embodiment, two preset thresholds (a first preset threshold and a second preset threshold) are set according to the experimental test result to determine the range of the relative position, so as to determine the corresponding target calibration coefficient.

Specifically, the relative position is compared with a first preset threshold and a second preset threshold to obtain a comparison result. During comparison, whether the relative position is smaller than a first preset threshold value or not can be detected, and if the relative position is smaller than the first preset threshold value, the relative position is judged to be in a range smaller than the first preset threshold value; if the relative position is greater than or equal to a first preset threshold, further detecting that the relative position is smaller than a second preset threshold, and if the relative position is smaller than the second preset threshold, determining that the relative position is within a range which is greater than or equal to the first preset threshold and smaller than the second preset threshold; and if the relative position is greater than or equal to a second preset threshold value, determining that the relative position is in a range greater than or equal to the second preset threshold value.

Step S22, obtaining a first target calibration coefficient and a second target calibration coefficient according to the comparison result and a mapping relationship between a preset position range and a calibration coefficient, where the target calibration coefficient includes the first target calibration coefficient and the second target calibration coefficient.

And then, obtaining a first target calibration coefficient and a second target calibration coefficient according to the comparison result and a mapping relation between a preset position range and the calibration coefficient, wherein the target calibration coefficient comprises a first target calibration coefficient and a second target calibration coefficient, the first target calibration coefficient is used for calibrating the angular velocity, and the second target calibration coefficient is used for calibrating the linear acceleration. The process of constructing the mapping relationship between the position range and the calibration coefficient may refer to the third embodiment described below, which is not described herein again.

At this time, step S30 includes:

step S31, multiplying the first target calibration coefficient and the angular velocity in the movement data to obtain a target angular velocity;

step S32, multiplying the second target calibration coefficient by the linear acceleration in the movement data to obtain a target linear acceleration;

wherein the target movement data includes the target angular velocity and the target linear acceleration.

In this embodiment, after obtaining the first target calibration coefficient and the second target calibration coefficient, the first target calibration coefficient is multiplied by the angular velocity in the movement data to obtain a target angular velocity, that is, the target angular velocity is equal to the angular velocity x the first target calibration coefficient; and multiplying the second target calibration coefficient by the linear acceleration in the movement data to obtain a target linear acceleration, namely the target linear acceleration is the linear acceleration and the second target calibration coefficient. Wherein the target movement data includes a target angular velocity and a target linear acceleration.

It should be noted that the execution sequence of step S31 and step S32 is not sequential.

In this embodiment, it is found through research that the resistance of the object is affected by the distance from the object to the center point, and the larger the resistance is, the larger the influence on the gyro sensor and the acceleration sensor is, and therefore, the movement data acquired by the gyro sensor and the acceleration sensor needs to be calibrated, that is, the angular velocity and the linear acceleration need to be calibrated. By the mode, intelligent calibration on angular velocity and linear acceleration can be realized, the accuracy of target movement data, namely the accuracy of game control data, is ensured, and the accuracy of game operation is prevented from being influenced.

Further, based on the above-described second embodiment, a third embodiment of the data processing method of the head mounted device of the present invention is proposed.

In this embodiment, before the step S22, the data processing method of the head-mounted device further includes:

step A, acquiring a first calibration value of a gyroscope sensor and a second calibration value of an acceleration sensor when the relative position is greater than or equal to the first preset threshold and smaller than the second preset threshold range;

the present embodiment describes a process for constructing a mapping relationship between a position range (i.e., a range in which a relative position is located) and a calibration coefficient. The method comprises the following specific steps:

the method comprises the steps of firstly acquiring a first calibration value of a gyroscope sensor and a second calibration value of an acceleration sensor when a relative position is greater than or equal to a first preset threshold and smaller than a second preset threshold range.

For convenience of description, the relative position is recorded as S, the first preset threshold value is recorded as S1, the second preset threshold value is recorded as S2, the average value of S1 and S2 can be taken in the range of S1 ≦ S < S2, and the first calibration value of the gyro sensor (recorded as a1) and the second calibration value of the acceleration sensor (recorded as b1) can be obtained at a position (S1+ S2)/2 away from the headset by using the same rotation speed. Of course, in the specific embodiment, in the range that S1 is not less than S < S2, a plurality of position points may be taken, the calibration value of the gyro sensor and the calibration value of the acceleration sensor are respectively obtained at each position point, and then the average values thereof are respectively calculated to obtain the first calibration value and the second calibration value. By the mean value taking mode, the accuracy of the calibration value obtaining result can be improved, and the accuracy of mobile data calibration can be further improved.

Step B, acquiring a third calibration value of the gyroscope sensor and a fourth calibration value of the acceleration sensor when the relative position is in a range smaller than the first preset threshold;

and acquiring a third calibration value of the gyroscope sensor and a fourth calibration value of the acceleration sensor when the relative position is in a range smaller than a first preset threshold value. Similarly, in the range of S < S1, one or more position points may be taken, and a second calibration value (denoted by a2) of the gyro sensor and a fourth calibration value (denoted by b2) of the acceleration sensor may be obtained at positions corresponding to the one or more position points using the same rotation speed.

Here, it should be noted that, through testing, when the user wears the head-mounted device, the distance between the head of the human body and the main board in the head-mounted device is generally in the range of 2.5cm to 4.5cm, i.e., S is 2.5cm at the minimum and 4.5cm at the maximum, that is, in the range of S < S1, implicitly, S is necessarily greater than or equal to 2.5, and therefore, when taking the position point in the range of S < S1, the position point is actually required to be taken in the range of 2.5 ≦ S < S1.

Step C, acquiring a fifth calibration value of the gyroscope sensor and a sixth calibration value of the acceleration sensor when the relative position is in a range larger than or equal to the second preset threshold value;

and acquiring a fifth calibration value of the gyroscope sensor and a sixth calibration value of the acceleration sensor when the relative position is greater than or equal to a second preset threshold range. Similarly, one or more position points can be taken in the range of S ≧ S2, and a fifth calibration value (recorded as a3) of the gyroscope sensor and a sixth calibration value (recorded as b3) of the acceleration sensor can be obtained at positions corresponding to the one or more position points by using the same rotation speed.

Here, it should be noted that, through testing, when the user wears the head-mounted device, the distance between the head of the human body and the main board in the head-mounted device is generally in the range of 2.5cm to 4.5cm, i.e. S is 2.5cm at the minimum and 4.5cm at the maximum, that is, S is definitely smaller than 4.5 in the range of S ≧ S2, so when taking a position point in the range of S ≧ S2, it is actually necessary to take the position point in the range of S2 ≦ S < 4.5.

It should be noted that, the execution sequence of steps a to C is not sequential.

And step D, constructing a mapping relation between the position range and the calibration coefficient according to the first calibration value, the second calibration value, the third calibration value, the fourth calibration value, the fifth calibration value and the sixth calibration value.

Then, a mapping relation between the position range and the calibration coefficient is constructed according to the first calibration value, the second calibration value, the third calibration value, the fourth calibration value, the fifth calibration value and the sixth calibration value.

Specifically, the step D includes:

step D1, dividing the third calibration value and the first calibration value to obtain a first calibration coefficient;

step D2, dividing the fourth calibration value by the second calibration value to obtain a second calibration coefficient;

step D3, performing division operation on the fifth calibration value and the first calibration value to obtain a third calibration coefficient;

step D4, performing division operation on the sixth calibration value and the second calibration value to obtain a fourth calibration coefficient;

and D5, constructing a mapping relation between the obtained position range and the calibration coefficient according to the first calibration coefficient, the second calibration coefficient, the third calibration coefficient, the fourth calibration coefficient and a preset calibration coefficient.

Dividing the third calibration value a2 by the first calibration value a1 to obtain a first calibration coefficient, wherein the first calibration coefficient X1 is a2/a 1; dividing the fourth calibration value b2 by the second calibration value b1 to obtain a second calibration coefficient, wherein the second calibration coefficient Y1 is b2/b 1; dividing the fifth calibration value a3 by the first calibration value a1 to obtain a third calibration coefficient, wherein the third calibration coefficient X2 is a3/a 1; and dividing the sixth calibration value b3 by the second calibration value b1 to obtain a fourth calibration coefficient, wherein the fourth calibration coefficient Y2 is b3/b 1.

And then, according to the first calibration coefficient, the second calibration coefficient, the third calibration coefficient, the fourth calibration coefficient and a preset calibration coefficient, constructing and obtaining a mapping relation between the position range and the calibration coefficient. The preset calibration coefficient is 1, i.e. in the range of S1 ≦ S < S2, calibration is not needed, and the mapping relationship may be in the form of a table. The first calibration coefficient and the third calibration coefficient are calibration coefficients belonging to angular velocity, the second calibration coefficient and the fourth calibration coefficient are calibration coefficients belonging to linear acceleration, and the mapping relationship can be obtained as shown in the following table:

range of positions Calibration factor for angular velocity Calibration coefficient of linear acceleration
S<S1 X1=a2/a1 Y1=b2/b1
S1≤S<S2 1 1
S≥S2 X2=a3/a1 Y2=b3/b1

It should be noted that the execution sequence of step D1-step D4 is not sequential.

In this embodiment, by constructing a mapping relationship between the position range and the calibration coefficient, the target calibration coefficient can be conveniently obtained based on the relative position determination in the subsequent step, and then the mobile data of the head-mounted device is calibrated, so that the accuracy of the game control data is ensured, and the accuracy of the game operation is prevented from being affected.

The present invention also provides a computer-readable storage medium having stored thereon a data processing program which, when executed by a processor, implements the steps of the data processing method of a head-mounted device as described in any of the above embodiments.

The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the data processing method of the head-mounted device, and is not described herein again.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.

The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:游戏装置与辨识游戏装置的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类