A Method for Edge Error Compensation of a Capacitive Touch Screen with Pixel Linkage
By receiving calibration instructions in the capacitive touch screen, obtaining capacitive sensing points and calculating resolution interpolation coefficients, generating pixel images and calibration equations, correcting the screen coordinate system, solving the problem of time-consuming calibration of edge errors of capacitive touch screens, and achieving efficient error compensation.
Patent Information
- Application Number
- CN202411115430.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-08-14
AI Technical Summary
The prior art requires the collection of a large number of calibration points and calculation of calibration compensation coefficients when calibrating the edge area of the capacitive touch screen, resulting in slow computing speed and high computing power consumption.
By receiving touch edge calibration instructions, multiple capacitive sensing points are obtained based on the capacitive sensing unit, the data processing unit is used to import the physical sensing coordinate system, the resolution interpolation coefficient is calculated and the screen pixel coordinates are generated, the set of points to be detected is obtained, the pixel image is generated based on the identification matrix, the pressure signal is received, and the calibration equation is constructed, and the initial screen coordinate system is corrected to compensate for edge errors.
The edge error calibration steps of capacitive touch screen are simplified, the calculation amount is reduced, the calculation speed and the accuracy of pressure signals are improved, and the error compensation effect is optimized.
Smart Images

Figure CN119088245B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for compensating edge errors of a capacitive touch screen with pixel linkage, belonging to the technical field of touch screen calibration. Background Art
[0002] With the continuous development of science and technology, touch screens have been widely used and have extremely high development potential. However, during the use of capacitive touch screens, especially in the edge area, the problem of inaccurate touch is very likely to occur.
[0003] Currently, the calibration method of touch screens is mainly that the tester continuously touches the edge area multiple times and calibrates according to the error of each touch.
[0004] Although the above materials can be calibrated, when compensating for edge errors, it is necessary to collect a large number of calibration points, and a calibration compensation coefficient is calculated for each calibration point, which requires a large amount of computing power and the operation speed needs to be improved. Summary of the Invention
[0005] The present invention provides a method, device and computer-readable storage medium for compensating edge errors of a capacitive touch screen with pixel linkage, and its main purpose is to simplify the steps of calibrating the edge errors of a capacitive touch screen using an image.
[0006] To achieve the above object, a method for compensating edge errors of a capacitive touch screen with pixel linkage provided by the present invention includes:
[0007] Receiving a touch edge calibration instruction, and starting the touch screen according to the touch edge calibration instruction, wherein the touch screen includes: a capacitance sensing unit, a data processing unit and a screen display unit;
[0008] Obtaining a plurality of capacitance sensing points based on the capacitance sensing unit, and using the data processing unit to import the plurality of capacitance sensing points into a pre-constructed physical sensing coordinate system to obtain a plurality of physical coordinates, wherein the plurality of capacitance sensing points are composed of (M×N) intersections formed by (M + N) capacitance touch sensors, and the capacitance sensing points correspond to the physical coordinates one by one;
[0009] Obtaining the screen resolution based on the screen display unit, calculating a resolution interpolation coefficient using the screen resolution and the plurality of capacitance sensing points, and generating a plurality of screen pixel coordinates using the resolution interpolation coefficient, the plurality of capacitance sensing points and a pre-constructed initial screen coordinate system;
[0010] Obtaining the sensing area of the display in the screen display unit, and obtaining a plurality of sets of points to be detected according to the sensing area and a preset number of detections, wherein the number of the plurality of sets of points to be detected is equal to the number of detections, and each set of points to be detected includes a plurality of points to be detected;
[0011] Perform the following operations on each of the sets of points to be detected among multiple sets of points to be detected:
[0012] Obtain an identification matrix based on the initial screen coordinate system and the set of points to be detected. Based on the data processing unit and the identification matrix, generate a pixel image on the display of the screen display unit;
[0013] Receive multiple pressure signals from the tester based on the pixel image. After confirming that the number of the multiple pressure signals is consistent with the number of points to be detected in the set of points to be detected, obtain a compressed measurement matrix according to the multiple pressure signals, and extract multiple test point coordinates based on the compressed measurement matrix, where the test point coordinates correspond to the pressure signals one by one;
[0014] Construct a calibration equation according to the multiple test point coordinates and the multiple points to be detected. Based on the calibration equation, correct the multiple screen pixel coordinates in the initial screen coordinate system to obtain a corrected screen coordinate set, and complete the edge error compensation of the capacitive touch screen based on pixel linkage based on the corrected screen coordinate set.
[0015] Optionally, the generating of multiple screen pixel coordinates by using the resolution interpolation coefficient, multiple capacitance sensing points, and the pre-constructed initial screen coordinate system includes:
[0016] Obtain a first horizontal compensation coefficient, a first vertical compensation coefficient, a second horizontal compensation coefficient, and a second vertical compensation coefficient based on the initial screen coordinate system and the physical sensing coordinate system. Calculate multiple screen pixel coordinates based on the resolution interpolation coefficient, multiple capacitance sensing points, the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient, and the second vertical compensation coefficient. The calculation formula for the screen pixel coordinates is as follows:
[0017]
[0018] Among them, (x, y) represents the screen pixel coordinates, x represents the abscissa in the screen pixel coordinates, y represents the ordinate in the screen pixel coordinates, J represents the resolution interpolation coefficient, (G - 1) represents the maximum abscissa value of the screen pixel coordinates in the initial screen coordinate system, (H - 1) represents the maximum ordinate value of the screen pixel coordinates in the initial screen coordinate system, M represents the total number of rows of capacitive sensing points among multiple capacitive sensing points, N represents the total number of columns of capacitive sensing points among multiple capacitive sensing points, a represents the first horizontal compensation coefficient in the horizontal axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, a represents the first vertical compensation coefficient in the vertical axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, c represents the second horizontal compensation coefficient in the horizontal axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, d represents the second vertical compensation coefficient in the vertical axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, p represents the abscissa of the touch point sensed by multiple capacitive sensing points, and q represents the ordinate of the touch point sensed by multiple capacitive sensing points.
[0019] Optionally, obtaining the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient, and the second vertical compensation coefficient based on the initial screen coordinate system and the physical sensing coordinate system includes:
[0020] Using the initial screen coordinate system and the physical sensing coordinate system, calculate the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient, and the second vertical compensation coefficient. The calculation formulas are as follows:
[0021]
[0022]
[0023] Among them, A represents the first edge distance in the horizontal axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, D PX represents the distance between two adjacent abscissas in the physical coordinates, B represents the first edge distance in the vertical axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, D PY represents the distance between two adjacent ordinates in the physical coordinates, C represents the second edge distance in the horizontal axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, and D represents the second edge distance in the vertical axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system.
[0024] Optionally, obtaining multiple sets of points to be detected according to the sensing area and the preset number of detections includes:
[0025] Connect the two diagonals of the sensing area, obtain the four side lines of the sensing area based on the sensing area, use the four side lines of the sensing area as sketch entities, create an equidistant entity at a preset distance inside the sensing area, and divide the sensing area according to the equidistant entity, the four side lines and the two diagonals of the sensing area to obtain a plurality of unit sensing areas, where the plurality of unit sensing areas include four unit sensing areas;
[0026] Obtain the four vertices of the sensing area to obtain a vertex detection set, and copy the vertex detection set to obtain a plurality of vertex detection sets, where the number of vertex detection sets in the plurality of vertex detection sets is equal to the number of detection times;
[0027] Perform the following operations on each vertex detection set in the plurality of vertex detection sets:
[0028] Extract unit sensing areas from the plurality of unit sensing areas in sequence, randomly extract a plurality of unit area detection points in the extracted unit sensing areas, summarize the extracted unit area detection points to obtain a unit detection point set, and summarize the vertex detection set and the unit detection point set to obtain a to-be-detected point set;
[0029] Summarize the to-be-detected point sets to obtain a plurality of to-be-detected point sets corresponding to the number of detection times.
[0030] Optionally, the obtaining the identification matrix based on the initial screen coordinate system and the to-be-detected point set includes:
[0031] Construct a zero matrix according to the initial screen coordinates, where the zero matrix is a zero matrix of G rows and H columns;
[0032] Extract to-be-detected points from the to-be-detected point set in sequence, and perform the following operations on each extracted to-be-detected point:
[0033] Obtain the to-be-detected point coordinates of the extracted to-be-detected point based on the initial screen coordinate system, map the to-be-detected point coordinates to the zero matrix to obtain the initial matrix element positions, and assign the element corresponding to the initial matrix element position to 1;
[0034] After confirming that all the to-be-detected points in the to-be-detected point set have been extracted, obtain the identification matrix.
[0035] Optionally, the generating a pixel image on the display of the screen display unit based on the data processing unit and the identification matrix includes:
[0036] Use the data processing unit to extract the elements in the identification matrix in sequence and judge the extracted elements;
[0037] If the extracted element is 0, assign the extracted element to 255;
[0038] If the extracted element is 1, then assign the value 0 to the extracted element;
[0039] After confirming that all elements in the identification matrix have been assigned values, import the assigned identification matrix into a pre-constructed image coordinate system. Based on the imported image coordinate system with assigned values, generate a pixel image on the display of the screen display unit in the identification matrix.
[0040] Optionally, after receiving a plurality of pressure signals from a tester based on the pixel image and confirming that the number of the plurality of pressure signals is consistent with the number of points to be detected in the set of points to be detected, it includes:
[0041] Obtain a timer based on the pixel image, wherein a judgment frequency is preset for the timer;
[0042] Initialize the touch interrupt pin of the display and the initial number of pressure signals, wherein the initialized touch interrupt pin is at a high level and the initial number of pressure signals is 0;
[0043] After confirming through the timer that a preset detection time has elapsed;
[0044] If the touch interrupt pin is at a low level, then obtain a pressure signal from the tester based on a pre-constructed analog-to-digital conversion unit, obtain a second detection time according to the pressure signal, and after confirming through the timer that the second detection time has elapsed, judge whether the touch interrupt pin is at a high level. If the touch interrupt pin is at a high level, then confirm to end the extraction of the current pressure signal, perform an increment operation on the initial number of pressure signals to obtain an increment signal number, otherwise, prompt an abnormality on the display;
[0045] If the touch interrupt pin is at a low level, then prompt an abnormality on the display;
[0046] Compare the size of the increment signal number and the number of points to be detected in the set of points to be detected;
[0047] If the increment signal number is equal to the number of points to be detected in the set of points to be detected, then confirm that the number of the plurality of pressure signals is consistent with the number of points to be detected in the set of points to be detected;
[0048] Otherwise, prompt an abnormality on the display, obtain the set of received pressure signals, obtain a set of abnormal detection points according to the set of received pressure signals and the plurality of points to be detected, generate an abnormal identification matrix using the set of abnormal detection points, generate an abnormal pixel image based on the abnormal representation matrix, and use the abnormal pixel image as the pixel image, and return to the step of obtaining a timer based on the pixel image until it is confirmed that the number of the plurality of pressure signals is consistent with the number of points to be detected in the set of points to be detected.
[0049] Optionally, constructing a calibration equation based on multiple test point coordinates and multiple points to be detected includes:
[0050] Obtain the maximum abscissa value and the maximum ordinate value in the screen pixel coordinate system to obtain the maximum screen abscissa value and the maximum screen ordinate value;
[0051] Construct an abscissa interval based on the maximum screen abscissa value, divide the abscissa interval using a preset equidistant division method to obtain a sequence of unit abscissa intervals, and obtain a sequence of unit ordinate intervals according to the maximum screen ordinate value. Among them, the sequence of unit abscissa intervals includes multiple unit abscissa intervals, and sorting operations are performed on the multiple unit abscissa intervals in ascending order of numerical value;
[0052] Obtain a median abscissa sequence based on the multiple test point coordinates, sequentially extract the median abscissas from the median abscissa sequence, and after mapping the extracted median abscissas to the unit abscissa intervals to which the extracted median abscissas belong, obtain fuzzy abscissa intervals;
[0053] Summarize the fuzzy abscissa intervals to obtain a set of fuzzy abscissa intervals. Among them, the set of fuzzy abscissa intervals includes one or more different fuzzy abscissa intervals, and update the sequence of unit abscissa intervals using the set of fuzzy abscissa intervals to obtain an updated abscissa interval sequence;
[0054] Confirm an optimized abscissa set based on the updated abscissa interval sequence;
[0055] Judge the number of median abscissas included in the optimized abscissa set. If the number of median abscissas is less than 3, prompt that the set of points to be detected is abnormal;
[0056] Otherwise, obtain an optimized ordinate set based on the sequence of unit ordinate intervals;
[0057] Output an available calibration coordinate set based on the optimized abscissa set and the optimized ordinate set, and construct a calibration equation based on the calibration equation.
[0058] Optionally, obtaining the median abscissa sequence based on the multiple test point coordinates includes:
[0059] Obtain an abscissa sequence based on the multiple test point coordinates, sequentially extract the abscissa sequence from the abscissa sequence, and perform the following operations on each of the extracted first abscissas:
[0060] Obtain the next first abscissa adjacent to the extracted first abscissa in the abscissa sequence to obtain a second abscissa, and calculate the median abscissa based on the first abscissa and the second abscissa;
[0061] Summarize the median abscissas to obtain a median abscissa sequence.
[0062] Optionally, the step of determining the optimized abscissa set based on the updated abscissa interval sequence includes:
[0063] Extract the updated abscissa intervals from the updated abscissa interval sequence in turn, and find the median abscissa from the extracted updated abscissa intervals;
[0064] If there are zero median abscissas in the extracted updated abscissa interval, skip the extracted updated abscissa interval;
[0065] If there is one median abscissa in the extracted updated abscissa interval, output the first abscissa corresponding to the existing median abscissa as the optimized abscissa;
[0066] If there are multiple median abscissas in the extracted updated abscissa interval, select the first abscissa corresponding to the median abscissa with the smallest value among the multiple median abscissas and output it as the optimized abscissa;
[0067] Summarize the optimized abscissas to obtain the optimized abscissa set.
[0068] To solve the above problems, the present invention further provides an electronic device, which includes:
[0069] At least one processor; and,
[0070] A memory communicatively connected to the at least one processor; wherein,
[0071] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the above-mentioned pixel-linked capacitive touch screen edge error compensation method.
[0072] To solve the above problems, the present invention further provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned pixel-linked capacitive touch screen edge error compensation method.
[0073] Compared with the problems described in the background art, the present invention receives a touch edge calibration instruction, activates the touch screen according to the touch edge calibration instruction, obtains a plurality of capacitance sensing points based on a capacitance sensing unit, and uses a data processing unit to import the plurality of capacitance sensing points into a pre-constructed physical sensing coordinate system to obtain a plurality of physical coordinates. Based on a screen display unit, the screen resolution is obtained, and a resolution interpolation coefficient is calculated using the screen resolution and the plurality of capacitance sensing points. Using the resolution interpolation coefficient, the plurality of capacitance sensing points, and a pre-constructed initial screen coordinate system, a plurality of screen pixel coordinates are generated. By constructing the screen pixel coordinates through the resolution interpolation coefficient, the same set of physical sensing coordinate system and the same set of a plurality of capacitance sensing points can be used, and different screen resolutions can be applicable under different resolution interpolation coefficients. The present invention obtains the sensing area of the display in the screen display unit, and obtains a plurality of sets of points to be detected according to the sensing area and a preset number of detection times. The following operations are performed on each set of points to be detected in the plurality of sets of points to be detected: an identification matrix is obtained based on the initial screen coordinate system and the set of points to be detected, and based on the data processing unit and the identification matrix, a pixel image is generated in the display of the screen display unit. The present invention prompts the tester with the points to be touched through the pixel image. The present invention receives a plurality of pressure signals from the tester based on the pixel image. After confirming that the number of the plurality of pressure signals is consistent with the number of the points to be detected in the set of points to be detected, the present invention removes the jitter in the pressure signals through a timer, briefly reducing the noise in the pressure signals, and also judges the number of the pressure signals, optimizing the misjudgment in the process of extracting the tester's pressure signals using the timer and the touch interrupt pin, and further improving the accuracy of obtaining the pressure signals. The present invention obtains a compressed measurement matrix according to the plurality of pressure signals, extracts a plurality of test point coordinates based on the compressed measurement matrix, constructs a calibration equation according to the plurality of test point coordinates and the plurality of points to be detected, corrects the plurality of screen pixel coordinates in the initial screen coordinate system based on the calibration equation to obtain a corrected screen coordinate set, and completes the edge error compensation of the capacitive touch screen based on pixel linkage based on the corrected screen coordinate set. The present invention extracts a plurality of test point coordinates with reasonable intervals from the plurality of test point coordinates to calculate the calibration equation, reducing the calculation amount and making the calibration equation more representative. Therefore, the edge error compensation method, device, electronic device, and computer-readable storage medium of the capacitive touch screen based on pixel linkage proposed by the present invention mainly aim to simplify the steps of calibrating the edge error of the capacitive touch screen using an image. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a schematic flowchart of a method for compensating edge errors of a capacitive touch screen based on pixel linkage provided by an embodiment of the present invention;
[0075] Figure 2Schematic diagram of the structure of an electronic device for implementing the edge error compensation method of a capacitive touch screen with pixel linkage according to an embodiment of the present invention.
[0076] The implementation, functional features, and advantages of the present invention will be further described in conjunction with embodiments with reference to the accompanying drawings. Specific embodiments
[0077] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0078] An embodiment of the present application provides a method for compensating edge errors of a capacitive touch screen with pixel linkage. The execution subject of the method for compensating edge errors of the capacitive touch screen with pixel linkage includes, but is not limited to, at least one of an electronic device such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the method for compensating edge errors of the capacitive touch screen with pixel linkage can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc.
[0079] Embodiment 1:
[0080] Refer to Figure 1 As shown, it is a flowchart of a method for compensating edge errors of a capacitive touch screen with pixel linkage according to an embodiment of the present invention. In this embodiment, the method for compensating edge errors of the capacitive touch screen with pixel linkage includes:
[0081] S1. Receive a touch edge calibration instruction, and start the touch screen according to the touch edge calibration instruction.
[0082] Furthermore, the touch screen includes: a capacitance sensing unit, a data processing unit, and a screen display unit.
[0083] It should be noted that the touch edge calibration instruction is an instruction issued by a tester to correct the relationship between display and touch in a capacitive touch screen. In the embodiment of the present invention, the touch screen is a capacitive touch screen. The capacitance sensing unit is a unit that installs a capacitor in the capacitive touch screen and can sense the position touched by the tester on the display according to the capacitance. The data processing unit is a unit for processing data, and the screen display unit is a unit including a display for displaying computer content.
[0084] S2. Obtain a plurality of capacitance sensing points based on the capacitance sensing unit, and use the data processing unit to import the plurality of capacitance sensing points into a pre-constructed physical sensing coordinate system to obtain a plurality of physical coordinates.
[0085] Further, the multiple capacitance sensing points are composed of (M×N) intersections formed by (M + N) capacitance touch sensors, and the capacitance sensing points correspond one-to-one with the physical coordinates.
[0086] It should be noted that the physical sensing coordinates are the coordinates of the multiple capacitance sensing points in the touch screen, and the physical coordinates are the coordinates of the capacitance sensing points in the physical sensing coordinates. For the sake of easy understanding, taking a matrix as an example, the first row and the first column of the matrix are the first row and the first column of the capacitance sensing points of the physical coordinates in the physical sensing coordinates, and so on. Therefore, the origin, the horizontal axis, and the vertical axis of the physical sensing coordinate system are the same as the origin, the horizontal axis, and the vertical axis when the image coordinate system is constructed. The construction of the image coordinate system is a prior art and will not be elaborated here.
[0087] S3. Obtain the screen resolution based on the screen display unit, calculate the resolution interpolation coefficient by using the screen resolution and the multiple capacitance sensing points, and generate multiple screen pixel coordinates by using the resolution interpolation coefficient, the multiple capacitance sensing points, and the pre-constructed initial screen coordinate system.
[0088] It can be understood that the resolution interpolation coefficient is a coefficient used to improve the physical resolution corresponding to the multiple capacitance sensing points. For example, if the physical resolution formed by (M×N) capacitance sensing points is M×N, then by using the interpolation algorithm, the screen resolution of the touch screen can be increased to M×N×K 2 , where K represents the resolution interpolation coefficient. The screen pixel coordinates are the pixel coordinates displayed on the touch screen.
[0089] It should be noted that the construction of the initial screen coordinate system is the same as the construction of the image coordinate system and will not be elaborated here.
[0090] Further, the generating multiple screen pixel coordinates by using the resolution interpolation coefficient, the multiple capacitance sensing points, and the pre-constructed initial screen coordinate system includes:
[0091] Obtain the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient, and the second vertical compensation coefficient based on the initial screen coordinate system and the physical sensing coordinate system, and calculate multiple screen pixel coordinates based on the resolution interpolation coefficient, the multiple capacitance sensing points, the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient, and the second vertical compensation coefficient. The calculation formula of the screen pixel coordinates is as follows:
[0092]
[0093] Among them, (x, y) represents the screen pixel coordinates, x represents the abscissa in the screen pixel coordinates, y represents the ordinate in the screen pixel coordinates, J represents the resolution interpolation coefficient, (G - 1) represents the maximum abscissa value of the screen pixel coordinates in the initial screen coordinate system, (H - 1) represents the maximum ordinate value of the screen pixel coordinates in the initial screen coordinate system, M represents the total number of rows of capacitive sensing points among multiple capacitive sensing points, N represents the total number of columns of capacitive sensing points among multiple capacitive sensing points, a represents the first horizontal compensation coefficient between the origin in the physical coordinates and the origin in the initial screen coordinate system in the horizontal axis direction, a represents the first vertical compensation coefficient between the origin in the physical coordinates and the origin in the initial screen coordinate system in the vertical axis direction, c represents the second horizontal compensation coefficient between the origin in the physical coordinates and the origin in the initial screen coordinate system in the horizontal axis direction, d represents the second vertical compensation coefficient between the origin in the physical coordinates and the origin in the initial screen coordinate system in the vertical axis direction, p represents the abscissa of the touch point sensed by multiple capacitive sensing points, and q represents the ordinate of the touch point sensed by multiple capacitive sensing points.
[0094] Further, obtaining the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient, and the second vertical compensation coefficient based on the initial screen coordinate system and the physical sensing coordinate system includes:
[0095] Using the initial screen coordinate system and the physical sensing coordinate system, calculate the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient, and the second vertical compensation coefficient. The calculation formulas are as follows:
[0096]
[0097]
[0098] Among them, A represents the first edge distance between the origin in the physical coordinates and the origin in the initial screen coordinate system in the horizontal axis direction, D PX represents the distance between two adjacent abscissas in the physical coordinates, B represents the first edge distance between the origin in the physical coordinates and the origin in the initial screen coordinate system in the vertical axis direction, D PY represents the distance between two adjacent ordinates in the physical coordinates, C represents the second edge distance between the origin in the physical coordinates and the origin in the initial screen coordinate system in the horizontal axis direction, and D represents the second edge distance between the origin in the physical coordinates and the origin in the initial screen coordinate system in the vertical axis direction.
[0099] It should be noted that the first edge distance between the origin in the physical coordinates and the origin in the initial screen coordinate system in the horizontal axis direction is the distance between the two origins in the horizontal axis. The touch point is the point where the tester touches the touch screen.
[0100] For the sake of illustration, taking the plane rectangular coordinate system as an example, assume that the origin in the physical coordinate is (0, 0), while the origin in the initial screen coordinate system is (0.1, 0.2). Then the distance between the two origins on the horizontal axis is: 0.1 - 0 = 0.1. At this time, the first edge distance between the origin in the physical coordinate and the origin in the initial screen coordinate system in the horizontal axis direction is equal to 0.1. Similarly, the first edge distance between the origin in the physical coordinate and the origin in the initial screen coordinate system in the vertical axis direction is 0.2. Assume that the distance between two adjacent vertical coordinates in the physical coordinate is 1. Then in the physical induction coordinate system, the other physical coordinates distributed around the origin (0, 0) include: (0, 1), (1, 0), and (1, 1). When the origin in the initial screen coordinate system is (0.1, 0.2), the second edge distance between the origin in the physical coordinate and the origin in the initial screen coordinate system in the horizontal axis direction is 1 - 0.1 = 0.9, and the second edge distance between the origin in the physical coordinate and the origin in the initial screen coordinate system in the vertical axis direction is 1 - 0.2 = 0.8.
[0101] S4. Obtain the induction area of the display in the screen display unit, and obtain multiple sets of points to be detected according to the induction area and the preset number of detections. Among them, the number of multiple sets of points to be detected is equal to the number of detections, and each set of points to be detected includes multiple points to be detected.
[0102] It should be noted that the induction area is the largest rectangular area where multiple capacitive induction points in the display can effectively induce, and the number of detections is the number of times the detector detects the capacitive touch screen. The set of points to be detected is the set of points to be detected that need to be detected in one capacitive touch screen detection. For example, in one detection, the detector needs to touch 10 different points on the display to complete the detection. Therefore, these 10 different points are the set of points to be detected. During the entire capacitive touch screen touch edge calibration instruction process, the detector needs to complete the detections corresponding to the number of detections.
[0103] Further, the obtaining of multiple sets of points to be detected according to the induction area and the preset number of detections includes:
[0104] Connect the two diagonals of the induction area, obtain the four side lines of the induction area based on the induction area, use the four side lines of the induction area as sketch entities, make equidistant entities at a preset distance inside the induction area, and divide the induction area according to the equidistant entities, the four side lines and the two diagonals of the induction area to obtain multiple unit induction areas, where the multiple unit induction areas include four unit induction areas;
[0105] Obtain the four vertices of the induction area to obtain a vertex detection set, and copy the vertex detection set to obtain multiple vertex detection sets, where the number of vertex detection sets in the multiple vertex detection sets is equal to the number of detections;
[0106] Perform the following operations on each vertex detection set in multiple vertex detection sets:
[0107] Extract unit sensing regions from the multiple unit sensing regions in sequence, randomly extract multiple unit region detection points in the extracted unit sensing regions, aggregate the extracted unit region detection points to obtain a unit detection point set, and aggregate the vertex detection set and the unit detection point set to obtain a point set to be detected;
[0108] Aggregate the point sets to be detected to obtain multiple point sets to be detected corresponding to the number of detection times.
[0109] It can be understood that for the sake of understanding, taking a 4×4 matrix as an example, and the 4×4 matrix is as follows:
[0110]
[0111] Let the enclosed area formed by connecting a 11 , a 14 , a 41 and a 44 be the sensing area. Then the two diagonals connecting the sensing area are formed by connecting a 11 and a 44 , and then connecting a 14 and a 41 . The four side lines of the sensing area are respectively: from a 11 to a 14 as the first side line, from a 14 to a 44 as the second side line, from a 44 to a 41 as the third side line, from a 41 to a 11 as the fourth side line. The sketch entity is the enclosed rectangle formed by the four side lines of the sensing area, and the equidistant entity is a rectangle similar to the enclosed rectangle formed by the four side lines of the sensing area made according to the sketch entity. And if the product of the length and width of the enclosed rectangle formed by the four side lines of the sensing area is: (a×b), and the preset distance is c, then the product of the length and width of the rectangle corresponding to the equidistant entity is: ((a - c)×(b - c)). The unit sensing area is the area outside the enclosed area formed by the equidistant entities and inside the enclosed area formed by the sensing area. According to the above division, in the 4×4 matrix, the enclosed area formed by connecting a 11 , a 12 , a 13 , a 14 , a 23 , a 22 in sequence is a unit sensing area, and so on. The four vertices are the four vertices in the sensing area, and the taking method of the four vertices is the same as that of the four vertices of the rectangle, which will not be elaborated here.
[0112] It should be noted that the unit area detection points are randomly extracted from the unit sensing area.
[0113] It can be understood that in the present invention, in the process of extracting the set of points to be detected each time, the four vertices of the sensing area are extracted. This is because the four vertices of the sensing area are the places where edge errors and sensing failures are most likely to occur. Therefore, adding a vertex detection set additionally in each detection is beneficial to calibrating the edge errors of the four vertices of the sensing area.
[0114] S5. Perform the following operations on each set of points to be detected in multiple sets of points to be detected: Obtain an identification matrix based on the initial screen coordinate system and the set of points to be detected, and generate a pixel image on the display of the screen display unit based on the data processing unit and the identification matrix.
[0115] Further, the obtaining of the identification matrix based on the initial screen coordinate system and the set of points to be detected includes:
[0116] Construct a zero matrix according to the initial screen coordinates, where the zero matrix is a zero matrix with G rows and H columns;
[0117] Sequentially extract the points to be detected from the set of points to be detected, and perform the following operations on each of the extracted points to be detected:
[0118] Obtain the coordinates of the point to be detected of the extracted point to be detected based on the initial screen coordinate system, map the coordinates of the point to be detected to the zero matrix to obtain the initial matrix element positions, and assign the element corresponding to the initial matrix element position to 1;
[0119] After confirming that all the points to be detected in the set of points to be detected have been extracted, obtain the identification matrix.
[0120] Further, the generating of the pixel image on the display of the screen display unit based on the data processing unit and the identification matrix includes:
[0121] Use the data processing unit to sequentially extract the elements in the identification matrix and judge the extracted elements;
[0122] If the extracted element is 0, assign the extracted element to 255;
[0123] If the extracted element is 1, assign the extracted element to 0;
[0124] After confirming that all the elements in the identification matrix have been assigned values, import the assigned identification matrix into a pre-constructed image coordinate system, and generate a pixel image on the display of the screen display unit based on the imported and assigned image coordinate system.
[0125] It is understandable that according to the above content, the screen resolution in the embodiments of the present invention is: G×H. The coordinates of the point to be detected are the coordinates of the point to be detected in the initial screen coordinate system. The initial matrix element position is the position of the coordinates of the point to be detected in the identification matrix. The identification matrix is a matrix obtained by mapping the coordinates of all points to be detected to a zero matrix and assigning the element corresponding to the coordinates of all points to be detected to 1. The pixel image is an image obtained according to the identification matrix.
[0126] Exemplarily, let the coordinates of the point to be detected in the initial screen coordinate system be (1,1), and the zero matrix be (b pq ) M×N Then the initial matrix element position is b 11 , and it means that the element corresponding to b 11 in the matrix is 1, and in the pixel image, the pixel with pixel coordinates (1,1) has a gray value of 255, and so on, which will not be elaborated here.
[0127] S6. Based on the pixel image, receive multiple pressure signals from the tester. After confirming that the number of the multiple pressure signals is consistent with the number of points to be detected in the set of points to be detected, obtain a compressed measurement matrix according to the multiple pressure signals, and extract multiple test point coordinates based on the compressed measurement matrix, where the test point coordinates correspond to the pressure signals one by one.
[0128] It should be noted that the pressure signal is the signal obtained by the data processing unit after the tester presses the touch screen. The compressed measurement matrix is a matrix obtained according to the compressed sensing theory and the positions where the tester presses the touch screen based on multiple pressure signals. The test point coordinates are the coordinates obtained according to the position where the tester presses the touch screen after the tester presses the touch screen. The coordinate system of the test point coordinates is consistent with the screen pixel coordinate system. And the test point coordinates are obtained by analyzing the pressure signals.
[0129] Further, after receiving multiple pressure signals from the tester based on the pixel image and confirming that the number of the multiple pressure signals is consistent with the number of points to be detected in the set of points to be detected, it includes:
[0130] Obtain a timer based on the pixel image, where the timer presets a judgment frequency;
[0131] Initialize the touch interrupt pin of the display and the initial number of pressure signals. After initialization, the touch interrupt pin is at a high level, and the initial number of pressure signals is 0;
[0132] After confirming through the timer that a preset detection time has passed;
[0133] If the touch interrupt pin is at a low level, obtain the pressure signal from the tester based on a pre-built analog-to-digital conversion unit, obtain the second detection time according to the pressure signal, and after confirming through the timer that the second detection time has elapsed, determine whether the touch interrupt pin is at a high level. If the touch interrupt pin is at a high level, confirm the end of the extraction of the current pressure signal, perform an increment operation on the number of initial pressure signals to obtain the increment signal number; otherwise, prompt an abnormality on the display.
[0134] If the touch interrupt pin is at a low level, prompt an abnormality on the display.
[0135] Compare the increment signal number with the number of points to be detected in the set of points to be detected.
[0136] If the increment signal number is equal to the number of points to be detected in the set of points to be detected, confirm that the number of the multiple pressure signals is consistent with the number of points to be detected in the set of points to be detected.
[0137] Otherwise, prompt an abnormality on the display, obtain the set of received pressure signals, obtain the set of abnormal detection points according to the set of received pressure signals and the multiple points to be detected, generate an abnormal identification matrix using the set of abnormal detection points, generate an abnormal pixel image based on the abnormal representation matrix, and use the abnormal pixel image as the pixel image to return to the step of obtaining the timer based on the pixel image until it is confirmed that the number of the multiple pressure signals is consistent with the number of points to be detected in the set of points to be detected.
[0138] It can be understood that the judgment frequency is the frequency at which the timer judges the touch interrupt pin, the number of initial pressure signals is the number of pressure signals used for effective reception, the preset detection time is 10 ms, the analog-to-digital conversion unit is the unit that realizes the AD conversion function, the second detection time is 10 ms, and the increment operation is the operation of adding one to the number of initial pressure signals. For example, if the number of initial pressure signals is 0, after performing an increment operation on the number of initial pressure signals once, the number of initial pressure signals is 1, and at this time 1 is the increment signal number.
[0139] Furthermore, the set of received pressure signals is the set of pressure signals that can be effectively detected by the touch screen. For example, if the tester presses at (1, 1) in the screen pixel coordinate system and through the above judgment, it is found that (1, 1) is not included in the set of received pressure signals, then at this time (1, 1) is the abnormal detection point in the set of abnormal detection points.
[0140] It should be noted that the purpose of setting the anomaly detection points is to optimize the misjudgment in the process of extracting the pressure signal of the detector using the timer and the touch interrupt pin, and further improve the accuracy of obtaining the pressure signal. The anomaly identification matrix is a matrix generated by the anomaly detection point set, which is similar to the identification matrix construction. The anomaly pixel image is an image generated by the anomaly identification matrix, which is similar to the pixel image.
[0141] S7. Construct a calibration equation based on multiple test point coordinates and multiple points to be detected, correct multiple screen pixel coordinates in the initial screen coordinate system based on the calibration equation to obtain a corrected screen coordinate set, and complete the edge error compensation of the capacitive touch screen based on pixel linkage based on the corrected screen coordinate set.
[0142] Further, the constructing a calibration equation based on multiple test point coordinates and multiple points to be detected includes:
[0143] Obtain the maximum abscissa value and the maximum ordinate value in the screen pixel coordinate system to obtain the maximum screen horizontal value and the maximum screen vertical value;
[0144] Construct a horizontal value interval based on the maximum screen horizontal value, divide the horizontal value interval using a preset equidistant division method to obtain a sequence of unit horizontal value intervals, and obtain a sequence of unit vertical value intervals based on the maximum screen vertical value. Among them, the sequence of unit horizontal value intervals includes multiple unit horizontal value intervals, and sorting operations have been performed on the multiple unit horizontal value intervals in ascending order of numerical value;
[0145] Obtain a median abscissa sequence based on the multiple test point coordinates, sequentially extract the median abscissa from the median abscissa sequence, and after mapping the extracted median abscissa to the unit horizontal value interval to which the extracted median abscissa belongs, obtain a fuzzy abscissa interval;
[0146] Summarize the fuzzy abscissa intervals to obtain a set of fuzzy abscissa intervals. Among them, the set of fuzzy abscissa intervals includes one or more different fuzzy abscissa intervals, and update the sequence of unit horizontal value intervals using the set of fuzzy abscissa intervals to obtain an updated sequence of horizontal value intervals;
[0147] Confirm an optimized abscissa set based on the updated sequence of horizontal value intervals;
[0148] Judge the number of median abscissas included in the optimized abscissa set. If the number of median abscissas is less than 3, prompt that the set of points to be detected is abnormal;
[0149] Otherwise, obtain an optimized ordinate set based on the sequence of unit vertical value intervals;
[0150] Output an available calibration coordinate set based on the optimized abscissa set and the optimized ordinate set, and construct a calibration equation based on the calibration equation.
[0151] It is understandable that the calibration equation calibrates both the abscissa and the ordinate in all coordinates in the screen pixel coordinate system. Therefore, the calibration equation includes an abscissa equation and an ordinate equation, and the correction equation is as follows:
[0152]
[0153] Among them, X t represents the abscissa of the corrected screen coordinates in the corrected screen coordinate set, and Y t represents the ordinate of the corrected screen coordinates in the corrected screen coordinate set. θ, σ, ρ, τ, and ω all represent correction coefficients, X L represents the abscissa of the available calibration coordinates in the available calibration coordinate set, and Y L represents the ordinate of the available calibration coordinates in the available calibration coordinate set.
[0154] It should be noted that the correction coefficients are obtained according to the available calibration coordinate set. The horizontal value range is the range formed from zero to the maximum screen horizontal value. For example, if the maximum screen horizontal value is 2000, the horizontal value range is [0, 2000]. With 1000 as the equally spaced division point, the unit horizontal value range is divided into [0, 1000) and [1000, 2000], then the unit horizontal value range sequence is: [0, 1000), [1000, 2000].
[0155] Exemplarily, if the median abscissa sequence is: 2, 4, 100, 300, 700, and the unit horizontal value range sequence is: [0, 100), [100, 200), [200, 300), [300, 400), [400, 500), [500, 600), [600, 700], extract the median abscissa as 2, and map the median abscissa 2 to the unit horizontal value range to which the median abscissa belongs. Then the corresponding unit horizontal value range is [0, 100), and the fuzzy abscissa range is [0, 100), and the fuzzy abscissa range includes the information that the extracted median abscissa is 0. And so on, to obtain the fuzzy abscissa range set. At this time, the fuzzy abscissa range set is: [0, 100), [100, 200), [300, 400), [600, 700], and each fuzzy abscissa range in the fuzzy abscissa range set includes the included median abscissa. For example, the fuzzy abscissa range [0, 100) includes the median abscissas: 2, 4.
[0156] It is understandable that the optimized abscissa set is a randomly extracted and reasonably spaced set of multiple test point coordinates selected from the updated horizontal value range sequence. However, when the number of reasonably spaced multiple test point coordinates is too small, the calibration equation cannot be solved. Therefore, it is also necessary to judge the reasonably spaced multiple test point coordinates.
[0157] It should be noted that this step extracts multiple test point coordinates with reasonable intervals from multiple test point coordinates to calculate the calibration equation, reducing the amount of calculation and making the calibration equation more representative.
[0158] Further, obtaining the median abscissa sequence according to the multiple test point coordinates includes:
[0159] Obtain the abscissa sequence according to the multiple test point coordinates, sequentially extract the abscissa sequence from the abscissa sequence, and perform the following operations on each extracted first abscissa:
[0160] Obtain the next first abscissa adjacent to the extracted first abscissa in the abscissa sequence to get the second abscissa, and calculate the median abscissa based on the first abscissa and the second abscissa;
[0161] Summarize the median abscissas to obtain the median abscissa sequence.
[0162] It should be noted that the abscissa sequence is the sequence formed by arranging the abscissas of multiple test point coordinates in ascending order of numerical value. The first abscissa is the abscissa extracted from the abscissa sequence, the second abscissa is the next first abscissa adjacent to the extracted first abscissa in the abscissa sequence, and the median abscissa is the coordinate formed by the average of the first abscissa and the second abscissa. For example, if the first abscissa is 0 and the second abscissa is 100, then the median abscissa is 50.
[0163] Further, the confirming the optimized abscissa set based on the updated abscissa interval sequence includes:
[0164] Sequentially extract the updated abscissa intervals from the updated abscissa interval sequence, and search for the median abscissa in the extracted updated abscissa intervals;
[0165] If there are zero median abscissas in the extracted updated abscissa interval, skip the extracted updated abscissa interval;
[0166] If there is one median abscissa in the extracted updated abscissa interval, output the first abscissa corresponding to the existing median abscissa as the optimized abscissa;
[0167] If there are multiple median abscissas in the extracted updated abscissa interval, select the first abscissa corresponding to the median abscissa with the smallest numerical value among the multiple median abscissas and output it as the optimized abscissa;
[0168] Summarize the optimized abscissas to obtain the optimized abscissa set.
[0169] It should be noted that, for example, if the first abscissa is 0 and the second abscissa is 2, then the median abscissa is 1. Further, when outputting the optimized abscissa, the first abscissa output is 0.
[0170] Further, after confirming that the number of median abscissas is greater than or equal to 3, the optimized abscissas are sequentially extracted from the optimized abscissa set, and all the test point coordinates with the same abscissa as the extracted optimized abscissa are extracted from the multiple test point coordinates to obtain the first available calibration coordinate set.
[0171] The second available calibration sequence coordinate set is obtained by using the unit vertical value interval.
[0172] The first available calibration coordinate set and the second available calibration sequence coordinate set are summarized to obtain the available calibration coordinate set.
[0173] It should be noted that in the embodiments of the present invention, first, based on the abscissa, the first available calibration coordinate set with the intervals between the abscissas of the multiple test point coordinates as evenly divided as possible on the horizontal axis is extracted. After retaining the first available calibration coordinate set, then based on the ordinate, the second available calibration coordinate set with the intervals between the ordinates of the multiple test point coordinates as evenly divided as possible on the vertical axis is extracted. Therefore, among the multiple available calibration coordinates included in the available calibration coordinate set, when looking at the abscissa alone, each available calibration coordinate is as evenly distributed as possible on the entire horizontal axis, and when looking at the ordinate alone, each available calibration coordinate is as evenly distributed as possible on the entire vertical axis. The purpose is to make the multiple points to be detected take points as scattered as possible, not limited to a certain area.
[0174] Compared with the problems described in the background art, the present invention receives a touch edge calibration instruction, activates the touch screen according to the touch edge calibration instruction, obtains a plurality of capacitance sensing points based on a capacitance sensing unit, and uses a data processing unit to import the plurality of capacitance sensing points into a pre-constructed physical sensing coordinate system to obtain a plurality of physical coordinates. Based on a screen display unit, the screen resolution is obtained, and a resolution interpolation coefficient is calculated using the screen resolution and the plurality of capacitance sensing points. Using the resolution interpolation coefficient, the plurality of capacitance sensing points, and a pre-constructed initial screen coordinate system, a plurality of screen pixel coordinates are generated. By constructing the screen pixel coordinates through the resolution interpolation coefficient, the same set of physical sensing coordinate systems and the same set of a plurality of capacitance sensing points can be used, and different screen resolutions can be applicable under different resolution interpolation coefficients. The present invention obtains the sensing area of the display in the screen display unit, and obtains a plurality of sets of points to be detected according to the sensing area and a preset number of detection times. The following operations are performed on each set of points to be detected in the plurality of sets of points to be detected: an identification matrix is obtained based on the initial screen coordinate system and the set of points to be detected, and a pixel image is generated in the display of the screen display unit based on the data processing unit and the identification matrix. The present invention prompts the tester with the points to be touched through the pixel image. The present invention receives a plurality of pressure signals from the tester based on the pixel image. After confirming that the number of the plurality of pressure signals is consistent with the number of the points to be detected in the set of points to be detected, the present invention removes the jitter in the pressure signals through a timer, briefly reducing the noise in the pressure signals, and also judges the number of the pressure signals, optimizing the misjudgment in the process of extracting the tester's pressure signals using the timer and the touch interrupt pin, and further improving the accuracy of obtaining the pressure signals. The present invention obtains a compressed measurement matrix according to the plurality of pressure signals, extracts a plurality of test point coordinates based on the compressed measurement matrix, constructs a calibration equation according to the plurality of test point coordinates and the plurality of points to be detected, corrects the plurality of screen pixel coordinates in the initial screen coordinate system based on the calibration equation to obtain a corrected screen coordinate set, and completes the edge error compensation of the capacitive touch screen based on pixel linkage based on the corrected screen coordinate set. The present invention extracts a plurality of test point coordinates with reasonable intervals from the plurality of test point coordinates to calculate the calibration equation, reducing the calculation amount and making the calibration equation more representative. Therefore, the edge error compensation method, device, electronic device, and computer-readable storage medium of the capacitive touch screen based on pixel linkage proposed by the present invention mainly aim to simplify the steps of calibrating the edge error of the capacitive touch screen using an image.
[0175] Embodiment 2:
[0176] As Figure 2 shown, it is a schematic structural diagram of an electronic device for implementing the edge error compensation method of a capacitive touch screen based on pixel linkage provided by an embodiment of the present invention.
[0177] The electronic device 1 may include a processor 10, a memory 11, a bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and executable on the processor 10, such as a capacitive touch screen edge error compensation program for pixel linkage.
[0178] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disks, multimedia cards, card-type memories (such as SD or DX memories, etc.), magnetic memories, magnetic disks, optical disks, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as the mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 can be used not only to store application software installed on the electronic device 1 and various types of data, such as the code of the capacitive touch screen edge error compensation program for pixel linkage, etc., but also to temporarily store data that has been output or will be output.
[0179] In some embodiments, the processor 10 may be composed of integrated circuits. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines, and by running or executing programs or modules (such as the capacitive touch screen edge error compensation program for pixel linkage, etc.) stored in the memory 11, and calling data stored in the memory 11, to execute various functions of the electronic device 1 and process data.
[0180] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is set to achieve connection communication between the memory 11 and at least one processor 10, etc.
[0181] Figure 2 Only an electronic device with components is shown. Those skilled in the art can understand that Figure 2 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than those shown, or combine certain components, or have different component arrangements.
[0182] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charge management, discharge management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The electronic device 1 may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0183] Furthermore, the electronic device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0184] Optionally, the electronic device 1 may further include a user interface. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visual user interface.
[0185] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.
[0186] The capacitive touch screen edge error compensation program stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can implement:
[0187] Receiving a touch edge calibration instruction and starting the touch screen according to the touch edge calibration instruction, where the touch screen includes: a capacitance sensing unit, a data processing unit, and a screen display unit;
[0188] Based on a capacitance sensing unit, multiple capacitance sensing points are obtained. Using a data processing unit, the multiple capacitance sensing points are imported into a pre-constructed physical sensing coordinate system to obtain multiple physical coordinates. Among them, the multiple capacitance sensing points are composed of (M×N) intersections formed by (M + N) capacitance touch sensors, and there is a one-to-one correspondence between the capacitance sensing points and the physical coordinates;
[0189] Based on a screen display unit, the screen resolution is obtained. Using the screen resolution and the multiple capacitance sensing points, a resolution interpolation coefficient is calculated. Using the resolution interpolation coefficient, the multiple capacitance sensing points, and a pre-constructed initial screen coordinate system, multiple screen pixel coordinates are generated;
[0190] The sensing area of the display in the screen display unit is obtained. According to the sensing area and a preset number of detection times, multiple sets of points to be detected are obtained. Among them, the number of multiple sets of points to be detected is equal to the number of detection times, and each set of points to be detected includes multiple points to be detected;
[0191] The following operations are performed on each set of points to be detected in the multiple sets of points to be detected:
[0192] Based on the initial screen coordinate system and the set of points to be detected, an identification matrix is obtained. Based on the data processing unit and the identification matrix, a pixel image is generated in the display of the screen display unit;
[0193] Based on the pixel image, multiple pressure signals from a tester are received. After confirming that the number of the multiple pressure signals is consistent with the number of points to be detected in the set of points to be detected, a compressed measurement matrix is obtained according to the multiple pressure signals. Based on the compressed measurement matrix, multiple test point coordinates are extracted, where there is a one-to-one correspondence between the test point coordinates and the pressure signals;
[0194] According to the multiple test point coordinates and the multiple points to be detected, a calibration equation is constructed. Based on the calibration equation, the multiple screen pixel coordinates in the initial screen coordinate system are corrected to obtain a corrected screen coordinate set. Based on the corrected screen coordinate set, the edge error compensation of the capacitive touch screen based on pixel linkage is completed.
[0195] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 2 the description of the relevant steps in the corresponding embodiment, which will not be elaborated here.
[0196] Furthermore, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory).
[0197] The present invention also provides a computer-readable storage medium storing a computer program, which when executed by a processor of an electronic device, can implement:
[0198] Receiving a touch edge calibration instruction, and starting a touch screen according to the touch edge calibration instruction, where the touch screen includes: a capacitance sensing unit, a data processing unit, and a screen display unit;
[0199] Obtaining a plurality of capacitance sensing points based on the capacitance sensing unit, and using the data processing unit to import the plurality of capacitance sensing points into a pre-constructed physical sensing coordinate system to obtain a plurality of physical coordinates, where the plurality of capacitance sensing points are composed of (M×N) intersections formed by (M + N) capacitance touch sensors, and the capacitance sensing points and the physical coordinates are in one-to-one correspondence;
[0200] Obtaining the screen resolution based on the screen display unit, calculating a resolution interpolation coefficient using the screen resolution and the plurality of capacitance sensing points, and generating a plurality of screen pixel coordinates using the resolution interpolation coefficient, the plurality of capacitance sensing points, and a pre-constructed initial screen coordinate system;
[0201] Obtaining the sensing area of the display in the screen display unit, and obtaining a plurality of sets of points to be detected according to the sensing area and a preset number of detection times, where the number of the plurality of sets of points to be detected is equal to the number of detection times, and each set of points to be detected includes a plurality of points to be detected;
[0202] Performing the following operations on each set of points to be detected in the plurality of sets of points to be detected:
[0203] Obtaining an identification matrix based on the initial screen coordinate system and the set of points to be detected, and generating a pixel image in the display of the screen display unit based on the data processing unit and the identification matrix;
[0204] Receiving a plurality of pressure signals from a tester based on the pixel image, after confirming that the number of the plurality of pressure signals is consistent with the number of points to be detected in the set of points to be detected, obtaining a compressed measurement matrix according to the plurality of pressure signals, and extracting a plurality of test point coordinates based on the compressed measurement matrix, where the test point coordinates and the pressure signals are in one-to-one correspondence;
[0205] Construct a calibration equation based on multiple test point coordinates and multiple points to be detected, correct multiple screen pixel coordinates in the initial screen coordinate system based on the calibration equation to obtain a corrected screen coordinate set, and complete the edge error compensation of the capacitive touch screen based on pixel linkage based on the corrected screen coordinate set.
[0206] The module described as a separate component may or may not be physically separated. The component shown as a module may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0207] In addition, in each embodiment of the present invention, each functional module may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a hardware plus software functional module.
[0208] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.
[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for compensating the edge error of a capacitive touch screen with pixel linkage, characterized in that, The method includes: Receiving a touch edge calibration instruction and starting a touch screen according to the touch edge calibration instruction, where the touch screen includes a capacitance sensing unit, a data processing unit, and a screen display unit; Obtaining a plurality of capacitance sensing points based on the capacitance sensing unit, and using the data processing unit to import the plurality of capacitance sensing points into a pre-constructed physical sensing coordinate system to obtain a plurality of physical coordinates, where the plurality of capacitance sensing points are composed of (M×N) intersections formed by (M + N) capacitance touch sensors, and the capacitance sensing points and the physical coordinates are in one-to-one correspondence; Obtaining the screen resolution based on the screen display unit, calculating a resolution interpolation coefficient using the screen resolution and the plurality of capacitance sensing points, and generating a plurality of screen pixel coordinates using the resolution interpolation coefficient, the plurality of capacitance sensing points, and a pre-constructed initial screen coordinate system; Obtaining the sensing area of the display in the screen display unit, and obtaining a plurality of sets of points to be detected according to the sensing area and a preset number of detection times, where the number of the plurality of sets of points to be detected is equal to the number of detection times, and each set of points to be detected includes a plurality of points to be detected; Performing the following operations on each set of points to be detected in the plurality of sets of points to be detected: Obtaining an identification matrix based on the initial screen coordinate system and the set of points to be detected, and generating a pixel image in the display of the screen display unit based on the data processing unit and the identification matrix; Receiving a plurality of pressure signals from a tester based on the pixel image, after confirming that the number of the plurality of pressure signals is consistent with the number of points to be detected in the set of points to be detected, obtaining a compressed measurement matrix according to the plurality of pressure signals, and extracting a plurality of test point coordinates based on the compressed measurement matrix, where the test point coordinates and the pressure signals are in one-to-one correspondence; Constructing a calibration equation according to the plurality of test point coordinates and the plurality of points to be detected, correcting the plurality of screen pixel coordinates in the initial screen coordinate system based on the calibration equation to obtain a corrected screen coordinate set, and completing the edge error compensation of the capacitive touch screen based on pixel linkage based on the corrected screen coordinate set; The constructing a calibration equation according to the plurality of test point coordinates and the plurality of points to be detected includes: Obtaining the maximum abscissa value and the maximum ordinate value in the screen pixel coordinate system to obtain the maximum screen abscissa value and the maximum screen ordinate value; Constructing an abscissa value interval according to the maximum screen abscissa value, dividing the abscissa value interval using a preset equal-distance division method to obtain a sequence of unit abscissa value intervals, and obtaining a sequence of unit ordinate value intervals according to the maximum screen ordinate value, where the sequence of unit abscissa value intervals includes a plurality of unit abscissa value intervals, and sorting operations are performed on the plurality of unit abscissa value intervals in ascending order of numerical values; Obtaining a median abscissa sequence according to the plurality of test point coordinates, sequentially extracting median abscissas from the median abscissa sequence, and obtaining a fuzzy abscissa interval after mapping the extracted median abscissas to the unit abscissa value interval to which the extracted median abscissas belong; Summarizing the fuzzy abscissa intervals to obtain a set of fuzzy abscissa intervals, where the set of fuzzy abscissa intervals includes one or more different fuzzy abscissa intervals, and updating the sequence of unit abscissa value intervals using the set of fuzzy abscissa intervals to obtain an updated sequence of abscissa value intervals; An optimized abscissa set is confirmed based on an updated horizontal value interval sequence; Judge the number of median abscissas included in the optimized abscissa set. If the number of median abscissas is less than 3, it is prompted that the set of points to be detected is abnormal; Otherwise, an optimized ordinate set is obtained based on the unit vertical value interval sequence; An available calibration coordinate set is output based on the optimized abscissa set and the optimized ordinate set, and a calibration equation is constructed based on the calibration equation.
2. The method for compensating the edge error of the capacitive touch screen with pixel linkage as claimed in claim 1, wherein The generating of multiple screen pixel coordinates by using the resolution interpolation coefficient, multiple capacitance sensing points and a pre-constructed initial screen coordinate system includes: Based on the initial screen coordinate system and the physical sensing coordinate system, a first horizontal compensation coefficient, a first vertical compensation coefficient, a second horizontal compensation coefficient and a second vertical compensation coefficient are obtained. Multiple screen pixel coordinates are calculated based on the resolution interpolation coefficient, multiple capacitance sensing points, the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient and the second vertical compensation coefficient. The calculation formula of the screen pixel coordinates is as follows: Where, (x, y) represents the screen pixel coordinate, x represents the abscissa in the screen pixel coordinate, y represents the ordinate in the screen pixel coordinate, J represents the resolution interpolation coefficient, (G - 1) represents the maximum abscissa value of the screen pixel coordinate in the initial screen coordinate system, (H - 1) represents the maximum ordinate value of the screen pixel coordinate in the initial screen coordinate system, M represents the total number of rows of capacitance sensing points among multiple capacitance sensing points, N represents the total number of columns of capacitance sensing points among multiple capacitance sensing points, a represents the first horizontal compensation coefficient in the horizontal axis direction between the origin in the physical coordinate and the origin in the initial screen coordinate system, a represents the first vertical compensation coefficient in the vertical axis direction between the origin in the physical coordinate and the origin in the initial screen coordinate system, c represents the second horizontal compensation coefficient in the horizontal axis direction between the origin in the physical coordinate and the origin in the initial screen coordinate system, d represents the second vertical compensation coefficient in the vertical axis direction between the origin in the physical coordinate and the origin in the initial screen coordinate system, p represents the abscissa of the touch point sensed by multiple capacitance sensing points, and q represents the ordinate of the touch point sensed by multiple capacitance sensing points.
3. The method for compensating the edge error of the capacitive touch screen with pixel linkage according to claim 2, wherein The obtaining of the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient and the second vertical compensation coefficient based on the initial screen coordinate system and the physical sensing coordinate system includes: Using the initial screen coordinate system and the physical sensing coordinate system, calculate the first horizontal compensation coefficient, the first vertical compensation coefficient, the second horizontal compensation coefficient and the second vertical compensation coefficient. The calculation formula is as follows: Among them, A represents the first edge distance in the horizontal axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, D PX represents the distance between two adjacent abscissas in the physical coordinates, B represents the first edge distance in the vertical axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, D PY represents the distance between two adjacent ordinates in the physical coordinates, C represents the second edge distance in the horizontal axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system, and D represents the second edge distance in the vertical axis direction between the origin in the physical coordinates and the origin in the initial screen coordinate system.
4. The method for compensating the edge error of the capacitive touch screen with pixel linkage according to claim 3, characterized in that, The obtaining of multiple sets of points to be detected according to the sensing area and the preset number of detections includes: Connect the two diagonals of the sensing area, obtain the four side lines of the sensing area based on the sensing area, use the four side lines of the sensing area as sketch entities, make equidistant entities at a preset distance inside the sensing area, and divide the sensing area according to the equidistant entities, the four side lines and the two diagonals of the sensing area to obtain multiple unit sensing areas, where the multiple unit sensing areas include four unit sensing areas; Obtain the four vertices of the sensing area to obtain a vertex detection set, and copy the vertex detection set to obtain multiple vertex detection sets, where the number of vertex detection sets in the multiple vertex detection sets is equal to the number of detections; Perform the following operations on each vertex detection set in the multiple vertex detection sets: Sequentially extract unit sensing areas from the multiple unit sensing areas, and randomly extract multiple unit area detection points in the extracted unit sensing areas, aggregate the extracted unit area detection points to obtain a unit detection point set, and aggregate the vertex detection set and the unit detection point set to obtain a set of points to be detected; Aggregate the sets of points to be detected to obtain multiple sets of points to be detected corresponding to the number of detections.
5. The method for compensating the edge error of the capacitive touch screen with pixel linkage according to claim 4, wherein, The obtaining of the identification matrix based on the initial screen coordinate system and the set of points to be detected includes: Construct a zero matrix according to the initial screen coordinates, where the zero matrix is a zero matrix of G rows and H columns; Sequentially extract the points to be detected from the set of points to be detected, and perform the following operations on each of the extracted points to be detected: Obtain the coordinates of the point to be detected of the extracted point to be detected based on the initial screen coordinate system, map the coordinates of the point to be detected to the zero matrix to obtain the initial matrix element position, and assign the element corresponding to the initial matrix element position to 1; After confirming that all the points to be detected in the set of points to be detected have been extracted, obtain the identification matrix.
6. The method for compensating the edge error of the capacitive touch screen with pixel linkage according to claim 5, characterized in that, The generating of a pixel image on the display of the screen display unit based on the data processing unit and the identification matrix includes: Use the data processing unit to sequentially extract the elements in the identification matrix and judge the extracted elements; If the extracted element is 0, assign the extracted element to 255; If the extracted element is 1, assign the extracted element to 0; After confirming that all the elements in the identification matrix have been assigned values, import the assigned identification matrix into a pre-constructed image coordinate system, and generate a pixel image on the display of the screen display unit based on the imported and assigned image coordinate system.
7. The method for compensating the edge error of the capacitive touch screen with pixel linkage according to claim 6, characterized in that, After receiving multiple pressure signals from the tester based on the pixel image and confirming that the number of the multiple pressure signals is consistent with the number of the points to be detected in the set of points to be detected, it includes: Obtain a timer based on the pixel image, where the timer presets a judgment frequency; Initialize the touch interrupt pin of the display and the initial number of pressure signals, where the initialized touch interrupt pin is at a high level and the initial number of pressure signals is 0; After confirming through the timer that a preset detection time has passed; If the touch interrupt pin is at a low level, obtain a pressure signal from the tester based on a pre-constructed analog-to-digital conversion unit, obtain a second detection time according to the pressure signal, and after confirming through the timer that the second detection time has passed, judge whether the touch interrupt pin is at a high level. If the touch interrupt pin is at a high level, confirm the end of the extraction of the current pressure signal, perform an increment operation on the initial number of pressure signals to obtain an increment signal number, otherwise, prompt an abnormality on the display; If the touch interrupt pin is at a low level, prompt an abnormality on the display; Compare the increment signal number with the number of the points to be detected in the set of points to be detected; If the number of incremental signals is equal to the number of points to be detected in the set of points to be detected, confirm that the number of the multiple pressure signals is consistent with the number of points to be detected in the set of points to be detected; Otherwise, prompt an abnormality on the display, obtain the set of received pressure signals, obtain the set of abnormal detection points according to the set of received pressure signals and the multiple points to be detected, generate an abnormal identification matrix using the set of abnormal detection points, generate an abnormal pixel image based on the abnormal representation matrix, and use the abnormal pixel image as the pixel image to return to the step of obtaining the timer based on the pixel image until it is confirmed that the number of the multiple pressure signals is consistent with the number of points to be detected in the set of points to be detected.
8. The method for compensating the edge error of the capacitive touch screen with pixel linkage according to claim 7, characterized in that, The obtaining the median abscissa sequence according to the multiple test point coordinates includes: Obtain the abscissa sequence according to the multiple test point coordinates, sequentially extract the abscissa sequence from the abscissa sequence, and perform the following operations on each of the extracted first abscissas: Obtain the next first abscissa adjacent to the extracted first abscissa in the abscissa sequence to obtain a second abscissa, and calculate the median abscissa based on the first abscissa and the second abscissa; Summarize the median abscissas to obtain the median abscissa sequence.
9. The method for compensating the edge error of the capacitive touch screen with pixel linkage according to claim 8, wherein The confirming the optimized abscissa set based on the updated horizontal value interval sequence includes: Sequentially extract the updated horizontal value intervals from the updated horizontal value interval sequence, and search for the median abscissa in the extracted updated horizontal value intervals; If there are zero median abscissas in the extracted updated horizontal value interval, skip the extracted updated horizontal value interval; If there is one median abscissa in the extracted updated horizontal value interval, output the first abscissa corresponding to the existing median abscissa as the optimized abscissa; If there are multiple median abscissas in the extracted updated horizontal value interval, select the first abscissa corresponding to the median abscissa with the smallest value among the multiple median abscissas and output it as the optimized abscissa; Summarize the optimized abscissas to obtain the optimized abscissa set.
Citation Information
Patent Citations
Touch screen calibration method and device
CN113268158A
Touch display method, graphical interface and related device
CN115562514A