Method and apparatus for tracking handle position, terminal device and computer medium

By acquiring the position coordinates and vector angle values ​​of the controller's light spot image in the VR headset, and combining them with confidence interval comparison, the controller's light source area and starting light source are determined, solving the problem of inaccurate controller position under optical positioning and achieving more accurate position tracking.

CN115690214BActive Publication Date: 2026-04-24GEER TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GEER TECH CO LTD
Filing Date
2022-10-31
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

When existing VR headsets use optical positioning to track controllers, changes in the distance between the controllers and the device cause changes in the size of the light spot, affecting the accuracy of coordinate calculations and making it impossible to accurately track the controllers' position.

Method used

By acquiring the target image of the light spot emitted by the light source on the handle, determining the position coordinates of the light spot, calculating the vector angle between the light spots, and comparing it with the preset signal interval, the target light source area is determined, and then the starting light source and the handle position are determined in the light source area.

Benefits of technology

It improves the tracking accuracy of the controller position in VR headsets, solves the problem of optical positioning being affected by distance changes, and achieves accurate positioning of the controller position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690214B_ABST
    Figure CN115690214B_ABST
Patent Text Reader

Abstract

The application discloses a handle position tracking method and device, terminal equipment and computer readable storage medium, comprising: calling an image acquisition device to capture a target image containing multiple light spots, and determining the respective position coordinates of each light spot in the target image; determining the vector angle values between each light spot according to the respective position coordinates, and comparing each vector angle value with a preset confidence interval to determine a target light source region; determining a target starting light source in the target light source region, and determining the position of a target handle based on the target starting light source and each vector angle value. The application can enable the terminal equipment to determine the region position of each light spot in the target handle, thereby achieving the technical effect of tracking the handle position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of VR (Virtual Reality) device technology, and in particular to a method, apparatus, terminal device, and computer-readable storage medium for tracking the position of a controller. Background Technology

[0002] With the rapid development of virtual reality technology, VR headsets have increasingly higher requirements for the accuracy of controller positioning and tracking. Currently, VR headsets mainly use optical positioning to improve positioning accuracy. However, optical positioning for controller tracking mainly involves using an infrared camera to capture images of the controller to obtain target images containing light spots formed by infrared light emitted by each infrared bead on the controller. The distance between the controller and the VR headset is then determined based on the coordinates of each light spot in the target image, thereby achieving controller positioning and tracking.

[0003] As a result, when the distance between the controller and the VR headset changes, the size of the light spot on the image changes, which affects the accuracy of the final coordinate calculation and makes it impossible for the VR headset to accurately track the position of the controller. Summary of the Invention

[0004] This invention provides a method, apparatus, terminal device, and computer-readable storage medium for tracking the position of a handle. The aim is to enable the terminal device to determine the location of the light source corresponding to each light spot in the acquired target image within the target handle, thereby completing the tracking of the handle's position.

[0005] To achieve the above objectives, the present invention provides a method for tracking the position of a handle, the method comprising the following steps:

[0006] The image acquisition device is invoked to capture a target image containing multiple light spots, and the position coordinates of each light spot in the target image are determined.

[0007] The vector angle values ​​between the light spots are determined based on the coordinates of each position, and the vector angle values ​​are compared with the preset confidence intervals to determine the target light source area.

[0008] A target starting light source is determined in the target light source region, and the position of the target handle is determined based on the target starting light source and the included angle values ​​of each vector.

[0009] Further, the step of determining the position coordinates corresponding to each of the light spots within the target image includes:

[0010] Extract the image features of the target image;

[0011] The position coordinates of each of the light spots in the target image are determined based on the image features.

[0012] Further, the step of determining the vector angle between each light spot based on each of the position coordinates includes:

[0013] Each light spot is marked according to its position coordinates to obtain the marking results;

[0014] Based on the marking results, the vector angle values ​​between each of the light spots and the other light spots are determined.

[0015] Further, the step of comparing the included angle values ​​of each vector with preset confidence intervals to determine the target light source region includes:

[0016] Obtain the confidence intervals corresponding to each preset light source region;

[0017] Determine the confidence value corresponding to the included angle of each vector within each confidence interval, and determine the target light source region in each light source region based on each confidence value.

[0018] Further, the step of determining the target light source region in each of the light source regions based on each of the confidence values ​​includes:

[0019] The confidence values ​​corresponding to the included angle values ​​of each vector are summed to obtain the total confidence value corresponding to each included angle value of each vector.

[0020] Each of the total confidence values ​​is compared with a preset confidence threshold to determine a target total confidence value that is greater than the confidence threshold among the total confidence values, and the light source region corresponding to the target total confidence value is determined as the target light source region.

[0021] Further, the step of determining the target starting light source in the target light source region and determining the position of the target handle based on the target starting light source and the included angle values ​​of each of the vectors includes:

[0022] Determine the target vector angle value corresponding to the total target confidence value, and determine the target starting light source in the target light source region based on the target vector angle value;

[0023] Based on the target starting light source and the included angle data of each vector, the arrangement order of each light source within the target light source area is determined, and the position of the target handle is determined according to the arrangement order.

[0024] Furthermore, after the step of determining the vector angle values ​​between the light spots based on the coordinates of each position, the method further includes:

[0025] If the target light source area cannot be determined, the optical flow sensor is invoked to obtain the optical flow information of the target handle;

[0026] The position of the target handle is determined based on the optical flow information.

[0027] Furthermore, to achieve the above objectives, the present invention also provides a handle position tracking device, the device comprising:

[0028] The light spot determination module is used to call the image acquisition device to capture a target image containing multiple light spots, and to determine the position coordinates of each light spot in the target image.

[0029] The region matching module is used to determine the vector angle values ​​between the light spots based on the coordinates of each position, and compare the vector angle values ​​with preset confidence intervals to determine the target light source region.

[0030] The position tracking module is used to determine the target starting light source in the target light source area and to determine the position of the target handle based on the target starting light source and the included angle values ​​of each vector.

[0031] In addition, to achieve the above objectives, the present invention also provides a terminal device, the terminal device comprising: a memory, a processor, and a controller position tracking program stored in the memory and executable on the processor, wherein the controller position tracking program, when executed by the processor, implements the steps of the controller position tracking method as described above.

[0032] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a controller position tracking program, which, when executed by a processor, implements the steps of the controller position tracking method described above.

[0033] The present invention provides a method, apparatus, terminal device, and computer-readable storage medium for tracking the position of a handle. This involves capturing a target image containing multiple light spots using an image acquisition device, determining the position coordinates of each light spot within the target image, determining the vector angle values ​​between the light spots based on their position coordinates, comparing these vector angle values ​​with preset confidence intervals to determine a target light source region, identifying a target starting light source within the target light source region, and determining the position of the target handle based on the target starting light source and the vector angle values.

[0034] In this embodiment, when the terminal device is running, it first calls the image acquisition device within the terminal device to capture a target image containing light spots formed by invisible light emitted from multiple light sources on the target handle. The target image is then input to the image processing device configured within the terminal device. The image processing device extracts image feature information from the target image and determines the position coordinates of each light spot within the target image based on the image feature information. Subsequently, the terminal device determines the vector angle values ​​between each light spot and other light spots based on the position coordinates. Simultaneously, the terminal device reads from the storage device to obtain preset confidence intervals and inputs the vector angle values ​​and confidence intervals together to the data processing device configured within the terminal device. The data processing device calculates the vector angle values ​​based on the confidence intervals to determine the target light source region within the light source region corresponding to each confidence interval. Then, the data processing device determines the target starting light source within the target light source region and determines the position of the target handle based on the target starting light source and the vector angle data.

[0035] Thus, this invention acquires a target image containing light spots formed by invisible light emitted by each light source on the controller, and determines the target light source region in the corresponding light source region of each confidence interval based on the vector angle values ​​between each light spot in the target image and each preset confidence interval. Then, it determines the target starting light source in the target light source region, and tracks the position of the target controller based on the target starting light source and the vector angle values. In other words, this invention solves the problem that current VR headsets using optical positioning to track controller position are affected by specific factors, and achieves the technical effect of enabling the terminal device to determine the position of the light source corresponding to each light spot in the acquired target image in the target controller, thereby completing the tracking of the controller position. Attached Figure Description

[0036] Figure 1 This is a schematic diagram of the structure of the terminal device in the hardware operating environment involved in the embodiments of the present invention;

[0037] Figure 2 This is a flowchart illustrating the first embodiment of the handle position tracking method of the present invention;

[0038] Figure 3 This is a flowchart illustrating a second embodiment of the handle position tracking method of the present invention;

[0039] Figure 4 This is a detailed flowchart illustrating an embodiment of the handle position tracking method of the present invention;

[0040] Figure 5This is a schematic diagram of the illumination area involved in an embodiment of the handle position tracking method of the present invention;

[0041] Figure 6 This is a detailed schematic diagram of the illumination area involved in an embodiment of the handle position tracking method of the present invention;

[0042] Figure 7 This is a schematic diagram illustrating the vector angle calculation process in one embodiment of the handle position tracking method of the present invention.

[0043] Figure 8 This is a schematic diagram of the functional modules involved in an embodiment of the handle position tracking method of the present invention.

[0044] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

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

[0046] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the terminal device structure of the hardware operating environment involved in the embodiments of the present invention.

[0047] The terminal device involved in the embodiments of the present invention may be a mobile VR headset or a fixed VR headset equipped with an HMD head-mounted device and a controller, and the mobile VR headset or the fixed VR headset is composed of an HMD head-mounted device and a matching controller.

[0048] 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. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0049] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

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

[0051] 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 memory 1005 in the terminal device of the present invention can be set in the terminal device, and the terminal device calls the handle position tracking program stored in the memory 1005 through the processor 1001 and performs the following operations:

[0052] The image acquisition device is invoked to capture a target image containing multiple light spots, and the position coordinates of each light spot in the target image are determined.

[0053] The vector angle values ​​between the light spots are determined based on the coordinates of each position, and the vector angle values ​​are compared with the preset confidence intervals to determine the target light source area.

[0054] A target starting light source is determined in the target light source region, and the position of the target handle is determined based on the target starting light source and the included angle values ​​of each vector.

[0055] Furthermore, the processor 1001 can call the handle position tracking program stored in the memory 1005 and also perform the following operations:

[0056] Extract the image features of the target image;

[0057] The position coordinates of each of the light spots in the target image are determined based on the image features.

[0058] Furthermore, the processor 1001 can call the handle position tracking program stored in the memory 1005 and also perform the following operations:

[0059] Each light spot is marked according to its position coordinates to obtain the marking results;

[0060] Based on the marking results, the vector angle values ​​between each of the light spots and the other light spots are determined.

[0061] Furthermore, the processor 1001 can call the handle position tracking program stored in the memory 1005 and also perform the following operations:

[0062] Obtain the confidence intervals corresponding to each preset light source region;

[0063] Determine the confidence value corresponding to the included angle of each vector within each confidence interval, and determine the target light source region in each light source region based on each confidence value.

[0064] Furthermore, the processor 1001 can call the handle position tracking program stored in the memory 1005 and also perform the following operations:

[0065] The confidence values ​​corresponding to the included angle values ​​of each vector are summed to obtain the total confidence value corresponding to each included angle value of each vector.

[0066] Each of the total confidence values ​​is compared with a preset confidence threshold to determine a target total confidence value that is greater than the confidence threshold among the total confidence values, and the light source region corresponding to the target total confidence value is determined as the target light source region.

[0067] Furthermore, the processor 1001 can call the handle position tracking program stored in the memory 1005 and also perform the following operations:

[0068] Determine the target vector angle value corresponding to the total target confidence value, and determine the target starting light source in the target light source region based on the target vector angle value;

[0069] Based on the target starting light source and the included angle data of each vector, the arrangement order of each light source within the target light source area is determined, and the position of the target handle is determined according to the arrangement order.

[0070] Furthermore, the processor 1001 can call the handle position tracking program stored in the memory 1005 and also perform the following operations:

[0071] If the target light source area cannot be determined, the optical flow sensor is invoked to obtain the optical flow information of the target handle;

[0072] The position of the target handle is determined based on the optical flow information.

[0073] Based on the aforementioned terminal device, various embodiments of the handle position tracking method of the present invention are provided.

[0074] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the handle position tracking method of the present invention.

[0075] It should be understood that although the logical order is shown in the flowchart, in some cases the method for tracking the handle position of the present invention may of course perform the steps shown or described in a different order than that shown here.

[0076] In this embodiment, the method for tracking the position of the handle of the present invention may include the following steps:

[0077] Step S10: Use an image acquisition device to capture a target image containing multiple light spots, and determine the position coordinates of each light spot in the target image.

[0078] The image acquisition device is an infrared camera that uses LED infrared light-emitting diodes as the main material or other camera or video recording device that can capture infrared light; in addition, the placement of the infrared camera can refer to the placement of the video recording device in other similar VR headsets, and the present invention does not limit it in this regard.

[0079] Similarly, the target controller that is paired with the terminal device should be equipped with multiple light source devices that can emit infrared light. These light source devices should be infrared LEDs, and each infrared LED should be of the same model. The deployment position of each infrared LED on the target controller can refer to the deployment position of LEDs on other VR controllers of the same type. This invention does not impose any restrictions on this.

[0080] In this embodiment, when the terminal device is running, it first calls the image acquisition device in the terminal device to capture a target image containing light spots formed by multiple light sources emitting invisible light on the target handle, and inputs the target image into the image processing device configured in the terminal device, which determines the position coordinates of each light spot in the target image.

[0081] For example, please refer to Figure 4 , Figure 4 This is a detailed flowchart illustrating an embodiment of the controller position tracking method of the present invention. When the VR headset is running, the control system integrated on the internal main control chip first calls the infrared camera configured in the VR headset, and the infrared camera takes a picture of the VR controller that is matched with the VR headset to obtain a target image containing the light spots formed by the infrared rays emitted by each infrared LED. The target image is then input to the image processing device, which determines the position coordinates of each light spot in the target image.

[0082] Furthermore, in a feasible embodiment, the step of "determining the positions of each light source within the target image" in step S10 above may specifically include:

[0083] Step S101: Extract the image features of the target image;

[0084] Step S102: Determine the position coordinates of each of the light spots in the target image based on each of the image features;

[0085] For example, after acquiring the target image, the VR headset inputs the target image to the image processing device, which extracts the image features in the target image, determines the position coordinates of each light spot on the target image based on the image features, and uploads the position coordinates to the VR headset.

[0086] Step S20: Determine the vector angle values ​​between each light spot based on each of the position coordinates, and compare each of the vector angle values ​​with each preset confidence interval to determine the target light source area;

[0087] A confidence interval is an estimated interval for a population parameter constructed from sample statistics. In statistics, the confidence interval of a probability sample is an interval estimate of a certain population parameter for that sample. Please refer to... Figure 5 and Figure 6 ,in, Figure 5 This is a schematic diagram of the illumination area involved in an embodiment of the handle position tracking method of the present invention. Figure 6This is a detailed schematic diagram of the illumination area involved in an embodiment of the handle position tracking method of the present invention; in this embodiment, the portion of the target handle equipped with infrared LEDs is divided as follows: Figure 5 and Figure 6 The three light source regions shown are the upper, middle, and lower light source regions, respectively. There should be overlap between these regions. Then, based on the vector angle values ​​between the infrared LEDs within each light source region, the confidence interval for each light source region is determined. It should be noted that a single light source region can correspond to two confidence intervals. For example, when the light source region is the middle light source region of the target handle, confidence interval 1 can be set as:

[0088] [50°, 60°]: 4, [40°, 50°]: 2, [30°, 40°]: 5, [20°, 30°]: 3, the rest: 1;

[0089] Here, confidence interval 1 means that when the vector angle value is between 50° and 60°, the confidence value corresponding to the vector angle value is 4; when the vector angle value is between 40° and 50°, the confidence value corresponding to the vector angle value is 2, and so on. Similarly, confidence interval 2 can also exist for this middle light source region.

[0090] [0°, 10°]: 4, [10°, 20°]: 5, [20°, 30°]: 3, [30°, 40°]: 2, the rest: 1;

[0091] It is understood that there are many ways to set the number of light source regions and confidence intervals, and this invention does not limit them.

[0092] In this embodiment, the terminal device determines the vector angle values ​​between each light spot and other light spots based on the aforementioned position coordinates. Simultaneously, the terminal device reads from the storage device to obtain each confidence interval, and inputs each vector angle value and each confidence interval together into the data processing device configured in the terminal device. The data processing device calculates each vector angle value based on each confidence interval to determine the target light source area in the light source area corresponding to each confidence interval.

[0093] For example, the VR headset first reads the storage device to obtain the confidence interval 1 and confidence interval 2 corresponding to each light source region. At the same time, the VR headset calculates the vector angle value between each light spot and other light spots based on the obtained position coordinates. Then, the VR headset inputs each vector angle value, each confidence interval 1 and each confidence interval 2 into the data processing device. The data processing device calculates the vector angle data based on each confidence interval 1 and each confidence interval 2 to determine the target light source region in each light source region.

[0094] Furthermore, in a feasible embodiment, the step of "determining the vector angle value between each light spot based on each of the said position coordinates" in step S20 above may specifically include:

[0095] Step S201: Mark each light spot according to its position coordinates to obtain the marking results;

[0096] In this embodiment, the terminal device determines the position of each of the above-mentioned light spots in the above-mentioned target image based on the acquired position coordinates and determines the positional relationship. The terminal device then marks each light spot sequentially according to the positional relationship to obtain each marking result.

[0097] Step S202: Determine the vector angle values ​​between each of the light spots and the other light spots based on the marking results;

[0098] In this embodiment, the terminal device calculates the vector angle values ​​between each of the above-mentioned light spots and other light spots based on the above-mentioned marking results and the above-mentioned position coordinates.

[0099] For example, please refer to Figure 4 and Figure 7 ,in, Figure 7 This is a schematic diagram illustrating the vector angle calculation process in an embodiment of the controller position tracking method of the present invention. After obtaining the coordinates of each position, the VR headset determines the positional relationship between each light spot based on the coordinates. According to the positional relationship and the preset marking direction, the light spots are sequentially marked with consecutive numbers to determine six light spots from number 0 to number 6. Then, the VR headset calculates the vector angle values ​​between consecutive light spots and between light spots with a gap of one light spot according to the marking number, and uploads the calculated vector angle values ​​back to the VR headset.

[0100] Furthermore, in a feasible embodiment, the step S20 above, "comparing the included angle values ​​of each vector with preset confidence intervals to determine the target light source region," may specifically include:

[0101] Step S203: Obtain the confidence interval corresponding to each preset light source region;

[0102] In this embodiment, the terminal device reads the storage device to obtain each confidence interval corresponding to each light source area on the target handle, and inputs each confidence interval and the obtained vector angle values ​​together into the data processing device.

[0103] Step S204: Determine the confidence value corresponding to the included angle of each vector within each confidence interval, and determine the target light source region in each light source region based on each confidence value;

[0104] In this embodiment, the data processing device determines each confidence value of each vector angle value within each confidence interval based on each confidence interval and each vector angle value, and determines the target light source region in each light source region based on each confidence value.

[0105] For example, the VR headset first reads from the storage device to obtain the confidence interval 1 and the confidence interval 2 corresponding to the mid-section light source area in the target handle, and inputs the confidence interval 1 and the confidence interval 2 together into the data processing device. Then, the data processing device substitutes the obtained vector angle values ​​into the confidence interval 1 and the confidence interval 2 respectively, thereby obtaining the confidence value 1 and confidence value 2 corresponding to each vector angle in the confidence interval 1 and the confidence interval 2, to generate the following table:

[0106]

[0107] Table 1

[0108]

[0109] Table 2

[0110] Subsequently, the data processing device also determines the confidence value corresponding to each vector angle based on the confidence intervals corresponding to the upper light source area and the lower light source area within the target handle. The data processing device then determines the target light source area in the upper light source area, the middle light source area, and the lower light source area based on the confidence values.

[0111] Furthermore, in a feasible embodiment, the step of "determining the target light source region in each of the light source regions based on each of the confidence values" in step S204 above may specifically include:

[0112] Step S2041: Sum the confidence values ​​corresponding to the included angle values ​​of each vector to obtain the total confidence value corresponding to each included angle value of each vector;

[0113] In this embodiment, after determining the confidence value of each of the above-mentioned vector angles within each confidence interval, the data processing device sums the confidence values ​​of each vector angle within the same light source region to obtain the total confidence value of each vector angle within each light source region.

[0114] Step S2042: Compare each of the total confidence values ​​with a preset confidence threshold to determine a target total confidence value that is greater than the confidence threshold among the total confidence values, and determine the light source region corresponding to the target total confidence value as the target light source region;

[0115] In this embodiment, the terminal device reads the aforementioned storage device to obtain a preset confidence threshold and inputs the confidence threshold into the aforementioned data processing device. The data processing device compares the total confidence value corresponding to each vector angle with the confidence threshold to determine the target total confidence value that is the largest and greater than the confidence threshold among the total confidence values, and determines the light source area corresponding to the target total confidence value as the target light source area.

[0116] For example, firstly, the VR headset reads the aforementioned storage device to obtain a confidence threshold, and inputs the confidence threshold into the aforementioned data processing device. Then, the data processing device determines the confidence threshold to be 8, and determines the total confidence values ​​of each of the aforementioned vector angle values ​​within the aforementioned mid-section light source region according to Tables 1 and 2, as shown in Table 3.

[0117]

[0118] Table 3

[0119] Subsequently, according to Table 3, the data processing device determines the highest confidence total value (10) corresponding to LED serial number 1 from among the total confidence values. Similarly, the data processing device sequentially obtains the total confidence values ​​of each vector angle within the aforementioned upper and lower light source regions. Then, as... Figure 7 As shown, when the data processing device determines that the total confidence value corresponding to the middle light source region is the maximum value and is greater than the confidence threshold 8, the data processing device determines the middle light source region as the target light source region.

[0120] It should be noted that in this embodiment, there are many ways to set the light source area on the target handle. Technicians can change the setting method and number of light areas according to actual needs, and the present invention does not limit this.

[0121] Step S30: Determine the target starting light source in the target light source area, and determine the position of the target handle based on the target starting light source and the included angle values ​​of each vector;

[0122] In this embodiment, the terminal device determines the target starting light source in the target light source area through the data processing device, and determines the position of the target handle based on the target starting light source and the angle data of each of the above vectors.

[0123] For example, after the VR headset determines the target light source area through the data processing device, it determines the No. 1 LED as the target LED based on the maximum confidence total value 10, and determines the infrared LED corresponding to the No. 1 LED as the target starting light source within the target light source area according to the LED arrangement rules and LED labeling rules preset by the technician. Then, the VR headset determines the position of the target handle based on the target starting light source and the angle values ​​of each of the above vectors.

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

[0125] Step S301: Determine the target vector angle value corresponding to the total target confidence value, and determine the target starting light source in the target light source region based on the target vector angle value;

[0126] Step S302: Determine the arrangement order of each light source within the target light source area based on the target starting light source and the included angle data of each vector, and determine the position of the target handle according to the arrangement order;

[0127] For example, after the VR headset determines the target light source area through the data processing device, it determines the vector angle value corresponding to 1→2:2→3 as the target vector angle value based on the maximum confidence total value 10, and determines the infrared LED bead corresponding to the No. 1 marker light source on the target handle as the target starting light source. Then, the VR headset determines the arrangement order of each infrared LED bead in the middle light source area based on the target starting light source and each of the vector angle values, and determines the position of the target handle according to the arrangement order.

[0128] It should be noted that, in this embodiment, the VR headset can also acquire multiple target images, determine the target light source area corresponding to each of the multiple target images, and predict the motion trajectory of the target controller based on the differences between the target light source areas to complete the tracking of the target controller position. It is understood that there are many specific implementation methods for tracking the target controller position based on the target light source area, and the present invention does not limit them.

[0129] In this embodiment, when the terminal device is running, it first calls the image acquisition device within the terminal device to capture a target image containing light spots formed by invisible light emitted from multiple light sources on the target handle. The target image is then input to the image processing device configured within the terminal device, which determines the position coordinates of each light spot within the target image. Subsequently, the terminal device determines the vector angle values ​​between each light spot and other light spots based on the aforementioned position coordinates. Simultaneously, the terminal device reads from the storage device to obtain various confidence intervals, and inputs the vector angle values ​​and confidence intervals together with the data processing device configured within the terminal device. The data processing device calculates the vector angle values ​​based on the confidence intervals to determine the target light source region within the light source region corresponding to each confidence interval. Finally, the terminal device uses the data processing device to determine the target starting light source within the target light source region and determines the position of the target handle based on the target starting light source and the aforementioned vector angle data.

[0130] Thus, this invention acquires a target image containing light spots formed by invisible light emitted by each light source on the controller, and determines the target light source region in the corresponding light source region of each confidence interval based on the vector angle values ​​between each light spot in the target image and each preset confidence interval. Then, it determines the target starting light source in the target light source region, and tracks the position of the target controller based on the target starting light source and the vector angle values. In other words, this invention solves the problem that current VR headsets using optical positioning to track controller position are affected by specific factors, and achieves the technical effect of enabling the terminal device to determine the position of the light source corresponding to each light spot in the acquired target image in the target controller, thereby completing the tracking of the controller position.

[0131] Furthermore, based on the first embodiment of the handle position tracking method of the present invention described above, a second embodiment of the handle position tracking method of the present invention is hereby proposed.

[0132] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating a second embodiment of the handle position tracking method of the present invention.

[0133] After step S20 above, the handle position tracking method of the present invention may further include:

[0134] Step A10: If the target light source area cannot be determined, the optical flow sensor is invoked to obtain the optical flow information of the target handle;

[0135] In this embodiment, when the terminal device cannot determine the target light source area after comparing the included angle values ​​of each of the above vectors with each of the above confidence intervals, the terminal device controls the optical flow sensing device disposed on the surface of the terminal device housing to obtain the optical flow information corresponding to the target handle, and inputs the optical flow information to the above data processing device.

[0136] Step A20: Determine the position of the target handle based on the optical flow information;

[0137] In this embodiment, after receiving each of the aforementioned optical flow information, the data processing device calculates the current position of the target handle based on the optical flow information and uploads the current position back to the terminal device.

[0138] For example, such as Figure 7 As shown, when the VR headset cannot determine the target light source area in each of the above-mentioned light source areas after comparing the included angle values ​​of each of the above-mentioned vectors with each of the above-mentioned confidence intervals, the VR headset calls the optical flow sensor configured on the shell of the VR headset through the above-mentioned main control system to obtain the optical flow information corresponding to the target handle, and inputs the optical flow information to the above-mentioned data processing device. The data processing device calculates the position of the target handle based on the optical flow information, so as to prevent the VR headset from being unable to calculate the movement trajectory of the target handle due to the interruption of the tracking process after the matching fails.

[0139] In addition, the present invention also provides a tracking device for the position of a handle, please refer to... Figure 7 , Figure 7 This is a schematic diagram of the functional modules involved in an embodiment of the handle position tracking method of the present invention, as shown below. Figure 7 As shown, the handle position tracking device of the present invention includes:

[0140] The light spot determination module 10 is used to call the image acquisition device to capture a target image containing multiple light spots, and determine the position coordinates of each light spot in the target image.

[0141] The region matching module 20 is used to determine the vector angle values ​​between each light spot based on each of the position coordinates, and compare each of the vector angle values ​​with each preset confidence interval to determine the target light source region;

[0142] The position tracking module 30 is used to determine the target starting light source in the target light source area, and to determine the position of the target handle based on the target starting light source and the included angle values ​​of each vector.

[0143] Furthermore, the spot determination module 10 includes:

[0144] An image processing unit is used to extract various image features from the target image;

[0145] The coordinate calculation unit is used to determine the position coordinates of each of the light spots in the target image based on the image features.

[0146] Furthermore, the region matching module 20 includes:

[0147] A spot marking unit is used to mark each spot according to each of the position coordinates to obtain each marking result;

[0148] Angle calculation unit is used to determine the vector angle value between each of the light spots and other light spots based on the marking results.

[0149] Furthermore, the region matching module 20 also includes:

[0150] The interval acquisition unit is used to acquire the confidence interval corresponding to each preset light source region;

[0151] The region matching unit is used to determine the confidence value corresponding to the included angle of each vector within each confidence interval, and to determine the target light source region in each light source region based on the confidence value.

[0152] Furthermore, the region matching unit includes:

[0153] The total value calculation subunit is used to sum the confidence values ​​corresponding to the angle values ​​of each vector to obtain the total confidence value corresponding to each angle value of each vector.

[0154] The total value filtering subunit is used to compare each of the total confidence values ​​with a preset confidence threshold to determine a target total confidence value that is greater than the confidence threshold among the total confidence values, and to determine the light source area corresponding to the target total confidence value as the target light source area.

[0155] Furthermore, the location tracking module 30 includes:

[0156] A light source determination unit is used to determine the target vector angle value corresponding to the total target confidence value, and to determine the target starting light source in the target light source region based on the target vector angle value;

[0157] The arrangement determination unit is used to determine the arrangement order of each light source within the target light source area based on the target starting light source and the included angle data of each vector, and to determine the position of the target handle according to the arrangement order.

[0158] Furthermore, the region matching module 20 also includes:

[0159] The optical flow acquisition unit is used to acquire the optical flow information of the target handle by calling the optical flow sensing device if the target light source area cannot be determined.

[0160] An optical flow calculation unit is used to determine the position of the target handle based on the optical flow information.

[0161] Furthermore, the present invention also provides a terminal device having a controller position tracking program that can run on a processor, wherein when the terminal device executes the controller position tracking program, it implements the steps of the controller position tracking method as described in any of the above embodiments.

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

[0163] Furthermore, the present invention also provides a computer-readable storage medium storing a controller position tracking program, which, when executed by a processor, implements the steps of the controller position tracking method as described in any of the above embodiments.

[0164] The specific embodiments of the computer-readable storage medium of this invention are basically the same as the embodiments of the handle position tracking method described above, and will not be repeated here.

[0165] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0166] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which can be a mobile VR headset or a fixed VR headset configured with an HMD head-mounted device and a controller, and the mobile VR headset or the fixed VR headset is composed of an HMD head-mounted device and a matching controller) to execute the methods described in the various embodiments of the present invention.

[0168] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for tracking the position of a handle, characterized in that, The method for tracking the position of the handle includes the following steps: The image acquisition device is invoked to capture a target image containing multiple light spots, and the position coordinates of each light spot in the target image are determined. The vector angle values ​​between the light spots are determined based on the coordinates of each position, and the vector angle values ​​are compared with the preset confidence intervals to determine the target light source area. A target starting light source is determined in the target light source region, and the position of the target handle is determined based on the target starting light source and the included angle values ​​of each of the vectors; The step of determining the position coordinates of each of the light spots within the target image includes: Extract the image features of the target image; The position coordinates of each of the light spots in the target image are determined based on the image features.

2. The handle position tracking method as described in claim 1, characterized in that, The step of determining the vector angle between each light spot based on each of the position coordinates includes: Each light spot is marked according to its position coordinates to obtain the marking results; Based on the marking results, the vector angle values ​​between each of the light spots and the other light spots are determined.

3. The handle position tracking method as described in claim 2, characterized in that, The step of comparing the included angle values ​​of each vector with preset confidence intervals to determine the target light source region includes: Obtain the confidence intervals corresponding to each preset light source region; Determine the confidence value corresponding to the included angle of each vector within each confidence interval, and determine the target light source region in each light source region based on each confidence value.

4. The handle position tracking method as described in claim 3, characterized in that, The step of determining the target light source region in each of the light source regions based on each of the confidence values ​​includes: The confidence values ​​corresponding to the included angle values ​​of each vector are summed to obtain the total confidence value corresponding to each included angle value of each vector. Each of the total confidence values ​​is compared with a preset confidence threshold to determine a target total confidence value that is greater than the confidence threshold among the total confidence values, and the light source region corresponding to the target total confidence value is determined as the target light source region.

5. The handle position tracking method as described in claim 4, characterized in that, The step of determining the target starting light source in the target light source region and determining the position of the target handle based on the target starting light source and the included angle values ​​of each vector includes: Determine the target vector angle value corresponding to the total target confidence value, and determine the target starting light source in the target light source region based on the target vector angle value; The arrangement order of each light source within the target light source area is determined based on the target starting light source and the included angle values ​​of each vector, and the position of the target handle is determined according to the arrangement order.

6. The handle position tracking method as described in claim 1, characterized in that, After the step of determining the vector angle between each of the light spots based on each of the position coordinates, the method further includes: If the target light source area cannot be determined, the optical flow sensor is invoked to obtain the optical flow information of the target handle; The position of the target handle is determined based on the optical flow information.

7. A handle position tracking device, characterized in that, The device includes: The light spot determination module is used to call the image acquisition device to capture a target image containing multiple light spots, and to determine the position coordinates of each light spot in the target image. The region matching module is used to determine the vector angle values ​​between the light spots based on the coordinates of each position, and compare the vector angle values ​​with preset confidence intervals to determine the target light source region. The position tracking module is used to determine the target starting light source in the target light source area, and to determine the position of the target handle based on the target starting light source and the included angle values ​​of each of the vectors; The light spot determination module includes: An image processing unit is used to extract various image features from the target image; The coordinate calculation unit is used to determine the position coordinates of each of the light spots in the target image based on the image features.

8. A terminal device, characterized in that, The terminal device includes: a memory, a processor, and a controller position tracking program stored in the memory and executable on the processor, wherein the controller position tracking program, when executed by the processor, implements the steps of the controller position tracking method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a controller position tracking program, which, when executed by a processor, implements the steps of the controller position tracking method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

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

    CN115082520A