Touch device and data processing method thereof
By optimizing line objects using Bezier curve and quadratic curve algorithms, the problems of unsmooth lines and stiff transitions in handwriting input devices have been solved, resulting in a smoother writing experience and a lower system load.
Patent Information
- Application Number
- CN202410965464.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2026-01-20
AI Technical Summary
Existing handwriting input devices have poor data processing speed or insufficient feedback frequency, resulting in uneven or stiff writing lines, which are prone to damage, especially when the strokes change greatly or at high speeds.
Two different curve algorithms, Bezier curve and quadratic curve, are used to optimize the smoothness of line segments by increasing the number of points within the line object and removing unnecessary noise data.
It improves the smoothness of lines and the smoothness of transitions, reduces system load, and enhances the user experience.
Smart Images

Figure CN121364809A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of touch control, and in particular, to a touch control device and a data processing method thereof. BACKGROUND
[0002] With the rapid development of information technology, writing devices have evolved from simple keyboard input to a handwriting input device (e.g. an electronic pen). The performance and user experience of current writing devices depend on data processing capabilities, such as providing a user handwriting input position by a handwriting input device, converting user handwriting speed related information provided by the handwriting input device into speed to generate a pen stroke. However, when the data processing speed of the handwriting input device is not good or the frequency of the return points is not frequent enough, the lines during writing can be not smooth or the turning can be stiff. In this case, if the stroke changes too much or the speed is too fast, the lines can be broken. SUMMARY
[0003] The present application aims to provide a touch control device and a data processing method thereof to repair broken lines.
[0004] To achieve the above-mentioned purpose, the present application provides a touch control device and a data processing method thereof. A touch control device comprises:
[0005] a sensing unit for generating a plurality of sensing data of a triggering event;
[0006] a conversion unit for generating a plurality of coordinate point data corresponding to the plurality of sensing data; and
[0007] a calculation unit for generating a line object and calculating a start position and an end position of the line object according to the plurality of sensing data and the plurality of coordinate point data, and sequentially performing a Bezier curve operation and a quadratic curve operation on the plurality of coordinate point data.
[0008] Preferably, the Bezier curve operation includes adding at least one insertion point data between two adjacent coordinate points in the plurality of coordinate point data to increase the number of data points.
[0009] Preferably, the quadratic curve operation includes grouping the plurality of coordinate point data to generate a plurality of line segments, extracting a control point coordinate from each of the line segments, and adjusting the position of the control point coordinate.
[0010] Preferably, optimizing the line object includes adjusting the smoothness of the plurality of line segments.
[0011] Preferably, optimizing the line object includes reducing the number of coordinate points included in the plurality of line segments.
[0012] Preferably, each line segment includes a start point coordinate and an end point coordinate, and the control point coordinate is located between the start point coordinate and the end point coordinate.
[0013] Preferably, the triggering event includes a start event, a move event, and a leave event.
[0014] Preferably, the Bézier curve operation includes linear Bézier curve operation, quadratic Bézier curve operation, and / or cubic Bézier curve operation.
[0015] Preferably, after the line object undergoes the Bezier curve calculation and the quadratic curve calculation to improve the smoothness of the line object or repair the broken corners of the line object, the calculation unit uses the angle changes of the multiple line segments to measure the smoothness of the line object.
[0016] A preferred data processing method includes:
[0017] Receive multiple sensor data that trigger the event and multiple coordinate point data corresponding to the multiple sensor data;
[0018] Based on the multiple sensor data and the multiple coordinate point data, a line object is generated, and the start and end positions of the line object are calculated; and
[0019] Perform Bezier curve calculations and quadratic curve calculations on the multiple coordinate point data in sequence.
[0020] Compared with existing technologies, the touch device and its data processing method provided by this invention employ two different curve algorithms: first, Bezier curve calculation, and then quadratic curve calculation, to optimize line objects. Optimizing line objects includes adjusting the smoothness of the multiple line segments by increasing the number of data points. Furthermore, optimizing line objects also includes deleting unnecessary noise data to reduce the number of coordinate points contained within the multiple line segments. Attached Figure Description
[0021] Figure 1 A schematic diagram of a touch device according to an embodiment of the present invention is shown.
[0022] Figure 2 A flowchart illustrating a data processing method according to an embodiment of the present invention is shown.
[0023] Figure 3 This diagram shows the coordinate data of line objects and provides an illustration of adding insertion point coordinates.
[0024] Figure 4 The diagram illustrates how quadratic curve operations are used to select one point from multiple coordinate data points that are grouped into groups of three, while the others are treated as noise data.
[0025] Figure 5A andFigure 5B Draw the differences between the unoptimized line object Ln_X and the optimized line object Ln_S.
[0026] Figure 6A and Figure 6B Draw the differences between the unoptimized line object Ln_X and the optimized line object Ln_S. Detailed Implementation
[0027] To provide a further understanding of the purpose, structure, features, and functions of the present invention, detailed descriptions are provided below with reference to specific embodiments.
[0028] Certain terms are used in the specification and claims to refer to specific elements. It will be understood by those skilled in the art that manufacturers may use different names to refer to the same element. This specification and claims do not distinguish elements by differences in name, but rather by differences in function. The term "comprising" throughout the specification and claims is an open-ended term and should be interpreted as "comprising but not limited to".
[0029] Please refer to Figure 1 The diagram illustrates a touch device 100 according to an embodiment of the present invention. The touch device 100 is, for example, a writing device such as an electronic whiteboard or a touchpad, on which a user can write text, lines, or patterns using a handwriting input device (e.g., an electronic pen) to create the desired object.
[0030] Please refer to Figure 1 The touch device 100 includes a sensing unit 110, a conversion unit 120, and a processing unit 130. The sensing unit 110 generates multiple sensing data points that trigger an event. The conversion unit 120 generates multiple coordinate point data points corresponding to the multiple sensing data points. The processing unit 130 calculates a line object (e.g., [missing information]) based on the multiple sensing data points and the multiple coordinate point data points. Figure 3 The starting position of the line object Ln (e.g.) Figure 3 The data includes a punctuation mark (one of the points in the graph) and the endpoint (e.g., another punctuation mark in Figure 3), and performs Bezier curve and quadratic curve calculations on the data of these multiple punctuation marks to optimize the line object Ln.
[0031] The sensing unit 110 is, for example, a capacitive sensor, a resistive sensor, or an electromagnetic sensor, and senses a pressure value of each touch point. When a handwriting input device (e.g., an electronic pen) touches a writing device such as an electronic whiteboard or a touchpad, a circuit built in the handwriting input device transmits a signal to the writing device, thereby sensing a coordinate of the touch point. The conversion unit 120 is, for example, an operating system, and obtains the coordinate of the touch point according to the plurality of sensing data. In addition, the operation unit 130 is, for example, an image processor or a code or algorithm built in a memory, and generates a line object Ln (e.g., a stroke or a handwriting) on the writing device such as the electronic whiteboard or the touchpad according to the pressure value and the coordinate of the touch point.
[0032] In order to increase the smoothness of a line, a conventional writing device (e.g., an electronic whiteboard or a touchpad) often uses increasing return point data in the line and increasing a sampling rate to improve the situation that a line is not smooth and a turn is stiff during writing. However, increasing the return point data cannot improve user experience if it does not reach a certain threshold, but instead increases the amount of data, causing a system burden. Therefore, the present embodiment improves the conventional writing device and data processing method, and can maintain the point feature value of the line object Ln without increasing the return point data, so that the writing features such as smoothness or turn of the line are sufficient to be presented, thereby improving the situation that a line is not smooth and a turn is stiff during writing.
[0033] In an embodiment, the touch device 100 and the data processing method thereof of the present embodiment adopt two different curve algorithms, for example, a Bezier curve algorithm and a quadratic curve algorithm. The Bezier curve algorithm is used to increase the point feature value contained in the line object Ln, and the quadratic curve algorithm is used to reduce the noise data contained in the line object Ln. Therefore, the touch device 100 and the data processing method thereof of the present embodiment can maintain a certain amount of point feature value and delete unnecessary noise data by using the two different curve algorithms of the Bezier curve and the quadratic curve, thereby reducing the system burden and improving user experience.
[0034] Bezier curve operation: a curve is drawn by a control point, a straight line is drawn by two points, and at least one control point is taken in the middle to adjust. The more control points between the two points, the more like a curve the drawn line is.
[0035] Quadratic curve operation: also known as conic curve operation, a curve obtained by cutting a plane twice from a conic surface.
[0036] Please refer to Figure 2The diagram illustrates a flowchart of a data processing method according to an embodiment of the present invention. The data processing method includes the following steps S210 to S240. In step S210, a corresponding trigger event is received, wherein the trigger event includes a trigger start event, a trigger move event, and a trigger leave event. In step S220, the start position and end position of a line object (e.g., the line object Ln in Figure 3) are calculated based on the plurality of sensed data and the plurality of coordinate point data. In step S230, a Bezier curve operation is performed on the plurality of coordinate point data to increase the insertion point data. In step S240, a quadratic curve operation is performed on the plurality of coordinate point data to reduce the noise contained in the line object Ln.
[0037] In one embodiment, when a user begins writing, a start event is triggered, and the touch device 100 records the starting position and the pressure value at the starting position; when the user moves the pen, a move event is triggered, and the touch device 100 records the coordinate point data and pressure value on the movement trajectory; when the user lifts the pen, a leave event is triggered, and the touch device 100 records the ending position and the pressure value at the ending position. Generally, the pressure value at the starting position increases from small to large, while the pressure value at the ending position decreases from large to small, and the pressure values at the coordinate points on the movement trajectory remain largely unchanged. Therefore, the sensing unit 110 can sense the pressure values at different coordinate points, and the sensing unit 110 can send this sensing data back to the processing unit 130. The processing unit 130 can generate a line object Ln based on this sensing data and the corresponding coordinate point data, and determine the starting position of the line object Ln (e.g., Figure 3 (a punctuation mark) and the endpoint (e.g.) Figure 3 Another punctuation mark in the text.
[0038] Please refer to Figure 3Fig. 2 is a schematic diagram illustrating original coordinate point data A, B and insertion point data Tl, T2 of a line object Ln. The line object Ln can be a straight line, a curve, a parabola or any shape, each of which includes an object name and a self-defined data format. In an embodiment, the object name is used to distinguish each line object Ln, and the coordinate point data is represented by an array, which has the following format: [X0, Y0, Xl, Yl, X2, Y2, X3, Y3,...], where [X0, Y0] is the first coordinate point data, [Xl, Yl] is the second coordinate point data, [X2, Y2] is the third coordinate point data, and [X3, Y3] is the fourth coordinate point data. In this embodiment, the operation unit 130 can construct a Bezier curve by adding at least one insertion point data (e.g., Tl, T2) between two adjacent original coordinate point data A, B. The Bezier curve operation can include a linear Bezier curve operation, a quadratic Bezier curve operation and / or a cubic Bezier curve operation. If the linear Bezier curve operation is used, the operation unit 130 forms a straight line between two adjacent original coordinate point data A, B. If the quadratic Bezier curve operation is used, the operation unit 130 adds one insertion point data between two adjacent original coordinate point data A, B to form a curve. If the cubic Bezier curve operation is used, the operation unit 130 adds two insertion point data Tl, T2 between two adjacent original coordinate point data A, B to form a curve. Therefore, the operation unit 130 can increase the number of data points by the Bezier curve operation to increase the number of point feature values contained in the line object Ln.
[0039] Please refer to Figure 4 After the operation unit 130 completes the Bezier curve operation, it further performs a quadratic curve operation to group all the coordinate point data (including the insertion point data Tl, T2) to generate a plurality of line segments (e.g., Lnl, Ln2,...), of which only two line segments Lnl, Ln2 are illustrated in this embodiment. Each line segment includes a first coordinate point data P0, a second coordinate point data P1 and a third coordinate point data P2. That is, each line segment includes three coordinate point data (P0, P1, P2), and a control point coordinate C(t) is extracted from the three coordinate point data (P0, P1, P2) to construct a quadratic curve. When the quadratic curve operation is used, the operation unit 130 adjusts the position of the control point coordinate C(t), which has the following equation: C(t) = (1 - t) 2 P0+2t(1-t)P1+t 2P2, where t ranges between 0 and 1. The t value is used as a parameter to approach the start or end point of each line. The control point C(t) is located between the first point P0 (start point) and the third point P2 (end point). When t equals 0.5, the control point C(t) approaches the middle point P1.
[0040] Since the Bezier curve operation of each line segment (e.g. Ln1, Ln2...) only uses the control point C(t), the other three points (P0, P1, P2) are considered as noise points (unnecessary noise data). Therefore, the number of points is reduced. In an embodiment, there are originally 100 points. After the Bezier curve operation, 200 points are added. Then, after the Bezier curve operation, the unnecessary noise data are deleted, and the number of points is reduced to 1 / 3 of the original number, i.e. 67 points. Therefore, the compression ratio of the points is about 67%, which reduces the system burden.
[0041] As described above, the touch device 100 and the data processing method thereof in the embodiment use two different curve operation methods, such as the Bezier curve operation and the quadratic curve operation, to optimize the line object Ln. The optimization of the line object Ln includes adjusting the smoothness of the line segments by increasing the number of data points. In addition, the optimization of the line object Ln also includes deleting the unnecessary noise data to reduce the number of points in the line segments.
[0042] In addition, after the Bezier curve operation and the quadratic curve operation of the line object Ln, the angle change of the line segments can also be used to measure the smoothness of the line object Ln. For example, assuming that the line object Ln has n line segments, the angle change of each line segment is calculated, the total angle of all line segments is calculated, the average angle is calculated according to the total angle of all line segments, and the reciprocal of the average angle is calculated to obtain the smoothness. The value of the smoothness ranges between 0 and 1. The closer the value is to 1, the better the smoothness is. Conversely, the closer the value is to 0, the worse the smoothness is.
[0043] In an embodiment, compared with the line object without optimization, when the line object Ln is first subjected to the Bezier curve operation and then subjected to the quadratic curve operation, the smoothness can be increased from 0.647 to 0.827, with an increase of about 18%.
[0044] Please refer to Figure 5A and Figure 5B which respectively show the difference between the line object without optimization Ln_X and the line object with optimization Ln_S. In Figure 5AIn the un-optimized line object Ln_X, the coordinate point data Pt is directly connected by a straight line, and is not connected by a Bezier curve. Therefore, the smoothness between lines is poor. Figure 5B In the optimized line object Ln_S, the coordinate point data Pt is connected by a Bezier curve and then by a quadratic curve. Only the control point coordinates C(t) are used to reduce the number of coordinate points. The smoothness between lines is better.
[0045] Please refer to Figure 6A and Figure 6B which respectively show the difference between the un-optimized line object Ln_X and the optimized line object Ln_S. Taking a straight line as an example, in the un-optimized line object Ln_X, Figure 6A breakage (e.g. broken corners) easily occurs at the line head and tail H1, H3 and the turning point H2. In the optimized line object Ln_S, Figure 6B the broken parts are repaired to be smooth lines by using a Bezier curve and then a quadratic curve. Thus, the breakage and the rigid turning during writing are improved. In addition, the optimized line object Ln_S can also maintain the visual sense of the turning angle.
[0046] The present application has been described by the above-mentioned embodiments, however, the above-mentioned embodiments are only examples for implementing the present application. It must be pointed out that the disclosed embodiments do not limit the scope of the present application. On the contrary, the changes and modifications made without departing from the spirit and scope of the present application are within the scope of the patent protection of the present application.
Claims
1. A touch device, comprising: comprising: a sensing unit to generate a plurality of sensing data of a triggering event; a conversion unit to generate a plurality of coordinate point data corresponding to the plurality of sensing data; and a calculation unit to generate a line object and calculate a start point position and an end point position of the line object according to the plurality of sensing data and the plurality of coordinate point data, and sequentially perform a Bezier curve operation and a conic curve operation on the plurality of coordinate point data. 2.The touch device of claim 1, wherein, The Bezier curve operation includes adding at least one insertion point data between two adjacent coordinate points in the plurality of coordinate point data to increase the number of data points. 3.The touch device of claim 2, wherein, The conic curve operation includes grouping the plurality of coordinate point data to generate a plurality of line segments, extracting a control point coordinate from each of the line segments, and adjusting the position of the control point coordinate. 4.The touch device of claim 3, wherein, Optimizing the line object includes adjusting the smoothness of the plurality of line segments. 5.The touch device of claim 3, wherein, Optimizing the line object includes reducing the number of coordinate points included in the plurality of line segments. 6.The touch device of claim 3, wherein, Each of the line segments includes a start point coordinate and an end point coordinate, and the control point coordinate is located between the start point coordinate and the end point coordinate. 7.The touch device of claim 1, wherein, The triggering event includes a triggering start event, a triggering movement event, and a triggering exit event. 8.The touch device of claim 1, wherein, The Bezier curve operation includes a linear Bezier curve operation, a quadratic Bezier curve operation, and / or a cubic Bezier curve operation. 9.The touch device of claim 3, wherein, After the line object performs the Bezier curve operation and the conic curve operation to improve the smoothness of the line object or repair the broken corners of the line object, the calculation unit uses the angle change of the plurality of line segments to measure the smoothness of the line object.
10. A data processing method, characterized by, comprising: receiving a plurality of sensing data of a triggering event and a plurality of coordinate point data corresponding to the plurality of sensing data; generating a line object and calculating a start point position and an end point position of the line object according to the plurality of sensing data and the plurality of coordinate point data; and sequentially performing a Bezier curve operation and a conic curve operation on the plurality of coordinate point data.