Touch screen multi-point identification method, system and equipment
By detecting touch candidate nodes on the touchscreen and performing connectivity clustering, calculating centroid coordinates and capacitance signatures, and combining a time window verification mechanism, the problems of touch type misjudgment and coordinate offset in the prior art are solved, and accurate multi-touch recognition and complex gesture recognition are achieved.
Patent Information
- Application Number
- CN202511792016.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-06
AI Technical Summary
Existing touchscreen detection methods are prone to false detections or missed detections when environmental noise fluctuates significantly. They are difficult to effectively distinguish between genuine finger touches, palm touches, and electromagnetic interference, leading to frequent misjudgments of touch types. Furthermore, they lack a time-dimensional stability verification mechanism, and transient interference signals and water droplet touches are often incorrectly identified as valid touch events.
By detecting candidate touch nodes on the touchscreen and performing connectivity clustering, calculating centroid coordinates and capacitance signatures, and combining a minimum dwell time constraint verification mechanism within a time window, stable touch points are selected. Multi-point input is determined using centroid distance and capacitance signature difference, and a capacitance signature recognition mechanism is introduced to suppress electromagnetic interference and accidental touches caused by water droplets.
It effectively distinguishes between finger touch and electromagnetic interference, reduces the impact of transient interference on touch recognition, ensures that the number and position of the output touch points are consistent with the user's actual operation, solves the problems of coordinate offset and misjudgment of the number of points in multi-touch scenarios, and provides accurate and reliable touch event input for complex gesture recognition.
Smart Images

Figure CN121614049A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of touch screen technology, and in particular to a touch screen multi-point recognition method, system and device. Background Technology
[0002] Touchscreens are used in smart terminal devices. Existing touchscreen detection methods use fixed thresholds to determine touch accuracy. When there are large fluctuations in environmental noise, false detections or missed detections are likely to occur, resulting in a decrease in touch recognition accuracy.
[0003] Existing technologies, relying solely on capacitance amplitude as a single characteristic, struggle to effectively distinguish between genuine finger touches, accidental palm touches, and electromagnetic interference, leading to frequent misidentifications of touch types. Furthermore, the lack of a time-dimensional stability verification mechanism means that transient interference signals and accidental water droplet touches are often incorrectly identified as valid touch events. This can easily result in misinterpreting single-point signal splitting as multi-point input or incorrectly merging adjacent points into a single point, leading to technical issues related to the number and positional shifts of touch points. Summary of the Invention
[0004] This application provides a multi-point recognition method, system, and device for touch screens, which effectively suppresses electromagnetic interference and accidental touches caused by water droplets with abnormal capacitance distribution, reduces the impact of transient interference on touch recognition, and ensures that the number and position of the output touch points are consistent with the user's actual operation.
[0005] The first aspect of this application provides a multi-touch screen recognition method, the multi-touch screen recognition method comprising: Detect candidate touch nodes on the touchscreen, perform connectivity clustering on the candidate touch nodes, and locate the touch area; Calculate the centroid coordinates of the touch area, and calculate the peak capacitance ratio, radial attenuation coefficient, and symmetry index based on the centroid coordinates, and combine them to obtain the capacitance signature; Calculate the position offset of the centroid coordinates between adjacent frames and the temporal volatility of the capacitor signature, and filter out stable touch points whose position offset and temporal volatility both meet the stability condition. Calculate the centroid distance and capacitance signature difference between any two stable touch points. When the centroid distance is greater than a preset separation distance and the capacitance signature difference is greater than a preset difference threshold, they are determined to be two target touch points.
[0006] In conjunction with the first aspect, in a first implementation of the first aspect of the present invention, the step of detecting touch candidate nodes of the touchscreen and performing connectivity clustering on the touch candidate nodes to locate the touch area includes: Scan the electrode intersections of the touchscreen line by line and collect the current frame capacitance value and the background capacitance value; Calculate the capacitance difference between the current frame capacitance value and the background capacitance value at each electrode intersection node, and construct a capacitance change matrix based on the capacitance difference; The background capacitance value of each electrode intersection node in multiple consecutive frames is extracted to calculate the mean capacitance value. Based on the mean capacitance value and the background capacitance value of each frame, the standard deviation of the background capacitance is calculated. The standard deviation of the background capacitance is multiplied by a preset coefficient to obtain an adaptive detection threshold. Traverse the capacitance change of each electrode intersection node in the capacitance change matrix, and mark the nodes with capacitance changes greater than the adaptive detection threshold as touch candidate nodes; Connectivity clustering is performed on the candidate touch nodes to locate the touch area.
[0007] In conjunction with the first aspect, in a second implementation of the first aspect of the present invention, the step of performing connectivity clustering on the touch candidate nodes to locate the touch region includes: Traverse the touch candidate nodes and extract the neighboring candidate nodes of each touch candidate node within a preset neighborhood range; Calculate the Euclidean distance and capacitance change ratio between each touch candidate node and each adjacent candidate node. When the Euclidean distance is less than a preset distance threshold and the capacitance change ratio is within a preset range, it is determined that the touch candidate node and the adjacent candidate node are connected. Based on the connectivity relationship, the disjoint-set data structure algorithm is used to merge the candidate touch nodes with connectivity into the same node set. After traversal, each node set is positioned as a touch area.
[0008] In conjunction with the first aspect, in a third implementation of the first aspect of the present invention, the step of calculating the centroid coordinates of the touch area, and calculating the peak capacitance ratio, radial attenuation coefficient, and symmetry index based on the centroid coordinates, and combining them to obtain the capacitance signature, includes: Extract the original coordinates of each electrode intersection node within the touch area, and calculate the centroid coordinates based on the original coordinates of each electrode intersection node; The maximum capacitance change within the touch area is found using the centroid coordinates as the center, and the maximum capacitance change is divided by the adaptive detection threshold to obtain the peak capacitance ratio. The radial attenuation coefficient is obtained by extracting the average capacitance at multiple different radii with the centroid coordinates as the center and calculating the capacitance attenuation ratio between adjacent radii. The touch area is divided into four quadrants with the centroid coordinates as the boundary, and the ratio of the sum of capacitances between the diagonal quadrants is calculated to obtain the symmetry index. The peak capacitance ratio, the radial attenuation coefficient, and the symmetry index are combined to form the capacitance signature.
[0009] In conjunction with the first aspect, in the fourth implementation of the first aspect of the present invention, the step of calculating the positional offset of the centroid coordinates between adjacent frames and the temporal volatility of the capacitor signature, and filtering out stable touch points whose positional offset and temporal volatility both satisfy the stability condition, includes: Establish a time window that includes the current frame and several previous consecutive frames, perform inter-frame matching for the centroid coordinates of each touch area, and identify centroid coordinates that are spatially close as the same touch point. Extract the centroid coordinates of the same touch point in each frame within the time window to form a coordinate sequence, and extract the capacitor signature corresponding to each frame to form a signature sequence; The position offset is calculated by traversing the centroid coordinates of adjacent frames in the coordinate sequence, and the peak capacitance ratio, radial attenuation coefficient, and symmetry index of adjacent frames in the signature sequence are calculated and the temporal volatility is calculated. Determine whether the position offset of all frames within the time window is less than the position stability threshold and whether the temporal volatility is less than the feature stability threshold. If both conditions are met, mark the stable touch point.
[0010] In conjunction with the first aspect, in a fifth implementation of the first aspect of the present invention, the step of calculating the centroid distance and capacitance signature difference between any two stable touch points, and determining them as two target touch points when the centroid distance is greater than a preset separation distance and the capacitance signature difference is greater than a preset difference threshold, includes: Select any two stable touch points and define them as the first stable touch point and the second stable touch point. Extract the first centroid coordinates and the first capacitor signature of the first stable touch point, and the second centroid coordinates and the second capacitor signature of the second stable touch point, respectively. The centroid distance is calculated based on the first centroid coordinates and the second centroid coordinates. The difference between the corresponding parameters in the first capacitor signature and the second capacitor signature is extracted and the square root of the sum of squares is calculated to obtain the capacitor signature difference degree. Determine whether the centroid distance is greater than a preset separation distance and whether the capacitor signature difference is greater than a preset difference threshold. When both conditions are met, the first stable touch point and the second stable touch point are marked as two target touch points respectively; otherwise, the sum of the capacitance changes in the touch areas of the first stable touch point and the second stable touch point is extracted as the fusion weight, and the target touch point is obtained by weighted averaging of the first centroid coordinates and the second centroid coordinates based on the fusion weight.
[0011] In conjunction with the first aspect, in a sixth implementation of the first aspect of the present invention, the touchscreen multi-point recognition method further includes: Establish a touch point tracking dictionary to store the historical state data of each target touch point, and query the centroid coordinates and peak capacitance ratio of each target touch point in the previous frame for the current frame. Calculate the first change between the centroid coordinates of the current frame and the centroid coordinates of the previous frame, and calculate the second change between the peak capacitance ratio of the current frame and the peak capacitance ratio of the previous frame. Determine whether the target touch point appears for the first time in the touch point tracking dictionary. If it appears for the first time, mark it as a press event. If it already exists and the first change exceeds the motion threshold, mark it as a move event. If it already exists and the second change drops below the preset threshold, mark it as a release event and delete it from the touch point tracking dictionary.
[0012] In conjunction with the first aspect, in the seventh implementation of the first aspect of the present invention, the step of determining whether the target touch point appears for the first time in the touch point tracking dictionary, marking it as a press event when it first appears, marking it as a movement event when it already exists and the first change exceeds a motion threshold, and marking it as a release event and deleting it from the touch point tracking dictionary when it already exists and the second change drops below a preset threshold, includes: Based on the identifier of the target touch point, a query is performed in the touch point tracking dictionary to determine whether the identifier already exists in the touch point tracking dictionary; When the identifier does not exist, the target touch point is marked as a press event, and the identifier, along with the centroid coordinates and peak capacitance ratio of the current frame, is stored in the touch point tracking dictionary; When the identifier already exists and the first change exceeds the motion threshold, the target touch point is marked as a movement event, and the centroid coordinates corresponding to the identifier in the touch point tracking dictionary are updated; When the identifier already exists and the second change amount drops below a preset threshold, the target touch point is marked as a lift-off event, and the identifier and all its corresponding historical state data are deleted from the touch point tracking dictionary.
[0013] A second aspect of this application provides a multi-touch screen recognition system, the multi-touch screen recognition system comprising: The detection module is used to detect candidate touch nodes of the touch screen, and to perform connectivity clustering on the candidate touch nodes to locate the touch area; The calculation module is used to calculate the centroid coordinates of the touch area, and calculate the peak capacitance ratio, radial attenuation coefficient and symmetry index based on the centroid coordinates, and combine them to obtain the capacitance signature; The filtering module is used to calculate the position offset of the centroid coordinates between adjacent frames and the temporal volatility of the capacitor signature, and to filter out stable touch points whose position offset and temporal volatility both meet the stability conditions. The determination module is used to calculate the centroid distance and capacitance signature difference between any two stable touch points. When the centroid distance is greater than a preset separation distance and the capacitance signature difference is greater than a preset difference threshold, they are determined to be two target touch points.
[0014] A third aspect of this application provides an electronic device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the electronic device to perform the above-described touchscreen multi-touch recognition method.
[0015] Compared with existing technologies, this application has the following advantages: By establishing a capacitance signature recognition mechanism, the capacitance distribution characteristics of touch points are characterized from three dimensions: peak capacitance ratio, radial attenuation coefficient, and symmetry index. Compared with existing technologies that rely solely on the single criterion of capacitance amplitude, this effectively distinguishes the essential differences between finger touch, palm mis-touch, and electromagnetic interference, solving the technical problem of touch type misjudgment. This invention introduces a minimum dwell time constraint verification mechanism based on a time window. Through dual verification of coordinate stability and capacitance signature consistency across multiple consecutive frames, a dual filtering mechanism is established in the time dimension and feature space. This effectively suppresses short-duration electromagnetic interference and water droplet mis-touches with abnormal capacitance distribution, reducing the impact of instantaneous interference on touch recognition. In the multi-point independence discrimination stage, this invention innovatively uses centroid distance and capacitance signature difference as joint criteria. This not only accurately identifies truly independent multi-point inputs in space, but also eliminates pseudo-multi-point phenomena caused by single-point signal splitting through capacitance feature similarity. Furthermore, it performs capacitance-weighted coordinate fusion on touch points identified as ghosting, ensuring that the number and position of the output touch points are consistent with the user's actual operation. This solves the problems of coordinate offset and misjudgment of the number of points in existing technologies in multi-touch scenarios, providing accurate and reliable touch event input for complex gesture recognition. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] The structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0018] Figure 1 This is a flowchart illustrating the multi-point recognition method for touchscreens provided in an embodiment of the present invention; Figure 2 This is a schematic block diagram of the structure of the touch screen multi-point recognition system provided in the embodiment of the present invention; Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0021] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0022] It should also be further understood that the term "and / or" as used in this application specification and the appended claims refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. See also Figure 1 One embodiment of the touchscreen multi-point recognition method in this application includes: Step 100: Detect the touch candidate nodes of the touch screen, perform connectivity clustering on the touch candidate nodes, and locate the touch area; Specifically, the touch chip scans the electrode matrix of the touchscreen row by row according to a set scanning cycle, sequentially stimulating the X-axis electrode and simultaneously acquiring the capacitance response value of the Y-axis electrode that intersects it in the current frame, forming a capacitance measurement image for the corresponding frame. Simultaneously, the background capacitance value recorded under historical static conditions is extracted as a reference image. Capacitance difference calculation is performed on each electrode intersection node. By subtracting the corresponding background capacitance value from the current frame capacitance value, the capacitance change of each node is obtained. The capacitance changes of all nodes are arranged according to their physical two-dimensional distribution to construct a capacitance change matrix, reflecting the spatial distribution characteristics of the touchscreen surface capacitance disturbance under the current touch state. Within a continuous multi-frame time window, the mean and standard deviation of the background capacitance value of each electrode node are calculated. The mean background capacitance reflects the static capacitance reference of the electrode node under no touch disturbance, while the standard deviation quantifies its background noise fluctuation. Based on the 3σ principle or other engineering experience-based coefficient factors, the standard deviation is multiplied by a preset coefficient to dynamically generate an adaptive detection threshold for each node. The capacitance change value of each node in the capacitance change matrix is traversed, and the capacitance change is compared with the adaptive detection threshold corresponding to the node. If the change exceeds the threshold, the node is marked as a touch candidate node; otherwise, the node is considered to be in a non-touch state and does not enter the candidate set. Connectivity analysis is performed on all candidate node sets in the space. The Euclidean distance between any two nodes is calculated and it is determined whether they belong to the same touch entity region by checking if it is lower than the set physical proximity threshold. When multiple physically adjacent candidate nodes form a connected subgraph, they are merged into the same touch region, and a unique identifier is assigned to each independent touch region, forming a set of disjoint initial touch regions.
[0023] Step 200: Calculate the centroid coordinates of the touch area, and calculate the peak capacitance ratio, radial attenuation coefficient, and symmetry index based on the centroid coordinates, and combine them to obtain the capacitance signature; Specifically, the original two-dimensional coordinates of all identified electrode intersection nodes are extracted in the current touch area. The capacitance change corresponding to each node is used as a weight value, and the centroid coordinates are calculated by weighted averaging across the entire touch area. Using the centroid coordinates as the geometric reference center, all nodes within the touch area are traversed to find the maximum value of capacitance change, obtaining the change amplitude of the point with the largest capacitance disturbance. The ratio of the maximum capacitance change to the adaptive detection threshold corresponding to the current node is calculated, and the resulting ratio is the peak capacitance ratio. Multiple concentric circles with different radii are constructed with the centroid as the center, such as selecting discrete radius values like r=1, r=2, and r=3. Electrode nodes are extracted within the circumference or ring corresponding to each radius, and the mean value of their capacitance changes is calculated for each. This yields multiple sets of capacitance averages at different levels from the centroid. The capacitance attenuation ratio is then obtained by comparing the difference between the mean capacitance values of adjacent radius layers with the reference value, forming a radial attenuation coefficient. This coefficient reflects the attenuation rate of the capacitance signal from the touch center to the edge, effectively distinguishing between the Gaussian distribution of genuine finger touch and the slow or distorted attenuation behavior caused by accidental touches or interference. Using the centroid coordinates as the dividing line, the touch area is divided into four quadrants: upper left, upper right, lower left, and lower right. The total capacitance change of nodes within each quadrant is accumulated, and the difference in the ratio of the total capacitance between diagonal quadrants is calculated, specifically the ratio ρ1 between the upper left and lower right quadrants and the ratio ρ2 between the upper right and lower left quadrants. A symmetry index is then constructed using the sum of |1–ρ1| and |1–ρ2| to reflect the mirror uniformity of the touch image. Real finger touches exhibit high symmetry, while interference touches or abnormal edge touches show obvious offset unevenness. The peak capacitance ratio, radial attenuation coefficient, and symmetry index are combined into a set of ternary feature parameters, defined as the capacitance signature.
[0024] Step 300: Calculate the position offset of the centroid coordinates between adjacent frames and the temporal volatility of the capacitor signature, and filter out stable touch points whose position offset and temporal volatility both meet the stability conditions. Specifically, a sliding time window is constructed, including the current frame and several previous frames (e.g., 4 frames). A cross-frame correspondence is established for the centroid coordinates of the detected touch areas in each frame. The Euclidean distance between the centroids of each touch area in different frames is calculated, and centroid pairs with a positional distance less than a set spatial registration threshold are identified as belonging to the same physical touch point, forming a cross-frame tracking sequence. For each touch point that successfully establishes a continuous trajectory within the time window, its centroid coordinates in each frame are extracted to form a temporal coordinate sequence. Simultaneously, the capacitance signature triplet of the touch area in the corresponding frame is extracted, including the peak capacitance ratio, radial attenuation coefficient, and symmetry index, constructing a capacitance feature sequence. The centroid positions between adjacent frames in the coordinate sequence are traversed sequentially, and their Euclidean distance is calculated as the inter-frame positional offset, reflecting the spatial stability of the touch point in the time dimension. Simultaneously, the capacitance signature sequence is traversed, and the volatility within the time window is calculated for each component. The peak capacitance ratio volatility is calculated by dividing the difference between the maximum and minimum values by the minimum value. The radial attenuation coefficient and symmetry index volatility are calculated using the same method to quantify the change in capacitance characteristics over time. After completing the above calculations, the positional offsets of all frames are compared with the set positional stability thresholds. For example, the threshold is set to within 3 pixels to accommodate slight finger tremors. At the same time, the temporal volatility of the three capacitance features is compared with their respective feature stability thresholds. For example, the peak capacitance ratio volatility is less than 0.2, the radial attenuation coefficient volatility is less than 0.15, and the symmetry index volatility is less than 0.1. Only when all inter-frame offsets do not exceed the stability thresholds and all capacitance feature volatilitys are within the threshold ranges are the touch points considered to have good positional consistency and feature stability throughout the entire time window, and the touch points are marked as stable touch points.
[0025] Step 400: Calculate the centroid distance and capacitance signature difference between any two stable touch points. When the centroid distance is greater than the preset separation distance and the capacitance signature difference is greater than the preset difference threshold, they are determined to be two target touch points.
[0026] Specifically, from the selected set of stable touch points, any two points are selected and defined as the first stable touch point and the second stable touch point, respectively. The centroid coordinates corresponding to these two touch points are extracted as the first centroid coordinates and the second centroid coordinates. At the same time, the corresponding capacitance signature triplet parameters are extracted, namely the peak capacitance ratio, radial attenuation coefficient, and symmetry index of the first touch point, and the corresponding three capacitance characteristic values of the second touch point. Based on the first centroid coordinates and the second centroid coordinates, the centroid distance between the two touch points in two-dimensional space is calculated using the Euclidean distance formula to quantify the spatial dispersion of the two touch points. At the same time, the difference between the capacitance signature parameters of the two touch points is calculated. The difference is calculated for each corresponding parameter, and each difference is divided by a normalization factor to unify the dimensions. Then, the squares of the normalized differences are summed, and the square root is taken to obtain the capacitance signature difference, which reflects the degree of dissimilarity of the two touch points in the feature space. The obtained centroid distance is compared with the set minimum separation distance threshold, and the capacitance signature difference is compared with the preset difference recognition threshold. Only when both judgment conditions are met simultaneously, i.e., the centroid distance is greater than the separation threshold and the feature difference is higher than the threshold, are the two stable touch points identified as originating from different physical contact entities, and thus marked as two independent target touch points, entering the touch event recognition stage. Otherwise, if either condition is not met, it is judged as the same actual touch point caused by signal fluctuation, uneven contact area, or algorithm segmentation error, resulting in touch point ghosting or redundant representation. In this case, the sum of capacitance changes of the two touch points is calculated separately as their respective weight factors, and a weighted average operation is performed on the centroid coordinates of the two points based on these weights to generate a single fused target touch point to represent the user's actual single-point contact behavior.
[0027] In one specific embodiment, the process of performing step 100 may specifically include the following steps: Scan the electrode intersections of the touchscreen line by line and collect the current frame capacitance value and the background capacitance value; Calculate the capacitance difference between the current frame capacitance value and the background capacitance value at each electrode intersection node, and construct a capacitance change matrix based on the capacitance difference; The background capacitance value of each electrode intersection node in multiple consecutive frames is extracted to calculate the mean capacitance value. The standard deviation of the background capacitance is calculated based on the mean capacitance value and the background capacitance value of each frame. The adaptive detection threshold is obtained by multiplying the standard deviation of the background capacitance by a preset coefficient. Traverse the capacitance change of each electrode intersection node in the capacitance change matrix and mark the nodes with capacitance changes greater than the adaptive detection threshold as touch candidate nodes. Connectivity clustering is performed on candidate touch nodes to locate the touch area.
[0028] Specifically, the touch chip scans the electrode array inside the touchscreen row by row at a preset time period (e.g., 10 milliseconds), sequentially stimulating the X-axis electrodes of each row while simultaneously acquiring the capacitance values of all intersecting Y-axis electrodes. A two-dimensional capacitance image is generated for each frame. While acquiring the capacitance data for the current frame, the system also retrieves background capacitance data stored within it. This background data is constructed by averaging capacitance values from multiple frames in a non-contact state, representing the baseline static capacitance level of each node. For each intersecting electrode node, the difference between the current frame capacitance value and the background capacitance value is calculated to reflect the capacitance response change after touch disturbance. The capacitance differences of all nodes are then organized into a capacitance change matrix according to their physical coordinates within the two-dimensional array. An adaptive threshold mechanism is introduced, which involves extracting the background capacitance sequence of each node from multiple consecutive frames of raw sampling data, calculating its mean to obtain the expected static value of the node, and simultaneously calculating the standard deviation of the background capacitance sequence to evaluate its capacitance fluctuation in the non-touch state. The standard deviation reflects the level of environmental noise. The background capacitance standard deviation is multiplied by a preset coefficient factor (e.g., 3) to generate an adaptive detection threshold, enabling dynamic response capability for touch detection sensitivity. The capacitance change matrix is traversed, and the capacitance change of each node is compared with its corresponding adaptive detection threshold. If the capacitance change of a node is greater than the threshold, it is considered to have been subjected to actual touch disturbance and is marked as a touch candidate node; otherwise, the node is considered to be still within the background noise range and is not processed. All candidate nodes are subjected to connectivity clustering based on spatial topology. Euclidean distance or adjacency relation is used to determine whether candidate nodes are physically adjacent to each other. The candidate nodes that meet the connectivity conditions are merged into the same touch region by disjoint-set data structure or breadth-first search method, completing the identification and spatial localization of all touch regions.
[0029] In one specific embodiment, the process of performing connectivity clustering on the touch candidate nodes to locate the touch region may specifically include the following steps: Traverse the touch candidate nodes and extract the neighboring candidate nodes of each touch candidate node within a preset neighborhood range; Calculate the Euclidean distance and capacitance change ratio between each touch candidate node and each adjacent candidate node. When the Euclidean distance is less than a preset distance threshold and the capacitance change ratio is within a preset range, it is determined that the touch candidate node and its adjacent candidate nodes are connected. Based on connectivity, a disjoint-set data structure algorithm is used to merge touch candidate nodes with connectivity into the same node set. After traversal, each node set is positioned as a touch area.
[0030] Specifically, the spatial coordinates of all marked candidate touch nodes are extracted from the capacitance change matrix, and each candidate node is processed sequentially. During processing, all other candidate nodes are retrieved within a preset neighborhood window (e.g., a 3×3 or 5×5 grid) centered on the current candidate node's two-dimensional coordinates, forming a set of its neighboring candidate nodes. For the current candidate node and each of its neighboring candidate nodes, the Euclidean distance between them in the two-dimensional coordinate system is calculated to determine their spatial proximity. The response values of both nodes in the capacitance change matrix are extracted, and the ratio of their capacitance changes is calculated. This ratio is set as the smaller capacitance change value divided by the larger capacitance change value to eliminate the influence of orders of magnitude and measure amplitude consistency. When the Euclidean distance is less than a set distance threshold (e.g., 1.5 times the electrode spacing) and the capacitance change ratio is within a preset effective connection range (e.g., between 0.5 and 2.0), it is determined that the two nodes are not only spatially close but also have similar response intensities, possessing continuity of the actual contact area, and are therefore considered to be in a connected state. A disjoint-set data structure is used to manage the sets to which each candidate node belongs. During initialization, each node is treated as an independent set. During traversal, if any two nodes are found to be connected, a merge operation is performed within the disjoint-set data structure, merging their respective sets into a single unified set. This merging process is repeated until all candidate nodes have been traversed, resulting in several disjoint node sets. Each disjoint-set represents a node set that constitutes an independent touch area on the touchscreen.
[0031] In one specific embodiment, the process of performing step 200 may specifically include the following steps: Extract the original coordinates of each electrode intersection node within the touch area, and calculate the centroid coordinates based on the original coordinates of each electrode intersection node; Find the maximum capacitance change within the touch area centered on the centroid coordinates, and divide the maximum capacitance change by the adaptive detection threshold to obtain the peak capacitance ratio; The radial attenuation coefficient is obtained by extracting the average capacitance at multiple different radii with the centroid coordinates as the center and calculating the capacitance attenuation ratio between adjacent radii. The touch area is divided into four quadrants with the centroid coordinates as the boundary, and the ratio of the sum of capacitance between the diagonal quadrants is calculated to obtain the symmetry index. The peak capacitance ratio, radial attenuation coefficient and symmetry index are combined to form the capacitance signature.
[0032] Specifically, the original two-dimensional coordinate information of all electrode intersection nodes within the touch area is extracted, and the capacitance change value corresponding to each node is read simultaneously. Using the capacitance change as a weighting factor, the horizontal and vertical coordinates of each node are weighted and summed, then divided by the total capacitance change value to obtain the weighted centroid coordinates of the current touch area. Centered on the centroid coordinates, the node with the largest capacitance change value is searched within the touch area, and its capacitance change amplitude is extracted as the peak response value of the touch area. The peak capacitance change is then calculated as a ratio to the adaptive detection threshold corresponding to the node, yielding the peak capacitance ratio, which reflects the relative magnitude relationship between touch intensity and background noise. To analyze the spatial attenuation characteristics of the capacitance signal, multiple concentric circular regions were constructed with the centroid coordinates as the center. Different discrete radius values, such as r=1, r=2, r=3, etc., were selected to extract all nodes within each circular region. The capacitance change values of these nodes were averaged to obtain the average capacitance response value under different radii. Then, the radial attenuation ratio was constructed by the ratio of the difference between the average capacitance values of adjacent radii to the average value of the inner circle, generating a radial attenuation coefficient. This coefficient reflects whether the capacitance distribution exhibits typical Gaussian natural attenuation, thereby distinguishing between fingertip touch and interference stray contact. The entire touch area is divided into four quadrants—upper left, upper right, lower left, and lower right—with the centroid coordinates as the geometric center. The sum of capacitance changes at nodes within each quadrant is calculated, and the capacitance ratios between diagonal quadrants are calculated, i.e., the capacitance differences between the upper left and lower right quadrants, and between the upper right and lower left quadrants. The sum of these deviations is used to construct a symmetry index, which measures the geometric symmetry of the touch area in capacitance space. A true finger contact area will have good symmetry, while water droplets, palm edges, or other non-uniform contacts will result in a higher symmetry index. The peak capacitance ratio, radial attenuation coefficient, and symmetry index are combined to form the capacitance signature of the touch area.
[0033] In one specific embodiment, the process of performing step 300 may specifically include the following steps: Establish a time window that includes the current frame and several previous consecutive frames, perform inter-frame matching for the centroid coordinates of each touch area, and identify centroid coordinates that are spatially close as the same touch point. Extract the centroid coordinates of the same touch point in each frame within the time window to form a coordinate sequence, and extract the corresponding capacitor signatures for each frame to form a signature sequence; The centroid coordinates of adjacent frames in the coordinate sequence are traversed to calculate the position offset. The peak capacitance ratio, radial attenuation coefficient and symmetry index of adjacent frames in the signature sequence are traversed to calculate the temporal volatility. Determine whether the position offset of all frames within the time window is less than the position stability threshold and whether the temporal volatility is less than the feature stability threshold. If both conditions are met, mark the touch point as stable.
[0034] Specifically, a fixed-length sliding window is constructed for each time period. The window contains the current frame and several consecutive historical frames arranged in reverse chronological order. For example, the most recent 5 frames constitute a window interval of 50 milliseconds. Within the time window, multiple touch areas from different times are compared one by one. The Euclidean distance between the centroid coordinates of each touch area in the current frame and all centroid coordinates in the previous frame is calculated. When the distance is less than the preset inter-frame matching threshold (such as 3 pixels or 0.5 mm), it is determined that the two centroids belong to the same actual touch point. Inter-frame continuous identification is established and trajectory assignment is performed. After completing the touch point matching between consecutive frames, the centroid coordinates corresponding to each frame in the time window are extracted for each matching trajectory to construct a centroid coordinate sequence. At the same time, the capacitance signature parameters associated with the touch area in each frame are extracted to form the peak capacitance ratio sequence, radial attenuation coefficient sequence, and symmetry index sequence, respectively, as a ternary feature signature sequence. The system iterates through the centroid positions of adjacent frames in the coordinate sequence and calculates the spatial offset between every two consecutive frames using Euclidean distance. The spatial offset reflects the stable behavior of the touch point in a short period of time. If the user's finger remains stationary or moves slowly, the spatial offset remains at a low level. At the same time, the inter-frame volatility of three feature parameters in the signature sequence is calculated. The peak capacitance ratio volatility is obtained by dividing the difference between the maximum and minimum values in the current window by the minimum value. The other two features are normalized and calculated in the same way. These volatility values reflect the degree of change of touch intensity, contact area shape, and spatial symmetry in a short time interval, which can effectively distinguish between stable contact and transient interference. For each touch trajectory, a dual stability assessment is performed. If the position offset of all inter-frame coordinates is less than the set position stability threshold (e.g., 3 pixels), and the fluctuation rates of peak capacitance ratio, radial attenuation coefficient, and symmetry index are all lower than their respective feature stability thresholds (e.g., 0.2, 0.15, 0.1), then the touch trajectory is considered to exhibit stable input behavior within the current time window and is marked as a stable touch point. Otherwise, the trajectory is considered to be a brief disturbance or invalid contact and is discarded.
[0035] The process involves dividing the touch area into four quadrants using the centroid coordinates as boundaries and calculating the ratio of the total capacitance between the diagonal quadrants to obtain the symmetry index. This includes: establishing a coordinate system with the centroid coordinates as the origin; classifying each electrode intersection node within the touch area into the first, second, third, and fourth quadrants according to their relative coordinate positions; traversing the electrode intersection nodes within each quadrant and accumulating their capacitance changes to obtain the total capacitance in the first, second, third, and fourth quadrants, respectively; calculating the first ratio of the total capacitance in the first quadrant to the total capacitance in the third quadrant and the second ratio of the total capacitance in the second quadrant to the total capacitance in the fourth quadrant; and summing the first and second ratios based on their deviations from a preset reference value to obtain the symmetry index.
[0036] In one specific embodiment, the process of performing step 400 may specifically include the following steps: Select any two stable touch points and define them as the first stable touch point and the second stable touch point. Extract the first centroid coordinates and the first capacitor signature of the first stable touch point, and the second centroid coordinates and the second capacitor signature of the second stable touch point, respectively. The centroid distance is calculated based on the first centroid coordinates and the second centroid coordinates. The difference between the corresponding parameters in the first capacitor signature and the second capacitor signature is extracted and the square root of the sum of squares is calculated to obtain the capacitor signature difference degree. Determine whether the centroid distance is greater than the preset separation distance and whether the capacitor signature difference is greater than the preset difference threshold. When both conditions are met, the first stable touch point and the second stable touch point are marked as two target touch points respectively; otherwise, the sum of the capacitance changes in the touch areas of the first stable touch point and the second stable touch point is extracted as the fusion weight. The target touch point is obtained by weighted averaging of the first centroid coordinates and the second centroid coordinates based on the fusion weight.
[0037] Specifically, in the set of touch points that have undergone stability screening, two points are randomly selected and labeled as the first stable touch point and the second stable touch point. Spatial and feature information of each point are extracted from their internal structures. The spatial information includes their centroid coordinates, represented as (x1, y1) and (x2, y2), while the feature information includes the ternary capacitor signature: peak capacitance ratio, radial attenuation coefficient, and symmetry index. Based on these two centroid coordinates, the Euclidean distance is calculated to obtain the relative spatial interval between the two points on the physical touchscreen, which serves as a preliminary criterion for determining whether they originate from different finger contacts. Simultaneously, the capacitor signature parameters of the two points are compared item by item, and the differences between the three feature parameters are calculated. These differences are normalized according to their respective dimensions, squared, and then the normalized squared values are summed and taken squarely to obtain the overall difference between the two points in the capacitor feature space, i.e., the capacitor signature difference, reflecting the comprehensive distinguishing degree between the two points in terms of capacitor shape, intensity distribution, and symmetry structure. Two independent thresholds are set: a minimum centroid distance threshold for determining spatial separation and a minimum capacitance signature difference threshold for determining feature differences. These thresholds are compared with the calculated actual values. If both conditions are met simultaneously—that is, the two touch points are sufficiently separated spatially and have significant feature differences—they are determined to be two independent, physically separate, and real target touch points, and are recorded and output independently. Conversely, if either condition is not met (e.g., the centroid distance is too close or the capacitance signatures are highly similar), the two points are considered to originate from the same real touch point but are mistakenly classified as two independent entities due to local fluctuations or signal splitting during the recognition process. To avoid duplicate counting and false multi-point recognition, a fusion operation is performed. The sum of capacitance changes in the respective touch areas of the two points is extracted as a fusion weighting factor, representing the proportion of each in the coordinate fusion. Using these two weights, a weighted average is calculated on the two centroid coordinates to obtain a new target touch point centroid position. Simultaneously, the capacitance signatures are fused according to the same weighting rules to obtain a unified feature representation.
[0038] In one specific embodiment, the touchscreen multi-point recognition method further includes the following steps: Establish a touch point tracking dictionary to store the historical state data of each target touch point, and query the centroid coordinates and peak capacitance ratio of each target touch point in the previous frame for the current frame. Calculate the first change between the centroid coordinates of the current frame and the centroid coordinates of the previous frame, and calculate the second change between the peak capacitance ratio of the current frame and the peak capacitance ratio of the previous frame. Determine whether the target touch point appears for the first time in the touch point tracking dictionary. If it appears for the first time, mark it as a press event. If it already exists and the first change exceeds the motion threshold, mark it as a move event. If it already exists and the second change drops below the preset threshold, mark it as a release event and delete it from the touch point tracking dictionary.
[0039] Specifically, a real-time updated touch point tracking dictionary is maintained in the touch recognition process. The dictionary uses unique identifiers as keys to mark the historical records of each target touch point. Each record includes information such as the centroid coordinates, peak capacitance ratio, and event status label of the previous frame. At the beginning of each frame refresh cycle, all target touch points identified in the current frame are traversed. For each target touch point, its corresponding historical status data is searched in the tracking dictionary of the previous frame based on its number or trajectory attribution information. If the point is not found in the dictionary, it is determined that it is the first occurrence. Upon a touch action, its event type is immediately marked as "press," and the centroid coordinates and peak capacitance ratio of the current frame are written into the tracking dictionary. If the target touch point already exists in the tracking dictionary, its centroid coordinates and peak capacitance ratio of the previous frame are extracted from the record, and the difference between them and the same data in the current frame is calculated. The change in the Euclidean distance of the centroid coordinates is the first change, reflecting the degree of movement of the touch point in space, while the difference between the peak capacitance ratio of the current frame and the peak capacitance ratio of the previous frame is the second change, reflecting the trend of the touch point's change in capacitance response intensity. The system determines whether the first change exceeds a preset motion threshold. For example, if the Euclidean distance is greater than 5 pixels, it indicates that the touch point has shifted between two frames. In this case, the touch point is marked as a "movement" event, and its centroid coordinates in the tracking dictionary are updated for the next iteration of matching. If the touch point exists but its peak capacitance ratio drops significantly in the current frame and the value has fallen below a preset lift-off threshold (e.g., below 2.0), it indicates that the user's finger has left the screen, causing the capacitive sensing signal to weaken rapidly. In this case, the event type is marked as "lift-off," and the touch point is completely removed from the tracking dictionary, releasing its numbering resources to avoid duplicate recording. Through the event type determination mechanism, the system continuously tracks the state changes of each touch point based on the time dimension. Relying on the joint judgment logic of spatial displacement and capacitance intensity change, it determines the boundary transitions of basic touch events such as "press," "move," and "lift-off," constructing a multi-touch interaction sequence.
[0040] In one specific embodiment, the process of determining whether the target touch point appears for the first time in the touch point tracking dictionary, marking it as a press event when it appears for the first time, marking it as a movement event when it already exists and the first change exceeds a motion threshold, and marking it as a release event and deleting it from the touch point tracking dictionary when it already exists and the second change drops below a preset threshold can specifically include the following steps: The system searches the touch point tracking dictionary based on the identifier of the target touch point to determine whether the identifier already exists in the touch point tracking dictionary. When the identifier does not exist, the target touch point is marked as a press event, and the identifier, along with the centroid coordinates and peak capacitance ratio of the current frame, is stored in the touch point tracking dictionary; When an identifier already exists and the first change exceeds the motion threshold, the target touch point is marked as a movement event, and the centroid coordinates corresponding to that identifier in the touch point tracking dictionary are updated. When an identifier already exists and the second change value drops below a preset threshold, the target touch point is marked as a lift-off event, and the identifier and all its corresponding historical state data are deleted from the touch point tracking dictionary.
[0041] Specifically, a continuously maintained touch point tracking dictionary is constructed. The dictionary structure uses the unique identifier of each touch point as the key, and the centroid coordinates, peak capacitance ratio, and other necessary state parameters of each frame as corresponding values. This is used to store and track the dynamic changes of each touch point in consecutive frames. When the system enters a new touch recognition cycle, it iterates through all target touch points that have passed stability verification in the current frame. For each target touch point, the identifier is quickly searched in the tracking dictionary to determine if it already exists. If the identifier does not exist, it means the touch point is appearing in the current frame for the first time. Based on this, the event type of the touch point is marked as "pressed," and the identifier, along with the centroid coordinates and peak capacitance ratio of the current frame, are immediately written into the touch point tracking dictionary as the initial state. If the identifier already exists in the dictionary, the centroid coordinates and peak capacitance ratio of the previous frame are extracted and compared with the corresponding values in the current frame. The Euclidean distance between the centroid coordinates of the current frame and the previous frame is calculated as the first change value to determine the touch. If the point has undergone effective displacement, and the first change exceeds the set motion threshold (e.g., 5 pixels), the touch point is considered to be in a moving state. The event type is marked as "movement," and the centroid coordinates of the touch point in the current frame are written back to the dictionary to update its motion trajectory. Otherwise, if the identifier still exists but the peak capacitance ratio of the current frame shows a decreasing trend compared to the previous frame, and the value has dropped below the preset lift-off threshold (e.g., below 2.0), it is inferred that the user's finger has completely left the screen from the touch point position. The event of that point is marked as "lift-off," and its identifier and all historical state data corresponding to that key name are immediately deleted from the tracking dictionary to release memory and numbering resources and prevent incorrect associations in the next frame.
[0042] The process includes a reliability assessment step after marking nodes with capacitance changes greater than the adaptive detection threshold as touch candidate nodes and before performing connectivity clustering on the touch candidate nodes. For each touch candidate node, the capacitance changes of each electrode intersection node within a preset neighborhood window centered on that node are extracted to construct a two-dimensional capacitance distribution matrix. The capacitance gradients of the two-dimensional capacitance distribution matrix in the horizontal and vertical directions are calculated, and the absolute values of each gradient are summed to obtain the total gradient intensity. The number of gradient vectors pointing towards the touch candidate node is counted to obtain the gradient convergence. A reliability score is calculated based on the total gradient intensity and gradient convergence. When the total gradient intensity is greater than a preset intensity threshold and the gradient convergence is greater than a preset convergence threshold, the node is determined to be a high-reliability candidate node; otherwise, it is determined to be a low-reliability candidate node. Low-reliability candidate nodes are filtered out, and only high-reliability candidate nodes are retained for subsequent connectivity clustering processing, thereby eliminating edge noise points and transient interference points with discontinuous capacitance distribution.
[0043] The process of extracting the centroid coordinates of the same touch point in each frame within a time window to form a coordinate sequence and extracting the corresponding capacitor signatures in each frame to form a signature sequence also includes the step of establishing touch point identity association: For each touch area detected in the current frame within the time window, the centroid coordinates and capacitor signatures of each touch area are extracted and matched with touch points whose identities have been established in the previous frame; the spatial distance and capacitor signature similarity between each touch area in the current frame and each touch point in the previous frame are calculated to construct a matching cost matrix, where the matching cost is calculated by a weighted combination of spatial distance and capacitor signature difference; the Hungarian algorithm is used to perform global optimal matching on the matching cost matrix, and when the matching cost is less than a preset association threshold, the identity association between the touch area in the current frame and the touch point in the previous frame is established, and the identity identifier of the touch point is inherited; new identity identifiers are assigned to touch areas in the current frame that have not been successfully matched as newly appearing touch points, thereby realizing continuous tracking and accurate association of touch point identities in multi-point intersection scenarios.
[0044] The process includes, after calculating the second change in the peak capacitance ratio of the current frame compared to the peak capacitance ratio of the previous frame, a step of identifying the touch pressure state based on the peak capacitance ratio change trend: extracting the historical peak capacitance ratio sequence stored in the touch point tracking dictionary for the target touch point, and appending the peak capacitance ratio of the current frame to the end of the historical peak capacitance ratio sequence to form updated peak capacitance ratio time-series data; performing linear fitting on the peak capacitance ratio time-series data using a sliding window, calculating the slope of the fitted line to obtain the peak capacitance ratio change rate, and calculating the standard deviation of the peak capacitance ratio time-series data to obtain the pressure fluctuation amplitude; judging the pressure change trend based on the sign and absolute value of the peak capacitance ratio change rate, marking it as a pressure enhancement state when the peak capacitance ratio change rate is positive and the absolute value is greater than a preset growth threshold, marking it as a pressure weakening state when the peak capacitance ratio change rate is negative and the absolute value is greater than a preset decrease threshold, otherwise marking it as a pressure stable state; combining the absolute value of the peak capacitance ratio of the current frame and the pressure fluctuation amplitude, the touch pressure of the target touch point is divided into three pressure levels: light touch, medium pressure, and heavy pressure, and the pressure change trend and pressure level are output as the touch pressure state, providing quantified pressure information for pressure-sensitive interactive applications.
[0045] The process includes, after finding the maximum capacitance change within the touch area and dividing it by the adaptive detection threshold to obtain the peak capacitance ratio, an adaptive feature extraction step based on capacitance response intensity grading: calculating the mean and variance of capacitance change at each electrode intersection node within the touch area; classifying the touch area into strong and weak response modes based on the mean capacitance change; determining a strong response mode when the mean capacitance change is greater than a preset multiple of the adaptive detection threshold, and a weak response mode otherwise; for touch areas determined to be in strong response mode, expanding the window range for extracting capacitance distribution data to a first preset window size, increasing the number of sampling radii to the first preset radius when calculating the radial attenuation coefficient, and using a weighted accumulation method when calculating the symmetry index for electrode intersections closer to the centroid coordinates. Nodes are assigned high weights to capture the diffusion capacitance distribution characteristics of strong-pressure touches. For touch areas determined to be in a weak-response mode, the window range for extracting capacitance distribution data is narrowed to a second preset window size, and the number of sampling radii is reduced to a second preset radius when calculating the radial attenuation coefficient. At the same time, when calculating the symmetry index, the electrode intersection nodes in each quadrant are accumulated with equal weights to accurately extract the local concentrated capacitance distribution characteristics in the light-touch scenario. The capacitance signature extracted in the strong-response mode is marked as a strong-pressure capacitance signature, and the capacitance signature extracted in the weak-response mode is marked as a light-touch capacitance signature. A response intensity identifier is added to the capacitance signature, so that subsequent calculations of timing volatility and capacitance signature difference can distinguish touch points of different pressure levels, avoiding misjudgments and misfusions caused by pressure differences.
[0046] The process includes a centroid coordinate correction step after marking stable touch points, based on multi-scale feature fusion and time delay compensation. For each frame within a time window, the touch area corresponding to the stable touch point is extracted, and its capacitance distribution features at multiple preset scales are extracted. After normalizing the capacitance changes within each scale window using root mean square normalization, a multi-scale capacitance feature vector is obtained. Based on this multi-scale capacitance feature vector, the contribution weight of each frame to centroid localization is calculated. Specifically, this includes calculating the cosine similarity between the current frame's feature vector and the mean of all frame feature vectors within the time window, and then exponentially normalizing the cosine similarity to obtain the contribution weight of the current frame. An adaptive weighting mechanism is used to assign greater weight to frames with high capacitance distribution stability. The peak capacitance ratio time sequence of each frame within the time window of the stable touch point is extracted. The propagation delay of the touch signal is estimated by calculating the cumulative phase difference of the peak capacitance ratio between adjacent frames. Based on the propagation delay of the touch signal, the time offset of the centroid coordinates of each frame relative to the current frame is determined. The centroid coordinates of the frame are corrected for time delay according to the contribution weight of each frame and the time offset. The corrected centroid coordinates of each frame are weighted and averaged to obtain the centroid coordinates of the stable touch point after time delay compensation. This is used as the final positioning result of the stable touch point, thereby eliminating the influence of signal propagation delay and capacitance distribution fluctuation on the positioning accuracy of the touch point.
[0047] The above describes the touchscreen multi-touch recognition method in the embodiments of this application. The following describes the touchscreen multi-touch recognition system in the embodiments of this application. Please refer to [link / reference]. Figure 2 One embodiment of the touchscreen multi-point recognition system in this application includes: The detection module 11 is used to detect the touch candidate nodes of the touch screen, and to perform connectivity clustering on the touch candidate nodes to locate the touch area; The calculation module 12 is used to calculate the centroid coordinates of the touch area, and calculate the peak capacitance ratio, radial attenuation coefficient and symmetry index based on the centroid coordinates, and combine them to obtain the capacitance signature. The filtering module 13 is used to calculate the position offset of the centroid coordinates between adjacent frames and the temporal volatility of the capacitor signature, and to filter out stable touch points whose position offset and temporal volatility both meet the stability conditions. The determination module 14 is used to calculate the centroid distance and capacitance signature difference between any two stable touch points. When the centroid distance is greater than the preset separation distance and the capacitance signature difference is greater than the preset difference threshold, they are determined to be two target touch points.
[0048] Please see Figure 3 , Figure 3The present invention provides a schematic block diagram of the structure of an electronic device 300. The electronic device 300 includes a processor 301 and a memory 302, which are connected via a system bus 303. The memory 302 may include a non-volatile storage medium and internal memory.
[0049] The non-volatile storage medium can store a computer program. The computer program includes program instructions that, when executed by the processor 301, cause the processor 301 to perform any of the aforementioned touchscreen multi-touch recognition methods.
[0050] The processor 301 provides computing and control capabilities to support the operation of the entire electronic device 300.
[0051] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor 301, the processor 301 can execute any of the above-mentioned touch screen multi-point recognition methods.
[0052] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device 300 involved in the present application. The specific electronic device 300 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0053] It should be understood that processor 301 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0054] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device 300 described above can be referred to the corresponding process of the aforementioned multi-point recognition method for touch screens, and will not be repeated here.
[0055] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0056] If the integrated unit is implemented as 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 technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0057] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for multi-point recognition of a touch screen, characterized by, The method comprises the following steps: detecting touch candidate nodes of the touch screen, clustering the touch candidate nodes according to connectivity, and locating a touch area; calculating centroid coordinates of the touch area, calculating a peak capacitance ratio, a radial attenuation coefficient and a symmetry index based on the centroid coordinates, and combining to obtain a capacitance signature; calculating a position offset of the centroid coordinates between adjacent frames and a time fluctuation rate of the capacitance signature, and screening a stable touch point which satisfies a stability condition in position offset and time fluctuation rate; calculating a centroid distance between any two stable touch points and a capacitance signature difference degree, and determining two target touch points when the centroid distance is greater than a preset separation distance and the capacitance signature difference degree is greater than a preset difference threshold.
2. The method of claim 1, wherein, The method of detecting touch candidate nodes of the touch screen, clustering the touch candidate nodes according to connectivity, and locating a touch area comprises the following steps: scan electrodes of the touch screen row by row and collect current frame capacitance values and background capacitance values; calculate capacitance difference values between the current frame capacitance values and the background capacitance values of each electrode intersection node, and construct a capacitance change matrix based on the capacitance difference values; calculate a background capacitance standard deviation based on the background capacitance values of each frame and the background capacitance mean value of each electrode intersection node in continuous multiple frames, multiply the background capacitance standard deviation by a preset coefficient to obtain an adaptive detection threshold; traverse the capacitance change amounts of each electrode intersection node in the capacitance change matrix, and mark the nodes with capacitance change amounts greater than the adaptive detection threshold as touch candidate nodes; cluster the touch candidate nodes according to connectivity, and locate a touch area.
3. The method of claim 2, wherein The method of clustering the touch candidate nodes according to connectivity and locating a touch area comprises the following steps: traverse the touch candidate nodes, and extract adjacent candidate nodes within a preset neighborhood range for each touch candidate node; calculate the Euclidean distance and capacitance change amount ratio between each touch candidate node and each adjacent candidate node, and determine that the touch candidate node and the adjacent candidate node belong to a connectivity relationship when the Euclidean distance is less than a preset distance threshold and the capacitance change amount ratio is within a preset interval; merge the touch candidate nodes with a connectivity relationship into the same node set based on the connectivity relationship by using a union-find set algorithm, and locate each node set as a touch area after traversal is completed.
4. The method of claim 3, wherein The method of calculating centroid coordinates of the touch area, calculating a peak capacitance ratio, a radial attenuation coefficient and a symmetry index based on the centroid coordinates, and combining to obtain a capacitance signature comprises the following steps: extract the original coordinates of each electrode intersection node in the touch area, and calculate centroid coordinates based on the original coordinates of each electrode intersection node; find the maximum capacitance change amount in the touch area with the centroid coordinates as the center, and divide the maximum capacitance change amount by the adaptive detection threshold to obtain a peak capacitance ratio; extract capacitance mean values at multiple different radii with the centroid coordinates as the center and calculate a capacitance attenuation ratio between adjacent radii to obtain a radial attenuation coefficient; The touch area is divided into four quadrants by the centroid coordinates, and a symmetry index is calculated by summing the capacitance of the diagonal quadrants and calculating the ratio of the sum. The peak capacitance ratio, the radial attenuation coefficient, and the symmetry index are combined into a capacitance signature.
5. The method of claim 4, wherein, The position offset of the centroid coordinates between adjacent frames and the timing fluctuation rate of the capacitance signature are calculated, and stable touch points that meet the stability conditions in terms of position offset and timing fluctuation rate are screened out, including: A time window containing the current frame and several consecutive previous frames is established, and the centroid coordinates of each touch area are matched between frames to identify centroid coordinates with similar spatial positions as the same touch point. The centroid coordinates of the same touch point in each frame within the time window are extracted to form a coordinate sequence, and the corresponding capacitance signatures of each frame are extracted to form a signature sequence. The position offset of the centroid coordinates of adjacent frames in the coordinate sequence is calculated, and the timing fluctuation rate of the peak capacitance ratio, the radial attenuation coefficient, and the symmetry index of adjacent frames in the signature sequence is calculated. It is judged whether the position offset between all frames within the time window is less than the position stability threshold and whether the timing fluctuation rate is less than the feature stability threshold. When both conditions are met, a stable touch point is marked.
6. The method of claim 1, wherein, The centroid distance between any two stable touch points and the capacitance signature difference degree are calculated, and when the centroid distance is greater than the preset separation distance and the capacitance signature difference degree is greater than the preset difference threshold, two target touch points are determined, including: Any two stable touch points are selected and defined as a first stable touch point and a second stable touch point. The first centroid coordinates and the first capacitance signature of the first stable touch point, and the second centroid coordinates and the second capacitance signature of the second stable touch point are extracted. The centroid distance is calculated based on the first centroid coordinates and the second centroid coordinates. The difference between the corresponding parameters in the first capacitance signature and the second capacitance signature is extracted, and the square sum is calculated to obtain the capacitance signature difference degree. It is judged whether the centroid distance is greater than the preset separation distance and the capacitance signature difference degree is greater than the preset difference threshold. When both conditions are met, the first stable touch point and the second stable touch point are marked as two target touch points, respectively. Otherwise, the total capacitance change of each touch area of the first stable touch point and the second stable touch point is extracted as a fusion weight, and the first centroid coordinates and the second centroid coordinates are weighted and averaged based on the fusion weight to obtain a target touch point.
7. The method of claim 1, wherein, The touch screen multi-point recognition method further includes: A touch point tracking dictionary is established to store historical state data of each target touch point. The centroid coordinates and peak capacitance ratio of each target touch point in the previous frame are queried for the current frame. The first change between the centroid coordinates of the current frame and the centroid coordinates of the previous frame is calculated, and the second change between the peak capacitance ratio of the current frame and the peak capacitance ratio of the previous frame is calculated. determining whether the target touch point first appears in the touch point tracking dictionary, marking as a press event when first appearing, marking as a move event when already existing and the first change amount exceeding a motion threshold, marking as a lift event and deleting from the touch point tracking dictionary when already existing and the second change amount falling below a preset threshold.
8. The method of claim 7, wherein, The determination of whether the target touch point first appears in the touch point tracking dictionary, marking as a press event when first appearing, marking as a move event when already existing and the first change amount exceeding a motion threshold, marking as a lift event and deleting from the touch point tracking dictionary when already existing and the second change amount falling below a preset threshold, comprises: querying based on the identifier of the target touch point in the touch point tracking dictionary, determining whether the identifier already exists in the touch point tracking dictionary; when the identifier does not exist, marking the target touch point as a press event, and storing the identifier, the current frame centroid coordinates and the peak capacitance ratio in the touch point tracking dictionary; when the identifier already exists and the first change amount exceeds the motion threshold, marking the target touch point as a move event, and updating the centroid coordinates corresponding to the identifier in the touch point tracking dictionary; when the identifier already exists and the second change amount falls below the preset threshold, marking the target touch point as a lift event, and deleting the identifier and all corresponding historical state data from the touch point tracking dictionary.
9. A touch screen multipoint recognition system, characterized by A method for performing the touch screen multi-point recognition method according to any one of claims 1-8, comprising: a detection module for detecting touch candidate nodes of a touch screen, and performing connectivity clustering on the touch candidate nodes to locate a touch area; a calculation module for calculating centroid coordinates of the touch area, and calculating a peak capacitance ratio, a radial attenuation coefficient and a symmetry index based on the centroid coordinates to obtain a combined capacitance signature; a screening module for calculating a position offset of the centroid coordinates between adjacent frames and a timing fluctuation rate of the capacitance signature, and screening out stable touch points whose position offset and timing fluctuation rate both satisfy stability conditions; a determination module for calculating a centroid distance and a capacitance signature difference degree between any two stable touch points, and determining two target touch points when the centroid distance is greater than a preset separation distance and the capacitance signature difference degree is greater than a preset difference threshold.
10. An electronic device, comprising: The electronic device comprises a memory and at least one processor, and the memory stores instructions; The at least one processor invokes the instructions in the memory to enable the electronic device to perform the touch screen multi-point recognition method according to any one of claims 1-8. The electronic device comprises a memory and at least one processor, and the memory stores instructions; The at least one processor invokes the instructions in the memory to enable the electronic device to perform the touch screen multi-point recognition method according to any one of claims 1-8.