CN115686211A - Cursor position positioning method and device, electronic equipment and readable storage medium - Google Patents

Cursor position positioning method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115686211A
CN115686211A CN202211368733.1A CN202211368733A CN115686211A CN 115686211 A CN115686211 A CN 115686211A CN 202211368733 A CN202211368733 A CN 202211368733A CN 115686211 A CN115686211 A CN 115686211A
Authority
CN
China
Prior art keywords
handle
variation
interface
cursor
trigger state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211368733.1A
Other languages
Chinese (zh)
Inventor
刘冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202211368733.1A priority Critical patent/CN115686211A/en
Publication of CN115686211A publication Critical patent/CN115686211A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Position Input By Displaying (AREA)

Abstract

The application provides a cursor position positioning method, a cursor position positioning device, electronic equipment and a readable storage medium, wherein the cursor position positioning method comprises the following steps: detecting the pressing degree of a key corresponding to a trigger key on the VR handle; if the key pressing degree is greater than a preset key pressing threshold value, controlling the VR handle to be in a pre-trigger state, wherein the sensitivity of the VR handle in the pre-trigger state is lower than that of the VR handle not in the pre-trigger state; and when the VR handle is in a pre-trigger state, positioning a cursor position in a display interface of the VR equipment. The application solves the technical problem that the click success rate of the virtual key is low in the prior art.

Description

Cursor position positioning method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of VR technologies, and in particular, to a cursor position positioning method and apparatus, an electronic device, and a readable storage medium.
Background
With the continuous development of science and technology, VR equipment has come into operation, and at present, through the position and the pointing of user adjustment handle, make the cursor in the display interface of VR equipment stop behind the operating position, can accomplish the location of the cursor position of display interface, later press the trigger key in the handle, can realize the virtual button function that the cursor position in the display interface corresponds. However, since the stroke of the trigger key is long, the position and the direction of the handle may slightly change along with the change of the involuntary hand motion of the user during the process of pressing the trigger key by the user, which causes the position of the cursor in the interface to change, so that the cursor deviates from the interface position that the user originally wants to operate, and thus the click success rate of the virtual key is low.
Disclosure of Invention
The application mainly aims to provide a cursor position positioning method, a cursor position positioning device, electronic equipment and a readable storage medium, and aims to solve the technical problem that the click success rate of a virtual key is low in the prior art.
In order to achieve the above object, the present application provides a cursor position positioning method applied to a VR device, where the cursor position positioning method includes:
detecting the pressing degree of a key corresponding to a trigger key on the VR handle;
if the key pressing degree is greater than a preset key pressing threshold value, controlling the VR handle to be in a pre-trigger state, wherein the sensitivity of the VR handle in the pre-trigger state is lower than the sensitivity of the VR handle not in the pre-trigger state;
and when the VR handle is in a pre-trigger state, positioning a cursor position in a display interface of the VR equipment.
In order to achieve the above object, the present application further provides a cursor position positioning device applied to a VR device, the VR device includes a VR handle, and the cursor position positioning device includes:
the key pressing degree detection module is used for detecting the key pressing degree corresponding to the trigger key on the VR handle;
the pre-trigger control module is used for controlling the VR handle to be in a pre-trigger state if the key pressing degree is greater than a preset key pressing threshold value, wherein the sensitivity of the VR handle in the pre-trigger state is lower than that of the VR handle not in the pre-trigger state;
and the cursor position positioning module is used for positioning the cursor position in the display interface of the VR equipment when the VR handle is in a pre-trigger state.
The present application further provides an electronic device, including: a memory, a processor and a program of the cursor position locating method stored on the memory and executable on the processor, which program, when executed by the processor, may implement the steps of the cursor position locating method as described above.
The present application also provides a computer-readable storage medium having stored thereon a program for implementing a cursor position locating method, which when executed by a processor implements the steps of the cursor position locating method as described above.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the cursor position locating method as described above.
Compared with the prior art that the position and the direction of a handle are adjusted by a user, the cursor position of a display interface of VR equipment can be positioned after the cursor stays at an operation position, and the pressing degree of a key corresponding to a trigger key on the VR handle is detected; if the key pressing degree is greater than a preset key pressing threshold value, controlling the VR handle to be in a pre-trigger state, wherein the sensitivity of the VR handle in the pre-trigger state is lower than the sensitivity of the VR handle not in the pre-trigger state; and when the VR handle is in a pre-trigger state, positioning a cursor position in a display interface of the VR equipment. The utility model discloses a handle is in the state of triggering in advance, the sensitivity of handle will reduce, press the in-process that triggers the key at the user, the cursor position in the display interface receives the interference of hand action will diminish, make the cursor position in the display interface can not take place very big change, thereby can accomplish virtual button and click accurately, overcome among the prior art because the key stroke that triggers the key is longer, press the in-process that triggers the key at the user, the position and the pointing of handle can change slightly along with the change of the hand action that the user is unconscious, lead to the cursor position in the interface to change, thereby make the cursor deviate from the technical defect of the interface position that the user originally thought to operate, the click success rate of virtual button has been improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
FIG. 1 is a schematic flowchart illustrating a first embodiment of a cursor position locating method according to the present application;
FIG. 2 is a flowchart illustrating a cursor position positioning method according to a second embodiment of the present application;
FIG. 3 is a flowchart illustrating a cursor position positioning method according to a third embodiment of the present application;
FIG. 4 is a schematic structural diagram of an embodiment of a cursor position positioning device according to the present application;
fig. 5 is a schematic device structure diagram of a hardware operating environment related to a cursor position positioning method in the embodiment of the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments of the present application are described in detail below with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
At present, the position and the direction of a handle are adjusted by a user, so that the cursor in a display interface of VR equipment can be positioned after the cursor stays at an operation position, and then a trigger key in the handle is pressed, so that a virtual key function corresponding to the cursor position in the display interface can be realized. However, since the stroke of the trigger key is long, during the process of pressing the trigger key by the user, the position and the pointing direction of the handle may slightly change along with the change of the unconscious hand motion of the user, which causes the position of the cursor in the interface to change, so that the cursor deviates from the position of the interface that the user originally wants to operate, which makes the click success rate of the virtual key low.
The embodiment of the present application provides a cursor position positioning method, which is applied to a VR device including a VR handle in a first embodiment of the cursor position positioning method of the present application, and with reference to fig. 1, the cursor position positioning method includes:
step S10, detecting the pressing degree of a key corresponding to a trigger key on the VR handle;
step S20, if the key pressing degree is greater than a preset key pressing threshold value, controlling the VR handle to be in a pre-trigger state, wherein the sensitivity of the VR handle in the pre-trigger state is lower than the sensitivity of the VR handle not in the pre-trigger state;
and S30, positioning a cursor position in a display interface of the VR equipment when the VR handle is in a pre-trigger state.
According to the embodiment of the application, after the key pressing degree of the trigger key on the VR handle is obtained, whether the VR handle is in the pre-triggering state or not is judged according to the key pressing degree, and after the VR handle is in the pre-triggering state, the cursor position of a display interface in VR equipment is located. Because the handle is in the state of triggering in advance, the sensitivity of handle will become low, this just makes the cursor position in the display interface receive the influence of handle little to can realize the accurate location of cursor position, with the click success rate that promotes virtual button. The technical defect that the position and the pointing direction of a handle slightly change along with the unconscious hand action change of a user in the process of pressing down the trigger key by the user due to the long key stroke of the trigger key in the prior art, so that the position of a cursor in an interface changes, and the cursor deviates from the position which the user originally wants to operate is overcome, and the click success rate of the virtual key is improved.
In this embodiment, it should be noted that the key pressing degree is a pressure applied to the key of the VR handle, and the key values of the keys may be used for identification, for example, the maximum key value of the keys may be set to be 100, and the minimum value is 0, if the key value is 100, it is proved that the corresponding key is completely pressed, if the key value is 0, it is proved that the corresponding key is not pressed, if the key value is between 0 and 100, it is proved that the corresponding key portion is pressed, and the larger the key value is, the higher the pressing degree of the key is.
Additionally, it should be noted that the VR device includes a VR handle and a VR host, where the VR handle is used to control the VR host, two external cameras of the VR host take pictures of an external environment to complete tracking of the VR handle, and a built-in display interface of the VR host is used to display image content.
Optionally, the VR handle and the VR host are connected in a bluetooth communication manner, so as to complete information communication between the VR handle and the VR host. Wherein, the theory of operation of bluetooth communication does: the connection of two equipment is accomplished to radio wave through bluetooth equipment, and bluetooth equipment need set up the pairing information between two equipment in advance before dispatching from the factory, and the main terminal has P IN code, address etc. from the end equipment in advance, wherein, from the end equipment can set up two kinds: one is a silent state, i.e. only able to communicate with a designated master end device, not being searched by other Bluetooth equipment; and the development equipment can be searched by the designated master end equipment and can also be searched and connected by other Bluetooth equipment.
As an example, step S20 includes: acquiring the key pressing degree of the VR handle, and judging whether the key pressing degree is greater than the preset key pressing threshold value; if the key pressing degree is greater than the preset key pressing threshold value, controlling the VR handle to be in a pre-trigger state; and if the key pressing degree is not greater than the preset key pressing threshold value, keeping the VR handle not in a pre-trigger state, wherein the handle sensitivity of the VR handle in the pre-trigger state is lower than the handle sensitivity of the VR handle not in the pre-trigger state.
For example, for step S20, it should be noted that the preset key pressing threshold is a minimum key pressing degree for controlling the VR handle to be in a pre-trigger state, and the preset key pressing threshold needs to be set according to an actual situation of the VR handle, and generally, for a linear trigger, the preset key pressing threshold is set according to an output key value of a key, so as to implement a pre-trigger function of the VR handle; for a multi-key-stroke trigger key, acquiring the shortest key stroke in the multi-key-stroke trigger key, and setting the preset key pressing threshold value in the shortest key stroke, so as to realize the pre-triggering function of the VR handle; for the VR handle with a long key stroke of the trigger key, the preset key pressing threshold value is set to be as small as possible, so that the situation that the preset key pressing threshold value is too large is prevented, and the cursor position is too large due to too short time of the VR handle in a pre-triggering state in the pressing process of the trigger key.
As an example, step S20 further includes: acquiring communication information between the VR handle and the VR equipment, wherein the communication information is current state information transmitted to the VR equipment by the VR handle; detecting a communication event contained in the communication information, and detecting whether the communication event contains a pre-trigger event or not according to the communication event; if the communication event is detected to comprise the pre-trigger event, controlling the VR handle to be in a pre-trigger state; and if the communication event is detected not to comprise the pre-trigger event, keeping the VR handle not in a pre-trigger state.
Illustratively, step S30 includes: acquiring an initial interface position of the VR handle, and acquiring an actual interface position of the VR handle if the VR handle is detected to be in a pre-trigger state; calculating the difference value between the initial interface position and the actual interface position to obtain the interface position variation; and positioning the cursor position in the display interface according to the initial interface position, the interface position variation and a preset sensitivity variation coefficient. The initial interface position comprises an initial interface position coordinate and/or an initial interface position direction, the actual interface position comprises an actual interface position coordinate and/or an actual interface position direction, the interface position variation comprises a position coordinate variation and/or a position direction variation, and the preset sensitivity variation coefficient comprises a position coordinate variation coefficient and/or a position direction variation coefficient.
Wherein the step of positioning a cursor position of a display interface in the VR device comprises:
step S31, determining an initial interface position of the VR handle, and acquiring an interface position variation corresponding to the VR handle in the pre-trigger state;
in this embodiment, it should be noted that the initial interface position includes initial interface position coordinates and/or an initial interface position direction, and the interface position variation includes a position coordinate variation and/or a position direction variation.
Additionally, it should be noted that, in order to determine the initial interface position and the interface position variation of the VR handle, different sensor elements may be built in the VR handle, and optionally, in order to detect the position coordinate of the VR handle, the VR handle may be built in with a transmitting element and a receiving element based on a tracking manner of laser, ultrasonic wave, etc., for example, an infrared camera external to the VR host captures infrared light information on the VR handle to determine the position coordinate of the handle; optionally, in order to detect the position orientation of the VR handle, a gravity sensor, a gyroscope and the like may be further built in the VR handle, wherein the gravity sensor is used for detecting the acceleration magnitude and direction of the VR handle, and the gyroscope is used for measuring the included angle between the vertical axis of the gyro rotor and the VR handle in the three-dimensional coordinate system.
And S32, positioning the cursor position in the display interface according to the initial interface position, the interface position variation and a preset sensitivity variation coefficient.
In the embodiment of the present application, it should be noted that the preset sensitivity variation coefficient includes a position coordinate variation coefficient and/or a position pointing variation coefficient, the setting range of the preset sensitivity variation coefficient is 0 to 1, for the nonlinear trigger, the preset sensitivity variation coefficient may be set according to the weight of the VR handle, the key stroke of the key, the handle sensitivity, and the like, and if the weight of the VR handle is smaller or the sensitivity of the handle is larger, the smaller the setting of the preset sensitivity variation coefficient is, the better; for a linear trigger, the preset sensitivity change coefficient may be set according to a linear relationship, for example, it may be set that the key pressing degree and the preset sensitivity change coefficient show a linear negative correlation, the preset sensitivity change coefficient will gradually decrease with the gradual increase of the key pressing degree, and the preset sensitivity change coefficient needs to be reset to 1 at the moment when the key is completely pressed or the key is completely released, so as to restore the original sensitivity of the VR handle.
Additionally, it should be noted that the interface position of the VR handle can be determined from the position information between the VR handle and the VR host, and optionally, the position information between the VR handle and the VR host can be calculated using a handle positioning algorithm. Firstly, acquiring a current image of a camera of the VR host, filtering the current image to obtain a target image only containing a VR handle, for example, capturing an optical signal of an infrared lamp through an infrared camera, so as to acquire position information of the infrared lamp through the optical signal; processing the target image through a handle positioning algorithm, and determining a space three-dimensional coordinate system according to the current image so as to determine a space three-dimensional coordinate of the VR handle; determining position information between the VR handle and the VR host according to the spatial three-dimensional coordinates; determining an interface position of the VR handle based on the position information. The theoretical principle of the handle positioning algorithm is as follows: for any point in the three-dimensional space, as long as the operation point can be shot by the camera, the position information of the operation point in the three-dimensional space at the moment can be determined according to the image shot by the camera at the same moment.
As an example, steps S31 to S32 include: acquiring the key pressing degree of a trigger key on the VR handle, and acquiring the initial interface position of the VR handle if the key pressing degree is greater than zero and is less than a preset key pressing threshold value; if the key pressing degree is greater than the preset key pressing threshold value, acquiring the interface position variation corresponding to the VR handle in the pre-trigger state; and positioning the cursor position in the display interface according to the initial interface position, the interface position variation and a preset sensitivity variation coefficient, wherein the initial interface position comprises an initial interface position coordinate and/or an initial interface position direction, the interface position variation comprises a position coordinate variation and/or a position direction variation, and the preset sensitivity variation coefficient comprises a position coordinate variation coefficient and/or a position direction variation coefficient.
Wherein, interface position variation includes position coordinate variation, it includes position coordinate variation to predetermine sensitivity coefficient of change, according to initial interface position, interface position variation and predetermine sensitivity coefficient of change, the location cursor position's in the display interface step includes:
step A21, calculating the interface position coordinate offset corresponding to the VR handle according to the position coordinate variation and the position coordinate variation coefficient;
in this embodiment, it should be noted that the position coordinate variation is an actual movement distance of the VR handle on the display interface, and the interface position coordinate offset is a cursor movement distance in the display interface corresponding to the VR handle.
As an example, the offset of the interface position coordinate corresponding to the VR handle is calculated as follows:
a=A*k a
wherein a is the offset of the interface position coordinate, A is the variation of the position coordinate, and k a Is the position coordinate variation coefficient.
Step A22, correcting the position coordinate of the initial interface position through the interface position coordinate offset, and positioning the cursor position in the display interface.
As an example, steps a21 to a22 include: acquiring the position coordinate variation of the VR handle; calculating the interface position coordinate offset corresponding to the VR handle according to the position coordinate variation and the position coordinate variation coefficient, and summing the initial position coordinate and the interface position coordinate offset to correct the position coordinate of the initial interface position, so as to position the cursor position in the display interface. For example, assuming that the initial position coordinates of the VR handle are (0, 0) and the position coordinate change coefficient is 0.5, if the detected position coordinate change amount of the VR handle in the pre-trigger state is (10, 0), the position coordinate offset amount may be calculated to be (5, 0), and the cursor position in the positioning display interface may be (5, 0). In this application embodiment the interface position variation of VR handle only has position coordinate variation, and the directional variation in position is zero, and the interface position of VR handle points to and keeps unchangeable promptly, consequently, only needs to confirm the cursor position that position coordinate offset can fix a position the display interface.
Wherein, interface position variation includes position pointing variation, preset sensitivity variation coefficient includes position pointing variation coefficient, according to initial interface position, interface position variation and preset sensitivity variation coefficient, the location cursor position's in the display interface step includes:
step B21, calculating the interface position pointing offset corresponding to the VR handle according to the position pointing variation and the position pointing variation coefficient;
in this embodiment, it should be noted that the position pointing variation is an actual movement angle of the VR handle on the display interface, and the interface position pointing offset is a cursor movement angle in the display interface corresponding to the VR handle.
As an example, the interface position pointing offset corresponding to the VR handle is calculated as follows:
b=B*k b
wherein B is the interface position pointing offset, B is the position pointing variation, k b -pointing the change factor for said position.
And B22, correcting the position direction of the initial interface position through the interface position direction offset, and positioning the cursor position in the display interface.
As an example, steps B21 to B22 include: acquiring the position pointing variation of the VR handle; calculating the interface position pointing offset corresponding to the VR handle according to the position pointing variation and the position pointing variation coefficient, and summing the initial position pointing and the interface position pointing offset to correct the position pointing of the initial interface position, so as to position the cursor position in the display interface. For example, it may be assumed that the initial position of the VR handle points 45 ° forward and obliquely upward, and the change coefficient of the position pointing is 0.3, and if the detected change amount of the position pointing of the VR handle in the pre-trigger state is 10 ° forward and obliquely upward, the offset of the position pointing may be calculated to be 3 ° forward and obliquely upward, so that the cursor position in the positioning display interface is 48 ° forward and obliquely upward. In this application embodiment the interface position variation of VR handle only has the directional variation in position, and the position coordinate variation is zero, and the interface position coordinate of VR handle remains unchanged promptly, consequently, only needs the directional offset in definite position can fix a position the cursor position on display interface.
Wherein, interface position variation includes position coordinate variation and the directional variation in position, it includes position coordinate variation coefficient and the directional variation in position coefficient to predetermine sensitivity variation coefficient, according to initial interface position variation and the directional variation in position coefficient of predetermined sensitivity fix the step of the cursor position in the display interface includes:
step C21, calculating an interface position coordinate offset and an interface position pointing offset corresponding to the VR handle according to the interface position variation and the preset sensitivity variation coefficient;
as an example, the interface position coordinate offset and the interface position pointing offset corresponding to the VR handle are calculated as follows:
d=D*k d
wherein D is the interface position coordinate offset and the interface position pointing offset, and D is the interface positionAmount of change, k d And the preset sensitivity change coefficient is used.
And step C22, correcting the position coordinate and the position direction of the initial interface position according to the interface position coordinate offset and the interface position direction offset, and positioning the cursor position in the display interface.
As an example, steps C21 to C22 include: acquiring the interface position variation of the VR handle, calculating the interface position offset and the interface position pointing offset corresponding to the VR handle according to the interface position variation and the preset sensitivity variation coefficient, and summing the initial position coordinate and the interface position coordinate offset to correct the position coordinate of the initial interface position to obtain the cursor position coordinate of the display interface; summing the initial position pointing and the interface position pointing offset to correct the position pointing of the initial interface position to obtain the cursor position pointing of the display interface; and positioning the cursor position in the display interface according to the cursor position coordinate and the cursor position direction. For example, it may be assumed that the initial position coordinate of the VR handle is (0, 0), the initial position pointing direction is 45 ° in the straight-ahead oblique direction, the position coordinate change coefficient is 0.5, and the position pointing change coefficient is 0.3, if it is detected that the change amount of the position coordinate of the VR handle in the pre-trigger state is (10, 0), and the change amount of the position pointing direction is 10 ° in the straight-ahead oblique direction, it may be calculated that the position coordinate offset amount is (5, 0), and the position pointing offset amount is 3 ° in the straight-ahead oblique direction, so as to locate the cursor position in the display interface as the cursor position coordinate (5, 0), and the cursor position pointing direction is 48 ° in the straight-ahead oblique direction.
Compared with the prior art that the position and the direction of a handle are adjusted by a user, the cursor in a display interface of VR equipment can be positioned after the cursor stays at an operation position, and the position of the cursor in the display interface can be positioned; if the key pressing degree is greater than a preset key pressing threshold value, the VR handle is in a pre-trigger state, wherein the sensitivity of the VR handle in the pre-trigger state is lower than the sensitivity of the VR handle not in the pre-trigger state; and when the VR handle is in a pre-trigger state, positioning a cursor position of a display interface in the VR equipment. According to the embodiment of the application, when the handle is in the pre-triggering state, the sensitivity of the handle is reduced, and when a user presses the trigger key, the interference of hand actions on the cursor position of the display interface is reduced, so that the cursor position in the interface is not greatly changed, and the accurate clicking of the virtual key can be completed.
Example two
Further, referring to fig. 2, in another embodiment of the present application, the same or similar contents as those in the first embodiment may refer to the above description, and are not repeated herein. On this basis, after the step of controlling the VR handle to be in a pre-trigger state, the cursor position locating method further includes:
step A10, detecting whether the position variation of the VR handle in the pre-trigger state is larger than a preset variation threshold value;
in this application embodiment, it should be noted that the preset variation threshold at least includes one of a coordinate variation threshold and a direction variation threshold, the preset variation threshold is a maximum position variation of the VR handle in the pre-trigger state, and the position variation at least includes one of a coordinate variation and a direction variation.
And A20, if yes, controlling the VR handle to exit the pre-trigger state.
As an example, steps a10 to a20 include: acquiring the position variation of the VR handle in the pre-trigger state, and detecting whether the position variation of the VR handle is larger than a preset variation threshold value; if the position variation is detected to be larger than the preset variation threshold, controlling the VR handle to exit the pre-trigger state; and if the position variation is not larger than the preset variation threshold value, controlling the VR handle to keep the pre-trigger state. Wherein the position variation includes at least one of a coordinate variation and a pointing variation.
As an example, the position change amount includes a coordinate change amount, and the step of controlling the VR handle to exit the pre-trigger state further includes:
acquiring the coordinate variation of the VR handle in the pre-trigger state, and detecting whether the coordinate variation of the VR handle is larger than a coordinate variation threshold value; if the coordinate variation is detected to be larger than the coordinate variation threshold, controlling the VR handle to exit the pre-trigger state; and if the coordinate variation is detected to be not greater than the coordinate variation threshold, controlling the VR handle to keep the pre-trigger state, where the coordinate variation threshold is the maximum coordinate variation of the VR handle in the pre-trigger state, and the coordinate variation is the actual moving distance of the VR handle, for example, assuming that the coordinate variation threshold is 15 and the coordinate variation of the current VR handle in the pre-trigger state is 16, controlling the VR handle to exit the pre-trigger state because of 16 >.
As an example, the position change includes a pointing change, and the step of controlling the VR handle to exit the pre-trigger state further includes:
acquiring the pointing variation of the VR handle in the pre-trigger state, and detecting whether the pointing variation of the VR handle is larger than a pointing variation threshold value; if the pointing variation is detected to be larger than the pointing variation threshold, controlling the VR handle to exit the pre-trigger state; and if the pointing variation is not larger than the pointing variation threshold, controlling the VR handle to keep the pre-trigger state. Wherein, directional change amount threshold value is the VR handle is in the biggest directional change amount under the pre-trigger state, directional change amount is the actual angle of movement of VR handle. For example, it may be assumed that the pointing variation threshold is 30 °, and the pointing variation of the current VR handle in the pre-trigger state is 35 °, since 35 ° >30 °, the VR handle is controlled to exit the pre-trigger state.
The embodiment of the application provides a pre-trigger state quitting method, and the embodiment of the application firstly detects whether the position variation of the VR handle in the pre-trigger state is larger than a preset variation threshold value; and if so, controlling the VR handle to exit the pre-trigger state. This application embodiment is in the position variation under the pre-trigger state through real time monitoring VR handle, adjusts the pre-trigger state of VR handle, if the user is in the position variation who operates the VR handle under the pre-trigger state at the VR handle and makes the position variation of VR handle too big, then the VR handle will withdraw from the pre-trigger state voluntarily to resume the original sensitivity of VR handle, thereby guarantee the normal use of handle.
EXAMPLE III
Further, referring to fig. 3, in another embodiment of the present application, the same or similar contents as those in the first embodiment may refer to the above description, and are not repeated herein. On this basis, after the step of controlling the VR handle to be in a pre-trigger state, the cursor position locating method further comprises:
step B10, acquiring the duration of the VR handle in the pre-trigger state;
in this embodiment, it should be noted that, when the VR handle is in the pre-trigger state, if the VR handle is operated by the user at this time, the recording of the duration is stopped, and the duration is set to zero.
As an example, step B10 includes: detecting whether a user is operating the VR handle: if it is detected that the VR handle is not operated by a user, recording the duration of the VR handle in the pre-trigger state; and if the VR handle is detected to be operated by the user, controlling the duration of the VR handle in the pre-trigger state to be kept to be zero.
And step B20, if the duration is greater than a preset duration threshold, controlling the VR handle to exit the pre-trigger state.
In this embodiment, it should be noted that the preset duration threshold is a maximum duration of the VR handle in the pre-trigger state.
As an example, step B20 includes: detecting whether the VR handle exits the pre-trigger state for the duration of time; if the VR handle is detected not to exit the pre-trigger state within the duration, judging whether the duration is greater than a preset duration threshold or not according to a preset duration threshold; if the duration is longer than the preset duration threshold, controlling the VR handle to exit the pre-trigger state; and if the duration is not greater than the preset duration threshold, controlling the VR handle to keep the pre-trigger state. For example, it may be assumed that the preset time threshold is 10s, and if the duration recorded at this time is 11s, the user does not perform any operation on the VR handle in the pre-trigger state within 11s, and the VR handle is controlled to exit from the pre-trigger state because 11s >, 10s.
As one example, the step of detecting whether the VR handle exits the pre-trigger state for the duration of time further comprises: detecting the key pressing degree corresponding to a trigger key on the VR handle, and controlling the VR handle to exit from the pre-trigger state if the detected key pressing degree is the maximum key pressing degree; and if the detected key pressing degree is zero, controlling the VR handle to exit the pre-trigger state. The key pressing degree is the maximum key pressing degree, namely the trigger key is in a fully pressed state, and the key pressing degree is zero, namely the trigger key is in a fully released state.
The embodiment of the application provides a pre-trigger state exit method, and the method comprises the steps of firstly obtaining the duration of the VR handle in the pre-trigger state; and if the duration is greater than a preset duration threshold, controlling the VR handle to exit the pre-trigger state. This application embodiment is in the duration under the pre-trigger state through real time monitoring VR handle, adjusts the pre-trigger state of VR handle, if at the VR handle under the pre-trigger state, the user does not operate the VR handle for a long time, then the VR handle will withdraw from the pre-trigger state automatically to resume the original sensitivity of VR handle, thereby guarantee the normal use of handle.
Example four
The embodiment of this application still provides a cursor position positioner, is applied to VR equipment, VR equipment includes the VR handle, refers to fig. 4, cursor position positioner includes:
a key pressing degree detection module 10, configured to detect a key pressing degree corresponding to a trigger key on the VR handle;
the pre-trigger control module 20 is configured to control the VR handle to be in a pre-trigger state if the key pressing degree is greater than a preset key pressing threshold, where a sensitivity of the VR handle in the pre-trigger state is lower than a sensitivity of the VR handle not in the pre-trigger state;
and a cursor position positioning module 30, configured to position a cursor position in a display interface of the VR device when the VR handle is in a pre-trigger state.
Optionally, the cursor position positioning module 30 further includes:
determining an initial interface position of the VR handle, and acquiring an interface position variation corresponding to the VR handle in the pre-trigger state;
and positioning the cursor position in the display interface according to the initial interface position, the interface position variation and a preset sensitivity variation coefficient.
Optionally, the interface position variation includes a position coordinate variation, the preset sensitivity variation coefficient includes a position coordinate variation coefficient, and the cursor position positioning module 30 further includes:
calculating the interface position coordinate offset corresponding to the VR handle according to the position coordinate variation and the position coordinate variation coefficient;
and correcting the position coordinate of the initial interface position through the interface position coordinate offset, and positioning the cursor position in the display interface.
Optionally, the interface position variation includes a position direction variation, the preset sensitivity variation coefficient includes a position direction variation coefficient, and the cursor position positioning module 30 further includes:
calculating an interface position pointing offset corresponding to the VR handle according to the position pointing variation and the position pointing variation coefficient;
and correcting the position pointing of the initial interface position through the interface position pointing offset, and positioning the cursor position in the display interface.
Optionally, the interface position variation includes a position coordinate variation and a position direction variation, the preset sensitivity variation includes a position coordinate variation and a position direction variation, and the cursor position positioning module 30 further includes:
calculating the interface position coordinate offset and the interface position pointing offset corresponding to the VR handle according to the interface position variation and the preset sensitivity variation coefficient;
and correcting the position coordinate and the position pointing of the initial interface position according to the interface position coordinate offset and the interface position pointing offset, and positioning the cursor position in the display interface.
Optionally, the cursor position locating device further comprises:
detecting whether the position variation of the VR handle in the pre-trigger state is larger than a preset variation threshold value;
and if so, controlling the VR handle to exit the pre-trigger state.
Optionally, the cursor position locating device further comprises:
acquiring the duration of the VR handle in the pre-trigger state;
and if the duration is greater than a preset duration threshold, controlling the VR handle to exit the pre-trigger state.
According to the cursor position positioning device, the cursor position positioning method in the embodiment is adopted, and the technical problem that the click success rate of the virtual key is low is solved. Compared with the prior art, the beneficial effects of the cursor position positioning device provided by the embodiment of the present application are the same as those of the cursor position positioning method provided by the above embodiment, and other technical features of the cursor position positioning device are the same as those disclosed in the above embodiment method, which are not described herein again.
EXAMPLE five
An embodiment of the present application provides an electronic device, the electronic device may be a VR device, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the cursor position locating method in the first embodiment.
Referring now to FIG. 5, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device may include a processing means (e.g., a central processing unit, a graphic processor, etc.) that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) or a program loaded from a storage means into a Random Access Memory (RAM). In the RAM, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device, the ROM, and the RAM are connected to each other through a bus. An input/output (I/O) interface is also connected to the bus.
Generally, the following systems may be connected to the I/O interface: input devices including, for example, touch screens, touch pads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, and the like; output devices including, for example, liquid Crystal Displays (LCDs), speakers, vibrators, and the like; storage devices including, for example, magnetic tape, hard disk, etc.; and a communication device. The communication means may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While the figures illustrate an electronic device with various systems, it is to be understood that not all illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means, or installed from a storage means, or installed from a ROM. The computer program, when executed by a processing device, performs the functions defined in the methods of the embodiments of the present disclosure.
According to the electronic equipment provided by the application, the cursor position positioning method in the embodiment is adopted, and the technical problem that the click success rate of the virtual key is low is solved. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present application are the same as the beneficial effects of the cursor position positioning method provided by the above embodiment, and other technical features in the electronic device are the same as those disclosed in the above embodiment method, which are not described herein again.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the foregoing description of embodiments, the particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Example six
The present embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the method for cursor position location in the first embodiment.
The computer readable storage medium provided by the embodiments of the present application may be, for example, a usb disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the above. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present embodiment, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer-readable storage medium may be embodied in an electronic device; or may be present alone without being incorporated into the electronic device.
The computer readable storage medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: detecting the pressing degree of a key corresponding to a trigger key on the VR handle; if the key pressing degree is greater than a preset key pressing threshold value, controlling the VR handle to be in a pre-trigger state, wherein the sensitivity of the VR handle in the pre-trigger state is lower than that of the VR handle not in the pre-trigger state; and when the VR handle is in a pre-trigger state, positioning a cursor position in a display interface of the VR equipment.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the names of the modules do not in some cases constitute a limitation of the unit itself.
The computer-readable storage medium provided by the application stores computer-readable program instructions for executing the cursor position positioning method, and solves the technical problem of low click success rate of virtual keys. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present application are the same as those of the cursor position positioning method provided by the above embodiment, and are not described herein again.
EXAMPLE seven
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the cursor position locating method as described above.
The computer program product solves the technical problem that the click success rate of the virtual key is low. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the cursor position positioning method provided by the above embodiment, and are not described herein again.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A cursor position positioning method is applied to VR equipment which comprises a VR handle, and comprises the following steps:
detecting the pressing degree of a key corresponding to a trigger key on the VR handle;
if the key pressing degree is greater than a preset key pressing threshold value, controlling the VR handle to be in a pre-trigger state, wherein the sensitivity of the VR handle in the pre-trigger state is lower than the sensitivity of the VR handle not in the pre-trigger state;
and when the VR handle is in a pre-trigger state, positioning a cursor position in a display interface of the VR equipment.
2. The cursor position locating method of claim 1, wherein the step of locating the cursor position in the display interface of the VR device comprises:
determining an initial interface position of the VR handle, and acquiring an interface position variation corresponding to the VR handle in the pre-trigger state;
and positioning the cursor position in the display interface according to the initial interface position, the interface position variation and a preset sensitivity variation coefficient.
3. The cursor position positioning method as claimed in claim 2, wherein the interface position variation includes a position coordinate variation, the preset sensitivity variation coefficient includes a position coordinate variation coefficient, and the step of positioning the cursor position in the display interface based on the initial interface position, the interface position variation and the preset sensitivity variation coefficient includes:
calculating the interface position coordinate offset corresponding to the VR handle according to the position coordinate variation and the position coordinate variation coefficient;
and correcting the position coordinate of the initial interface position through the interface position coordinate offset, and positioning the cursor position in the display interface.
4. The cursor position positioning method according to claim 2, wherein the interface position variation includes a position pointing variation, the preset sensitivity variation includes a position pointing variation, and the positioning the cursor position in the display interface based on the initial interface position, the interface position variation, and a preset sensitivity variation includes:
calculating the interface position pointing offset corresponding to the VR handle according to the position pointing variation and the position pointing variation coefficient;
and correcting the position pointing of the initial interface position through the interface position pointing offset, and positioning the cursor position in the display interface.
5. The cursor position locating method of claim 2, wherein the interface position variation includes a position coordinate variation and a position pointing variation, the preset sensitivity variation includes a position coordinate variation and a position pointing variation, and the step of locating the cursor position in the display interface according to the initial interface position, the interface position variation and a preset sensitivity variation includes:
calculating the interface position coordinate offset and the interface position pointing offset corresponding to the VR handle according to the interface position variation and the preset sensitivity variation coefficient;
and correcting the position coordinate and the position pointing of the initial interface position according to the interface position coordinate offset and the interface position pointing offset, and positioning the cursor position in the display interface.
6. The cursor position locating method of claim 1, wherein after the step of controlling the VR handle to be in a pre-trigger state, the cursor position locating method further comprises:
detecting whether the position variation of the VR handle in the pre-trigger state is larger than a preset variation threshold value;
and if so, controlling the VR handle to exit the pre-trigger state.
7. The cursor position locating method of claim 1, wherein after the step of controlling the VR handle to be in a pre-trigger state, the cursor position locating method further comprises:
acquiring the duration of the VR handle in the pre-trigger state;
and if the duration is greater than a preset duration threshold, controlling the VR handle to exit the pre-trigger state.
8. A cursor position locating device applied to VR equipment which comprises a VR handle, the cursor position locating device comprising:
the key pressing degree detection module is used for detecting the key pressing degree corresponding to the trigger key on the VR handle;
the pre-trigger control module is used for controlling the VR handle to be in a pre-trigger state if the key pressing degree is greater than a preset key pressing threshold value, wherein the sensitivity of the VR handle in the pre-trigger state is lower than that of the VR handle not in the pre-trigger state;
and the cursor position positioning module is used for positioning the cursor position in the display interface of the VR equipment when the VR handle is in a pre-trigger state.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the cursor position location method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a program for implementing a cursor position locating method is stored on the computer-readable storage medium, and the program for implementing the cursor position locating method is executed by a processor to implement the steps of the cursor position locating method according to any one of claims 1 to 7.
CN202211368733.1A 2022-11-03 2022-11-03 Cursor position positioning method and device, electronic equipment and readable storage medium Pending CN115686211A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211368733.1A CN115686211A (en) 2022-11-03 2022-11-03 Cursor position positioning method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211368733.1A CN115686211A (en) 2022-11-03 2022-11-03 Cursor position positioning method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115686211A true CN115686211A (en) 2023-02-03

Family

ID=85048314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211368733.1A Pending CN115686211A (en) 2022-11-03 2022-11-03 Cursor position positioning method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115686211A (en)

Similar Documents

Publication Publication Date Title
US9870057B1 (en) Gesture detection using an array of short-range communication devices
WO2017133498A1 (en) Intelligent device and intelligent device control method
CN112132881A (en) Method and equipment for acquiring dynamic three-dimensional image
EP3249498B1 (en) Display screen controlling method and apparatus
US10963100B2 (en) Interactive object control method and apparatus, terminal, and computer-readable storage medium
CN108362310B (en) Method and device for determining geomagnetic accuracy, storage medium and terminal
CN110570465B (en) Real-time positioning and map construction method and device and computer readable storage medium
US20180253161A1 (en) Spatial motion-based user interactivity
WO2015188691A1 (en) Method, device, and system for controlling browser by utilizing motion-sensing remote control device
EP3416036A1 (en) Page sliding method and device, and user terminal
CN109302563B (en) Anti-shake processing method and device, storage medium and mobile terminal
CN114063964A (en) Volume compensation optimization method and device, electronic equipment and readable storage medium
CN114125659A (en) Volume real-time compensation method, electronic device and readable storage medium
CN107943406B (en) touch point determining method of touch screen and terminal
CN111366170B (en) State determination method and electronic equipment
CN110633336A (en) Method and device for determining laser data search range and storage medium
CN115686211A (en) Cursor position positioning method and device, electronic equipment and readable storage medium
CN115550619A (en) Projection correction method and device, electronic equipment and readable storage medium
CN114625588A (en) Method, device and equipment for measuring touch operation response time and storage medium
CN114089945A (en) Volume real-time adjustment method, electronic device and readable storage medium
CN114125138B (en) Volume adjustment optimization method and device, electronic equipment and readable storage medium
CN111263084A (en) Video-based gesture jitter detection method, device, terminal and medium
CN115022704B (en) Body-building mode starting method and device, display equipment and readable storage medium
CN110187144B (en) Acceleration sensor calibration method and device
CN107092391B (en) Press operation identification method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination