WO2013029302A1 - 空中鼠标及控制鼠标指针移动的方法与装置 - Google Patents

空中鼠标及控制鼠标指针移动的方法与装置 Download PDF

Info

Publication number
WO2013029302A1
WO2013029302A1 PCT/CN2011/081624 CN2011081624W WO2013029302A1 WO 2013029302 A1 WO2013029302 A1 WO 2013029302A1 CN 2011081624 W CN2011081624 W CN 2011081624W WO 2013029302 A1 WO2013029302 A1 WO 2013029302A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
mouse
sensitive axis
mouse pointer
movement
Prior art date
Application number
PCT/CN2011/081624
Other languages
English (en)
French (fr)
Inventor
龙涛
刘正东
龙江
唐元浩
严松
Original Assignee
江苏惠通集团有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 江苏惠通集团有限责任公司 filed Critical 江苏惠通集团有限责任公司
Publication of WO2013029302A1 publication Critical patent/WO2013029302A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing 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

Definitions

  • the present invention relates to the field of positioning technologies, and in particular, to an air mouse and a method and apparatus for controlling movement of a mouse pointer. Background technique
  • the positioning of computer mouse pointers is mostly realized by optical sensors or laser sensors. These sensors are based on physical optics, so that the sensors need to rely on platforms such as desktops.
  • users want to manipulate the mouse pointer in the air or manipulate the mouse pointer in the air to realize multimedia TV playback, web browsing and other applications, which can only be achieved by using traditional sensors, so the air mouse It came into being.
  • the air mouse is an input device that operates the screen cursor (mouse pointer) like a traditional mouse, but does not need to be placed on any plane. In the air, it can directly control the mouse pointer by relying on the perception of the air movement posture.
  • the inertial device is generally set in the air mouse, and the inertial device measurement technology is used to track the posture of the motion carrier.
  • the use of inertial device measurement technology to track the motion carrier attitude has a very broad prospect.
  • the basic principle of the inertial tracking system is to measure the angular velocity and linear acceleration of the motion of the object by inertial devices such as gyro sensors and acceleration sensors based on the known initial position and attitude of the target, and then obtain the position of the object by integration. attitude.
  • the basic principle of the gyroscope is the directional instrument manufactured by using the high angular rotation of the object and the strong angular momentum to make the rotating shaft stably point to one direction.
  • Accelerometer technology is a combination of inertia and force detection, currently in automotive electronics and There are many applications in the consumer electronics field.
  • the acceleration sensor collects the acceleration signal of the moving object in real time, and obtains the trajectory of the motion to realize the positioning by the second-order integral.
  • the self-attitude of the current device can be obtained by analyzing the gravity acceleration of the sensor device itself.
  • the mouse report rate also known as the 4 report rate, is an important indicator of mouse performance.
  • the unit of the report rate is Hz, which reflects the mouse to the system within one second (usually refers to A computer system, which may also refer to a device that includes a computer system, such as a computer, digital television, projector, etc., transmits data (which generally refers to the amount of change in coordinates or coordinates used for positioning of the mouse pointer), ie, one second.
  • a normal USB interface mouse can achieve a report rate of up to 125 Hz, while a PS/2 interface mouse can only be between 40 Hz and 90 Hz, most of which is about 60 Hz.
  • an air mouse since it transmits data to the system (to control the movement of the mouse pointer), it is usually transmitted by a radio frequency module to transmit a wireless signal, and the power consumption per transmission is large, and the unit time is The more times the data is transmitted to the system, the greater the power consumption, which reduces the standby time of the air mouse (shortening the life and requiring the battery to be replaced at a higher frequency).
  • the reporting rate of the air mouse is usually preset. When the user uses the air mouse to control the movement of the mouse pointer, the data can only be output at a fixed reporting rate, and it is difficult to dynamically adjust the reporting rate according to the actual motion of the air mouse. .
  • the air mouse needs to determine the change of its spatial coordinates, and divides the change of the spatial coordinates by a certain sensitivity coefficient to obtain the coordinate change of the mouse pointer, thereby realizing the control of the mouse pointer.
  • the gyro sensor measures the angular velocity of the sensitive axis and then uses the integral operation to obtain the tilt angle to determine the spatial coordinate change of the air mouse, or the acceleration sensor passes the anti-triangle by measuring the acceleration component of each sensitive axis.
  • Function calculations to obtain the tilt angle to determine the spatial coordinate changes of the air mouse require complex operations (integral operations, inverse trigonometric functions, etc.), and most of these operations involve floating-point operations, which are used for processing control in the air mouse.
  • a microcontroller if an MCU with relatively weak processing power is selected, due to its limited processing capability, it requires a lot of resources in performing complicated and large-scale operations, resulting in processing speed. Slower, it is difficult to make the air mouse output data at a higher reporting rate, and it has higher power consumption. If a more powerful MCU is selected, the cost will increase.
  • a related art is also referred to the International Patent Application Publication No. WO2005108119 (A2), which discloses a free space locating device with tilt compensation and improved usability. Summary of the invention
  • the problem to be solved by the present invention is that it is difficult in the prior art to dynamically adjust the report rate according to the actual motion of the air mouse to control the movement of the mouse pointer.
  • the technical solution of the present invention provides a method for controlling movement of a mouse pointer, wherein the movement of the mouse pointer is controlled by an air mouse, the air mouse includes at least one inertial device, and the inertial device includes a gravity acceleration sensor.
  • the method for controlling the movement of the mouse pointer includes: setting a vector of an acceleration output value of each sensitive axis of the gravity acceleration sensor and setting a dot rate of the air mouse;
  • the determined spatial coordinates or the amount of change thereof are converted into the coordinates of the mouse pointer or the amount of change thereof; the coordinates of the mouse pointer or the amount of change thereof are output at a set report rate to control the movement of the mouse pointer.
  • the vector based on the acceleration output value and the report rate of setting an air mouse include: setting an acceleration range of multiple grades in order from small to large, and the acceleration range of each grade corresponds to one report point.
  • the setting range of the rate determines the setting range of the corresponding reporting rate according to the vector of the acceleration output value and the grade of the acceleration range, and the higher the grade of the acceleration range, the more the corresponding reporting rate is set. high.
  • the determining the spatial coordinates of the air mouse comprises: establishing a correspondence between an index value and a parameter of the sensitive axis, the index value corresponding to the measured value of the sensitive axis of the inertial device, the sensitive axis
  • the parameters include the tilt of the sensitive axis of the inertial device a bevel angle and a value of the trigonometric function and/or a coordinate value of the sensitive axis of the inertial device determined based on a tilt angle of the sensitive axis; obtaining a measured value of each sensitive axis of the inertial device;
  • the spatial relationship of the aerial mouse is determined by querying the correspondence based on an index value corresponding to the acquired measurement value.
  • the parameter of the sensitive axis includes a coordinate value of the sensitive axis of the inertial device determined based on a tilt angle of the sensitive axis; and the corresponding relationship is determined based on an index value corresponding to the acquired measured value, and determining
  • the spatial coordinates of the air mouse include:
  • the spatial coordinates of the air mouse are determined based on the coordinate values of the sensed sensitive axes of the inertial device.
  • the parameter of the sensitive axis includes a tilt angle of the sensitive axis of the inertial device and a trigonometric function value thereof; and the corresponding relationship is queried based on an index value corresponding to the acquired measured value, and determining the air mouse Spatial coordinates include:
  • the spatial coordinates of the aerial mouse are determined based on the tilt angle of the sensed inertial axis of the inertial device and its trigonometric function value.
  • the configuration of the parameters of the sensitive axis in the correspondence relationship is determined by gradually decreasing the segmentation accuracy according to the slope corresponding to the tilt angle.
  • the trigonometric function value of the tilt angle corresponding to the index value is expanded by a predetermined multiple and taken
  • the determining the spatial coordinates of the air mouse further includes determining a spatial coordinate of the air mouse with a stable sensitive axis; determining whether the sensitive axis is stable comprises: if the number of different index values in the buffer area is less than or equal to the first And the threshold value is determined, and the difference between the index values is less than or equal to the second threshold, determining that the sensitive axis is stable; and the buffer area stores an index value obtained every predetermined time.
  • the method for controlling movement of the mouse pointer further includes: determining the sensitive axis by multiple consecutive numbers The index value obtained after the stabilization identifies the motion trend of the air mouse, and if the motion trend is a linear motion, the report rate of the air mouse is lowered.
  • the determining, by the plurality of consecutively determining the index values obtained after the sensitive axis is stable, identifying the motion trend of the air mouse includes: if the difference between any two consecutive index values is less than or equal to the third threshold, identifying the The trend of motion is linear motion.
  • the method for controlling movement of the mouse pointer further comprises: performing interpolation operations on spatial coordinates of at least two consecutively determined null mice.
  • the performing the interpolation operation comprises: if the motion trend is a linear motion, performing a linear interpolation operation, otherwise performing a parabolic interpolation operation.
  • the gravity acceleration sensor is a capacitive gravity acceleration sensor
  • the measured value is a capacitance value of a sensitive axis of the capacitive gravity acceleration sensor.
  • the inertial device further includes a gyro sensor, and the measured value is a voltage value of a sensitive axis of the gyro sensor.
  • the gravity acceleration sensor comprises at least two mutually perpendicular sensitive axes, one of which is perpendicular to the ground plane.
  • the technical solution of the present invention further provides a device for controlling movement of a mouse pointer, wherein the air mouse includes at least one inertial device, and the inertial device includes a gravity acceleration sensor.
  • the device for controlling the movement of the mouse pointer comprises: a report point rate setting unit, configured to set a rate of the acceleration output value of each sensitive axis of the gravity acceleration sensor and set a report rate of the air mouse;
  • a coordinate determining unit configured to determine a spatial coordinate of the air mouse
  • a conversion unit configured to convert the determined spatial coordinate or the amount of change thereof into a coordinate of the mouse pointer or a variation thereof
  • a control unit configured to output the coordinates of the mouse pointer or a variation thereof at a set report rate to control the movement of the mouse pointer.
  • the technical solution of the present invention further provides an air mouse including the above device for controlling movement of a mouse pointer.
  • the technical solution has at least the following advantages:
  • the spatial coordinates of the determined air mouse or the amount of change thereof are converted into the coordinates of the mouse pointer or the amount of change thereof by the vector of the acceleration output value of each sensitive axis based on the gravity acceleration sensor and the report rate of the air mouse. And outputting the coordinates of the mouse pointer or the amount of change thereof at the set report rate to control the movement of the mouse pointer, thereby dynamically adjusting the report rate according to the actual movement condition of the air mouse, so that the air mouse has a large acceleration.
  • the data is output at a higher reporting rate, ensuring that the movement of the mouse pointer is smooth and smooth, and outputting data at a lower reporting rate in the case of less acceleration motion, reducing power consumption.
  • the corresponding relationship is queried based on the index value corresponding to the measured value, and the tilt angle corresponding to the index value and its trigonometric function value and/or can be quickly obtained.
  • Determining the coordinate value of the sensitive axis of the inertial device based on the tilt angle of the sensitive axis thereby quickly determining the spatial coordinates of the air mouse, thereby avoiding complicated and large amounts of calculations (integral operations, inverse trigonometric functions, etc.)
  • the processing speed can be increased, so that the air mouse can output data at a higher reporting rate and reduce power consumption.
  • FIG. 1 is a schematic flow chart of a method for controlling movement of a mouse pointer according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of determining spatial coordinates according to a tilt angle of a sensitive axis
  • 3 is a schematic flow chart of a method for determining spatial coordinates of an air mouse according to Embodiment 1 of the present invention
  • FIG. 4 is a schematic diagram showing the accuracy of the tilt angle of the tilt angle index table in the first embodiment of the present invention
  • FIG. 5 is a schematic diagram of the spatial pose recognition after the gravity acceleration sensor is turned on according to the first embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of an apparatus for controlling movement of a mouse pointer according to Embodiment 1 of the present invention
  • FIG. 7 is a schematic structural diagram of a coordinate determining unit 20 shown in FIG. 6
  • FIG. 8 is a schematic diagram of controlling movement of a mouse pointer according to Embodiment 2 of the present invention
  • FIG. 9 is a schematic structural view of the coordinate determining unit 60 shown in FIG. 8
  • FIG. 10 is a schematic diagram of a linear interpolation operation
  • FIG. 11 is a schematic diagram of a parabolic interpolation operation
  • FIG. 12 is a schematic structural diagram of an apparatus for controlling movement of a mouse pointer according to Embodiment 3 of the present invention.
  • an air mouse can only output data at a fixed reporting rate, and it is difficult to dynamically adjust the reporting rate according to the actual motion of the air mouse to control the movement of the mouse pointer.
  • the technical solution converts the determined spatial coordinates of the air mouse or the amount of change thereof into the coordinates of the mouse pointer or the change thereof by using the vector of the acceleration output value of each sensitive axis of the gravity acceleration sensor and setting the reporting rate of the air mouse.
  • FIG. 1 is a schematic flow chart of a method for controlling movement of a mouse pointer according to an embodiment of the present invention.
  • the movement of the mouse pointer is controlled by using an air mouse
  • the air mouse includes at least one inertial device
  • the inertial device includes a gravity acceleration sensor. As shown in FIG.
  • the method for controlling the movement of the mouse pointer includes: Step S10, based on the vector of the acceleration output value of each sensitive axis of the gravity acceleration sensor and setting the reporting rate of the air mouse; Step S20, determining the spatial coordinate of the air mouse; Step S30, determining the determined spatial coordinate or The amount of change is correspondingly converted into the coordinates of the mouse pointer or the amount of change thereof; Step S40, the coordinates of the mouse pointer or the amount of change thereof are output at a set report rate to control the movement of the mouse pointer.
  • the air mouse includes at least one inertial device, the inertial device includes a gravity acceleration sensor, and further, the gravity acceleration sensor is a capacitive gravity acceleration sensor, which includes at least two perpendicular to each other. Sensitive axis, one of which is perpendicular to the ground plane.
  • a three-axis gravity acceleration sensor is generally selected, and the sensitive axis perpendicular to the ground plane is recorded as the z-axis, and the other two sensitive axes are perpendicular to each other and perpendicular to the z-axis, respectively recorded as the X-axis and the y-axis.
  • the plane formed by the X and y axes is parallel to the ground plane.
  • any two axes of the three axes can be used to achieve the required requirements (determining the coordinates in the two-dimensional coordinate system), for example, selecting The X-axis and the Z-axis (the plane formed by the X-axis and the Z-axis are parallel to the screen), although three-dimensional dynamics are realized in space, and only two-dimensional coordinates are required on the screen, so this embodiment is not used yet.
  • Y axis The X-axis and the Z-axis.
  • the three-dimensional dynamic effect of the screen can be processed (for example, the control of the mouse in the 3D game), and the y-axis can also be used as the calibration of the other two-axis data.
  • Force acceleration also known as free fall acceleration
  • g usually g is a constant, typically 9.8 m/s 2
  • the acceleration output value of the sensitive axis of the gravity acceleration sensor is usually expressed as a multiple of the gravitational acceleration g (acceleration with g as reference), such as 0.5g, lg, 2g, 2.5g, 3.8g, etc., and because the acceleration is a vector
  • the acceleration output value of the sensitive axis of the gravity acceleration sensor is also indicated by a sign, such as 0.5g, -0.5g, 2.5g, -2.5g, and the like.
  • the motion in a certain period of time can be divided into acceleration motion, deceleration motion, and uniform motion.
  • various motion conditions can be reflected as each sensitive axis.
  • the magnitude of the vector sum of the acceleration output values for example, when the vector sum of the acceleration output values is 2g, it means that the air mouse accelerates with an acceleration of 2g, when the vector sum of the acceleration output values is -2g , the air mouse is decelerated with an acceleration of 2g.
  • the vector sum of the acceleration output values is 0 or close to 0, the air mouse is used for uniform motion.
  • the data ensures that the movement of the mouse pointer is smooth and smooth.
  • step S10 is performed to set the report rate of the air mouse based on the vector of the acceleration output values of the respective sensitive axes of the gravity acceleration sensor.
  • the setting the reporting rate of the air mouse based on the acceleration output value specifically includes: setting acceleration ranges of multiple grades in order from small to large, and the acceleration range of each grade corresponds to setting of a reporting rate.
  • the range determines a set range of the corresponding report rate according to the vector of the acceleration output value and the grade of the acceleration range, and the higher the grade of the acceleration range, the higher the setting of the corresponding report rate.
  • the third acceleration range is set in order from the absolute value of the acceleration to the absolute value of the acceleration, and the acceleration range of each grade corresponds to a setting range of the reporting rate, respectively: the first acceleration range is 0 ⁇ 2g. (including 2g), the corresponding reporting rate setting range is 50 ⁇ 60Hz; The second acceleration range is 2g ⁇ 4g (including 4g), and the corresponding report rate setting range is 80 ⁇ 100Hz; the third gear acceleration range is 4g or more, and the corresponding 4 ⁇ point rate setting range is 120 ⁇ 150Hz.
  • the third-speed acceleration range is generally 4g ⁇ 8g in actual implementation. As for the case of more than 8g, the probability of occurrence is generally small, so it is combined in the third-speed acceleration range, and, in addition, 120 ⁇ 150Hz
  • the setting range of the reporting rate is already relatively high, and basically meets the purpose of controlling the smooth movement of the mouse pointer.
  • the absolute value of the acceleration output value is used to define the grade of the acceleration range, for example, a sensitive axis.
  • the acceleration output value is -2.5g, and its absolute value is 2.5g, which should be in the second acceleration range (2g ⁇ 4g).
  • the acceleration ranges of different grades may also be set according to actual conditions (for example, according to the expected output range of the acceleration output value), and the range of the corresponding report rate is set for the acceleration range of each grade.
  • the vector of the acceleration output value and the grade of the acceleration range can be determined, and then the corresponding position is determined according to the grade of the acceleration range.
  • the setting range of the reporting rate it is necessary to select a value of one of the report rate from the set range of the report rate in advance, and after recognizing the motion of the air mouse by the vector of the acceleration output value of the sensitive axis, Then switch to the report rate that is appropriate for the current motion situation.
  • step S20 is also performed to determine the spatial coordinates of the air mouse.
  • the determined spatial coordinate or spatial coordinate change amount can be converted into the coordinate of the mouse pointer or the coordinate change of the mouse pointer, and then the set report
  • the dot rate outputs the coordinates of the mouse pointer or the coordinate change of the mouse pointer to control the movement of the mouse pointer.
  • the key to determining the spatial coordinates of the air mouse is usually the measurement of the tilt angle by the gravitational acceleration sensor.
  • the gravity acceleration sensor uses gravity as an input vector to determine the direction of the object in space, and the tilt angle is the angle between gravity and its sensitive axis. When gravity is perpendicular to its sensitive axis, it is most sensitive to tilting. Its sensitivity is highest in the azimuth.
  • each tilt of 1 degree causes a change in output acceleration.
  • the following is a brief introduction to the principle of the gravity acceleration sensor for measuring the tilt angle. Since the direction of gravity is constant, it is always perpendicular to the plane downward.
  • the acceleration can be obtained by a trigonometric function based on the measured acceleration of the sensitive axis.
  • the relationship between the tilt angles for example in the case of a single sensitive axis (X-axis):
  • a x g n *cosP
  • the tilt angle can also be calculated by other inverse trigonometric functions. If there are multiple sensitive axes, the spatial coordinates can be determined according to the inclination angle formed by each sensitive axis and gravity and the acceleration component of each sensitive axis. 2 is a schematic diagram of determining spatial coordinates based on the tilt angle of the sensitive axis.
  • the original coordinate axis data is X, Y, ⁇
  • the change is XI, Yl, Zl
  • the inclination angle of the ⁇ axis is ⁇
  • Zl Z*cosa+X*sina
  • the spatial coordinates of the change can also be determined by the tilt angle X of the X-axis.
  • the tilt angle is calculated according to the measured acceleration output values of the respective sensitive axes, and an inverse trigonometric function operation is required, and the computer is very expensive when performing the inverse trigonometric function operation.
  • the processing speed is slow due to their limited processing power, which in turn leads to slower determination of spatial coordinates, which makes it difficult to make the air mouse have a higher reporting rate.
  • Output data especially when the air mouse is moving at a large acceleration, if the data cannot be output at a higher reporting rate, the movement trajectory of the mouse pointer is difficult to achieve a smooth and smooth effect, which seriously affects the positioning of the mouse pointer.
  • FIG. 3 is a schematic flowchart of a method for determining spatial coordinates of an air mouse according to Embodiment 1 of the present invention. As shown in FIG.
  • the method for determining spatial coordinates of an air mouse includes: Step S101: Establishing an index value and a sensitive axis Corresponding relationship between parameters, the index value corresponding to the measured value of the sensitive axis of the inertial device, the parameter of the sensitive axis including the tilt angle of the sensitive axis of the inertial device and its trigonometric function value and/or Determining a coordinate value of the sensitive axis of the inertial device based on the tilt angle of the sensitive axis; Step S102, acquiring a measured value of each sensitive axis of the inertial device; Step S103, based on an index corresponding to the acquired measured value The value queries the correspondence, and determines the spatial coordinates of the air mouse.
  • the above problem can be solved by establishing a correspondence between the index value and the tilt angle of the sensitive axis of the inertial device (the gravity acceleration sensor in this embodiment) and the value of the trigonometric function, that is, the step S101
  • the parameters of the sensitive axis include the tilt angle of the sensitive axis of the inertial device and its trigonometric function value.
  • a correspondence relationship between the index value and the tilt angle of the sensitive axis of the gravity acceleration sensor and the value of the trigonometric function thereof is established, and the index value corresponds to the measured value of each sensitive axis of the inertial device.
  • the capacitive gravity acceleration sensor converts the measured acceleration into the capacitance change of the capacitor, the measured capacitance value is different from the value reflected in the register, so the capacitance actually measured according to the sensitive axis at different accelerations can be used.
  • the range of values or capacitance values sets the value in its corresponding register and establishes a correspondence with the tilt angle at this time and its trigonometric function value. For example, when the value in the register is 1, the corresponding tilt angle is 2.69. Degree, the sine value of 2.69 degrees is about 0.046932, and the cosine value of 2.69 degrees is about 0.99898, and the correspondence is stored in a read-only memory (ROM, Read-Only Memory) in the form of a table.
  • ROM Read-Only Memory
  • step S101 is specifically in the above register. Value (the cartridge is called the register value).
  • step S102 is performed to acquire the measured values of the respective sensitive axes of the inertial device, wherein the measured value Specifically, it is the measured capacitance value, and then the MCU can read the register value corresponding to the measured capacitance value from the register.
  • the tilt angle index table is queried based on the register value, and the tilt angle corresponding to the register value and the trigonometric function value thereof can be directly obtained by the corresponding relationship, and based on the slanted query
  • the angle and its trigonometric function determine the coordinate value of the sensitive axis of the gravitational acceleration sensor, thereby determining the spatial coordinate of the air mouse to achieve the positioning thereof, that is, performing step S103, querying based on the index value corresponding to the acquired measurement value
  • the correspondence relationship determines the spatial coordinates of the air mouse.
  • the deflection of the sensitive axis is required ( The deflection produces a tilt angle. It is divided into four different quadrants. The range of the tilt angle in each quadrant ranges from 0 to 90 degrees. Different angle values correspond to different trigonometric values. The most important one is the segmentation accuracy.
  • the tilt angle in the correspondence relationship (tilt angle index table) is configured.
  • the segmentation accuracy needs to be configured in consideration of the application requirements, such as 0.5 degrees or 0.1 degrees, and the higher segmentation accuracy can ensure the accuracy of the subsequently determined spatial coordinates.
  • the higher the segmentation accuracy the more the number of tilt angles in the tilt angle index table, the larger the amount of data storage, and the higher requirements for the MCU, such as when the segmentation accuracy of the tilt angle is accurate to 0.1 degrees.
  • the arrangement of the tilt angle and the trigonometric function value in the tilt angle index table is determined by gradually decreasing the segmentation accuracy in descending order of the slope corresponding to the tilt angle (the configuration of determining the tilt angle determines the Configuration of trigonometric values).
  • 4 is a schematic diagram showing the division precision of the inclination angle in the inclination angle index table according to the first embodiment of the present invention. As shown in Fig. 4, the sine value corresponding to the inclination angle of 0 to 90 degrees is taken as an example, and the slope of the point A is larger than the point B, so that the sine value corresponding to the point A is changed under the same division accuracy. Be larger than the corresponding sine value change near point B.
  • the cutting precision is set relatively high, and the segmentation precision of the corresponding tilt angle near the B point is set relatively low.
  • a plurality of angles and a trigonometric value are stored in the range of the inclination angle of 0 to 45 degrees.
  • the tilt angle index table (the partitioning precision is relatively high), and at 45 to 90 degrees, a few angles are selected and the trigonometric function value is stored in the tilt angle index table (the partitioning precision is relatively low), so that it can be certain To the extent, it not only ensures the accuracy of the spatial coordinates determined subsequently, but also reduces the storage space and running speed requirements of the MCU. Still referring to FIG.
  • the configuration of the tilt angle and the trigonometric function value in the tilt angle index table is determined according to the slope of the tilt angle correspondingly decreasing stepwise, that is, the tilt angle is from 0.
  • the degree is 90 degrees
  • the corresponding slope gradually becomes smaller, and the difference between the tilt angles stored in the tilt angle index table is larger and larger (the larger the difference between the angles, the lower the segmentation precision), for example
  • the tilt angle is from 0 to 90 degrees.
  • the initial selection is 0 degree, 2.69 degrees, 5.38 degrees, 8.08 degrees, 10.81 degrees.
  • the division accuracy is 2.69 degrees ( 2.69 degrees - 0 degrees) and 2.69 degrees ( 5.38 degrees - 2.69 degrees respectively).
  • the manner of determining the inclination angle and the value of the trigonometric function in the inclination angle index table is only a basic selection of the inclination angle by gradually decreasing the slope corresponding to the inclination angle corresponding to the inclination angle.
  • the configuration of the tilt angle and its trigonometric function value in the tilt angle index table can be determined according to the actual situation. As shown in the following table, Table 1 is determined after multiple measurements according to the actual situation. An example of a tilt angle index table. Table 1 Trigonometric function values
  • Table 1 the angle values of the 23 tilt angles selected from 0 degrees to 90 degrees are listed.
  • the angle value of each tilt angle corresponds to an index value, which is 0 ⁇ 22.
  • the two endpoints of 0 degrees and 90 degrees are generally required for any one of the tilt angle index tables, and the tilt angle between 0 degrees and 90 degrees can be as large as the slope corresponding to the tilt angle described above.
  • the small order gradually reduces the basic principle of segmentation accuracy and is determined by the actual situation.
  • the method is to expand the trigonometric function value of the tilt angle corresponding to the index value by a predetermined multiple and round it up to be stored in the tilt angle index table.
  • the trigonometric value of the tilt angle corresponding to the index value includes a sine value (sin) and a cosine value (cos), wherein the sine value has two columns, and the left column is the tilt angle corresponding to the index value.
  • the sine value After the sine value is expanded by 10000 times, it is rounded up.
  • the right column is rounded up by enlarging the sine value of the tilt angle corresponding to the index value by 100 times.
  • the cosine value has two columns, and the left column is the tilt angle corresponding to the index value.
  • the cosine value is expanded by 10000 times and rounded up.
  • the right column is rounded up by enlarging the cosine of the tilt angle corresponding to the index value by 100 times.
  • the predetermined predetermined multiple of the expansion may be set according to actual needs.
  • the predetermined multiple of the expansion of the trigonometric function value should be set large, and if the calculation accuracy is relatively low, the The predetermined multiple that expands the value of the trigonometric function is set relatively small.
  • the larger the predetermined multiple of the expansion of the trigonometric function value the greater the amount of computation that the MCU needs to perform.
  • the trigonometric function value of the tilt angle corresponding to the index value may be used to participate in the floating point operation.
  • the above-mentioned query process for the tilt angle index table can be implemented by a binary search method, and the binary search method is a commonly used method in the prior art, and details are not described herein again.
  • the method for determining the spatial coordinates of the air mouse further includes determining the spatial coordinates of the air mouse by determining whether the sensitive axis is stable, the tilt angle obtained by the stable sensitive axis, and the trigonometric function value thereof. Value. Since the stability of each sensitive axis of the air mouse may not be the same in a specific implementation, the corresponding tilt angles are different, thereby generating values of different spatial coordinates, and thus it is required to be stable based on The value of the trigonometric function corresponding to the tilt angle obtained by the sensitive axis determines the value of the spatial coordinate.
  • the following methods can be used: If the index value is different in the buffer area The quantity is less than or equal to the first threshold, and the difference (absolute value) between the index values is less than or equal to the second threshold, determining that the sensitive axis is stable; the buffer area is acquired every predetermined time Index value.
  • the index value in the register also changes, and the index value read in the predetermined time is stored in a buffer area, which can be analyzed in the buffer area. The data determines whether the sensitive axis is stable.
  • the first threshold may be 3, and the second threshold may be 2, that is, when the number of different index values of a sensitive axis in the buffer area is less than or equal to 3, and the difference between each index value is less than or equal to 2 , to determine that the sensitive axis is stable.
  • the index values of the X-axis in the buffer area are: 22, 22, 22, 21, 21, 20, 20, 20, 19, 19, 18, 18, 17, 17, and the z-axis is in the buffer area.
  • the index values in the range include: 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3.
  • the difference between the index values in this embodiment refers to the absolute value of the difference between the index values.
  • the data (index value) in the buffer area can also be used to determine the pause, such as when the positive, negative or maximum index value and the minimum index value are less than a certain number, the automatic detection is that the sensing device is in a pause state.
  • the pause state is also a kind of steady state.
  • the sensitive axis is unstable, it will return to the previous index value, but as long as the pause is reached, the gravity acceleration sensor will be considered stable, and the acceleration change will be detected immediately and converted into space coordinates.
  • the mouse Once stable, the mouse is detected. It will move diagonally above. Because as long as stability is detected (if there is a pause), the gravity acceleration sensor will output the correct value. In real life, when holding the air mouse for control, it is impossible to always be in an unstable (such as obliquely upward) motion state. If there is a pause or the detection of the data in the buffer area determines that the sensitive axis is stable, the output will be correct. The index value does not return the index value that was previously stable.
  • the deflection of the sensitive axis (the deflection produces the tilt angle) into four different quadrants (representing the quadrant where the tilt angle generated by the deflection), and the tilt angle in each quadrant.
  • the range is from 0 to 90 degrees, and different angle values correspond to different trigonometric values, with the same
  • the obtained trigonometric function value has positive and negative points, and the corresponding index value also has positive and negative points. Therefore, in this embodiment, after the gravity acceleration sensor is turned on, the spatial posture of the air mouse can also be determined based on the index value and the direction perpendicular to the sensitive axis (z axis) of the ground plane.
  • the spatial attitude specifically refers to whether the air mouse is holding, reversing, deflecting, and which direction is biased.
  • the air mouse may be determined according to whether the index value is greater than zero, equal to zero, or less than zero, and the value indicating that the z-axis direction is less than zero (direction is upward) or greater than zero (direction is downward, and the direction of gravity is positive) Space pose.
  • the value indicating the z-axis direction can be obtained by averaging the value (index value) of the data in the buffer area and determining it.
  • the buffer area stores an index value obtained every predetermined time. By analyzing the index value in the buffer area, it can be determined whether the sensitive axis is stable.
  • the data (index value) in the buffer area is set to 14, if the 14 data are all positive or negative, and the value of the data in the buffer area does not exceed 3 different, and the difference is not greater than At 2 o'clock, it is judged that the current sensitive axis is stable.
  • the value of the data in the buffer area may be averaged. If the mean value is a positive number, the output is 1. If the average value is a negative number, the output is -1, and the output 1 or -1 is the z-axis direction. Value. In particular, if the value of the data in the buffer area is all positive and it is judged that the sensitive axis is stable, it is sure to output 1, if it is all negative and it is judged that the sensitive axis is stable, it is definitely -1.
  • Fig. 5 is a schematic diagram showing the spatial attitude recognition after the gravity acceleration sensor is turned on according to the first embodiment of the present invention.
  • the spatial posture of the air mouse can be identified according to the index value and the value indicating the direction of the z-axis, specifically:
  • index value is equal to zero (no deflection) and the value indicating the z-axis direction is less than zero, it is recognized as being taken; if the index value is equal to zero (no deflection) and the value indicating the z-axis direction is greater than zero, it is recognized as a reverse; If the value is less than zero (with deflection) and the value in the Z-axis direction is less than zero, it is recognized as the first quadrant, and the calculation of the space coordinate is (take the X-axis tilt angle ⁇ as an example):
  • index value is less than zero (with deflection) and the value indicating the z-axis direction is greater than zero, it is recognized as the second quadrant, and the spatial coordinate is calculated as (take the X-axis tilt angle ⁇ as an example):
  • index value is greater than zero (with deflection) and the value indicating the z-axis direction is less than zero, it is recognized as the fourth quadrant, and the spatial coordinate is calculated as (take the X-axis tilt angle ⁇ as an example):
  • the corresponding tilt angle and its trigonometric function value can be obtained based on the index value, and the coordinate value of the sensitive axis of the gravity acceleration sensor can be calculated by substituting the trigonometric function value into the above formula. Thereby, the value of the spatial coordinates (two-dimensional coordinates in this embodiment) is determined. It should be noted that only the tilt angle corresponding to the index value greater than or equal to zero and its trigonometric function value are listed in Table 1, and the corresponding tilt angle and its trigonometric function value are not listed when the index value is less than zero, but may be listed. Refer to Table 1 for implementation.
  • the corresponding tilt angle is 2.69 degrees
  • the corresponding tilt angle can still be 2.69 degrees.
  • the combination of positive and negative values of the index value indicates that the value in the z-axis direction can be used to identify the quadrant of the tilt angle generated after the deflection of the sensitive axis, and the trigonometric value obtained by the tilt angle in different quadrants has Positive and negative points.
  • the accuracy of the spatial coordinates obtained by adopting the above method for determining the spatial coordinates of the air mouse is lower than that of the prior art, but the spatial coordinates can be determined at a faster speed.
  • the positioning of the mouse pointer can be more precise, but the disadvantage of slow processing (especially when using an MCU with relatively weak processing capability) makes the movement of the mouse pointer somewhat lag, such as the user manipulating the air mouse in the air, when the MCU Calculate the exact value of a certain space coordinate and output the coordinates of the mouse pointer or its change to control the movement of the mouse pointer.
  • the position of the air mouse has already passed the space coordinate. Even if the space coordinates with high precision are calculated. The value also seems to be of little significance.
  • step S30 may be performed to convert the determined spatial coordinates or the amount of change thereof into coordinates of the mouse pointer or a variation thereof. Specifically, after determining the spatial coordinates of the air mouse by the step S20, the determined spatial coordinates are divided by the sensitivity coefficient and converted into the coordinates of the mouse pointer, or the determined amount of the spatial coordinate is divided by the sensitivity coefficient. Converting to the amount of change of the coordinates of the mouse pointer, the positioning of the mouse pointer can be realized by the coordinates of the mouse pointer or the coordinate change of the mouse pointer, and the movement of the mouse pointer is controlled. It should be noted that the steps are
  • the spatial coordinates of the air mouse determined by S20 are more than one, but a series of consecutive spatial coordinates (the number of spatial coordinates determined in a unit time is related to the sampling frequency of the inertial device), and therefore, the spatial coordinates determined above are determined.
  • the amount of change specifically refers to the amount of change between two consecutive spatial coordinates.
  • the amount of change in the spatial coordinates includes a variation component of the X axis and a variation component of the z axis.
  • the mouse pointer can also be positioned to control the movement of the mouse pointer.
  • the sensitivity coefficient includes a sensitivity coefficient of the inertial device and a sensitivity coefficient of the mouse, which are set and adjusted according to actual needs and operating environments, such as accuracy requirements, screen size, resolution, etc., which are those skilled in the art. It is well known that the description will not be repeated here.
  • step S40 is executed to output the coordinates of the mouse pointer or the amount of change thereof at the set report rate to control the movement of the mouse pointer. Since the 4 ⁇ rate reflects the frequency at which the mouse sends data to the system (the coordinates of the mouse pointer or the amount of change in coordinates), the higher the report rate, the more times the data is transmitted to the system per unit time, the output to the system. The more the coordinates of the mouse pointer or the amount of its change, the more smooth and smooth the movement of the mouse pointer (cursor).
  • the data transmitted by the air mouse to the system each time includes a plurality of consecutive spatial coordinates obtained in a unit time or a coordinate of the mouse pointer converted therefrom or a variation thereof, and can output multiple times to the system each time.
  • the coordinates of a continuous mouse pointer or its amount of change is called a set of data, so the report rate is expressed. It is how many sets of data are output to the system in a unit of time. Since the adaptive report rate has been set according to the motion condition of the air mouse through step S10, when step S40 is executed, the coordinates of the mouse pointer outputted to the system or the amount of change thereof can be controlled based on the set report rate.
  • the inertial device is a gravity acceleration sensor.
  • the inertial device may further include a gyro sensor. The difference from the above embodiment is that, due to the prior art, the gyro sensor The voltage is measured by a sensitive axis (also called a detection axis or a detection arm).
  • the angular velocity is integrated to obtain the tilt angle. Therefore, in order to avoid complicated and large numbers of integrals Operation, inverse trigonometric function, improve processing speed, can also establish the index value, the relationship between the tilt angle of the sensitive axis of the gyro sensor and its trigonometric function value (inclination angle index table), through the measured value of the sensitive axis ( Generally, the index value (register value) corresponding to the voltage value is used to query the corresponding relationship (tilt angle index table), obtain a tilt angle corresponding to the index value, and a trigonometric function value, and determine the value based on the trigonometric function value.
  • the coordinate value of the sensitive axis of the gravity acceleration sensor thereby determining the space sitting of the air mouse In order to achieve the positioning thereof.
  • the embodiment further provides a device for controlling the movement of the mouse pointer, and controls the movement of the mouse pointer by using an air mouse.
  • 6 is a schematic structural diagram of an apparatus for controlling movement of a mouse pointer according to Embodiment 1 of the present invention. As shown in FIG.
  • the air mouse includes at least one inertial device, and the inertial device includes a gravity acceleration sensor, and the control mouse
  • the pointer moving unit includes: a report point rate setting unit 10, configured to set an air mouse target rate based on an acceleration value of the sensitive axis of the gravity acceleration sensor; and a coordinate determining unit 20 configured to determine a space coordinate of the air mouse
  • the conversion unit 30 is configured to convert the determined spatial coordinate or the amount of change thereof into a coordinate of the mouse pointer or a variation thereof; and the control unit 40 is configured to output the coordinates of the mouse pointer at a set report rate or The amount of change to control the movement of the mouse pointer.
  • FIG. 7 is a schematic structural view of the coordinate determining unit 20 shown in FIG. 6.
  • the coordinate determining unit 20 of FIG. 6 includes: a correspondence generating unit 201, configured to establish a correspondence between an index value and a parameter of a sensitive axis, where the parameter of the sensitive axis includes a sensitive axis of the inertial device The angle of inclination and the value of the trigonometric function, the index value corresponding to the measured value of each sensitive axis of the inertial device; the obtaining unit 202, configured to acquire the measured value of each sensitive axis of the inertial device; the positioning unit 203 , And configured to query the correspondence relationship based on an index value corresponding to the acquired measurement value, and determine a spatial coordinate of the air mouse.
  • the locating unit 203 includes: a second query unit 203a, configured to query the correspondence relationship based on an index value corresponding to the acquired measurement value, obtain a tilt angle of the sensitive axis corresponding to the index value, and a trigonometric function value thereof
  • the second determining unit 203b is configured to determine the spatial coordinates of the air mouse based on the tilt angle of the sensed inertial axis of the inertial device and its trigonometric function value.
  • the correspondence between the index value and the parameter of the sensitive axis (the tilt angle of the sensitive axis of the inertial device and the value of the trigonometric function) is stored in a read-only memory in the form of a table, and the table is The tilt angle index table 200 shown in FIG.
  • the correspondence relationship generating unit 201 includes a configuration unit (not shown) for determining the tilt angle in the tilt angle index table 200 and the stepwise decreasing pitch precision in descending order of the slope corresponding to the tilt angle.
  • the configuration of the trigonometric value is stored in a read-only memory in the form of a table, and the table is The tilt angle index table 200 shown in FIG.
  • the correspondence relationship generating unit 201 includes a configuration unit (not shown) for determining the tilt angle in the tilt angle index table 200 and the stepwise decreasing pitch precision in descending order of the slope corresponding to the tilt angle.
  • the configuration of the trigonometric value is stored in a read-only memory in the form of a table, and the table is The
  • the correspondence relationship generating unit 201 further includes an expansion value rounding unit (not shown) for expanding a trigonometric function value of the tilt angle corresponding to the index value by a predetermined multiple and rounding the value to the tilt Angle index table 200. Still referring to FIG.
  • the device for controlling the movement of the mouse pointer further includes a stability determining unit 50, and the stability determining unit 50 is connected to the coordinate determining unit 20 for determining whether the sensitive axis is stable, including: if the buffer area is different The number of index values is less than or equal to the first threshold, and the difference (absolute value) between the index values is less than or equal to the second threshold, determining that the sensitive axis is stable; the buffer area is stored every predetermined time The acquired index value; the coordinate determining unit 20 determines the spatial coordinate by the tilt angle obtained by the stable sensitive axis and its trigonometric function value.
  • the inertial device included in the air mouse is a gravity acceleration sensor, which includes at least two mutually perpendicular sensitive axes, one of which is perpendicular to the ground plane.
  • the air mouse further includes a spatial pose recognition unit for determining a spatial pose of the aerial mouse based on the index value and a direction perpendicular to a sensitive axis of the ground plane.
  • the second embodiment of the present invention provides a method for controlling the movement of the mouse pointer.
  • the method for controlling the movement of the mouse pointer according to the first embodiment differs from the first embodiment in that the method for determining the spatial coordinates of the air mouse is different.
  • the parameter of the sensitive axis in step S101 includes a coordinate value of the sensitive axis of the inertial device determined based on the tilt angle of the sensitive axis.
  • the spatial coordinates of the air mouse are determined in step S103 to achieve a faster positioning thereof. In this embodiment, it is considered to directly establish the index value and the sensitivity of the inertial device determined based on the tilt angle of the sensitive axis. The correspondence between the coordinate values of the axes.
  • the correspondence between the index value and the coordinate value of the sensitive axis of the inertial device determined based on the tilt angle of the sensitive axis can also be stored in a read-only memory in the form of a table.
  • the table is referred to as a coordinate correspondence table, that is, the coordinate correspondence table includes the index value and a coordinate value of a sensitive axis of the inertial device determined based on a tilt angle of the sensitive axis, and the index value and the coordinate value are Have a corresponding relationship.
  • the MCU after reading the index value in the register, the MCU can directly query the coordinate value of the sensitive axis of the inertial device determined by the coordinate pair according to the index value, thereby determining the spatial coordinate of the air mouse.
  • the coordinate correspondence table may be combined with the tilt angle index table in the first embodiment, that is, the tilt angle index table formed after the merge includes the index value having the corresponding relationship.
  • the tilt angle and its trigonometric function value further include coordinate values of the sensitive axes of the inertial device corresponding to the index value, the tilt angle, and the trigonometric function value, so that the merged tilt can be queried as needed
  • the angular index table obtains coordinate values and/or tilt angles of the corresponding sensitive axes of the inertial device.
  • the embodiment further provides a device for controlling the movement of the mouse pointer, and controls the movement of the mouse pointer by using an air mouse.
  • 8 is a schematic structural diagram of an apparatus for controlling movement of a mouse pointer according to Embodiment 2 of the present invention. As shown in FIG.
  • the air mouse includes at least one inertial device, and the inertial device includes a gravity acceleration sensor, and the control mouse
  • the device for moving the pointer includes: a report rate setting unit 10, configured to set an alarm rate of the air mouse based on an acceleration value of the sensitive axis of the gravity acceleration sensor; and a coordinate determining unit 60, configured to determine an air mouse a conversion unit 30, configured to divide the amount of change in the determined spatial coordinate by the sensitivity coefficient and convert the amount of change into the coordinate of the mouse pointer; the control unit 40, configured to output the mouse at the set report rate The amount of change in the coordinates of the pointer to control the movement of the mouse pointer.
  • Fig. 9 is a view showing the configuration of the coordinate determining unit 60 shown in Fig. 8. Referring to FIG. 9, the coordinate determining unit 60 shown in FIG.
  • a correspondence generating unit 601 configured to establish a correspondence between an index value and a parameter of the sensitive axis, where the parameter of the sensitive axis includes a tilt based on the sensitive axis An angle determined by a coordinate value of a sensitive axis of the inertial device, the index value corresponding to a measured value of each sensitive axis of the inertial device; an obtaining unit 602, configured to acquire a measurement of each sensitive axis of the inertial device a value locating unit 603, configured to query the correspondence relationship based on an index value corresponding to the acquired measurement value, and determine a spatial coordinate of the air mouse.
  • the locating unit 603 includes: a first query unit 603a, configured to query the correspondence relationship based on an index value corresponding to the acquired measurement value, and obtain a coordinate value of a sensitive axis of the inertial device corresponding to the index value;
  • a determining unit 603b is configured to determine a spatial coordinate of the air mouse based on the coordinate value of the sensitive axis of the queried inertial device.
  • the correspondence between the index value and the parameter of the sensitive axis (the coordinate value of the sensitive axis of the inertial device determined based on the tilt angle of the sensitive axis) is stored in the form of a table in a read-only manner. In the memory, the table is the coordinate correspondence table 600 shown in FIG.
  • the correspondence relationship generating unit 601 includes a configuration unit (not shown) for gradually reducing the segmentation precision in descending order of the slope corresponding to the tilt angle, and determining the sensitivity axis in the coordinate correspondence table 600.
  • the tilt angle determines the configuration of the coordinate values of the sensitive axes of the inertial device.
  • the value-enhancing and rounding unit and the stability determining unit 50 of the first embodiment may be included.
  • the device for controlling the movement of the mouse pointer as described in the first embodiment.
  • the apparatus for controlling the movement of the mouse pointer provided by the embodiment, reference may be made to the related content of the method for controlling the movement of the mouse pointer in the embodiment and the first embodiment, and details are not described herein again.
  • Embodiment 3 On the basis of the first embodiment or the second embodiment, the inventor considers that the movement of the air mouse includes not only the force p-speed motion, the deceleration motion or the uniform motion, but also the motion trend (track) thereof.
  • the method for controlling the movement of the mouse pointer by using the air mouse further comprises: identifying the movement trend of the air mouse by continuously obtaining the index values obtained after the sensitive axis is stable, if the motion trend is a linear motion, Then reduce the reporting rate of the air mouse.
  • the identifying, by the plurality of consecutively determining, the index value obtained after the sensitive axis is stable, identifying a motion trend of the air mouse includes: if the difference between any two consecutive index values is less than or equal to a third threshold, identifying the The trend of movement is linear motion.
  • the data (index value) in the buffer area can be further utilized to identify the moving tendency of the air mouse. For example, by analyzing the index value in the buffer area, it can be determined that a sensitive axis is stable. It is assumed that multiple index values continuously acquired after each determination of the sensitive axis is stable include 2, 2, 2, 3, and 3.
  • the system does not affect the smoothness of the movement of the mouse pointer, but can The power consumption is reduced to some extent, so the reporting rate of the air mouse can be reduced.
  • the reduction rate of the air mouse's reporting rate the standard can be set in advance, for example, the setting range of the reduction is 10% to 20%. Taking the drop rate of 10% as an example, if the previously set 4 ⁇ point rate is 80 ⁇ , when the moving tendency of the air mouse is recognized as a linear motion, the report rate is reduced from 80Hz to 72Hz.
  • the lower limit value of the report rate can also be set, that is, when the motion tendency of the air mouse is recognized as a linear motion, the report rate is reduced by a certain amount, if it is lowered
  • the report rate is set to the lower limit value.
  • the lower limit value is set to 50 Hz, for example: the original 4 ⁇ point rate is 60 Hz, and the 4 ⁇ point rate is reduced by 20% to 48 Hz, then the report rate is set to 50 Hz. .
  • the 50Hz report rate can basically guarantee the mouse pointer.
  • the movement trajectory is smoother. It should be noted that it is determined that the number of index indexes continuously acquired after the sensitive axis is stable is at least three, and it is necessary to determine the index value obtained after the sensitive axis is stable, because if it is determined that the sensitive axis is unstable, it will return When it is determined that the index value of the sensitive axis is stable, the index value does not belong to the index value obtained after determining that the sensitive axis is stable. For example, if it is determined that a sensitive axis is stable for a period of time, the index values obtained are 3, 3, 3, 4, and 4, and it is determined that all the sensitive axes are unstable after that, and then the sensitive axis is determined before returning.
  • the method for controlling the movement of the mouse pointer further includes: performing at least two consecutively determined air
  • the spatial coordinates of the mouse are interpolated.
  • the performing the interpolation operation includes: performing linear interpolation operation if the motion trend is recognized as a linear motion, and otherwise performing a parabolic interpolation operation.
  • Linear interpolation is the single form of algebraic interpolation.
  • Figure 10 is a schematic diagram of a linear interpolation operation.
  • the parameters a and b of the linear interpolation function g(x) can be determined.
  • Parabolic interpolation is also called quadratic interpolation. It is a quadratic polynomial to fit a certain curve. The accuracy is naturally higher than linear interpolation.
  • linear interpolation can be considered on the basis of linear interpolation, and it is easier to use a computer. Program implementation.
  • interpolation points In the application of single-chip microcomputer, the commonly used functions are often solidified in the program memory in the form of a table. For example, for any given interpolation point X, the function values y Q and yi of the corresponding values of Xo and Xl , then an interpolation operation can be performed to find the value of the interpolation point (X, y).
  • FIG. 12 is a schematic structural diagram of an apparatus for controlling movement of a mouse pointer according to Embodiment 3 of the present invention. As shown in FIG.
  • the apparatus for controlling movement of a mouse pointer according to Embodiment 1 or Embodiment 2 is The apparatus for controlling the movement of the mouse pointer in this embodiment includes, in addition to the report rate setting unit 10, the coordinate determining unit 20 (which may also be the coordinate determining unit 60), the converting unit 30, the control unit 40, and the stability determining unit 50, and includes
  • the motion trend recognizing unit 70 is connected to the stability judging unit 50, the report rate setting unit 10, and the coordinate determining unit 20 (which may also be the coordinate determining unit 60) for continuously Determining that the index value obtained after the sensitive axis is stable recognizes the motion tendency of the air mouse; and the report rate setting unit 10 reduces the air when the motion trend recognizing unit 70 recognizes that the motion trend is a linear motion The dot rate of the mouse.
  • the motion trend recognizing unit 70 recognizes that the motion trend is a linear motion when the difference between any two consecutive index values is less than or equal to the third threshold.
  • the apparatus for controlling the movement of the mouse pointer of the embodiment may further include an interpolation unit 80, the interpolation unit 80, the motion trend identification unit 70, and the coordinate determining unit 20 (which may also be the coordinate determining unit 60).
  • the positioning unit 203 in the coordinate determining unit 20 (which may also be the positioning unit 603 in the coordinate determining unit 60) is obtained by interpolation Position the aerial mouse in spatial coordinates.
  • the interpolation unit 80 may specifically include a selection unit, a linear interpolation unit, and a parabolic interpolation unit, and the selection unit is configured to select the linear interpolation unit when the motion trend recognition unit recognizes that the motion trend is a linear motion. Interpolation operation, otherwise the parabolic interpolation unit is selected for interpolation.
  • the apparatus for controlling the movement of the mouse pointer in this embodiment reference may be made to the method for controlling the movement of the mouse pointer in the embodiment, and details are not described herein again.
  • the embodiment of the present invention further provides an air mouse
  • the device for controlling the movement of the mouse pointer described in any one of the above embodiments may be integrated in the air mouse in whole or in part, and the air mouse may pass through the wireless transceiver.
  • the wireless transceiver such as RF transceivers, infrared transceivers, etc.
  • control devices that control the mouse pointer such as projectors, computers, etc.
  • M-delivery data the coordinates of the mouse pointer or its variation
  • the receiving end of the wireless transceiver can generally pass USB
  • the interface is connected to the control device.
  • the specific implementation of the air mouse can refer to the method and device for controlling the movement of the mouse pointer described in any one of the above embodiments, and details are not described herein.
  • the air mouse and the method and device for controlling the movement of the mouse pointer have at least the following beneficial effects:
  • the report rate of the air mouse based on the acceleration output value of the sensitive axis of the gravity acceleration sensor
  • the determined spatial coordinates of the air mouse or the amount of change thereof are converted into the coordinates of the mouse pointer or the amount of change thereof, and are set by
  • the reporting rate outputs the coordinates of the mouse pointer or the amount of change thereof to control the movement of the mouse pointer, thereby enabling dynamic adjustment of the reporting rate according to the actual motion of the air mouse, so that the air mouse is more in the case of a larger acceleration.
  • High reporting rate output data ensures fine and smooth movement of the mouse pointer, and outputs data at a lower reporting rate with less acceleration, reducing power consumption.
  • the tilt angle index table after acquiring the index value corresponding to the measured value of the sensitive axis of the inertial device, relying on the index value of the tilt angle index table and the parameter of the sensitive axis (tilt angle and its trigonometric function) Corresponding relationship between the values), the tilt angle corresponding to the obtained index value and its trigonometric function value can be quickly obtained, and the spatial coordinates can be quickly determined to timely locate the air mouse, because a large number of complicated and large numbers are avoided. Calculation (integral operation, inverse trigonometric function, etc.), so that the processing speed can be increased, so that the air mouse can output data at a higher report rate, and more data can be output in the same time than the prior art.
  • the coordinate correspondence table after obtaining the index value corresponding to the measured value of the sensitive axis of the inertial device, the index value of the coordinate correspondence table and the parameter of the sensitive axis (based on the sensitive axis Corresponding relationship between the coordinate values of the sensitive axes of the inertial device determined by the tilt angle, and quickly obtaining the inertial device determined based on the tilt angle of the sensitive axis corresponding to the acquired index value
  • the coordinate values of the sensitive axes determine the spatial coordinates at a faster speed, further increasing the processing speed, enabling the air mouse to output data at a higher reporting rate.
  • the report rate of the air mouse is lowered, and the mouse can be not affected.
  • the pointer moves the smoothness of the trajectory, the power consumption is reduced.
  • the corresponding interpolation operation is performed, and more space coordinates can be obtained, ensuring that the air mouse can output data at a higher reporting rate, and the movement direction of the mouse pointer is more delicate. smooth.

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

提供了一种空中鼠标及控制鼠标指针移动的方法与装置。该空中鼠标包括至少一种惯性器件,该惯性器件包括重力加速度传感器。该控制鼠标指针移动的方法包括:基于该重力加速度传感器的各个敏感轴的加速度输出值的矢量和设定空中鼠标的报点率(S10);确定空中鼠标的空间坐标(S20);将所确定的空间坐标或其变化量相应转换为鼠标指针的坐标或其变化量(S30);以设定的报点率输出所述鼠标指针的坐标或其变化量,以控制鼠标指针的移动(S40)。本发明技术方案能实现根据空中鼠标的实际运动情况动态调节报点率,以控制鼠标指针的移动。

Description

空中鼠标及控制鼠标指针移动的方法与装置 本申请要求于 2011 年 8 月 29 日提交中国国家知识产权局、 申请号为 201110250670.5、 发明名称为"空中鼠标及控制鼠标指针移动的方法与装置"的 中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及定位技术领域,特别涉及一种空中鼠标及控制鼠标指针移动的 方法与装置。 背景技术
目前,计算机鼠标指针的定位大多数都依靠光学传感器或激光传感器来实 现,这些传感器都基于物理光学原理,使得传感器需要依靠桌面等平台来实现。 但是在很多场合, 例如在计算机多媒体教学中, 用户想在空中操控鼠标指针或 是通过在空中操控鼠标指针来实现多媒体电视播放、 网页浏览等应用,仅使用 传统的传感器就无法实现,于是空中鼠标应运而生。空中鼠标是一种输入设备, 像传统鼠标一样操作屏幕光标(鼠标指针), 但却不需要放在任何平面上, 在 空中晃动就能直接依靠空中运动姿态的感知实现对鼠标指针的控制。要实现空 中运动姿态的感知, 一般在空中鼠标内设置惯性器件, 利用惯性器件测量技术 实现对运动载体姿态的跟踪。
利用惯性器件测量技术进行运动载体姿态的跟踪具有非常广阔的前景。惯 性跟踪系统的基本原理是在目标初始位置和姿态已知的基础上, 依据惯性原 理, 利用陀螺仪传感器、加速度传感器等惯性器件测量物体运动的角速度和直 线加速度, 然后通过积分获得物体的位置和姿态。 其中, 陀螺仪基本原理是运 用物体高速旋转时, 强大的角动量使旋转轴一直稳定指向一个方向的性质, 所 制造出来的定向仪器。 当运动方向与转轴指向不一致时, 会产生相应的偏角, 再根据偏角与运动的关系,得到目前运动物体的运动轨迹和位置,从而实现定 位的功能。 而加速度传感器技术是惯性与力的检测综合体, 目前在汽车电子和 消费电子领域有较多的应用。 加速度传感器通过实时采集运动物体加速度信 号, 通过二阶积分的方式得到运动的轨迹实现定位。 另外, 在器件处于相对稳 定的状态下, 可以通过分析传感器件自身重力加速度,得到目前器件的自身姿 态。 然而, 由于陀螺仪传感器技术以及加速度传感器技术都存在运动物体姿态 与运动状态很难完全体现的不足, 因此,通常将陀螺仪传感器技术以及加速度 传感器技术结合, 从而能实现空间定位的准确性和稳定性。 鼠标的 4艮点率( mouse report rate )又称为 4艮告率, 是衡量鼠标性能的一个 重要指标, 报点率的单位是 Hz, 它能反映出一秒钟内鼠标向系统(通常指计 算机系统, 也可指包含计算机系统的设备, 例如计算机、 数字电视机、 投影仪 等 )发送数据 (该数据一般指用于鼠标指针定位的坐标或坐标的变化量 )的频 率, 即一秒钟内鼠标传送数据给系统的次数。 报点率当然是越高越好, 报点率 越高鼠标指针的定位也就越准,因为单位时间内传送数据给系统的次数越多则 表示鼠标指针(光标)的移动更为细腻滑顺, 点击也能更为精准。 一般地, 普 通 USB接口的鼠标最高可以达到 125Hz的报点率, 而一个 PS/2接口的鼠标却只 能在 40Hz到 90Hz之间徘徊, 大多数为 60Hz左右。 但是, 对于空中鼠标来说, 由于其向系统传输数据(以控制鼠标指针的移 动)通常是通过一无线射频模块以发射无线信号的方式进行的,每次发射的功 耗较大, 而单位时间内传送数据给系统的次数越多则意味着功耗越大,从而减 少了空中鼠标的待机时间(缩短了使用寿命, 需要以更高频率更换电池)。 而 且, 空中鼠标的报点率通常是预先设定好的, 用户使用空中鼠标控制鼠标指针 移动时, 只能以固定的报点率输出数据,难以根据空中鼠标的实际运动情况动 态调节报点率。 另一方面, 空中鼠标需要确定其空间坐标的变化, 并将所述空间坐标的变 化除以一定的灵敏度系数后得到鼠标指针的坐标变化,从而实现对鼠标指针的 控制。 而现有技术中, 无论是陀螺仪传感器通过测量其敏感轴的角速度进而利 用积分运算得出倾斜角以确定空中鼠标的空间坐标变化,还是加速度传感器通 过测量各敏感轴的加速度分量进而通过反三角函数运算得出倾斜角以确定空 中鼠标的空间坐标变化, 都需要进行复杂的运算(积分运算、 反三角函数运算 等), 而且这些运算中大多涉及浮点运算, 这对于空中鼠标中的处理控制芯片 来说, 例如微控制器(MCU, Micro Control Unit ) , 如果选用处理能力相对较 弱的 MCU, 由于其有限的处理能力, 在进行复杂而大量的运算时需要耗费较 多的资源, 导致处理速度较慢, 难以使空中鼠标以较高的报点率输出数据, 而 且具有较高的功耗, 如果选用处理能力更强的 MCU, 又会使成本上升。 相关技术还可参考公开号为 WO2005108119(A2) 的国际专利申请, 该专 利申请公开了一种带有倾斜补偿和提高可用性的自由空间定位设备。 发明内容
本发明要解决的问题是现有技术中难以根据空中鼠标的实际运动情况动 态调节报点率以控制鼠标指针的移动。
为解决上述问题, 本发明的技术方案提供一种控制鼠标指针移动的方法, 利用空中鼠标控制鼠标指针的移动, 所述空中鼠标包括至少一种惯性器件, 所 述惯性器件包括重力加速度传感器, 所述控制鼠标指针移动的方法包括: 基于所述重力加速度传感器的各个敏感轴的加速度输出值的矢量和设定 空中鼠标的 ·^艮点率;
确定空中鼠标的空间坐标;
将所确定的空间坐标或其变化量相应转换为鼠标指针的坐标或其变化量; 以设定的报点率输出所述鼠标指针的坐标或其变化量,以控制鼠标指针的 移动。
可选的, 所述基于所述加速度输出值的矢量和设定空中鼠标的报点率包 括: 按加速度由小到大依次设置多个档次的加速度范围,每一档次的加速度范 围对应一个报点率的设定范围,根据所述加速度输出值的矢量和所处加速度范 围的档次确定对应的报点率的设定范围, 所述加速度范围的档次越高,对应的 报点率的设定越高。 可选的, 所述确定空中鼠标的空间坐标包括: 建立索引值与敏感轴的参数之间的对应关系,所述索引值与所述惯性器件 的敏感轴的测量值所对应 ,所述敏感轴的参数包括所述惯性器件的敏感轴的倾 斜角及其三角函数值和 /或基于所述敏感轴的倾斜角确定的所述惯性器件的敏 感轴的坐标值; 获取所述惯性器件的各个敏感轴的测量值;
基于与所获取的测量值对应的索引值查询所述对应关系,确定所述空中鼠 标的空间坐标。
可选的,所述敏感轴的参数包括基于所述敏感轴的倾斜角确定的所述惯性 器件的敏感轴的坐标值;基于与所获取的测量值对应的索引值查询所述对应关 系, 确定所述空中鼠标的空间坐标包括:
基于与所获取的测量值对应的索引值查询所述对应关系,获得与所述索引 值对应的惯性器件的敏感轴的坐标值;
基于查询到的惯性器件的敏感轴的坐标值确定所述空中鼠标的空间坐标。 可选的 ,所述敏感轴的参数包括所述惯性器件的敏感轴的倾斜角及其三角 函数值;基于与所获取的测量值对应的索引值查询所述对应关系,确定所述空 中鼠标的空间坐标包括:
基于与所获取的测量值对应的索引值查询所述对应关系,获得与所述索引 值对应的敏感轴的倾斜角及其三角函数值;
基于查询到的惯性器件的敏感轴的倾斜角及其三角函数值,确定所述空中 鼠标的空间坐标。
可选的,按倾斜角所对应的斜率由大至小的顺序逐步降低分割精度确定所 述对应关系中敏感轴的参数的配置。 可选的, 将与所述索引值对应的倾斜角的三角函数值扩大预定倍数并取
可选的,所述确定空中鼠标的空间坐标还包括以稳定的敏感轴确定所述空 中鼠标的空间坐标; 判断敏感轴是否稳定包括: 若緩存区内不同的索引值的数 量小于或等于第一阈值, 且各索引值之间的差值均小于或等于第二阈值, 则确 定该敏感轴稳定; 所述緩存区存有每隔预定时间所获取的索引值。
可选的, 所述控制鼠标指针移动的方法还包括: 以连续多个判断出敏感轴 稳定后所获取的索引值识别空中鼠标的运动趋势, 若所述运动趋势为直线运 动, 则降低所述空中鼠标的报点率。
可选的,所述以连续多个判断出敏感轴稳定后所获取的索引值识别空中鼠 标的运动趋势包括: 若任意两个连续的索引值之差小于或等于第三阈值, 则识 别出所述运动趋势为直线运动。
可选的, 所述控制鼠标指针移动的方法还包括: 对至少两个连续确定的空 中鼠标的空间坐标进行插值运算。
可选的, 所述进行插值运算包括: 若所述运动趋势为直线运动, 则进行线 性插值运算, 否则进行抛物线插值运算。 可选的, 所述重力加速度传感器为电容式重力加速度传感器, 所述测量值 为所述电容式重力加速度传感器的敏感轴的电容值。
可选的, 所述惯性器件还包括陀螺仪传感器, 所述测量值为所述陀螺仪传 感器的敏感轴的电压值。 可选的, 所述重力加速度传感器至少包括两个相互垂直的敏感轴, 其中一 个敏感轴垂直于地平面。 为解决上述问题, 本发明的技术方案还提供一种控制鼠标指针移动的装 置,利用空中鼠标控制鼠标指针的移动,所述空中鼠标包括至少一种惯性器件, 所述惯性器件包括重力加速度传感器, 所述控制鼠标指针移动的装置包括: 报点率设定单元,用于基于所述重力加速度传感器的各个敏感轴的加速度 输出值的矢量和设定空中鼠标的报点率;
坐标确定单元, 用于确定空中鼠标的空间坐标;
转换单元,用于将所确定的空间坐标或其变化量相应转换为鼠标指针的坐 标或其变化量;
控制单元, 用于以设定的报点率输出所述鼠标指针的坐标或其变化量, 以 控制鼠标指针的移动。
为解决上述问题,本发明的技术方案还提供了一种包括上述控制鼠标指针 移动的装置的空中鼠标。 与现有技术相比, 本技术方案至少具有以下优点:
通过基于重力加速度传感器的各个敏感轴的加速度输出值的矢量和设定 空中鼠标的报点率,将所确定的空中鼠标的空间坐标或其变化量相应转换为鼠 标指针的坐标或其变化量,并以所设定的报点率输出所述鼠标指针的坐标或其 变化量以控制鼠标指针的移动,从而能实现根据空中鼠标的实际运动情况动态 调节报点率, 使空中鼠标在加速度较大的运动情况下以较高的报点率输出数 据,确保鼠标指针的移动细腻平滑,在加速度较小的运动情况下以较低的报点 率输出数据, 降低了功耗。 进一步地, 通过建立索引值与敏感轴的参数(倾斜角及其三角函数值和 / 或基于所述敏感轴的倾斜角确定的所述惯性器件的敏感轴的坐标值)之间的对 应关系, 当获取到惯性器件的敏感轴的测量值后,基于与所述测量值对应的索 引值查询所述对应关系,能够快速得到与所述索引值所对应的倾斜角及其三角 函数值和 /或基于所述敏感轴的倾斜角确定的所述惯性器件的敏感轴的坐标 值, 进而快速确定空中鼠标的空间坐标, 由于避免了复杂而大量的计算(积分 运算、 反三角函数运算等), 因此能够提高处理速度, 从而使空中鼠标能以较 高的报点率输出数据, 而且使功耗降低。 通过将与索引值对应的倾斜角的三角函数值扩大预定倍数并取整,避免了 浮点运算,从而能够以相对低端的微控制器实现计算,降低了空中鼠标的成本。
此外,通过以连续多个判断出敏感轴稳定后所获取的索引值识别空中鼠标 的运动趋势, 在识别出所述运动趋势为直线运动时, 降低空中鼠标的报点率, 能够在不影响鼠标指针移动平滑度的情况下, 降低功耗。 进一步地,根据识别出的空中鼠标的运动趋势进行相应的插值运算, 能够 获得更多的空间坐标,确保空中鼠标能以更高的报点率输出数据,使鼠标指针 的移动轨迹更为细腻平滑。 附图说明 图 1是本发明实施方式提供的控制鼠标指针移动的方法的流程示意图; 图 2是根据敏感轴的倾斜角确定空间坐标的示意图; 图 3 是本发明实施例一提供的确定空中鼠标的空间坐标的方法的流程示 意图;
图 4是本发明实施例一的倾斜角索引表中倾斜角的分割精度示意图; 图 5 是本发明实施例一的重力加速度传感器开启后的空间姿态识别示意 图;
图 6是本发明实施例一提供的控制鼠标指针移动的装置的结构示意图; 图 7是图 6所示坐标确定单元 20的结构示意图; 图 8是本发明实施例二提供的控制鼠标指针移动的装置的结构示意图; 图 9是图 8所示坐标确定单元 60的结构示意图; 图 10是线性插值运算的示意图; 图 11是抛物线插值运算的示意图;
图 12是本发明实施例三提供的控制鼠标指针移动的装置的结构示意图。
具体实施方式 现有技术中空中鼠标通常只能以固定的报点率输出数据,难以根据空中鼠 标的实际运动情况动态调节报点率以控制鼠标指针的移动。本技术方案通过基 于重力加速度传感器的各个敏感轴的加速度输出值的矢量和设定空中鼠标的 报点率,将确定的空中鼠标的空间坐标或其变化量相应转换为鼠标指针的坐标 或其变化量,并以所设定的报点率输出所述鼠标指针的坐标或其变化量以控制 鼠标指针的移动, 从而能实现根据空中鼠标的实际运动情况动态调节报点率, 使空中鼠标在加速度较大的运动情况下以较高的报点率输出数据(鼠标指针的 坐标或其变化量), 确保鼠标指针的移动细腻平滑, 在加速度较小的运动情况 下以较低的报点率输出数据, 降低了功耗。 为使本发明的上述目的、特征和优点能够更为明显易懂, 下面结合附图对 本发明的具体实施方式做详细的说明。在以下描述中阐述了具体细节以便于充 分理解本发明。但是本发明能够以多种不同于在此描述的其它方式来实施, 本 领域技术人员可以在不违背本发明内涵的情况下做类似推广。因此本发明不受 下面公开的具体实施方式的限制。 图 1是本发明实施方式提供的控制鼠标指针移动的方法的流程示意图。本 发明实施方式中利用空中鼠标控制鼠标指针的移动,所述空中鼠标包括至少一 种惯性器件, 所述惯性器件包括重力加速度传感器, 如图 1所示, 所述控制鼠 标指针移动的方法包括: 步骤 S10,基于所述重力加速度传感器的各个敏感轴的加速度输出值的矢 量和设定空中鼠标的报点率; 步骤 S20, 确定空中鼠标的空间坐标; 步骤 S30,将所确定的空间坐标或其变化量相应转换为鼠标指针的坐标或 其变化量; 步骤 S40 , 以设定的报点率输出所述鼠标指针的坐标或其变化量, 以控制 鼠标指针的移动。
下面以三个具体实施例对上述控制鼠标指针移动的方法作详细说明。 实施例一 本实施例中, 所述空中鼠标包括至少一种惯性器件, 所述惯性器件包括重 力加速度传感器,进一步地,该重力加速度传感器为电容式重力加速度传感器, 其至少包括两个相互垂直的敏感轴, 其中一个敏感轴垂直于地平面。具体实施 时,一般选用的是三轴重力加速度传感器,将垂直于地平面的敏感轴记为 z轴, 其余两个敏感轴相互垂直且分别垂直于 z轴, 分别记为 X轴、 y轴, X轴和 y 轴构成的平面平行于地平面。由于目前空中鼠标达到的要求仅为在屏幕上实现 的实际上是二维的坐标体系, 因此采用三轴中任意两轴即可达到所需要求(确 定二维坐标体系内的坐标 ), 例如选取 X轴和 Z轴( X轴和 Z轴构成的平面平 行于屏幕), 虽然在空间上实现的是三维动态, 而在屏幕上只要求实现二维坐 标即可, 故本实施例中暂未使用 y轴。 当然, 在其他实施例中, 如果加入 y 轴则可以实现屏幕三维动态效果的处理(例如 3D 游戏中对鼠标的控制), 此 夕卜, 还可以使用 y轴作为其他两轴数据的校准。
众所周知, 地球表面附近的物体, 在仅受重力作用时具有的加速度叫做重 力加速度, 也叫自由落体加速度, 用 g表示 (通常将 g作为常数, 一般为 9.8 米 /秒 2 )。 而重力加速度传感器的敏感轴的加速度输出值通常以重力加速度 g 的倍数进行表示 (以 g作为参考的加速度), 例如 0.5g、 lg、 2g、 2.5g、 3.8g 等, 并且, 由于加速度为矢量, 除了具有大小还有方向, 因此重力加速度传感 器的敏感轴的加速度输出值还以正负号表示其方向, 例如 0.5g、 -0.5g、 2.5g、 -2.5g等。 空中鼠标在空中运动的过程中, 某一时间段内运动情况可分为加速 运动、 减速运动、 匀速运动, 当重力加速度传感器具有 1个以上敏感轴时, 各 种运动情况可体现为各个敏感轴的加速度输出值的矢量和的大小, 例如, 当所 述加速度输出值的矢量和为 2g时,则说明空中鼠标以 2g的加速度作加速运动, 当所述加速度输出值的矢量和为 -2g时,则说明空中鼠标以 2g的加速度作减速 运动, 当所述加速度输出值的矢量和为 0或接近 0时, 则说明空中鼠标作匀速 运动。 发明人考虑, 当空中鼠标以较小的加速度(例如为 0~2g的加速度)作 加速或减速运动时, 其空间坐标的变化量较小, 因此可以向系统输出相对较少 的数据 (用于鼠标指针定位的坐标点 ),反之, 当空中鼠标以较大的加速度(例 如为 4g以上的加速度)作加速或减速运动时, 其空间坐标的变化量较大, 因 此必须向系统输出相对较多的数据才能确保鼠标指针的移动能够细腻平滑。所 以, 可以针对上述空中鼠标的实际运动情况, 动态地调节空中鼠标的 ·^艮点率, 使其在加速度较大的情况下以较高的报点率输出数据,从而确保鼠标指针的移 动细腻平滑,而在加速度较小的情况下以较低的报点率输出数据,以降低功耗。 具体地, 即执行步骤 S10, 基于所述重力加速度传感器的各个敏感轴的加 速度输出值的矢量和设定空中鼠标的报点率。其中, 所述基于所述加速度输出 值设定空中鼠标的报点率具体包括:按加速度由小到大依次设置多个档次的加 速度范围,每一档次的加速度范围对应一个报点率的设定范围,根据所述加速 度输出值的矢量和所处加速度范围的档次确定对应的报点率的设定范围,所述 加速度范围的档次越高, 对应的报点率的设定越高。 具体地, 本实施例按加速 度的绝对值由小到大依次设置三档加速度范围,每一档次的加速度范围对应一 个报点率的设定范围, 分别为: 第一档加速度范围为 0~2g (包括 2g ), 其对应的报点率的设定范围为 50~60Hz; 第二档加速度范围为 2g~4g (包括 4g ), 其对应的报点率的设定范围为 80~100Hz; 第三档加速度范围为 4g以上,其对应的 4艮点率的设定范围为 120~150Hz。 需要说明的是, 第三档加速度范围在实际实施一般为 4g~8g, 至于大于 8g的 情况一般发生的可能性较小, 故将其合并在第三档加速度范围内处理, 况且, 120~150Hz的报点率的设定范围也已经属于比较高了,基本能满足控制鼠标指 针平滑移动的目的。此外, 由于上述三档加速度范围是以加速度的绝对值进行 设置的, 因此不管敏感轴的加速度分量的方向如何, 均以加速度输出值的绝对 值界定所处的加速度范围的档次,例如某敏感轴的加速度输出值为 -2.5g,其绝 对值为 2.5g, 则应该处于第二档加速度范围 (2g~4g )。 在其他实施例中, 也可根据实际情况(例如根据加速度输出值的预计输出 范围)设置不同档次的加速度范围, 并为每个档次的加速度范围设定对应的报 点率的范围。
如此, 当获取到加速度传感器的敏感轴的加速度输出值的矢量和后,便可 以判断出所述加速度输出值的矢量和所处的加速度范围的档次,再根据所处的 加速度范围的档次确定对应的报点率的设定范围。 当然, 在实际实施时, 需要 预先从报点率的设定范围中选取其中一个报点率的值进行设定,当凭借敏感轴 的加速度输出值的矢量和识别出空中鼠标的运动情况后,则切换到与当前运动 情况相适应的报点率。 例如: 假设空中鼠标从 to至 tl这段时间内运动, 获得 的敏感轴的加速度输出值的矢量和为 1.5g, 可以将空中鼠标的报点率设定为 50Hz, 假设在 tl 至 t2 这段时间内获得的敏感轴的加速度输出值的矢量和为 2.5g, 则将空中鼠标的报点率动态地调整为 80Hz。 总之, 空中鼠标在用户的 操纵下在空中运动, 其报点率便会随着其运动情况作动态调节。 除了进行报点率的设定,还需要执行步骤 S20,确定空中鼠标的空间坐标。 因为只有当空中鼠标在运动过程中的空间坐标被确定后,才能将所确定的空间 坐标或空间坐标的变化量相应转换为鼠标指针的坐标或鼠标指针的坐标变化 量,进而以设定的报点率输出所述鼠标指针的坐标或鼠标指针的坐标变化量以 控制鼠标指针的移动。而确定空中鼠标的空间坐标的关键通常又在于重力加速 度传感器对倾斜角的测量。 本领域技术人员知晓,重力加速度传感器以重力作为输入矢量来决定物体 在空间的方向, 而倾斜角就是重力与其敏感轴的夹角, 当重力与其敏感轴垂直 时, 它对倾斜最敏感, 在该方位上其对倾角的灵敏度最高。 当敏感轴与重力平 行时,每倾斜 1度都引起输出加速度的变化。 下面筒单介绍下重力加速度传感 器对倾斜角测量的原理。 由于重力的方向是不变的, 始终垂直地平面向下, 当 加速度传感器的某个敏感轴与重力形成倾斜角时,可以基于测量到的该敏感轴 的加速度, 通过三角函数, 可以得出加速度和倾斜角之间的关系, 例如在单个 敏感轴(X轴) 的情况下:
Ax=gn*cosP 上述表达式中, X敏感轴的加速度输出值; gn为以重力作为参考的 加速度(即重力加速度 g ); β为倾斜角度。 所以, β的值可以通过反余弦函数 方程求得, 即 P=arccos(Ax/ gn)。 当然, 也可以通过其他反三角函数计算出倾斜 角。如果存在多个敏感轴时, 则可以根据各敏感轴与重力形成倾斜角以及各敏 感轴的加速度分量确定空间坐标。图 2是根据敏感轴的倾斜角确定空间坐标的 示意图。 如图 2所示,设原来坐标轴数据分别为 X、 Y、 Ζ, 变化后为 XI、 Yl、 Zl , ζ轴的倾斜角为 α, X轴的倾斜角为 Θ, 明显地, θ=90°-α, 贝^
Υ1=Υ
Zl=Z*cosa+X*sina Xl=-Z*sina+X*cosa 通过矩阵关系表示为:
Figure imgf000013_0001
因此, 只需要计算出 z 轴的倾斜角为 a, 便可以确定变化后的空间坐标 ( X1,Y1,Z1 )。 特别地, 在 X轴和 ζ轴构成的二维坐标系中, 仅需要得到坐标 ( Χ1, Ζ1 )。 当然, 通过 X轴的倾斜角 Θ同样可以确定变化后的空间坐标。 然而,现有技术中,根据测量得到的各个敏感轴的加速度输出值计算出倾 斜角, 需要进行反三角函数运算, 而计算机在进行反三角函数运算时是非常耗 费资源的, 对于处理能力相对较弱的 MCU, 因其有限的处理能力, 导致处理 速度较慢, 进而导致确定空间坐标的速度也会较慢,从而难以使空中鼠标以较 高的报点率输出数据,特别是当空中鼠标以较大的加速度进行运动时, 如果不 能支持以较高的报点率输出数据,则鼠标指针的移动轨迹就难以达到细腻平滑 的效果, 严重影响鼠标指针的定位质量, 另外还会导致功耗较高, 但如果选用 处理能力更强的 MCU, 又会使成本上升。 因此,本实施例采用了不同于现有技术的确定所述空中鼠标的空间坐标的 方法。图 3是本发明实施例一提供的确定空中鼠标的空间坐标的方法的流程示 意图, 如图 3所示, 所述确定空中鼠标的空间坐标的方法包括: 步骤 S101 , 建立索引值与敏感轴的参数之间的对应关系, 所述索引值与 所述惯性器件的敏感轴的测量值所对应,所述敏感轴的参数包括所述惯性器件 的敏感轴的倾斜角及其三角函数值和 /或基于所述敏感轴的倾斜角确定的所述 惯性器件的敏感轴的坐标值; 步骤 S102, 获取所述惯性器件的各个敏感轴的测量值; 步骤 S103 , 基于与所获取的测量值对应的索引值查询所述对应关系, 确 定所述空中鼠标的空间坐标。 本实施例中,通过建立索引值与所述惯性器件(本实施例中为重力加速度 传感器) 的敏感轴的倾斜角及其三角函数值之间的对应关系能够解决上述问 题, 即步骤 S101中所述敏感轴的参数包括所述惯性器件的敏感轴的倾斜角及 其三角函数值。具体地, 建立索引值与重力加速度传感器的敏感轴的倾斜角及 其三角函数值之间的对应关系,所述索引值与所述惯性器件的各个敏感轴的测 量值所对应。由于电容式重力加速度传感器会把测量的加速度转换为电容器的 电容量变化, 测得的电容值的不同, 反映到寄存器中的值也不同, 因此可根据 敏感轴在不同的加速度下实际测量的电容值或者电容值的范围设置其所对应 的寄存器中的值, 并与此时的倾斜角及其三角函数值之间建立对应关系, 例如 当寄存器中的值为 1 时, 对应的倾斜角为 2.69 度, 2.69 度的正弦值约为 0.046932, 2.69度的余弦值约为 0.998898, 将所述对应关系以表的形式存储于 只读存储器(ROM, Read-Only Memory ) 中, 在本实施例将该表称为倾斜角 索引表。 需要说明的是, 步骤 S101中的所述索引值具体即为上述寄存器中的 值(筒称为寄存器值)。 在开启重力加速度传感器后,电容式重力加速度传感器会测得基于各敏感 轴的加速度分量所转化的电容值, 即执行步骤 S102 , 获取惯性器件的各个敏 感轴的测量值, 其中, 所述测量值具体即为测得的电容值, 然后, MCU能够 从寄存器中读取与测得的电容值所对应的寄存器值。 读取到寄存器值之后,基于所述寄存器值查询所述倾斜角索引表, 能够凭 借所述对应关系直接得到该寄存器值所对应的倾斜角及其三角函数值,并基于 查询到的所述倾斜角及其三角函数值确定所述重力加速度传感器的敏感轴的 坐标值, 从而确定空中鼠标的空间坐标以实现对其的定位, 即执行步骤 S103 , 基于与所获取的测量值对应的索引值查询所述对应关系 (倾斜角索引表), 确 定所述空中鼠标的空间坐标。 需要说明的是, 建立索引值、所述惯性器件的敏感轴的倾斜角及其三角函 数值之间的对应关系(本实施例中即建立倾斜角索引表)时, 需要将敏感轴的 偏转(偏转产生倾斜角)分为四个不同的象限, 每个象限中倾斜角的范围均从 0度至 90度, 不同的角度值对应不同的三角函数值, 其中最为关键的是以怎 样的分割精度配置所述对应关系 (倾斜角索引表)中的倾斜角。 一方面, 分割 精度需要考虑应用的需求进行配置, 比如说 0.5度或者 0.1度, 较高的分割精 度能保证后续所确定的空间坐标的准确性。但分割精度越高,倾斜角索引表中 倾斜角的数量也越多, 数据的存储量也越大, 同时也给 MCU提出了更高的要 求, 比如当倾斜角的分割精度精确到 0.1度时,就需要 MCU的 4K的 ROM存 储空间。 因此, 另一方面, 对于配置倾斜角索引表中的倾斜角还需要考虑到 MCU的存储空间与运行速度。 本实施例中是按倾斜角所对应的斜率由大至小的顺序逐步降低分割精度 确定所述倾斜角索引表中倾斜角及其三角函数值的配置(确定了倾斜角的配置 即确定了其三角函数值的配置)。 图 4是本发明实施例一的倾斜角索引表中倾斜角的分割精度示意图。如图 4所示, 以 0度至 90度的倾斜角对应的正弦值为例, A点的斜率是大于 B点 的, 因此在相同分割精度的条件下, A 点附近对应的正弦值的变化要大于 B 点附近对应的正弦值的变化。 由此, 可以考虑将 A点附近对应的倾斜角的分 割精度设置得相对高一些, 而将 B 点附近对应的倾斜角的分割精度设置得相 对低一些, 例如, 在 0至 45度的倾斜角范围内多选取几个角度以及三角函数 值存入所述倾斜角索引表(分割精度相对较高), 而在 45至 90度则少选取几 个角度以及三角函数值存入所述倾斜角索引表(分割精度相对较低), 如此便 能在一定程度上既保证后续所确定的空间坐标的准确性, 又减小了对 MCU的 存储空间与运行速度的要求。 仍参阅图 4, 本实施例中, 按照倾斜角所对应的斜率由大至小的顺序逐步 降低分割精度确定所述倾斜角索引表中倾斜角及其三角函数值的配置,即倾斜 角从 0度至 90度, 所对应的斜率逐步变小, 而存入倾斜角索引表中的倾斜角 之间的差值越来越大(角度间差值越大, 分割精度越低), 举例来说, 倾斜角 从 0度至 90度, 最开始选择 0度、 2.69度、 5.38度、 8.08度、 10.81度, 分割 精度分别为 2.69度 ( 2.69度 -0度)、 2.69度 ( 5.38度 -2.69度)、 2.7度 ( 8.08 度 -5.38度)、 2.73度( 10.81度 -8.08度), 可以看出分割精度在逐步降低, 而 到后来选择 57.54度、 62.95度、 69.64度、 79.86度, 分割精度分别为 5.41度、 6.69度、 10.22度, 可以看出分割精度越来越低。 需要说明的是,上述按倾斜角所对应的斜率由大至小的顺序逐步降低分割 精度确定所述倾斜角索引表中倾斜角及其三角函数值的配置的方式只是一种 选取倾斜角的基本原则, 具体实施时, 在这一基本原则下, 可根据实际情况确 定倾斜角索引表中倾斜角及其三角函数值的配置, 如下表所示,表 1是根据实 际情况多次测量后所确定的倾斜角索引表的示例。 表 1 三角函数值
索引值 倾斜角 (度)
正弦值 ( sin ) 余弦值 ( cos )
0 0 0 0 10000 100
1 2.69 469 5 9989 100
2 5.38 938 9 9956 99
3 8.08 1406 14 9901 99 4 10.81 1876 19 9823 98
5 13.55 2343 23 9722 97
6 16.33 2812 28 9597 96
7 19.16 3282 33 9446 94
8 22.02 3749 37 9271 93
9 24.95 4218 42 9067 91
10 27.95 4687 47 8834 88
11 31.04 5156 52 8568 86
12 34.23 5625 56 8268 83
13 37.54 6093 61 7929 79
14 41.01 6562 66 7546 75
15 44.68 7031 70 7110 71
16 48.59 7500 75 6614 66
17 52.83 7968 80 6042 60
18 57.54 8438 84 5367 54
19 62.95 8906 89 4548 45
20 69.64 9375 94 3479 35
21 79.86 9844 98 1761 18
22 90 10000 100 0 0 表 1中, 列出了从 0度至 90度所选取的 23个倾斜角的角度值,每一个倾 斜角的角度值对应有一个索引值, 依次为 0~22。 0度和 90度这两个端点一般 是任何一张倾斜角索引表所必选的, 而处于 0度〜 90度之间的倾斜角, 则可以 根据上述按倾斜角所对应的斜率由大至小的顺序逐步降低分割精度的基本原 则并结合实际情况所确定。 需要说明的是,通常由于反三角函数值参与的运算中涉及浮点运算, 而复 杂而大量的浮点运算对于处理能力相对较弱的 MCU 来说难以实现快速的处 理, 但如果选用处理能力更强的 MCU, 又会增加成本。 因此在本实施例中, 采取的方法是将与索引值对应的倾斜角的三角函数值扩大预定倍数并取整后 存于所述倾斜角索引表。如表 1所示, 索引值所对应的倾斜角的三角函数值包 括正弦值(sin )和余弦值(cos ), 其中, 正弦值有两列, 左边一列是将索引值 所对应的倾斜角的正弦值扩大 10000倍后取整,右边一列是将索引值所对应的 倾斜角的正弦值扩大 100倍后取整; 类似地, 余弦值也有两列, 左边一列是将 索引值所对应的倾斜角的余弦值扩大 10000倍后取整,右边一列是将索引值所 对应的倾斜角的余弦值扩大 100倍后取整。所述扩大的预定倍数可以根据实际 需求进行设定,如果需要更高的计算精度, 则应将三角函数值扩大的预定倍数 设定地较大,如果对计算精度的要求相对较低, 则可以将三角函数值扩大的预 定倍数设定地相对较小些。 当然, 对三角函数值扩大的预定倍数设定地越大, 则意味着 MCU需要进行的计算量也会越大。 总之, 通过将与索引值对应的倾 斜角的三角函数值扩大预定倍数并取整后存于所述倾斜角索引表,避免了浮点 运算, 从而能够以相对低端的微控制器 (例如可以采用 8位的 MCU ) 实现计 算, 降低了成本。 在其他实施例中, 如果对精度的要求高, 并且有处理能力较 强的 MCU支持,则可以用与索引值对应的倾斜角的三角函数值参与浮点运算。
上述对倾斜角索引表的查询过程, 可以通过二分法查找实现,二分法查找 为现有技术中常用手段, 在此不再赘述。
此外, 本实施例中, 所述确定所述空中鼠标的空间坐标的方法还包括通过 判断敏感轴的是否稳定,以稳定的敏感轴所获得的倾斜角及其三角函数值确定 空中鼠标的空间坐标的值。 由于在具体实施时, 所述空中鼠标的各敏感轴的稳 定性可能并不相同,相应得出的倾斜角也不同, 由此会产生各自不同的空间坐 标的值,此时就需要基于稳定的敏感轴所得到的倾斜角所对应的三角函数值确 定出空间坐标的值。 例如: 可以同时采用 X轴和 z轴互做补偿, 哪个轴稳定就 采用稳定的敏感轴获得的索引值。 一般地, 水平移动时, z轴稳定; 垂直移动 时, X轴稳定; 斜向移动, 则 X, z轴都不稳定, 此时返回之前处于稳定时的 索引值。具体判断敏感轴是否稳定可采取以下方式: 若緩存区内不同的索引值 的数量小于或等于第一阈值, 且各索引值之间的差值(绝对值)均小于或等于 第二阈值, 则确定该敏感轴稳定; 所述緩存区存有每隔预定时间所获取的索引 值。 具体实施时, 随着各敏感轴加速度的变化, 位于寄存器中的索引值也会有 所变化,将预定时间内所读取到的索引值存入一緩存区中, 可以通过分析该緩 存区中的数据判断敏感轴是否稳定。 所述第一阈值可取 3 , 第二阈值可取 2, 即: 当某个敏感轴在緩存区内不同的索引值的数量小于或等于 3 , 且各索引值 之间的差值均小于或等于 2 , 可确定该敏感轴稳定。 举例来说, 假设 X轴在緩 存区内的索引值包括: 22,22,22,21 ,21 ,20,20,20, 19,19,18,18,17,17, 而 z轴在緩 存区内的索引值包括: 2,2,2,2,2,2,3,3,3,3,3,3,3,3。 通过对緩存区内的索引值的 分析可知: X轴在緩存区内不同的索引值的数量有 6个, 且最小索引值与最大 索引值之间差值为 4, 已经不满足各索引值之间的差值均小于或等于 2 , 则确 定 X轴处于不稳定状态; 而 z轴在緩存区内不同的索引值的数量仅为 2个, 且 最小索引值与最大索引值之间差值为 1 , 即能满足各索引值之间的差值均小于 或等于 2, 则确定 z轴处于稳定状态。 需要说明的是, 本实施例中所述索引值 之间的差值指的是索引值之间差的绝对值。 另外, 緩存区中的数据(索引值)还可以用来判断停顿, 如全正、 全负或 者最大索引值与最小索引值之差小于某个数时就自动检测为所述感知设备处 于停顿状态,停顿状态也属于稳定状态的一种。 当敏感轴都不稳定时会返回之 前的索引值, 但只要稍有停顿, 重力加速度传感器就会认为是稳定了, 就会立 即检测到加速度变化并转换成空间坐标。 以空中鼠标的控制为例, 比如刚开始 是水平拿的, 突然向斜上方运动, 如果没有检测到稳定(稍有停顿或其他稳定 的情况), 则鼠标会水平移动, 一旦检测到稳定, 鼠标就会沿斜上方运动。 因 为只要检测到稳定(如有停顿), 重力加速度传感就会输出正确的值。 在现实 生活中, 当手持空中鼠标进行控制时,不可能一直处于不稳定的(比如斜向上) 的运动状态,如果稍有停顿或者对緩存区中的数据检测确定敏感轴稳定, 就会 输出正确的索引值而不会返回之前处于稳定状态的索引值。 如前所述,建立倾斜角索引表时,需要将敏感轴的偏转(偏转产生倾斜角 ) 分为四个不同的象限(表示偏转产生的倾斜角所在的象限), 每个象限中倾斜 角的范围均从 0度至 90度, 不同的角度值对应不同的三角函数值, 具有相同 的角度值但处于不同的象限时, 所得到的三角函数值有正负之分,对应的索引 值也有正负之分。 因此, 本实施例中, 开启重力加速度传感器后, 还可基于所 述索引值和垂直于地平面的敏感轴(z轴)的方向确定所述空中鼠标的空间姿 态。 所述空间姿态具体指空中鼠标是正拿、反拿、 是否有偏转以及向哪个方向 偏。 具体地, 可根据索引值是大于零、 等于零或小于零, 以及表示 z轴方向的 值是小于零(方向向上)或是大于零(方向向下, 以重力的方向为正方向)确 定空中鼠标的空间姿态。所述表示 z轴方向的值可以通过对緩存区中数据的值 (索引值)求均值并经过判定后得到。 如前所述, 重力加速度传感器在运行过 程中, 所述緩存区存有每隔预定时间所获取的索引值,通过对緩存区中的所述 索引值的分析, 可以判断出敏感轴是否稳定。 例如: 本实施例中设定緩存区中 的数据(索引值)为 14个, 这 14个数据中如果全正或者全负并且緩存区中数 据的值不超过 3个不同的, 且差距不大于 2时, 判断目前敏感轴是稳定的。 进 一步地, 可以对緩存区中的数据的值进行求均值运算,如果均值为正数就输出 1 , 如果均值为负数就输出 -1 , 而输出的 1或 -1即为所述表示 z轴方向的值。 特别地,如果緩存区中的数据的值全为正值并且判断出敏感轴稳定的话是肯定 输出 1的, 如果全为负值并且判断出敏感轴稳定的话肯定是输出 -1的。
图 5 是本发明实施例一的重力加速度传感器开启后的空间姿态识别示意 图。 如图 5所示, 当重力加速度传感器开启后, 即可根据索引值和表示 z轴的 方向的值对空中鼠标的空间姿态进行识别, 具体地:
若索引值等于零(无偏转)且表示 z轴方向的值小于零, 则识别为正拿; 若索引值等于零(无偏转)且表示 z轴方向的值大于零, 则识别为反拿; 若索引值小于零(有偏转)且表示 Z轴方向的值小于零, 则识别为第一象 限, 此时空间坐标的计算为 (以 X轴的倾斜角 γ为例):
Xl=X*cosy+Z*siny Zl=-X*siny+Z*cosy
若索引值小于零(有偏转)且表示 z轴方向的值大于零, 则识别为第二象 限, 此时空间坐标的计算为 (以 X轴的倾斜角 γ为例):
Xl=-X*cosy+Z*siny Zl=-X*siny-Z*cosy 若索引值大于零(有偏转)且表示 z轴方向的值大于零, 则识别为第三象 限, 此时空间坐标的计算为 (以 X轴的倾斜角 γ为例):
X 1 =-X*cosy-Z*siny
Zl=X*siny-Z*cosy
若索引值大于零(有偏转)且表示 z轴方向的值小于零, 则识别为第四象 限, 此时空间坐标的计算为 (以 X轴的倾斜角 γ为例):
Xl=X*cosy-Z*siny
Zl=X*siny+Z*cosy 结合表 1 , 基于索引值可获得其对应的倾斜角及其三角函数值, 将三角函 数值代入上述公式便可计算出重力加速度传感器的敏感轴的坐标值,从而确定 空间坐标的值(本实施例中为二维坐标)。 需要说明的是, 表 1中仅列出索引 值大于或等于零时对应的倾斜角及其三角函数值,而对索引值小于零时对应的 倾斜角及其三角函数值并未列出, 但可参照表 1实施。 例如: 索引值为 1时, 对应倾斜角为 2.69度, 而当索引值为 -1时, 对应倾斜角仍可为 2.69度。 如前 所述,索引值的正负结合表示 z轴方向的值便可用于对敏感轴偏转后产生的倾 斜角所处象限进行识别,所述倾斜角在不同的象限所得出的三角函数值有正负 之分。 需要说明的是, 在步骤 S20 , 通过采用上述确定空中鼠标的空间坐标的方 法所获得的空间坐标的精度虽然较现有技术有所降低,但是却能够以更快的速 度确定出所述空间坐标, 即使选用处理能力相对较弱的 MCU, 相对于现有技 术,在相同的时间内也能够获得更多的空间坐标, 通过后续步骤能输出更多的 鼠标指针的坐标或其变化量,从而增强了空中鼠标以较高的报点率输出数据的 能力, 使鼠标指针的移动轨迹更为细腻平滑, 提高了鼠标指针的定位质量, 另 外还降低了成本和功耗。在实际实施时, 快速确定空中鼠标的空间坐标的意义 比追求空间坐标的更高精度的意义显得更为重要,因为空中鼠标在空中运动过 程中, 只有快速确定其空间坐标, 才能及时输出鼠标指针的坐标或其变化量以 控制鼠标指针的移动, 形成鼠标指针移动的轨迹, 而空间坐标的更高精度虽然 能使鼠标指针的定位更为精准,但是处理速度慢的缺点(尤其是选用处理能力 相对较弱的 MCU时)使控制鼠标指针的移动显得有些滞后, 例如用户操纵空 中鼠标在空中运动, 当 MCU计算出某个空间坐标的精确值并输出鼠标指针的 坐标或其变化量以控制鼠标指针移动时,空中鼠标的位置却早已过了那个空间 坐标, 此时即使计算出具有很高精度的空间坐标的值也显得意义不大了。 在确定空中鼠标的空间坐标后, 则可执行步骤 S30, 将所确定的空间坐标 或其变化量相应转换为鼠标指针的坐标或其变化量。 具体地, 当通过步骤 S20 确定空中鼠标的空间坐标后,还需将所确定的空间坐标除以灵敏度系数后转换 为鼠标指针的坐标,或者将所确定的空间坐标的变化量除以灵敏度系数后转换 为鼠标指针的坐标的变化量,以所述鼠标指针的坐标或鼠标指针的坐标变化量 才能实现对鼠标指针的定位, 控制鼠标指针移动。 需要说明的是, 通过步骤
S20所确定的空中鼠标的空间坐标不止一个, 而是一系列连续的空间坐标(单 位时间内确定的空间坐标的数量与所述惯性器件的采样频率有关), 因此, 上 述所确定的空间坐标的变化量具体是指任意连续的两个空间坐标之间的变化 量, 本实施例中, 所述空间坐标的变化量包括 X轴的变化分量和 z轴的变化分 量。 例如: H没先后确定的连续两个空间坐标分别为 (Χ,Ζ )和(Χ' ,Ζ' ) , 则 X 轴的变化分量△ Χ= Χ' -Χ , Ζ轴的变化分量△ ζ= ζ' -ζ。 通过将一系列的空间坐标 的变化量转换为鼠标指针的坐标变化量, 同样能定位鼠标指针,控制鼠标指针 的移动。此外, 所述灵敏度系数包括惯性器件的灵敏度系数和鼠标的灵敏度系 数, 是根据实际需求和运行环境, 例如准确度要求、 屏幕大小和分辨率等而设 定和调整, 此为本领域技术人员所公知, 在此不再展开说明。 获得鼠标指针的坐标或其变化量后, 执行步骤 S40, 以设定的报点率输出 所述鼠标指针的坐标或其变化量, 以控制鼠标指针的移动。 由于 4艮点率反映的 是鼠标向系统发送数据 (鼠标指针的坐标或坐标的变化量)的频率, 报点率越 高,单位时间内传送数据给系统的次数越多, 则向系统输出的鼠标指针的坐标 或其变化量的数量也越多, 鼠标指针(光标)的移动也就更为细腻平滑。 空中 鼠标每次向系统传送的数据包括由单位时间内获得的多个连续的空间坐标或 其变化量相应转换而成的鼠标指针的坐标或其变化量,可以将每次向系统输出 的多个连续的鼠标指针的坐标或其变化量称为一组数据, 因此,报点率表示的 是单位时间内向系统输出多少组数据。因为通过步骤 S10已经根据空中鼠标的 运动情况设定出相适应的报点率,所以执行步骤 S40时,便可基于所设定的报 点率控制向系统输出的鼠标指针的坐标或其变化量的数据量,由此实现了根据 空中鼠标的运动情况控制鼠标指针的移动,使空中鼠标在加速度较大的情况下 以较高的报点率输出数据,从而确保鼠标指针的移动细腻平滑, 而在加速度较 小的情况下以较低的报点率输出数据, 以降低功耗。 上述实施例中, 所述惯性器件为重力加速度传感器, 在其他实施例中, 所 述惯性器件还可以包括陀螺仪传感器, 与上述实施例有所区别的是, 由于现有 技术中, 陀螺仪传感器是通过敏感轴(又称为检测轴或检测臂)测量电压的变 化,根据测得的电压值与角速度的对应关系,对角速度进行积分运算后获得倾 斜角, 因此, 为了避免复杂而大量的积分运算、 反三角函数运算, 提高处理速 度, 同样可以建立索引值、 陀螺仪传感器的敏感轴的倾斜角及其三角函数值之 间的对应关系 (倾斜角索引表), 通过敏感轴的测量值(一般为电压值)所对 应的索引值(寄存器值)查询所述对应关系 (倾斜角索引表), 获得与所述索 引值对应的倾斜角及其三角函数值,基于所述三角函数值确定所述重力加速度 传感器的敏感轴的坐标值, 进而确定空中鼠标的空间坐标以实现对其的定位。
基于上述控制鼠标指针移动的方法,本实施例还提供了一种控制鼠标指针 移动的装置, 并利用空中鼠标控制鼠标指针的移动。 图 6是本发明实施例一提 供的控制鼠标指针移动的装置的结构示意图,如图 6所示, 所述空中鼠标包括 至少一种惯性器件, 所述惯性器件包括重力加速度传感器, 所述控制鼠标指针 移动的装置包括: 报点率设定单元 10, 用于基于所述重力加速度传感器的敏 感轴的加速度值设定空中鼠标的报点率; 坐标确定单元 20, 用于确定空中鼠 标的空间坐标; 转换单元 30, 用于将所确定的空间坐标或其变化量相应转换 为鼠标指针的坐标或其变化量; 控制单元 40, 用于以设定的报点率输出所述 鼠标指针的坐标或其变化量, 以控制鼠标指针的移动。
图 7是图 6所示坐标确定单元 20的结构示意图。 参阅图 7, 图 6所示坐 标确定单元 20 包括: 对应关系生成单元 201 , 用于建立索引值与敏感轴的参 数之间的对应关系,所述敏感轴的参数包括所述惯性器件的敏感轴的倾斜角及 其三角函数值, 所述索引值与所述惯性器件的各个敏感轴的测量值所对应; 获 取单元 202 , 用于获取所述惯性器件的各个敏感轴的测量值; 定位单元 203 , 用于基于与获取的测量值对应的索引值查询所述对应关系,确定所述空中鼠标 的空间坐标。 所述定位单元 203 包括: 第二查询单元 203a, 用于基于与所获 取的测量值对应的索引值查询所述对应关系,获得与所述索引值对应的敏感轴 的倾斜角及其三角函数值; 第二确定单元 203b, 用于基于查询到的惯性器件 的敏感轴的倾斜角及其三角函数值, 确定所述空中鼠标的空间坐标。 具体实施例中, 所述索引值与敏感轴的参数 (惯性器件的敏感轴的倾斜角 及其三角函数值 )之间建立的对应关系以表的形式存于只读存储器中, 该表即 为图 7所示的倾斜角索引表 200。所述对应关系生成单元 201包括配置单元(图 中未示出), 用于按倾斜角所对应的斜率由大至小的顺序逐步降低分割精度确 定所述倾斜角索引表 200中倾斜角及其三角函数值的配置。所述对应关系生成 单元 201还包括扩值取整单元(图中未示出), 用于将与所述索引值对应的倾 斜角的三角函数值扩大预定倍数并取整后存于所述倾斜角索引表 200。 仍参阅 图 6, 所述控制鼠标指针移动的装置还包括稳定判断单元 50, 所述稳定判断单 元 50与所述坐标确定单元 20相连, 用于判断敏感轴是否稳定, 包括: 若緩存 区内不同的索引值的数量小于或等于第一阈值,且各索引值之间的差值(绝对 值)均小于或等于第二阈值, 则确定该敏感轴稳定; 所述緩存区存有每隔预定 时间所获取的索引值; 所述坐标确定单元 20以稳定的敏感轴所获得的倾斜角 及其三角函数值确定所述空间坐标。 本实施例中, 所述空中鼠标包括的所述惯性器件为重力加速度传感器, 其 至少包括两个相互垂直的敏感轴, 其中一个敏感轴垂直于地平面。所述空中鼠 标还包括空间姿态识别单元,用于基于所述索引值和垂直于地平面的敏感轴的 方向确定所述空中鼠标的空间姿态。 关于本实施例中所述控制鼠标指针移动的装置的具体实施可参考上述控 制鼠标指针移动的方法, 在此不再赘述。
实施例二 本实施例提供的控制鼠标指针移动的方法基于实施例一所述的控制鼠标 指针移动的方法, 与实施例一之间的区别是,对于确定空中鼠标的空间坐标的 方法有所不同。 可结合图 3 , 本实施例中, 步骤 S101 中所述敏感轴的参数包 括基于所述敏感轴的倾斜角确定的所述惯性器件的敏感轴的坐标值。为了能够 使步骤 S103中确定所述空中鼠标的空间坐标以实现对其定位的速度更快, 本 实施例中考虑直接建立所述索引值和基于所述敏感轴的倾斜角确定的所述惯 性器件的敏感轴的坐标值之间的对应关系。 当然, 所述索引值和基于所述敏感 轴的倾斜角确定的所述惯性器件的敏感轴的坐标值之间的对应关系同样可以 表的形式存储于只读存储器中, 在本实施例, 将该表称为坐标对应表, 即所述 坐标对应表包括所述索引值和基于所述敏感轴的倾斜角确定的所述惯性器件 的敏感轴的坐标值, 所述索引值与坐标值之间具有对应关系。 在实际实施时, MCU读取到寄存器中的索引值后, 能够直接根据所述索引值查询所述坐标对 所确定的所述惯性器件的敏感轴的坐标值), 从而确定空中鼠标的空间坐标。 例如: 可以参考实施例一中的表 1 , 读取到索引值为 1 (倾斜角为 2.69度), 则查询坐标对应表得到对应的坐标值为 XlΖι , 从而确定的姿态空间坐标为 ( xi,Zi ), 读取到索引值为 2 (倾斜角为 5.38度), 则查询坐标对应表得到对应 的坐标值为 x2和 z2 , 从而确定的空间坐标为(x2,z2 )等, 这样可以免去三角函 数值与空间坐标之间的变换计算,从而能够以更快的速度确定空间坐标以实现 对空中鼠标的定位。 当然, 在其他实施例中, 也可以将所述坐标对应表与实施 例一中所述倾斜角索引表进行合并,即合并后形成的倾斜角索引表中除了包括 具有对应关系的所述索引值、 倾斜角及其三角函数值, 还包括与所述索引值、 倾斜角及其三角函数值具有对应关系的所述惯性器件的敏感轴的坐标值,如此 可根据需要,通过查询合并后的倾斜角索引表得到对应的所述惯性器件的敏感 轴的坐标值和 /或倾斜角。 关于本实施例的所述控制鼠标指针移动的方法的具体实施可参考实施例 一中所述控制鼠标指针移动的方法的相关描述, 在此不再赘述。
基于上述控制鼠标指针移动的方法,本实施例还提供了一种控制鼠标指针 移动的装置, 利用空中鼠标控制鼠标指针移动。 图 8是本发明实施例二提供的 控制鼠标指针移动的装置的结构示意图,如图 8所示, 所述空中鼠标包括至少 一种惯性器件, 所述惯性器件包括重力加速度传感器, 所述控制鼠标指针移动 的装置包括: 报点率设定单元 10, 用于基于所述重力加速度传感器的敏感轴 的加速度值设定空中鼠标的报点率; 坐标确定单元 60, 用于确定空中鼠标的 空间坐标; 转换单元 30, 用于将所确定的空间坐标的变化量除以灵敏度系数 后转换为鼠标指针的坐标的变化量; 控制单元 40, 用于以设定的报点率输出 所述鼠标指针的坐标的变化量, 以控制鼠标指针的移动。
本实施提供的控制鼠标指针移动的装置与实施例一中所述的控制鼠标指 针移动的装置的区别在于坐标确定单元的结构有所不同。图 9是图 8所示坐标 确定单元 60的结构示意图。 参阅图 9 , 图 8所示坐标确定单元 60包括: 对应 关系生成单元 601 , 用于建立索引值与敏感轴的参数之间的对应关系, 所述敏 感轴的参数包括基于所述敏感轴的倾斜角确定的所述惯性器件的敏感轴的坐 标值, 所述索引值与所述惯性器件的各个敏感轴的测量值所对应; 获取单元 602, 用于获取所述惯性器件的各个敏感轴的测量值; 定位单元 603 , 用于基 于与获取的测量值对应的索引值查询所述对应关系,确定所述空中鼠标的空间 坐标。 所述定位单元 603 包括: 第一查询单元 603a, 用于基于与所获取的测 量值对应的索引值查询所述对应关系,获得与所述索引值对应的惯性器件的敏 感轴的坐标值; 第一确定单元 603b, 用于基于查询到的惯性器件的敏感轴的 坐标值确定所述空中鼠标的空间坐标。 具体实施例中, 所述索引值与敏感轴的参数 (基于所述敏感轴的倾斜角确 定的所述惯性器件的敏感轴的坐标值)之间建立的对应关系以表的形式存于只 读存储器中,该表即为图 9所示的坐标对应表 600。所述对应关系生成单元 601 包括配置单元(图中未示出), 用于按倾斜角所对应的斜率由大至小的顺序逐 步降低分割精度确定所述坐标对应表 600 中基于所述敏感轴的倾斜角确定的 所述惯性器件的敏感轴的坐标值的配置。
此外, 本实施例中同样可包括实施例一所述的扩值取整单元、稳定判断单 元 50, 具体可参考实施例一中所述控制鼠标指针移动的装置。 关于本实施例 提供的控制鼠标指针移动的装置的具体实施可参考本实施例以及实施例一中 所述控制鼠标指针移动的方法的相关内容, 在此不再赘述。 实施例三 在实施例一或实施例二的基础上,发明人考虑到空中鼠标的运动情况不仅 包括力 p速运动、 减速运动或匀速运动, 还包括其运动趋势(轨迹), 所述运动 趋势包括直线运动和非直线运动,若能够判断出空中鼠标的运动趋势为直线运 动, 则通过降低空中鼠标的报点率,还能够在不影响鼠标指针移动轨迹的平滑 度的情况下, 降低功耗。
因此, 本实施例中, 利用空中鼠标控制鼠标指针移动的方法还包括: 以连 续多个判断出敏感轴稳定后所获取的索引值识别空中鼠标的运动趋势,若所述 运动趋势为直线运动, 则降低所述空中鼠标的报点率。 具体地, 所述以连续多 个判断出敏感轴稳定后所获取的索引值识别空中鼠标的运动趋势包括:若任意 两个连续的索引值之差小于或等于第三阈值,则识别出所述运动趋势为直线运 动。 如实施例一所述, 可以通过分析緩存区中的数据(索引值)判断敏感轴是 否稳定, 当某个敏感轴在緩存区内不同的索引值的数量小于或等于 3 , 且各索 引值之间的差值(绝对值)均小于或等于 2, 可确定该敏感轴稳定。 在判断出 敏感轴稳定的基础上, 可进一步利用緩存区中的数据(索引值)识别空中鼠标 的运动趋势。举例来说,通过对緩存区内的索引值的分析可判断出某敏感轴稳 定, 假设在每次判断出敏感轴稳定后连续获取的多个索引值包括 2,2,2,3,3,3,3,3,4,4,4,4,4,4, 并且所述第三阈值设置为 2, 则分析可得, 任意两个 连续的索引值之差(绝对值)都小于或等于 2, 可知该时间段内空中鼠标的运 动趋势为直线运动。再假设在每次判断出敏感轴稳定后连续获取的多个索引值 包括 2,2,2,2,2,3,3,3,4,7,7,8,9,12, 则任意两个连续的索引值之差(绝对值)存在 大于 2的情况, 则这段时间内空中鼠标的运动趋势为非直线运动。如果识别出 空中鼠标的运动趋势为直线运动, 则此时即使少输出一些数据 (用于定位鼠标 指针的坐标或坐标的变化量)给系统也不会影响鼠标指针移动轨迹的平滑度, 反而能够在一定程度上降低功耗, 因此可降低所述空中鼠标的报点率。 至于所 述空中鼠标的报点率的降低幅度可预先设定标准, 例如降幅的设定范围为 10%~20%。 以降幅为 10%为例, 如果原先设定的 4艮点率为 80Ηζ , 当识别出空 中鼠标的运动趋势为直线运动后, 则将报点率从 80Hz降低为 72Hz。 此外, 在 设定报点率的降低幅度的基础上,还可设置报点率的下限值, 即当识别出空中 鼠标的运动趋势为直线运动后, 将报点率降低一定幅度, 如果降低之后的报点 率低于所述下限值, 则将报点率设定为该下限值。 本实施例中, 所述下限值设 置为 50Hz, 例如: 原先 4艮点率为 60Hz, 将该 4艮点率降低 20%后则为 48Hz, 那么此时便将报点率设定为 50Hz。 一般在实际实施过程中, 无论空中鼠标的 运动趋势为直线运动或是非直线运动, 50Hz 的报点率能基本保证鼠标指针的 移动轨迹较为平滑。 需要说明的是,判断出敏感轴稳定后连续获取的多个索引值的数量至少为 3个, 而且必须是判断出敏感轴稳定后获取的索引值, 因为如果判断出敏感轴 不稳定,会返回之前判断出敏感轴稳定时的索引值, 则该索引值不属于判断出 敏感轴稳定后获取的索引值。例如,如果一段时间内连续判断出某敏感轴稳定, 获取的索引值依次为 3,3,3,4,4, 假设之后判断出所有敏感轴都不稳定, 则此时 返回之前判断出敏感轴稳定时的索引值 4, 则这个索引值 4不能作为识别所述 运动趋势的依据。 此外, 为了能控制鼠标指针的运动更为细腻平滑, 空中鼠标需要获得更多 的空间坐标, 因此, 本实施例中, 所述控制鼠标指针移动的方法还包括: 对至 少两个连续确定的空中鼠标的空间坐标进行插值运算。具体地, 所述进行插值 运算包括: 若识别出所述运动趋势为直线运动, 则进行线性插值运算, 否则进 行抛物线插值运算。 线性插值是代数插值的最筒单形式。 图 10是线性插值运算的示意图。 假 设变量 y和自变量 X关系如图 10曲线 y=f(x)所示。 已知 y在点 x0和 的对应 值 y。和 yi , 现在需要用一线性插值函数 g(x)=ax+b, 近似代替 f(x)。 根据插值 条件, 应满足: ax0+b=y0
Figure imgf000028_0001
解该方程组,便可确定线性插值函数 g(x)的参数 a和 b。 由图 10可知, 线 性插值的几何意义是用通过点 A(xo,yo)和点 B^^i^ 直线近似地代替曲线 y=f(x), 可以很容易求的该直线表达式: χ^ - χο (点斜式)
¾ ~ χο χο ~ χι (两点式) 插值节点 xo和 之间的间距越小, 那么在这一区间 g(x)与 f(x)之间的误 差就越小。 若插值点 X在 x。和 Xl之间, 称为内插, 否则称为外插, 一般只考 虑内插情况。 若识别出所述运动趋势为非直线运动,如果仍然采用上述的线性插值算法 进行运算就显得不太合适,在插值运算上应体现为非线性插值运算, 本实施例 中可以采用抛物线插值算法。抛物线插值又称为二次插值, 它是以一元二次多 项式去拟合某一段曲线, 精度自然要比线性插值高。 图 11是抛物线插值运算 的示意图, 如图 11所示, 已知一条曲线 y=f(x)上的三点 A(x0,y0), B(Xl,yi), C(x2,y2); 过此三点可以作一条抛物线, 即一条二次曲线 g(x), 且是唯一的。
可设: g(x)=ax2+bx+c 已知: g(Xi)=f(Xi) 其中: i=0,l,2
由此可以得到方程组: axo ++bx。+c=yo
Figure imgf000029_0001
当然解此方程组方法有很多, 比如常用的待定系数法, 包含抛物线插值的 拉格朗日形式、牛顿形式等等, 一般可以考虑在线性插值的基础上进行逐次线 性插值, 也比较容易用计算机程序实现。
已知三点 (Xo,yo)、 (Xl,yi) , (x2,y2)及插值点的 x , y值。 用直线点斜式公式: 第一步: 过点 (x。,y。)、 (Xl,yi)作直线 Lo 即
Loi = y0 + yi _ y° (χ - χ0 ) 第二步: 过点 (x0,y0)、 (x2,y2)作直线 L。2, 即 02 = ( — 0 ) 第三步: 将 (Xl, L01)、 (x2, L。2)也理解为 "点 " , 过这两点作 "直线", 记为 L012, 即
L。2 ~ L ',01
+■ 四步: 把 LQ1、 LQ2代入上式, 得:
Figure imgf000030_0001
可以表示出:
L0l2 (xi ) = yi , (i = 0X2) 所以, L。12就是所要求的二次插值多项式 g(x)。
Figure imgf000030_0002
通过仔细研究 L012, 可以看出, 。是一阶差商(速度), 而方括号内的 分式是二阶差商 (加速度)。 上述通过两个线性插值的结果得到 g(x), 所以可 以称作逐次线性插值。 由于可以直接调用线性插值算法程序来完成, 因此计算 起来非常方便, 当然本实施例中只考虑内插的情况。 在应用插值算法时, 应该考虑下面的两个具体的问题:
1、 关于插值点的选取: 在单片机应用中, 往往把常用的函数以表格的 式固化在程序存储器中。 例如, 对于任一给定的插值点 X , Xo和 Xl的对应值的 函数值 yQyi , 然后就可以进行插值运算, 求得插值点 (X, y ) 的值。
2、 关于精度与复杂度: 为了提高插值精度, 大多数情况下可考虑采用浮 点运算, 此时可以考虑将参与插值运算的数据和表格事先转换成规格化浮点。 但此种情况会使程序显得复杂, 影响单片机的运算速度。 图 12是本发明实施例三提供的控制鼠标指针移动的装置的结构示意图。 如图 12所示,基于实施例一或实施例二提供的所述控制鼠标指针移动的装置, 本实施例中的控制鼠标指针移动的装置除了包括报点率设定单元 10、 坐标确 定单元 20 (也可以为坐标确定单元 60 )、 转换单元 30、 控制单元 40、 稳定判 断单元 50,还包括运动趋势识别单元 70, 所述运动趋势识别单元 70与所述稳 定判断单元 50、 报点率设定单元 10、 坐标确定单元 20 (也可以为坐标确定单 元 60 )相连, 用于以连续多个判断出敏感轴稳定后所获取的索引值识别空中 鼠标的运动趋势;所述报点率设定单元 10在所述运动趋势识别单元 70识别出 所述运动趋势为直线运动时, 降低所述空中鼠标的 ·^艮点率。所述运动趋势识别 单元 70当任意两个连续的索引值之差小于或等于第三阈值时, 识别出所述运 动趋势为直线运动。
此外, 具体实施时, 本实施例的控制鼠标指针移动的装置还可包括插值单 元 80, 所述插值单元 80与所述运动趋势识别单元 70、 坐标确定单元 20 (也 可以为坐标确定单元 60 )连接, 用于对至少两个连续确定的空中鼠标的空间 坐标进行插值运算, 坐标确定单元 20中的定位单元 203 (也可以为坐标确定 单元 60中的定位单元 603 ) 以插值运算后获得的所有空间坐标定位所述空中 鼠标。 所述插值单元 80具体可包括选择单元、 线性插值单元以及抛物线插值 单元,所述选择单元用于当所述运动趋势识别单元识别出所述运动趋势为直线 运动时,选择所述线性插值单元进行插值运算, 否则选择所述抛物线插值单元 进行插值运算。 本实施例所述控制鼠标指针移动的装置的具体实施可参考本实施例中所 述控制鼠标指针移动的方法, 在此不再赘述。 此外, 本发明实施例还提供了一种空中鼠标, 上面任意一个实施例中所述 的控制鼠标指针移动的装置可以全部或部分集成在所述空中鼠标中,所述空中 鼠标可通过无线收发装置(例如射频收发器、 红外收发器等)与控制鼠标指针 的控制设备(例如投影仪、计算机等 M专送数据(鼠标指针的坐标或其变化量), 无线收发装置的接收端一般可通过 USB接口与所述控制设备连接。 所述空中 鼠标的具体实施可参考上面任意一个实施例中所述的控制鼠标指针移动的方 法与装置, 在此不再赘述。 综上, 本发明实施方式提供的空中鼠标及控制鼠标指针移动的方法与装 置, 至少具有如下有益效果: 通过基于重力加速度传感器的敏感轴的加速度输出值设定空中鼠标的报 点率,将确定的空中鼠标的空间坐标或其变化量相应转换为鼠标指针的坐标或 其变化量,并以所设定的报点率输出所述鼠标指针的坐标或其变化量以控制鼠 标指针的移动,从而能实现根据空中鼠标的实际运动情况动态调节报点率,使 空中鼠标在加速度较大的情况下以较高的报点率输出数据,确保鼠标指针的移 动的细腻平滑,在加速度较小的情况下以较低的报点率输出数据,降低了功耗。
进一步地, 通过建立倾斜角索引表, 当获取到惯性器件的敏感轴的测量值 所对应的索引值后,依靠所述倾斜角索引表中索引值与敏感轴的参数 (倾斜角 及其三角函数值 )之间所具有的对应关系, 能够快速得到与所述获取到的索引 值所对应的倾斜角及其三角函数值,进而快速确定空间坐标以便及时定位空中 鼠标, 由于避免了复杂而大量的计算(积分运算、 反三角函数运算等), 因此 能够提高处理速度,从而使空中鼠标能以较高的报点率输出数据,相对于现有 技术,在同样的时间内能输出更多的数据,增强了以高报点率输出数据的能力, 而且使功耗降低。 进一步地, 通过建立坐标对应表, 能够在获取到惯性器件的敏感轴的测量 值所对应的索引值后,依靠所述坐标对应表中的索引值与敏感轴的参数(基于 所述敏感轴的倾斜角确定的所述惯性器件的敏感轴的坐标值)之间所具有的对 应关系,快速得到与所获取到的索引值所对应的基于所述敏感轴的倾斜角确定 的所述惯性器件的敏感轴的坐标值, 进而以更快的速度确定空间坐标, 进一步 提高处理速度, 使空中鼠标能以更高的报点率输出数据。 通过将与索引值对应的倾斜角的三角函数值扩大预定倍数并取整后存于 所述倾斜角索引表,避免了浮点运算,从而能够以相对低端的微控制器实现计 算, 降低了空中鼠标的成本。
此外,通过以连续多个判断出敏感轴稳定后所获取的索引值识别空中鼠标 的运动趋势, 在识别出所述运动趋势为直线运动时, 降低空中鼠标的报点率, 能够在不影响鼠标指针移动轨迹的平滑度的情况下, 降低功耗。 进一步地, 根据识别出的空中鼠标的运动趋势, 进行相应的插值运算, 能 够获得更多的空间坐标, 确保空中鼠标能以更高的报点率输出数据,使鼠标指 针的移动轨迹更为细腻平滑。 本发明虽然已以较佳实施例公开如上,但其并不是用来限定本发明,任何 本领域技术人员在不脱离本发明的精神和范围内,都可以利用上述揭示的方法 和技术内容对本发明技术方案做出可能的变动和修改, 因此, 凡是未脱离本发 改、 等同变化及修饰, 均属于本发明技术方案的保护范围。

Claims

1.一种控制鼠标指针移动的方法, 利用空中鼠标控制鼠标指针的移动, 所 述空中鼠标包括至少一种惯性器件, 所述惯性器件包括重力加速度传感器, 其 特征在于, 包括:
基于所述重力加速度传感器的各个敏感轴的加速度输出值的矢量和设定 空中鼠标的报点率;
确定空中鼠标的空间坐标;
将所确定的空间坐标或其变化量相应转换为鼠标指针的坐标或其变化量; 以设定的报点率输出所述鼠标指针的坐标或其变化量,以控制鼠标指针的 移动。
2.根据权利要求 1所述的控制鼠标指针移动的方法, 其特征在于, 所述基 于所述加速度输出值的矢量和设定空中鼠标的报点率包括:按加速度由小到大 依次设置多个档次的加速度范围,每一档次的加速度范围对应一个报点率的设 定范围,根据所述加速度输出值的矢量和所处加速度范围的档次确定对应的报 点率的设定范围, 所述加速度范围的档次越高, 对应的报点率的设定越高。
3.根据权利要求 1所述的控制鼠标指针移动的方法, 其特征在于, 所述确 定空中鼠标的空间坐标包括:
建立索引值与敏感轴的参数之间的对应关系,所述索引值与所述惯性器件 的敏感轴的测量值所对应 ,所述敏感轴的参数包括所述惯性器件的敏感轴的倾 斜角及其三角函数值和 /或基于所述敏感轴的倾斜角确定的所述惯性器件的敏 感轴的坐标值;
获取所述惯性器件的各个敏感轴的测量值;
基于与所获取的测量值对应的索引值查询所述对应关系,确定所述空中鼠 标的空间坐标。
4.根据权利要求 3所述的控制鼠标指针移动的方法, 其特征在于, 所述敏 感轴的参数包括基于所述敏感轴的倾斜角确定的所述惯性器件的敏感轴的坐 标值;基于与所获取的测量值对应的索引值查询所述对应关系, 确定所述空中 鼠标的空间坐标包括:
基于与所获取的测量值对应的索引值查询所述对应关系,获得与所述索引 值对应的惯性器件的敏感轴的坐标值;
基于查询到的惯性器件的敏感轴的坐标值确定所述空中鼠标的空间坐标。
5.根据权利要求 3所述的控制鼠标指针移动的方法, 其特征在于, 所述敏 感轴的参数包括所述惯性器件的敏感轴的倾斜角及其三角函数值;基于与所获 取的测量值对应的索引值查询所述对应关系,确定所述空中鼠标的空间坐标包 括:
基于与所获取的测量值对应的索引值查询所述对应关系,获得与所述索引 值对应的敏感轴的倾斜角及其三角函数值;
基于查询到的惯性器件的敏感轴的倾斜角及其三角函数值,确定所述空中 鼠标的空间坐标。
6.根据权利要求 3至 5任一项所述的控制鼠标指针移动的方法,其特征在 于,按倾斜角所对应的斜率由大至小的顺序逐步降低分割精度确定所述对应关 系中敏感轴的参数的配置。
7.根据权利要求 3至 5任一项所述的控制鼠标指针移动的方法,其特征在 于, 将与所述索引值对应的倾斜角的三角函数值扩大预定倍数并取整。
8.根据权利要求 3至 5任一项所述的控制鼠标指针移动的方法,其特征在 于,所述确定空中鼠标的空间坐标还包括以稳定的敏感轴确定所述空中鼠标的 空间坐标; 判断敏感轴是否稳定包括: 若緩存区内不同的索引值的数量小于或 等于第一阈值,且各索引值之间的差值均小于或等于第二阈值, 则确定该敏感 轴稳定; 所述緩存区存有每隔预定时间所获取的索引值。
9.根据权利要求 8所述的控制鼠标指针移动的方法,其特征在于,还包括: 以连续多个判断出敏感轴稳定后所获取的索引值识别空中鼠标的运动趋势,若 所述运动趋势为直线运动, 则降低所述空中鼠标的报点率。
10. 根据权利要求 9所述的控制鼠标指针移动的方法, 其特征在于, 所 述以连续多个判断出敏感轴稳定后所获取的索引值识别空中鼠标的运动趋势 包括: 若任意两个连续的索引值之差小于或等于第三阈值, 则识别出所述运动 趋势为直线运动。
1 1. 根据权利要求 9所述的控制鼠标指针移动的方法, 其特征在于, 还 包括: 对至少两个连续确定的空中鼠标的空间坐标进行插值运算。
12. 根据权利要求 11所述的控制鼠标指针移动的方法, 其特征在于, 所 述进行插值运算包括: 若所述运动趋势为直线运动, 则进行线性插值运算, 否 则进行抛物线插值运算。
13. 根据权利要求 3所述的控制鼠标指针移动的方法, 其特征在于, 所 述重力加速度传感器为电容式重力加速度传感器,所述测量值为所述电容式重 力加速度传感器的敏感轴的电容值。
14. 根据权利要求 3所述的控制鼠标指针移动的方法, 其特征在于, 所 述惯性器件还包括陀螺仪传感器,所述测量值为所述陀螺仪传感器的敏感轴的 电压值。
15. 根据权利要求 1所述的控制鼠标指针移动的方法, 其特征在于, 所 述重力加速度传感器至少包括两个相互垂直的敏感轴,其中一个敏感轴垂直于 地平面。
16. 一种控制鼠标指针移动的装置,利用空中鼠标控制鼠标指针的移动, 所述空中鼠标包括至少一种惯性器件, 所述惯性器件包括重力加速度传感器, 其特征在于, 包括:
报点率设定单元,用于基于所述重力加速度传感器的各个敏感轴的加速度 输出值的矢量和设定空中鼠标的报点率;
坐标确定单元, 用于确定空中鼠标的空间坐标;
转换单元,用于将所确定的空间坐标或其变化量相应转换为鼠标指针的坐 标或其变化量;
控制单元, 用于以设定的报点率输出所述鼠标指针的坐标或其变化量, 以 控制鼠标指针的移动。
17. 根据权利要求 16所述的控制鼠标指针移动的装置, 其特征在于, 所 述报点率设定单元按加速度由小到大依次设置多个档次的加速度范围,每一档 次的加速度范围对应一个报点率的设定范围,根据所述加速度输出值的矢量和 所处加速度范围的档次确定对应的报点率的设定范围,所述加速度范围的档次 越高, 对应的报点率的设定越高。
18. 根据权利要求 16所述的控制鼠标指针移动的装置, 其特征在于, 所 述坐标确定单元包括:
对应关系生成单元, 用于建立索引值与敏感轴的参数之间的对应关系, 所 述索引值与所述惯性器件的各个敏感轴的测量值所对应,所述敏感轴的参数包 括所述惯性器件的敏感轴的倾斜角及其三角函数值和 /或基于所述敏感轴的倾 斜角确定的所述惯性器件的敏感轴的坐标值;
获取单元, 用于获取所述惯性器件的各个敏感轴的测量值;
定位单元, 用于基于与获取的测量值对应的索引值查询所述对应关系, 确 定所述空中鼠标的空间坐标。
19. 根据权利要求 18所述的控制鼠标指针移动的装置, 其特征在于, 所 述敏感轴的参数包括基于所述敏感轴的倾斜角确定的所述惯性器件的敏感轴 的坐标值; 所述定位单元包括:
第一查询单元,用于基于与所获取的测量值对应的索引值查询所述对应关 系, 获得与所述索引值对应的惯性器件的敏感轴的坐标值;
第一确定单元,用于基于查询到的惯性器件的敏感轴的坐标值确定所述空 中鼠标的空间坐标。
20. 根据权利要求 18所述的控制鼠标指针移动的装置, 其特征在于, 所 述敏感轴的参数包括所述惯性器件的敏感轴的倾斜角及其三角函数值;所述定 位单元包括:
第二查询单元,用于基于与所获取的测量值对应的索引值查询所述对应关 系, 获得与所述索引值对应的敏感轴的倾斜角及其三角函数值;
第二确定单元,用于基于查询到的惯性器件的敏感轴的倾斜角及其三角函 数值, 确定所述空中鼠标的空间坐标。
21. 根据权利要求 18至 20任一项所述的控制鼠标指针移动的装置, 其 特征在于, 所述对应关系生成单元包括配置单元, 用于按倾斜角所对应的斜率 由大至小的顺序逐步降低分割精度确定所述对应关系中敏感轴的参数的配置。
22. 根据权利要求 18至 20任一项所述的控制鼠标指针移动的装置, 其 特征在于, 所述对应关系生成单元包括扩值取整单元, 用于将与所述索引值对 应的倾斜角的三角函数值扩大预定倍数并取整。
23. 根据权利要求 18至 20任一项所述的控制鼠标指针移动的装置, 其 特征在于, 还包括稳定判断单元, 用于判断敏感轴是否稳定, 包括: 若緩存区 内不同的索引值的数量小于或等于第一阈值,且各索引值之间的差值均小于或 等于第二阈值, 则确定该敏感轴稳定; 所述緩存区存有每隔预定时间所获取的 索引值; 所述定位单元以稳定的敏感轴确定所述空中鼠标的空间坐标。
24. 根据权利要求 23所述的控制鼠标指针移动的装置, 其特征在于,还 包括: 运动趋势识别单元, 用于以连续多个判断出敏感轴稳定后所获取的索引 值识别空中鼠标的运动趋势;所述报点率设定单元在所述运动趋势识别单元识 别出所述运动趋势为直线运动时, 降低所述空中鼠标的报点率。
25. 根据权利要求 24所述的控制鼠标指针移动的装置, 其特征在于, 所 述运动趋势识别单元当任意两个连续的索引值之差小于或等于第三阈值时,识 别出所述运动趋势为直线运动。
26. 根据权利要求 24所述的控制鼠标指针移动的装置, 其特征在于,还 包括插值单元, 用于对至少两个连续确定的空中鼠标的空间坐标进行插值运 算。
27. 根据权利要求 26所述的控制鼠标指针移动的装置, 其特征在于, 所 述插值单元包括选择单元、线性插值单元以及抛物线插值单元, 所述选择单元 用于当所述运动趋势识别单元识别出所述运动趋势为直线运动时,选择所述线 性插值单元进行插值运算, 否则选择所述抛物线插值单元进行插值运算。
28. 根据权利要求 18所述的控制鼠标指针移动的装置, 其特征在于, 所 述重力加速度传感器为电容式重力加速度传感器,所述测量值为所述电容式重 力加速度传感器的敏感轴的电容值。
29. 根据权利要求 18所述的控制鼠标指针移动的装置, 其特征在于, 所 述惯性器件还包括陀螺仪传感器,所述测量值为所述陀螺仪传感器的敏感轴的 电压值。
30. 一种空中鼠标, 其特征在于, 包括权利要求 16至 29任一项所述的 控制鼠标指针移动的装置。
31. 根据权利要求 30所述的空中鼠标, 其特征在于, 所述重力加速度 传感器至少包括两个相互垂直的敏感轴, 其中一个敏感轴垂直于地平面。
PCT/CN2011/081624 2011-08-29 2011-11-01 空中鼠标及控制鼠标指针移动的方法与装置 WO2013029302A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2011102506705A CN102262460B (zh) 2011-08-29 2011-08-29 空中鼠标及控制鼠标指针移动的方法与装置
CN201110250670.5 2011-08-29

Publications (1)

Publication Number Publication Date
WO2013029302A1 true WO2013029302A1 (zh) 2013-03-07

Family

ID=45009115

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/081624 WO2013029302A1 (zh) 2011-08-29 2011-11-01 空中鼠标及控制鼠标指针移动的方法与装置

Country Status (2)

Country Link
CN (1) CN102262460B (zh)
WO (1) WO2013029302A1 (zh)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049102B (zh) * 2012-10-11 2015-11-25 青岛海信电器股份有限公司 鼠标数据处理装置和鼠标数据处理方法
CN103970290A (zh) * 2013-01-30 2014-08-06 云联(北京)信息技术有限公司 一种基于云游戏的鼠标信号处理装置及方法
CN103970261B (zh) * 2013-02-05 2017-09-22 宝德科技股份有限公司 输入装置及其反应操作状态的方法
CN103207687B (zh) * 2013-04-12 2016-03-09 深圳市宇恒互动科技开发有限公司 一种修正补偿被控图形坐标的方法及系统
CN103257710B (zh) * 2013-05-06 2017-03-15 江苏惠通集团有限责任公司 空间鼠标发送鼠标数据的方法、控制鼠标指针移动的方法
CN103389807B (zh) * 2013-07-16 2016-07-06 江苏惠通集团有限责任公司 空间鼠标的数据处理方法以及鼠标指针的控制方法
CN105659195A (zh) * 2013-10-24 2016-06-08 朱春生 空中掌控输入装置和方法
TW201520829A (zh) * 2013-11-20 2015-06-01 Wintek Corp 電子輸入裝置
CN105407364B (zh) * 2015-10-27 2018-07-03 四川长虹电器股份有限公司 基于智能电视收视率体系下频道综合竞争力实现方法
CN105578259B (zh) * 2015-12-14 2018-10-19 四川长虹电器股份有限公司 一种基于智能电视下用户观影行为分类方法
CN107506052A (zh) * 2017-08-03 2017-12-22 成都弈览科技有限公司 一种通过智能手机的虚拟空鼠的方法及设备
CN107704106B (zh) * 2017-10-17 2021-04-09 宁波视睿迪光电有限公司 姿态定位方法、装置及电子设备
CN110007787A (zh) * 2019-03-21 2019-07-12 深圳点猫科技有限公司 一种基于人工智能的网络坐标系下的插值方法,存储介质以及系统
TWI746961B (zh) * 2019-04-18 2021-11-21 倚天酷碁股份有限公司 電子系統與人機互動方法
CN111309203B (zh) * 2020-01-22 2021-10-08 深圳市格上视点科技有限公司 一种鼠标光标的定位信息的获取方法及装置
CN115917481A (zh) 2020-08-18 2023-04-04 雷蛇(亚太)私人有限公司 用于控制电子设备的屏幕上的指针的装置和方法
CN112650402B (zh) * 2020-12-25 2021-08-24 广州市博大电子设备有限公司 鼠标的控制方法及其应用
CN112860136A (zh) * 2021-01-08 2021-05-28 北京字节跳动网络技术有限公司 控制电子书写装置的方法、装置、终端和存储介质
CN114675754A (zh) * 2022-01-27 2022-06-28 浪潮(山东)计算机科技有限公司 一种鼠标控制方法、装置、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200601158A (en) * 2004-06-18 2006-01-01 Chic Technology Corp High sensitivity inertial mouse
CN1804757A (zh) * 2005-01-13 2006-07-19 原相科技股份有限公司 节省电源消耗、提高信号回报速率的鼠标相关装置及方法
CN101317188A (zh) * 2006-02-22 2008-12-03 索尼株式会社 身体运动检测设备、身体运动检测方法及身体运动检测程序

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398721A (zh) * 2007-09-26 2009-04-01 昆盈企业股份有限公司 空中鼠标的光标位移速度控制方法
US8587519B2 (en) * 2009-01-07 2013-11-19 Sensor Platforms, Inc. Rolling gesture detection using a multi-dimensional pointing device
CN201576253U (zh) * 2009-10-13 2010-09-08 撒元功 一种鼠标

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200601158A (en) * 2004-06-18 2006-01-01 Chic Technology Corp High sensitivity inertial mouse
CN1804757A (zh) * 2005-01-13 2006-07-19 原相科技股份有限公司 节省电源消耗、提高信号回报速率的鼠标相关装置及方法
CN101317188A (zh) * 2006-02-22 2008-12-03 索尼株式会社 身体运动检测设备、身体运动检测方法及身体运动检测程序

Also Published As

Publication number Publication date
CN102262460B (zh) 2013-05-29
CN102262460A (zh) 2011-11-30

Similar Documents

Publication Publication Date Title
WO2013029302A1 (zh) 空中鼠标及控制鼠标指针移动的方法与装置
CN106933390B (zh) 惯性技术和超声波相结合的触控笔位姿检测方法及系统
KR101073062B1 (ko) 움직임 감지를 통한 힘 강도 및 회전 강도를 입력하는 방법 및 디바이스
US7812818B2 (en) Inertial sensing method and system
US9223422B2 (en) Remote controller and display apparatus, control method thereof
USRE46076E1 (en) Input apparatus, control apparatus, control system, control method, and handheld apparatus
JPH1185387A (ja) 姿勢入力装置、姿勢入力機能を備えるペン型入力装置及びそのペン型入力装置を有するペン型入力システム
EP2902867A1 (en) Portable apparatus and method for adjusting window size thereof
US20240152213A1 (en) Gesture detection using external sensors
WO2013029303A1 (zh) 姿态感知设备及其定位、鼠标指针的控制方法和装置
WO2013029301A1 (zh) 姿态感知设备及其定位方法、鼠标指针的控制方法
US20100259475A1 (en) Angle sensor-based pointer and a cursor control system with the same
KR100940095B1 (ko) 포인터 이동 값 계산 장치, 포인터 이동 값 보정 방법 및자세 각도 변화량 보정 방법, 이를 사용하는 3차원 포인팅디바이스
CN108762528B (zh) 适用于空中飞鼠的姿态解算方法
KR20140078681A (ko) 멀티-포인터 간접 입력 장치들을 위한 가속도-기반 상호작용 기법
TW201310298A (zh) 具軌跡偵測功能之觸控系統及方法
JP2010157106A (ja) 入力装置、制御装置、ハンドヘルド装置、制御システム及び制御方法
JP2004287473A (ja) 情報処理装置及びプログラム
CN102929410B (zh) 姿态感知设备输出控制方法及装置、显示控制方法及系统
Fahmi et al. 3d-to-2d projection algorithm for remote control using smartphone: Enhancing smartphone capability for costless wireless audio visual consumer appliance control
KR20150036967A (ko) 이미지 센서를 이용한 공간 마우스 시스템

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11871407

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11871407

Country of ref document: EP

Kind code of ref document: A1