CN104598155B - A kind of smoothing processing method and device for touch-screen curve of output - Google Patents
A kind of smoothing processing method and device for touch-screen curve of output Download PDFInfo
- Publication number
- CN104598155B CN104598155B CN201510053708.8A CN201510053708A CN104598155B CN 104598155 B CN104598155 B CN 104598155B CN 201510053708 A CN201510053708 A CN 201510053708A CN 104598155 B CN104598155 B CN 104598155B
- Authority
- CN
- China
- Prior art keywords
- point
- output
- distance
- movement tendency
- history samples
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
Abstract
A kind of smoothing processing method and device provided by the invention, including:Obtain current sampling point;Based on current sampling point, reference point and future position, the first movement tendency from reference point to future position and the second movement tendency from reference point to current sampling point are obtained respectively;Wherein, reference point is the point based on the obtained reflecting history sampling situations of history samples point;Future position be the movement locus based on history samples point to reference point, the point predicted;Output point is determined using the first movement tendency and the second movement tendency.Compared with prior art, the present invention arrives current sampling point respectively with reference to reference point and the movement tendency of future position is handled, and determines output point, has considered current sampling point and history samples point.Therefore the adjust automatically ability of the present invention is stronger, can rapidly track actual touch point, can achieve the effect that desired smooth curve so as to fulfill under arbitrary setting-out speed.
Description
Technical field
The present invention relates to touch screen technology field, more specifically to a kind of for the smooth of touch-screen curve of output
Processing method and processing device.
Background technology
With the extensive use of touch-screen, some problems also occur therewith, for the smoothing processing of touch-screen curve of output
Problem is one of them.
For the smoothing processing of curve of output, the technological means of generally use is existing touch-screen:Using reference point and
Current sampling point determines output point.Under normal circumstances mainly output point, reference point are determined using the location information of current sampling point
Effect be weakened, therefore cannot be automatically adjusted, only can be only achieved under specific setting-out speed preferably flat in time
Sliding curve, if user's setting-out speed is slower, the sawtooth for exporting lines can be than more serious, as shown in Figure 1;If user's setting-out is fast
Degree is very fast, and the hysteresis for exporting lines can be than more serious, as shown in Figure 2.
It can reach under arbitrary setting-out speed as can be seen that existing in the prior art and can not realize from above-mentioned narration
The problem of desired smooth curve.
The content of the invention
The object of the present invention is to provide a kind of smoothing processing method and device, solve can not realize in the prior art it is in office
The problem of can reaching desired smooth curve under meaning setting-out speed.
To achieve these goals, the present invention provides following technical solution:
A kind of smoothing processing method, the described method includes:
Obtain current sampling point;
Based on the current sampling point, reference point and future position, obtained respectively from the reference point to the future position
First movement tendency and from the reference point to the second movement tendency of the current sampling point;Wherein, the reference point is base
In the point of the obtained reflecting history sampling situations of history samples point;The future position be based on the history samples point arrive described in
The movement locus of reference point, the point predicted;
Output point is determined using first movement tendency and second movement tendency.
Preferably, it is described to determine output point using first movement tendency and second movement tendency, including:
Second movement tendency is decomposed, obtains first parallel with the direction of motion of first movement tendency
Component and the second component vertical with the direction of motion of first movement tendency;
First component and the second component are modified respectively, obtain the first correction amount and the second correction amount;
Wherein, the amendment degree to the second component is less than to the amendment degree of first component;
The current sampling point is modified using first correction amount and second correction amount, is obtained described defeated
Go out a little.
Preferably, first movement tendency obtained respectively from the reference point to the future position and from the ginseng
Examination point to the current sampling point the second movement tendency, including:
First movement tendency is determined using the angle and distance between the reference point and the future position;Using described
Angle and distance between reference point and the current sampling point determines second movement tendency.
Preferably, it is described to obtain current sampling point, including:
It is the current sampling point to determine touch point;
The reference point for reflecting the history samples situation is obtained based on the history samples point, including:
By obtaining the history samples point in sampling table;
Obtain abscissa, ordinate and the number of the history samples point, and according to the abscissa of the history samples point,
Ordinate and number are calculated with reference to abscissa and with reference to ordinate;
The reference point is determined according to the reference abscissa and the ordinate that refers to;
Based on the movement locus of the history samples point to the reference point, prediction obtains the future position, including:
Calculate the angle and distance between the history samples point of arbitrary neighborhood two;
It is calculated according to angle, the number of distance and history samples point between the two neighboring history samples point
The distance of the angle angle and the predicted vector of predicted vector and horizontal direction;
It is determined according to the distance of the angle angle and the predicted vector of the predicted vector and horizontal direction described pre-
Measuring point.
Preferably, the method further includes the process that pre-establishes of the sampling table, and the process that pre-establishes includes:
Predetermined quantity is set;
Current sampling point corresponding with fixed output point is stored as the history samples point to the sampling table
In;
If the number of history samples point described in the sampling table reaches the predetermined quantity, often store described in one
While history samples point, the stored one history samples point at first is deleted in the sampling table.
Preferably, it is described to determine output point using first movement tendency and second movement tendency, including:
The direction of first movement tendency is determined as first direction of motion, distance is the first move distance;Determine institute
The direction of the second movement tendency is stated as second direction of motion, distance is the second move distance;
Utilize the first weight, first direction of motion, first move distance, second direction of motion and described
Second move distance calculates output distance, wherein, first weight exists for the current sampling point and history samples point
Parallel to the emphasis degree ratio on the direction of first direction of motion;
Outbound course is calculated using the second weight, first direction of motion and second direction of motion, wherein, it is described
Second weight is the current sampling point and history samples point in the note on the direction of first direction of motion
Weight degree ratio;
It is calculated using the reference abscissa, the output distance, the outbound course and first direction of motion defeated
Go out abscissa;
It is calculated using the reference ordinate, the output distance, the outbound course and first direction of motion defeated
Go out ordinate;
The output point is determined according to the output abscissa and the output ordinate.
A kind of smooth processing unit, including:
First acquisition module, for obtaining current sampling point;
Second acquisition module for being based on the current sampling point, reference point and future position, is obtained respectively from the reference
Point is to the first movement tendency of the future position and from the reference point to the second movement tendency of the current sampling point;Its
In, the reference point is the point based on the obtained reflecting history sampling situations of history samples point;The future position is based on institute
History samples point is stated to the movement locus of the reference point, the point predicted;
Determining module, for determining output point using first movement tendency and second movement tendency.
Preferably, the determining module includes:
Resolving cell for being decomposed to second movement tendency, obtains the movement with first movement tendency
The first parallel component of direction and the second component vertical with the direction of motion of first movement tendency;
First amending unit for being modified respectively to first component and the second component, obtains first and repaiies
Positive quantity and the second correction amount;Wherein, the amendment degree to the second component is less than to the amendment degree of first component;
Second amending unit, for being clicked through using first correction amount and second correction amount to the present sample
Row is corrected, and obtains output point.
Preferably, second acquisition module includes:
First determination unit, for determining described first using the angle and distance between the reference point and the future position
Movement tendency;
Second determination unit, it is described for being determined using the angle and distance between the reference point and the current sampling point
Second movement tendency.
Preferably, first acquisition module includes:
3rd determination unit, for determining that touch point is the current sampling point;
Second acquisition module includes:
4th determination unit, for by obtaining the history samples point in sampling table;Obtain the horizontal stroke of the history samples point
Coordinate, ordinate and number, and calculated according to the abscissa, ordinate and number of the history samples point with reference to abscissa and ginseng
Examine ordinate;And the reference point is determined according to the reference abscissa and the ordinate that refers to;
5th determination unit, for calculating angle and distance between the history samples point of arbitrary neighborhood two;According to
The number of angle, distance and history samples point between the two neighboring history samples point calculates predicted vector and water
Square to angle angle and the predicted vector distance;And the angle angle according to the predicted vector and horizontal direction
The distance of degree and the predicted vector determines the future position.
Preferably, described device, which further includes, pre-establishes module, and the module that pre-establishes includes:
Setup module, for setting predetermined quantity;
Memory module, for current sampling point corresponding with fixed output point to be stored as the history samples point
Into the sampling table;
Removing module, if the number for history samples point described in the sampling table reaches the predetermined quantity,
While often storing a history samples point, the stored history samples at first are deleted in the sampling table
Point.
Preferably, the determining module includes:
6th determination unit, for determining the direction of first movement tendency as first direction of motion, distance is the
One move distance;And the direction of second movement tendency is determined as second direction of motion, distance is the second move distance;
First computing unit, for utilizing the first weight, first direction of motion, first move distance, described
Second direction of motion and second move distance calculate output distance, wherein, first weight is the current sampling point
With emphasis degree ratio of the history samples point in the direction parallel to first direction of motion;
Second computing unit, for being calculated using the second weight, first direction of motion and second direction of motion
Outbound course, wherein, second weight is the current sampling point and history samples point perpendicular to the described first fortune
Emphasis degree ratio on the direction in dynamic direction;
3rd computing unit, for using it is described with reference to abscissa, the output distance, the outbound course and described the
One direction of motion calculates output abscissa;
4th computing unit, for using it is described with reference to ordinate, the output distance, the outbound course and described the
One direction of motion calculates output ordinate;
7th determination unit, for determining the output point according to the output abscissa and the output ordinate.
A kind of smoothing processing method and device provided by the invention, including:Obtain current sampling point;Based on present sample
Point, reference point and future position obtain the first movement tendency from reference point to future position and from reference point to present sample respectively
Second movement tendency of point;Wherein, reference point is the point based on the obtained reflecting history sampling situations of history samples point;Prediction
It puts as the movement locus based on history samples point to reference point, the point predicted;It is moved using the first movement tendency and second
Trend determines output point.Compared with prior art, the present invention combines the movement that reference point arrives current sampling point and future position respectively
Trend is handled, and determines output point, has considered current sampling point and history samples point.Therefore the adjust automatically of the present invention
Ability is stronger, can rapidly track actual touch point, can reach desired smooth so as to fulfill under arbitrary setting-out speed
The effect of curve.
Description of the drawings
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art, without creative efforts, can also utilize
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the schematic shapes that lines are exported when user's setting-out speed is slower in the prior art;
Fig. 2 be in the prior art user's setting-out speed when export lines schematic shapes;
Fig. 3 is a kind of flow chart of smoothing processing method provided in an embodiment of the present invention;
Fig. 4 is the signal for determining predicted vector in a kind of smoothing processing method provided in an embodiment of the present invention using fitting process
Figure;
Fig. 5 is that utilization orientation and distance carry out motion artifacts in a kind of smoothing processing method provided in an embodiment of the present invention
The schematic diagram of decomposition;
Fig. 6 is the first flow chart of step S33 in a kind of smoothing processing method provided in an embodiment of the present invention;
Fig. 7 is the realization process that step S33 is illustrated in a kind of smoothing processing method provided in an embodiment of the present invention
Schematic diagram;
Fig. 8 is to obtain the stream of reference point based on history samples point in a kind of smoothing processing method provided in an embodiment of the present invention
Cheng Tu;
Fig. 9 is the movement based on history samples point to reference point in a kind of smoothing processing method provided in an embodiment of the present invention
Trajectory predictions obtain the flow chart of future position;
Figure 10 is second of flow chart of step S33 in a kind of smoothing processing method provided in an embodiment of the present invention;
Figure 11 is the flow for pre-establishing process of sampling table in a kind of smoothing processing method provided in an embodiment of the present invention
Figure;
Figure 12 is the schematic diagram of the realization process of step S113 in a kind of smoothing processing method provided in an embodiment of the present invention;
Figure 13 is a kind of structure diagram of smooth processing unit provided in an embodiment of the present invention;
Figure 14 is the first structure diagram of determining module in a kind of smooth processing unit provided in an embodiment of the present invention;
Figure 15 is second of structure diagram of determining module in a kind of smooth processing unit provided in an embodiment of the present invention;
Figure 16 is the structure diagram that module is pre-established in a kind of smooth processing unit provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work
Embodiment belongs to the scope of protection of the invention.
Referring to Fig. 3, it illustrates a kind of flow charts of smoothing processing method provided in an embodiment of the present invention, can wrap
It includes:
S31:Obtain current sampling point.
S32:Based on current sampling point, reference point and future position, the first movement from reference point to future position is obtained respectively
Trend and the second movement tendency from reference point to current sampling point;Wherein, reference point is obtained based on history samples point
The point of reflecting history sampling situations;Future position be the movement locus based on history samples point to reference point, the point predicted.
Reference point and predicted vector can be determined by history samples point, and then determines future position.Wherein, predicted vector is
The vector obtained using history samples point using certain computing, can include distance and direction, the method for statistical forecast vector compared with
More such as famous Kalman filterings or the expectation equation using each component of fitting process prediction.Wherein, fitting process is utilized
It predicts the expectation equation of each component, is specially:It is assumed that there is the common n history samples points of P1 to Pn, calculate P2 with
The X-coordinate difference and Y-coordinate of P1 is poor, and the X-coordinate difference and Y-coordinate of calculating P3 and P2 is poor, and so on, calculate Pn's and Pn-1
X-coordinate difference and Y-coordinate are poor, and difference between any two averaged to obtain single order predicted vector, this predicted vector possesses X points
Amount and Y-component.History samples point can be fitted to the predicted vector or other forms of higher order using similar method
Curvilinear equation.During statistics or fitting, the phenomenon that movement, can be resolved into other components, such as utilization orientation and distance
Instead of X-coordinate and Y-coordinate, as shown in Figure 5.
S33:Output point is determined using the first movement tendency and the second movement tendency.
A kind of smoothing processing method provided by the invention, including:Obtain current sampling point;Based on current sampling point, reference
Point and future position obtain the first movement tendency from reference point to future position and the from reference point to current sampling point respectively
Two movement tendencies;Wherein, reference point is the point based on the obtained reflecting history sampling situations of history samples point;Future position is base
In the movement locus of history samples point to reference point, the point predicted;It is true using the first movement tendency and the second movement tendency
Determine output point.Compared with prior art, the present invention combine reference point arrive respectively the movement tendency of current sampling point and future position into
Row processing, determines output point, has considered current sampling point and history samples point.Therefore the present invention adjust automatically ability compared with
By force, actual touch point can be rapidly tracked, can reach desired smooth curve so as to fulfill under arbitrary setting-out speed
Effect.
Referring to Fig. 6, the first of step S33 flows in a kind of smoothing processing method provided it illustrates above-described embodiment
Cheng Tu may comprise steps of:
S61:Second movement tendency is decomposed, obtains first point parallel with the direction of motion of the first movement tendency
Amount and the second component vertical with the direction of motion of the first movement tendency.
S62:First component and second component are modified respectively, obtain the first correction amount and the second correction amount;Wherein,
It is less than the amendment degree to second component to the amendment degree of the first component.
Can be to repair by force to the amendment of second component it should be noted that can be weak amendment to the amendment of the first component
Just.
Illustrate above-mentioned steps:During certain is once sampled, obtained contact position is sampled as shown in Figure 7 " current
The position actually touched (is not fully reacted in the position of current sampling point) in sampled point " position, obtains the second movement tendency and
Second movement tendency is decomposed to obtain the component of the traffic direction parallel to the first movement tendency as shown in FIG. by one movement tendency
(dpar) and the direction of motion perpendicular to the first movement tendency component (dper).Component perpendicular to the first movement tendency is more noted
Weight is by reference to point prediction as a result, correct by force it, and amendment current sampling point is perpendicular to point of the first movement tendency
It measures as fper, more focus on the actual samples of current sampling point as a result, carrying out weak repair to it parallel to the component of the first movement tendency
Just, it is f to correct current sampling point parallel to the component of the first movement tendencypar。
S63:Current sampling point is modified using the first correction amount and the second correction amount, obtains output point.
In above-mentioned steps, the second movement tendency is resolved into first component parallel with the first movement tendency direction first
The second component vertical with the first movement tendency direction, the first component carry out weak amendment and obtain the first correction amount, transported to second
Dynamic trend carries out strong correct and obtains the second correction amount, and finally current sampling point is carried out using the first correction amount and the second correction amount
It corrects, obtains output point.It can be seen that it is to determine its corrected strength using actual conditions when being smoothed to different components
, the output point thereby determined that is more accurate, and curve of output is also smoother.
It should be noted that the touch point that can determine user and screen contact is current sampling point;As shown in figure 8, base
The process of the reference point of reflecting history sampling situations is obtained in history samples point to be included:
S81:By obtaining history samples point in sampling table.
S82:Abscissa, ordinate and the number of history samples point are obtained, and according to the abscissa of history samples point, vertical seat
Mark and number are calculated with reference to abscissa and with reference to ordinate.
It can be respectively calculated according to the following formula with reference to abscissa and with reference to ordinate:
Wherein, XrIt represents with reference to abscissa, YrRepresent that, with reference to ordinate, n represents the number of history samples point, XiRepresent i-th
The abscissa of a history samples point, YiRepresent the ordinate of i-th of history samples point.
S83:Reference point is determined according to reference to abscissa and with reference to ordinate.
Reference point can be determined according to the following formula:
Pr=(Xr,Yr)
Wherein, PrRepresent reference point, XrIt represents with reference to abscissa, YrIt represents with reference to ordinate.
It refers to shown in Fig. 9, it illustrates adopted in a kind of smoothing processing method provided in an embodiment of the present invention based on history
Sampling point is predicted to the movement locus of reference point and obtains the flow chart of future position, can include:
S91:Calculate the angle and distance between two history samples points of arbitrary neighborhood.
S92:Prediction is calculated according to angle, the number of distance and history samples point between two neighboring history samples point
Vector and the angle angle of horizontal direction and the distance of predicted vector.
It should be noted that step S91 and step S92 can be calculated according to the following formula:
Wherein, AyRepresent the angle angle of predicted vector and horizontal direction, Angle (Pi-Pi-1) represent history samples point Pi
To history samples point Pi-1Between angle, LyRepresent the distance of predicted vector, Length (Pi-Pi-1) represent history samples point Pi
To history samples point Pi-1The distance between, n represents the number of history samples point.
S93:Future position is determined according to the distance of the angle angle and predicted vector of predicted vector and horizontal direction.
It is predicted vector according to reference point to the vector between future position, further determines that future position.
In addition, obtaining the first movement tendency from reference point to future position respectively and from reference point to current sampling point
Second movement tendency can include:
The first movement tendency is determined using the angle and distance between reference point and future position;Utilize reference point and present sample
Angle and distance between point determines the second movement tendency.
It can determine the direction of the first movement tendency and the side of distance and the second movement tendency respectively according to the following formula
To and distance, and then the first movement tendency and the second movement tendency are determined according to its direction and distance respectively:
Ap=Angle (Pr-Py)
Lp=Length (Pr-Py)
Ac=Angle (Pr-Pc)
Lc=Length (Pr-Pc)
Wherein, ApRepresent the direction of the first movement tendency, LpRepresent the distance of the first movement tendency, AcRepresent the second movement
The direction of trend, LcRepresent the distance of the second movement tendency, PcRepresent current sampling point, PyRepresent future position, PrRepresent reference
Point, Angle (Pr-Py) represent angle angle between reference point and future position, Length (Pr-Py) represent reference point and prediction
The distance between point, Angle (Pr-Pc) represent angle angle between reference point and current sampling point;Length(Pr-Pc) table
Show the distance between reference point and current sampling point.
Referring to Fig. 10, second it illustrates step S33 in a kind of smoothing processing method provided in an embodiment of the present invention
Kind flow chart, can include:
S101:The direction of the first movement tendency is determined as first direction of motion, distance is the first move distance;Determine
The direction of two movement tendencies is second direction of motion, and distance is the second move distance.
S102:Using the first weight, first direction of motion, the first move distance, second direction of motion and second movement away from
With a distance from calculating output, wherein, the first weight is current sampling point and history samples point in the side parallel to first direction of motion
Upward emphasis degree ratio.
It should be noted that the output distance in the present embodiment is the reference point in the direction parallel to first direction of motion
Distance between output point.
Output distance can be calculated according to the following formula:
Wherein, L0Represent output distance,Represent the first weight, meanings that other letters represent in formula with it is above-mentioned
The meaning that same letter represents in the formula of embodiment is identical.In addition, in order to obtain better effect, the first weight can be more than
1, while the value of the first weight should be adjusted as needed.
S103:Outbound course is calculated using the second weight, first direction of motion and second direction of motion, wherein, the second power
Weight is current sampling point and history samples point in the emphasis degree ratio on the direction of first direction of motion.
It should be noted that the outbound course in the present embodiment refers to the reference point in the direction parallel to first direction of motion
Angle between output point.
Outbound course can be determined according to the following formula:
Wherein, A0Represent outbound course,Represent the second weight, meanings that other letters represent in formula with it is above-mentioned
The meaning that same letter represents in the formula of embodiment is identical.In addition, in order to obtain better effect, the second weight can be less than
0.5, while the value of the second weight should be adjusted as needed.
S104:Output abscissa is calculated using with reference to abscissa, output distance, outbound course and first direction of motion.
Output abscissa can be calculated according to the following formula:
Wherein, X0Represent output abscissa, meanings that other letters represent in formula in the formula of above-described embodiment
The meaning that same letter represents is identical.
S105:Output ordinate is calculated using with reference to ordinate, output distance, outbound course and first direction of motion.
Output ordinate can be calculated according to the following formula:
Wherein, Y0Represent output ordinate, meanings that other letters represent in formula in the formula of above-described embodiment
The meaning that same letter represents is identical.
S106:Output point is determined according to output abscissa and output ordinate.
Output point can be determined according to the following formula:
P0=(X0,Y0)
Wherein, P0Represent output point, X0Represent output abscissa, Y0Represent output ordinate.
A kind of smoothing processing method that above-described embodiment provides has considered current sampling point and history samples point so that
Definite output point is more accurate, and can realize can achieve the effect that desired smooth curve under arbitrary setting-out speed.
It should be noted that history samples point can be by obtaining in sampling table, therefore one kind that above-described embodiment provides is put down
Sliding processing method can also pre-establish process including sampling table, please refer to Fig.1 shown in 1, sampling table pre-establishes process
It may comprise steps of:
S111:Predetermined quantity is set.
Predetermined quantity in the present embodiment is a specific number, can be manually set, represent at most deposit in sampling table
The number of the history samples point of storage.
S112:Current sampling point corresponding with fixed output point is stored as history samples point into sampling table.
A current sampling point can be obtained using touch point, after output point corresponding with this current sampling point is determined, by this
Current sampling point is stored in as history samples point in sampling table.
S113:If the number of history samples point reaches predetermined quantity in sampling table, a history samples point is often stored
While, delete stored history samples point at first in sampling table.
As shown in figure 12, sampling table can be regarded to a sliding window as, when the number of history samples point reaches predetermined number
It during amount, to be stored whenever there are one new history samples point, that is, last samples points, a stored history at first in sampling table
Sampled point, that is, oldest sampled point is just deleted.
During the pre-establishing of sampling table, it is stored in the current sampling point for having determined that output point as history samples point
In sampling table, and the history samples point number in sampling table is limited, so that determine output point when only with present sample
The nearer history samples point of point interlude as reference because history samples point earlier is to the reference price of current sampling point
It is worth and little, it could even be possible to playing reaction.It is being determined so limited a history samples point is only taken more to ensure that as reference
Accuracy during output point.
3 are please referred to Fig.1, it illustrates a kind of smooth processing unit provided in an embodiment of the present invention, including:
First acquisition module 11, for obtaining current sampling point.
Second acquisition module 12 for being based on current sampling point, reference point and future position, is obtained respectively from reference point to pre-
First movement tendency of measuring point and the second movement tendency from reference point to current sampling point;Wherein, reference point is based on history
The point of the obtained reflecting history sampling situations of sampled point;Future position is the movement locus based on history samples point to reference point,
Predict obtained point.
Determining module 13, for determining output point using the first movement tendency and the second movement tendency.
A kind of smooth processing unit combination reference point provided in this embodiment arrives the fortune of current sampling point and future position respectively
Dynamic trend is handled, and determines output point, has considered current sampling point and history samples point.Therefore its adjust automatically ability
It is relatively strong, actual touch point can be rapidly tracked, can reach desired smooth curve so as to fulfill under arbitrary setting-out speed
Effect.
4 are please referred to Fig.1, it illustrates the first structure diagrams of the determining module 13 in above-described embodiment, determine mould
Block 13 can include:
Resolving cell 141 for decomposing the second movement tendency, obtains putting down with the direction of motion of the first movement tendency
The first capable component and the second component vertical with the direction of motion of the first movement tendency.
First amending unit 142, for being modified respectively to the first component and second component, obtain the first correction amount and
Second correction amount;Wherein, the amendment degree to second component is less than to the amendment degree of the first component.
Second amending unit 143, for being modified using the first correction amount and the second correction amount to current sampling point, is obtained
To output point.
The second movement tendency is resolved into first component parallel with the first movement tendency direction first and is moved with first
The vertical second component in trend direction, the first component carry out weak amendment and obtain the first correction amount, the second movement tendency are carried out strong
Amendment obtains the second correction amount, and finally current sampling point is modified using the first correction amount and the second correction amount, obtains defeated
Go out a little.It can be seen that being to determine its corrected strength using actual conditions when being smoothed to different components, thereby determine that
Output point it is more accurate, curve of output is also smoother.
It should be noted that the first acquisition module 11 can include the 3rd determination unit, the 3rd determination unit is used to determine
Touch point is current sampling point.
In addition, the second acquisition module 12 can include the first determination unit, the second determination unit, the 4th determination unit and the
Five determination units, wherein:
4th determination unit is used for by obtaining history samples point in sampling table;Obtain the abscissa of history samples point, vertical seat
Mark and number, and calculated according to the abscissa, ordinate and number of history samples point with reference to abscissa and with reference to ordinate;And
Reference point is determined according to reference to abscissa and with reference to ordinate.
5th determination unit is used to calculate the angle and distance between two history samples points of arbitrary neighborhood;According to adjacent two
The number of angle, distance and history samples point between a history samples point calculates the angle angle of predicted vector and horizontal direction
The distance of degree and predicted vector;It is and true according to the distance of the angle angle and predicted vector of predicted vector and horizontal direction
Determine future position.
First determination unit, for determining the first movement tendency using the angle and distance between reference point and future position.
Second determination unit, for determining that the second movement becomes using the angle and distance between reference point and current sampling point
Gesture.
5 are please referred to Fig.1, it illustrates of determining module 13 in a kind of smooth processing unit provided in an embodiment of the present invention
Two kinds of structure diagrams, can include:
6th determination unit 151, for determining the direction of the first movement tendency as first direction of motion, distance is first
Move distance;And the direction of the second movement tendency is determined as second direction of motion, distance is the second move distance.
First computing unit 152, for utilizing the first weight, first direction of motion, the first move distance, the second movement side
To and the second move distance calculate output distance, wherein, the first weight is current sampling point and history samples point parallel to the
Emphasis degree ratio on the direction of one direction of motion.
Second computing unit 153, for calculating output side using the second weight, first direction of motion and second direction of motion
To, wherein, the second weight is current sampling point and history samples point in the emphasis journey on the direction of first direction of motion
Degree ratio.
3rd computing unit 154, by utilizing with reference to based on abscissa, output distance, outbound course and first direction of motion
Calculate output abscissa.
4th computing unit 155, by utilizing with reference to based on ordinate, output distance, outbound course and first direction of motion
Calculate output ordinate.
7th determination unit 156, for determining output point according to output abscissa and output ordinate.
A kind of smooth processing unit that above-described embodiment provides has considered current sampling point and history samples point so that
Definite output point is more accurate, and can realize can achieve the effect that desired smooth curve under arbitrary setting-out speed.
Further, since history samples point can be by obtaining in sampling table, therefore one kind that above-described embodiment provides smoothly is located
Reason device can also pre-establish module including sampling table, please refer to Fig.1 shown in 6, pre-establishing module can include:
Setting unit 161, for setting predetermined quantity.
Storage unit 162, for current sampling point corresponding with fixed output point to be stored as history samples point
Into sampling table.
Unit 163 is deleted, if the number for history samples point in sampling table reaches predetermined quantity, often stores one
While history samples point, stored history samples point at first in sampling table is deleted.
The sampling table for pre-establishing module foundation and being stored with history samples point provided through this embodiment, will have determined that defeated
The current sampling point gone out a little is stored in as history samples point in sampling table, and the history samples point number in sampling table is limited,
So so that determine output point when only with the history samples point nearer with current sampling point interlude as reference because
History samples point earlier is to the reference value of current sampling point and little, it could even be possible to playing reaction.So it only takes
Limit history samples point more ensure that the accuracy when determining output point as reference.
The foregoing description of the disclosed embodiments enables those skilled in the art to realize or use the present invention.To this
A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can
Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited
The embodiments shown herein is formed on, and is to fit to consistent with the principles and novel features disclosed herein most wide
Scope.
Claims (10)
1. a kind of smoothing processing method for touch-screen curve of output, which is characterized in that the described method includes:
Obtain current sampling point;
Based on the current sampling point, reference point and future position, first from the reference point to the future position is obtained respectively
Movement tendency and from the reference point to the second movement tendency of the current sampling point;Wherein, the reference point is based on going through
The point of the obtained reflecting history sampling situations of history sampled point;The future position is based on the history samples point to the reference
The movement locus of point, the point predicted;Described is determined using the angle and distance between the reference point and the future position
One movement tendency;Second movement tendency is determined using the angle and distance between the reference point and the current sampling point;
Output point is determined using first movement tendency and second movement tendency.
2. according to the method described in claim 1, it is characterized in that, described transported using first movement tendency with described second
Dynamic trend determines output point, including:
Second movement tendency is decomposed, obtains first point parallel with the direction of motion of first movement tendency
Amount and the second component vertical with the direction of motion of first movement tendency;
First component and the second component are modified respectively, obtain the first correction amount and the second correction amount;Wherein,
It is less than the amendment degree to the second component to the amendment degree of first component;
The current sampling point is modified using first correction amount and second correction amount, obtains the output
Point.
3. according to the method described in claim 1, it is characterized in that, described obtain current sampling point, including:
It is the current sampling point to determine touch point;
The reference point for reflecting the history samples situation is obtained based on the history samples point, including:
By obtaining the history samples point in sampling table;
Abscissa, ordinate and the number of the history samples point are obtained, and according to the abscissa of the history samples point, vertical seat
Mark and number are calculated with reference to abscissa and with reference to ordinate;
The reference point is determined according to the reference abscissa and the ordinate that refers to;
Based on the movement locus of the history samples point to the reference point, prediction obtains the future position, including:
Calculate the angle and distance between the history samples point of arbitrary neighborhood two;
Prediction is calculated according to angle, the number of distance and history samples point between the two neighboring history samples point
Vector and the angle angle of horizontal direction and the distance of the predicted vector;
The future position is determined according to the distance of the angle angle and the predicted vector of the predicted vector and horizontal direction.
4. according to the method described in claim 3, it is characterized in that, the method further includes pre-establishing for the sampling table
Journey, the process that pre-establishes include:
Predetermined quantity is set;
Current sampling point corresponding with fixed output point is stored as the history samples point into the sampling table;
If the number of history samples point described in the sampling table reaches the predetermined quantity, the history is often stored
While sampled point, the stored one history samples point at first is deleted in the sampling table.
5. according to the method described in claim 3, it is characterized in that, described transported using first movement tendency with described second
Dynamic trend determines output point, including:
The direction of first movement tendency is determined as first direction of motion, distance is the first move distance;Determine described
The direction of two movement tendencies is second direction of motion, and distance is the second move distance;
Utilize the first weight, first direction of motion, first move distance, second direction of motion and described second
Move distance calculates output distance;
Outbound course is calculated using the second weight, first direction of motion and second direction of motion;
Output horizontal stroke is calculated using the reference abscissa, the output distance, the outbound course and first direction of motion
Coordinate;
It calculates output using the reference ordinate, the output distance, the outbound course and first direction of motion and indulges
Coordinate;
The output point is determined according to the output abscissa and the output ordinate.
6. a kind of smooth processing unit for touch-screen curve of output, which is characterized in that including:
First acquisition module, for obtaining current sampling point;
Second acquisition module, for being based on the current sampling point, reference point and future position, obtain respectively from the reference point to
First movement tendency of the future position and from the reference point to the second movement tendency of the current sampling point;Wherein, institute
Reference point is stated as the point based on the obtained reflecting history sampling situations of history samples point;The future position is based on the history
Sampled point is to the movement locus of the reference point, the point predicted;Second acquisition module includes:First determination unit,
For determining that first movement tendency, second determine list using the angle and distance between the reference point and the future position
Member, for determining second movement tendency using the angle and distance between the reference point and the current sampling point;
Determining module, for determining output point using first movement tendency and second movement tendency.
7. device according to claim 6, which is characterized in that the determining module includes:
Resolving cell for being decomposed to second movement tendency, obtains the direction of motion with first movement tendency
The first parallel component and the second component vertical with the direction of motion of first movement tendency;
First amending unit for being modified respectively to first component and the second component, obtains the first correction amount
With the second correction amount;Wherein, the amendment degree to the second component is less than to the amendment degree of first component;
Second amending unit, for being repaiied using first correction amount and second correction amount to the current sampling point
Just, output point is obtained.
8. device according to claim 7, which is characterized in that first acquisition module includes:
3rd determination unit, for determining that touch point is the current sampling point;
Second acquisition module includes:
4th determination unit, for by obtaining the history samples point in sampling table;Obtain the history samples point abscissa,
Ordinate and number, and calculated according to the abscissa, ordinate and number of the history samples point with reference to abscissa and with reference to vertical
Coordinate;And the reference point is determined according to the reference abscissa and the ordinate that refers to;
5th determination unit, for calculating angle and distance between the history samples point of arbitrary neighborhood two;According to adjacent
The number of angle, distance and history samples point between two history samples points calculates predicted vector and level side
To angle angle and the predicted vector distance;And according to the angle angle of the predicted vector and horizontal direction with
And the distance of the predicted vector determines the future position.
9. device according to claim 8, which is characterized in that described device, which further includes, pre-establishes module, described advance
Establishing module includes:
Setting unit, for setting predetermined quantity;
Storage unit, for being stored current sampling point corresponding with fixed output point to institute as the history samples point
It states in sampling table;
Unit is deleted, if the number for history samples point described in the sampling table reaches the predetermined quantity, is often deposited
While storing up a history samples point, the stored one history samples point at first is deleted in the sampling table.
10. device according to claim 8, which is characterized in that the determining module includes:
6th determination unit, for determining the direction of first movement tendency as first direction of motion, distance is the first fortune
Dynamic distance;And the direction of second movement tendency is determined as second direction of motion, distance is the second move distance;
First computing unit, for utilizing the first weight, first direction of motion, first move distance, described second
The direction of motion and second move distance calculate output distance;
Second computing unit, for calculating output using the second weight, first direction of motion and second direction of motion
Direction;
3rd computing unit, for utilizing the reference abscissa, the output distance, the outbound course and first fortune
Dynamic direction calculating output abscissa;
4th computing unit, for utilizing the reference ordinate, the output distance, the outbound course and first fortune
Dynamic direction calculating output ordinate;
7th determination unit, for determining the output point according to the output abscissa and the output ordinate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510053708.8A CN104598155B (en) | 2015-01-30 | 2015-01-30 | A kind of smoothing processing method and device for touch-screen curve of output |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510053708.8A CN104598155B (en) | 2015-01-30 | 2015-01-30 | A kind of smoothing processing method and device for touch-screen curve of output |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104598155A CN104598155A (en) | 2015-05-06 |
CN104598155B true CN104598155B (en) | 2018-05-22 |
Family
ID=53123983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510053708.8A Active CN104598155B (en) | 2015-01-30 | 2015-01-30 | A kind of smoothing processing method and device for touch-screen curve of output |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104598155B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104834413A (en) * | 2015-05-27 | 2015-08-12 | 广州华欣电子科技有限公司 | Recognition method for touch points in infrared touch frame and infrared touch recognizer |
CN107463329B (en) * | 2017-07-28 | 2019-08-27 | Oppo广东移动通信有限公司 | Detection method, device, storage medium and the mobile terminal of blank screen gesture |
CN109917430B (en) * | 2019-04-03 | 2021-01-22 | 安徽中科智能感知产业技术研究院有限责任公司 | Satellite positioning track drift correction method based on track smoothing algorithm |
CN111158577B (en) * | 2019-12-31 | 2021-10-01 | 奇安信科技集团股份有限公司 | Remote operation processing method and device |
CN111813719B (en) * | 2020-06-15 | 2023-01-10 | 厦门科灿信息技术有限公司 | Data polling method and device and terminal equipment |
KR20220049407A (en) | 2020-10-14 | 2022-04-21 | 삼성전자주식회사 | Display apparatus and control method thereof |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102937850A (en) * | 2012-12-04 | 2013-02-20 | 上海合合信息科技发展有限公司 | Method for beautifying handwriting in real time and electronic equipment |
CN103839276A (en) * | 2012-11-27 | 2014-06-04 | 大连灵动科技发展有限公司 | Method for motion tracking based on predication |
CN103870371A (en) * | 2014-03-31 | 2014-06-18 | 广州华欣电子科技有限公司 | Method and device for testing smoothness of touch screen |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8125522B2 (en) * | 2006-03-24 | 2012-02-28 | Siemens Industry, Inc. | Spurious motion filter |
-
2015
- 2015-01-30 CN CN201510053708.8A patent/CN104598155B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103839276A (en) * | 2012-11-27 | 2014-06-04 | 大连灵动科技发展有限公司 | Method for motion tracking based on predication |
CN102937850A (en) * | 2012-12-04 | 2013-02-20 | 上海合合信息科技发展有限公司 | Method for beautifying handwriting in real time and electronic equipment |
CN103870371A (en) * | 2014-03-31 | 2014-06-18 | 广州华欣电子科技有限公司 | Method and device for testing smoothness of touch screen |
Also Published As
Publication number | Publication date |
---|---|
CN104598155A (en) | 2015-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104598155B (en) | A kind of smoothing processing method and device for touch-screen curve of output | |
Cheng et al. | The emissions reduction effect and technical progress effect of environmental regulation policy tools | |
CN106373030B (en) | A kind of method of basin step power station Optimized Operation | |
CN105950807B (en) | A kind of blast furnace material distribution process shape of charge level modeling method of Multi-information acquisition | |
CN106483845B (en) | A kind of method and system improving the forecast of straightener force-power parameter | |
CN107529644B (en) | Linear approximation method for static voltage stability domain boundary of power system | |
CN104346083A (en) | Display control system and method based on sliding touch operation | |
CN109389420A (en) | The distribution method and device of equity | |
CN105975119B (en) | Multi-target tracking method, touch screen control method and system | |
CN101387506B (en) | Point cloud optimum alignment method | |
CN105023061A (en) | Steel enterprise gas balancing scheduling system and method based on result of prediction model | |
CN109543267A (en) | Handicraft surface based on image procossing sprays simulation and optimization method | |
CN104268118A (en) | Mathematical formula calculator including touch screen and method for identifying mathematical formulas | |
CN106097414A (en) | Curve method for deleting and system | |
CN109696654A (en) | Localization method and terminal device | |
CN102830861A (en) | Positioning method and device for self-capacitance touch screen as well as touch control system | |
CN106503413B (en) | A method of accurately calculating desulfurizing iron magnesium powder amount | |
CN109376937A (en) | Adaptive scheduling end of term water level prediction method based on set empirical mode decomposition | |
CN108199792B (en) | WCDMA base station electromagnetic radiation prediction method | |
CN104180822B (en) | Method for detecting stability of deformation monitoring datum point | |
CN108228535A (en) | A kind of optimal weighting parameter evaluation method of unequal precision measurement data fusion | |
CN106295005B (en) | The Multi-factor estimation method and apparatus of contact fatigue life of spray coating layer | |
CN117035155A (en) | Water quality prediction method | |
CN110888552A (en) | Infrared touch screen line drawing processing method and device | |
CN103530190A (en) | Load forecasting method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |