CN113407045B - Cursor control method and device, electronic equipment and storage medium - Google Patents
Cursor control method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113407045B CN113407045B CN202110718453.8A CN202110718453A CN113407045B CN 113407045 B CN113407045 B CN 113407045B CN 202110718453 A CN202110718453 A CN 202110718453A CN 113407045 B CN113407045 B CN 113407045B
- Authority
- CN
- China
- Prior art keywords
- air mouse
- variation
- determining
- carrier device
- cursor
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0346—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Position Input By Displaying (AREA)
Abstract
The embodiment of the disclosure discloses a cursor control method, a cursor control device, an electronic device and a storage medium, wherein the method comprises the following steps: determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of a horizontal azimuth angle; correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device to obtain a corrected second variation of the horizontal azimuth angle; determining a target position of the air mouse cursor according to the second variation; and controlling the air mouse cursor to move to the target position. The cursor control method improves the consistency between the cursor position and the space posture of the air mouse carrier device, and realizes the accurate remote control of the cursor.
Description
Technical Field
The disclosure relates to the field of information technology, and in particular, to a cursor control method, a cursor control device, an electronic device and a storage medium.
Background
The air mouse refers to an air mouse, is equipment for controlling a cursor to move on a display screen such as a display desktop by rotating and moving in the air, gets rid of the dependence of a common mouse on a physical desktop, can be operated in a suspended mode, and can realize the movement control of the cursor by only moving a wrist.
The air mouse generally uses a portable input device (such as a remote controller, a smart phone and the like) as a carrier device, and uses an accelerometer, a gyroscope, a magnetometer and other inertial sensors built in the carrier device to map the gesture change of the carrier device in a three-dimensional space to the corresponding cursor position change on electronic devices such as a computer/television and the like, so as to realize the motion sensing mouse control of the electronic devices such as the computer/television and the like. By fusing the data of the accelerometer, the gyroscope and the magnetometer which are arranged in the carrier equipment, the space attitude of the carrier equipment can be obtained accurately and stably.
At present, most of the air mouse carrier devices only use an accelerometer and a gyroscope as data sources of air mice due to hardware cost, large interference of indoor magnetic fields on magnetometers and the like. However, the lack of the magnetometer may cause the data source to lack reference data in the direction of the magnetic north pole, so that the estimation of the horizontal azimuth angle of the air mouse carrier device may deviate, and the accumulated deviation amount may gradually become larger with time, so that the actual displacement of the cursor deviates (is smaller or larger than) from the theoretical value, and further, the position of the cursor and the spatial posture of the air mouse carrier device are misplaced, which affects the user experience.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the embodiments of the present disclosure provide a cursor control method, a device, an electronic device, and a storage medium, which improve consistency between a cursor position and a space posture of a space mouse carrier device, and realize accurate remote control of a cursor.
In a first aspect, an embodiment of the present disclosure provides a cursor control method, including:
determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of a horizontal azimuth angle;
correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device to obtain a corrected second variation of the horizontal azimuth angle;
determining a target position of the air mouse cursor according to the second variation;
and controlling the air mouse cursor to move to the target position.
In a second aspect, an embodiment of the present disclosure further provides a cursor control device, including:
the first determining module is used for determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of a horizontal azimuth angle;
the correction module is used for correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, and obtaining a corrected second variation of the horizontal azimuth angle;
The second determining module is used for determining the target position of the air mouse cursor according to the second variation;
and the control module is used for controlling the air mouse cursor to move to the target position.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the cursor control methods as described above.
In a fourth aspect, the disclosed embodiments also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a cursor control method as described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has at least the following advantages:
according to the cursor control method provided by the embodiment of the disclosure, after the change amount of the space attitude of the air mouse carrier device (the change amount comprises the first change amount of the horizontal azimuth angle), the first change amount is corrected based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, and the corrected second change amount of the horizontal azimuth angle is obtained; and finally, determining the target position of the air mouse cursor according to the second variation, and controlling the air mouse cursor to move to the target position. The first variable quantity is corrected based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, so that the determination accuracy of the space attitude variable quantity of the air mouse carrier device can be improved, the determination accuracy of the air mouse cursor target position is further improved, the accurate remote control of the cursor is realized, the consistency between the cursor position and the space attitude of the air mouse carrier device is improved, and the use experience of a user is improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of a cursor control method in an embodiment of the present disclosure;
FIG. 2 is a flow chart of a cursor control method in an embodiment of the present disclosure;
FIG. 3 is a flow chart of a cursor control method in an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a cursor control device according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Fig. 1 is a flowchart of a cursor control method in an embodiment of the disclosure. The method may be performed by a cursor control device, which may be implemented in software and/or hardware, and the device may be configured in an electronic device, such as a terminal, including, but not limited to, a smart phone, a palm top computer, a tablet computer, a portable wearable device, a smart home device (e.g., a desk lamp), and the like.
As shown in fig. 1, the method specifically may include the following steps:
step 110, determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of the horizontal azimuth angle.
Wherein the air mouse carrier device refers to a terminal serving as an air mouse remote controller, such as a smart phone or a remote controller.
In one embodiment, determining the amount of change in the spatial pose of the air mouse carrier device comprises:
determining a spatial pose of the air mouse carrier device based on sensing data of a motion sensor associated with the air mouse carrier device; and determining the change amount of the spatial posture based on the spatial posture of the air mouse carrier device respectively determined by the sensing data of two adjacent frames, or in other words, determining the change amount of the spatial posture based on the spatial posture of the air mouse carrier device respectively determined by the sensing data detected at the adjacent moment.
Specifically, the motion sensor may include two types of accelerometer and gyroscope, and may also include three types of accelerometer, gyroscope and magnetometer. The motion sensor is usually provided by the air mouse carrier device, for example, a smart phone is usually provided with an accelerometer and a gyroscope in a built-in manner; the function of the air mouse carrier can be realized, and the device is additionally provided. The spatial attitude of the air mouse carrier device can be estimated by fusion calculation of the sensing data detected by the motion sensor. The spatial attitude of the air mouse carrier device is typically represented by horizontal azimuth, pitch and roll angles. Wherein the horizontal azimuth angle specifically refers to a horizontal offset angle between the pointing direction of the air mouse carrier device and the magnetic north pole. The pitch angle refers to an up-down pitch angle between the air mouse carrier device and the ground plane. The tilting angle refers to the left-right tilting angle between the empty mouse carrier device and the ground plane.
And 120, correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, and obtaining a corrected second variation of the horizontal azimuth angle.
At present, most of the air mouse carrier devices only use an accelerometer and a gyroscope as a data source for determining the space attitude of the air mouse carrier device due to the hardware cost, large interference of an indoor magnetic field on a magnetometer and the like. However, the lack of the magnetometer may cause the data source to lack reference data in the direction of the magnetic north pole, so that the estimation of the horizontal azimuth angle of the air mouse carrier device may deviate, and the accumulated deviation amount may gradually become larger with time, so that the actual displacement of the cursor deviates (is smaller or larger than) from the theoretical value, and further, the position of the cursor and the spatial posture of the air mouse carrier device are misplaced, which affects the user experience. Aiming at the problem, in the technical proposal of the embodiment, the step of correcting the first variation of the horizontal azimuth angle based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device is added to improve the determination precision of the variation of the horizontal azimuth angle, further improve the determination precision of the air mouse cursor position, improve the consistency of the cursor position and the space posture of the air mouse carrier device, realize the accurate remote control of the cursor, improve the user experience,
And 130, determining the target position of the air mouse cursor according to the second variation.
In one embodiment, determining the target position of the air mouse cursor according to the second variation comprises: determining the change amount of the air mouse cursor position according to the second change amount based on the mapping relation between the change amount of the space gesture of the air mouse carrier device and the change amount of the cursor position; and determining the target position according to the variation of the position of the air mouse cursor.
In another embodiment, the target position of the air mouse cursor may also be determined according to the spatial posture of the air mouse carrier device according to the mapping relationship between the spatial posture of the air mouse carrier device and the air mouse cursor position.
In the embodiment of determining the target position of the air mouse cursor based on the mapping relationship between the change amount of the space gesture of the air mouse carrier device and the change amount of the cursor position, the target position of the air mouse cursor may be determined specifically by the position of the air mouse cursor at the previous moment and the movement amount of the air mouse cursor in the time period from the previous moment to the current moment. In the embodiment of determining the target position of the air mouse cursor based on the mapping relationship between the spatial pose of the air mouse carrier device and the position of the air mouse cursor, the relative position between the spatial pose of the air mouse carrier device and the initial position of the air mouse carrier device at each moment may be determined according to the mapping relationship between the initial position of the air mouse carrier device and the preset initial position of the air mouse cursor, and then the target position of the air mouse cursor may be determined according to the relative position and the preset initial position of the air mouse cursor, and the relative position between the target position of the air mouse cursor and the initial position of the air mouse cursor may be consistent with the relative position between the spatial pose of the air mouse carrier device and the initial position of the air mouse carrier device.
And 140, controlling the mouse cursor to move to the target position.
According to the cursor control method provided by the embodiment of the disclosure, after the change amount of the space attitude of the air mouse carrier device (the change amount comprises the first change amount of the horizontal azimuth angle), the first change amount is corrected based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, and the corrected second change amount of the horizontal azimuth angle is obtained; and finally, determining the target position of the air mouse cursor according to the second variation, and controlling the air mouse cursor to move to the target position. The first variable quantity is corrected based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, so that the determination accuracy of the space attitude variable quantity of the air mouse carrier device can be improved, the determination accuracy of the air mouse cursor target position is further improved, the accurate remote control of the cursor is realized, the consistency between the cursor position and the space attitude of the air mouse carrier device is improved, and the use experience of a user is improved.
Based on the above embodiments, fig. 2 is a schematic flow chart of a cursor control method in an embodiment. On the basis of the above embodiment, the present embodiment adds a step of updating the offset of the horizontal azimuth angle of the air mouse carrier device, so as to solve the problem that the accumulated error of the offset is larger and larger with the accumulation of time. By timely estimating and updating the horizontal azimuth offset condition of the air mouse carrier device and feeding back the horizontal azimuth offset condition to relevant calculation of cursor target position updating in real time, the displacement of the cursor can be guaranteed to accurately reflect the space posture change of the air mouse carrier device, the alignment of the cursor position and the space posture of the air mouse carrier device is guaranteed, the accurate remote control of the air mouse cursor is realized, and the use experience of an air mouse user under the condition of no magnetometer calibration can be improved.
As shown in fig. 2, the cursor control method includes the following steps:
step 210, determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of the horizontal azimuth angle.
Step 220, determining whether the empty mouse carrier device is in a static state.
In one embodiment, the determining whether the empty mouse carrier device is in a resting state comprises: determining whether the air mouse carrier device is in a resting state based on sensing data of a motion sensor associated with the air mouse carrier device. Specifically, for example, the motion sensor includes an accelerometer, if the data of the accelerometer read at the current moment is 0, it may be determined that the air mouse carrier device is in a stationary state at the current moment, that is, the air mouse carrier device is not moved or rotated, otherwise, it is determined that the air mouse carrier device is in a non-stationary state at the current moment. Alternatively, the data of the gyro sensor read at two adjacent moments can be used to determine whether the empty mouse carrier device is in a stationary state. In general terms, whether the air mouse carrier device is in a standing state at the current moment can be judged by monitoring the sensing data of the motion sensor (accelerometer and gyroscope) based on the amplitude value, fluctuation condition and the like of the sensing data.
Step 230, if the air mouse carrier device is in a standing state, determining a current offset of the horizontal azimuth, and updating a historical offset of the horizontal azimuth based on the current offset to obtain a historical latest offset of the horizontal azimuth.
Because the space attitude of the air mouse carrier device changes in the using process, the attitude angle of the air mouse carrier device changes, the horizontal azimuth offset of the air mouse carrier device is inconvenient to estimate in the moving process of the air mouse carrier device, or the horizontal azimuth offset of the air mouse carrier device is estimated when the air mouse carrier device is in the moving process, and the air mouse carrier device has the problems of large calculated amount, high calculation complexity or low precision. In view of the above, in this embodiment, the interaction gap between the user and the air mouse carrier device is used as the estimation and update timing of the horizontal azimuth offset, that is, the offset of the horizontal azimuth is obtained when the air mouse carrier device is in a static state, the historical offset is updated by using the offset, and the offset is used as the historical latest offset to participate in the subsequent step of correcting the first offset of the horizontal azimuth, so that the correction precision can be improved, and the remote control precision of the air mouse cursor can be further improved.
If the air mouse carrier device is in a static state, the space attitude angle of the air mouse carrier device should be kept unchanged theoretically, and the change amount of the horizontal azimuth angle of the air mouse carrier device determined based on the two adjacent frames of sensing data is the offset of the horizontal azimuth angle. Further, the offset at successive moments during the standing state of the air mouse carrier device may be averaged as the current offset of the horizontal azimuth angle.
Specifically, in one embodiment, the determining the current offset of the horizontal azimuth angle includes: determining a reference variation of the horizontal azimuth based on two adjacent frames of sensing data of a motion sensor associated with the air mouse carrier device; and determining the current offset according to the reference variation. The determining the current offset according to the reference variation includes: determining the reference variation as the current offset; or determining the average value of the reference variation amount in the period of time when the empty mouse carrier device is in a static state as the current offset amount. The accuracy of determining the current offset can be further improved by determining the current offset based on an average value of the offsets determined by two adjacent frames of sensing data during a period in which the air mouse carrier device is in a stationary state, or in other words, determining an average value of the variation of the horizontal azimuth angle between two adjacent times during a period in which the air mouse carrier device is in a stationary state as the current offset.
The updating of the historical offset of the horizontal azimuth angle based on the current offset may specifically be to replace the historical offset with the current offset, that is, the current offset becomes the historical offset, and the last updated historical offset is the latest historical offset.
And step 240, correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, and obtaining a corrected second variation of the horizontal azimuth angle.
Specifically, in one embodiment, the correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device includes: determining a difference between the first amount of change and the historical latest offset; the difference is determined as a second amount of change in the corrected azimuth angle.
And 250, determining the target position of the air mouse cursor according to the second variation.
And 260, controlling the mouse cursor to move to the target position.
According to the technical scheme of the embodiment, on the basis of the embodiment, the step of updating the offset of the horizontal azimuth angle of the air mouse carrier device is added, so that the problem that the accumulated error of the offset is larger and larger along with accumulation of time is solved. By timely estimating and updating the horizontal azimuth offset condition of the air mouse carrier device and feeding back the horizontal azimuth offset condition to relevant calculation of cursor target position updating in real time, the displacement of the cursor can be guaranteed to accurately reflect the space posture change of the air mouse carrier device, the alignment of the cursor position and the space posture of the air mouse carrier device is guaranteed, the accurate remote control of the air mouse cursor is realized, and the use experience of an air mouse user under the condition of no magnetometer calibration can be improved.
Based on the foregoing embodiment, fig. 3 is a schematic flow chart of a cursor control method in an embodiment, which specifically includes: and reading sensing data of a motion sensor (accelerometer and gyroscope) associated with the air mouse carrier device, determining the change amount of the spatial attitude of the air mouse carrier device based on the sensing data, correcting the change amount by using the historical latest offset of the horizontal azimuth angle, determining the target position of the cursor based on the corrected change amount, and updating. After the sensing data of the motion sensor associated with the air mouse carrier device is read, the method further comprises the step of judging whether the air mouse carrier device is in a standing state, and if so, performing estimation and update operation of the horizontal azimuth offset to obtain a historical latest offset. And updating the offset of the horizontal azimuth angle in time every time the air mouse carrier device is monitored to be in a static state. If the device is in motion, the updating operation of the horizontal azimuth offset is not performed.
In this embodiment, the interaction gap between the user and the air mouse carrier device is used as the estimation and update time of the horizontal azimuth angle offset, that is, the offset of the horizontal azimuth angle of the air mouse carrier device is obtained when the air mouse carrier device is in a static state, the historical offset is updated by using the offset, and the offset is used as the historical latest offset to participate in the subsequent step of correcting the first offset of the horizontal azimuth angle, so that the correction precision can be improved, and the remote control precision of the air mouse cursor can be further improved.
Fig. 4 is a schematic structural diagram of a cursor control device according to an embodiment of the disclosure. As shown in fig. 4, the cursor control device specifically includes: a first determination module 410, a correction module 420, a second determination module 430, and a control module 440.
Wherein, the first determining module 410 is configured to determine a variation of the spatial pose of the air mouse carrier device, where the variation includes a first variation of a horizontal azimuth; a correction module 420, configured to correct the first variation based on a historical latest offset of the horizontal azimuth of the air mouse carrier device, and obtain a corrected second variation of the horizontal azimuth; a second determining module 430, configured to determine a target position of the air mouse cursor according to the second variation; and the control module 440 is used for controlling the air mouse cursor to move to the target position.
Optionally, the cursor control device further includes:
the judging module is used for determining whether the empty mouse carrier equipment is in a standing state or not; the third determining module is used for determining the current offset of the horizontal azimuth angle if the air mouse carrier device is in a static state; and the updating module is used for updating the historical offset of the horizontal azimuth angle based on the current offset.
Optionally, the determining module is specifically configured to: determining whether the air mouse carrier device is in a resting state based on sensing data of a motion sensor associated with the air mouse carrier device.
Optionally, the third determining module specifically includes:
a first determining unit for determining a reference variation of the horizontal azimuth angle based on two adjacent frames of sensing data of a motion sensor associated with the air mouse carrier device; and the second determining unit is used for determining the current offset according to the reference variable quantity.
Optionally, the second determining unit is specifically configured to: determining the reference variation as the current offset; or determining the average value of the reference variation amount in the period of time when the empty mouse carrier device is in a static state as the current offset amount.
Optionally, the correction module 420 includes:
a first determining unit configured to determine a difference between the first variation amount and the history latest offset amount; a second determining unit configured to determine the difference as a second variation of the corrected horizontal azimuth angle.
Optionally, the second determining module 430 includes: a first determining unit, configured to determine a change amount of the air mouse cursor position according to the second change amount based on a mapping relationship between the change amount of the space gesture of the air mouse carrier device and the change amount of the cursor position; and the second determining unit is used for determining the target position according to the change amount of the position of the air mouse cursor.
The cursor control device provided by the embodiment of the disclosure, after determining the variation of the spatial attitude of the air mouse carrier device (the variation includes a first variation of a horizontal azimuth angle), corrects the first variation based on a historical latest offset of the horizontal azimuth angle of the air mouse carrier device, and obtains a corrected second variation of the horizontal azimuth angle; and finally, determining the target position of the air mouse cursor according to the second variation, and controlling the air mouse cursor to move to the target position. The first variable quantity is corrected based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, so that the determination accuracy of the space attitude variable quantity of the air mouse carrier device can be improved, the determination accuracy of the air mouse cursor target position is further improved, the accurate remote control of the cursor is realized, the consistency between the cursor position and the space attitude of the air mouse carrier device is improved, and the use experience of a user is improved.
The cursor control device provided in the embodiments of the present disclosure may perform steps in the cursor control method provided in the embodiments of the present disclosure, and the performing steps and the beneficial effects are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the disclosure. Referring now in particular to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 500 in the embodiments of the present disclosure may include, but is 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., in-vehicle navigation terminals), wearable electronic devices, and the like, and fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, an electronic device 500 may include a processing means (e.g., a central processor, a graphics processor, etc.) 501 that may perform various suitable actions and processes to implement the methods of embodiments as described in the present disclosure according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to 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 non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts, thereby implementing the method as described above. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. 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 context of this disclosure, 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, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of a horizontal azimuth angle; correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device to obtain a corrected second variation of the horizontal azimuth angle; determining a target position of the air mouse cursor according to the second variation; and controlling the air mouse cursor to move to the target position.
Alternatively, the electronic device may perform other steps described in the above embodiments when the above one or more programs are executed by the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 disclosure. 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 units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 accordance with one or more embodiments of the present disclosure, the present disclosure provides a cursor control method, including: determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of a horizontal azimuth angle; correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device to obtain a corrected second variation of the horizontal azimuth angle; determining a target position of the air mouse cursor according to the second variation; and controlling the air mouse cursor to move to the target position.
In accordance with one or more embodiments of the present disclosure, in the cursor control method provided in the present disclosure, optionally, further includes: determining whether the empty mouse carrier device is in a static state; and if the air mouse carrier device is in a standing state, determining the current offset of the horizontal azimuth angle, and updating the historical offset of the horizontal azimuth angle based on the current offset.
In accordance with one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the determining whether the air mouse carrier device is in a standing state includes: determining whether the air mouse carrier device is in a resting state based on sensing data of a motion sensor associated with the air mouse carrier device.
In accordance with one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the determining the current offset of the horizontal azimuth angle includes: determining a reference variation of the horizontal azimuth based on two adjacent frames of sensing data of a motion sensor associated with the air mouse carrier device; and determining the current offset according to the reference variation.
In one or more embodiments of the present disclosure, in the cursor control method provided in the present disclosure, optionally, the determining the current offset according to the reference variation includes: determining the reference variation as the current offset; or determining the average value of the reference variation amount in the period of time when the empty mouse carrier device is in a static state as the current offset amount.
In accordance with one or more embodiments of the present disclosure, in the cursor control method provided in the present disclosure, optionally, the correcting the first variation based on a historical latest offset of the horizontal azimuth angle of the air mouse carrier device includes: determining a difference between the first amount of change and the historical latest offset; the difference is determined as a second amount of change in the corrected azimuth angle.
According to one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the determining, according to the second variation, the target position of the air mouse cursor includes: determining the change amount of the air mouse cursor position according to the second change amount based on the mapping relation between the change amount of the space gesture of the air mouse carrier device and the change amount of the cursor position; and determining the target position according to the variation of the position of the air mouse cursor.
In accordance with one or more embodiments of the present disclosure, the present disclosure provides a cursor control device comprising: the first determining module is used for determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of a horizontal azimuth angle; the correction module is used for correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, and obtaining a corrected second variation of the horizontal azimuth angle; the second determining module is used for determining the target position of the air mouse cursor according to the second variation; and the control module is used for controlling the air mouse cursor to move to the target position.
In accordance with one or more embodiments of the present disclosure, in the cursor control device provided in the present disclosure, optionally, further includes: the judging module is used for determining whether the empty mouse carrier equipment is in a standing state or not; the third determining module is used for determining the current offset of the horizontal azimuth angle if the air mouse carrier device is in a static state; and the updating module is used for updating the historical offset of the horizontal azimuth angle based on the current offset.
In the cursor control device provided in the present disclosure, optionally, the determining module is specifically configured to: determining whether the air mouse carrier device is in a resting state based on sensing data of a motion sensor associated with the air mouse carrier device.
In the cursor control device provided in the present disclosure, according to one or more embodiments of the present disclosure, optionally, the third determining module specifically includes: a first determining unit for determining a reference variation of the horizontal azimuth angle based on two adjacent frames of sensing data of a motion sensor associated with the air mouse carrier device; and the second determining unit is used for determining the current offset according to the reference variable quantity.
In the cursor control device provided in the present disclosure, according to one or more embodiments of the present disclosure, optionally, the second determining unit is specifically configured to: determining the reference variation as the current offset; or determining the average value of the reference variation amount in the period of time when the empty mouse carrier device is in a static state as the current offset amount.
In accordance with one or more embodiments of the present disclosure, in the cursor control device provided by the present disclosure, optionally, the correction module includes: a first determining unit configured to determine a difference between the first variation amount and the history latest offset amount; a second determining unit configured to determine the difference as a second variation of the corrected horizontal azimuth angle.
In accordance with one or more embodiments of the present disclosure, in the cursor control device provided by the present disclosure, optionally, the second determining module includes: a first determining unit, configured to determine a change amount of the air mouse cursor position according to the second change amount based on a mapping relationship between the change amount of the space gesture of the air mouse carrier device and the change amount of the cursor position; and the second determining unit is used for determining the target position according to the change amount of the position of the air mouse cursor.
According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement any of the cursor control methods as provided by the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a cursor control method as any one of the present disclosure provides.
The disclosed embodiments also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement a cursor control method as described above.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
Claims (10)
1. A method of cursor control, the method comprising:
determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of a horizontal azimuth angle;
correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device to obtain a corrected second variation of the horizontal azimuth angle;
determining a target position of the air mouse cursor according to the second variation;
and controlling the air mouse cursor to move to the target position.
2. The method as recited in claim 1, further comprising:
determining whether the empty mouse carrier device is in a static state;
and if the air mouse carrier device is in a standing state, determining the current offset of the horizontal azimuth angle, and updating the historical offset of the horizontal azimuth angle based on the current offset.
3. The method of claim 2, wherein said determining whether said air mouse carrier device is in a resting state comprises:
determining whether the air mouse carrier device is in a resting state based on sensing data of a motion sensor associated with the air mouse carrier device.
4. The method of claim 2, wherein the determining the current offset of the horizontal azimuth angle comprises:
determining a reference variation of the horizontal azimuth based on two adjacent frames of sensing data of a motion sensor associated with the air mouse carrier device;
and determining the current offset according to the reference variation.
5. The method of claim 4, wherein said determining said current offset from said reference variance comprises:
determining the reference variation as the current offset;
or determining the average value of the reference variation amount in the period of time when the empty mouse carrier device is in a static state as the current offset amount.
6. The method of any one of claims 1-5, wherein the correcting the first variation based on a historical latest offset of the horizontal azimuth of an air mouse carrier device comprises:
Determining a difference between the first amount of change and the historical latest offset;
the difference is determined as a second amount of change in the corrected azimuth angle.
7. The method of any one of claims 1-5, wherein determining the target position of the mouse cursor based on the second amount of change comprises:
determining the change amount of the air mouse cursor position according to the second change amount based on the mapping relation between the change amount of the space gesture of the air mouse carrier device and the change amount of the cursor position;
and determining the target position according to the variation of the position of the air mouse cursor.
8. A cursor control device, comprising:
the first determining module is used for determining the variation of the space attitude of the air mouse carrier device, wherein the variation comprises a first variation of a horizontal azimuth angle;
the correction module is used for correcting the first variation based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier device, and obtaining a corrected second variation of the horizontal azimuth angle;
the second determining module is used for determining the target position of the air mouse cursor according to the second variation;
and the control module is used for controlling the air mouse cursor to move to the target position.
9. An electronic device, the electronic device comprising:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110718453.8A CN113407045B (en) | 2021-06-28 | 2021-06-28 | Cursor control method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110718453.8A CN113407045B (en) | 2021-06-28 | 2021-06-28 | Cursor control method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113407045A CN113407045A (en) | 2021-09-17 |
CN113407045B true CN113407045B (en) | 2023-08-22 |
Family
ID=77679697
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110718453.8A Active CN113407045B (en) | 2021-06-28 | 2021-06-28 | Cursor control method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113407045B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114115536A (en) * | 2021-11-22 | 2022-03-01 | 北京字节跳动网络技术有限公司 | Interaction method, interaction device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102411437A (en) * | 2010-09-21 | 2012-04-11 | 申金坡 | Method and device for carrying out compensation on dip angle of mouse after rotating around Z shaft |
CN102495687A (en) * | 2011-12-27 | 2012-06-13 | 深圳Tcl新技术有限公司 | Method, video terminal and system for realizing simple air mouse |
CN104598050A (en) * | 2013-10-31 | 2015-05-06 | 深圳市启望科文技术有限公司 | Motion sensing air mouse aligning method and device |
CN105487685A (en) * | 2015-11-20 | 2016-04-13 | 小米科技有限责任公司 | Optimization method and apparatus for air mouse remote controller and terminal device |
CN107229353A (en) * | 2017-05-09 | 2017-10-03 | 歌尔科技有限公司 | The displacement acquisition methods and device of sky mouse |
CN111078029A (en) * | 2019-12-05 | 2020-04-28 | 广州视源电子科技股份有限公司 | Air mouse information determination method, device, equipment and storage medium |
CN111831136A (en) * | 2019-03-26 | 2020-10-27 | 深圳Tcl新技术有限公司 | Bluetooth air mouse moving method, storage medium and smart television |
-
2021
- 2021-06-28 CN CN202110718453.8A patent/CN113407045B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102411437A (en) * | 2010-09-21 | 2012-04-11 | 申金坡 | Method and device for carrying out compensation on dip angle of mouse after rotating around Z shaft |
CN102495687A (en) * | 2011-12-27 | 2012-06-13 | 深圳Tcl新技术有限公司 | Method, video terminal and system for realizing simple air mouse |
CN104598050A (en) * | 2013-10-31 | 2015-05-06 | 深圳市启望科文技术有限公司 | Motion sensing air mouse aligning method and device |
CN105487685A (en) * | 2015-11-20 | 2016-04-13 | 小米科技有限责任公司 | Optimization method and apparatus for air mouse remote controller and terminal device |
CN107229353A (en) * | 2017-05-09 | 2017-10-03 | 歌尔科技有限公司 | The displacement acquisition methods and device of sky mouse |
CN111831136A (en) * | 2019-03-26 | 2020-10-27 | 深圳Tcl新技术有限公司 | Bluetooth air mouse moving method, storage medium and smart television |
CN111078029A (en) * | 2019-12-05 | 2020-04-28 | 广州视源电子科技股份有限公司 | Air mouse information determination method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113407045A (en) | 2021-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6665572B2 (en) | Control program, control method, and computer | |
US20130179108A1 (en) | System and Method for Calibrating Sensors for Different Operating Environments | |
CN108680196B (en) | Time delay correction method, system and computer readable medium | |
CN112643665B (en) | Calibration method and device for installation error of absolute pose sensor | |
US20190041978A1 (en) | User defined head gestures methods and apparatus | |
CN116079697B (en) | Monocular vision servo method, device, equipment and medium based on image | |
CN111625764A (en) | Calibration method and device for mobile data, electronic equipment and storage medium | |
JP2022531186A (en) | Information processing methods, devices, electronic devices, storage media and programs | |
CN113407045B (en) | Cursor control method and device, electronic equipment and storage medium | |
US9939497B2 (en) | Dynamically calibrating magnetic sensors | |
WO2016150312A1 (en) | Geomagnetic sensor calibration method and apparatus, and intelligent device | |
CN112818898B (en) | Model training method and device and electronic equipment | |
CN113766293B (en) | Information display method, device, terminal and storage medium | |
CN110096134B (en) | VR handle ray jitter correction method, device, terminal and medium | |
CN111382701B (en) | Motion capture method, motion capture device, electronic equipment and computer readable storage medium | |
CN110487264B (en) | Map correction method, map correction device, electronic equipment and storage medium | |
CN117191080A (en) | Calibration method, device, equipment and storage medium for camera and IMU external parameters | |
CN113741750B (en) | Cursor position updating method and device and electronic equipment | |
CN115550619A (en) | Projection correction method and device, electronic equipment and readable storage medium | |
CN115495038A (en) | Audio adjusting method and device, electronic equipment and readable storage medium | |
CN113515201B (en) | Cursor position updating method and device and electronic equipment | |
CN114563018B (en) | Method and apparatus for calibrating head mounted display device | |
CN113672137A (en) | Cursor position updating method and device and electronic equipment | |
US20230418072A1 (en) | Positioning method, apparatus, electronic device, head-mounted display device, and storage medium | |
CN116022159B (en) | Vehicle movement control method, apparatus, electronic device, and computer-readable medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |