CN115904139A - Touch position determination method and device, electronic equipment and storage medium - Google Patents

Touch position determination method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115904139A
CN115904139A CN202211601223.4A CN202211601223A CN115904139A CN 115904139 A CN115904139 A CN 115904139A CN 202211601223 A CN202211601223 A CN 202211601223A CN 115904139 A CN115904139 A CN 115904139A
Authority
CN
China
Prior art keywords
thermodynamic diagram
determining
capacitor
target
touch screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211601223.4A
Other languages
Chinese (zh)
Inventor
郭家宏
尹宏轶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202211601223.4A priority Critical patent/CN115904139A/en
Publication of CN115904139A publication Critical patent/CN115904139A/en
Pending legal-status Critical Current

Links

Images

Abstract

The disclosure provides a method and a device for determining a touch position, electronic equipment and a storage medium, and relates to the technical field of touch. The method comprises the following steps: if the capacitive touch screen is detected to be touched, determining the current capacitance value of each capacitor in the capacitor array; generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor; determining a target area corresponding to the thermodynamic diagram with the heat value larger than a first threshold and the area size larger than a second threshold and a first position of the target area in the thermodynamic diagram; and determining a second position of the touch point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position. Therefore, the current capacitance value of each capacitor in the capacitor array is converted into the thermodynamic diagram, and then the capacitance value data is analyzed globally through the thermodynamic diagram, so that the position of a touch point in the capacitive touch screen is determined quickly and accurately.

Description

Touch position determination method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of touch technologies, and in particular, to a method and an apparatus for determining a touch position, an electronic device, and a storage medium.
Background
Capacitive touch screens are commonly used as touch screens for electronic devices because of their advantages of higher sensitivity and easier implementation of multi-touch technology. When a finger touches a certain position of the capacitive screen, current induction is formed, the capacitance value of the area is changed, and the capacitance value is obviously improved compared with the capacitance value around the area. Therefore, relevant strategies can be designed according to the phenomenon to determine the finger touch position.
The capacitance data may be disturbed by noise to different degrees due to the influence (suspension, grounding) of the use state of the electronic device. Currently, a common touch strategy selects single-line scanning and purifies data through multiple threshold setting, data filtering and curve fitting strategies to find the position of a single-line finger, but the problems of partial overlapping of adjacent finger areas caused by the non-comprehensiveness of multiple thresholds, slight deviation of single-line finger position confirmation, inaccurate curve fitting caused by various complex datum lines and the like cause mass center calculation errors, and misjudgment of a peak value between two adjacent valley values as a finger touch position occasionally results in point loss, line connection and ghost points when the final point report is carried out.
Disclosure of Invention
The present disclosure is directed to solving, at least in part, one of the technical problems in the related art.
An embodiment of a first aspect of the present disclosure provides a method for determining a touch position, including:
in response to detecting that a capacitive touch screen is touched, determining a current capacitance value of each capacitor in a capacitive array of the capacitive touch screen;
generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array;
determining a target area corresponding to the thermodynamic diagram with a thermal value larger than a first threshold and an area size larger than a second threshold and a first position of the target area in the thermodynamic diagram;
and determining a second position of a touch point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position.
An embodiment of a second aspect of the present disclosure provides an apparatus for determining a touch position, including:
the first determining module is used for determining the current capacitance value of each capacitor in a capacitor array of the capacitive touch screen in response to the fact that the capacitive touch screen is detected to be touched;
the generating module is used for generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array;
the acquisition module is used for determining a target area corresponding to the thermodynamic diagram with the heat value larger than a first threshold and the area size larger than a second threshold and a first position of the target area in the thermodynamic diagram;
and the second determining module is used for determining a second position of the touch point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position.
An embodiment of a third aspect of the present disclosure provides an electronic device, including: the touch position determining method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the program to implement the touch position determining method as set forth in an embodiment of the first aspect of the disclosure.
A fourth aspect of the present disclosure provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method for determining a touch position as set forth in the first aspect of the present disclosure is implemented.
An embodiment of a fifth aspect of the present disclosure provides a computer program product, which includes a computer program and when executed by a processor, implements the method for determining a touch position as set forth in the embodiment of the first aspect of the present disclosure.
The method and the device for determining the touch position, the electronic device and the storage medium have the following beneficial effects:
in the embodiment of the disclosure, under the condition that the capacitive touch screen is detected to be touched, a current capacitance value of each capacitor in a capacitor array of the capacitive touch screen is determined, then, a thermodynamic diagram corresponding to the capacitor array is generated according to the current capacitance value of each capacitor in the capacitor array, a target area corresponding to the thermodynamic diagram, in which the capacitance value is greater than a first threshold and the area size is greater than a second threshold, and a first position of the target area in the thermodynamic diagram are further determined, and finally, a second position of a touch point in the capacitive touch screen is determined according to a mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position. Therefore, the current capacitance value of each capacitor in the capacitor array is converted into the thermodynamic diagram, and then the capacitance value data is subjected to global analysis through the thermodynamic diagram, so that the position of the touch point in the capacitive touch screen is determined quickly and accurately.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The above and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart illustrating a method for determining a touch position according to an embodiment of the disclosure;
fig. 2 is a schematic diagram of a thermodynamic diagram corresponding to a capacitor array according to an embodiment of the disclosure;
fig. 3 is a flowchart illustrating a method for determining a touch position according to an embodiment of the disclosure;
FIG. 4 is a schematic diagram of a thermodynamic diagram identification result according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a device for determining a touch position according to another embodiment of the disclosure;
FIG. 6 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
A method, an apparatus, an electronic device, and a storage medium for determining a touch position according to embodiments of the present disclosure are described below with reference to the drawings.
Fig. 1 is a flowchart illustrating a method for determining a touch position according to an embodiment of the disclosure.
The touch position determining method is exemplified by being configured in a touch position determining device, and the touch position determining device can be applied to any electronic device, so that the electronic device can execute a touch position determining function.
As shown in fig. 1, the method for determining a touch position may include the following steps:
step 101, in response to detecting that the capacitive touch screen is touched, determining a current capacitance value of each capacitor in a capacitive array of the capacitive touch screen.
Optionally, when the user touches the capacitive touch screen with other objects such as a finger, a finger joint, a stylus, and the like, it is determined that the capacitive touch screen is touched.
In the embodiment of the present disclosure, when the capacitive touch screen is touched, a capacitance value of a capacitor corresponding to a touched position may change, and therefore, a touch point of a user in the capacitive touch screen may be determined according to a current capacitance value of each capacitor in the capacitor array.
And 102, generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array.
Fig. 2 is a schematic diagram of a thermodynamic diagram corresponding to a capacitor array according to an embodiment of the disclosure. As shown in fig. 2, the number of pixels in each row in the thermodynamic diagram is equal to the number of capacitors in each row in the capacitor array, and the number of pixels in each column in the thermodynamic diagram is equal to the number of capacitors in each column in the capacitor array. Therefore, the number of the pixel points of the thermodynamic diagram is equal to the number of the capacitors in the capacitor array, and the pixel points correspond to the capacitors one by one. For example, the pixel point of the first row and the first column in the thermodynamic diagram corresponds to the capacitance of the first row and the first column in the capacitor array.
Optionally, the current capacitance value of each capacitor is normalized to obtain a target normalized value corresponding to each capacitor, then a preset thermodynamic value mapping table is queried based on each target normalized value to obtain a target thermodynamic value corresponding to each capacitor, where the thermodynamic value mapping table includes a mapping relationship between each normalized value and a thermodynamic value, and finally a thermodynamic diagram is generated according to a pixel position corresponding to each capacitor in the thermodynamic diagram and the target thermodynamic value corresponding to each capacitor.
The maximum capacitance value and the minimum capacitance value may be obtained from the current capacitance value of each capacitor in the capacitor array, and then the current capacitance value of each capacitor is subjected to global normalization processing based on the maximum capacitance value and the minimum capacitance value to obtain a target normalization value corresponding to each capacitor, so that the target normalization value corresponding to each capacitor is between [0,1 ].
The preset thermal value mapping table can be a preset table containing thermal force values corresponding to all values between [0,1], so that the preset thermal value mapping table can be inquired according to the target normalization value corresponding to each capacitor to obtain the target thermal force value corresponding to each capacitor.
In the embodiment of the disclosure, the thermal force value corresponding to each pixel in the thermodynamic diagram, that is, the pixel value, may be determined according to the mapping relationship between each capacitor in the capacitor array and each pixel position in the thermodynamic diagram and the thermal value corresponding to each capacitor, so as to generate the thermodynamic diagram.
Or, the target thermal force value corresponding to each capacitor can be directly determined according to the mapping relationship between the capacitance value and the thermal force value, and then the thermodynamic diagram is generated according to the pixel position corresponding to each capacitor in the thermodynamic diagram and the target thermal force value corresponding to each capacitor.
And 103, determining a target area corresponding to the thermodynamic diagram with the heat value larger than the first threshold and the area size larger than the second threshold and a first position of the target area in the thermodynamic diagram.
The first threshold value may be preset to determine a region with a large heat value in the thermodynamic diagram. The second threshold may be expressed in terms of the number of pixel points. The second threshold may be 10 pixels, 5 pixels, and so on. The present disclosure is not limited thereto.
Specifically, the closed regions in the thermodynamic diagram with the heat value greater than the first threshold value may be determined according to the first threshold value, and then the target region may be determined according to whether the number of pixel points included in each closed region is greater than the second threshold value. And if the number of pixel points contained in any closed region is greater than a second threshold value, determining that the closed region is the target region.
It should be noted that the target region may be a rectangular region, or may be a region corresponding to another irregular shape, which is not limited in this disclosure.
The target area may be an area corresponding to a capacitance with a capacitance value changing around a touch point in the thermodynamic diagram when it is detected that the capacitive touch screen is touched. Optionally, the target region may include a plurality of pixel points, which is not limited in this disclosure.
Optionally, the first position of the target area in the thermodynamic diagram may be represented by rows and columns where the pixel points in the target area are located, or the first position of the target area in the thermodynamic diagram may be represented by coordinate points of the target area in a coordinate system where the thermodynamic diagram is located. The present disclosure is not limited thereto.
In the embodiment of the disclosure, after the thermodynamic diagram is determined, a region with a higher thermal value in the thermodynamic diagram may be identified, so as to obtain a target region corresponding to the thermodynamic diagram with a thermal value greater than a first threshold and a region size greater than a second threshold.
In the embodiment of the disclosure, the current capacitance value of each capacitor in the capacitor array is converted into the thermodynamic diagram, and the thermodynamic diagram is further identified to obtain the target area in the thermodynamic diagram, so that the capacitance value data can be globally analyzed based on the thermodynamic diagram, operations such as data filtering and curve fitting on each row of capacitance values can be omitted, and the problem of inaccurate touch point judgment caused by analyzing single row of data can be avoided.
And step 104, determining a second position of the touch point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position.
Optionally, the mapping relationship between the thermodynamic diagram and the capacitive touch screen may be determined according to the position mapping relationship between each capacitor in the capacitor array and the capacitive touch screen and the position of each capacitor in the thermodynamic diagram.
It can be understood that, because the number of the pixel points in the thermodynamic diagram is equal to the number of the capacitors in the capacitor array, and each capacitor corresponds to a small area in the capacitive touch screen, each pixel point in the thermodynamic diagram may correspond to an area formed by a plurality of pixel points in the capacitive touch screen.
Optionally, determining a pixel point where the centroid of the target area corresponding to the first position is located as a target pixel point; and then determining the corresponding position of the target pixel point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen, and finally determining the corresponding position of the target pixel point in the capacitive touch screen as a second position.
It can be understood that, under the condition that a target area corresponding to the first location includes a plurality of pixel points, if a location area corresponding to each pixel point in the first area in the capacitive touch screen is a second location of a touch point in the capacitive touch screen, the area of the determined touch point may be large, and a situation that one touch point corresponds to a plurality of keys in the capacitive touch screen occurs, thereby causing a problem that a subsequent key response is wrong. Therefore, in the embodiment of the present disclosure, under the condition that the target area corresponding to the first position includes a plurality of pixel points, it is further determined that the pixel point where the centroid of the target area corresponding to the first position is located is the target pixel point, and it is determined that the position of the target pixel point corresponding to the capacitive touch screen is the second position of the touch point, so that the determined touch point can be more accurate.
In the embodiment of the disclosure, under the condition that the capacitive touch screen is detected to be touched, a current capacitance value of each capacitor in a capacitor array of the capacitive touch screen is determined, then, a thermodynamic diagram corresponding to the capacitor array is generated according to the current capacitance value of each capacitor in the capacitor array, a target area corresponding to the thermodynamic diagram, in which the capacitance value is greater than a first threshold and the area size is greater than a second threshold, and a first position of the target area in the thermodynamic diagram are further determined, and finally, a second position of a touch point in the capacitive touch screen is determined according to a mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position. Therefore, the current capacitance value of each capacitor in the capacitor array is converted into the thermodynamic diagram, and then the capacitance value data is subjected to global analysis through the thermodynamic diagram, so that the position of the touch point in the capacitive touch screen is determined quickly and accurately.
Fig. 3 is a flowchart illustrating a method for determining a touch position according to an embodiment of the present disclosure, and as shown in fig. 3, the method for determining a touch position may include the following steps:
step 301, in response to detecting that the capacitive touch screen is touched, determining a current capacitance value of each capacitor in a capacitor array of the capacitive touch screen.
Step 302, generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array.
The specific implementation forms of step 301 and step 302 may refer to detailed descriptions in other embodiments in the present disclosure, and details are not described herein again.
And step 303, inputting the thermodynamic diagram into the target recognition model to acquire a target area included in the thermodynamic diagram output by the target recognition model and a first position of the target area in the thermodynamic diagram.
Fig. 4 is a schematic diagram of a thermodynamic diagram identification result according to an embodiment of the present disclosure, and as shown in fig. 4, a region enclosed by a rectangular frame may be a target region.
The target recognition model can be a pre-trained deep learning network model used for performing target recognition on the thermodynamic diagram so as to predict target areas including touch points in the thermodynamic diagram and first positions corresponding to the target areas.
Optionally, the structure of the target recognition model may be a Single Shot multi box Detector (SSD), may also be a convolutional neural network model, or may also be any network structure capable of implementing target recognition. The present disclosure is not limited thereto.
Optionally, obtaining the target recognition model may include the following steps:
(1) And acquiring a sample training data set, wherein the sample training data set comprises a sample thermodynamic diagram, the sample thermodynamic diagram comprises a labeling area corresponding to the sample touch point and a third position of the labeling area in the sample thermodynamic diagram.
The sample training data set can contain a large amount of sample thermodynamic diagrams and labeling data corresponding to the sample thermodynamic diagrams, so that the initial target recognition model is trained by using the sample training data set to obtain a target recognition model with better performance.
The labeling area corresponding to the sample touch point included in the sample thermodynamic diagram can be a labeling area corresponding to the sample touch point, which is marked in the sample thermodynamic diagram by determining the capacitance corresponding to the sample touch point under the condition that the position of the sample touch point in the capacitive touch screen is known.
Optionally, the sample thermodynamic diagram includes at least one of:
one or more sample touch points;
sample touch points corresponding to different contact areas; and
and sample touch points corresponding to different touch pressure values.
Optionally, a capacitance value corresponding to each capacitor in the capacitor matrix under multiple touch events such as a single sample touch point to ten sample touch points, and/or sample touch points corresponding to different contact areas, and/or sample touch points corresponding to different touch pressure values may be respectively collected, and then a sample thermodynamic diagram corresponding to each touch event is generated according to the capacitance value corresponding to each capacitor in the capacitor matrix under different touch events, so that diversity of samples can be increased, and robustness of the model is improved.
Optionally, the capacitance value corresponding to each capacitor in the capacitance matrix under each touch event may be normalized, so that the training speed of the model may be increased, and the convergence of the model may be accelerated.
(2) And inputting the sample thermodynamic diagram into the initial target recognition model to acquire the prediction area contained in the sample thermodynamic diagram and a fourth position of the prediction area in the sample thermodynamic diagram.
The initial target recognition model may be an initial model which is not yet trained, so that a prediction area and a fifth position of the prediction area in the sample thermodynamic diagram predicted by the initial target recognition model are different from a labeling result (a labeling area corresponding to the sample touch point and a third position of the labeling area in the sample thermodynamic diagram) of the sample thermodynamic diagram, and the model may be subjected to correction training based on the difference.
(3) A loss value is determined based on a difference between the third location and the fourth location.
Optionally, a loss function such as a cross entropy loss function or a mean square error loss function may be used to calculate the difference between the third position and the fourth position to determine the loss value.
(4) And correcting the initial target recognition model according to the loss value to obtain the target recognition model.
In the embodiment of the disclosure, after the loss value is determined, parameters in the initial target identification model may be corrected according to the loss value, so that the initial target identification model may be iteratively corrected based on each sample thermodynamic diagram until the model converges or satisfies a preset iteration stop condition, and the model when the iteration stops is determined to be the target identification model.
In the embodiment of the disclosure, the target recognition is performed on the thermodynamic diagram in the target recognition model to obtain the target area and the first position of the target area in the thermodynamic diagram, so that the current capacitance value of each capacitor in the capacitor array can be converted into the thermodynamic diagram, and further, in combination with deep learning, the target area corresponding to the touch point in the thermodynamic diagram and the first position of the target area in the thermodynamic diagram are further quickly and accurately determined.
And step 304, determining a second position of the touch point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position.
The specific implementation form of step 304 may refer to detailed descriptions in other embodiments in the present disclosure, and details are not repeated here.
In the embodiment of the disclosure, when it is detected that the capacitive touch screen is touched, a current capacitance value of each capacitor in a capacitor array of the capacitive touch screen is determined, then a thermodynamic diagram corresponding to the capacitor array is generated according to the current capacitance value of each capacitor in the capacitor array, the thermodynamic diagram is further input into a target recognition model to obtain a target area and a first position of the target area in the thermodynamic diagram, which are included in the thermodynamic diagram output by the target recognition model, and finally, a second position of a touch point in the capacitive touch screen is determined according to a mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position. Therefore, the current capacitance value of each capacitor in the capacitor array is converted into a thermodynamic diagram, and then the thermodynamic diagram is subjected to target identification through the target identification model, so that capacitance value data and deep learning are combined, the capacitance value data is subjected to global analysis through the target identification model, and the position of a touch point in the capacitive touch screen is further rapidly and accurately determined.
In order to implement the above embodiments, the present disclosure further provides a device for determining a touch position.
Fig. 5 is a schematic structural diagram of a touch position determining apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the touch position determining apparatus 500 may include:
the first determining module is used for determining the current capacitance value of each capacitor in a capacitor array of the capacitive touch screen in response to the fact that the capacitive touch screen is detected to be touched;
the generating module is used for generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array;
the acquisition module is used for determining a target area corresponding to the thermodynamic diagram with the heat value larger than a first threshold and the area size larger than a second threshold and a first position of the target area in the thermodynamic diagram;
and the second determining module is used for determining a second position of the touch point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position.
Optionally, the generating module is specifically configured to:
normalizing the current capacitance value of each capacitor to obtain a target normalized value corresponding to each capacitor;
inquiring a preset thermal value mapping table based on each target normalization value to obtain a target thermal value corresponding to each capacitor, wherein the thermal value mapping table comprises a mapping relation between each normalization value and the thermal value;
and generating a thermodynamic diagram according to the pixel position of each capacitor in the thermodynamic diagram and the target thermal force value corresponding to each capacitor.
Optionally, the second determining module 540 is specifically configured to:
determining pixel points where the centroids of the target areas corresponding to the first positions are located as target pixel points;
determining the corresponding position of a target pixel point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen;
and determining the corresponding position of the target pixel point in the capacitive touch screen as a second position.
Optionally, the obtaining module 530 is specifically configured to:
and inputting the thermodynamic diagram into the target recognition model to acquire a target area contained in the thermodynamic diagram output by the target recognition model and a first position of the target area in the thermodynamic diagram.
Optionally, the system further includes a training module, specifically configured to:
acquiring a sample training data set, wherein the sample training data set comprises a sample thermodynamic diagram, the sample thermodynamic diagram comprises a marking area corresponding to a sample touch point and a third position of the marking area in the sample thermodynamic diagram;
inputting the sample thermodynamic diagram into the initial target recognition model to obtain a prediction region contained in the sample thermodynamic diagram and a fourth position of the prediction region in the sample thermodynamic diagram;
determining a loss value based on a difference between the third location and the fourth location;
and correcting the initial target recognition model according to the loss value to obtain the target recognition model.
Optionally, the sample thermodynamic diagram includes at least one of:
one or more sample touch points;
sample touch points corresponding to different contact areas; and
and sample touch points corresponding to different touch pressure values.
The functions and specific implementation principles of the modules in the embodiments of the present disclosure may refer to the embodiments of the methods, and are not described herein again.
The touch position determining device of the embodiment of the disclosure determines, first, a current capacitance value of each capacitor in a capacitor array of a capacitive touch screen when the capacitive touch screen is detected to be touched, then, generates a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array, further determines a target area corresponding to the thermodynamic diagram, where the heat value is greater than a first threshold and the area size is greater than a second threshold, and a first position of the target area in the thermodynamic diagram, and finally, determines a second position of a touch point in the capacitive touch screen according to a mapping relationship between the thermodynamic diagram and the capacitive touch screen and the first position. Therefore, the current capacitance value of each capacitor in the capacitor array is converted into the thermodynamic diagram, and then the capacitance value data is subjected to global analysis through the thermodynamic diagram, so that the position of the touch point in the capacitive touch screen is determined quickly and accurately.
In order to implement the above embodiment, the present disclosure further provides an electronic device, including: the touch position determining method according to the foregoing embodiments of the present disclosure is implemented by a memory, a processor, and a computer program stored in the memory and executable on the processor.
In order to implement the foregoing embodiments, the present disclosure further provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the method for determining a touch position according to the foregoing embodiments of the present disclosure.
In order to implement the foregoing embodiments, the present disclosure further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for determining a touch position as set forth in the foregoing embodiments of the present disclosure is implemented.
FIG. 6 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure. The electronic device 12 shown in fig. 6 is only an example and should not bring any limitations to the function and scope of use of the disclosed embodiments.
As shown in FIG. 6, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro Channel Architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the disclosure.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet) via the Network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
According to the technical scheme, under the condition that the capacitive touch screen is touched, the current capacitance value of each capacitor in the capacitor array of the capacitive touch screen is determined, then a thermodynamic diagram corresponding to the capacitor array is generated according to the current capacitance value of each capacitor in the capacitor array, a target area corresponding to the thermodynamic diagram, the heat value of which is larger than a first threshold and the area size of which is larger than a second threshold, and the first position of the target area in the thermodynamic diagram are further determined, and finally the second position of a touch point in the capacitive touch screen is determined according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position. Therefore, the current capacitance value of each capacitor in the capacitor array is converted into the thermodynamic diagram, and then the capacitance value data is subjected to global analysis through the thermodynamic diagram, so that the position of the touch point in the capacitive touch screen is determined quickly and accurately.
In the description of the present specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Further, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.

Claims (10)

1. A method for determining a touch position, the method comprising:
in response to detecting that a capacitive touch screen is touched, determining a current capacitance value of each capacitor in a capacitive array of the capacitive touch screen;
generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array;
determining a target area corresponding to the thermodynamic diagram with a heat value larger than a first threshold and an area size larger than a second threshold and a first position of the target area in the thermodynamic diagram;
and determining a second position of a touch point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position.
2. The method of claim 1, wherein the generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array comprises:
normalizing the current capacitance value of each capacitor to obtain a target normalized value corresponding to each capacitor;
inquiring a preset thermal value mapping table based on each target normalization value to obtain a target thermal value corresponding to each capacitor, wherein the thermal value mapping table comprises a mapping relation between each normalization value and a thermal value;
and generating the thermodynamic diagram according to the pixel position of each capacitor in the thermodynamic diagram and the target thermal force value corresponding to each capacitor.
3. The method of claim 1, wherein the determining a target region and a first position of the target region in the thermodynamic diagram for which a thermal value in the thermodynamic diagram is greater than a first threshold and a region size is greater than a second threshold comprises:
determining pixel points where the centroids of the target areas corresponding to the first positions are located as target pixel points;
determining the corresponding position of the target pixel point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen;
and determining the corresponding position of the target pixel point in the capacitive touch screen as the second position.
4. The method of claim 1, wherein the determining a target region and a first position of the target region in the thermodynamic diagram for which a thermal value in the thermodynamic diagram is greater than a first threshold and a region size is greater than a second threshold comprises:
inputting the thermodynamic diagram into a target recognition model to acquire the target region included in the thermodynamic diagram output by the target recognition model and the first position of the target region in the thermodynamic diagram.
5. The method of claim 4, further comprising:
acquiring a sample training data set, wherein the sample training data set comprises a sample thermodynamic diagram, the sample thermodynamic diagram comprises a labeling area corresponding to a sample touch point, and a third position of the labeling area in the sample thermodynamic diagram;
inputting the sample thermodynamic diagram into an initial target recognition model to obtain a prediction region included in the sample thermodynamic diagram and a fourth position of the prediction region in the sample thermodynamic diagram;
determining a loss value based on a difference between the third location and the fourth location;
and correcting the initial target recognition model according to the loss value to obtain the target recognition model.
6. The method of claim 5, wherein the sample thermodynamic diagram includes at least one of:
one or more sample touch points;
sample touch points corresponding to different contact areas; and
and sample touch points corresponding to different touch pressure values.
7. An apparatus for determining a touch position, the apparatus comprising:
the touch control device comprises a first determining module, a second determining module and a control module, wherein the first determining module is used for responding to the detection that the capacitive touch screen is touched and determining the current capacitance value of each capacitor in a capacitor array of the capacitive touch screen;
the generating module is used for generating a thermodynamic diagram corresponding to the capacitor array according to the current capacitance value of each capacitor in the capacitor array;
the acquisition module is used for determining a target area corresponding to the thermodynamic diagram, wherein the heat value of the thermodynamic diagram is greater than a first threshold, and the area size of the target area is greater than a second threshold, and a first position of the target area in the thermodynamic diagram;
and the second determining module is used for determining a second position of the touch point in the capacitive touch screen according to the mapping relation between the thermodynamic diagram and the capacitive touch screen and the first position.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the method for determining a touch location according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for determining a touch location according to any one of claims 1 to 6.
10. A computer program product, characterized in that it comprises a computer program which, when being executed by a processor, carries out the steps of a method for determining a touch position according to any one of claims 1-6.
CN202211601223.4A 2022-12-13 2022-12-13 Touch position determination method and device, electronic equipment and storage medium Pending CN115904139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211601223.4A CN115904139A (en) 2022-12-13 2022-12-13 Touch position determination method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211601223.4A CN115904139A (en) 2022-12-13 2022-12-13 Touch position determination method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115904139A true CN115904139A (en) 2023-04-04

Family

ID=86487980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211601223.4A Pending CN115904139A (en) 2022-12-13 2022-12-13 Touch position determination method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115904139A (en)

Similar Documents

Publication Publication Date Title
US7982723B2 (en) Multiple touch location in a three dimensional touch screen sensor
CN102722285B (en) Method and system for eliminating deformation noise in detection data of touch detection device
TWI533166B (en) Method of identifying touch object
US20080100586A1 (en) Method and system for calibrating a touch screen
TW201820206A (en) Method and device for fingerprint recognition
US20150153901A1 (en) Scan method for a capacitive touch panel
WO2019223461A1 (en) Touch detection method and computer-readable storage medium
US20120249448A1 (en) Method of identifying a gesture and device using the same
US9684407B2 (en) Method and apparatus for determining shape and orientation of a touch object on handheld devices
CN110442266B (en) Object recognition method, object recognition device, electronic equipment and storage medium
US10228792B2 (en) Touch determining device and method, and display device
US20120127120A1 (en) Touch device and touch position locating method thereof
CN115904139A (en) Touch position determination method and device, electronic equipment and storage medium
US20120299837A1 (en) Identifying contacts and contact attributes in touch sensor data using spatial and temporal features
JP6349348B2 (en) Disambiguation of clicks on touch-sensitive input devices
US20190250731A1 (en) Electronic device validating multiple finger touch detection through donut shaped touch islands, and related methods
CN116578200A (en) Touch detection method and device, electronic equipment and storage medium
US20230168800A1 (en) Display device, display method, recording medium recording display program
US9152272B2 (en) Multipoint positioning method for touchpad
TWI556144B (en) Method for determining position of touch event on touch panel and computer readable medium
CN112328114B (en) Positioning method and positioning device for touch position and touch display device
US11726608B2 (en) Input detection device, input detection method, and recording medium recording input detection program
KR102078028B1 (en) Touch detection device and method
CN116521016A (en) Baseline updating method and device, electronic equipment and storage medium
KR20220148829A (en) Maintain pressure input path

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination