Positioning tracking method, device, terminal equipment and computer readable storage medium

By using an image acquisition device in a VR headset to identify the invisible light source on the handle and calculate the positional relationship of the light sources, high-precision and high-refresh rate handle positioning is achieved, which solves the problem of handle tracking accuracy and refresh frequency deficiencies in the existing technology. problems and improve the user experience.

CN115082520BActive Publication Date: 2024-10-11GOERTEK INC
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202210667956.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2024-10-11
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

The accuracy and refresh frequency of handle tracking in existing VR devices are insufficient. In particular, electromagnetic positioning has problems with poor anti-interference and high power consumption. Laser positioning is costly and not suitable for VR headsets, while visible light positioning is susceptible to environmental influences. Cause positioning delay.

Method used

By capturing the light spot images emitted by multiple invisible light sources on the handle through the image acquisition device of the VR head-mounted device, the target light source identification data of the light spot in the light source is determined, the light source position relationship is calculated, and converted into a distance parameter between the handle and the device. Then position the handle in 3D space.

Benefits of technology

It improves the accuracy and refresh frequency of handle positioning and tracking, reduces costs, avoids environmental interference, and improves the experience of using VR headsets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082520B_ABST
    Figure CN115082520B_ABST
Patent Text Reader

Abstract

The present invention discloses a positioning tracking method, device, terminal device and computer-readable storage medium, which are applied to a VR head-mounted device equipped with an image acquisition device to perform positioning tracking on a handle, including: capturing an image containing multiple light spots by the image acquisition device, wherein the multiple light spots are generated by multiple light sources on the handle emitting invisible light respectively; determining the first identification data of the target light sources corresponding to the multiple light spots in the image among the multiple light sources; determining the positional relationship between the multiple target light sources according to the first identification data, and calculating the first distance parameter between the handle and the VR head-mounted device according to the positional relationship; converting the first distance parameter into the spatial coordinates of the handle to perform positioning tracking on the handle. The present invention can achieve the effect of positioning and tracking the handle with high positioning accuracy and high refresh rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtual reality technology, and in particular to a positioning tracking method, device, terminal equipment and computer-readable storage medium. Background Art

[0002] With the rapid development of VR (Virtual Reality) devices, the accuracy of handle tracking and the refreshing of positioning information are becoming more and more important for VR devices.

[0003] At present, the main ways to track the handle in VR devices are electromagnetic positioning and optical positioning. Among them, the electromagnetic positioning tracking method has poor anti-interference ability of the magnetic field, and the higher the accuracy requirement, the greater the power consumption, which causes the handle to heat up and thus affects the positioning accuracy. In addition, the main methods of tracking the handle optically include laser positioning and visible light positioning. Among them, laser positioning mainly involves setting up a laser emitting device and a laser receiving device, and tracking and locating the handle by receiving and emitting lasers, while visible light positioning mainly locates the position of the handle by extracting the characteristics of visible light. However, the laser positioning method is costly and is not suitable for VR head-mounted integrated devices. When locating the handle by visible light, it is easily affected by other visible light in the surrounding environment, which will cause a high delay in positioning the handle. Summary of the invention

[0004] The embodiments of the present invention provide a positioning tracking method, apparatus, terminal device and computer-readable storage medium, aiming to improve the refresh frequency and accuracy of positioning tracking of a handle by a VR head-mounted device without increasing the cost.

[0005] To achieve the above object, an embodiment of the present invention provides a positioning tracking method, which is applied to a VR head mounted device equipped with an image acquisition device to perform positioning tracking on a handle, wherein the handle is equipped with multiple light sources, and the method comprises the following steps:

[0006] Capturing an image containing a plurality of light spots by the image acquisition device, wherein the plurality of light spots are generated by invisible light emitted by a plurality of light sources on the handle;

[0007] Determine first identification data of target light sources corresponding to each of the plurality of light spots in the image among the plurality of light sources;

[0008] Determine the positional relationship between the plurality of target light sources according to the first identification data, and calculate the first distance parameter between the handle and the VR head mounted device according to the positional relationship;

[0009] The first distance parameter is converted into the spatial coordinates of the handle to perform positioning tracking on the handle.

[0010] Furthermore, the step of determining first identification data of target light sources corresponding to each of the plurality of light spots in the image among the plurality of light sources includes:

[0011] Detecting characteristic data of each of the plurality of light spots and acquiring motion data of the handle;

[0012] Combining the plurality of feature data and the motion data to obtain combined data, and comparing the plurality of combined data with the light spot feature data in a preset offline feature database to obtain a comparison result;

[0013] The first identification data of the target light sources corresponding to each of the plurality of light spots among the plurality of light sources is determined according to the comparison result.

[0014] Furthermore, the step of determining the first identification data of the target light source corresponding to each of the plurality of light spots among the plurality of light sources according to the comparison result includes:

[0015] If the comparison result is that the combined data is similar to the light spot characteristic data, the second identification data of each of the multiple light sources associated with the light spot characteristic data is determined as the first identification data of the target light source corresponding to each of the multiple light spots.

[0016] Furthermore, the method further comprises:

[0017] When the handle performs any action to move, the image acquisition device captures a second image including a plurality of light spots;

[0018] The feature data of the plurality of light spots in the second image are combined with the motion data generated by the handle during movement to construct the offline feature database.

[0019] Furthermore, the light sources are arranged on the handle according to a preset arrangement rule, and the step of determining the positional relationship between the plurality of target light sources according to the first identification data comprises:

[0020] Obtaining the arrangement rule;

[0021] The positional relationship between the target light sources respectively corresponding to the plurality of light spots among the plurality of light sources is determined according to the arrangement rule.

[0022] Furthermore, the step of calculating a first distance parameter between the handle and the VR head mounted device according to the position relationship includes:

[0023] Calculate a second distance parameter between each of the plurality of target light sources and the image acquisition device according to the positional relationship;

[0024] An average value is calculated for the plurality of second distance parameters, and the calculated average value is used as the first distance parameter between the handle and the VR head mounted device.

[0025] Furthermore, the step of converting the distance parameter into the spatial coordinates of the handle to position and track the handle includes:

[0026] Determine a first coordinate of each of the plurality of target light sources relative to the image acquisition device;

[0027] Convert the first coordinates into second coordinates of each of the target light sources in a 3D space, wherein the 3D space is a 3D space displayed by the VR head mounted device;

[0028] The plurality of second coordinates are converted into third coordinates of the condensation point of the handle in the 3D space, and the third coordinates are used as the spatial coordinates of the handle in the 3D space.

[0029] In addition, to achieve the above-mentioned purpose, the present invention further provides a positioning tracking device, the positioning tracking device of the present invention comprises:

[0030] An acquisition module, used for capturing an image containing a plurality of light spots through the image acquisition device, wherein the plurality of light spots are generated by invisible light emitted by a plurality of light sources on the handle;

[0031] A determination module, used to determine first identification data of a target light source corresponding to each of the plurality of light spots in the image among the plurality of light sources;

[0032] a calculation module, configured to determine a positional relationship between the plurality of target light sources according to the first identification data, and calculate a first distance parameter between the handle and the VR head mounted device according to the positional relationship;

[0033] A conversion module is used to convert the first distance parameter into the spatial coordinates of the handle to locate and track the handle.

[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal device, which includes: a memory, a processor, and a positioning tracking program stored in the memory and executable on the processor, and the positioning tracking program implements the steps of the positioning tracking method as described above when executed by the processor.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a positioning tracking program is stored, and when the positioning tracking program is executed by a processor, the steps of the positioning tracking method described above are implemented.

[0036] The positioning and tracking method provided by an embodiment of the present invention is applied to a VR head-mounted device equipped with an image acquisition device to perform positioning and tracking on a handle, wherein the handle is equipped with multiple light sources, including: capturing an image containing multiple light spots by the image acquisition device, wherein the multiple light spots are generated by multiple light sources on the handle emitting invisible light respectively; determining first identification data of target light sources corresponding to each of the multiple light spots in the image among the multiple light sources; determining a positional relationship between the multiple target light sources based on the first identification data, and calculating a first distance parameter between the handle and the VR head-mounted device based on the positional relationship; and converting the first distance parameter into the spatial coordinates of the handle to perform positioning and tracking on the handle.

[0037] In an embodiment of the present invention, during a process in which a VR head mounted device equipped with an image acquisition device performs positioning and tracking on a handle, the VR head mounted device uses the image acquisition device to generate light spots when multiple light sources on the handle each emit invisible light, and captures an image containing multiple light spots. Thereafter, first identification data of target light sources corresponding to each of the multiple light spots in the image among the multiple light sources configured on the handle is determined, and a positional relationship between the multiple target light sources is further determined based on the first identification data, thereby calculating a first distance parameter between the handle and the VR head mounted device based on the positional relationship; finally, the first distance parameter is converted into the spatial coordinates of the handle in the 3D world displayed by the VR head mounted device, so as to complete the positioning and tracking of the handle.

[0038] In this way, compared with the existing VR head-mounted devices that locate and track the handle, the present invention obtains an image containing multiple light spots, thereby determining the identification data of the light sources corresponding to the multiple light spots among the multiple light sources, and calculates the distance of each light source from the image acquisition device based on the identification data, and then converts the distance into the coordinates of the handle in 3D space, thereby achieving the effect of locating and tracking the handle with high positioning accuracy and high refresh rate, thereby improving the user experience in the process of using the VR head-mounted device. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the structure of a terminal device in a hardware operating environment involved in an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of a flow chart of an embodiment of a positioning and tracking method of the present invention;

[0041] Figure 3 It is a schematic diagram of the arrangement of infrared lamp beads on a handle involved in an embodiment of the positioning and tracking method of the present invention;

[0042] Figure 4 It is a schematic diagram of the monocular ranging principle involved in an embodiment of the positioning and tracking method of the present invention;

[0043] Figure 5 A schematic diagram of an application flow involved in an embodiment of a positioning and tracking method of the present invention;

[0044] Figure 6 It is another application flow diagram involved in an embodiment of the positioning and tracking method of the present invention;

[0045] Figure 7 It is a schematic diagram of functional modules involved in an embodiment of a positioning and tracking method of the present invention.

[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0048] Reference Figure 1 , Figure 1 A schematic diagram of the terminal device structure of the hardware operating environment involved in the embodiment of the present invention.

[0049] The terminal device involved in the embodiment of the present invention may specifically be a mobile VR head-mounted device or a fixed VR head-mounted device, and the mobile VR head-mounted device or the fixed VR head-mounted device has a matching handle, and the handle is configured with multiple light sources for emitting invisible light.

[0050] like Figure 1As shown, the terminal device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and 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 and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0051] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the terminal device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0052] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a positioning tracking program.

[0053] exist Figure 1 In the terminal device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the terminal device of the present invention can be set in the terminal device, and the device calls the positioning tracking program stored in the memory 1005 through the processor 1001, and executes the positioning tracking method provided by the embodiment of the present invention.

[0054] Based on the above terminal device, various embodiments of the positioning and tracking method of the present invention are provided.

[0055] Please refer to Figure 2 , Figure 2 FIG. 4 is a flow chart of a first embodiment of a positioning and tracking method according to the present invention.

[0056] The positioning tracking method of the present invention is applied to a VR head mounted device equipped with an image acquisition device to perform positioning tracking on a handle, wherein the handle is equipped with a plurality of light sources. In this embodiment, the positioning tracking method of the present invention may include:

[0057] Step S10: capturing an image containing a plurality of light spots by the image acquisition device, wherein the plurality of light spots are generated by a plurality of light sources on the handle emitting invisible light respectively;

[0058] In this embodiment, when the terminal device is in operation, multiple light sources configured on a handle matching the terminal device each emit invisible light, and the terminal device captures an image containing multiple light spots generated by the multiple light sources on the handle emitting invisible light through a built-in image acquisition device.

[0059] Exemplarily, for example, during the operation of a VR head-mounted device, a plurality of infrared lamp beads configured on a handle matching the VR head-mounted device each emit infrared light, and the VR head-mounted device captures a single-frame image containing light spots generated by the plurality of infrared lamp beads on the handle emitting infrared light through a built-in infrared camera.

[0060] Step S20: determining first identification data of target light sources corresponding to each of the plurality of light spots in the image among the plurality of light sources;

[0061] In this embodiment, the terminal device identifies the characteristic data of each of the multiple light spots in the above image, retrieves the motion data generated by the above handle during the movement, combines the characteristic data and the motion data, and compares the combined data with the light spot characteristic data in a preset offline feature database, thereby determining the identification data of the target light sources corresponding to each of the multiple light spots in the image among the multiple light sources.

[0062] For example, see Figure 6 The VR head mounted device detects the number of light spots in the above image, the pixel size of each of the multiple light spots, and the shape feature data composed of the multiple light spots through a computer vision algorithm. At the same time, the VR head mounted device retrieves the motion data composed of the rotation angle data and acceleration data generated during the movement of the handle collected by the IMU (Inertial Measurement Unit) device in the above handle, combines the feature data with the motion data, and compares the combined data with the light spot feature data in the offline feature database preset by the user, so as to determine the number of the target infrared lamp beads corresponding to each of the multiple light spots in the image among the multiple infrared lamp beads on the handle.

[0063] Furthermore, in another feasible embodiment, before the above step S20, the positioning tracking method of the present invention further includes:

[0064] Step A: When the handle performs any action to move, the image acquisition device captures a second image including a plurality of light spots;

[0065] In this embodiment, when the handle performs any action to move, the VR head mounted device calls the image acquisition device to capture a second image containing a plurality of light spots generated during the movement of the handle;

[0066] Step B: combining the feature data of the plurality of light spots in the second image with the motion data generated by the handle during movement to construct the offline feature database.

[0067] In this embodiment, the VR head-mounted device combines the motion data generated by the handle when performing any action and the feature data of all light spots in the second image to construct an offline feature database, and the offline feature database includes all light spot feature data generated by each light source in the handle when the handle performs any action and moves.

[0068] For example, see Figure 6 When the handle performs any action and moves, the VR head mounted device calls the infrared camera to capture a second image containing multiple light spots generated by the infrared lamp beads on the handle emitting infrared rays during the movement of the handle, and combines the action data generated by the handle during the movement with all feature data of the light spots in the image to construct an offline feature database, and the offline feature database includes the feature data of all light spots generated by the infrared lamp beads in the handle during the movement of the handle.

[0069] It should be noted that in this embodiment, before the VR head-mounted device obtains the above-mentioned image, it is necessary to calibrate the shooting frequency of the above-mentioned infrared camera configured in the VR head-mounted device and the frequency of the above-mentioned motion data generated by the IMU device in the above-mentioned handle during the movement of the handle to be consistent, so that the timestamp of the infrared camera taking the photo and the timestamp of the IMU device collecting the handle motion data are the same.

[0070] Furthermore, in a feasible embodiment, the above step S20 may specifically include:

[0071] Step S201: detecting characteristic data of each of the plurality of light spots, and acquiring motion data of the handle;

[0072] In this embodiment, the terminal device detects the pixel size of each of the multiple light spots in the above image and the shape feature data of the multiple light spots. At the same time, the terminal device calls the sensor device in the above handle to detect and obtain the motion data including rotation angle data and acceleration data generated by the handle during the movement.

[0073] Step S202: combining the plurality of feature data and the motion data to obtain combined data, and comparing the plurality of combined data with the light spot feature data in a preset offline feature database to obtain a comparison result;

[0074] In this embodiment, the terminal device combines the above-mentioned multiple feature data and the above-mentioned action data to obtain the combination data of the light spot features generated by the multiple light sources on the handle when the handle moves according to the action data, and compares the combination data with the light spot feature data in the offline feature database preset by the user for similarity to obtain a comparison result.

[0075] Step S203: determining the first identification data of the target light sources corresponding to each of the plurality of light spots among the plurality of light sources according to the comparison result.

[0076] In this embodiment, the terminal device can determine the first identification data of the target light sources corresponding to the multiple light spots in the image among the multiple light sources on the handle according to whether the combined data in the comparison is similar to the light spot feature data.

[0077] Exemplarily, for example, the VR head-mounted device calculates the shape feature data of each of the multiple light spots in the above image through a computer vision algorithm preset by a user. At the same time, the VR head-mounted device calls the IMU device configured in the above handle to detect and obtain the motion data generated by the handle during the movement. After that, the VR head-mounted device combines the above feature data with the above motion data to obtain the combined data of the features of the multiple light spots generated by the multiple infrared lamp beads on the handle when the handle moves according to the above motion data, and compares the combined data with the light spot feature data in an offline feature database preset by the user, and uses the similarity between the combined data and the light spot feature data as the comparison result of the above comparison, and determines the number of the target infrared lamp beads corresponding to each of the multiple light spots in the above image among the multiple infrared lamp beads on the handle based on the comparison result.

[0078] Furthermore, in a feasible embodiment, the above step S203 may specifically include:

[0079] Step S2031: If the comparison result is that the combined data is similar to the light spot characteristic data, the second identification data of each of the multiple light sources associated with the light spot characteristic data is determined as the first identification data of the target light source corresponding to each of the multiple light spots.

[0080] In this embodiment, if the terminal device compares the shape feature data of the light spots in the above-mentioned combined data with the corresponding light spot feature data in the above-mentioned offline feature database, the terminal device will determine the second identification data of each of the multiple light sources associated with the light spot feature data as the first identification data of the target light sources corresponding to each of the above-mentioned light spots in the above-mentioned image.

[0081] Exemplarily, for example, the VR head-mounted device determines that the shape features of each light spot in the above-mentioned combined data are similar to the light spot feature data formed when the above-mentioned handle moves under the action data in the offline feature database preset by the user, then the VR head-mounted device determines the respective numbers of the multiple infrared lamp beads associated with the light spot feature data as the numbers of the target infrared lamp beads corresponding to each light spot in the above-mentioned image.

[0082] Step S30: determining the positional relationship between the plurality of target light sources according to the first identification data, and calculating a first distance parameter between the handle and the VR head mounted device according to the positional relationship;

[0083] In this embodiment, the terminal device determines the positional relationship between the above-mentioned target light sources based on the first identification data of the target light sources corresponding to each of the above-mentioned multiple light spots and the arrangement rules preset by the user. Thereafter, the terminal device calculates the first distance parameter between the above-mentioned handle and the terminal device through an algorithm preset by the user combined with the positional relationship.

[0084] For example, see Figure 4 The VR head mounted device determines the distance and angle between the target infrared lamp beads corresponding to each of the above-mentioned multiple light spots according to the numbers of the target infrared lamp beads corresponding to each of the above-mentioned multiple light spots and the arrangement rules of the infrared lamp beads preset by the user in the above-mentioned handle. Finally, the VR head mounted device calculates the respective distances between each target infrared lamp bead and the infrared camera configured in the VR head mounted device according to the monocular ranging formula D=(F*W) / P preset by the user, calculates the average value of the above-mentioned distances, and finally marks the calculated result as the first distance parameter between the handle and the infrared camera.

[0085] Furthermore, in a feasible embodiment, the above step S30 may specifically include:

[0086] Step S301: obtaining the arrangement rule;

[0087] In this embodiment, the terminal device obtains the arrangement rule of each light source on the handle by reading the data stored by the user, which includes the arrangement position of each light source in the handle and the data numbering each light source according to the arrangement position.

[0088] Please note that, please refer to Figure 3 In this embodiment, the arrangement rule of the above-mentioned handle is: the first row of infrared lamp beads of the handle are numbered with odd numbers, such as from LED1 to LED15, and correspondingly, the second row of infrared lamp beads of the handle are numbered with even numbers, such as from LED2 to LED16; the arrangement rule of the infrared lamp beads on the handle is: the infrared lamp beads are arranged in two rows, upper and lower, on the circular ring of the front section of the handle, and the infrared lamp beads are kept in an uneven distribution during the arrangement process, mainly concentrated at both ends and dispersed in the middle, and each infrared lamp bead in the above-mentioned second row should be cross-distributed between the infrared lamp beads in the above-mentioned first row to form a triangular distribution.

[0089] Step S302: determining the positional relationship between the target light sources corresponding to the plurality of light spots in the plurality of light sources according to the arrangement rule;

[0090] In this embodiment, after the terminal device obtains the above arrangement rule, it obtains positional relationship data consisting of distances and angles between target light sources corresponding to each of the multiple light spots in the image according to the arrangement rule.

[0091] Step S303: calculating a second distance parameter between each of the plurality of light sources and the image acquisition device according to the position relationship;

[0092] In this embodiment, the terminal device calculates the distances between the target light sources and the image acquisition device according to the algorithm preset by the user and the positional relationship data between the target light sources, and marks the distances as second distance parameters.

[0093] Step S304: Calculate an average value of the plurality of second distance parameters, and use the calculated average value as the first distance parameter between the handle and the VR head mounted device.

[0094] In this embodiment, the terminal device calculates the average value of the above-mentioned second distance parameters, marks the average value of the second distance parameters as the distance parameter between the above-mentioned handle and the terminal device, and marks the distance parameter as the first distance parameter between the handle and the terminal device.

[0095] Exemplarily, for example, the VR head-mounted device reads the arrangement position of each infrared lamp bead in the above-mentioned handle and the method for numbering each infrared lamp bead according to the arrangement position stored by the user to obtain the arrangement rule of each infrared lamp bead on the handle including the method, so as to determine the position relationship data composed of the distance and angle between the target infrared lamp beads corresponding to each light spot in the multiple infrared lamp beads in the above-mentioned image according to the arrangement rule. Afterwards, the VR head-mounted device combines the position relationship data and calculates the distance parameter D between each infrared lamp bead and the infrared camera according to the monocular ranging formula D=(F*W) / P preset by the user. At the same time, the VR head-mounted device marks the distance parameter D of each infrared lamp bead as the second distance parameter between each infrared lamp bead and the infrared camera. Finally, the VR head-mounted device calculates the average value of the second distance parameters and marks the result of the average value as the first distance parameter between the handle and the VR head-mounted device.

[0096] Step S40: converting the first distance parameter into the spatial coordinates of the handle to perform positioning and tracking on the handle.

[0097] In this embodiment, the terminal device uses the above-mentioned first distance parameter as depth information, and converts the first distance parameter into the spatial coordinates of the above-mentioned handle in the 3D world presented by the terminal device according to an algorithm preset by the user, and then the terminal device continuously updates the spatial coordinates according to the position change of the handle.

[0098] For example, see Figure 5 After the VR head-mounted device calculates the distance between the above-mentioned handle and the VR head-mounted device, it marks the distance between the handle and the VR head-mounted device as depth information. At the same time, the VR head-mounted device calculates the pixel coordinates of each light spot in the above-mentioned image through the computer vision algorithm preset by the user. After that, the VR head-mounted device combines each pixel coordinate with the depth information, and calculates through the computer vision algorithm to obtain the camera coordinates of each target infrared lamp bead corresponding to the light spot among multiple infrared lamp beads. Subsequently, the VR head-mounted device calculates and converts each camera coordinate into the spatial coordinates of each target infrared lamp bead in the above-mentioned 3D world through the internal parameter matrix formula preset by the infrared camera. Finally, the VR head-mounted device combines the condensation point of the handle preset by the user, converts the spatial coordinates of each target infrared lamp bead into the spatial coordinates of the condensation point in the 3D world as the spatial coordinates of the handle, and the VR head-mounted device continuously updates the spatial coordinates of the handle according to the position of the handle.

[0099] It should be noted that, in this embodiment, the camera intrinsic parameter matrix formula is:

[0100]

[0101] Furthermore, in a feasible embodiment, the above step S40 may specifically include:

[0102] Step S401: determining a first coordinate of each of the plurality of target light sources relative to the image acquisition device;

[0103] In this embodiment, the terminal device calculates the pixel coordinates of each light spot in the above image according to the algorithm preset by the user, and uses the above first distance parameter as depth information. The terminal device combines the above pixel coordinates and the depth information and performs calculations according to the algorithm preset by the user to determine the first coordinates of each of the above target light sources relative to the image acquisition device.

[0104] Step S402: converting the first coordinates into second coordinates of each of the target light sources in a 3D space, wherein the 3D space is a 3D space displayed by the VR head mounted device;

[0105] In this embodiment, the terminal device combines the above-mentioned first coordinates with the internal parameter matrix formula preset by the above-mentioned image acquisition device to calculate the spatial coordinates of each of the above-mentioned multiple target light sources in the above-mentioned 3D space presented by the terminal device, and marks the spatial coordinates as second coordinates.

[0106] Step S403: converting the plurality of second coordinates into third coordinates of the condensation point of the handle in the 3D space, and using the third coordinates as the spatial coordinates of the handle in the 3D space.

[0107] In this embodiment, the terminal device converts the above-mentioned second coordinates into the third coordinate of the condensation point in the above-mentioned 3D space in combination with the position of the handle condensation point preset by the user, and determines the third coordinate as the spatial coordinate of the handle in the above-mentioned 3D space.

[0108] For example, see Figure 5, the VR head mounted device calculates the pixel coordinates (x, y) of each light spot in the above image according to the computer vision algorithm preset by the user, and the VR head mounted device uses the above first distance parameter as the depth information z, combined with the pixel coordinates of each light spot in the image, and calculates according to the computer vision algorithm preset by the user to obtain the camera coordinates (x, y, z) of each target infrared lamp bead relative to the infrared camera, and marks the camera coordinates as the first coordinates. Afterwards, the VR head mounted device combines the multiple first coordinates with the above internal parameter matrix formula preset by the infrared camera to calculate the spatial coordinates (X, Y, Z) of each target infrared lamp bead in the 3D world presented by the VR head mounted device, and marks the spatial coordinates as the second coordinates. Finally, the VR head mounted device combines the multiple second coordinates with the condensation point preset by the user in the handle, and converts them into the spatial coordinates (Xo, Yo, Zo) of the handle in the above 3D space, and marks the spatial coordinates as the third coordinates. The VR head mounted device updates the third coordinates according to the change of the position of the handle to complete the tracking of the position of the handle.

[0109] In this embodiment, first, during the operation of the terminal device, a plurality of light sources configured on a handle matched with the terminal device respectively emit invisible light, and the terminal device captures an image containing a plurality of light spots generated by the invisible light emitted by the plurality of light sources on the handle through a built-in image acquisition device. Then, the terminal device identifies the feature data of each of the plurality of light spots in the image, retrieves the motion data generated by the handle during the movement, combines the feature data with the motion data, and compares the combined data obtained after the combination with the light spot feature data in a preset offline feature database, thereby determining the respective positions of the plurality of light spots in the image in the plurality of light sources. Then, the terminal device determines the positional relationship between the above-mentioned target light sources according to the first identification data of the target light sources corresponding to the above-mentioned multiple light spots and the arrangement rules preset by the user. After that, the terminal device calculates the first distance parameter between the above-mentioned handle and the terminal device in combination with the positional relationship through the algorithm preset by the user. Finally, the terminal device uses the first distance parameter as depth information, and converts the first distance parameter into the spatial coordinates of the above-mentioned handle in the 3D world presented by the terminal device according to the algorithm preset by the user, and then the terminal device continuously updates the spatial coordinates according to the position change of the handle.

[0110] Compared with the existing VR head-mounted device tracking method of the handle, the present invention obtains the infrared rays emitted by different infrared light source devices provided on the handle, calculates the distance from the above different infrared light source devices to the camera, and then converts the distance into the spatial coordinates of the handle in the 3D world presented by the VR head-mounted device, thereby achieving the effect of positioning and tracking the handle with high positioning accuracy and high refresh rate, thereby improving the user experience in the process of using the VR head-mounted device.

[0111] Furthermore, the present invention also provides a positioning tracking device, please refer to Figure 7 , Figure 7 FIG. 1 is a schematic diagram of functional modules of an embodiment of a positioning and tracking device of the present invention. Figure 7 As shown, the positioning tracking device of the present invention comprises:

[0112] An acquisition module, used for capturing an image containing a plurality of light spots through the image acquisition device, wherein the plurality of light spots are generated by invisible light emitted by a plurality of light sources on the handle;

[0113] A determination module, used to determine identification data of target light sources corresponding to each of the plurality of light spots in the image among the plurality of light sources;

[0114] a calculation module, configured to determine a positional relationship between the plurality of target light sources according to the first identification data, and calculate a distance parameter between the handle and the VR head mounted device according to the positional relationship;

[0115] The conversion module is used to convert the distance parameter into the spatial coordinates of the handle to locate and track the handle.

[0116] Furthermore, the modules are determined, including:

[0117] A detection and acquisition unit: used for detecting characteristic data of each of the plurality of light spots and acquiring motion data of the handle;

[0118] A combination comparison unit: used for combining the plurality of feature data and the action data to obtain combined data, and comparing the plurality of combined data with the light spot feature data in a preset offline feature database to obtain a comparison result;

[0119] A determination unit is used to determine the first identification data of the target light source corresponding to each of the plurality of light spots among the plurality of light sources according to the comparison result.

[0120] Furthermore, the determination module further includes:

[0121] A similarity determination unit is used to determine the second identification data of each of the multiple light sources associated with the light spot characteristic data as the first identification data of the target light source corresponding to each of the multiple light spots if the comparison result is that the combined data is similar to the light spot characteristic data.

[0122] Furthermore, the determination module further includes:

[0123] Image acquisition unit: used for capturing a second image including a plurality of light spots through the image acquisition device when the handle performs any action to move;

[0124] A construction unit is used to combine the feature data of the plurality of light spots in the second image with the motion data generated by the handle during the movement to construct the offline feature database.

[0125] Furthermore, the computing module comprises:

[0126] An acquisition unit: used for acquiring the arrangement rule;

[0127] A determination unit: used for determining the positional relationship between the target light sources respectively corresponding to the plurality of light spots among the plurality of light sources according to the arrangement rule;

[0128] Furthermore, the calculation module further includes:

[0129] A calculation unit: used for calculating a second distance parameter between each of the plurality of target light sources and the image acquisition device according to the position relationship;

[0130] Averaging unit: used to calculate an average value of multiple second distance parameters, so as to use the calculated average value as the first distance parameter between the handle and the VR head-mounted device.

[0131] Furthermore, the conversion module comprises:

[0132] A first coordinate determining unit: used to determine a first coordinate of each of the plurality of target light sources relative to the image acquisition device;

[0133] A second coordinate conversion unit: used for converting the first coordinates into second coordinates of each of the target light sources in a 3D space, wherein the 3D space is the 3D space displayed by the VR head mounted device;

[0134] A third coordinate conversion unit is used to convert a plurality of the second coordinates into a third coordinate of the condensation point of the handle in the 3D space, and use the third coordinate as the spatial coordinate of the handle in the 3D space.

[0135] The present invention also provides a terminal device having a positioning tracking program that can be run on a processor, and when the terminal device executes the positioning tracking program, the steps of the positioning tracking method described in any of the above embodiments are implemented.

[0136] The specific embodiments of the terminal device of the present invention are basically the same as the embodiments of the above-mentioned positioning and tracking method, and will not be described in detail here.

[0137] The present invention also provides a computer-readable storage medium having a positioning tracking program stored thereon. When the positioning tracking program is executed by a processor, the steps of the positioning tracking method described in any of the above embodiments are implemented.

[0138] The specific embodiments of the computer-readable storage medium of the present invention are basically the same as the embodiments of the positioning tracking method, and will not be described in detail here.

[0139] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0140] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0142] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A positioning tracking method, characterized in that: The positioning and tracking method is applied to a VR head mounted device equipped with an image acquisition device to perform positioning and tracking on a handle, wherein the handle is equipped with a plurality of light sources, and the method comprises the following steps: Capturing an image containing a plurality of light spots by the image acquisition device, wherein the plurality of light spots are generated by invisible light emitted by a plurality of light sources on the handle; Determine first identification data of target light sources corresponding to each of the plurality of light spots in the image among the plurality of light sources; Determine the positional relationship between the plurality of target light sources according to the first identification data, and calculate the first distance parameter between the handle and the VR head mounted device according to the positional relationship; Converting the first distance parameter into the spatial coordinates of the handle condensation point in the 3D world as the spatial coordinates of the handle to position and track the handle; The step of determining first identification data of target light sources corresponding to each of the plurality of light spots in the image among the plurality of light sources comprises: Detecting the pixel size of each of the plurality of light spots and shape feature data composed of the plurality of light spots, using the shape feature data as feature data, and acquiring motion data including rotation angle data and acceleration data generated by the handle during movement; Combining the plurality of feature data and the motion data to obtain combined data, and comparing the plurality of combined data with the light spot feature data in a preset offline feature database to obtain a comparison result; Determine, according to the comparison result, the first identification data of the target light source corresponding to each of the plurality of light spots among the plurality of light sources; The step of calculating a first distance parameter between the handle and the VR head mounted device according to the position relationship includes: Calculate the distance between each of the plurality of target light sources and the image acquisition device according to the positional relationship, and mark the distance as a second distance parameter; An average value is calculated for the plurality of second distance parameters, and the calculated average value is used as the first distance parameter between the handle and the VR head mounted device.

2. The positioning tracking method according to claim 1, characterized in that: The step of determining the first identification data of the target light sources corresponding to each of the plurality of light spots among the plurality of light sources according to the comparison result comprises: If the comparison result is that the combined data is similar to the light spot characteristic data, the second identification data of each of the multiple light sources associated with the light spot characteristic data is determined as the first identification data of the target light source corresponding to each of the multiple light spots.

3. The positioning tracking method according to claim 1, characterized in that: The method further comprises: When the handle performs any action to move, the image acquisition device captures a second image including a plurality of light spots; The feature data of the plurality of light spots in the second image are combined with the motion data generated by the handle during movement to construct the offline feature database.

4. The positioning tracking method according to claim 1, characterized in that: The light sources are arranged on the handle according to a preset arrangement rule, and the step of determining the positional relationship between the plurality of target light sources according to the first identification data comprises: Obtaining the arrangement rule; The positional relationship between the target light sources respectively corresponding to the plurality of light spots among the plurality of light sources is determined according to the arrangement rule.

5. The positioning tracking method according to claim 1, characterized in that: The step of converting the first distance parameter into the spatial coordinates of the handle condensation point in the 3D world as the spatial coordinates of the handle to locate and track the handle includes: Calculate the pixel coordinates of each light spot in the image according to an algorithm preset by the user, and use the first distance parameter as depth information, and perform calculation according to the algorithm preset by the user based on each pixel coordinate and the depth information to determine the first coordinates of each of the plurality of target light sources relative to the image acquisition device; Convert the first coordinates into second coordinates of each of the target light sources in a 3D space, wherein the 3D space is a 3D space displayed by the VR head mounted device; The plurality of second coordinates are converted into third coordinates of the condensation point of the handle in the 3D space, and the third coordinates are used as the spatial coordinates of the handle in the 3D space.

6. A positioning tracking device, characterized in that: The device comprises: An acquisition module, used for capturing an image containing a plurality of light spots through an image acquisition device, wherein the plurality of light spots are generated by a plurality of light sources on the handle emitting invisible light respectively; A determination module, used to determine first identification data of a target light source corresponding to each of the plurality of light spots in the image among the plurality of light sources; a calculation module, configured to determine a positional relationship between the plurality of target light sources according to the first identification data, and calculate a first distance parameter between the handle and the VR head mounted device according to the positional relationship; A conversion module, used for converting the first distance parameter into the spatial coordinates of the handle condensation point in the 3D world as the spatial coordinates of the handle to locate and track the handle; The determining module comprises: A detection and acquisition unit: used for detecting the pixel size of each of the plurality of light spots and shape feature data composed of the plurality of light spots, taking the shape feature data as feature data, and acquiring motion data including rotation angle data and acceleration data generated by the handle during movement; A combination comparison unit: used for combining the plurality of feature data and the action data to obtain combined data, and comparing the plurality of combined data with the light spot feature data in a preset offline feature database to obtain a comparison result; A determining unit: configured to determine, according to the comparison result, the first identification data of the target light source corresponding to each of the plurality of light spots among the plurality of light sources; The computing module comprises: A calculation unit: used for calculating the distance between each of the plurality of target light sources and the image acquisition device according to the positional relationship, and marking the distance as a second distance parameter; Averaging unit: used to calculate an average value of multiple second distance parameters, so as to use the calculated average value as the first distance parameter between the handle and the VR head-mounted device.

7. A terminal device, characterized in that: The device comprises: a memory, a processor, and a positioning tracking program stored in the memory and executable on the processor, wherein the positioning tracking program is configured to implement the steps of the positioning tracking method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a positioning tracking program, and when the positioning tracking program is executed by the processor, the steps of the positioning tracking method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method and system for tracking position of matched gamepad of VR (virtual reality) head-mounted device

    CN106768361A

  • Six dof mixed reality input by fusing inertial handheld controller with hand tracking

    CN109313495A

  • Tracking wearable device and handheld object poses

    CN110622107A

  • Positioning tracking method and platform and head-mounted display system

    CN112286343A

  • Virtual reality handle tracking method, terminal and computer readable storage medium

    CN114332423A