CN114115690A - Method and device for searching touch screen area, electronic equipment and storage medium - Google Patents

Method and device for searching touch screen area, electronic equipment and storage medium Download PDF

Info

Publication number
CN114115690A
CN114115690A CN202111465763.XA CN202111465763A CN114115690A CN 114115690 A CN114115690 A CN 114115690A CN 202111465763 A CN202111465763 A CN 202111465763A CN 114115690 A CN114115690 A CN 114115690A
Authority
CN
China
Prior art keywords
data
screen data
area
threshold
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
CN202111465763.XA
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.)
Chipone Technology Beijing Co Ltd
Original Assignee
Chipone Technology Beijing 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 Chipone Technology Beijing Co Ltd filed Critical Chipone Technology Beijing Co Ltd
Priority to CN202111465763.XA priority Critical patent/CN114115690A/en
Publication of CN114115690A publication Critical patent/CN114115690A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0412Digitisers structurally integrated in a display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The disclosure relates to a method and an apparatus for searching a touch screen area, an electronic device and a storage medium. The method comprises the following steps: acquiring screen data of a first frame; processing the screen data through at least one iteration round, and determining a target threshold corresponding to a first frame; and determining the area corresponding to the data larger than the target threshold value in the screen data as a touch screen area. Through the method and the device, the target threshold values corresponding to different frames can be dynamically calculated, so that the target threshold values are more suitable for the current working environment, and accurate touch screen areas can be obtained under different working environments.

Description

Method and device for searching touch screen area, 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 searching a touch screen area, an electronic device, and a storage medium.
Background
A touch screen (also called a touch screen) has become the most important input component of electronic devices, especially mobile electronic devices, taking a capacitive touch screen as an example, when a user touches a screen of the touch screen, a capacitance change is caused, so that by detecting the capacitance change caused by the user touching the screen of the touch screen, an area touched by the user, that is, a touch screen area, is determined.
In the related art, usually, a peak point (peak point) is used as a starting point, and points at which the change amount (for example, the DIFF value) of the capacitance value of the touch screen exceeds a preset threshold value are searched all around, and the points form a touch screen area; the value of the preset threshold is determined in an early debugging stage of the touch screen, and after the debugging is finished, the value of the preset threshold is fixed and is not changed any more in the working process of the touch screen; however, when the working environment is different from the debugging environment, the touch screen region cannot be accurately determined based on the preset threshold, for example, in the debugging stage, the preset threshold is determined when the electronic device is not connected to the charger; in the user use stage, when the electronic device works under the condition of being connected with the charger, the electronic device is influenced by factors such as temperature, the DIFF values of all points acquired by the touch screen are different from those acquired in the debugging stage under the same condition, and the preset threshold is not applicable any more.
Disclosure of Invention
In view of the above, the present disclosure provides a method and an apparatus for searching for a touch screen area, an electronic device, and a storage medium.
According to an aspect of the present disclosure, there is provided a method of searching for a touch screen area, the method including:
acquiring screen data of a first frame;
processing the screen data through at least one iteration round to determine a target threshold corresponding to the first frame;
and determining the area corresponding to the data larger than the target threshold value in the screen data as a touch screen area.
In one possible implementation, the determining the target threshold corresponding to the first frame by processing the screen data through at least one iteration round includes:
in each iteration round, the threshold determined in the previous iteration round is updated according to the screen data to determine a target threshold corresponding to the first frame.
In one possible implementation, the determining the target threshold corresponding to the first frame by processing the screen data through at least one iteration round includes:
dividing the screen data into data corresponding to a first area and data corresponding to a second area according to an initial threshold;
obtaining a first average value of data corresponding to the first area and a second average value of data corresponding to the second area;
determining a threshold corresponding to the current iteration round according to the first average value and the second average value;
updating the initial threshold according to the threshold corresponding to the current iteration round;
and according to the updated initial threshold, repeatedly executing the operations of dividing the screen data into data corresponding to the first area and data corresponding to the second area and the subsequent operations until a preset iteration condition is met, and taking the threshold corresponding to the current iteration round when the preset iteration condition is met as the target threshold.
In one possible implementation, the method further includes: and determining the initial threshold according to the screen data.
In a possible implementation manner, the determining a threshold corresponding to a current iteration round according to the first mean value and the second mean value includes:
and determining the average value of the first average value and the second average value as a threshold value corresponding to the current iteration round.
In one possible implementation manner, the preset iteration condition includes:
and the difference value between the threshold corresponding to the current iteration round and the threshold corresponding to the last iteration round is not greater than a preset value.
In one possible implementation, the determining the initial threshold according to the screen data includes:
determining a maximum value and a minimum value in the screen data;
and determining the average value of the maximum value and the minimum value as the initial threshold value.
In a possible implementation manner, the dividing the screen data into data corresponding to a first area and data corresponding to a second area according to an initial threshold includes:
determining data larger than the initial threshold value in the screen data as data corresponding to the second area;
and determining the data which is not greater than the initial threshold value in the screen data as the data corresponding to the first area.
In a possible implementation manner, the screen data includes any one of capacitive touch screen data, resistive touch screen data, surface acoustic wave touch screen data, infrared touch screen data, ultrasonic touch screen data, and optical image touch screen data.
According to another aspect of the present disclosure, there is provided an apparatus for searching for a touch screen area, the apparatus including: the device comprises a first module, a second module and a third module, wherein the first module is used for acquiring screen data of a first frame; a second module, configured to process the screen data through at least one iteration round, and determine a target threshold corresponding to the first frame; and determining the area corresponding to the data larger than the target threshold value in the screen data as a touch screen area.
In a possible implementation manner, the second module is further configured to: in each iteration round, the threshold determined in the previous iteration round is updated according to the screen data to determine a target threshold corresponding to the first frame.
In a possible implementation manner, the second module is further configured to: dividing the screen data into data corresponding to a first area and data corresponding to a second area according to an initial threshold; obtaining a first average value of data corresponding to the first area and a second average value of data corresponding to the second area; determining a threshold corresponding to the current iteration round according to the first average value and the second average value; updating the initial threshold according to the threshold corresponding to the current iteration round; and according to the updated initial threshold, repeatedly executing the operations of dividing the screen data into data corresponding to the first area and data corresponding to the second area and the subsequent operations until a preset iteration condition is met, and taking the threshold corresponding to the current iteration round when the preset iteration condition is met as the target threshold.
In a possible implementation manner, the second module is further configured to: and determining the initial threshold according to the screen data.
In a possible implementation manner, the second module is further configured to: and determining the average value of the first average value and the second average value as a threshold value corresponding to the current iteration round.
In one possible implementation manner, the preset iteration condition includes: and the difference value between the threshold corresponding to the current iteration round and the threshold corresponding to the last iteration round is not greater than a preset value.
In a possible implementation manner, the second module is further configured to: determining a maximum value and a minimum value in the screen data; and determining the average value of the maximum value and the minimum value as the initial threshold value.
In a possible implementation manner, the second module is further configured to: determining data larger than the initial threshold value in the screen data as data corresponding to the second area; and determining the data which is not greater than the initial threshold value in the screen data as the data corresponding to the first area.
In a possible implementation manner, the screen data includes any one of capacitive touch screen data, resistive touch screen data, surface acoustic wave touch screen data, infrared touch screen data, ultrasonic touch screen data, and optical image touch screen data.
According to another aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
Considering that different working environments of the touch screen exist at different times, for example, the temperature, the humidity, the pressure and the like may be different, and different substances such as oil stains, sweat stains, water vapor and the like may also remain on the surface of the touch screen; under different working environments, a user touches the same area of the touch screen, and screen data (such as DIFF values) of each point collected by the touch screen are different; in the related technology, under different working environments, the touch screen area of each frame is determined by adopting a preset threshold value determined in an early debugging stage and screen data of each point collected in real time, so that the touch screen area can be accurately determined only when the working environment is the same as that in the early debugging stage; and the deviation exists between the touch screen area determined under other working environments and the area where the user actually touches the touch screen.
In the embodiment of the disclosure, in consideration of the continuous change of the working environment, the screen data of the first frame is processed through at least one iteration round, and the target threshold corresponding to the first frame is determined, so that the target thresholds corresponding to different frames can be dynamically calculated, and the target thresholds are more suitable for the current working environment; and then, the area corresponding to the data of the first frame, which is larger than the target threshold corresponding to the first frame, in the screen data of the first frame can be determined as the touch screen area, so that the accurate touch screen area can be obtained under different working environments.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flowchart of a method of searching for a touch screen area according to an embodiment of the present disclosure.
Fig. 2 illustrates a schematic diagram of screen data of a first frame according to an embodiment of the present disclosure.
FIG. 3 shows a flowchart of a method of searching for a touch screen area according to an embodiment of the present disclosure.
Fig. 4 shows a schematic diagram of the first region and the second region divided according to an embodiment of the disclosure.
FIG. 5 shows a block diagram of an apparatus for searching for a touch screen area according to an embodiment of the present disclosure.
Fig. 6 shows a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flowchart of a method of searching for a touch screen area according to an embodiment of the present disclosure. Illustratively, the method may be performed by a processor, for example, a central processor of the electronic device, or a separate processor configured to the electronic device for controlling the touch screen. As shown in fig. 1, the method may include steps 101 to 103.
Step 101: screen data of a first frame is acquired.
In the working process of the touch screen, the processor can acquire multi-frame screen data according to the touch sampling rate of the touch screen; the screen data of the first frame is the screen data of any one frame in the multi-frame screen data, for example, the touch sampling rate of the touch screen is 120Hz, that is, 120 frames of screen data can be generated per second, and the processor can acquire 120 frames of screen data per second and perform the following processing for each frame of screen data.
For example, the processor may monitor a touch screen operation of a user and acquire screen data of a first frame in case of monitoring the touch screen operation.
Illustratively, the touch screen may be a capacitive touch screen, a resistive touch screen, a surface acoustic wave touch screen, an infrared touch screen, an ultrasonic touch screen, an optical imaging touch screen, or the like. The screen data of the first frame may include any one of capacitive touch screen data, resistive touch screen data, surface acoustic wave touch screen data, infrared touch screen data, ultrasonic touch screen data, and optical image touch screen data. For convenience of description, the touch screen is taken as a capacitive touch screen as an example, the capacitive touch screen may include a plurality of capacitive sensing points, and the screen data may include a change amount (e.g., DIFF value) of a capacitance value of each capacitive sensing point, that is, a difference between the capacitance value of the current capacitive sensing point and a reference capacitance value. For example, fig. 2 is a schematic diagram of screen data of a first frame according to an embodiment of the present disclosure, the screen data shown in fig. 2 is data collected by a capacitive touch screen configured with 18 × 32 physical capacitive touch sensors, the 18 × 32 sensors are staggered with each other to form 18 × 32 capacitive sensing points, when a user's finger or the like approaches the capacitive touch screen, a coupling capacitance is formed between the user and the surface of the touch screen due to an electric field of a human body, and for a high-frequency current, the capacitance is a direct conductor, so that the finger draws a small current from a contact point, and a value of the corresponding capacitive sensing point changes accordingly; as shown in fig. 2, the DIFF values corresponding to 18 × 32 capacitive sensing points form a matrix with 18 columns and 32 rows, and the DIFF values in the matrix are the screen data of the first frame.
Step 102: and processing the screen data through at least one iteration round to determine a target threshold corresponding to the first frame.
In the step, the processor processes the acquired screen data of the first frame, and determines a target threshold corresponding to the first frame, wherein the target threshold can be effectively applicable to the current working environment; in this way, the processor can dynamically calculate the target threshold corresponding to different frames by processing the screen data of each frame. For example, after processing through each iteration round, a threshold corresponding to the iteration round may be obtained, and the threshold obtained in the last iteration round may be used as a target threshold corresponding to the first frame. The last iteration round can be a corresponding iteration round when a preset iteration number is reached; or the corresponding iteration round when the iteration termination condition is triggered.
In one possible implementation, the processor may determine the target threshold corresponding to the first frame through one iteration round. Illustratively, after the processor processes the screen data of the first frame through a first iteration round, and the obtained threshold meets the requirement, the processor takes the threshold as a target threshold, so that the target threshold corresponding to the first frame can be determined through one iteration round.
In one possible implementation, the processor may determine the target threshold corresponding to the first frame through a plurality of iteration rounds. Illustratively, in each iteration round, the threshold value determined in the previous iteration round is updated according to the screen data of the first frame to determine the target threshold value corresponding to the first frame. In this way, the threshold corresponding to the multiple iteration rounds is obtained through the processing of the multiple iteration rounds, and then the threshold obtained in the last iteration round is used as the target threshold corresponding to the first frame.
Step 103: and determining the area corresponding to the data larger than the target threshold value in the screen data as a touch screen area.
For example, for a single-touch screen, one touch screen area may be determined, and for a multi-touch screen, multiple touch screen areas may be determined.
For example, based on the obtained target threshold of the first frame, data larger than the target threshold is selected from the acquired screen data of the first frame, and an area corresponding to the selected data is determined as a touch screen area of the first frame. The target threshold value can be effectively suitable for the current working environment; the area corresponding to the data larger than the target threshold value in the screen data of the first frame is determined as the touch screen area, so that the target threshold values corresponding to different frames are obtained based on dynamic calculation, and the touch screen area of each frame is determined, and accurate touch screen areas can be obtained under different working environments.
As described above, in the related art, in different working environments, the touch screen area of each frame is determined by using the preset threshold determined in the early debugging stage and the screen data of each point collected in real time; at different times, the working environment of the touch screen changes, and when a user touches the same area of the touch screen, the capacitance values of the points collected by the touch screen change differently, for example, when the user touches the same area of the touch screen during charging and during non-charging, the DIFF values of the points collected by the touch screen are different; for another example, when the surface of the touch screen has moisture and the surface is dry, the user touches the same area of the touch screen, and DIFF values of points collected by the touch screen are different. Therefore, due to the fact that the working environment changes constantly, the accuracy of the determined touch screen area of each frame cannot be guaranteed due to the fact that the unified preset threshold value is adopted for different frames.
Different from the mode of determining the touch screen area of each frame by adopting the preset threshold determined in the early debugging stage and the screen data of each frame in the related technology, in the embodiment of the disclosure, the screen data of the first frame is processed by at least one iteration round, and the target threshold corresponding to the first frame is determined, so that the target thresholds corresponding to different frames can be dynamically calculated, and the target thresholds are more suitable for the current working environment; and then, the area corresponding to the data of the first frame, which is larger than the target threshold corresponding to the first frame, in the screen data of the first frame can be determined as the touch screen area, so that the accurate touch screen area can be obtained under different working environments.
The following describes in detail the process of processing the screen data of the first frame through at least one iteration round in step 102 to determine the target threshold corresponding to the first frame.
FIG. 3 shows a flowchart of a method of searching for a touch screen area according to an embodiment of the present disclosure. As shown in fig. 3, the method may include steps 301 to 305.
Step 301: and dividing the screen data into data corresponding to the first area and data corresponding to the second area according to the initial threshold value.
The value of the initial threshold may be preset or randomly determined. In one possible implementation, the initial threshold may be determined according to the screen data of the first frame, so as to reduce the number of iteration rounds and improve the processing efficiency. For example, the processor may determine a maximum value and a minimum value in the screen data of the first frame, and determine an average value of the maximum value and the minimum value as the initial threshold value. For example, in the above-described screen data shown in fig. 2, the maximum DIFF value is 640, the minimum DIFF value is 0, and the average of the maximum DIFF value and the minimum DIFF value is calculated to be 320, that is, the initial threshold value is 320.
For example, the screen of the touch screen may be divided into a first area (background area) and a second area (non-background area) according to the size of the DIFF value of each capacitive sensing point relative to the initial threshold, and each of the first area and the second area may include several capacitive sensing points.
For example, data greater than an initial threshold value in the screen data of the first frame may be determined as data corresponding to the second region; and determining the data which is not more than the initial threshold value in the screen data of the first frame as the data corresponding to the first area. For example, in the screen data shown in fig. 2, the capacitance sensing points with DIFF values greater than 320 form a second area, and the DIFF values corresponding to the capacitance sensing points are data corresponding to the second area; the capacitor sensing points with the DIFF value not more than 320 form a first area, and the DIFF values corresponding to the capacitor sensing points are data corresponding to the first area.
The capacitance induction points included in the first area and the second area may be adjacent or not adjacent; for example, for a touch screen with a single-point touch function, when a finger of a user touches a certain position of the screen, at this time, DIFF values of a plurality of capacitive sensing points near the certain position are large, and the corresponding second area includes a plurality of capacitive sensing points adjacent to the certain position; for the multi-touch screen, when a plurality of fingers of a user touch different positions of the screen, at the moment, DIFF values of a plurality of capacitance sensing points near the positions are large, and the corresponding second area comprises a plurality of capacitance sensing points adjacent to the positions. FIG. 4 shows a schematic diagram of a first region and a second region divided according to an embodiment of the disclosure; as shown in fig. 4, the screen data in fig. 2 is divided into data corresponding to a first area 401 and data corresponding to a second area 402 by using an initial threshold, that is, the screen of the touch screen is divided into the first area 401 and the second area 402.
Step 302: and calculating a first average value of the data corresponding to the first area and a second average value of the data corresponding to the second area.
For example, the processor may average all data in the data corresponding to the first region to obtain a first average value, and average all data in the data corresponding to the second region to obtain a second average value.
Step 303: and determining a threshold corresponding to the current iteration round according to the first average value and the second average value.
Wherein the current iteration round may be any one of the at least one iteration round; for example, the current iteration round is the first iteration round.
For example, the average value of the first average value and the second average value may be determined as a threshold corresponding to the current iteration round.
Step 304: and updating the initial threshold according to the threshold corresponding to the current iteration round.
Step 305: and according to the updated initial threshold, repeatedly executing the operations of dividing the screen data into data corresponding to the first area and data corresponding to the second area and the subsequent operations until a preset iteration condition is met, and taking the threshold corresponding to the current iteration round when the preset iteration condition is met as the target threshold.
In this step, after determining the threshold corresponding to the current iteration round, the processor determines whether a preset iteration condition is met, and if the preset iteration condition is not met, the processor executes the processing of the next iteration round by using the updated initial threshold, that is, repeatedly executes steps 302 to 305; and after each iteration round is executed, judging whether a preset iteration condition is met or not, terminating the iteration processing until the preset iteration condition is met, and taking the threshold corresponding to the last iteration round as a target threshold.
For example, the preset iteration condition may be a preset value obtained by the number of iteration rounds, where the preset value may be set according to actual requirements, and is not limited herein.
For example, the preset iteration condition may be that a difference between a threshold corresponding to the current iteration round and a threshold corresponding to the last iteration round is not greater than a preset value. The difference may be an absolute value of a difference obtained by subtracting a threshold corresponding to a previous iteration from a threshold corresponding to a current iteration. The preset value can be set according to actual requirements, and is not limited. As an example, the preset value may be zero, that is, the preset iteration condition is that the threshold corresponding to the current iteration round is equal to the threshold corresponding to the previous iteration round. In this way, the processor can compare the threshold obtained after each iteration round with the threshold obtained in the previous iteration round, and under the condition that the two thresholds are equal, the processor can determine that the threshold meeting the requirement is found, and then terminate the iteration process; if the two are not equal, the above step 302 may be returned to, and the iterative processing is continued until the threshold corresponding to the current iteration round is equal to the threshold corresponding to the previous iteration round.
It should be noted that, although the method for searching for a touch screen area is described above by taking the above-mentioned embodiment as an example, those skilled in the art can understand that the disclosure should not be limited thereto. In fact, each implementation mode can be flexibly set according to the actual application scene as long as the technical scheme of the present disclosure is met.
In this way, in the embodiment of the present disclosure, the screen data is divided into data corresponding to the first area and data corresponding to the second area according to the initial threshold; obtaining a first average value of data corresponding to the first area and a second average value of data corresponding to the second area; determining a threshold corresponding to the current iteration round according to the first average value and the second average value; updating an initial threshold according to a threshold corresponding to the current iteration round; according to the updated initial threshold, repeatedly executing the operations of dividing the screen data into data corresponding to the first area and data corresponding to the second area and the subsequent operations until a preset iteration condition is met, and taking the threshold corresponding to the current iteration round when the preset iteration condition is met as a target threshold corresponding to the first frame, so that target thresholds corresponding to different frames can be dynamically calculated, and the target thresholds are more suitable for the current working environment; and then, the area corresponding to the data of the first frame, which is larger than the target threshold corresponding to the first frame, in the screen data of the first frame can be determined as the touch screen area, so that the accurate touch screen area can be obtained under different working environments.
Based on the same concept, the embodiment of the disclosure also provides a device for searching for a touch screen area.
It is understood that, in order to implement the above functions, the apparatus for searching for a touch screen area provided by the embodiments of the present disclosure includes a hardware structure and/or a software module for performing each function. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
FIG. 5 shows a block diagram of an apparatus for searching for a touch screen area according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus may include: a first module 501, configured to obtain screen data of a first frame; a second module 502, configured to process the screen data through at least one iteration round, and determine a target threshold corresponding to the first frame; and determining the area corresponding to the data larger than the target threshold value in the screen data as a touch screen area.
In a possible implementation manner, the second module 502 is configured to, in each iteration round, update the threshold value determined in the previous iteration round according to the screen data to determine the target threshold value corresponding to the first frame.
In a possible implementation manner, the second module 502 is further configured to: dividing the screen data into data corresponding to a first area and data corresponding to a second area according to an initial threshold; obtaining a first average value of data corresponding to the first area and a second average value of data corresponding to the second area; determining a threshold corresponding to the current iteration round according to the first average value and the second average value; updating the initial threshold according to the threshold corresponding to the current iteration round; and according to the updated initial threshold, repeatedly executing the operations of dividing the screen data into data corresponding to the first area and data corresponding to the second area and the subsequent operations until a preset iteration condition is met, and taking the threshold corresponding to the current iteration round when the preset iteration condition is met as the target threshold.
In a possible implementation manner, the second module 502 is further configured to: and determining the initial threshold according to the screen data.
In a possible implementation manner, the second module 502 is further configured to: and determining the average value of the first average value and the second average value as a threshold value corresponding to the current iteration round.
In one possible implementation manner, the preset iteration condition includes: and the difference value between the threshold corresponding to the current iteration round and the threshold corresponding to the last iteration round is not greater than a preset value.
In a possible implementation manner, the second module 502 is further configured to: determining a maximum value and a minimum value in the screen data; and determining the average value of the maximum value and the minimum value as the initial threshold value.
In a possible implementation manner, the second module 502 is further configured to: determining data larger than the initial threshold value in the screen data as data corresponding to the second area; and determining the data which is not greater than the initial threshold value in the screen data as the data corresponding to the first area.
In a possible implementation manner, the screen data includes any one of capacitive touch screen data, resistive touch screen data, surface acoustic wave touch screen data, infrared touch screen data, ultrasonic touch screen data, and optical image touch screen data.
It should be noted that, although the above embodiments are described as examples of the apparatus for searching for a touch screen area, those skilled in the art can understand that the disclosure should not be limited thereto. In fact, the user can flexibly set each implementation mode according to personal preference and/or actual application scene, as long as the technical scheme of the disclosure is met.
In this way, in the embodiment of the present disclosure, the screen data of the first frame is processed through at least one iteration round, and the target threshold corresponding to the first frame is determined, so that the target thresholds corresponding to different frames can be dynamically calculated, and the target thresholds are more suitable for the current working environment; and then, the area corresponding to the data of the first frame, which is larger than the target threshold corresponding to the first frame, in the screen data of the first frame can be determined as the touch screen area, so that the accurate touch screen area can be obtained under different working environments.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above method.
Fig. 6 shows a schematic structural diagram of an electronic device 800 according to an embodiment of the present disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method. Illustratively, the computer program instructions described above may be executable by the processor 820 of the electronic device 800 to perform the methods described above.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (20)

1. A method of searching for a touch screen area, comprising:
acquiring screen data of a first frame;
processing the screen data through at least one iteration round to determine a target threshold corresponding to the first frame;
and determining the area corresponding to the data larger than the target threshold value in the screen data as a touch screen area.
2. The method of claim 1, wherein said processing the screen data through at least one iterative pass to determine a target threshold for the first frame comprises:
in each iteration round, the threshold determined in the previous iteration round is updated according to the screen data to determine a target threshold corresponding to the first frame.
3. The method of claim 1 or 2, wherein said processing said screen data through at least one iteration pass to determine a target threshold for said first frame comprises:
dividing the screen data into data corresponding to a first area and data corresponding to a second area according to an initial threshold;
obtaining a first average value of data corresponding to the first area and a second average value of data corresponding to the second area;
determining a threshold corresponding to the current iteration round according to the first average value and the second average value;
updating the initial threshold according to the threshold corresponding to the current iteration round;
and according to the updated initial threshold, repeatedly executing the operations of dividing the screen data into data corresponding to the first area and data corresponding to the second area and the subsequent operations until a preset iteration condition is met, and taking the threshold corresponding to the current iteration round when the preset iteration condition is met as the target threshold.
4. The method of claim 3, further comprising: and determining the initial threshold according to the screen data.
5. The method according to claim 3 or 4, wherein the determining the threshold corresponding to the current iteration round according to the first mean value and the second mean value comprises:
and determining the average value of the first average value and the second average value as a threshold value corresponding to the current iteration round.
6. The method according to any of claims 3-5, wherein the preset iteration condition comprises:
and the difference value between the threshold corresponding to the current iteration round and the threshold corresponding to the last iteration round is not greater than a preset value.
7. The method of claim 4, wherein determining the initial threshold value from the screen data comprises:
determining a maximum value and a minimum value in the screen data;
and determining the average value of the maximum value and the minimum value as the initial threshold value.
8. The method of claim 3, wherein the dividing the screen data into data corresponding to a first region and data corresponding to a second region according to an initial threshold comprises:
determining data larger than the initial threshold value in the screen data as data corresponding to the second area;
and determining the data which is not greater than the initial threshold value in the screen data as the data corresponding to the first area.
9. The method of claim 1, wherein the screen data comprises any one of capacitive touch screen data, resistive touch screen data, surface acoustic wave touch screen data, infrared touch screen data, ultrasonic touch screen data, and optical imaging touch screen data.
10. An apparatus for searching for a touch screen area, comprising:
the device comprises a first module, a second module and a third module, wherein the first module is used for acquiring screen data of a first frame;
a second module, configured to process the screen data through at least one iteration round, and determine a target threshold corresponding to the first frame; and determining the area corresponding to the data larger than the target threshold value in the screen data as a touch screen area.
11. The apparatus of claim 10, wherein the second module is further configured to: in each iteration round, the threshold determined in the previous iteration round is updated according to the screen data to determine a target threshold corresponding to the first frame.
12. The apparatus of claim 10 or 11, wherein the second module is further configured to: dividing the screen data into data corresponding to a first area and data corresponding to a second area according to an initial threshold; obtaining a first average value of data corresponding to the first area and a second average value of data corresponding to the second area; determining a threshold corresponding to the current iteration round according to the first average value and the second average value; updating the initial threshold according to the threshold corresponding to the current iteration round; and according to the updated initial threshold, repeatedly executing the operations of dividing the screen data into data corresponding to the first area and data corresponding to the second area and the subsequent operations until a preset iteration condition is met, and taking the threshold corresponding to the current iteration round when the preset iteration condition is met as the target threshold.
13. The apparatus of claim 12, wherein the second module is further configured to: and determining the initial threshold according to the screen data.
14. The apparatus of claim 12 or 13, wherein the second module is further configured to: and determining the average value of the first average value and the second average value as a threshold value corresponding to the current iteration round.
15. The apparatus according to any of claims 12-14, wherein the preset iteration condition comprises: and the difference value between the threshold corresponding to the current iteration round and the threshold corresponding to the last iteration round is not greater than a preset value.
16. The apparatus of claim 13, wherein the second module is further configured to: determining a maximum value and a minimum value in the screen data; and determining the average value of the maximum value and the minimum value as the initial threshold value.
17. The apparatus of claim 12, wherein the second module is further configured to: determining data larger than the initial threshold value in the screen data as data corresponding to the second area; and determining the data which is not greater than the initial threshold value in the screen data as the data corresponding to the first area.
18. The apparatus of claim 10, wherein the screen data comprises any one of capacitive touch screen data, resistive touch screen data, surface acoustic wave touch screen data, infrared touch screen data, ultrasonic touch screen data, and optical imaging touch screen data.
19. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any one of claims 1 to 9 when executing the memory-stored executable instructions.
20. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method of any one of claims 1 to 9.
CN202111465763.XA 2021-12-03 2021-12-03 Method and device for searching touch screen area, electronic equipment and storage medium Pending CN114115690A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111465763.XA CN114115690A (en) 2021-12-03 2021-12-03 Method and device for searching touch screen area, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111465763.XA CN114115690A (en) 2021-12-03 2021-12-03 Method and device for searching touch screen area, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114115690A true CN114115690A (en) 2022-03-01

Family

ID=80366093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111465763.XA Pending CN114115690A (en) 2021-12-03 2021-12-03 Method and device for searching touch screen area, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114115690A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155433A (en) * 2015-04-03 2016-11-23 上海炬力集成电路设计有限公司 The method of a kind of capacitance plate point position recognition and tracking and device thereof
CN106527783A (en) * 2015-09-15 2017-03-22 晨星半导体股份有限公司 Method for adaptively adjusting touch threshold and related controller
CN108073329A (en) * 2018-01-31 2018-05-25 北京集创北方科技股份有限公司 Touch device and its driving method and terminal
CN110658935A (en) * 2018-06-29 2020-01-07 京东方科技集团股份有限公司 Data detection method and device, storage medium and touch device
CN110703947A (en) * 2019-09-30 2020-01-17 Oppo(重庆)智能科技有限公司 Touch screen correction method and device, electronic equipment and storage medium
CN111766980A (en) * 2020-06-29 2020-10-13 北京集创北方科技股份有限公司 Identification method and device, electronic equipment and storage medium
CN113253878A (en) * 2021-06-25 2021-08-13 深圳小米通讯技术有限公司 Touch screen report point determining method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155433A (en) * 2015-04-03 2016-11-23 上海炬力集成电路设计有限公司 The method of a kind of capacitance plate point position recognition and tracking and device thereof
CN106527783A (en) * 2015-09-15 2017-03-22 晨星半导体股份有限公司 Method for adaptively adjusting touch threshold and related controller
CN108073329A (en) * 2018-01-31 2018-05-25 北京集创北方科技股份有限公司 Touch device and its driving method and terminal
CN110658935A (en) * 2018-06-29 2020-01-07 京东方科技集团股份有限公司 Data detection method and device, storage medium and touch device
CN110703947A (en) * 2019-09-30 2020-01-17 Oppo(重庆)智能科技有限公司 Touch screen correction method and device, electronic equipment and storage medium
CN111766980A (en) * 2020-06-29 2020-10-13 北京集创北方科技股份有限公司 Identification method and device, electronic equipment and storage medium
CN113253878A (en) * 2021-06-25 2021-08-13 深圳小米通讯技术有限公司 Touch screen report point determining method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20210326587A1 (en) Human face and hand association detecting method and a device, and storage medium
CN107692997B (en) Heart rate detection method and device
EP3043293A1 (en) Method and device for realizing touch button and fingerprint identification, and terminal device
EP3046016A1 (en) Method and apparatus for switching display mode
CN110569777B (en) Image processing method and device, electronic device and storage medium
CN107102772B (en) Touch control method and device
CN106484284B (en) Method and device for switching single-hand mode
EP3232301B1 (en) Mobile terminal and virtual key processing method
CN109522937B (en) Image processing method and device, electronic equipment and storage medium
CN112328090B (en) Gesture recognition method and device, electronic equipment and storage medium
CN107402711B (en) Volume adjusting method and device and computer readable storage medium
EP3509012B1 (en) Fingerprint recognition method and device
CN105511777B (en) Session display method and device on touch display screen
CN111597029A (en) Data processing method and device, electronic equipment and storage medium
CN113807253A (en) Face recognition method and device, electronic equipment and storage medium
EP3035172A1 (en) Method and device for activating operation state of mobile terminal
CN109144317B (en) Screen gesture detection method and device
CN110955800A (en) Video retrieval method and device
CN111694571B (en) Compiling method and device
CN108874450B (en) Method and device for waking up voice assistant
CN106990893B (en) Touch screen operation processing method and device
CN107844257B (en) Information display method, device, terminal and storage medium
CN114115690A (en) Method and device for searching touch screen area, electronic equipment and storage medium
CN114005124A (en) Sampling method and device, electronic equipment and storage medium
US20160195992A1 (en) Mobile terminal and method for processing signals generated from touching virtual keys

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