Positioning method, head mounted device and computer readable storage medium
By using relative distance, relative angle and inertial measurement information to determine the moving state of the handle in a virtual reality headset, the problem of difficulty in positioning the handle when the camera is dead corner is solved, expanding the positionable range and improving the user experience.
Patent Information
- Application Number
- CN202210452540.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-04-27
AI Technical Summary
Existing virtual reality headsets cannot accurately determine the positioning of the handle when the handle moves to the camera's dead corner, resulting in limited range of movement of the handle.
When the handle motion state cannot be determined by the active detection method, the relative distance and relative angle between the handle and the head-mounted device are determined, and the inertial measurement information sent by the handle is obtained, and the motion state of the handle is determined based on this information.
The positionable range of the headset to the handle is expanded, the detection blind spot problem of active detection methods is solved, and the sensitivity and user experience of handle interaction are improved.
Smart Images

Figure CN114681907B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of virtual reality equipment, and in particular to a positioning method, a head-mounted device and a computer-readable storage medium. Background Art
[0002] Virtual Reality technology is the combination of virtuality and reality. It uses data from real life, electronic signals generated by computer technology, and combines them with various output devices to transform them into phenomena that people can feel. Immersion is the most important feature of virtual reality technology, which allows users to become and feel that they are part of the environment created by the computer system. The immersion of virtual reality technology depends on the user's perception system. When users perceive the stimulation of the virtual world, including touch, taste, smell, motion perception, etc., they will have a resonance of thinking, resulting in psychological immersion, and feel like entering the real world.
[0003] In order to achieve interaction, virtual reality products will include a head-mounted device and a handle. During use, the handle is photographed and identified through the camera of the head-mounted device to achieve the positioning of the handle. However, the camera has blind spots. When the handle moves to the blind spot of the camera, the position of the handle cannot be accurately determined, which limits the range of movement of the handle.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide a positioning method, a head-mounted device and a computer-readable storage medium, aiming to achieve the effect of expanding the positioning range of the head-mounted device for the handle.
[0006] To achieve the above object, the present invention provides a positioning method, which is applied to a head mounted device, wherein the head mounted device includes a photographing device. The positioning method includes:
[0007] When the motion state of the handle cannot be determined according to the active detection method, determining the relative distance and relative angle between the handle and the head mounted device;
[0008] Obtaining inertial measurement information sent by the handle;
[0009] The motion state of the handle is determined according to the relative distance, the relative angle and the inertial measurement information.
[0010] Optionally, the step of determining the relative distance and relative angle between the handle and the head mounted device comprises:
[0011] Transmitting a positioning signal to the handle, wherein the handle returns positioning data after receiving the positioning signal;
[0012] receiving the positioning data;
[0013] The relative distance and the relative angle are determined according to the positioning data.
[0014] Optionally, the step of determining the relative distance and relative angle between the handle and the head mounted device comprises:
[0015] Acquire a scene image captured by a backup shooting device of the head mounted device;
[0016] Identify the position of the light ring of the handle according to the scene image;
[0017] The relative distance and the relative angle are determined according to the position of the light ring.
[0018] Optionally, the inertial measurement information includes acceleration information and angular velocity information, and the step of determining the motion state of the handle according to the relative distance, the relative angle and the inertial measurement information includes:
[0019] Determine the position information and flip information of the handle according to the relative distance and the relative angle;
[0020] Integrating the position information according to the acceleration information, and integrating the flipping information according to the angular velocity information;
[0021] The real-time position information and real-time flipping information of the handle are determined according to the integration result.
[0022] Optionally, the step of acquiring the inertial measurement information sent by the handle includes:
[0023] When the motion state of the handle cannot be determined according to the active detection method, establishing a communication connection with the handle;
[0024] A request for acquiring the inertial measurement information is sent to the handle based on the communication connection, wherein the handle sends the inertial measurement information to the head mounted device after receiving the request;
[0025] The inertial measurement information sent by the handle is received.
[0026] Optionally, the method further comprises:
[0027] Acquire a scene image through a shooting device;
[0028] Identify the position of the light ring of the handle according to the scene image;
[0029] When the scene image cannot identify the position of the light ring, it is determined that the motion state of the handle cannot be determined according to the active detection method.
[0030] Optionally, the inertial measurement information includes acceleration information or angular velocity information, and the step of determining the motion state of the handle according to the relative distance, the relative angle and the inertial measurement information includes:
[0031] Determine the position information of the handle according to the relative distance and the relative angle;
[0032] Integrating the position information according to the acceleration information to obtain a first integration result;
[0033] Determine the real-time position information of the handle according to the first integration result; or
[0034] Determine flipping information of the handle according to the relative distance and the relative angle;
[0035] Integrate the flip information according to the angular velocity information to obtain a second integration result;
[0036] The real-time flipping information of the handle is determined according to the second integration result.
[0037] Optionally, the step of determining the motion state of the handle includes:
[0038] determining a current position of the handle according to the motion state;
[0039] When the current position is within the detection range of the active detection method, the motion state of the handle is acquired through the active detection method.
[0040] In addition, to achieve the above-mentioned purpose, the present invention also provides a head-mounted device, which includes a memory, a processor, and a positioning program stored in the memory and executable on the processor, and the positioning program implements the steps of the positioning method described above when executed by the processor.
[0041] In addition, to achieve the above-mentioned purpose, the present invention further provides a computer-readable storage medium, on which a positioning program is stored, and when the positioning program is executed by a processor, the steps of the positioning method described above are implemented.
[0042] The embodiments of the present invention propose a positioning method, a head-mounted device, and a computer-readable storage medium. When the motion state of the handle cannot be determined by the active detection method, the relative distance and relative angle between the handle and the head-mounted device are determined; the inertial measurement information sent by the handle is obtained; and the motion state of the handle is determined according to the relative distance, the relative angle, and the inertial measurement information. In this way, when the motion state of the handle cannot be determined by the active detection method, the relative distance and relative angle between the handle and the head-mounted device are determined by a method other than the active detection method, and the motion state of the handle is determined according to the relative distance, relative angle, and inertial measurement information. The movable range of the handle is not limited by the active detection method, which expands the positioning range of the handle by the head-mounted device. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention;
[0044] Figure 2 A schematic diagram of a flow chart of an embodiment of a positioning method of the present invention;
[0045] Figure 3 FIG. 4 is a flow chart of another embodiment of the positioning 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] In the related art, the handle is generally positioned by shooting and identifying the handle through the camera of the head-mounted device, but the camera has a blind spot. When the handle moves to the blind spot of the camera, the position of the handle cannot be accurately determined, which limits the range of movement of the handle.
[0049] In order to expand the positioning range of the head mounted device for the handle, an embodiment of the present invention provides a positioning method, a head mounted device and a computer readable storage medium, wherein the main steps of the method include:
[0050] When the motion state of the handle cannot be determined according to the active detection method, determining the relative distance and relative angle between the handle and the head mounted device;
[0051] Obtaining inertial measurement information sent by the handle;
[0052] The motion state of the handle is determined according to the relative distance, the relative angle and the inertial measurement information.
[0053] In this way, when the active detection method cannot determine the movement state of the handle, the relative distance and relative angle between the handle and the head-mounted device are determined by methods other than the active detection method, as well as the inertial measurement information detected by the handle, thereby determining the movement state of the handle, thereby achieving the effect of expanding the positioning range of the head-mounted device for the handle.
[0054] The content to be protected by the claims of the present invention will be described in detail below with reference to the accompanying drawings.
[0055] like Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.
[0056] The terminal in the embodiment of the present invention may be a head mounted device.
[0057] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a memory 1003, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The memory 1003 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1003 may also be a storage device independent of the aforementioned processor 1001.
[0058] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0059] like Figure 1 As shown, the memory 1003 as a computer storage medium may include an operating system and a positioning program.
[0060] exist Figure 1 In the terminal shown, the processor 1001 can be used to call the positioning program stored in the memory 1003 and perform the following operations:
[0061] Further, the processor 1001 may call the positioning program stored in the memory 1003, and further perform the following operations:
[0062] When the motion state of the handle cannot be determined according to the active detection method, determining the relative distance and relative angle between the handle and the head mounted device;
[0063] Obtaining inertial measurement information sent by the handle;
[0064] The motion state of the handle is determined according to the relative distance, the relative angle and the inertial measurement information.
[0065] Further, the processor 1001 may call the positioning program stored in the memory 1003, and further perform the following operations:
[0066] Transmitting a positioning signal to the handle, wherein the handle returns positioning data after receiving the positioning signal;
[0067] receiving the positioning data;
[0068] The relative distance and the relative angle are determined according to the positioning data.
[0069] Further, the processor 1001 may call the positioning program stored in the memory 1003, and further perform the following operations:
[0070] Acquire a scene image captured by a backup shooting device of the head mounted device;
[0071] Identify the position of the light ring of the handle according to the scene image;
[0072] The relative distance and the relative angle are determined according to the position of the light ring.
[0073] Further, the processor 1001 may call the positioning program stored in the memory 1003, and further perform the following operations:
[0074] Determine the position information and flip information of the handle according to the relative distance and the relative angle;
[0075] Integrating the position information according to the acceleration information, and integrating the flipping information according to the angular velocity information;
[0076] The real-time position information and real-time flipping information of the handle are determined according to the integration result.
[0077] Further, the processor 1001 may call the positioning program stored in the memory 1003, and further perform the following operations:
[0078] When the motion state of the handle cannot be determined according to the active detection method, establishing a communication connection with the handle;
[0079] A request for acquiring the inertial measurement information is sent to the handle based on the communication connection, wherein the handle sends the inertial measurement information to the head mounted device after receiving the request;
[0080] The inertial measurement information sent by the handle is received.
[0081] Further, the processor 1001 may call the positioning program stored in the memory 1003, and further perform the following operations:
[0082] Acquire a scene image through a shooting device;
[0083] Identify the position of the light ring of the handle according to the scene image;
[0084] When the scene image cannot identify the position of the light ring, it is determined that the motion state of the handle cannot be determined according to the active detection method.
[0085] Further, the processor 1001 may call the positioning program stored in the memory 1003, and further perform the following operations:
[0086] Determine the position information of the handle according to the relative distance and the relative angle;
[0087] Integrating the position information according to the acceleration information to obtain a first integration result;
[0088] Determine the real-time position information of the handle according to the first integration result; or
[0089] Determine flipping information of the handle according to the relative distance and the relative angle;
[0090] Integrate the flip information according to the angular velocity information to obtain a second integration result;
[0091] The real-time flipping information of the handle is determined according to the second integration result.
[0092] Further, the processor 1001 may call the positioning program stored in the memory 1003, and further perform the following operations:
[0093] determining a current position of the handle according to the motion state;
[0094] When the current position is within the detection range of the active detection method, the motion state of the handle is acquired through the active detection method.
[0095] Virtual Reality technology is the combination of virtuality and reality. It uses data from real life, electronic signals generated by computer technology, and combines them with various output devices to transform them into phenomena that people can feel. Immersion is the most important feature of virtual reality technology, which allows users to become and feel that they are part of the environment created by the computer system. The immersion of virtual reality technology depends on the user's perception system. When users perceive the stimulation of the virtual world, including touch, taste, smell, motion perception, etc., they will have a resonance of thinking, resulting in psychological immersion, and feel like entering the real world.
[0096] In addition to perceiving the immersive effect brought by virtual technology, users also need to interact with the virtual scenes to change the scenes. In order to achieve interaction, virtual reality products will include head-mounted devices and handles, and determine the user's control operations based on the movement of the handles. Therefore, the positioning of the handles by the head-mounted device is very important, and both accurate positioning and mobility of the handles must be guaranteed.
[0097] During use, the handle is photographed and identified through the camera of the head-mounted device to achieve the positioning of the handle. However, the camera has a blind spot. When the handle moves to the blind spot of the camera, the position of the handle cannot be accurately determined, which limits the range of movement of the handle.
[0098] It can be seen that the above defects exist in the relevant positioning methods. In order to solve the above defects, the embodiments of the present invention propose a positioning method applied to a head-mounted device, which aims to determine the relative distance and relative angle between the handle and the head-mounted device by a method other than the active detection method, and determine the movement state of the handle according to the relative distance, relative angle, acceleration information and angular velocity information, so as to achieve the effect of expanding the positioning range of the head-mounted device for the handle.
[0099] The following is an explanation of the content claimed in the claims of the present invention through specific exemplary schemes, so that those skilled in the art can better understand the scope of protection of the claims of the present invention. It is understood that the following exemplary schemes do not limit the scope of protection of the present invention, but are only used to explain the present invention.
[0100] For example, refer to Figure 2 In one embodiment of the positioning method of the present invention, the positioning method comprises the following steps:
[0101] Step S10: when the motion state of the handle cannot be determined by the active detection method, determining the relative distance and relative angle between the handle and the head mounted device;
[0102] In this embodiment, the subject that executes the positioning method is a head-mounted device.
[0103] A head-mounted device is a device worn on the head, which can be an application device of virtual reality technology. In order to realize the interaction between the user and the virtual technology of the head-mounted device, the head-mounted device can also be equipped with a handle, which can be used as an interactive interface of the head-mounted device, that is, when the user holds the handle, drives the handle to move and presses the button on the handle, the head-mounted device will perform corresponding processing operations according to the movement of the handle and the button on the handle. For example, when a monster-killing game is being played on the head-mounted device, the movement trajectory of the sword in the hand of the game character is determined according to the movement trajectory of the handle. The movement trajectory of the handle is driven by the user's hand movement, so when the user swings the handle, the game character will also swing the sword accordingly, thus realizing the interactive function of virtual reality technology. The key point to realize the above function is the positioning of the handle by the head-mounted device. The head-mounted device can determine the movement state of the handle by active detection to realize the positioning of the handle.
[0104] The active detection method is that the head-mounted device actively locates the handle. The active detection method is that the head-mounted device's shooting device, infrared scanning device, etc. shoot or scan the scene within a preset range to achieve positioning. The shooting or scanning operations will be within a certain shooting or scanning range. Therefore, the active detection method has a limited positioning range. When the handle exceeds the active detection method's positioning range, the movement state of the handle cannot be determined according to the active detection method.
[0105] When the movement state of the handle cannot be determined by active detection, it is necessary to determine the relative distance and relative angle between the handle and the head-mounted device by other means, for example (L1, φx1, φy1, φz1), where the relative distance is the relative distance between the head-mounted device and the handle, and the relative angle is the relative angle between the head-mounted device and the handle.
[0106] In an optional embodiment, a positioning signal is transmitted to the handle, wherein the handle returns positioning data after receiving the positioning signal; the positioning data is received; and the relative distance and the relative angle are determined according to the positioning data.
[0107] The head-mounted device can be provided with an auxiliary positioning system, which can be a spatial positioning technology module such as UWB (Ultra Wide Band), a backup shooting device (single or multiple), 3D visual positioning, TOF (Time of flight), etc., which can be used as a backup solution to position the handle when the active detection method fails. In some auxiliary positioning systems, the positioning method requires cooperation between the head-mounted device and the handle. For example, a UWB module is set in the head-mounted device and the handle. When the movement state of the handle cannot be determined according to the active detection method, the head-mounted device transmits a positioning signal to the handle through the auxiliary positioning system. After receiving the positioning signal, the auxiliary positioning system in the handle returns the positioning data. The head-mounted device receives and processes the positioning data returned by the handle to obtain the relative distance and relative angle of the handle.
[0108] The head-mounted device includes at least three positioning base stations and the handle includes at least one positioning base station, or the head-mounted device includes at least one positioning base station and the handle includes at least three positioning base stations. Pulse signals are sent between the head-mounted device and the handle positioning base stations, and the flight time of the pulse signals is recorded. The relative distance between the head-mounted device and the handle positioning base stations can be determined based on the flight time and the flight speed of the pulse signals. The relative distance between the head-mounted device and the handle positioning base stations can be obtained by obtaining the relative distances between three pairs of head-mounted devices and the handle positioning base stations, and the relative distance and relative angle between the head-mounted device and the handle can be determined.
[0109] The auxiliary positioning system of the handle can actively complete the above calculation process, and the positioning data can be a data packet, including the handle identifier and the positioning result (relative distance and relative angle) generated by the handle calculation. The auxiliary positioning system of the handle may not actively complete the above calculation process, that is, the handle returns a signal after receiving the positioning signal, and the head-mounted device completes the above calculation process after receiving the return signal, then the positioning data can be the return signal of the handle.
[0110] In an optional implementation, a scene image captured by a backup camera of the head mounted device is acquired; a position of a light ring of the handle is identified based on the scene image; and the relative distance and the relative angle are determined based on the position of the light ring.
[0111] The auxiliary positioning system can also be a backup shooting device. The head-mounted device can be equipped with one or more backup shooting devices, which can capture scene images. A light ring is provided on the handle. If the handle can be identified in the scene image, the position of the light ring can also be confirmed. According to the position of the light ring, the relative distance and relative angle of the handle relative to the head-mounted device can be determined.
[0112] The backup shooting device has a certain shooting range, that is, the positioning range is limited. Therefore, when there are multiple backup shooting devices, it is necessary to determine which backup shooting device to select for shooting, obtain the active detection method and finally determine the position information of the handle and the acceleration information and angular velocity information of the handle corresponding to the position information; determine the movement trend of the handle according to the position information, acceleration information and angular velocity information; determine the backup shooting device according to the movement trend, so that the backup shooting device can directly shoot the handle, saving positioning time. If the backup device still fails to shoot the handle, all shooting devices are started to obtain scene images to determine the relative distance and relative angle between the handle and the head-mounted device.
[0113] Step S20, obtaining inertial measurement information sent by the handle;
[0114] In this embodiment, an IMU (Inertial Measurement Unit) is provided in the handle. The IMU is used to measure the inertial measurement information of the handle in three directions. The inertial measurement information includes acceleration information and angular velocity information, such as Ax1, Ay1, Az1, ωx1, ωy1, ωy2. As the handle continues to move, continuous acceleration and angular velocity information of the handle can be obtained (Ax2, Ay2, Az2, ωx2, ωy2, ωy2),…(Axn, Ayn, Azn, ωxn, ωyn, ωyn). After detecting the inertial measurement information, the IMU in the handle sends the inertial measurement information to the head-mounted device based on the communication connection established between the handle and the head-mounted device.
[0115] The handle can send inertial measurement information to the head-mounted device according to a preset time, or it can send inertial measurement information to the head-mounted device in real time.
[0116] In an optional implementation, when the head-mounted device cannot determine the movement state of the handle based on an active detection method, the head-mounted device establishes a communication connection with the handle; sends a request to the handle to obtain the inertial measurement information based on the communication connection, wherein the handle sends the inertial measurement information to the head-mounted device after receiving the request; and receives the inertial measurement information sent by the handle.
[0117] When the active detection method cannot determine the movement state of the handle, it is necessary to locate the handle through other methods to obtain the operating state of the handle. Determining the operating state of the handle requires acceleration information and / or angular velocity information of the handle. Determining the operating state through acceleration information and / or angular velocity information can save the time of signal transmission and calculation back and forth, thereby improving positioning efficiency.
[0118] Step S30: determining the motion state of the handle according to the relative distance, the relative angle and the inertial measurement information.
[0119] In this embodiment, the motion state includes a motion trajectory and a motion posture. The motion trajectory is determined based on the real-time position information of the handle, and the real-time position information is determined based on the relative distance, relative angle and the received acceleration information of the handle. The motion posture is determined based on the real-time flipping information of the handle, and the real-time position information is determined based on the relative distance, relative angle and the received angular velocity information of the handle.
[0120] In an optional implementation, the inertial measurement information includes acceleration information and angular velocity information, and the position information and flip information of the handle are determined according to the relative distance and the relative angle; the position information is integrated according to the acceleration information, and the flip information is integrated according to the angular velocity information; and the real-time position information and real-time flip information of the handle are determined according to the integration result. After the head-mounted device determines the relative distance and relative angle (L1, φx1, φy1, φz1) between the handle and the head-mounted device, the position information of the handle relative to the head-mounted device is calculated by the above information, and the calculation formula is as follows:
[0121] xs1=L1*cosφz1cosφx1,ys1=L1*cosφz1cosφy1,zs1=L1*sinφz1
[0122] According to the above formula, the handle position information (xs1, ys1, zs1) is obtained, and the head mounted device corrects the current position information of the handle. The handle continues to move, and the acceleration information and angular velocity information of the handle movement (Ax1, Ay1, Az1, ωx1, ωy1, ωy2) are obtained. As the handle continues to move, the continuous acceleration information and angular velocity information of the handle are obtained (Ax2, Ay2, Az2, ωx2, ωy2, ωy2), ... (Axm, Aynm, Azm, ωxm, ωym, ωym). The real-time position information (Xs2, Ys2, Zs2) of the handle is obtained by integrating the position information according to the acceleration information, and the real-time flip information (θx2, θy2, θz2) is obtained by integrating the flip information according to the angular velocity information, and the current position information and current information of the handle are updated. As the handle continues to move, the latest integrated position information flip position (Xs2, Ys2, Zs2, θx2, θy2, θz2), … (Xsm, Ysm, Zsm, θxm, θym, θzm) of the handle is continuously obtained. The position information and flip information of the handle can respectively represent the motion trajectory and motion posture of the handle, that is, the motion state of the handle.
[0123] In an optional implementation, the current position of the handle is determined according to the motion state; when the current position is within the detection range of the active detection method, the motion state of the handle is obtained through the active detection method. The current position of the handle is determined according to the operating state. When the current position of the handle is within the detection range of the active detection method, for example, in the active detection method, the position of the light ring of the handle is determined by a camera to achieve positioning. When the current position of the handle is within the FOV (field of view) area of the camera, the operating state of the handle is obtained through the active detection method, thereby entering a loop operation to achieve handle positioning.
[0124] In an optional implementation, the inertial measurement information includes acceleration information or angular velocity information, and the position information of the handle is determined according to the relative distance and the relative angle; the position information is integrated according to the acceleration information to obtain a first integration result; the real-time position information of the handle is determined according to the first integration result; or the flip information of the handle is determined according to the relative distance and the relative angle; the flip information is integrated according to the angular velocity information to obtain a second integration result; and the real-time flip information of the handle is determined according to the second integration result. According to pre-settings, the IMU of the handle device can selectively measure acceleration information and / or angular velocity information, and the head-mounted device can also selectively obtain the measured acceleration information and / or angular velocity information sent by the handle device. When the head-mounted device needs position information, it only needs to obtain the acceleration information measured by the IMU of the handle device to determine the real-time position information of the handle. When the head-mounted device needs flip information, it only needs to obtain the angular velocity information measured by the IMU of the handle device to determine the real-time flip information of the handle. When the head-mounted device needs both position information and flip information, the head-mounted device needs to obtain the acceleration information and angular velocity information measured by the IMU of the handle device to determine the real-time motion information and implementation position information of the handle device.
[0125] In the technical solution disclosed in this embodiment, when the motion state of the handle cannot be determined according to the active detection method, the relative distance and relative angle between the handle and the head-mounted device are determined; the inertial measurement information sent by the handle is obtained; and the motion state of the handle is determined according to the relative distance, the relative angle and the inertial measurement information. In this way, when the motion state of the handle cannot be determined by the active detection method, the relative distance and relative angle between the handle and the head-mounted device are determined by a method other than the active detection method, and the motion state of the handle is determined according to the relative distance, relative angle and inertial measurement information, which solves the detection blind spot problem of the active detection method. The movable range of the handle is not limited by the active detection method, which increases the movable range of the handle, and at the same time expands the positioning range of the head-mounted device for the handle. On this basis, the motion state is determined by inertial measurement information, which can also improve positioning efficiency and the sensitivity of handle interaction, thereby improving user experience.
[0126] Optionally, refer to Figure 3 Based on any of the above embodiments, in another embodiment of the positioning method of the present invention, the positioning method further includes:
[0127] Step S40, acquiring a scene image through a shooting device;
[0128] Step S50, identifying the position of the light ring of the handle according to the scene image;
[0129] Step S60: When the scene image cannot identify the position of the light ring, it is determined that the motion state of the handle cannot be determined according to the active detection method.
[0130] In this embodiment, a light ring is provided on the handle, and the head-mounted device actively detects the position of the handle by acquiring a scene image through a shooting device, identifying the position of the light ring of the handle in the scene, and determining and calculating the distance (x1, y1, z1) between the handle and the head-mounted device and the flip angle (θx1, θy1, θz1) of the handle at this time according to the position of the light ring; and calculates the coordinate information (Xs1, Ys1, Zs1) with the head-mounted device position as the origin through the relative position coordinates (Xh1, Yh1, Zh1) of the head-mounted device, and corrects the position and angle of the handle in combination with the flip angle, and updates it.
[0131] The handle continues to move, and the acceleration information and angular velocity information of the handle movement are obtained (Ax1, Ay1, Az1, ωx1, ωy1, ωy2). As the handle continues to move, continuous acceleration and angular velocity information of the handle are obtained (Ax2, Ay2, Az2, ωx2, ωy2, ωy2),…(Axn, Ayn, Azn, ωxn, ωyn, ωyn). The real-time position information and flip information of the handle (Xs2, Ys2, Zs2, θx2, θy2, θz2) are integrated, and the position information is updated. As the handle continues to move, the latest integrated position and flip information of the handle (Xs2, Ys2, Zs2, θx2, θy2, θz2),…(Xsn, Ysn, Zsn, θxn, θyn, θzn) are continuously obtained. The position of the handle can be expressed as the running trajectory of the handle, and the flip information can represent the running posture of the handle. Therefore, the above active detection method can determine the running status of the handle.
[0132] In the above-mentioned active detection method, the main function of the shooting device is to shoot scene images at intervals and identify the position of the light ring of the handle. According to the position of the light ring, the position and flip information determined according to the integration result of the acceleration information and angular velocity information can be corrected to reduce the positioning error. However, during the shooting interval, the handle may move out of the FOV (field of view) area of the shooting device, that is, the position of the light ring cannot be identified according to the scene image captured by the shooting device. When the handle cannot be detected in the FOV area of the shooting device, it means that the handle can no longer be positioned by the shooting device, and it is necessary to determine the relative distance and relative angle of the handle through the auxiliary positioning system, and then realize the positioning of the handle by the head-mounted device through the acceleration information and angular velocity information of the handle.
[0133] In an optional implementation, the detection frequency is set according to the frame rate of the camera; and the target scene image is selected from the scene image according to the detection frequency to identify the position of the light ring. The detection frequency is set according to the frame rate of the camera and actual needs. For example, if the frame rate of the camera is 30fps, 1 / 30 is f0, and the setting of f0 can also be adjusted according to actual needs. The camera is started to detect the handle position information and flip information, and the position information and flip information of the handle position are corrected and updated, so as to improve the positioning efficiency, improve the positioning accuracy, and reduce energy consumption.
[0134] It should be understood that the above active detection method cannot detect the handle in blind spots such as behind the body or behind the head due to the limited viewing angle of the shooting device, so the above embodiment mainly solves this problem.
[0135] In the technical solution disclosed in this embodiment, a scene image is acquired by a photographing device; the position of the light ring of the handle is identified based on the scene image; when the scene image cannot identify the position of the light ring, it is determined that the movement state of the handle cannot be determined according to the active detection method. In this way, active detection is achieved through a photographing device, which can improve the positioning efficiency of the handle position information and flipping information, while also reducing operating costs and energy consumption.
[0136] In addition, an embodiment of the present invention further proposes a head-mounted device, which includes a memory, a processor, and a positioning program stored in the memory and executable on the processor, and when the positioning program is executed by the processor, the steps of the positioning method described in the above embodiments are implemented.
[0137] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a positioning program is stored. When the positioning program is executed by a processor, the steps of the positioning method described in the above embodiments are implemented.
[0138] 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.
[0139] 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.
[0140] 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 this 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, disk, optical disk) as described above, and includes a number of instructions for enabling the head-mounted device to execute the methods described in each embodiment of the present invention.
[0141] 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 method, characterized in that: Applied to a head mounted device, the head mounted device includes a photographing device and the positioning method includes: When the motion state of the handle cannot be determined according to the active detection method, determining the relative distance and relative angle between the handle and the head mounted device, wherein the head mounted device includes at least three positioning base stations and the handle includes at least one positioning base station, or the head mounted device includes at least one positioning base station and the handle includes at least three positioning base stations, and the relative angle and the relative distance are determined based on the distances between three pairs of positioning base stations between the head mounted device and the handle; Obtaining inertial measurement information sent by the handle; The motion state of the handle is determined according to the relative distance, the relative angle and the inertial measurement information.
2. The positioning method according to claim 1, characterized in that: The step of determining the relative distance and relative angle between the handle and the head mounted device comprises: Transmitting a positioning signal to the handle, wherein the handle returns positioning data after receiving the positioning signal; receiving the positioning data; The relative distance and the relative angle are determined according to the positioning data.
3. The positioning method according to claim 1, characterized in that: The step of determining the relative distance and relative angle between the handle and the head mounted device comprises: Acquire a scene image captured by a backup shooting device of the head mounted device; Identify the position of the light ring of the handle according to the scene image; The relative distance and the relative angle are determined according to the position of the light ring.
4. The positioning method according to claim 1, characterized in that: The inertial measurement information includes acceleration information and angular velocity information. The step of determining the motion state of the handle according to the relative distance, the relative angle and the inertial measurement information includes: Determine the position information and flip information of the handle according to the relative distance and the relative angle; Integrating the position information according to the acceleration information, and integrating the flipping information according to the angular velocity information; The real-time position information and real-time flipping information of the handle are determined according to the integration result.
5. The positioning method according to claim 1, characterized in that: The step of obtaining the inertial measurement information sent by the handle comprises: When the motion state of the handle cannot be determined according to the active detection method, establishing a communication connection with the handle; A request for acquiring the inertial measurement information is sent to the handle based on the communication connection, wherein the handle sends the inertial measurement information to the head mounted device after receiving the request; The inertial measurement information sent by the handle is received.
6. The positioning method according to claim 1, characterized in that: The method further comprises: Acquire a scene image through a shooting device; Identify the position of the light ring of the handle according to the scene image; When the scene image cannot identify the position of the light ring, it is determined that the motion state of the handle cannot be determined according to the active detection method.
7. The positioning method according to claim 1, characterized in that: The inertial measurement information includes acceleration information or angular velocity information, and the step of determining the motion state of the handle according to the relative distance, the relative angle and the inertial measurement information includes: Determine the position information of the handle according to the relative distance and the relative angle; Integrating the position information according to the acceleration information to obtain a first integration result; Determine the real-time position information of the handle according to the first integration result; or Determine flipping information of the handle according to the relative distance and the relative angle; Integrate the flip information according to the angular velocity information to obtain a second integration result; The real-time flipping information of the handle is determined according to the second integration result.
8. The positioning method according to claim 1, characterized in that: The step of determining the motion state of the handle comprises: determining a current position of the handle according to the motion state; When the current position is within the detection range of the active detection method, the motion state of the handle is acquired through the active detection method.
9. A head mounted device, characterized in that: The head mounted device comprises: a memory, a processor and a positioning program stored in the memory and executable on the processor, wherein the positioning program implements the steps of the positioning method according to any one of claims 1 to 8 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a positioning program, and when the positioning program is executed by a processor, the steps of the positioning method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and system for locating object, and head-mounted display equipment
CN107153369A
Virtual reality equipment and positioning method
CN110262667A