CN104598155A - Smoothing method and device - Google Patents

Smoothing method and device Download PDF

Info

Publication number
CN104598155A
CN104598155A CN201510053708.8A CN201510053708A CN104598155A CN 104598155 A CN104598155 A CN 104598155A CN 201510053708 A CN201510053708 A CN 201510053708A CN 104598155 A CN104598155 A CN 104598155A
Authority
CN
China
Prior art keywords
point
movement tendency
distance
motion
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.)
Granted
Application number
CN201510053708.8A
Other languages
Chinese (zh)
Other versions
CN104598155B (en
Inventor
邓孜俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Hua Xin Electronic Science And Technology Co Ltd
Original Assignee
Guangzhou Hua Xin Electronic Science And Technology Co Ltd
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 Guangzhou Hua Xin Electronic Science And Technology Co Ltd filed Critical Guangzhou Hua Xin Electronic Science And Technology Co Ltd
Priority to CN201510053708.8A priority Critical patent/CN104598155B/en
Publication of CN104598155A publication Critical patent/CN104598155A/en
Application granted granted Critical
Publication of CN104598155B publication Critical patent/CN104598155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction 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/0488Interaction 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/04883Interaction 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
    • 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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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

The invention provides a smoothing method and a device. The smoothing method comprises the steps of obtaining a current sampling point; respectively obtaining a first movement tendency from a reference point to a predicting point and a second movement tendency from the reference point to the current sampling point based on the current sampling point, the reference point and the predicting point, wherein the reference point is a point which is obtained based on a history sampling point and reflects the history sampling condition; the predicting point is a point which is obtained by predicting based on the movement tendency from the history sampling point to the reference point; and determining an output point by using the first movement tendency and the second movement tendency. Compared with the prior art, the smoothing method performs processing based on the movement tendencies respectively from the reference point to the current sampling point and the predicting point so as to determine the output point; the current sampling point and the history sampling point are both taken into account. In such a way, the smoothing method disclosed by the invention is relatively strong in automatic adjusting capacity and can fast track an actual touch point, so that the effect of an ideal smooth curve can be achieved at any drawing speed.

Description

A kind of smoothing processing method and device
Technical field
The present invention relates to touch screen technology field, more particularly, relate to a kind of smoothing processing method and device.
Background technology
Along with the widespread use of touch-screen, some problems also occur thereupon, and the smoothing processing problem for touch-screen curve of output is one of them.
Existing touch-screen is for the smoothing processing of curve of output, and the technological means usually adopted is: utilize reference point and current sampling point determination output point.Generally mainly utilize the positional information determination output point of current sampling point, the effect of reference point is weakened, therefore can not automatically adjust in time, only under specific setting-out speed, just can reach desirable smooth curve, if user's setting-out speed is slower, the sawtooth exporting lines can be relatively more serious, as shown in Figure 1; If user's setting-out speed, the delayed meeting exporting lines is relatively more serious, as shown in Figure 2.
As can be seen from above-mentioned describing, exist in prior art and cannot realize the problem that can both reach desired smooth curve under any setting-out speed.
Summary of the invention
The object of this invention is to provide a kind of smoothing processing method and device, solve in prior art the problem that cannot realize reaching desired smooth curve under any setting-out speed.
To achieve these goals, the invention provides following technical scheme:
A kind of smoothing processing method, described method comprises:
Obtain current sampling point;
Based on described current sampling point, reference point and future position, obtain the first movement tendency from described reference point to described future position respectively and from described reference point to the second movement tendency of described current sampling point; Wherein, the point of reflecting history sampling situations of described reference point for obtaining based on history samples point; Described future position is based on the movement locus of described history samples point to described reference point, predicts the point obtained;
Utilize described first movement tendency and described second movement tendency determination output point.
Preferably, describedly utilize described first movement tendency and described second movement tendency determination output point, comprising:
Described second movement tendency is decomposed, obtains first component parallel with the direction of motion of described first movement tendency, and the second component vertical with the direction of motion of described first movement tendency;
Described first component and described second component are revised respectively, obtains the first correction and the second correction; Wherein, to the correction degree of described first component lower than the correction degree to described second component;
Utilize described first correction and described second correction to revise described current sampling point, obtain described output point.
Preferably, describedly obtain the first movement tendency from described reference point to described future position respectively and from described reference point to the second movement tendency of described current sampling point, comprising:
The angle and distance between described reference point and described future position is utilized to determine described first movement tendency; The angle and distance between described reference point and described current sampling point is utilized to determine described second movement tendency.
Preferably, described in obtain current sampling point, comprising:
Determine that touch point is described current sampling point;
Obtain based on described history samples point the described reference point reflecting described history samples situation, comprising:
By obtaining described history samples point in sampling table;
Obtain the horizontal ordinate of described history samples point, ordinate and number, and according to the horizontal ordinate of described history samples point, ordinate and number computing reference horizontal ordinate and with reference to ordinate;
Described reference point is determined with reference to horizontal ordinate and described reference ordinate according to described;
Based on the movement locus of described history samples point to described reference point, prediction obtains described future position, comprising:
Calculate the angle between the described history samples point of arbitrary neighborhood two and distance;
According to number computational prediction vector and the angle angle of horizontal direction and the distance of described predicted vector of angle, distance and the described history samples point between adjacent two described history samples points;
Described future position is determined according to described predicted vector and the angle angle of horizontal direction and the distance of described predicted vector.
Preferably, described method also comprises the process of establishing in advance of described sampling table, and described process of establishing in advance comprises:
Predetermined quantity is set;
The current sampling point corresponding with fixed output point is stored in described sampling table as described history samples point;
If the number of the point of history samples described in described sampling table reaches described predetermined quantity, then, while often storing a described history samples point, delete the described history samples point be stored at first in described sampling table.
Preferably, describedly utilize described first movement tendency and described second movement tendency determination output point, comprising:
Determine that the direction of described first movement tendency is the first direction of motion, its distance is the first move distance; Determine that the direction of described second movement tendency is the second direction of motion, its distance is the second move distance;
Utilize the first weight, described first direction of motion, described first move distance, described second direction of motion and described second move distance to calculate and export distance, wherein, described first weight is described current sampling point and the emphasis degree ratio of described history samples point on the direction being parallel to described first direction of motion;
Utilize the second weight, described first direction of motion and described second direction of motion to calculate outbound course, wherein, described second weight is described current sampling point and the emphasis degree ratio of described history samples point on the direction perpendicular to described first direction of motion;
Described calculating with reference to horizontal ordinate, described output distance, described outbound course and described first direction of motion is utilized to export horizontal ordinate;
Described calculating with reference to ordinate, described output distance, described outbound course and described first direction of motion is utilized to export ordinate;
Described output point is determined according to described output horizontal ordinate and described output ordinate.
A kind of smooth processing unit, comprising:
First acquisition module, for obtaining current sampling point;
Second acquisition module, for based on described current sampling point, reference point and future position, obtains the first movement tendency from described reference point to described future position and respectively from described reference point to the second movement tendency of described current sampling point; Wherein, the point of reflecting history sampling situations of described reference point for obtaining based on history samples point; Described future position is based on the movement locus of described history samples point to described reference point, predicts the point obtained;
Determination module, for utilizing described first movement tendency and described second movement tendency determination output point.
Preferably, described determination module comprises:
Resolving cell, for decomposing described second movement tendency, obtains first component parallel with the direction of motion of described first movement tendency, and the second component vertical with the direction of motion of described first movement tendency;
First amending unit, for revising respectively described first component and described second component, obtains the first correction and the second correction; Wherein, to the correction degree of described first component lower than the correction degree to described second component;
Second amending unit, for utilizing described first correction and described second correction to revise described current sampling point, obtains output point.
Preferably, described second acquisition module comprises:
First determining unit, determines described first movement tendency for utilizing the angle and distance between described reference point and described future position;
Second determining unit, determines described second movement tendency for utilizing the angle and distance between described reference point and described current sampling point.
Preferably, described first acquisition module comprises:
3rd determining unit, for determining that touch point is described current sampling point;
Described second acquisition module comprises:
4th determining unit, for by obtaining described history samples point in sampling table; Obtain the horizontal ordinate of described history samples point, ordinate and number, and according to the horizontal ordinate of described history samples point, ordinate and number computing reference horizontal ordinate and with reference to ordinate; And determine described reference point according to described with reference to horizontal ordinate and described reference ordinate;
5th determining unit, for calculating angle between the described history samples point of arbitrary neighborhood two and distance; According to number computational prediction vector and the angle angle of horizontal direction and the distance of described predicted vector of angle, distance and the described history samples point between adjacent two described history samples points; And determine described future position according to described predicted vector and the angle angle of horizontal direction and the distance of described predicted vector.
Preferably, described device also comprises sets up module in advance, and described module of setting up in advance comprises:
Module is set, for arranging predetermined quantity;
Memory module, for being stored in described sampling table using the current sampling point corresponding with fixed output point as described history samples point;
Removing module, if reach described predetermined quantity for the number of the point of history samples described in described sampling table, then, while often storing a described history samples point, deletes the described history samples point be stored at first in described sampling table.
Preferably, described determination module comprises:
6th determining unit, for determining that the direction of described first movement tendency is the first direction of motion, its distance is the first move distance; And determine that the direction of described second movement tendency is the second direction of motion, its distance is the second move distance;
First computing unit, distance is exported for utilizing the first weight, described first direction of motion, described first move distance, described second direction of motion and described second move distance to calculate, wherein, described first weight is described current sampling point and the emphasis degree ratio of described history samples point on the direction being parallel to described first direction of motion;
Second computing unit, outbound course is calculated for utilizing the second weight, described first direction of motion and described second direction of motion, wherein, described second weight is described current sampling point and the emphasis degree ratio of described history samples point on the direction perpendicular to described first direction of motion;
3rd computing unit, described with reference to horizontal ordinate, described output distance, described outbound course and described first direction of motion calculating output horizontal ordinate for utilizing;
4th computing unit, described with reference to ordinate, described output distance, described outbound course and described first direction of motion calculating output ordinate for utilizing;
7th determining unit, for determining described output point according to described output horizontal ordinate and described output ordinate.
A kind of smoothing processing method provided by the invention and device, comprising: 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 second movement tendency from reference point to current sampling point respectively; Wherein, the point of reflecting history sampling situations of reference point for obtaining based on history samples point; Future position is based on the movement locus of history samples point to reference point, predicts the point obtained; Utilize the first movement tendency and the second movement tendency determination output point.Compared with prior art, the present invention divides the movement tendency being clipped to current sampling point and future position to process in conjunction with reference point, determines output point, has considered current sampling point and history samples point.Therefore automatic adjustment capability of the present invention is comparatively strong, can follow the tracks of actual touch point rapidly, thus realizes the effect that can both reach desired smooth curve under any setting-out speed.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, the accompanying drawing provided can also be utilized to obtain other accompanying drawing.
Fig. 1 is the schematic shapes exporting lines when user's setting-out speed is slower in prior art;
The schematic shapes of lines is exported when Fig. 2 is user's setting-out speed in prior art;
The process flow diagram of a kind of smoothing processing method that Fig. 3 provides for the embodiment of the present invention;
The schematic diagram of fitting process determination predicted vector is utilized in a kind of smoothing processing method that Fig. 4 provides for the embodiment of the present invention;
The schematic diagram that in a kind of smoothing processing method that Fig. 5 provides for the embodiment of the present invention, utilization orientation and distance are decomposed motion artifacts;
The first process flow diagram of step S33 in a kind of smoothing processing method that Fig. 6 provides for the embodiment of the present invention;
To illustrate in a kind of smoothing processing method that Fig. 7 provides for the embodiment of the present invention schematic diagram of implementation procedure of description of step S33;
Obtain the process flow diagram of reference point based on history samples point in a kind of smoothing processing method that Fig. 8 provides for the embodiment of the present invention;
Obtain the process flow diagram of future position to the movement locus prediction of reference point based on history samples point in a kind of smoothing processing method that Fig. 9 provides for the embodiment of the present invention;
The second process flow diagram of step S33 in a kind of smoothing processing method that Figure 10 provides for the embodiment of the present invention;
The process flow diagram of the process of establishing in advance of sampling table in a kind of smoothing processing method that Figure 11 provides for the embodiment of the present invention;
The schematic diagram of the implementation procedure of step S113 in a kind of smoothing processing method that Figure 12 provides for the embodiment of the present invention;
The structural representation of a kind of smooth processing unit that Figure 13 provides for the embodiment of the present invention;
The first structural representation of determination module in a kind of smooth processing unit that Figure 14 provides for the embodiment of the present invention;
The second structural representation of determination module in a kind of smooth processing unit that Figure 15 provides for the embodiment of the present invention;
The structural representation of module is set up in advance in a kind of smooth processing unit that Figure 16 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 3, it illustrates the process flow diagram of a kind of smoothing processing method that the embodiment of the present invention provides, can comprise:
S31: obtain current sampling point.
S32: based on current sampling point, reference point and future position, obtains the first movement tendency from reference point to future position and the second movement tendency from reference point to current sampling point respectively; Wherein, the point of reflecting history sampling situations of reference point for obtaining based on history samples point; Future position is based on the movement locus of history samples point to reference point, predicts the point obtained.
By history samples point determination reference point and predicted vector, and then future position can be determined.Wherein, predicted vector is the vector utilizing history samples point to utilize certain computing to obtain, and can comprise Distance geometry direction, and the method for statistical forecast vector is more, such as famous Kalman filtering, or utilizes fitting process to predict the expectation equation of each component.Wherein, fitting process is utilized to predict the expectation equation of each component, be specially: as shown in Figure 4, suppose there be P1 to Pn n history samples point altogether, the X-coordinate difference and the Y-coordinate that calculate P2 and P1 are poor, and the X-coordinate difference and the Y-coordinate that calculate P3 and P2 are poor, by that analogy, calculate that the X-coordinate of Pn and Pn-1 is poor and Y-coordinate is poor, and difference between any two averaged and obtain single order predicted vector, this predicted vector has X component and Y-component.Utilize similar method history samples point can be fitted to the predicted vector of more high-order, or the curvilinear equation of other forms.Statistics or matching process in, the phenomenon of motion can be resolved into other components, as utilization orientation with distance replace X-coordinate and Y-coordinate, as shown in Figure 5.
S33: utilize the first movement tendency and the second movement tendency determination output point.
A kind of smoothing processing method provided by the invention, comprising: 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 second movement tendency from reference point to current sampling point respectively; Wherein, the point of reflecting history sampling situations of reference point for obtaining based on history samples point; Future position is based on the movement locus of history samples point to reference point, predicts the point obtained; Utilize the first movement tendency and the second movement tendency determination output point.Compared with prior art, the present invention divides the movement tendency being clipped to current sampling point and future position to process in conjunction with reference point, determines output point, has considered current sampling point and history samples point.Therefore automatic adjustment capability of the present invention is comparatively strong, can follow the tracks of actual touch point rapidly, thus realizes the effect that can both reach desired smooth curve under any setting-out speed.
Refer to Fig. 6, it illustrates the first process flow diagram of step S33 in a kind of smoothing processing method that above-described embodiment provides, can comprise the following steps:
S61: decompose the second movement tendency, obtains first component parallel with the direction of motion of the first movement tendency, and the second component vertical with the direction of motion of the first movement tendency.
S62: revise respectively the first component and second component, obtains the first correction and the second correction; Wherein, to the correction degree of the first component lower than the correction degree to second component.
It should be noted that, can be weak correction to the correction of the first component, can be strong correction to the correction of second component.
Illustrate above-mentioned steps: during certain is once sampled, sample the contact position that obtains in " current sampling point " position (position of current sampling point the position of incomplete reaction actual touch) as shown in Figure 7, obtain the second movement tendency and the first movement tendency, the second movement tendency is decomposed the component (d being parallel to the traffic direction of the first movement tendency as shown in FIG. par) and the component (d of direction of motion perpendicular to the first movement tendency per).Component perpendicular to the first movement tendency more focuses on the result by reference to point prediction, namely revises by force it, and correction current sampling point is f perpendicular to the component of the first movement tendency per, the component being parallel to the first movement tendency more focuses on the actual samples result of current sampling point, namely carries out weak correction to it, and the component that correction current sampling point is parallel to the first movement tendency is f par.
S63: utilize the first correction and the second correction to revise current sampling point, obtain output point.
In above-mentioned steps, first the second movement tendency is resolved into first component parallel with the first movement tendency direction and the second component vertical with the first movement tendency direction, first component carries out weak correction and obtains the first correction, strong correction is carried out to the second movement tendency and obtains the second correction, finally utilize the first correction and the second correction to revise current sampling point, obtain output point.Utilize actual conditions to determine its corrected strength when process smoothing to different component as seen, the output point determined thus is more accurate, and curve of output is also more level and smooth.
It should be noted that, can determine that the touch point of user and screen contact is current sampling point; As shown in Figure 8, the process obtaining the reference point of reflecting history sampling situations based on history samples point can comprise:
S81: by obtaining history samples point in sampling table.
S82: obtain the horizontal ordinate of history samples point, ordinate and number, and according to the horizontal ordinate of history samples point, ordinate and number computing reference horizontal ordinate and with reference to ordinate.
Computing reference horizontal ordinate and reference ordinate can be distinguished according to the following formula:
X r = Σ i = 1 n X i n
Y r = Σ i = 1 n Y i n
Wherein, X rrepresent with reference to horizontal ordinate, Y rrepresent that n represents the number of history samples point, X with reference to ordinate irepresent the horizontal ordinate of i-th history samples point, Y irepresent the ordinate of i-th history samples point.
S83: according to reference horizontal ordinate and with reference to ordinate determination reference point.
Reference point can be determined according to the following formula:
P r=(X r,Y r)
Wherein, P rrepresent reference point, X rrepresent with reference to horizontal ordinate, Y rrepresent with reference to ordinate.
Refer to shown in Fig. 9, it illustrates based on the movement locus of history samples point to reference point in a kind of smoothing processing method that the embodiment of the present invention provides, prediction obtains the process flow diagram of future position, can comprise:
S91: calculate the angle between arbitrary neighborhood two history samples points and distance.
S92: according to number computational prediction vector and the angle angle of horizontal direction and the distance of predicted vector of angle, distance and the history samples point between adjacent two history samples points.
It should be noted that, step S91 and step S92 can calculate according to the following formula:
A y = Σ i = 2 n Angle ( P i - P i - 1 ) n - 1
L y = Σ i = 2 n Length ( P i - P i - 1 ) n - 1
Wherein, A yrepresent the angle angle of predicted vector and horizontal direction, Angle (P i-P i-1) represent history samples point P ito history samples point P i-1between angle, L yrepresent the distance of predicted vector, Length (P i-P i-1) represent history samples point P ito history samples point P i-1between distance, n represents the number of history samples point.
S93: according to predicted vector and the angle angle of horizontal direction and the distance determination future position of predicted vector.
Be predicted vector according to the vector between reference point to future position, determine future position further.
In addition, obtain the first movement tendency from reference point to future position and the second movement tendency from reference point to current sampling point respectively, can comprise:
The angle and distance between reference point and future position is utilized to determine the first movement tendency; The angle and distance between reference point and current sampling point is utilized to determine the second movement tendency.
Direction and the distance of the first movement tendency can be determined according to the following formula respectively, and the direction of the second movement tendency and distance, and then determine the first movement tendency and the second movement tendency respectively according to its direction and distance:
A p=Angle(P r-P y)
L p=Length(P r-P y)
A c=Angle(P r-P c)
L c=Length(P r-P c)
Wherein, A prepresent the direction of the first movement tendency, L prepresent the distance of the first movement tendency, A crepresent the direction of the second movement tendency, L crepresent the distance of the second movement tendency, P crepresent current sampling point, P yrepresent future position, P rrepresent reference point, Angle (P r-P y) represent angle angle between reference point and future position, Length (P r-P y) represent distance between reference point and future position, Angle (P r-P c) represent angle angle between reference point and current sampling point; Length (P r-P c) represent distance between reference point and current sampling point.
Refer to Figure 10, it illustrates the second process flow diagram of step S33 in a kind of smoothing processing method that the embodiment of the present invention provides, can comprise:
S101: determine that the direction of the first movement tendency is the first direction of motion, its distance is the first move distance; Determine that the direction of the second movement tendency is the second direction of motion, its distance is the second move distance.
S102: utilize the first weight, the first direction of motion, the first move distance, the second direction of motion and the second move distance to calculate and export distance, wherein, the first weight is current sampling point and the emphasis degree ratio of history samples point on the direction being parallel to the first direction of motion.
It should be noted that, the output distance in the present embodiment is the distance on the direction being parallel to the first direction of motion between reference point and output point.
Output distance can be calculated according to the following formula:
L 0 = cos ( A c - A p ) · L c · R lc R lp + L p R lc R lp + 1
Wherein, L 0represent and export distance, represent the first weight, in formula, the implication of other letter representations is all identical with the implication of same letter representation in the formula of above-described embodiment.In addition, in order to obtain better effect, the first weight can be greater than 1, should regulate the value of the first weight as required simultaneously.
S103: utilize the second weight, the first direction of motion and the second direction of motion to calculate outbound course, wherein, the second weight is current sampling point and the emphasis degree ratio of history samples point on the direction perpendicular to the first direction of motion.
It should be noted that, the outbound course in the present embodiment refers to the angle on the direction being parallel to the first direction of motion between reference point and output point.
Outbound course can be determined according to the following formula:
A 0 = A c · R ac R ap + A p R ac R ap + 1
Wherein, A 0represent outbound course, represent the second weight, in formula, the implication of other letter representations is all identical with the implication of same letter representation in the formula of above-described embodiment.In addition, in order to obtain better effect, the second weight can be less than 0.5, should regulate the value of the second weight as required simultaneously.
S104: utilize and export horizontal ordinate with reference to horizontal ordinate, output distance, outbound course and the calculating of the first direction of motion.
Output horizontal ordinate can be calculated according to the following formula:
X 0 = X r + L 0 · cos ( A 0 + A p ) cos ( A 0 )
Wherein, X 0represent and export horizontal ordinate, in formula, the implication of other letter representations is all identical with the implication of same letter representation in the formula of above-described embodiment.
S105: utilize and export ordinate with reference to ordinate, output distance, outbound course and the calculating of the first direction of motion.
Output ordinate can be calculated according to the following formula:
Y 0 = Y r + L 0 · sin ( A 0 + A p ) cos ( A 0 )
Wherein, Y 0represent and export ordinate, in formula, the implication of other letter representations is all identical with the implication of same letter representation in the formula of above-described embodiment.
S106: according to output horizontal ordinate and output ordinate determination output point.
Output point can be determined according to the following formula:
Wherein, P 0represent output point, X 0represent and export horizontal ordinate, Y 0represent and export ordinate.
A kind of smoothing processing method that above-described embodiment provides has considered current sampling point and history samples point, makes the output point determined more accurate, can realize the effect that can both reach desired smooth curve under any setting-out speed.
It should be noted that, history samples point can obtain by sampling table, therefore a kind of smoothing processing method that above-described embodiment provides can also comprise the process of establishing in advance of sampling table, refers to shown in Figure 11, and the process of establishing in advance of sampling table can comprise the following steps:
S111: predetermined quantity is set.
Predetermined quantity in the present embodiment is a concrete numeral, can artificially set, and represents the number of maximum storable history samples point in sampling table.
S112: the current sampling point corresponding with fixed output point is stored in sampling table as history samples point.
Utilize touch point can obtain a current sampling point, after determining the output point that current sampling point is corresponding therewith, this current sampling point is stored in sampling table as history samples point.
S113: if the number of history samples point reaches predetermined quantity in sampling table, then, while often storing a history samples point, delete the history samples point be stored at first in sampling table.
As shown in figure 12, sampling table can be regarded as a moving window, when the number of history samples point reaches predetermined quantity, whenever having a new history samples point and last samples point to be stored, a history samples point i.e. the oldest sampled point be stored at first in sampling table is just deleted.
In the process of establishing in advance of sampling table, to determine that the current sampling point of output point is stored in sampling table as history samples point, and history samples point number in sampling table is limited, to make like this when determining output point only with the nearer history samples point of current sampling point interlude as a reference, because history samples point is more early also little to the reference value of current sampling point, even likely play retroaction.So only get limited history samples point more ensure that accuracy when determining output point as a reference.
Refer to Figure 13, it illustrates a kind of smooth processing unit that the embodiment of the present invention provides, comprising:
First acquisition module 11, for obtaining current sampling point.
Second acquisition module 12, for based on current sampling point, reference point and future position, obtains the first movement tendency from reference point to future position and the second movement tendency from reference point to current sampling point respectively; Wherein, the point of reflecting history sampling situations of reference point for obtaining based on history samples point; Future position is based on the movement locus of history samples point to reference point, predicts the point obtained.
Determination module 13, for utilizing the first movement tendency and the second movement tendency determination output point.
A kind of smooth processing unit that the present embodiment provides divides the movement tendency being clipped to current sampling point and future position to process in conjunction with reference point, determines output point, has considered current sampling point and history samples point.Therefore its automatic adjustment capability is comparatively strong, can follow the tracks of actual touch point rapidly, thus realizes the effect that can both reach desired smooth curve under any setting-out speed.
Refer to Figure 14, it illustrates the first structural representation of the determination module 13 in above-described embodiment, determination module 13 can comprise:
Resolving cell 141, for decomposing the second movement tendency, obtains first component parallel with the direction of motion of the first movement tendency, and the second component vertical with the direction of motion of the first movement tendency.
First amending unit 142, for revising respectively the first component and second component, obtains the first correction and the second correction; Wherein, to the correction degree of the first component lower than the correction degree to second component.
Second amending unit 143, for utilizing the first correction and the second correction to revise current sampling point, obtains output point.
First the second movement tendency is resolved into first component parallel with the first movement tendency direction and the second component vertical with the first movement tendency direction, first component carries out weak correction and obtains the first correction, strong correction is carried out to the second movement tendency and obtains the second correction, finally utilize the first correction and the second correction to revise current sampling point, obtain output point.Utilize actual conditions to determine its corrected strength when process smoothing to different component as seen, the output point determined thus is more accurate, and curve of output is also more level and smooth.
It should be noted that, the first acquisition module 11 can comprise the 3rd determining unit, and the 3rd determining unit is used for determining that touch point is current sampling point.
In addition, the second acquisition module 12 can comprise the first determining unit, the second determining unit, the 4th determining unit and the 5th determining unit, wherein:
4th determining unit is used for by obtaining history samples point in sampling table; Obtain the horizontal ordinate of history samples point, ordinate and number, and according to the horizontal ordinate of history samples point, ordinate and number computing reference horizontal ordinate and with reference to ordinate; And according to reference horizontal ordinate and with reference to ordinate determination reference point.
5th determining unit is for calculating angle between arbitrary neighborhood two history samples points and distance; According to number computational prediction vector and the angle angle of horizontal direction and the distance of predicted vector of angle, distance and the history samples point between adjacent two history samples points; And according to predicted vector and the angle angle of horizontal direction and the distance determination future position of predicted vector.
First determining unit, determines the first movement tendency for utilizing the angle and distance between reference point and future position.
Second determining unit, determines the second movement tendency for utilizing the angle and distance between reference point and current sampling point.
Refer to Figure 15, it illustrates the second structural representation of determination module 13 in a kind of smooth processing unit that the embodiment of the present invention provides, can comprise:
6th determining unit 151, for determining that the direction of the first movement tendency is the first direction of motion, its distance is the first move distance; And determine that the direction of the second movement tendency is the second direction of motion, its distance is the second move distance.
First computing unit 152, calculate for utilizing the first weight, the first direction of motion, the first move distance, the second direction of motion and the second move distance and export distance, wherein, the first weight is current sampling point and the emphasis degree ratio of history samples point on the direction being parallel to the first direction of motion.
Second computing unit 153, for utilizing the second weight, the first direction of motion and the second direction of motion to calculate outbound course, wherein, the second weight is current sampling point and the emphasis degree ratio of history samples point on the direction perpendicular to the first direction of motion.
3rd computing unit 154, for utilizing with reference to horizontal ordinate, exporting distance, outbound course and the first direction of motion calculating output horizontal ordinate.
4th computing unit 155, for utilizing with reference to ordinate, exporting distance, outbound course and the first direction of motion calculating output ordinate.
7th determining unit 156, for according to output horizontal ordinate with export ordinate determination output point.
A kind of smooth processing unit that above-described embodiment provides has considered current sampling point and history samples point, makes the output point determined more accurate, can realize the effect that can both reach desired smooth curve under any setting-out speed.
In addition, because history samples point can obtain by sampling table, what a kind of smooth processing unit that therefore above-described embodiment provides can also comprise sampling table sets up module in advance, and refer to shown in Figure 16, setting up module in advance can comprise:
Setting unit 161, for arranging predetermined quantity.
Storage unit 162, for being stored into the current sampling point corresponding with fixed output point in sampling table as history samples point.
Delete cells 163, if reach predetermined quantity for the number of history samples point in sampling table, then while often storing a history samples point, deletes the history samples point be stored at first in sampling table.
The module of setting up in advance provided by the present embodiment sets up the sampling table storing history samples point, to determine that the current sampling point of output point is stored in sampling table as history samples point, and history samples point number in sampling table is limited, to make like this when determining output point only with the nearer history samples point of current sampling point interlude as a reference, because history samples point is more early also little to the reference value of current sampling point, even likely play retroaction.So only get limited history samples point more ensure that accuracy when determining output point as a reference.
To the above-mentioned explanation of the disclosed embodiments, those skilled in the art are realized or uses the present invention.To be apparent for a person skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (12)

1. a smoothing processing method, is characterized in that, described method comprises:
Obtain current sampling point;
Based on described current sampling point, reference point and future position, obtain the first movement tendency from described reference point to described future position respectively and from described reference point to the second movement tendency of described current sampling point; Wherein, the point of reflecting history sampling situations of described reference point for obtaining based on history samples point; Described future position is based on the movement locus of described history samples point to described reference point, predicts the point obtained;
Utilize described first movement tendency and described second movement tendency determination output point.
2. method according to claim 1, is characterized in that, describedly utilizes described first movement tendency and described second movement tendency determination output point, comprising:
Described second movement tendency is decomposed, obtains first component parallel with the direction of motion of described first movement tendency, and the second component vertical with the direction of motion of described first movement tendency;
Described first component and described second component are revised respectively, obtains the first correction and the second correction; Wherein, to the correction degree of described first component lower than the correction degree to described second component;
Utilize described first correction and described second correction to revise described current sampling point, obtain described output point.
3. method according to claim 1, is characterized in that, describedly obtains the first movement tendency from described reference point to described future position respectively and from described reference point to the second movement tendency of described current sampling point, comprising:
The angle and distance between described reference point and described future position is utilized to determine described first movement tendency; The angle and distance between described reference point and described current sampling point is utilized to determine described second movement tendency.
4. method according to claim 1, is characterized in that, described in obtain current sampling point, comprising:
Determine that touch point is described current sampling point;
Obtain based on described history samples point the described reference point reflecting described history samples situation, comprising:
By obtaining described history samples point in sampling table;
Obtain the horizontal ordinate of described history samples point, ordinate and number, and according to the horizontal ordinate of described history samples point, ordinate and number computing reference horizontal ordinate and with reference to ordinate;
Described reference point is determined with reference to horizontal ordinate and described reference ordinate according to described;
Based on the movement locus of described history samples point to described reference point, prediction obtains described future position, comprising:
Calculate the angle between the described history samples point of arbitrary neighborhood two and distance;
According to number computational prediction vector and the angle angle of horizontal direction and the distance of described predicted vector of angle, distance and the described history samples point between adjacent two described history samples points;
Described future position is determined according to described predicted vector and the angle angle of horizontal direction and the distance of described predicted vector.
5. method according to claim 4, is characterized in that, described method also comprises the process of establishing in advance of described sampling table, and described process of establishing in advance comprises:
Predetermined quantity is set;
The current sampling point corresponding with fixed output point is stored in described sampling table as described history samples point;
If the number of the point of history samples described in described sampling table reaches described predetermined quantity, then, while often storing a described history samples point, delete the described history samples point be stored at first in described sampling table.
6. method according to claim 4, is characterized in that, describedly utilizes described first movement tendency and described second movement tendency determination output point, comprising:
Determine that the direction of described first movement tendency is the first direction of motion, its distance is the first move distance; Determine that the direction of described second movement tendency is the second direction of motion, its distance is the second move distance;
Utilize the first weight, described first direction of motion, described first move distance, described second direction of motion and described second move distance to calculate and export distance, wherein, described first weight is described current sampling point and the emphasis degree ratio of described history samples point on the direction being parallel to described first direction of motion;
Utilize the second weight, described first direction of motion and described second direction of motion to calculate outbound course, wherein, described second weight is described current sampling point and the emphasis degree ratio of described history samples point on the direction perpendicular to described first direction of motion;
Described calculating with reference to horizontal ordinate, described output distance, described outbound course and described first direction of motion is utilized to export horizontal ordinate;
Described calculating with reference to ordinate, described output distance, described outbound course and described first direction of motion is utilized to export ordinate;
Described output point is determined according to described output horizontal ordinate and described output ordinate.
7. a smooth processing unit, is characterized in that, comprising:
First acquisition module, for obtaining current sampling point;
Second acquisition module, for based on described current sampling point, reference point and future position, obtains the first movement tendency from described reference point to described future position and respectively from described reference point to the second movement tendency of described current sampling point; Wherein, the point of reflecting history sampling situations of described reference point for obtaining based on history samples point; Described future position is based on the movement locus of described history samples point to described reference point, predicts the point obtained;
Determination module, for utilizing described first movement tendency and described second movement tendency determination output point.
8. device according to claim 7, is characterized in that, described determination module comprises:
Resolving cell, for decomposing described second movement tendency, obtains first component parallel with the direction of motion of described first movement tendency, and the second component vertical with the direction of motion of described first movement tendency;
First amending unit, for revising respectively described first component and described second component, obtains the first correction and the second correction; Wherein, to the correction degree of described first component lower than the correction degree to described second component;
Second amending unit, for utilizing described first correction and described second correction to revise described current sampling point, obtains output point.
9. device according to claim 7, is characterized in that, described second acquisition module comprises:
First determining unit, determines described first movement tendency for utilizing the angle and distance between described reference point and described future position;
Second determining unit, determines described second movement tendency for utilizing the angle and distance between described reference point and described current sampling point.
10. device according to claim 7, is characterized in that, described first acquisition module comprises:
3rd determining unit, for determining that touch point is described current sampling point;
Described second acquisition module comprises:
4th determining unit, for by obtaining described history samples point in sampling table; Obtain the horizontal ordinate of described history samples point, ordinate and number, and according to the horizontal ordinate of described history samples point, ordinate and number computing reference horizontal ordinate and with reference to ordinate; And determine described reference point according to described with reference to horizontal ordinate and described reference ordinate;
5th determining unit, for calculating angle between the described history samples point of arbitrary neighborhood two and distance; According to number computational prediction vector and the angle angle of horizontal direction and the distance of described predicted vector of angle, distance and the described history samples point between adjacent two described history samples points; And determine described future position according to described predicted vector and the angle angle of horizontal direction and the distance of described predicted vector.
11. devices according to claim 10, is characterized in that, described device also comprises sets up module in advance, and described module of setting up in advance comprises:
Setting unit, for arranging predetermined quantity;
Storage unit, for being stored in described sampling table using the current sampling point corresponding with fixed output point as described history samples point;
Delete cells, if reach described predetermined quantity for the number of the point of history samples described in described sampling table, then, while often storing a described history samples point, deletes the described history samples point be stored at first in described sampling table.
12. devices according to claim 10, is characterized in that, described determination module comprises:
6th determining unit, for determining that the direction of described first movement tendency is the first direction of motion, its distance is the first move distance; And determine that the direction of described second movement tendency is the second direction of motion, its distance is the second move distance;
First computing unit, distance is exported for utilizing the first weight, described first direction of motion, described first move distance, described second direction of motion and described second move distance to calculate, wherein, described first weight is described current sampling point and the emphasis degree ratio of described history samples point on the direction being parallel to described first direction of motion;
Second computing unit, outbound course is calculated for utilizing the second weight, described first direction of motion and described second direction of motion, wherein, described second weight is described current sampling point and the emphasis degree ratio of described history samples point on the direction perpendicular to described first direction of motion;
3rd computing unit, described with reference to horizontal ordinate, described output distance, described outbound course and described first direction of motion calculating output horizontal ordinate for utilizing;
4th computing unit, described with reference to ordinate, described output distance, described outbound course and described first direction of motion calculating output ordinate for utilizing;
7th determining unit, for determining described output point according to described output horizontal ordinate and described output ordinate.
CN201510053708.8A 2015-01-30 2015-01-30 A kind of smoothing processing method and device for touch-screen curve of output Active CN104598155B (en)

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 true CN104598155A (en) 2015-05-06
CN104598155B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
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
CN107463329A (en) * 2017-07-28 2017-12-12 广东欧珀移动通信有限公司 Detection method, device, storage medium and the mobile terminal of blank screen gesture
CN109917430A (en) * 2019-04-03 2019-06-21 安徽中科智能感知产业技术研究院有限责任公司 A kind of satellite positioning track drift method for correcting error based on smooth trajectory algorithm
CN111158577A (en) * 2019-12-31 2020-05-15 奇安信科技集团股份有限公司 Remote operation processing method and device
CN111813719A (en) * 2020-06-15 2020-10-23 厦门科灿信息技术有限公司 Data polling method and device and terminal equipment
US11934652B2 (en) 2020-10-14 2024-03-19 Samsung Electronics Co., Ltd. Display apparatus and control method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070223596A1 (en) * 2006-03-24 2007-09-27 Zhe Fan Spurious Motion Filter
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070223596A1 (en) * 2006-03-24 2007-09-27 Zhe Fan Spurious Motion Filter
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

Cited By (10)

* Cited by examiner, † Cited by third party
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
CN107463329A (en) * 2017-07-28 2017-12-12 广东欧珀移动通信有限公司 Detection method, device, storage medium and the mobile terminal of blank screen gesture
CN107463329B (en) * 2017-07-28 2019-08-27 Oppo广东移动通信有限公司 Detection method, device, storage medium and the mobile terminal of blank screen gesture
US10761722B2 (en) 2017-07-28 2020-09-01 Guangdong Oppo Mobile Telecommunications Corp. Ltd. Black screen gesture detection method and device, storage medium, and mobile terminal
CN109917430A (en) * 2019-04-03 2019-06-21 安徽中科智能感知产业技术研究院有限责任公司 A kind of satellite positioning track drift method for correcting error based on smooth trajectory algorithm
CN111158577A (en) * 2019-12-31 2020-05-15 奇安信科技集团股份有限公司 Remote operation processing method and device
CN111158577B (en) * 2019-12-31 2021-10-01 奇安信科技集团股份有限公司 Remote operation processing method and device
CN111813719A (en) * 2020-06-15 2020-10-23 厦门科灿信息技术有限公司 Data polling method and device and terminal equipment
CN111813719B (en) * 2020-06-15 2023-01-10 厦门科灿信息技术有限公司 Data polling method and device and terminal equipment
US11934652B2 (en) 2020-10-14 2024-03-19 Samsung Electronics Co., Ltd. Display apparatus and control method thereof

Also Published As

Publication number Publication date
CN104598155B (en) 2018-05-22

Similar Documents

Publication Publication Date Title
CN104598155A (en) Smoothing method and device
CN104089624B (en) Step-recording method and terminal device
Kholil et al. Scheduling of house development projects with CPM and PERT method for time efficiency (Case study: House type 36)
CN103645725A (en) Teaching track planning method and system for robot
CN103378724A (en) DC-DC buck converter high-order sliding mode control method
CN107844058A (en) A kind of curve movement Discrete Dynamic Programming method
CN110216673A (en) The non-dominant neighborhood immune genetic Multipurpose Optimal Method of electro-hydraulic joint of robot track
CN103279810B (en) Based on predicated error test for convergence and the short-term load forecasting method of track correct
CN103413038A (en) Vector quantization based long-term intuitionistic fuzzy time series prediction method
CN105159090A (en) PI tracking controller designing method for stochastic system based on Markov models
CN103258131A (en) Power circuit component optimization method based on orthogonal learning particle swarm
CN106292290A (en) A kind of wheeled mobile robot point is calmed rolling optimization control method
CN105630468A (en) Focal point movement method and device of UI (User Interface) frame
CN106303652A (en) The method for drafting of a kind of interface element and device
Amigues et al. Optimal timing of carbon capture policies under learning-by-doing
CN102929529A (en) Multi-select control method and device for list interface, and mobile terminal
CN105716558A (en) Method and system for error correction
CN110460085A (en) A method of consider wind-powered electricity generation and part throttle characteristics to effect on power system
CN108199792B (en) WCDMA base station electromagnetic radiation prediction method
CN104238364A (en) Limited and short time control method of double-random-jumping system
CN110262222A (en) A kind of Interval System optimum interval PID controller parameter optimization method
Jie et al. Run-up of non-breaking double solitary waves with equal wave heights on a plane beach
CN110048600B (en) Method for carrying out second-order sliding mode synchronous optimization on time lag value delta and switching frequency in DC-DC buck converter
Böhm et al. Robust control of constrained sector bounded Lur’e systems with applications to nonlinear model predictive control
Kapinski et al. Control software model checking using bisimulation functions for nonlinear systems

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