Summary of the invention
In view of above-mentioned the deficiencies in the prior art, the object of the present invention is to provide a kind of track based on touch-screen to surround icon central point angle detecting method and system, be intended to solve in prior art and touch-screen chosen figure object detection method cannot the defect of intelligent decision mistaken touch.
Technical scheme of the present invention is as follows:
Track based on touch-screen surrounds an icon central point angle detecting method, wherein, said method comprising the steps of:
A, acquisition user sliding trace on the touchscreen;
B, surround icon central point angle algorithm according to described sliding trace and the track that presets and obtain the angle of contact that described sliding trace surrounds icon central point, and judge that according to angle of contact in the current display interface of touch-screen, whether icon is selected;
C, when judging that icon is selected, then mate according to described angle of contact and the angle of contact-application operating correspondence table that prestores, corresponding operation is performed to selected icon.
The described track based on touch-screen surrounds icon central point angle detecting method, wherein, in described steps A when obtaining user's sliding trace on the touchscreen, when in chronological sequence recording user slides on the touchscreen coordinate a little, be designated as t
1to t
k, and obtain t
1to t
kcoordinate, successively remember (x
t1, y
t1) to (x
tk, y
tk), t
1to t
kcoordinate set be designated as ET; Wherein, k is positive integer.
The described track based on touch-screen surrounds icon central point angle detecting method, wherein, specifically comprises in described step B:
Coordinate (the x of icon central point MID in the current display interface of B1, acquisition touch-screen
mID, y
mID), and the distance of the distance icon central point MID coordinate a little that is DR, be designated as c
1to c
n, and obtain c
1to c
ncoordinate, successively remember (x
c1, y
c1) to (x
cn, y
cn), c
1to c
ncoordinate set be designated as EC; Wherein, DR is half that is long in icon and wide middle smaller, and n is positive integer;
B2, surround icon central point angle algorithm according to described track and obtain the angle of contact AC that described sliding trace surrounds icon central point MID; Wherein, AC span is 0 to 360 degree;
B3, judge touch-screen current display interface in angle of contact AC corresponding to icon whether be greater than default angle of contact threshold value, when being greater than then touch-screen current display interface in icon selected.
The described track based on touch-screen surrounds icon central point angle detecting method, wherein, specifically comprises in described step B2:
B21, acquisition t
1to t
kmiddle each point respectively with the intersection point of the ray be formed by connecting with icon central point MID and coordinate set EC, each intersection point is deleted from EC, and obtains in coordinate set EC and remain coordinate points number f; Wherein, f is positive integer;
B22, according to AC=360*(n-f)/n obtains the angle of contact AC that described sliding trace surrounds icon central point MID; Wherein, n is total number of coordinate points in coordinate set EC.
The described track based on touch-screen surrounds icon central point angle detecting method, wherein, also comprises before described steps A:
S, pre-set the track surrounding the angle of contact of icon central point for calculating track and surround icon central point angle algorithm, and angle of contact-application operating correspondence table.
Track based on touch-screen surrounds an icon central point angle detection system, wherein, comprising:
Track acquisition module, for obtaining user's sliding trace on the touchscreen;
Track judge module, obtain for surrounding icon central point angle algorithm according to described sliding trace and the track that presets the angle of contact that described sliding trace surrounds icon central point, and judge that according to angle of contact in the current display interface of touch-screen, whether icon is selected;
Control module, for when judging that icon is selected, then mates according to described angle of contact and the angle of contact-application operating correspondence table that prestores, performs corresponding operation to selected icon.
The described track based on touch-screen surrounds icon central point angle detection system, wherein, in described track acquisition module when obtaining user's sliding trace on the touchscreen, when in chronological sequence recording user slides on the touchscreen coordinate a little, be designated as t
1to t
k, and obtain t
1to t
kcoordinate, successively remember (x
t1, y
t1) to (x
tk, y
tk), t
1to t
kcoordinate set be designated as ET; Wherein, k is positive integer.
The described track based on touch-screen surrounds icon central point angle detection system, and wherein, described track judge module specifically comprises:
Central point and surround circle acquiring unit, for obtain touch-screen current display interface in the coordinate (x of icon central point MID
mID, y
mID), and the distance of the distance icon central point MID coordinate a little that is DR, be designated as c
1to c
n, and obtain c
1to c
ncoordinate, successively remember (x
c1, y
c1) to (x
cn, y
cn), c
1to c
ncoordinate set be designated as EC; Wherein, DR is half that is long in icon and wide middle smaller, and n is positive integer;
Angle of contact acquiring unit, obtains for surrounding icon central point angle algorithm according to described track the angle of contact AC that described sliding trace surrounds icon central point MID; Wherein, AC span is 0 to 360 degree;
Icon chooses judging unit, for judge touch-screen current display interface in angle of contact AC corresponding to icon whether be greater than default angle of contact threshold value, when being greater than then touch-screen current display interface in icon selected.
The described track based on touch-screen surrounds icon central point angle detection system, and wherein, described angle of contact acquiring unit specifically comprises:
Intersection point deletes subdivision, for obtaining t
1to t
kmiddle each point respectively with the intersection point of the ray be formed by connecting with icon central point MID and coordinate set EC, each intersection point is deleted from EC, and obtains in coordinate set EC and remain coordinate points number f; Wherein, f is positive integer;
Angle of contact calculates subdivision, for according to AC=360*(n-f)/n obtains the angle of contact AC that described sliding trace surrounds icon central point MID; Wherein, n is total number of coordinate points in coordinate set EC.
The described track based on touch-screen surrounds icon central point angle detection system, wherein, also comprises:
Module being set, surrounding icon central point angle algorithm for pre-setting the track surrounding the angle of contact of icon central point for calculating track, and angle of contact-application operating correspondence table.
The invention provides a kind of track based on touch-screen and surround icon central point angle detecting method and system, method comprises: obtain user's sliding trace on the touchscreen; Surround icon central point angle algorithm according to described sliding trace and the track that presets and obtain the angle of contact that described sliding trace surrounds icon central point, and judge that according to angle of contact in the current display interface of touch-screen, whether icon is selected; When judging that icon is selected, then mate according to described angle of contact and the angle of contact-application operating correspondence table that prestores, corresponding operation is performed to selected icon.The present invention surrounds the angle of contact of icon central point by obtaining described sliding trace, and judges the operation carried out selected icon according to angle of contact-application operating correspondence table, effectively avoids mistaken touch and the maloperation that causes.
Embodiment
The invention provides a kind of track based on touch-screen and surround icon central point angle detecting method and system, for making object of the present invention, technical scheme and effect clearly, clearly, the present invention is described in more detail below.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Refer to Fig. 1, Fig. 1 is the process flow diagram that the track based on touch-screen of the present invention surrounds the preferred embodiment of icon central point angle detecting method.As shown in Figure 1, it comprises the following steps:
Step S100, acquisition user sliding trace on the touchscreen.
In embodiments of the invention, user's sliding trace is on the touchscreen arbitrary shape, as straight line, S molded line and various rule or irregular curve etc.
Step S200, surround icon central point angle algorithm according to described sliding trace and the track that presets and obtain the angle of contact that described sliding trace surrounds icon central point, and judge that according to angle of contact in the current display interface of touch-screen, whether icon is selected.
When obtaining user's sliding trace on the touchscreen, according to this sliding trace, can all calculate corresponding angle of contact to each icon in the current display interface of touch-screen, and judging whether each icon meets selected condition.During concrete enforcement, be judge whether the angle of contact that each icon is corresponding is greater than default angle of contact threshold value, and the icon that then this angle of contact is corresponding when being greater than is selected.
Step S300, when judging that icon is selected, then mate according to described angle of contact and the angle of contact-application operating correspondence table that prestores, corresponding operation is performed to selected icon.
In embodiments of the invention, when judging that icon is selected, likely then that in the current display interface of touch-screen, multiple icon is all selected, now can eject the prompting frame of a selected icon, prompting user selects multiple one or more by the icon selected, after touch-screen receives the touch selection operation of user, then obtain the icon selected in prompting frame by user, and mate according to described angle of contact and the angle of contact-application operating correspondence table that prestores, corresponding operation is performed to selected icon.Owing to adding the process of secondary-confirmation, the sliding trace that user is touched is only effective to selected icon, avoids the maloperation to other icons.
Further, as shown in Figure 2, judge in described step S200 that the idiographic flow that in current display interface, whether icon is selected comprises:
Coordinate (the x of icon central point MID in the current display interface of step S201, acquisition touch-screen
mID, y
mID), and the distance of the distance icon central point MID coordinate a little that is DR, be designated as c
1to c
n, and obtain c
1to c
ncoordinate, successively remember (x
c1, y
c1) to (x
cn, y
cn), c
1to c
ncoordinate set be designated as EC; Wherein, DR is half that is long in icon and wide middle smaller, and n is positive integer.
Also comprised before step S201 and obtain each icon coordinate range on the touchscreen in current display interface.Such as, illustrate for one of them icon in current display interface, as shown in Figure 3, the coordinate range of this icon meets horizontal ordinate be more than or equal to xx1 and be less than xx2, and ordinate is more than or equal to yy1 and is less than the coordinate points of yy2.
Refer again to Fig. 4, obtain the central point MID of this icon, its coordinate is (x
mID, y
mID).Obviously, x
mID=(xx1+xx2)/2, y
mID=(yy1+yy2)/2.The coordinate a little that is DR by the distance of distance icon central point MID, is designated as c
1to c
n, and obtain c
1to c
ncoordinate, successively remember (x
c1, y
c1) to (x
cn, y
cn), c
1to c
ncoordinate set be designated as EC; Wherein to be the long half with wide middle smaller of icon and DR be DR (xx2-xx1) and the half of (yy2-yy1) middle smaller.
Step S202, surround icon central point angle algorithm according to described track and obtain the angle of contact AC that described sliding trace surrounds icon central point MID; Wherein, AC span is 0 to 360 degree.
Step S203, judge touch-screen current display interface in angle of contact AC corresponding to icon whether be greater than default angle of contact threshold value, when being greater than then touch-screen current display interface in icon selected.During concrete enforcement, described angle of contact threshold value is set to 30 degree.
Further, as shown in Figure 5, the idiographic flow obtaining corresponding angle of contact according to described track encirclement icon central point angle algorithm in described step S202 comprises:
Step S2021, acquisition t
1to t
kmiddle each point respectively with the intersection point of the ray be formed by connecting with icon central point MID and coordinate set EC, each intersection point is deleted from EC, and obtains in coordinate set EC and remain coordinate points number f; Wherein, f is positive integer.
The detailed process of step S2021 is as follows:
(1) acquisition point (x
mID, y
mID), (x
t1, y
t1) intersection point of the ray that forms and coordinate set EC, and this intersection point is deleted in set EC; Wherein, with point (x
mID, y
mID) be the end points of ray;
(2) acquisition point (x
mID, y
mID), (x
t2, y
t2) intersection point of the ray that forms and coordinate set EC, and this intersection point is deleted in set EC; Wherein, with point (x
mID, y
mID) be the end points of ray;
(3) acquisition point (x
mID, y
mID), (x
t3, y
t3) intersection point of the ray that forms and coordinate set EC, and this intersection point is deleted in set EC; Wherein, with point (x
mID, y
mID) be the end points of ray;
……
(k) acquisition point (x
mID, y
mID), (x
tk, y
tk) intersection point of the ray that forms and coordinate set EC, and this intersection point is deleted in set EC; Wherein, with point (x
mID, y
mID) be the end points of ray;
(k+1) the number f also remaining coordinate in set EC is obtained.
Wherein, judgement (x is in above-mentioned steps (1)-(k)
mID, y
mID) and (x
ti, y
ti) intersection point of the ray that forms and coordinate set EC, and this intersection point is deleted in set EC; Wherein, i=1,2,3 ..., k.Concrete, as satisfied (x
ti-x
mID) * (y-y
mID)=(y
ti-y
mID) * (x-x
mID) time, then (x
mID, y
mID) and (x
ti, y
ti) ray that forms and coordinate set EC have intersection point.
Step S2022, according to AC=360*(n-f)/n obtains the angle of contact AC that described sliding trace surrounds icon central point MID; Wherein, n is total number of coordinate points in coordinate set EC.
Please refer to Fig. 6, it is the schematic diagram that in the present invention, sliding trace surrounds the angle of contact of icon central point, by coordinate points number not deleted in statistics coordinate set EC, can obtain the angle of contact AC that described sliding trace surrounds icon central point MID.As shown in Figure 6, track one is AC with the angle of contact of track two couples of icon central point MID, now can mate according to angle of contact AC and described angle of contact-application operating correspondence table, perform corresponding operation to selected icon.This from prior art once user chooses icon, immediately trigger corresponding operating be different, the present invention triggers corresponding operating by the angle of contact of sliding trace to icon central point, effectively prevent the maloperation of user.
Further, in described step S100, obtain user's sliding trace on the touchscreen before also comprise:
Step S10, pre-set the track surrounding the angle of contact of icon central point for calculating track and surround icon central point angle algorithm, and angle of contact-application operating correspondence table.
During concrete enforcement, described angle of contact-application operating correspondence table can be: angle of contact AC is greater than 180 degree to be triggered this application and open, angle of contact AC triggers this application of unloading when being greater than 45 and being less than or equal to 90, angle of contact AC triggers when being greater than 90 and being less than or equal to 135 and copies this application, angle of contact AC triggers foreground when being greater than 135 and being less than or equal to 180 and opens this application, triggers backstage and open this application when angle of contact AC is greater than 180 and is less than or equal to 266.
Based on said method embodiment, the present invention also provides a kind of track based on touch-screen to surround icon central point angle detection system, and as shown in Figure 7, it comprises:
Track acquisition module 100, for obtaining user's sliding trace on the touchscreen; As detailed above.
Track judge module 200, obtain for surrounding icon central point angle algorithm according to described sliding trace and the track that presets the angle of contact that described sliding trace surrounds icon central point, and judge that according to angle of contact in the current display interface of touch-screen, whether icon is selected; As detailed above.
Control module 300, for when judging that icon is selected, then mates according to described angle of contact and the angle of contact-application operating correspondence table that prestores, performs corresponding operation to selected icon; As detailed above.
Further; surround in icon central point angle detection system at the described track based on touch-screen; in described track acquisition module 100 when obtaining user's sliding trace on the touchscreen, when in chronological sequence recording user slides on the touchscreen coordinate a little, be designated as t
1to t
k, and obtain t
1to t
kcoordinate, successively remember (x
t1, y
t1) to (x
tk, y
tk), t
1to t
kcoordinate set be designated as ET; Wherein, k is positive integer; As detailed above.
Further, surround in icon central point angle detection system at the described track based on touch-screen, described track judge module 200 specifically comprises:
Central point and surround circle acquiring unit, for obtain touch-screen current display interface in the coordinate (x of icon central point MID
mID, y
mID), and the distance of the distance icon central point MID coordinate a little that is DR, be designated as c
1to c
n, and obtain c
1to c
ncoordinate, successively remember (x
c1, y
c1) to (x
cn, y
cn), c
1to c
ncoordinate set be designated as EC; Wherein, DR is half that is long in icon and wide middle smaller, and n is positive integer; As detailed above.
Angle of contact acquiring unit, obtains for surrounding icon central point angle algorithm according to described track the angle of contact AC that described sliding trace surrounds icon central point MID; Wherein, AC span is 0 to 360 degree; As detailed above.
Icon chooses judging unit, for judge touch-screen current display interface in angle of contact AC corresponding to icon whether be greater than default angle of contact threshold value, when being greater than then touch-screen current display interface in icon selected; As detailed above.
Further, surround in icon central point angle detection system at the described track based on touch-screen, described angle of contact acquiring unit specifically comprises:
Intersection point deletes subdivision, for obtaining t
1to t
kmiddle each point respectively with the intersection point of the ray be formed by connecting with icon central point MID and coordinate set EC, each intersection point is deleted from EC, and obtains in coordinate set EC and remain coordinate points number f; Wherein, f is positive integer; As detailed above.
Angle of contact calculates subdivision, for according to AC=360*(n-f)/n obtains the angle of contact AC that described sliding trace surrounds icon central point MID; Wherein, n is total number of coordinate points in coordinate set EC; As detailed above.
Further, surround in icon central point angle detection system at the described track based on touch-screen, also comprise:
Module being set, surrounding icon central point angle algorithm for pre-setting the track surrounding the angle of contact of icon central point for calculating track, and angle of contact-application operating correspondence table; As detailed above.
In sum, the invention provides a kind of track based on touch-screen and surround icon central point angle detecting method and system, method comprises: obtain user's sliding trace on the touchscreen; Surround icon central point angle algorithm according to described sliding trace and the track that presets and obtain the angle of contact that described sliding trace surrounds icon central point, and judge that according to angle of contact in the current display interface of touch-screen, whether icon is selected; When judging that icon is selected, then mate according to described angle of contact and the angle of contact-application operating correspondence table that prestores, corresponding operation is performed to selected icon.The present invention surrounds the angle of contact of icon central point by obtaining described sliding trace, and judges the operation carried out selected icon according to angle of contact-application operating correspondence table, effectively avoids mistaken touch and the maloperation that causes.
Should be understood that, application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can be improved according to the above description or convert, and all these improve and convert the protection domain that all should belong to claims of the present invention.