A method, device and apparatus for identifying touch points
By traversing the intersection points of the occlusion line, the method of determining the center point and the touch radius and establishing a touch area has solved the problems of low computing efficiency and large memory usage of identifying touch points in the prior art, and more efficient and accurate identification has been achieved.
Patent Information
- Application Number
- CN202011631080.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2040-12-30
AI Technical Summary
In the prior art, the method of identifying touch points has low computing efficiency and occupies a large memory, and has limited optimization space.
By obtaining information about the occlusion line, traverse the intersection of the occlusion line in the up and down directions and the left and right directions, determine the center point and the touch radius, establish a touch area, and then identify the touch point.
This method improves the computing efficiency of identifying touch points, reduces memory usage, and expands the optimization space.
Smart Images

Figure CN114690963B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of infrared recognition technology, and in particular, relates to a method, device and equipment for identifying touch points. Background Art
[0002] In the prior art, when performing touch point recognition on infrared images, a multi-touch algorithm can be used, among which the more commonly used one is the image processing algorithm. The image processing algorithm creates corresponding small squares for each frame of infrared image, and then classifies the squares into those with infrared rays passing through and those without infrared rays passing through. Selecting the squares without infrared rays passing through is the first step in finding touch points. The image processing algorithm has high accuracy in finding touch points, can handle multi-touch scenarios, and supports large and small touch.
[0003] However, since the image processing method needs to create a small image grid that consumes a lot of memory when used, this method of identifying touch points has a relatively low computational efficiency, occupies a large amount of memory, and has little room for optimization. Summary of the invention
[0004] The embodiments of the present application provide a method, device and equipment for identifying touch points, which can solve the problems that the method for identifying touch points through image processing has low computational efficiency, occupies a large amount of memory and has a small optimization space.
[0005] In a first aspect, an embodiment of the present application provides a method for identifying a touch point, comprising:
[0006] Acquire information of occlusion lines, where the occlusion lines include a first up-down occlusion line in a first direction and a first left-right occlusion line in a second direction;
[0007] Traversing the first up-down occlusion lines, and determining a first center point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines;
[0008] Determine a non-occluded line closest to the first center point as a first target line segment, and determine a first touch radius according to the distance between the first center and the first target line segment;
[0009] Determine the first touch area according to the first center point and the first touch radius, determine the first up-down occlusion line passing through the first touch area as the traversed first up-down occlusion line, obtain the next first up-down occlusion line that has not been traversed, and return to execute the method of determining the first center point according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines.
[0010] Furthermore, the traversing the first up-down occlusion lines and determining the first center point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines includes:
[0011] Traversing the first up-down occlusion lines, and determining a first candidate point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines;
[0012] Determine the non-occluded line closest to the first candidate point as the first candidate line segment; the first candidate line segment includes a first candidate line segment in a first direction and a first candidate line segment in a second direction; the first direction is opposite to the second direction;
[0013] A first center point is determined according to the first candidate line segment in the first direction, the first candidate line segment in the second direction, and the first candidate point.
[0014] Further, determining the first touch area according to the first center point and the touch radius includes:
[0015] If the touch radius is less than the first preset radius threshold, obtaining the next first up-down occlusion line that has not been traversed, and returning to execute the step of determining the first center point according to the intersection points of the first up-down occlusion line and each of the first left-right occlusion lines;
[0016] If the touch radius is greater than a first preset radius threshold, a first touch area is determined according to the first center point and the first touch radius.
[0017] Further, after determining the first touch area according to the first center point and the touch radius, the method further includes:
[0018] Deleting the occlusion lines intersecting the first touch area from the occlusion lines to obtain target occlusion lines; the target occlusion lines include a second up-down occlusion line and a second left-right occlusion line;
[0019] Traversing the second up-down occlusion lines, and determining a second center point according to intersections of the second up-down occlusion lines and each of the second left-right occlusion lines;
[0020] Determine the non-blocking line closest to the second center point as a second target line segment, and determine a second touch radius according to the distance between the second center and the second target line segment;
[0021] Determine the second touch area according to the second center point and the second touch radius, determine the second up-down occlusion line passing through the second touch area as the traversed second up-down occlusion line, obtain the next second up-down occlusion line that has not been traversed, and return to execute the method of determining the second center point according to the intersection of the second up-down occlusion line and each of the second left-right occlusion lines.
[0022] Further, after determining the target touch area according to the first touch area and the second touch area, the method further includes:
[0023] determining a first left-right direction occlusion line that does not pass through the first touch area and the second touch area as a candidate occlusion line;
[0024] Determine a second candidate point according to the intersection points of all the candidate occlusion lines, and obtain the number of candidate occlusion lines passing through the second candidate point;
[0025] Acquire a dominant occlusion line from all the candidate occlusion lines through which the second candidate points with the largest number pass;
[0026] Determine an auxiliary occlusion line according to the second candidate point and the dominant occlusion line;
[0027] Determine a third center point according to an intersection point between the main occlusion line and the auxiliary occlusion line;
[0028] Determine a non-blocking line that is closest to the third center point as a third target line segment, and determine a third touch radius according to the distance between the third center and the third target line segment;
[0029] A third touch area is determined according to the third center point and the third touch radius.
[0030] In a second aspect, an embodiment of the present application provides a device for identifying a touch point, including:
[0031] A first acquisition unit, configured to acquire information of occlusion lines, wherein the occlusion lines include a first up-down occlusion line in a first direction and a first left-right occlusion line in a second direction;
[0032] A first traversal unit, configured to traverse the first up-down occlusion lines, and determine a first center point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines;
[0033] a first processing unit, configured to determine a non-blocking line closest to the first center point as a first target line segment, and determine a first touch radius according to a distance between the first center and the first target line segment;
[0034] A second processing unit is used to determine a first touch area according to the first center point and the first touch radius, determine a first up-down occlusion line passing through the first touch area as a traversed first up-down occlusion line, obtain a next first up-down occlusion line that has not been traversed, and return to execute the step of determining the first center point according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines.
[0035] Furthermore, the first traversal unit is specifically used for:
[0036] Traversing the first up-down occlusion lines, and determining a first candidate point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines;
[0037] Determine the non-occluded line closest to the first candidate point as the first candidate line segment; the first candidate line segment includes a first candidate line segment in a first direction and a first candidate line segment in a second direction; the first direction is opposite to the second direction;
[0038] A first center point is determined according to the first candidate line segment in the first direction, the first candidate line segment in the second direction, and the first candidate point.
[0039] The second processing unit is further configured to:
[0040] If the touch radius is less than the first preset radius threshold, obtaining the next first up-down occlusion line that has not been traversed, and returning to execute the step of determining the first center point according to the intersection points of the first up-down occlusion line and each of the first left-right occlusion lines;
[0041] If the touch radius is greater than a first preset radius threshold, a first touch area is determined according to the first center point and the first touch radius.
[0042] Furthermore, the device for identifying touch points further includes:
[0043] A third processing unit is configured to delete the occlusion lines intersecting the first touch area from the occlusion lines to obtain target occlusion lines; the target occlusion lines include a second up-down occlusion line and a second left-right occlusion line;
[0044] A second traversal unit, configured to traverse the second up-down occlusion line, and determine a second center point according to intersections of the second up-down occlusion line and each of the second left-right occlusion lines;
[0045] a fourth processing unit, configured to determine a non-blocking line that is closest to the second center point as a second target line segment, and determine a second touch radius according to a distance between the second center and the second target line segment;
[0046] A fifth processing unit is used to determine the second touch area according to the second center point and the second touch radius, determine the second up-down occlusion line passing through the second touch area as the traversed second up-down occlusion line, obtain the next second up-down occlusion line that has not been traversed, and return to execute the determination of the second center point according to the intersection of the second up-down occlusion line and each of the second left-right occlusion lines.
[0047] Furthermore, the device for identifying touch points further includes:
[0048] A sixth processing unit, configured to determine a first left-right direction occlusion line that does not pass through the first touch area and the second touch area as a candidate occlusion line;
[0049] a seventh processing unit, configured to determine a second candidate point according to intersection points of all the candidate occlusion lines, and obtain the number of candidate occlusion lines passing through the second candidate point;
[0050] An eighth processing unit, configured to obtain a dominant occlusion line from all the candidate occlusion lines through which the second candidate points with the largest number pass;
[0051] a ninth processing unit, configured to determine an auxiliary occlusion line according to the second candidate point and the dominant occlusion line;
[0052] a tenth processing unit, configured to determine a third center point according to an intersection point between the dominant occlusion line and the auxiliary occlusion line;
[0053] an eleventh processing unit, configured to determine a non-blocking line closest to the third center point as a third target line segment, and determine a third touch radius according to a distance between the third center and the third target line segment;
[0054] A twelfth processing unit is configured to determine a third touch area according to the third center point and the third touch radius.
[0055] In a third aspect, an embodiment of the present application provides a device for identifying touch points, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for identifying touch points as described in the first aspect above when executing the computer program.
[0056] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for identifying touch points as described in the first aspect above is implemented.
[0057] In the embodiment of the present application, the information of the occlusion line is obtained; the first up-down occlusion line is traversed, and the first center point is determined according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines; the non-occlusion line closest to the first center point is determined as the first target line segment, and the first touch radius is determined according to the distance between the first center and the first target line segment; the first touch area is determined according to the first center point and the first touch radius, and the first up-down occlusion line passing through the first touch area is determined as the traversed first up-down occlusion line, and the next untraversed first up-down occlusion line is obtained, and the determination of the first center point according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines is returned to execute. In the above method, when performing touch point recognition, there is no need to process the infrared image and establish a small image grid that consumes a lot of memory. The touch point is determined only by traversing the occlusion line. This method of identifying the touch point has a relatively high computational efficiency and does not occupy much memory. When performing recognition, it is more efficient and accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0059] Figure 1 is a schematic flow chart of a method for identifying touch points provided in the first embodiment of the present application;
[0060] Figure 2 A schematic diagram of a first up-down occlusion line and a first left-right occlusion line in a method for identifying a touch point provided in a first embodiment of the present application;
[0061] Figure 3 is a schematic flow chart of S105 to S108 in a method for identifying touch points provided in the first embodiment of the present application;
[0062] Figure 4 is a schematic diagram of a device for identifying touch points provided in a second embodiment of the present application;
[0063] Figure 5 is a schematic diagram of a device for identifying touch points provided in the third embodiment of the present application. DETAILED DESCRIPTION
[0064] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0065] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0066] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0067] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0068] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0069] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0070] See also Figure 1 , Figure 11 is a schematic flow chart of a method for identifying touch points provided in the first embodiment of the present application. The execution subject of the method for identifying touch points in this embodiment is a device with a touch point identification function, such as a server, a mobile device, etc. Figure 1 The method of identifying touch points may include:
[0071] S101: Acquire information of occlusion lines, where the occlusion lines include a first up-down occlusion line and a first left-right occlusion line.
[0072] Multiple infrared transceiver modules are provided in the infrared touch screen. Each infrared transceiver module includes an infrared transmitting tube and an infrared receiving tube. The infrared transmitting tube and the infrared receiving tube are provided separately. In the infrared transceiver module, the infrared transmitting tube can transmit infrared rays, and the infrared receiving tube can receive infrared rays. Multiple infrared transceiver modules can form an infrared detection network. In actual application, the terminal device can determine whether the infrared rays corresponding to the infrared receiving tube are blocked according to the signal value of the infrared rays detected by the infrared receiving tube.
[0073] In this embodiment, the blocked infrared rays are called blocking lines. The device obtains information about the blocking lines, where the blocking lines include a first vertical blocking line and a first horizontal blocking line. Figure 2 As shown, Figure 2 It is a schematic diagram of a first up-down shading line and a first left-right shading line. Figure 2 All the lines in are occluded lines. Figure 2 The shielding line whose starting point and end point are located on the long side of the frame rectangle is the first up-down shielding line, and the shielding line whose starting point and end point are located on the wide side of the frame rectangle is the first left-right shielding line.
[0074] S102: traverse the first up-down occlusion lines, and determine a first center point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines.
[0075] The device traverses the first up-down occlusion line. The device obtains the intersection of the first up-down occlusion line and each first left-right occlusion line, and selects the first center point from the intersection of the first up-down occlusion line and each first left-right occlusion line. The first center point can be determined based on the density of the intersections of the first up-down occlusion line and each first left-right occlusion line, or based on the distance between the intersection of the first up-down occlusion line and each first left-right occlusion line and the non-occlusion line.
[0076] In one implementation, the first up-down occlusion lines are traversed, and a first candidate point is determined according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines.
[0077] When determining the first candidate point, the first candidate point can be determined according to the area density corresponding to the intersection of the first up-down occlusion line and each first left-right occlusion line. The first candidate point is the center point of the intersection contained in the area with the largest area density.
[0078] When determining the first candidate point, the first candidate point can also be determined based on the coordinates of the intersection of the first up-down occlusion line and each first left-right occlusion line. For example, when the first up-down occlusion line is a longitudinal occlusion line and the first left-right occlusion line is a transverse occlusion line, obtain the ordinate corresponding to the intersection of the first up-down occlusion line and each first left-right occlusion line, sort the ordinates of all the intersections, obtain a preset number of ordinates with the highest density, and obtain the middle ordinate of the preset number of ordinates as the target ordinate. Determine the first center point based on the target ordinate and the first up-down occlusion line.
[0079] The non-occluded line closest to the first candidate point is determined as the first candidate line segment; the first candidate line segment includes the first candidate line segment in the first direction and the first candidate line segment in the second direction; the first direction is opposite to the second direction. The first center point is determined based on the first candidate line segment in the first direction, the first candidate line segment in the second direction and the first candidate point.
[0080] For example, the device can find two horizontal non-occluded lines closest to the first candidate point in the up and down directions respectively, and use these two non-occluded lines as the first candidate line segment. The device can find the vertical non-occluded lines closest to the first candidate point in the left and right directions respectively as the second candidate line segment. The device obtains the midpoint of the line segment between the first candidate line segments passing through the first candidate point and the midpoint between the second candidate line segments, and corrects the first candidate point through the midpoint of the line segment between the first candidate line segments and the midpoint between the second candidate line segments to obtain the first center point.
[0081] In one implementation, for example, the device may find two horizontal non-occluded lines closest to the first candidate point in the up and down directions, and use the two non-occluded lines as the first candidate line segment. The device may obtain the midpoint of the line segment passing through the first candidate point between the first candidate line segments, and the device may find the vertical non-occluded lines closest to the midpoint in the left and right directions, as the second candidate line segment. The midpoint of the line segment passing through the midpoint between the second candidate line segments is found as the first center point.
[0082] S103: Determine a non-blocking line that is closest to the first center point as a first target line segment, and determine a first touch radius according to the distance between the first center and the first target line segment.
[0083] Taking the first center point as the center, find the non-blocking line closest to the first center point as the first target line segment. And obtain the distance between the first center and the first target line segment, the distance between the first center and the first target line segment is the vertical distance from the point to the line. According to the distance, the first touch radius can be determined, wherein the distance can be directly used as the first touch radius.
[0084] S104: Determine the first touch area according to the first center point and the first touch radius, determine the first up-down occlusion line passing through the first touch area as the traversed first up-down occlusion line, obtain the next first up-down occlusion line that has not been traversed, and return to execute the step of determining the first center point according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines.
[0085] The device determines the first touch area according to the first center point and the first touch radius. Specifically, the device constructs a circular area with the first center point as the center and the first touch radius as the radius, and uses the circular area as the first touch area.
[0086] Furthermore, in order to avoid repeated traversal, after traversing a first up-down occlusion line, the first up-down occlusion line passing through the first touch area is determined as the traversed first up-down occlusion line, and the next first up-down occlusion line that has not been traversed is obtained, and the process returns to determine the first center point based on the intersection of the first up-down occlusion line and each of the first left-right occlusion lines, and the first touch area corresponding to the first up-down occlusion line that has not been traversed is obtained again.
[0087] In addition, since the touch point is actually a touch area, there will be some small areas near a touch area, but in fact they all belong to one touch point. In order to ensure that the detected touch point is accurate enough, a first preset radius threshold can be set in advance in this embodiment. If the touch radius is less than the first preset radius threshold, the next untraversed first up and down occlusion line is obtained, and the corresponding first touch area is no longer obtained this time, and the process returns to execute the determination of the first center point based on the intersection of the first up and down occlusion line and the first left and right occlusion lines; if the touch radius is greater than the first preset radius threshold, the first touch area is determined based on the first center point and the first touch radius.
[0088] In one implementation, to avoid repeated acquisition, when multiple identical touch areas are acquired, if the distance between the acquired first touch areas is less than a preset distance threshold, only the first touch area with a larger first touch radius among the two first touch areas is retained.
[0089] Furthermore, in order to ensure the accuracy of recognition, in this embodiment, a second traversal can be performed, and the second touch radius corresponding to the second touch area obtained in this traversal should be smaller than the first touch radius. In this way, when obtaining the final target touch radius, the intersection area of the first touch area and the second touch area can be obtained. After S104, S105 to S108 can also be included, such as Figure 3 As shown, S105 to S108 are specifically as follows:
[0090] S105: Delete the occlusion lines intersecting the first touch area from the occlusion lines to obtain target occlusion lines; the target occlusion lines include a second up-down occlusion line and a second left-right occlusion line.
[0091] In order to reduce the amount of data, the device deletes the occlusion lines intersecting the first touch area from the first up-down occlusion lines to obtain target occlusion lines; the target occlusion lines include the second up-down occlusion lines and the second left-right occlusion lines.
[0092] S106: traverse the second up-down occlusion lines, and determine a second center point according to intersections of the second up-down occlusion lines and each of the second left-right occlusion lines.
[0093] In this embodiment, the specific implementation details of traversing the second up-down occlusion line and obtaining the second center point can refer to the relevant description of traversing the first up-down occlusion line and obtaining the first center point in S102, which will not be repeated here.
[0094] S107: Determine a non-blocking line that is closest to the second center point as a second target line segment, and determine a second touch radius according to the distance between the second center and the second target line segment.
[0095] The implementation details of S107 in this embodiment may be referred to in the description of S103 and will not be described in detail here.
[0096] S108: Determine the second touch area according to the second center point and the second touch radius, determine the second up-down occlusion line passing through the second touch area as the traversed second up-down occlusion line, obtain the next second up-down occlusion line that has not been traversed, and return to execute the determination of the second center point according to the intersection of the second up-down occlusion line and each of the second left-right occlusion lines.
[0097] The implementation details of S108 in this embodiment may be referred to in the description of S104 and will not be repeated here.
[0098] Most touch points can be found through S101-S104 or S101-S108, but in order to further ensure that no touch points are missed, this implementation also provides a single-side touch point search algorithm. If the horizontal or vertical edge of the infrared screen of some touch points does not independently pass through the shielding line of the touch point, this situation will result in missed points, especially at the edge of the infrared screen. The single-side touch point search algorithm in this embodiment detects this special situation.
[0099] The device determines the first left-right occlusion line that does not pass through the first touch area and the second touch area as a candidate occlusion line. Determine the second candidate point according to the intersection of all the candidate occlusion lines, and obtain the number of candidate occlusion lines passing through the second candidate point. Obtain the dominant occlusion line from all the candidate occlusion lines that the second candidate point with the largest number passes through. The dominant occlusion line can be the candidate occlusion line that is arranged in the middle of all the candidate occlusion lines that the second candidate point with the largest number passes through.
[0100] The device determines an auxiliary occlusion line according to the second candidate point and the dominant occlusion line. The device can select a preset number of target second candidate points near the second candidate point, and the line where the target second candidate point intersects with the dominant occlusion line is used as the auxiliary occlusion line.
[0101] The third center point is determined according to the intersection between the dominant occlusion line and the auxiliary occlusion line. The intersection between the dominant occlusion line and the auxiliary occlusion line is obtained, and a density map of all intersections can be obtained. The most centered intersection of a preset number of intersections with the largest density is taken as the third center point.
[0102] The device determines the non-blocking line closest to the third center point as a third target line segment, determines a third touch radius according to the distance between the third center point and the third target line segment, and determines a third touch area according to the third center point and the third touch radius.
[0103] In the embodiment of the present application, the information of the occlusion line is obtained; the first up-down occlusion line is traversed, and the first center point is determined according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines; the non-occlusion line closest to the first center point is determined as the first target line segment, and the first touch radius is determined according to the distance between the first center and the first target line segment; the first touch area is determined according to the first center point and the first touch radius, and the first up-down occlusion line passing through the first touch area is determined as the traversed first up-down occlusion line, and the next untraversed first up-down occlusion line is obtained, and the determination of the first center point according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines is returned to execute. In the above method, when performing touch point recognition, there is no need to process the infrared image and establish a small image grid that consumes a lot of memory. The touch point is determined only by traversing the occlusion line. This method of identifying the touch point has a relatively high computational efficiency and does not occupy much memory. When performing recognition, it is more efficient and accurate.
[0104] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0105] See also Figure 4 , Figure 4 is a schematic diagram of a device for identifying touch points provided in the second embodiment of the present application. The units included are used to perform Figure 1 , Figure 3 For details, please refer to the steps in the corresponding embodiment. Figure 1 , Figure 3 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 4 , the device 4 for identifying the touch point comprises:
[0106] A first acquisition unit 410 is used to acquire information of occlusion lines, where the occlusion lines include a first up-down occlusion line in a first direction and a first left-right occlusion line in a second direction;
[0107] A first traversal unit 420, configured to traverse the first up-down occlusion lines, and determine a first center point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines;
[0108] A first processing unit 430 is configured to determine a non-blocking line that is closest to the first center point as a first target line segment, and determine a first touch radius according to a distance between the first center and the first target line segment;
[0109] The second processing unit 440 is used to determine the first touch area according to the first center point and the first touch radius, determine the first up-down occlusion line passing through the first touch area as the traversed first up-down occlusion line, obtain the next first up-down occlusion line that has not been traversed, and return to execute the determination of the first center point according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines.
[0110] Furthermore, the first traversal unit 420 is specifically configured to:
[0111] Traversing the first up-down occlusion lines, and determining a first candidate point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines;
[0112] Determine the non-occluded line closest to the first candidate point as the first candidate line segment; the first candidate line segment includes a first candidate line segment in a first direction and a first candidate line segment in a second direction; the first direction is opposite to the second direction;
[0113] A first center point is determined according to the first candidate line segment in the first direction, the first candidate line segment in the second direction, and the first candidate point.
[0114] The second processing unit 440 is further configured to:
[0115] If the touch radius is less than the first preset radius threshold, obtaining the next first up-down occlusion line that has not been traversed, and returning to execute the step of determining the first center point according to the intersection points of the first up-down occlusion line and each of the first left-right occlusion lines;
[0116] If the touch radius is greater than a first preset radius threshold, a first touch area is determined according to the first center point and the first touch radius.
[0117] Furthermore, the device 4 for identifying touch points further includes:
[0118] A third processing unit is configured to delete the occlusion lines intersecting the first touch area from the occlusion lines to obtain target occlusion lines; the target occlusion lines include a second up-down occlusion line and a second left-right occlusion line;
[0119] A second traversal unit, configured to traverse the second up-down occlusion line, and determine a second center point according to intersections of the second up-down occlusion line and each of the second left-right occlusion lines;
[0120] a fourth processing unit, configured to determine a non-blocking line that is closest to the second center point as a second target line segment, and determine a second touch radius according to a distance between the second center and the second target line segment;
[0121] A fifth processing unit is used to determine the second touch area according to the second center point and the second touch radius, determine the second up-down occlusion line passing through the second touch area as the traversed second up-down occlusion line, obtain the next second up-down occlusion line that has not been traversed, and return to execute the determination of the second center point according to the intersection of the second up-down occlusion line and each of the second left-right occlusion lines.
[0122] Furthermore, the device 4 for identifying touch points further includes:
[0123] A sixth processing unit, configured to determine a first left-right direction occlusion line that does not pass through the first touch area and the second touch area as a candidate occlusion line;
[0124] a seventh processing unit, configured to determine a second candidate point according to intersection points of all the candidate occlusion lines, and obtain the number of candidate occlusion lines passing through the second candidate point;
[0125] An eighth processing unit, configured to obtain a dominant occlusion line from all the candidate occlusion lines through which the second candidate points with the largest number pass;
[0126] a ninth processing unit, configured to determine an auxiliary occlusion line according to the second candidate point and the dominant occlusion line;
[0127] a tenth processing unit, configured to determine a third center point according to an intersection point between the dominant occlusion line and the auxiliary occlusion line;
[0128] an eleventh processing unit, configured to determine a non-blocking line closest to the third center point as a third target line segment, and determine a third touch radius according to a distance between the third center and the third target line segment;
[0129] A twelfth processing unit is configured to determine a third touch area according to the third center point and the third touch radius.
[0130] Figure 5 Schematic diagram of a device for identifying touch points provided in the third embodiment of the present application. Figure 5 As shown, the device 5 for identifying touch points in this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as a program for identifying touch points. When the processor 50 executes the computer program 52, the steps in the above-mentioned various methods for identifying touch points are implemented, such as Figure 1 Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 4Functions of modules 410 to 440 are shown.
[0131] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 52 in the device 5 for identifying touch points. For example, the computer program 52 may be divided into a first acquisition unit, a first traversal unit, a first processing unit, and a second processing unit, and the specific functions of each unit are as follows:
[0132] A first acquisition unit, used to acquire information of occlusion lines, wherein the occlusion lines include a first up-down occlusion line and a first left-right occlusion line;
[0133] A first traversal unit, configured to traverse the first up-down occlusion lines, and determine a first center point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines;
[0134] a first processing unit, configured to determine a non-blocking line closest to the first center point as a first target line segment, and determine a first touch radius according to a distance between the first center and the first target line segment;
[0135] A second processing unit is used to determine a first touch area according to the first center point and the first touch radius, determine a first up-down occlusion line passing through the first touch area as a traversed first up-down occlusion line, obtain a next first up-down occlusion line that has not been traversed, and return to execute the step of determining the first center point according to the intersection of the first up-down occlusion line and each of the first left-right occlusion lines.
[0136] The device for identifying touch points may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the device 5 for identifying touch points and does not constitute a limitation of the device 5 for identifying touch points. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the device for identifying touch points may also include input and output devices, network access devices, buses, etc.
[0137] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0138] The memory 51 may be an internal storage unit of the device 5 for identifying touch points, such as a hard disk or memory of the device 5 for identifying touch points. The memory 51 may also be an external storage device of the device 5 for identifying touch points, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the device 5 for identifying touch points. Furthermore, the device 5 for identifying touch points may also include both an internal storage unit and an external storage device of the device 5 for identifying touch points. The memory 51 is used to store the computer program and other programs and data required by the device for identifying touch points. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0139] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0140] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0141] An embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0142] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0143] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0145] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0146] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0147] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0149] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for identifying a touch point, characterized in that: include: Acquire information of occlusion lines, where the occlusion lines include a first up-down occlusion line and a first left-right occlusion line; Traversing the first up-down occlusion lines, and determining a first candidate point according to intersections of the first up-down occlusion lines and each of the first left-right occlusion lines; Determine the non-occluded line closest to the first candidate point as the first candidate line segment; the first candidate line segment includes the first candidate line segment in the first direction and the first candidate line segment in the second direction; The first direction is opposite to the second direction; Determine a first center point according to the first candidate line segment in the first direction, the first candidate line segment in the second direction, and the first candidate point; Determine a non-occluded line that is closest to the first center point as a first target line segment, and determine a first touch radius according to the distance between the first center point and the first target line segment; determining a first touch area according to the first center point and the first touch radius, determining a first up-down occlusion line passing through the first touch area as a traversed first up-down occlusion line, obtaining a next first up-down occlusion line that has not been traversed, and returning to execute the step of determining a first center point according to intersections of the first up-down occlusion line and each of the first left-right occlusion lines; Deleting the occlusion lines intersecting the first touch area from the occlusion lines to obtain target occlusion lines; the target occlusion lines include a second up-down occlusion line and a second left-right occlusion line; Traversing the second up-down occlusion lines, and determining a second center point according to intersections of the second up-down occlusion lines and each of the second left-right occlusion lines; Determine the non-occluded line closest to the second center point as a second target line segment, and determine a second touch radius according to the distance between the second center point and the second target line segment; Determine the second touch area according to the second center point and the second touch radius, determine the second up-down occlusion line passing through the second touch area as the traversed second up-down occlusion line, obtain the next second up-down occlusion line that has not been traversed, and return to execute the method of determining the second center point according to the intersection of the second up-down occlusion line and each of the second left-right occlusion lines.
2. The method for identifying a touch point according to claim 1, wherein: The determining the first touch area according to the first center point and the first touch radius includes: If the first touch radius is less than a first preset radius threshold, obtaining a next first up-down occlusion line that has not been traversed, and returning to execute the step of determining the first center point according to the intersection points of the first up-down occlusion line and each of the first left-right occlusion lines; If the first touch radius is greater than a first preset radius threshold, a first touch area is determined according to the first center point and the first touch radius.
3. The method for identifying a touch point according to claim 1, wherein: After determining the target touch area according to the first touch area and the second touch area, the method further includes: determining a first left-right direction occlusion line that does not pass through the first touch area and the second touch area as a candidate occlusion line; Determine a second candidate point according to the intersection points of all the candidate occlusion lines, and obtain the number of candidate occlusion lines passing through the second candidate point; Acquire a dominant occlusion line from all the candidate occlusion lines through which the second candidate points with the largest number pass; Determine an auxiliary occlusion line according to the second candidate point and the dominant occlusion line; Determine a third center point according to an intersection point between the main occlusion line and the auxiliary occlusion line; Determine a non-blocking line that is closest to the third center point as a third target line segment, and determine a third touch radius according to the distance between the third center point and the third target line segment; A third touch area is determined according to the third center point and the third touch radius.
4. A device for identifying touch points, characterized in that: include: A first acquisition unit, used to acquire information of occlusion lines, wherein the occlusion lines include a first up-down occlusion line and a first left-right occlusion line; A first traversal unit, configured to traverse the first up-down occlusion line, and determine a first candidate point according to an intersection point between the first up-down occlusion line and each of the first left-right occlusion lines; Determine the non-occluded line closest to the first candidate point as the first candidate line segment; the first candidate line segment includes the first candidate line segment in the first direction and the first candidate line segment in the second direction; The first direction is opposite to the second direction; Determine a first center point according to the first candidate line segment in the first direction, the first candidate line segment in the second direction, and the first candidate point; a first processing unit, configured to determine a non-blocking line closest to the first center point as a first target line segment, and determine a first touch radius according to a distance between the first center point and the first target line segment; a second processing unit, configured to determine a first touch area according to the first center point and the first touch radius, determine a first up-down occlusion line passing through the first touch area as a traversed first up-down occlusion line, obtain a next first up-down occlusion line that has not been traversed, and return to execute the step of determining a first center point according to intersections of the first up-down occlusion line and each of the first left-right occlusion lines; A third processing unit is configured to delete the occlusion lines intersecting the first touch area from the occlusion lines to obtain target occlusion lines; the target occlusion lines include a second up-down occlusion line and a second left-right occlusion line; A second traversal unit, configured to traverse the second up-down occlusion line, and determine a second center point according to intersections of the second up-down occlusion line and each of the second left-right occlusion lines; a fourth processing unit, configured to determine a non-blocking line that is closest to the second center point as a second target line segment, and determine a second touch radius according to a distance between the second center point and the second target line segment; A fifth processing unit is used to determine the second touch area according to the second center point and the second touch radius, determine the second up-down occlusion line passing through the second touch area as the traversed second up-down occlusion line, obtain the next second up-down occlusion line that has not been traversed, and return to execute the determination of the second center point according to the intersection of the second up-down occlusion line and each of the second left-right occlusion lines.
5. The device for identifying touch points according to claim 4, characterized in that: The second processing unit is further configured to: If the first touch radius is less than a first preset radius threshold, obtaining a next first up-down occlusion line that has not been traversed, and returning to execute the step of determining the first center point according to the intersection points of the first up-down occlusion line and each of the first left-right occlusion lines; If the first touch radius is greater than a first preset radius threshold, a first touch area is determined according to the first center point and the first touch radius.
6. A device for identifying touch points, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Identification method and identification system of multiple touch point areas of infrared touch screen
CN107957826A
A touch point identification method and device and a display device
CN109542276A