CN112947772B - Rotation gesture alignment method and device of double-light-ball interaction pen and computer equipment - Google Patents
Rotation gesture alignment method and device of double-light-ball interaction pen and computer equipment Download PDFInfo
- Publication number
- CN112947772B CN112947772B CN202110115640.7A CN202110115640A CN112947772B CN 112947772 B CN112947772 B CN 112947772B CN 202110115640 A CN202110115640 A CN 202110115640A CN 112947772 B CN112947772 B CN 112947772B
- Authority
- CN
- China
- Prior art keywords
- coordinate system
- ball
- light
- pen
- inertial sensor
- 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
- 230000003993 interaction Effects 0.000 title claims abstract description 63
- 238000000034 method Methods 0.000 title claims abstract description 60
- 239000013598 vector Substances 0.000 claims abstract description 89
- 238000006243 chemical reaction Methods 0.000 claims abstract description 64
- 230000002452 interceptive effect Effects 0.000 claims abstract description 34
- 238000009825 accumulation Methods 0.000 claims abstract description 7
- 230000015654 memory Effects 0.000 claims description 30
- 238000012216 screening Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 3
- 230000036544 posture Effects 0.000 abstract description 20
- 230000008569 process Effects 0.000 description 11
- CLOMYZFHNHFSIQ-UHFFFAOYSA-N clonixin Chemical compound CC1=C(Cl)C=CC=C1NC1=NC=CC=C1C(O)=O CLOMYZFHNHFSIQ-UHFFFAOYSA-N 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000005457 optimization Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000004927 fusion Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
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/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/038—Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
- G06F3/0386—Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry for light pen
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 invention relates to a rotation gesture alignment method, a device, computer equipment and a storage medium of a double-light-ball interaction pen, wherein the method comprises the following steps: acquiring a plurality of first vectors of the rotation postures of an inertial sensor of the double-light-sphere interactive pen at a plurality of moments relative to an inertial sensor coordinate system and a plurality of second vectors of the rotation postures of the two-point rigid body relative to a rigid body coordinate system; setting a conversion relation of alignment of an inertial sensor coordinate system and a rigid body coordinate system; obtaining a first product of a conversion relation and a first vector at each moment and a second product of a second vector and the conversion relation, and obtaining a difference value of the first product and the second product; and squaring the plurality of differences, accumulating, optimizing the accumulation by a least square method and adopting an iterative mode to obtain a conversion vector of a conversion relation, and converting the data on the inertial sensor coordinate system and the rigid body coordinate system into the same coordinate system according to the conversion vector. The method realizes the alignment of the rotation data of the double-light ball interactive pen.
Description
Technical Field
The present invention relates to the field of interactive pen gesture processing technologies, and in particular, to a method and apparatus for aligning a rotational gesture of a dual-ball interactive pen, a computer device, and a storage medium.
Background
The interactive pen with double-light ball inertial sensor is one holographic 3D desktop interactive pen with one infrared reflecting ball embedded in the pen head and one infrared reflecting ball embedded in the pen tail. In an optical motion capture system, to achieve a rigid body pose, it is necessary to align the inertial sensor rotational pose to the rotational pose of the rigid body.
The IMU sensor can well detect the change of the rotation gesture to obtain reliable rotation data, but the rotation data of the IMU which is not subjected to fusion alignment is generally inconsistent with the actual rotation data of the rigid body, and the intrinsic reason is caused by the inconsistency of the IMU coordinate system and the rigid body coordinate system. Therefore, the IMU rotation data or the actual rotation data of the rigid body need to be converted to the same coordinate system to perform data fusion.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a rotation gesture alignment method, a rotation gesture alignment device, computer equipment and a storage medium of a double-light-sphere interactive pen, which can provide a conversion relation so that IMU rotation data and rigid body actual rotation data are placed in the same coordinate system to perform data fusion through the conversion relation, and data accuracy during data fusion is provided.
In order to solve at least one of the above technical problems, an embodiment of the present invention provides a method for aligning a rotation gesture of a dual-ball interaction pen, where a pen head of the dual-ball interaction pen is provided with a first infrared reflecting ball, a pen tail of the dual-ball interaction pen is provided with a second infrared reflecting ball, and an inertial sensor is assembled in a pen body of the dual-ball interaction pen, the method includes:
acquiring a plurality of first vectors of the rotation gesture of an inertial sensor of the double-light-ball interactive pen relative to an inertial sensor coordinate system at a plurality of moments;
acquiring a plurality of second vectors of the rotation gesture of a two-point rigid body formed by a first infrared reflecting ball and a second infrared reflecting ball of the double-light ball interactive pen relative to a rigid body coordinate system at a plurality of moments;
setting a conversion relation of the inertial sensor coordinate system aligned with the rigid body coordinate system, wherein the conversion relation is an unknown quantity;
acquiring a first product of the conversion relation and the first vector and a second product of the second vector and the conversion relation at each moment in the plurality of moments, and acquiring a difference value of the first product and the second product;
and squaring the plurality of difference values at the plurality of moments, accumulating, optimizing the accumulation by a least square method in an iterative mode to obtain a conversion vector of the conversion relation, and converting the data on the inertial sensor coordinate system and the rigid body coordinate system into the same coordinate system according to the conversion vector.
In one embodiment, the acquiring a plurality of first vectors of the rotational gestures of the inertial sensor of the dual-ball interactive pen relative to an inertial sensor coordinate system at a plurality of moments includes:
and when the rotation angle difference of the inertial sensor of the double-light-ball interaction pen of two continuous frames corresponding to two continuous frames in the plurality of time points is larger than a preset rotation angle threshold value, acquiring a first vector of the rotation gesture of the inertial sensor of the double-light-ball interaction pen of the two continuous frames relative to an inertial sensor coordinate system.
In one embodiment, the acquiring the second plurality of vectors of the rotation gesture of the two-point rigid body formed by the first infrared reflecting ball and the second infrared reflecting ball of the dual-light ball interaction pen in the plurality of moments relative to the rigid body coordinate system includes:
and when the rotation angle difference of the two point rigid bodies of the two-ball interaction pen of the two continuous frames corresponding to the two continuous frames in the plurality of moments is larger than a preset rotation angle threshold value, acquiring a second vector of the rotation gesture of the two point rigid bodies in the two continuous frames relative to a rigid body coordinate system.
In one embodiment, the plurality of moments includes each moment when the dual-ball interactive pen is continuously rotated.
In one embodiment, the acquiring a plurality of first vectors of the rotational gestures of the inertial sensor of the dual-ball interactive pen relative to an inertial sensor coordinate system at a plurality of moments includes:
acquiring frame data of the double-light-ball interaction pen acquired at each moment when the double-light-ball interaction pen rotates;
screening first posture data for calculating the rotation posture of the inertial sensor relative to an inertial sensor coordinate system from the frame data at each moment;
and calculating the first vector according to the first gesture data.
In one embodiment, the acquiring the second plurality of vectors of the rotation gesture of the two-point rigid body formed by the first infrared reflecting ball and the second infrared reflecting ball of the dual-light ball interaction pen in the plurality of moments relative to the rigid body coordinate system includes:
acquiring frame data of the double-light-ball interaction pen acquired at each moment when the double-light-ball interaction pen rotates;
screening second posture data for calculating the rotation posture of the two-point rigid body relative to a rigid body coordinate system from the frame data at each moment;
and calculating the second vector according to the second gesture data.
In one embodiment, the method further comprises:
acquiring a preset quantity threshold value;
controlling the quantity values of the first vectors and the quantity values of the second vectors according to the preset quantity threshold.
The utility model provides a rotatory gesture alignment device of mutual pen of two light balls, the nib of mutual pen of two light balls is provided with first infrared reflection ball, the pen tail of mutual pen of two light balls is provided with the infrared reflection ball of second, be equipped with inertial sensor in the pen body of mutual pen of two light balls, the device includes:
the first acquisition module is used for acquiring a plurality of first vectors of the rotation gesture of the inertial sensor of the double-light-ball interaction pen relative to an inertial sensor coordinate system at a plurality of moments;
the second acquisition module is used for acquiring a plurality of second vectors of the rotation gesture of the two-point rigid body formed by the first infrared reflecting ball and the second infrared reflecting ball of the double-light ball interaction pen relative to the rigid body coordinate system at a plurality of moments;
the setting module is used for setting a conversion relation of the inertial sensor coordinate system aligned with the rigid body coordinate system, wherein the conversion relation is an unknown quantity;
a third obtaining module, configured to obtain a first product of the conversion relation and the first vector at each of the plurality of moments, and a second product of the second vector and the conversion relation, and obtain a difference value between the first product and the second product;
and the calculation module is used for squaring the plurality of difference values at the plurality of moments and then accumulating, optimizing the accumulation in an iterative mode through a least square method to obtain a conversion vector of the conversion relation, and converting the data on the inertial sensor coordinate system and the rigid coordinate system into the same coordinate system according to the conversion vector.
In addition, the embodiment of the invention also provides computer equipment, which comprises: the system comprises a memory, a processor and an application program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the method of any embodiment when executing the application program.
In addition, the embodiment of the invention also provides a computer readable storage medium, on which an application program is stored, and when the application program is executed by a processor, the steps of the method of any embodiment are realized.
In the embodiment of the invention, by implementing the method, the conversion vector of the conversion relation of the alignment of the inertial sensor coordinate system and the rigid body coordinate system is obtained. The data in the coordinate system of the inertial sensor can be converted into the coordinate system of the rigid body through the conversion vector, or the data in the coordinate system of the rigid body can be converted into the coordinate system of the inertial sensor through the conversion vector, so that the data of different coordinate systems in the rotation process of the double-light-ball interaction pen are fused after being aligned, the rotation gesture in the rotation process of the double-light-ball interaction pen is determined, and the accuracy of the rotation gesture in the rotation process of the double-light-ball interaction pen is improved.
Drawings
FIG. 1 is a flow chart of a method for aligning the rotation gesture of a dual-light ball interactive pen according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a dual-ball interaction pen according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a state change of a dual-light ball interactive pen according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a rotational gesture alignment apparatus of a dual-ball interactive pen according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention provides a rotation gesture alignment method of a double-light-ball interactive pen. The pen point of the double-light-ball interaction pen is provided with a first infrared reflecting ball, the pen tail of the double-light-ball interaction pen is provided with a second infrared reflecting ball, and an inertial sensor is assembled in the pen body of the double-light-ball interaction pen. As shown in FIG. 1, the method for aligning the rotation gesture of the dual-ball interactive pen comprises the following steps:
s102, acquiring a plurality of first vectors of the rotation gesture of the inertial sensor of the double-light-ball interaction pen relative to an inertial sensor coordinate system at a plurality of moments.
Wherein the plurality of moments include respective moments when the dual-light ball interactive pen continuously rotates.
In an implementation, the acquiring a plurality of first vectors of the rotational gestures of the inertial sensor of the dual-ball interactive pen relative to an inertial sensor coordinate system at a plurality of moments includes: and when the rotation angle difference of the inertial sensor of the double-light-ball interaction pen of two continuous frames corresponding to two continuous frames in the plurality of time points is larger than a preset rotation angle threshold value, acquiring a first vector of the rotation gesture of the inertial sensor of the double-light-ball interaction pen of the two continuous frames relative to an inertial sensor coordinate system.
In an implementation, the acquiring a plurality of first vectors of the rotational gestures of the inertial sensor of the dual-ball interactive pen relative to an inertial sensor coordinate system at a plurality of moments includes: acquiring frame data of the double-light-ball interaction pen acquired at each moment when the double-light-ball interaction pen rotates; screening first posture data for calculating the rotation posture of the inertial sensor relative to an inertial sensor coordinate system from the frame data at each moment; and calculating the first vector according to the first gesture data.
In one implementation, before S102, the method further includes: acquiring a preset quantity threshold value; and controlling the quantity values of the plurality of first vectors according to the preset quantity threshold.
Specifically, when the double-ball interactive pen rotates, frame data of the double-ball interactive pen at each moment is collected. Screening first posture data for calculating the rotation posture of the inertial sensor relative to the inertial sensor coordinate system from frame data at each moment; a first vector is calculated from the first pose data. Therefore, a first vector of the rotation posture of the inertial sensor of the dual-light ball interactive pen relative to the coordinate system of the inertial sensor at each moment can be obtained. Further, a preset quantity threshold is set for controlling quantity values of a plurality of first vectors collected, so that the quantity of data to be subjected to iterative optimization in the follow-up process is ensured not to be excessive, otherwise, the iterative optimization process is easy to be abnormally slow.
And S104, acquiring a plurality of second vectors of the rotation gesture of the two-point rigid body formed by the first infrared reflecting ball and the second infrared reflecting ball of the double-light ball interactive pen relative to the rigid body coordinate system at a plurality of moments.
Wherein the plurality of moments include respective moments when the dual-light ball interactive pen continuously rotates.
In an implementation manner, the acquiring the plurality of second vectors of the rotation gesture of the two-point rigid body formed by the first infrared reflecting ball and the second infrared reflecting ball of the dual-light ball interaction pen in the plurality of moments relative to the rigid body coordinate system includes: and when the rotation angle difference of the two point rigid bodies of the two-ball interaction pen of the two continuous frames corresponding to the two continuous frames in the plurality of moments is larger than a preset rotation angle threshold value, acquiring a second vector of the rotation gesture of the two point rigid bodies in the two continuous frames relative to a rigid body coordinate system.
In an implementation manner, the acquiring the plurality of second vectors of the rotation gesture of the two-point rigid body formed by the first infrared reflecting ball and the second infrared reflecting ball of the dual-light ball interaction pen in the plurality of moments relative to the rigid body coordinate system includes: acquiring frame data of the double-light-ball interaction pen acquired at each moment when the double-light-ball interaction pen rotates; screening second posture data for calculating the rotation posture of the two-point rigid body relative to a rigid body coordinate system from the frame data at each moment; and calculating the second vector according to the second gesture data.
In an implementation, before S104, the method further includes: acquiring a preset quantity threshold value; and controlling the quantity values of the plurality of second vectors according to the preset quantity threshold.
Specifically, when the double-ball interactive pen rotates, frame data of the double-ball interactive pen at each moment is collected. Screening second posture data for calculating the rotation posture of the two-point rigid body relative to a rigid body coordinate system from the frame data at each moment; and calculating the second vector according to the second gesture data. Therefore, the second vector of the rotational posture of the two-point rigid body with respect to the rigid body coordinate system at each time point can be obtained. Further, a preset quantity threshold is set for controlling the quantity values of the acquired second vectors, so that the quantity of data to be subjected to iterative optimization in the follow-up process is ensured not to be excessive, otherwise, the iterative optimization process is easy to be abnormally slow.
S106, setting a conversion relation of the inertial sensor coordinate system and the rigid body coordinate system, wherein the conversion relation is an unknown quantity.
S108, obtaining a first product of the conversion relation and the first vector and a second product of the second vector and the conversion relation at each moment in the plurality of moments, and obtaining a difference value of the first product and the second product.
S110, squaring the plurality of difference values at the plurality of moments, accumulating, optimizing the accumulation by a least square method and adopting an iterative mode to obtain a conversion vector of the conversion relation, and converting the data on the inertial sensor coordinate system and the rigid coordinate system into the same coordinate system according to the conversion vector.
Specifically, a conversion vector of the conversion relation is calculated by adopting an objective function formula. The objective function formula is:wherein DeltaR represents the transformation relationship, IMUR m Representing the first vector, rigidR m Representing the second vector. The method comprises the steps of optimizing the objective function in an iterative mode by using a least square method through combining collected rotation gesture data corresponding to the multi-frame inertial sensor IMU and the two-point rigid body, so as to obtain an optimization result. And determining a vector value of DeltaR according to the optimization result to obtain a conversion vector of the conversion relation.
By implementing the method, the conversion vector of the conversion relation of the alignment of the inertial sensor coordinate system and the rigid body coordinate system is obtained. The data in the coordinate system of the inertial sensor can be converted into the coordinate system of the rigid body through the conversion vector, or the data in the coordinate system of the rigid body can be converted into the coordinate system of the inertial sensor through the conversion vector, so that the data of different coordinate systems in the rotation process of the double-light-ball interaction pen are fused after being aligned, the rotation gesture in the rotation process of the double-light-ball interaction pen is determined, and the accuracy of the rotation gesture in the rotation process of the double-light-ball interaction pen is improved.
For example, as shown in fig. 2, the solid line is a rigid coordinate system, the dotted line is an inertial sensor IMU coordinate system, and the conversion relationship DeltaR between the two coordinate systems is solved for Ji Guanxing sensor IMU rotation posture and rigid rotation posture. Assuming that at the initial moment, the rotation and translation of the inertial sensor IMU and the two-point rigid body relative to the respective coordinate system are rotation-free and translation-free, and the 3D coordinates of the two balls of the double-ball IMU pen under the rigid coordinate system are P respectively a0 、P b0 A, B coordinates P of two light spheres in IMU coordinate system a ′ 0 、P b ′ 0 The method comprises the following steps:
as shown in fig. 3, assuming time m, the rotational translation of the inertial sensor IMU relative to the IMU coordinate system is IMUR m 、IMUT m The rotation and translation of the two-point rigid body relative to the rigid body coordinate system is RigidR m 、RigidT m The coordinates P 'of the two light spheres at the IMU coordinate system at the m moment A, B' am 、P′ bm The method comprises the following steps:
coordinate P of two light balls under rigid coordinate system at m moment A, B am 、P bm The method comprises the following steps:
the preparation method comprises the following steps:
obviously:
IMUT m *DeltaR -1 =RigidT m ;
the final formula satisfied by the conversion between the two coordinate systems is thus finally obtained:
DeltaR*IMUR m =RigidR m *DeltaR;
combining the collected rotation gesture data corresponding to the multi-frame IMU and the two-point rigid body, a least square method can be used, the following objective function is optimized in an iterative mode, and the DeltaR result is solved:
it should be noted that, in order to ensure uniformity and robustness of acquired data, it may be provided that two continuous frames of rotation gesture data are acquired, where the rotation angle difference is greater than a set rotation angle threshold value, so as to avoid excessive acquisition at some angles.
In an embodiment, the invention further provides a rotary gesture alignment device of the double-light-ball interaction pen, the pen point of the double-light-ball interaction pen is provided with a first infrared reflecting ball, the pen tail of the double-light-ball interaction pen is provided with a second infrared reflecting ball, and an inertial sensor is assembled in the pen body of the double-light-ball interaction pen. As shown in fig. 4, the apparatus includes:
a first obtaining module 12, configured to obtain a plurality of first vectors of rotation postures of an inertial sensor of the dual-ball interaction pen relative to an inertial sensor coordinate system at a plurality of moments;
a second obtaining module 14, configured to obtain a plurality of second vectors of rotation postures of a two-point rigid body formed by a first infrared reflecting ball and a second infrared reflecting ball of the dual-light ball interaction pen in a plurality of moments relative to a rigid body coordinate system;
a setting module 16, configured to set a conversion relation of the inertial sensor coordinate system aligned with the rigid body coordinate system, where the conversion relation is an unknown quantity;
a third obtaining module 18, configured to obtain a first product of the conversion relation and the first vector at each of the plurality of moments, and a second product of the second vector and the conversion relation, and obtain a difference value between the first product and the second product;
the calculation module 20 squares the plurality of differences at the plurality of moments and then accumulates the differences, optimizes the accumulation by a least square method and in an iterative mode to obtain a conversion vector of the conversion relation, and converts the data on the inertial sensor coordinate system and the rigid coordinate system into the same coordinate system according to the conversion vector.
For a specific limitation of the rotational gesture alignment apparatus of a dual-ball interactive pen, reference may be made to the above limitation of the rotational gesture alignment method of a dual-ball interactive pen, which is not described herein. The above-mentioned each module in the rotation gesture alignment apparatus of a dual-light ball interactive pen may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
The embodiment of the invention provides a computer readable storage medium, wherein an application program is stored on the computer readable storage medium, and when the application program is executed by a processor, the method for aligning the rotation gesture of the dual-light-ball interaction pen in any one of the embodiments is realized. The computer readable storage medium includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random AcceSS Memory, random access memories), EPROMs (EraSable Programmable Read-Only memories), EEPROMs (Electrically EraSable ProgrammableRead-Only memories), flash memories, magnetic cards, or optical cards. That is, a storage device includes any medium that stores or transmits information in a form readable by a device (e.g., computer, cell phone), and may be read-only memory, magnetic or optical disk, etc.
The embodiment of the invention also provides a computer application program which runs on a computer and is used for executing the rotation gesture alignment method of the double-light-ball interaction pen of any one of the embodiments.
In addition, fig. 5 is a schematic diagram of the structural composition of the computer device in the embodiment of the present invention.
The embodiment of the invention also provides computer equipment, as shown in fig. 5. The computer device includes a processor 502, a memory 503, an input unit 504, a display unit 505, and the like. Those skilled in the art will appreciate that the device architecture shown in fig. 5 does not constitute a limitation of all devices, and may include more or fewer components than shown, or may combine certain components. The memory 503 may be used to store an application 501 and various functional modules, and the processor 502 runs the application 501 stored in the memory 503 to perform various functional applications and data processing of the device. The memory may be internal memory or external memory, or include both internal memory and external memory. The internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, floppy disk, ZIP disk, U-disk, tape, etc. The disclosed memory includes, but is not limited to, these types of memory. The memory disclosed herein is by way of example only and not by way of limitation.
The input unit 504 is used for receiving input of a signal and receiving keywords input by a user. The input unit 504 may include a touch panel and other input devices. The touch panel may collect touch operations on or near the user (e.g., the user's operation on or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a preset program; other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., play control keys, switch keys, etc.), a trackball, mouse, joystick, etc. The display unit 505 may be used to display information input by a user or information provided to the user and various menus of the terminal device. The display unit 505 may take the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 502 is a control center of the terminal device, connects various parts of the entire device using various interfaces and lines, performs various functions and processes data by running or executing software programs and/or modules stored in the memory 503, and invoking data stored in the memory.
As one embodiment, the computer device includes: the device comprises one or more processors 502, a memory 503, one or more application programs 501, wherein the one or more application programs 501 are stored in the memory 503 and configured to be executed by the one or more processors 502, and the one or more application programs 501 are configured to perform a rotation gesture alignment method of a dual-ball interactive pen in any of the above embodiments.
In addition, the method, the device, the computer equipment and the storage medium for aligning the rotation gesture of the dual-light ball interactive pen provided by the embodiment of the invention are described in detail, and specific examples are adopted to illustrate the principle and the implementation of the invention, and the description of the above embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Claims (10)
1. The utility model provides a rotation gesture alignment method of two light ball interaction pen, its characterized in that, the nib of two light ball interaction pen is provided with first infrared reflection ball, the pen tail of two light ball interaction pen is provided with the second infrared reflection ball, be equipped with inertial sensor in the pen body of two light ball interaction pen, the method includes:
acquiring a plurality of first vectors of the rotation gesture of an inertial sensor of the double-light-ball interactive pen relative to an inertial sensor coordinate system at a plurality of moments;
acquiring a plurality of second vectors of the rotation gesture of a two-point rigid body formed by a first infrared reflecting ball and a second infrared reflecting ball of the double-light ball interactive pen relative to a rigid body coordinate system at a plurality of moments;
setting a conversion relation of the inertial sensor coordinate system aligned with the rigid body coordinate system, wherein the conversion relation is an unknown quantity;
acquiring a first product of the conversion relation and the first vector and a second product of the second vector and the conversion relation at each moment in the plurality of moments, and acquiring a difference value of the first product and the second product;
and squaring the plurality of difference values at the plurality of moments, accumulating, optimizing the accumulation by a least square method in an iterative mode to obtain a conversion vector of the conversion relation, and converting the data on the inertial sensor coordinate system and the rigid body coordinate system into the same coordinate system according to the conversion vector.
2. The method of claim 1, wherein the obtaining a plurality of first vectors of rotational gestures of the inertial sensor of the dual-light ball interaction pen relative to an inertial sensor coordinate system at a plurality of moments in time comprises:
and when the rotation angle difference of the inertial sensor of the double-light-ball interaction pen of two continuous frames corresponding to two continuous frames in the plurality of time points is larger than a preset rotation angle threshold value, acquiring a first vector of the rotation gesture of the inertial sensor of the double-light-ball interaction pen of the two continuous frames relative to an inertial sensor coordinate system.
3. The method of claim 1, wherein the obtaining the plurality of second vectors of the rotational pose of the two-point rigid body of the two-light ball interaction pen with respect to the rigid body coordinate system at the plurality of moments comprises:
and when the rotation angle difference of the two point rigid bodies of the two-ball interaction pen of the two continuous frames corresponding to the two continuous frames in the plurality of moments is larger than a preset rotation angle threshold value, acquiring a second vector of the rotation gesture of the two point rigid bodies in the two continuous frames relative to a rigid body coordinate system.
4. The method of claim 1, wherein the plurality of moments comprises respective moments when the dual-light ball-interacting pen is continuously rotated.
5. The method of claim 1, wherein the obtaining a plurality of first vectors of rotational gestures of the inertial sensor of the dual-light ball interaction pen relative to an inertial sensor coordinate system at a plurality of moments in time comprises:
acquiring frame data of the double-light-ball interaction pen acquired at each moment when the double-light-ball interaction pen rotates;
screening first posture data for calculating the rotation posture of the inertial sensor relative to an inertial sensor coordinate system from the frame data at each moment;
and calculating the first vector according to the first gesture data.
6. The method of claim 1, wherein the obtaining the plurality of second vectors of the rotational pose of the two-point rigid body of the two-light ball interaction pen with respect to the rigid body coordinate system at the plurality of moments comprises:
acquiring frame data of the double-light-ball interaction pen acquired at each moment when the double-light-ball interaction pen rotates;
screening second posture data for calculating the rotation posture of the two-point rigid body relative to a rigid body coordinate system from the frame data at each moment;
and calculating the second vector according to the second gesture data.
7. The method according to claim 1, wherein the method further comprises:
acquiring a preset quantity threshold value;
controlling the quantity values of the first vectors and the quantity values of the second vectors according to the preset quantity threshold.
8. The utility model provides a rotatory gesture alignment device of mutual pen of two light balls, its characterized in that, the nib of mutual pen of two light balls is provided with first infrared reflection ball, the pen tail of mutual pen of two light balls is provided with the infrared reflection ball of second, be equipped with inertial sensor in the pen body of mutual pen of two light balls, the device includes:
the first acquisition module is used for acquiring a plurality of first vectors of the rotation gesture of the inertial sensor of the double-light-ball interaction pen relative to an inertial sensor coordinate system at a plurality of moments;
the second acquisition module is used for acquiring a plurality of second vectors of the rotation gesture of the two-point rigid body formed by the first infrared reflecting ball and the second infrared reflecting ball of the double-light ball interaction pen relative to the rigid body coordinate system at a plurality of moments;
the setting module is used for setting a conversion relation of the inertial sensor coordinate system aligned with the rigid body coordinate system, wherein the conversion relation is an unknown quantity;
a third obtaining module, configured to obtain a first product of the conversion relation and the first vector at each of the plurality of moments, and a second product of the second vector and the conversion relation, and obtain a difference value between the first product and the second product;
and the calculation module is used for squaring the plurality of difference values at the plurality of moments and then accumulating, optimizing the accumulation in an iterative mode through a least square method to obtain a conversion vector of the conversion relation, and converting the data on the inertial sensor coordinate system and the rigid coordinate system into the same coordinate system according to the conversion vector.
9. A computer device comprising a memory, a processor and an application stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 7 when the application is executed by the processor.
10. A computer readable storage medium having stored thereon an application program, wherein the application program, when executed by a processor, implements the steps of the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110115640.7A CN112947772B (en) | 2021-01-28 | 2021-01-28 | Rotation gesture alignment method and device of double-light-ball interaction pen and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110115640.7A CN112947772B (en) | 2021-01-28 | 2021-01-28 | Rotation gesture alignment method and device of double-light-ball interaction pen and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112947772A CN112947772A (en) | 2021-06-11 |
CN112947772B true CN112947772B (en) | 2024-03-08 |
Family
ID=76238439
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110115640.7A Active CN112947772B (en) | 2021-01-28 | 2021-01-28 | Rotation gesture alignment method and device of double-light-ball interaction pen and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112947772B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004045385A (en) * | 2002-05-16 | 2004-02-12 | Furuno Electric Co Ltd | Attitude detection device of moving body |
CN101989682A (en) * | 2010-07-21 | 2011-03-23 | 中国科学院国家天文台南京天文光学技术研究所 | Antenna reflection surface fitting method |
CN106526639A (en) * | 2016-11-08 | 2017-03-22 | 西安科技大学 | Coordinate conversion method with introduced reference rotation center |
WO2017164706A1 (en) * | 2016-03-24 | 2017-09-28 | Samsung Electronics Co., Ltd. | Electronic device and method for providing information in electronic device |
CN109443200A (en) * | 2018-10-18 | 2019-03-08 | 广东电网有限责任公司 | A kind of mapping method and device of overall Vision coordinate system and mechanical arm coordinate system |
CN209928401U (en) * | 2019-06-12 | 2020-01-10 | 江苏域圆智能科技有限公司 | Wireless interactive pen and holographic desktop type three-dimensional induction equipment |
CN111177643A (en) * | 2019-12-03 | 2020-05-19 | 浙江大学 | Three-dimensional coordinate conversion method |
-
2021
- 2021-01-28 CN CN202110115640.7A patent/CN112947772B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004045385A (en) * | 2002-05-16 | 2004-02-12 | Furuno Electric Co Ltd | Attitude detection device of moving body |
CN101989682A (en) * | 2010-07-21 | 2011-03-23 | 中国科学院国家天文台南京天文光学技术研究所 | Antenna reflection surface fitting method |
WO2017164706A1 (en) * | 2016-03-24 | 2017-09-28 | Samsung Electronics Co., Ltd. | Electronic device and method for providing information in electronic device |
CN106526639A (en) * | 2016-11-08 | 2017-03-22 | 西安科技大学 | Coordinate conversion method with introduced reference rotation center |
CN109443200A (en) * | 2018-10-18 | 2019-03-08 | 广东电网有限责任公司 | A kind of mapping method and device of overall Vision coordinate system and mechanical arm coordinate system |
CN209928401U (en) * | 2019-06-12 | 2020-01-10 | 江苏域圆智能科技有限公司 | Wireless interactive pen and holographic desktop type three-dimensional induction equipment |
CN111177643A (en) * | 2019-12-03 | 2020-05-19 | 浙江大学 | Three-dimensional coordinate conversion method |
Non-Patent Citations (1)
Title |
---|
基于刚体运动学的坐标系配准理论及算法;耿娜;邾继贵;劳达宝;叶声华;;传感技术学报(第08期);第1088-1092页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112947772A (en) | 2021-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102436300B1 (en) | Locating element detection method, apparatus, device and medium | |
US8941587B2 (en) | Method and device for gesture recognition diagnostics for device orientation | |
CN110322500A (en) | Immediately optimization method and device, medium and the electronic equipment of positioning and map structuring | |
CN109829368B (en) | Palm feature recognition method and device, computer equipment and storage medium | |
US20130120250A1 (en) | Gesture recognition system and method | |
US20220319050A1 (en) | Calibration method and apparatus, processor, electronic device, and storage medium | |
US20170068440A1 (en) | Touch sensor gesture recognition for operation of mobile devices | |
CN103679788A (en) | 3D image generating method and device in mobile terminal | |
CN110349212A (en) | Immediately optimization method and device, medium and the electronic equipment of positioning and map structuring | |
CN113963158A (en) | Palm vein image region-of-interest extraction method and device | |
US20170131785A1 (en) | Method and apparatus for providing interface interacting with user by means of nui device | |
CN116051600A (en) | Optimizing method and device for product detection track | |
CN111240468B (en) | Calibration method and device for hand motion capture, electronic equipment and storage medium | |
WO2018076720A1 (en) | One-hand operation method and control system | |
CN105389812A (en) | Computer vision-based vehicle-mounted information terminal function automatic test method | |
CN113867562B (en) | Touch screen point reporting correction method and device and electronic equipment | |
CN112947772B (en) | Rotation gesture alignment method and device of double-light-ball interaction pen and computer equipment | |
CN112087728B (en) | Method and device for acquiring Wi-Fi fingerprint spatial distribution and electronic equipment | |
US10599225B2 (en) | Projection-based user interface | |
US20150346995A1 (en) | Electronic apparatus and method | |
CN112488016A (en) | Multi-angle face recognition method and application | |
KR101593950B1 (en) | Apparatus for hand gesture based interface and pointing method using the same | |
CN108073283B (en) | Hand joint calculation method and glove | |
CN113268149B (en) | Rigid body pose determining method and device of double-light ball interactive pen and computer equipment | |
CN112433629B (en) | Rigid body posture determination method and device of double-light-ball interactive pen and computer equipment |
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 |