The combination touch method of convergent-divergent and rotation, Apparatus and system
Technical field
The present invention relates to multiple point touching technology, relate in particular to combination touch method, the Apparatus and system of convergent-divergent and rotation.
Background technology
Multi-point touch panel, uses two or more different situation medium touch screen surfaces, can be perfect to realize the various multiple point touching application such as image zooming, rotation.And possess all functions and the advantage of contact tradition single-point infrared touch panel simultaneously.Be different from traditional single-point touches screen, the maximum feature of multi-point touch panel is can two hands, multiple fingers, and even multiple people are the content of function screens simultaneously, convenient and hommization.Multiple point touching technology is also multipoint-touch-technology.Multi-point touch (claim again multiplex touch control, multiple spot induction, multiplex induction, English is translated into Multi-touch) is one and is reached to the input technology of image applications control through several fingers by computer user.Be to adopt human-computer interaction technology and the common technology realizing of hardware device, can in the situation that there is no traditional input equipment (as mouse, keyboard etc.), carry out the man-machine interactive operation of computing machine.The appearance of multi-point touch is the brand-new upgrading again of user control interface after mouse occurs, this brand-new user interface, by the software support of innovation and the multi-point touch screen of super large, can easily be controlled all by finger.
Multiple point touching operation mainly contains convergent-divergent gesture and rotate gesture.Wherein, convergent-divergent gesture operation as shown in Figure 1: when two points act on touch-screen simultaneously, the distance of two points is in the operation constantly changing.Rotate gesture is grasped as shown in Figure 2: when two points act on touch-screen simultaneously, the motion track of two points has produced the operation that has radian to change.In the prior art, according to the definition of gesture of convergent-divergent and rotation, if carried out once effectively gesture operation at the point-to-point transmission of touch-screen, gesture identification result or be convergent-divergent, or be rotation.If wish to switch convergent-divergent and spinfunction, need so to finish to do again new operation after this operation.And if hope is rotated in the process of convergent-divergent or carry out convergent-divergent in the process of rotation, cannot realize so.
But, there are at present various 3D images or image processing software interface, design in manipulation process is too complicated, must use the collocation of convergent-divergent and rotate gesture to operate, even many modes of operation also rely on the quick switching of convergent-divergent and rotation, could obtain best control mode.Switch speed for fear of the induction speed on hardware and the identification of background process software may not catch up with user's operating speed, thereby the switching of convergent-divergent and rotation cannot be completed smoothly, affects user and experiences.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides combination touch method, the Apparatus and system of convergent-divergent and rotation, the realization of synchronizeing of convergent-divergent and rotate gesture be can make, thereby the hommization and the ease for use that touch operation increased.
The combination touch method that the invention provides convergent-divergent and rotation, comprising:
Create scaling matrix and rotation matrix according to the operation information of touch point;
Described scaling matrix and described rotation matrix are calculated to combinatorial matrix by matrix multiplication, use this combinatorial matrix to complete the operation of scaling and/or rotation;
The described step that described scaling matrix and described rotation matrix is calculated to combinatorial matrix by matrix multiplication, comprising:
In the time that described scaling matrix column number equals the line number of described rotation matrix, described scaling Matrix Multiplication is determined to combinatorial matrix with described rotation matrix;
The described step that described scaling matrix and described rotation matrix is calculated to combinatorial matrix by matrix multiplication, comprising:
In the time that the columns of described rotation matrix equals the line number of described scaling matrix, described rotation matrix is multiplied by described scaling matrix and determines combinatorial matrix;
The step of obtaining the scaling matrix of object, comprising:
Calculate convergent-divergent central point, convergent-divergent multiple;
Create definite scaling matrix according to described convergent-divergent central point and described convergent-divergent multiple;
The step of the described rotation matrix that obtains object, comprising:
Calculate rotary middle point, rotation radian;
Determine rotation matrix according to described rotary middle point and described rotation radian.
Correspondingly, the present invention also provides the combination touching device of convergent-divergent and rotation, comprising:
Scaling matrix creating unit, for creating scaling matrix according to the operation information of touch point;
Rotation matrix creating unit, for creating rotation matrix according to the operation information of touch point;
The combinatorial matrix creating unit being connected respectively with described scaling matrix creating unit, described rotation matrix creating unit, for calculating combinatorial matrix by described scaling matrix and described rotation matrix by matrix multiplication;
The Object Operations unit being connected with described combinatorial matrix creating unit, for using described combinatorial matrix to complete the scaling of object and/or the operation of rotation;
Described combinatorial matrix creating unit, comprising:
Multiplying unit, in the time that described scaling matrix column number equals the line number of described rotation matrix, determines combinatorial matrix by described scaling Matrix Multiplication with described rotation matrix; In the time that the columns of described rotation matrix equals the line number of described scaling matrix, described rotation matrix is multiplied by described scaling matrix and determines combinatorial matrix;
Described scaling matrix creating unit, comprising:
Scaling parameter unit, for calculating convergent-divergent central point, convergent-divergent multiple;
The scaling determining unit being connected with described scaling parameter unit, for determining scaling matrix according to described convergent-divergent central point and described convergent-divergent multiple;
Described rotation matrix creating unit, comprising:
Rotation parameter unit, for calculating rotary middle point, rotation radian;
The rotation determining unit being connected with described rotation parameter unit, for determining rotation matrix according to described rotary middle point and described rotation radian.
Correspondingly, the present invention also provides the combination touch system of convergent-divergent and rotation, comprising:
Touch point detection device, for the motion track of real-time detected touch point;
The combination touching device of convergent-divergent as above and rotation, the combination touching device of this convergent-divergent and rotation is also for making the conversion of corresponding scaling and/or rotation according to the real-time change of touch point motion track.
Implement the present invention, there is following beneficial effect:
Than the operation of conventional mouse, keyboard, multiple point touching technology of the present invention is can be more directly perceived, have more hommization realizes the function of scaling and rotation.And what system did not need to distinguish user's operation is scaling gesture or rotate gesture, uses scaling and rotation synchronously to carry out, thereby accelerated touch the speed of operation and strengthened user's operating experience.
Brief description of the drawings
Fig. 1 is the gesture schematic diagram of realizing scaling in the middle of prior art;
Fig. 2 is the gesture schematic diagram of realizing rotation in the middle of prior art;
Fig. 3 is the process flow diagram of the combination touch method of convergent-divergent of the present invention and rotation;
Fig. 4 is the embodiment schematic diagram of the combination touch method of convergent-divergent of the present invention and rotation;
Fig. 5 is the embodiment process flow diagram of the combination touch method of convergent-divergent of the present invention and rotation;
Fig. 6 is the schematic diagram of the combination touching device of convergent-divergent of the present invention and rotation;
Fig. 7 is the schematic diagram of the combination touch system of convergent-divergent of the present invention and rotation.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, the present invention is described in further detail.
Fig. 3 is the process flow diagram of the combination touch method of convergent-divergent of the present invention and rotation, comprising:
S101: create scaling matrix and rotation matrix according to the operation information of touch point;
S102: described scaling matrix and described rotation matrix are calculated to combinatorial matrix by matrix multiplication, use this combinatorial matrix to complete the operation of scaling and/or rotation.
Sliding trace by detected touch point on screen, obtains the touch information of touching medium on touch-screen.Wherein touch information comprises the unique identification value of touch point, position and the touch condition (movement is pressed, touched in touch and touch is upspring) of touch point.Create scaling matrix and rotation matrix according to the operation information of touch point, the place that this step is different from prior art is: no longer distinguishing the convergent-divergent and the gesture-type of rotation that touch in operation, is all effective but set that convergent-divergent operates with rotation.So the present invention operates compared with existing touch, there is speed faster.On the one hand, say from Background control program, the present invention has saved the operation steps of distinguishing scaling or rotation, has accelerated the processing speed of software program; On the other hand, say from hardware, can carry out to touch track the combination operation of scaling and rotation, need constantly to switch scaling and rotation in the middle of having saved prior art.For prior art, if user's operation is too fast, the reaction velocity of hardware does not catch up with, and the switching of user in scaling and rotation just may have been omitted by system so.And the present invention can process this problem better, the reaction velocity of Hoisting System in the processing power of existing hardware.
Step S102 combines scaled matrix and rotation matrix, forms new combinatorial matrix.Wherein, scaled matrix is M, and rotation matrix is N, and combinatorial matrix C equals the matrix multiple of M and N so.The coordinate of each point on object, by the conversion of combinatorial matrix, can be realized to two kinds of operations of convergent-divergent and rotation.
In the time that described scaling matrix column number equals the line number of described rotation matrix, described scaling Matrix Multiplication is determined to combinatorial matrix with described rotation matrix.
In the time that the columns of described rotation matrix equals the line number of described scaling matrix, described rotation matrix is multiplied by described scaling matrix and determines combinatorial matrix.
In the middle of prior art, scaling matrix and rotation matrix can be determined in several ways.For example, for scaling matrix, due to the difference at scaling center, can create out different scaling matrixes.Again for example, as shown in Figure 2, in the middle of prior art, also there is multiple definite mode for rotation matrix.The present invention can adopt existing scaling matrix and rotation matrix, but, in view of needing to apply to the computing of matrix multiplication in the middle of step S202, and the line number of the condition precedent of two matrix multiples to be matrix column numbers equal another matrix equates, so, the present invention, according to the ranks difference of scaling matrix and rotation matrix, adopts different combinatorial matrixs to determine method, i.e. C=M × N or C=N × M.In the time that scaling matrix and rotation matrix are n rank square formation, can adopt M × N or N × M, may be different although calculate the combinatorial matrix obtaining, final operating result can be identical.
Fig. 4 is the embodiment schematic diagram of the combination touch method of convergent-divergent of the present invention and rotation; Fig. 4 lists a simple example; embody principle of the present invention; Fig. 4 only as example can not represent of the present invention all, any improvement based on the principle of the invention, be equal within replacement all belongs to protection scope of the present invention.
Fig. 5 is the embodiment process flow diagram of the combination touch method of convergent-divergent of the present invention and rotation, and compared with Fig. 3, Fig. 5 is concrete enforcement refinement step process flow diagram.Further illustrate below in conjunction with Fig. 4, Fig. 5.
S201: calculate in real time convergent-divergent central point, convergent-divergent multiple.
S202: create definite scaling matrix according to described convergent-divergent central point and described convergent-divergent multiple.
S203: calculate in real time rotary middle point, rotation radian.
S204: determine rotation matrix according to described rotary middle point and described rotation radian.
S205: described scaling matrix and described rotation matrix are calculated to combinatorial matrix by matrix multiplication, use this combinatorial matrix to complete the operation of scaling and/or rotation.
It should be noted that, create scaled matrix according to convergent-divergent central point and convergent-divergent multiple, create rotation matrix according to rotary middle point and rotation radian.Unlike the prior art, in the middle of single job track, existing scaling center or rotation center can not change.Only, in the middle of next operation, system is meeting resampling, redefines scaling matrix or rotation matrix.And the present invention can calculate rotation center and scaling center in real time, according to user's operation trace, described rotation center is not necessarily identical with described scaling center, can switch according to user's wish easily.Simple example, supposes as shown in Figure 2, and the rotation mode on the left side is referred to as 2 rotations, and the rotation mode on the right is referred to as single-point rotation.So, the present invention can be in the middle of single job track, realize amplify and the operation of single-point rotation to dwindling and the effect of the operation of 2 rotations is switched.In like manner, also can realize the effect switching of similar functions.These are all that prior art is difficult to match in excellence or beauty.
Preferably, how to convert by combinations thereof matrix below in conjunction with Fig. 4 description object P.Vector point P can use coordinate figure (x, y, z, 1) to represent, wherein x, and y, z represents respectively the coordinate figure of X-axis, Y-axis, Z axis, and wherein Z axis represents three-dimensional Z coordinate, and this example is X-Y scheme, so Z gives certain steady state value 1.Be not difficult to find out, the present invention can expand to even more high latitude of three-dimensional.
Any given 1 P1, supposes starting point vector P1=(2,3,1,1).As can be seen from Figure 4, this operation belongs to single-point rotation, and its mid point A (4,0) is rotation center, and some B (4,2) is initial point, and some C (0,0) is terminal.Due to AC=2AB, so, can determine the operation that is originally operating as amplification and single-point rotation, wherein, enlargement factor is 2, the anglec of rotation is for being rotated counterclockwise 90 °.
In sum, in Fig. 4, scaled matrix M is:
Rotation matrix N is:
Wherein@=pi/2;
Point P2=P1 × (M × N) after combination so; Point P2=(4cos@-3sin@, 4sin@+3cons@, 1,1) after calculating.Object is expressed and can be realized convergent-divergent and spinfunction with the some P2 after combination.Preferably, the present invention consists of quadravalence square formation scaling matrix and rotation matrix are determined combinatorial matrix.
Fig. 6 is the schematic diagram of the combination touching device of convergent-divergent of the present invention and rotation, comprising:
Scaling matrix creating unit, for creating scaling matrix according to the operation information of touch point;
Rotation matrix creating unit, for creating rotation matrix according to the operation information of touch point;
The combinatorial matrix creating unit being connected respectively with described scaling matrix creating unit, described rotation matrix creating unit, for calculating combinatorial matrix by described scaling matrix and described rotation matrix by matrix multiplication;
The Object Operations unit being connected with described combinatorial matrix creating unit, for using described combinatorial matrix to complete the scaling of object and/or the operation of rotation.
Combinatorial matrix creating unit as described in Figure 6, comprising:
Multiplying unit, in the time that described scaling matrix column number equals the line number of described rotation matrix, determines combinatorial matrix by described scaling Matrix Multiplication with described rotation matrix; In the time that the columns of described rotation matrix equals the line number of described scaling matrix, described rotation matrix is multiplied by described scaling matrix and determines combinatorial matrix.
Scaling matrix creating unit as described in Figure 6, comprising:
Scaling parameter unit, for calculating convergent-divergent central point, convergent-divergent multiple;
The scaling determining unit being connected with described scaling parameter unit, for determining scaling matrix according to described convergent-divergent central point and described convergent-divergent multiple.
Rotation matrix creating unit as described in Figure 6, comprising:
Rotation parameter unit, for calculating rotary middle point, rotation radian;
The rotation determining unit being connected with described rotation parameter unit, for determining rotation matrix according to described rotary middle point and described rotation radian.
Fig. 7 is the schematic diagram of the combination touch system of convergent-divergent of the present invention and rotation, comprising:
Touch point detection device, for the motion track of real-time detected touch point;
The combination touching device of foregoing convergent-divergent and rotation, the combination touching device of this convergent-divergent and rotation is also for making the conversion of corresponding scaling and/or rotation according to the real-time change of touch point motion track.
In the middle of prior art, convergent-divergent central point and rotary middle point are all changeless, and in the present invention, convergent-divergent central point and rotary middle point all can change at any time.So, scaled matrix and rotation matrix are not simple combinations, but need to be according to up-to-date touch information, calculate in real time convergent-divergent central point and rotary middle point after variation, again scaled matrix and rotation matrix after changing are combined, form new combinatorial matrix.So the real-time synchronization that the combination touch system of convergent-divergent of the present invention and rotation can be realized scaling and rotation easily switches, and allows user obtain more enjoyment in manipulation process.Therefore, multipoint-touch-technology of the present invention is expected to replace current used keyboard, mouse, will further embody the future trend of hommization operating and controlling interface.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential hardware platform by software and realize, and can certainly all implement by hardware.Based on such understanding, what technical scheme of the present invention contributed to background technology can embody with the form of software product in whole or in part, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the present invention or embodiment.
Above-described embodiment of the present invention, does not form limiting the scope of the present invention.Any amendment of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in claim protection domain of the present invention.