WO2019056611A1 - 用于触控屏的笔迹曲线生成方法、装置、设备和存储介质 - Google Patents

用于触控屏的笔迹曲线生成方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2019056611A1
WO2019056611A1 PCT/CN2017/116744 CN2017116744W WO2019056611A1 WO 2019056611 A1 WO2019056611 A1 WO 2019056611A1 CN 2017116744 W CN2017116744 W CN 2017116744W WO 2019056611 A1 WO2019056611 A1 WO 2019056611A1
Authority
WO
WIPO (PCT)
Prior art keywords
distance
touch
point
points
adjacent
Prior art date
Application number
PCT/CN2017/116744
Other languages
English (en)
French (fr)
Inventor
向淘
Original Assignee
广州视源电子科技股份有限公司
广州视臻信息科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州视源电子科技股份有限公司, 广州视臻信息科技有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2019056611A1 publication Critical patent/WO2019056611A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Definitions

  • the present invention relates to touch technology, and in particular, to a handwriting curve generation method, apparatus, device and storage medium for a touch screen.
  • the Bezier curve is usually generated based on the control points using the Bessel formula algorithm.
  • the touch data point is usually used as a control point to draw the Bezier curve.
  • the touch device When the touch device generates abnormal touch data due to low sampling rate or noise interference. If you draw a Bezier curve with the data point of the abnormal touch data as a control point, it will cause a polyline.
  • the embodiment of the invention provides a method, a device, a device and a storage medium for generating a handwriting curve for a touch screen, which solves the problem of a broken line generated when drawing a handwriting curve by using a Bezier curve, and makes the drawn handwriting curve more rounded.
  • an embodiment of the present invention provides a method for generating a handwriting curve for a touch screen, the method comprising:
  • the control point is generated according to the set Bezier curve.
  • the embodiment of the present invention further provides a handwriting curve generating device for a touch screen, the device comprising:
  • a data acquisition module configured to acquire touch data of each touch point in a touch operation of the user
  • a distance prediction module configured to predict a distance between adjacent touch points according to the set prediction rule, to obtain a predicted distance between the adjacent touch points
  • control point determining module configured to: when the actual distance between the predicted distance and the adjacent touch point meets the set distance condition, determine that the touch point corresponding to the predicted distance is a control point;
  • a handwriting curve generating module is configured to generate the handwriting curve according to the set Bezier curve.
  • an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor implements the program, such as the present invention
  • a computer device including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor implements the program, such as the present invention
  • the processor implements the program, such as the present invention
  • a handwriting curve generating method for a touch screen according to any of the embodiments.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer program is stored, and when the program is executed by the processor, the touch screen is implemented according to any one of the embodiments of the present invention. Handwriting curve generation method.
  • the touch data of each touch point in the touch operation of the user is acquired, and the distance between adjacent touch points is predicted according to the set prediction rule to obtain the between the adjacent touch points. Determining the distance, and then determining that when the actual distance between the predicted distance and the adjacent touch point satisfies the set distance condition, determining that the touch point corresponding to the predicted distance is a control point, The control point generates a handwriting curve according to the set Bezier curve. It solves the problem of the polyline generated when drawing the handwriting curve with Bezier curve, making the handwriting curve drawn more rounded.
  • FIG. 1a is a flowchart of a method for generating a handwriting curve for a touch screen according to Embodiment 1 of the present invention
  • FIG. 1b is a schematic diagram of a situation in which an abnormal point exists in touch data according to Embodiment 1 of the present invention.
  • FIG. 1c is a schematic diagram of a Bezier curve drawn according to FIG. 1b according to Embodiment 1 of the present invention.
  • FIG. 1d is a schematic diagram of a Bezier curve after filtering out an abnormal point according to Embodiment 1 of the present invention
  • FIG. 2a is a flowchart of a method for generating a handwriting curve for a touch screen according to Embodiment 2 of the present invention
  • FIG. 2b is a schematic diagram showing relative positions of touch points when a finger touches a screen according to Embodiment 2 of the present invention
  • FIG. 3a is a flowchart of a method for generating a handwriting curve for a touch screen according to Embodiment 3 of the present invention.
  • FIG. 3b is a schematic diagram of a Bezier curve drawn without using the present scheme (when an abnormal point exists) according to Embodiment 3 of the present invention.
  • 3c is a schematic diagram of a Bezier curve drawn by using the present scheme (after filtering out an abnormal point) according to Embodiment 3 of the present invention
  • FIG. 4 is a schematic structural diagram of a handwriting curve generating device for a touch screen according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic structural diagram of a computer device according to Embodiment 5 of the present invention.
  • FIG. 1 is a flowchart of a method for generating a handwriting curve for a touch screen according to Embodiment 1 of the present invention.
  • the present embodiment is applicable to a case where a handwriting curve is generated by using Bessel, and the method can be implemented by the present invention.
  • the handwriting curve generating device for the touch screen is provided for execution, and the device can be implemented by software and/or hardware. Referring to FIG. 1a, the method may specifically include the following steps:
  • the touch data of each touch point in the touch operation of the user is acquired.
  • the user's touch operation may be generated by a touch screen of the user's finger, or may be generated by operating the touch screen by a touch pen, wherein the touch screen may be a capacitive screen, an electromagnetic screen or an infrared touch screen or the like.
  • the touch screen is a electromagnetic screen
  • the electromagnetic pen is used as a touch pen.
  • the touch data includes an abscissa value and an ordinate value of the touch point.
  • the acquiring touch data of each touch point in the touch operation of the user includes: collecting each touch point in the touch operation according to the set time period, and acquiring an abscissa value and an ordinate value of the touch points.
  • the touch screen collects each touch point in the touch operation according to the set time period after detecting the touch operation.
  • the set time period may be 30 milliseconds.
  • the touch data is reported to the application layer, and the application layer records the touch data to obtain each The abscissa value and the ordinate value of the touch point, wherein the abscissa value and the ordinate value show the position of the touch point in the touch screen, and the numerical unit of the abscissa value and the ordinate value are not limited, and the numerical unit may be
  • the value of the order in which the pixels are arranged may also be the number of centimeters or millimeters from the left or upper edge of the touch screen.
  • S120 Predict a distance between adjacent touch points according to a set prediction rule to obtain a predicted distance between the adjacent touch points.
  • the number of touched points is at least two, and the distance between adjacent touched points is predicted according to the set prediction rule, and the set prediction rule may be determined according to a prediction algorithm to obtain between adjacent touched points. Forecast distance.
  • predictive distance Said.
  • the touch point corresponding to the predicted distance is a control point.
  • the touch points corresponding to each prediction distance are two, and are selected according to the order of the touch operations.
  • the touch points in which the time of the two touch points are later than the latter are used as the control points.
  • the existing Bezier curve is used to generate the handwriting curve by using the existing control point.
  • the Bezier curve is a mathematical curve applied to a two-dimensional graphics application.
  • a general vector graphic uses it to accurately draw a curve.
  • a Bezier curve is composed of a line segment or a node, and the node is a draggable pivot point.
  • the Searle curve is an important parameter curve in computer graphics.
  • FIG. 1b shows a case where there is an abnormal point in the touch data
  • FIG. 1c shows a Bezier curve drawn according to FIG. 1b
  • FIG. 1d shows a filtering Abnormal point After the Bezier curve.
  • the sliding speed is usually close to a uniform speed, so that the point C in FIG. 1b is an abnormal point
  • FIG. 1c shows that the Bezier curve has a polygonal line due to the existence of the abnormal point C.
  • Figure 1d shows that after the abnormal point C is filtered out, the Bezier curve is a smooth normal Bezier curve.
  • the touch data of each touch point in the touch operation of the user is acquired, and the distance between adjacent touch points is predicted according to the set prediction rule to obtain the between the adjacent touch points. Determining the distance, and then determining that when the predicted distance and the actual distance between the adjacent touch points satisfy the set distance condition, determining that the touch point corresponding to the predicted distance is a control point, and pressing the control point according to The set Bezier curve generates a handwriting curve. It solves the problem of the polyline generated when drawing the handwriting curve with Bezier curve, making the handwriting curve drawn more rounded.
  • FIG. 2a is a flowchart of a method for generating a handwriting curve of a touch screen according to Embodiment 2 of the present invention.
  • the preset prediction rule is optimized to apply a Kalman filter.
  • the method may specifically include the following steps:
  • FIG. 2b shows the relative position of each touch point when the finger touches the screen, wherein the A point is the first time when the finger touches the screen.
  • Point, B is the second point, and in turn, the 10 touch points are C, D, E, F, G, H, I.
  • the distance between adjacent touch points is calculated according to the coordinates of each touch point. Taking A and B as examples, let the coordinates of point A be (x A , x B ), the coordinates of point B (y A , y B ), and calculate the point between two points of AB when the finger passes point B.
  • the distance calculation method between the remaining adjacent points is the same as the distance calculation method between the two points of AB, and will not be described here. It should be noted that since point A is the first point, the distance has not been generated at the moment when the finger passes A, so it is not necessary to calculate any distance at this time.
  • a Kalman filter is applied to predict the distance between each adjacent touch point.
  • each touch process includes: a finger press, a finger swipe, and a finger lift.
  • the Kalman filter needs to be initialized every time the finger is pressed.
  • the Kalman filter needs to be initialized, that is, the point and point are calculated for the first time.
  • the Kalman filter needs to be initialized. For example, it is necessary to initialize the Kalman filter with Dist AB , and the touch points C, D, E, F, G, H, I, J, etc. need to use Dist.
  • the update process of the Kalman filter is to predict the target value of the current time by applying the target value and the set parameter at the previous moment, wherein the set parameters include Kalman gain, control input, process noise, etc.
  • the target value may be a distance between adjacent touch points.
  • the relationship between the predicted distance, the actual distance, the state transition matrix, and the measurement matrix is as follows: Where A(n-1) can take a constant H(n) can take a constant K(n) is the Kalman gain, and the calculation process of K(n) is not described here.
  • the present invention by calculating an actual distance between adjacent touch points according to the touch data, using an actual distance between the adjacent touch points, and applying a Kalman filter to the adjacent touch points.
  • the distance between the two is predicted to obtain a predicted distance between the adjacent touch points.
  • the relationship between the predicted distance and the actual distance by each touch point provides a basis for the determination of the touch point.
  • FIG. 3 is a flowchart of a method for generating a handwriting curve for a touch screen according to Embodiment 3 of the present invention.
  • this embodiment is for “When the predicted distance and the adjacent touch are When the actual distance between the points satisfies the set distance condition, it is determined that the touch point corresponding to the predicted distance is the control point.
  • the method may specifically include the following steps:
  • the set distance condition is that the difference between the actual distance and the predicted distance is less than zero, and the absolute value of the difference is greater than the actual distance multiplied by the set coefficient, and the set coefficient is set according to the user's requirement, and is expressed by a formula. as follows: Diff ⁇ 0,
  • the touched point corresponding to the predicted distance that does not satisfy the set distance condition is filtered out, and the touched point corresponding to the predicted distance that satisfies the set distance condition is the control point.
  • the filtered touch point is only filtered when the Bezier curve is drawn, that is, it is not used as a control point, and all touch points are retained in the process of determining the control point.
  • point C is After filtering, point C is not used as a control point for the Bezier curve.
  • the determination of the control point is achieved by whether the difference between the distances satisfies the set distance condition.
  • control point is generated according to the set Bezier curve, and specifically, the Bezier curve corresponding to the control point is selected as the set Bose according to the number of the control points. Curve; the control point is generated according to the set Bezier curve.
  • the Bezier curve corresponding to the control point is selected according to the number of control points.
  • the quadratic Bezier curve can be selected as the set Bezier curve; If the control point is four, the cubic Bezier curve can be selected as the set Bezier curve. It should be noted that the number of control points and the selection of the set Bezier curve are not unique. If the second Bezier curve is selected as the set Bezier curve, then ABC three points are sequentially drawn.
  • Searle curve, BCD draws a Bezier curve at three points, and so on, each segment of Bezier curve constitutes a complete Bezier curve; if three times Bezier curve is selected for the set Bezier wireless, then ABCD Four points are sequentially drawn to form a Bezier curve, four points of BCDE are sequentially drawn to form a Bezier curve, and so on, and each segment of Bezier curve constitutes a complete Bezier curve. The generation of the handwriting curve according to the set Bezier curve is realized.
  • Figure 3b shows a Bezier curve drawn without using this scheme (when there is an abnormal point)
  • Figure 3c shows a drawing using this scheme (after filtering out the anomaly point) Bezier curve. It can be seen that in Figure 3b, there are line problems at 350 and 360, and the Bezier curve of Figure 3c is smoother than the Bezier curve of Figure 3b.
  • FIG. 4 is a schematic structural diagram of a handwriting curve generating device for a touch screen according to a fourth embodiment of the present invention, which is suitable for performing handwriting curve generation for a touch screen provided by an embodiment of the present invention. method.
  • the device may specifically include:
  • the data acquisition module 410 is configured to acquire touch data of each touch point in a touch operation of the user;
  • the distance prediction module 420 is configured to predict a distance between adjacent touch points according to the set prediction rule to obtain a predicted distance between the adjacent touch points;
  • a control point determining module 430 configured to: when the actual distance between the predicted distance and the adjacent touch point meets the set distance condition, determine that the touch point corresponding to the predicted distance is a control point;
  • the handwriting curve generating module 440 is configured to generate the handwriting curve according to the set Bezier curve.
  • the set prediction rule includes applying a Kalman filter for prediction
  • the distance prediction module 420 is specifically configured to:
  • control point determining module 430 is specifically configured to:
  • the handwriting curve generating module 440 is specifically configured to:
  • the control point is generated according to the set Bezier curve.
  • the touch data includes an abscissa value and an ordinate value of the touch point
  • the data obtaining module 410 is specifically configured to:
  • the handwriting curve generating device for the touch screen provided by the embodiment of the present invention can execute the handwriting curve generating method for the touch screen provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the executing method.
  • FIG. 5 is a schematic structural diagram of a computer device according to Embodiment 5 of the present invention.
  • FIG. 5 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention.
  • the computer device 12 shown in FIG. 5 is merely an example and should not impose any limitation on the function and scope of use of the embodiments of the present invention.
  • computer device 12 is embodied in the form of a general purpose computing device.
  • Components of computer device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and bus 18 that connects different system components, including system memory 28 and processing unit 16.
  • Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA Bus, a Video Electronics Standards Association (VESA) local bus, and peripheral component interconnects ( PCI) bus.
  • ISA Industry Standard Architecture
  • MAC Micro Channel Architecture
  • VESA Video Electronics Standards Association
  • PCI peripheral component interconnects
  • Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including both volatile and nonvolatile media, removable and non-removable media.
  • System memory 28 can include computer system readable media in the form of volatile memory, for example with The machine accesses memory (RAM) 30 and/or cache memory 32.
  • Computer device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 34 may be used to read and write non-removable, non-volatile magnetic media (not shown in Figure 5, commonly referred to as a "hard disk drive”).
  • a disk drive for reading and writing to a removable non-volatile disk such as a "floppy disk”
  • a removable non-volatile disk such as a CD-ROM, DVD-ROM
  • each drive can be coupled to bus 18 via one or more data medium interfaces.
  • Memory 28 can include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
  • a program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more applications, other programs Modules and program data, each of these examples or some combination may include an implementation of a network environment.
  • Program module 42 typically performs the functions and/or methods of the described embodiments of the present invention.
  • Computer device 12 may also be in communication with one or more external devices 14 (eg, a keyboard, pointing device, display 24, etc.), and may also be in communication with one or more devices that enable a user to interact with the computer device 12, and/or Any device (eg, a network card, modem, etc.) that enables the computer device 12 to communicate with one or more other computing devices. This communication can take place via an input/output (I/O) interface 22. Also, computer device 12 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18.
  • external devices 14 eg, a keyboard, pointing device, display 24, etc.
  • Any device eg, a network card, modem, etc.
  • network adapter 20 communicates with other modules of computer device 12 via bus 18.
  • Hardware and/or software modules including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
  • the processing unit 16 executes various functions and data processing by running a program stored in the system memory 28, for example, the handwriting curve generating method for the touch screen provided by the embodiment of the present invention is implemented:
  • the processing unit executes the program, acquiring: acquiring touch data of each touch point in a touch operation of the user; predicting a distance between adjacent touch points according to the set prediction rule, to obtain the a predicted distance between adjacent touch points; when the actual distance between the predicted distance and the adjacent touch point satisfies the set distance condition, determining that the touch point corresponding to the predicted distance is a control point; The control point generates a handwriting curve according to the set Bezier curve.
  • the sixth embodiment of the present invention provides a computer readable storage medium, where the computer program is stored, and the program is executed by the processor to implement the handwriting curve generation method for the touch screen provided by the embodiments of the present invention.
  • the touch data of each touch point in the touch operation of the user is acquired; the distance between adjacent touch points is predicted according to the set prediction rule to obtain the adjacent a predicted distance between the touched points; when the actual distance between the predicted distance and the adjacent touched point satisfies the set distance condition, determining that the touched point corresponding to the predicted distance is a control point; The control point generates a handwriting curve according to the set Bezier curve.
  • the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
  • the computer readable storage medium can be, for example So, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples (non-exhaustive lists) of computer readable storage media include: electrical connections having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • a computer readable storage medium can be any tangible medium that can contain or store a program, which can be used by or in connection with an instruction execution system, apparatus or device.
  • a computer readable signal medium may include a data signal that is propagated in the baseband or as part of a carrier, carrying computer readable program code. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer readable signal medium can also be any computer readable medium other than a computer readable storage medium, which can transmit, propagate, or transport a program for use by or in connection with the instruction execution system, apparatus, or device. .
  • Program code embodied on a computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including an object oriented programming language - such as Java, Smalltalk, C++, and also conventional. Procedural programming language - such as the "C" language or a similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer, partly on the remote computer, or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • an Internet service provider to connect via the Internet

Abstract

一种用于触控屏的笔迹曲线生成方法、装置、设备和存储介质,该方法包括:获取用户的触摸操作中各触摸点的触摸数据(S110);按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离(S120);当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点(S130);将所述控制点按照设定的贝塞尔曲线生成笔迹曲线(S140)。该方法解决了在利用贝塞尔曲线绘制笔迹曲线时产生的折线问题,使绘制的笔迹曲线更圆滑。

Description

用于触控屏的笔迹曲线生成方法、装置、设备和存储介质 技术领域
本发明涉及触控技术,尤其涉及一种用于触控屏的笔迹曲线生成方法、装置、设备和存储介质。
背景技术
在现有的一些画图软件或画图工具中,通常利用贝塞尔公式算法根据控制点生成贝塞尔曲线。
在现有的智能交互平板中,通常采用触摸数据点作为控制点来绘制贝塞尔曲线。当触摸设备由于采样率低或者噪声干扰产生异常触摸数据。如果将异常触摸数据的数据点作为控制点来绘制贝塞尔曲线,就会造成折线现象。
发明内容
本发明实施例提供一种用于触控屏的笔迹曲线生成方法、装置、设备和存储介质,解决了在利用贝塞尔曲线绘制笔迹曲线时产生的折线问题,使绘制的笔迹曲线更圆滑。
第一方面,本发明实施例提供了一种用于触控屏的笔迹曲线生成方法,所述方法包括:
获取用户的触摸操作中各触摸点的触摸数据;
按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离;
当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点;
将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
第二方面,本发明实施例还提供了一种用于触控屏的笔迹曲线生成装置,所述装置包括:
数据获取模块,用于获取用户的触摸操作中各触摸点的触摸数据;
距离预测模块,用于按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离;
控制点确定模块,用于当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点;
笔迹曲线生成模块,用于将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
第三方面,本发明实施例还提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如本发明实施例中任一所述的用于触控屏的笔迹曲线生成方法。
第四方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明实施例中任一所述的用于触控屏的笔迹曲线生成方法。
本发明实施例中,通过获取用户的触摸操作中各触摸点的触摸数据,按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离,然后判断当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点,将所述 控制点按照设定的贝塞尔曲线生成笔迹曲线。解决了在利用贝塞尔曲线绘制笔迹曲线时产生的折线问题,使绘制的笔迹曲线更圆滑。
附图说明
图1a是本发明实施例一中的一种用于触控屏的笔迹曲线生成方法的流程图;
图1b是本发明实施例一所适用的一种触摸数据中存在异常点的情况示意图;
图1c是本发明实施例一所适用的一种根据图1b绘制出的贝塞尔曲线的示意图;
图1d是本发明实施例一所适用的一种滤除异常点之后的贝塞尔曲线的示意图;
图2a是本发明实施例二中的一种用于触控屏的笔迹曲线生成方法的流程图;
图2b是本发明实施例二所适用的一种手指触摸屏幕时各触摸点的相对位置示意图;
图3a是本发明实施例三中的一种用于触控屏的笔迹曲线生成方法的流程图;
图3b是本发明实施例三所适用的一种未使用本方案(存在异常点时)绘制的贝塞尔曲线的示意图;
图3c是本发明实施例三所适用的一种使用本方案(滤除异常点后)绘制的贝塞尔曲线的示意图;
图4是本发明实施例四中的一种用于触控屏的笔迹曲线生成装置的结构示意图;
图5是本发明实施例五中的一种计算机设备的结构示意图。
具体实施方式
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。
实施例一
图1a为本发明实施例一提供的一种用于触控屏的笔迹曲线生成方法的流程图,本实施例可适用于利用贝塞尔生成笔迹曲线的情况,该方法可以由本发明是实施例提供的用于触控屏的笔迹曲线生成装置来执行,该装置可采用软件和/或硬件的方式实现。参考图1a,该方法具体可以包括如下步骤:
S110、获取用户的触摸操作中各触摸点的触摸数据。
具体的,当用户在智能设备上进行触摸操作时,获取用户的触摸操作中各触摸点的触摸数据。示例性的,用户的触摸操作可以是通过用户的手指对触摸屏进行触摸产生,也可以是通过触摸笔对触摸屏进行操作产生,其中,触摸屏可以是电容屏、电磁屏或红外触摸屏等。可选的,当触摸屏为电磁屏时,将电磁笔作为触摸笔使用。
可选的,所述触摸数据包括所述触摸点的横坐标值和纵坐标值。相应的,所述获取用户的触摸操作中各触摸点的触摸数据,包括:按照设定的时间周期采集触摸操作中各触摸点,并获取所述各触摸点的横坐标值和纵坐标值。
其中,触摸屏在检测到触摸操作后,按照设定的时间周期采集触摸操作中的各触摸点。可选的,设定的时间周期可以是30毫秒。触摸屏获取用户的触摸操作后,将触摸数据上报给应用层,应用层对触摸数据进行记录,以获取各个 触摸点的横坐标值和纵坐标值,其中,横坐标值和纵坐标值示出了触摸点在触摸屏中的位置,对横坐标值和纵坐标值的数值单位不做限定,数值单位可以是像素点的排列顺序的数值,也可以是距离触摸屏左侧边缘或上侧边缘的厘米数或毫米数。
S120、按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离。
具体的,触摸点的个数至少为两个,按照设定的预测规则对相邻触摸点之间的距离进行预测,设定的预测规则可以根据预测算法制定,获取相邻触摸点之间的预测距离。可选的,预测距离用
Figure PCTCN2017116744-appb-000001
表示。
S130、当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点。
具体的,判断相邻触摸点之间的预测距离和实际距离满足设定的条件时,将该预测距离对应的触摸点为控制点。需要说明的是,每个预测距离对应的触摸点为两个,按照触摸操作的先后顺序选择,这里将两个触摸点中案时间顺序较后一个出现的触摸点作为控制点。
S140、将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
具体的,在确定了具体的控制点之后,利用现有的控制点,采用设定的贝塞尔曲线生成笔迹曲线。其中,贝塞尔曲线是应用于二维图形应用程序的数学曲线,一般的矢量图形通过它来精确画出曲线,贝塞尔曲线是由线段或节点组成,节点是可拖动的支点,贝塞尔曲线是计算机图形学中重要的参数曲线。
在一个具体的例子中,图1b示出了一种触摸数据中存在异常点的情况,图1c示出了一种根据图1b绘制出的贝塞尔曲线,图1d示出了一种滤除异常点之 后的贝塞尔曲线。可以看出,用户在触摸屏上滑动的过程中,滑动速度通常是接近匀速的,因此可知图1b中的C点为异常点,图1c表明由于异常点C的存在,贝塞尔曲线存在折线的情况(折线部分在B、C点之间),图1d表明滤除异常点C之后,贝塞尔曲线为平滑的正常贝塞尔曲线。
本发明实施例中,通过获取用户的触摸操作中各触摸点的触摸数据,按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离,然后判断当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点,将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。解决了在利用贝塞尔曲线绘制笔迹曲线时产生的折线问题,使绘制的笔迹曲线更圆滑。
实施例二
图2a为本发明实施例二提供的一种用于触控屏的笔迹曲线生成方法的流程图,本实施例在上述实施例的基础上,将设定的预测规则优化为应用卡尔曼滤波器进行预测时,并对“按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离”进行了优化。参考图2a,该方法具体可以包括如下步骤:
S210、获取用户的触摸操作中各触摸点的触摸数据。
S220、根据所述触摸数据计算相邻触摸点之间的实际距离。
具体的,根据触摸数据计算相邻触摸点之间的实际距离。在一个具体的例子中,以采集到触摸操作中10个触摸点为例,图2b示出了一种手指触摸屏幕时各触摸点的相对位置,其中,A点为手指触摸屏时的第一个点,B为第二个点, 依次下去,10个触摸点分别为C、D、E、F、G、H、I。根据各触摸点的坐标计算相邻触摸点之间的距离。以A、B两点为例,设A点的坐标是(xA,xB),B点的坐标(yA,yB),则在手指经过B点时,计算AB两点之间的距离为
Figure PCTCN2017116744-appb-000002
同理,其余相邻点之间的距离计算方法和AB两点之间的距离计算方法相同,在此不再赘述。需要说明的是,由于A点是第一个点,则在手指经过A的瞬间还未产生距离,因此此时不需要计算任何距离。
S230、利用所述相邻触摸点之间的实际距离,并应用卡尔曼滤波器对所述相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离。
具体的,在确定了各相邻触摸点之间的实际距离后,应用卡尔曼滤波器对各相邻触摸点之间的距离进行预测。可选的,以手指触摸为例,每一次触摸过程包括:手指按下、手指滑动和手指抬起。在卡尔曼滤波器在使用过程中,在每次手指按下时都需要初始化卡尔曼滤波器,每一次触摸过程中,都需要初始化卡尔曼滤波器,也即,在第一次计算点与点之间的距离时,需要初始化卡尔曼滤波器,例如,需要用DistAB去初始化卡尔曼滤波器,而之后的触摸点C、D、E、F、G、H、I、J等需要用DistBC、DistCD、DistDE、DistEF、DistFG、DistGH、DistHI、DistIJ分别取去更新卡尔曼滤波器。需要说明的是,卡尔曼滤波器的更新过程为应用前一时刻的目标值和设定的参数去预测当前时刻的目标值,其中,设定的参数包括卡尔曼增益、控制输入、过程噪声等,具体的更新过程在此不再赘述。可选的,在本发明实施例中,目标值可以是相邻触摸点之间的距离。
在一个具体的例子中,定义状态向量其中,dn为触摸点之间的距离,如DistAB、DistBC、DistCD、DistDE、DistEF、DistFG、DistGH、DistHI、DistIJ, vdn表示表示dn的变换速度,在本例中相当于n=B、C、D、E、F、G、H、I。可选的;定义状态转移矩阵
Figure PCTCN2017116744-appb-000004
每次的测量值有一个,即当前点与前一个点之间的距离,因此测量值yn=[dn];定义测量矩阵
Figure PCTCN2017116744-appb-000005
在这个例子中系统没有控制输入,因此控制输入的矩阵取0(该0代表零矩阵,而不是数字0)。在每次触摸过程中的第二个点(在这个例子中为点B)时计算与第一个点触摸点之间的距离为d0,则
Figure PCTCN2017116744-appb-000006
预测各触摸点之间的距离并更新卡尔曼滤波器,在第三个触摸点开始,将计算的各相邻触摸点之间的距离Distn带入卡尔曼滤波器的更新方程,并获取预测的距离值
Figure PCTCN2017116744-appb-000007
Figure PCTCN2017116744-appb-000008
在这个具体的例子中,预测距离、实际距离、状态转移矩阵和测量矩阵之间的关系如下:
Figure PCTCN2017116744-appb-000009
Figure PCTCN2017116744-appb-000010
其中,A(n-1)可以取常量
Figure PCTCN2017116744-appb-000011
H(n)可以取常量
Figure PCTCN2017116744-appb-000012
K(n)为卡尔曼增益,K(n)的计算过程不在此赘述。
S240、当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点。
S250、将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
本发明实施例中,通过根据所述触摸数据计算相邻触摸点之间的实际距离,利用所述相邻触摸点之间的实际距离,并应用卡尔曼滤波器对所述相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离。通过各触摸点预测距离和实际距离之间的关系,为触摸点的滤除提供了判断基础。
实施例三
图3a为本发明实施例三提供的一种用于触控屏的笔迹曲线生成方法的流程图,本实施例在上述实施例的基础上,对“当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点”进行了优化。参考图3a,该方法具体可以包括如下步骤:
S310、获取用户的触摸操作中各触摸点的触摸数据。
S320、按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离。
S330、当所述相邻触摸点之间的实际距离与所述对应的预测距离之差满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点。
具体的,判断相邻触摸点之间的实际距离与对应的预测距离之差是否满足设定的距离条件。可选的,设定的距离条件为实际距离和预测距离之差小于零,且差的绝对值大于实际距离乘以设定的系数,设定的系数根据用户的需求进行设定,用公式表示如下:
Figure PCTCN2017116744-appb-000013
满足diff<0,|diff|>r×y(n),其中,r为设定的系数。将不满足设定的距离条件的预测距离对应的触摸点滤除,将满足设定的距离条件的预测距离对应的触摸点为控制点。需要说明的是,滤除的触摸点只是在绘制贝塞尔曲线时候滤除,也即,不将其作为控制点,在确定控制点的过程中保留全部触摸点,参考图1d,将C点滤除后,则C点不作为贝塞尔曲线的控制点。
S340、将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
本发明实施例中,通过判断相邻触摸点之间的实际距离与所述对应的预测 距离之差是否满足设定的距离条件来实现对控制点的确定。
可选的,将所述控制点按照设定的贝塞尔曲线生成笔迹曲线,具体可以是:根据所述控制点的数量选择与所述控制点对应的贝塞尔曲线作为设定的贝塞尔曲线;将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
其中,结合控制点的数量选择与控制点对应的贝塞尔曲线,在一个具体的例子中,若控制点为三个,则可以选择二次贝塞尔曲线作为设定的贝塞尔曲线;若控制点为四个,则可以选的三次贝塞尔曲线作为设定的贝塞尔曲线。需要说明的是,控制点的数量和设定的贝塞尔曲线的选择不是唯一对应的,选择了二次贝塞尔曲线为设定的贝塞尔曲线,则ABC三点顺次绘制一段贝塞尔曲线,BCD三点绘制一段贝塞尔曲线,以此类推,各段贝塞尔曲线组成完整的贝塞尔曲线;若选择三次贝塞尔曲线为设定的贝塞尔无线,则ABCD四点顺次绘制一段贝塞尔曲线,BCDE四个点顺次绘制一段贝塞尔曲线,以此类推,各段贝塞尔曲线组成完整的贝塞尔曲线。实现了根据设定的贝塞尔曲线对笔迹曲线的生成。
在一个具体的例子中,图3b示出了一种未使用本方案(存在异常点时)绘制的贝塞尔曲线,图3c示出了一种使用本方案(滤除异常点后)绘制的贝塞尔曲线。可以看出,在图3b中,350和360处有折线问题,图3c的贝塞尔曲线比图3b的贝塞尔曲线更平滑。
实施例四
图4是本发明是实施例四提供的一种用于触控屏的笔迹曲线生成装置的结构示意图,该装置适用于执行本发明实施例提供给的一种用于触控屏的笔迹曲线生成方法。如图4所示,该装置具体可以包括:
数据获取模块410,用于获取用户的触摸操作中各触摸点的触摸数据;
距离预测模块420,用于按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离;
控制点确定模块430,用于当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点;
笔迹曲线生成模块440,用于将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
进一步的,所述设定的预测规则包括应用卡尔曼滤波器进行预测;
相应的,距离预测模块420具体用于:
根据所述触摸数据计算相邻触摸点之间的实际距离;
利用所述相邻触摸点之间的实际距离,并应用卡尔曼滤波器对所述相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离。
进一步的,控制点确定模块430具体用于:
当所述相邻触摸点之间的实际距离与所述对应的预测距离之差满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点。
进一步的,笔迹曲线生成模块440具体用于:
根据所述控制点的数量选择与所述控制点对应的贝塞尔曲线作为设定的贝塞尔曲线;
将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
进一步的,所述触摸数据包括所述触摸点的横坐标值和纵坐标值;
相应的,数据获取模块410具体用于:
按照设定的时间周期采集触摸操作中各触摸点,并获取所述各触摸点的横 坐标值和纵坐标值。
本发明实施例提供的用于触控屏的笔迹曲线生成装置可执行本发明任意实施例提供的用于触控屏的笔迹曲线生成方法,具备执行方法相应的功能模块和有益效果。
实施例五
图5为本发明实施例五提供的一种计算机设备的结构示意图。图5示出了适于用来实现本发明实施方式的示例性计算机设备12的框图。图5显示的计算机设备12仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图5所示,计算机设备12以通用计算设备的形式表现。计算机设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。
计算机设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随 机存取存储器(RAM)30和/或高速缓存存储器32。计算机设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图5未显示,通常称为“硬盘驱动器”)。尽管图5中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本发明所描述的实施例中的功能和/或方法。
计算机设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该计算机设备12交互的设备通信,和/或与使得该计算机设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,计算机设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与计算机设备12的其它模块通信。应当明白,尽管图5中未示出,可以结合计算机设备12使用其它 硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现本发明实施例所提供的用于触控屏的笔迹曲线生成方法:
也即,所述处理单元执行所述程序时实现:获取用户的触摸操作中各触摸点的触摸数据;按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离;当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点;将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
实施例六
本发明实施例六提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请所有发明实施例提供的用于触控屏的笔迹曲线生成方法:
也即,该程序被处理器执行时实现:获取用户的触摸操作中各触摸点的触摸数据;按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离;当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点;将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可 以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言-诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言-诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形 中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)-连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。

Claims (10)

  1. 一种用于触控屏的笔迹曲线生成方法,其特征在于,包括:
    获取用户的触摸操作中各触摸点的触摸数据;
    按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离;
    当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点;
    将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
  2. 根据权利要求1所述的方法,其特征在于,所述设定的预测规则包括应用卡尔曼滤波器进行预测;
    相应的,所述按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离,包括:
    根据所述触摸数据计算相邻触摸点之间的实际距离;
    利用所述相邻触摸点之间的实际距离,并应用卡尔曼滤波器对所述相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离。
  3. 根据权利要求1所述的方法,其特征在于,所述当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点,包括:
    当所述相邻触摸点之间的实际距离与所述对应的预测距离之差满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点。
  4. 根据权利要求1所述的方法,其特征在于,所述将所述控制点按照设定的贝塞尔曲线生成笔迹曲线,包括:
    根据所述控制点的数量选择与所述控制点对应的贝塞尔曲线作为设定的贝 塞尔曲线;
    将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
  5. 根据权利要求1所述的方法,其特征在于,所述触摸数据包括所述触摸点的横坐标值和纵坐标值;
    相应的,所述获取用户的触摸操作中各触摸点的触摸数据,包括:
    按照设定的时间周期采集触摸操作中各触摸点,并获取所述各触摸点的横坐标值和纵坐标值。
  6. 一种用于触控屏的笔迹曲线生成装置,其特征在于,包括:
    数据获取模块,用于获取用户的触摸操作中各触摸点的触摸数据;
    距离预测模块,用于按照设定的预测规则对相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离;
    控制点确定模块,用于当所述预测距离和所述相邻触摸点之间的实际距离满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点;
    笔迹曲线生成模块,用于将所述控制点按照设定的贝塞尔曲线生成笔迹曲线。
  7. 根据权利要求6所述的装置,其特征在于,所述设定的预测规则包括应用卡尔曼滤波器进行预测;
    相应的,所述距离预测模块具体用于:
    根据所述触摸数据计算相邻触摸点之间的实际距离;
    利用所述相邻触摸点之间的实际距离,并应用卡尔曼滤波器对所述相邻触摸点之间的距离进行预测,以获得所述各相邻触摸点之间的预测距离。
  8. 根据权利要求6所述的装置,其特征在于,所述控制点确定模块具体用 于:
    当所述相邻触摸点之间的实际距离与所述对应的预测距离之差满足设定的距离条件时,则确定所述预测距离对应的触摸点为控制点。
  9. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1-5中任一所述的方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-5中任一所述的方法。
PCT/CN2017/116744 2017-09-20 2017-12-17 用于触控屏的笔迹曲线生成方法、装置、设备和存储介质 WO2019056611A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710852514.3A CN107608619A (zh) 2017-09-20 2017-09-20 用于触控屏的笔迹曲线生成方法、装置、设备和存储介质
CN201710852514.3 2017-09-20

Publications (1)

Publication Number Publication Date
WO2019056611A1 true WO2019056611A1 (zh) 2019-03-28

Family

ID=61061331

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/116744 WO2019056611A1 (zh) 2017-09-20 2017-12-17 用于触控屏的笔迹曲线生成方法、装置、设备和存储介质

Country Status (2)

Country Link
CN (1) CN107608619A (zh)
WO (1) WO2019056611A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297677B (zh) * 2018-03-22 2022-12-23 斑马智行网络(香港)有限公司 绘制方法、装置、设备以及存储介质
WO2019222998A1 (zh) * 2018-05-25 2019-11-28 深圳市柔宇科技有限公司 一种数据处理方法、手写笔及存储介质
CN111443864B (zh) * 2020-04-14 2023-03-07 重庆赋比兴科技有限公司 基于iOS的曲线绘制方法
TWI751528B (zh) * 2020-04-14 2022-01-01 元太科技工業股份有限公司 電子紙顯示器及其驅動方法
CN111931735B (zh) * 2020-09-26 2020-12-29 绿漫科技有限公司 一种适用于iOS应用的手写签名方法
CN112835504B (zh) * 2021-02-05 2023-08-08 深圳市亿图软件有限公司 思维导图轨迹处理方法、装置、计算机设备及存储介质
CN114461091B (zh) * 2021-07-23 2022-12-16 荣耀终端有限公司 触控数据处理方法、键盘、设备、芯片及可读存储介质
CN115705104A (zh) * 2021-08-09 2023-02-17 广州视源电子科技股份有限公司 一种书写效果处理方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096530A (zh) * 2011-01-28 2011-06-15 广东威创视讯科技股份有限公司 一种多点触摸轨迹跟踪方法
CN102520849A (zh) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 电子毛笔书写方法及系统
CN102521858A (zh) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 电子毛笔书写笔迹生成方法
CN102622120A (zh) * 2011-01-31 2012-08-01 宸鸿光电科技股份有限公司 多点触控面板的触碰轨迹追踪方法
CN103425300A (zh) * 2012-05-14 2013-12-04 北京汇冠新技术股份有限公司 一种多点触摸轨迹跟踪方法
US20140292802A1 (en) * 2013-03-26 2014-10-02 Sharp Laboratories Of America, Inc. Methods and Systems for Correcting a Document Image

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375416B (zh) * 2010-08-13 2013-10-23 同济大学 基于快速搜索树的人型机器人踢球动作信息处理方法
CN103942552B (zh) * 2014-02-11 2017-02-08 北京大学 一种基于骨架指导的文字图像矢量化方法及系统
US10338725B2 (en) * 2014-09-29 2019-07-02 Microsoft Technology Licensing, Llc Wet ink predictor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096530A (zh) * 2011-01-28 2011-06-15 广东威创视讯科技股份有限公司 一种多点触摸轨迹跟踪方法
CN102622120A (zh) * 2011-01-31 2012-08-01 宸鸿光电科技股份有限公司 多点触控面板的触碰轨迹追踪方法
CN102520849A (zh) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 电子毛笔书写方法及系统
CN102521858A (zh) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 电子毛笔书写笔迹生成方法
CN103425300A (zh) * 2012-05-14 2013-12-04 北京汇冠新技术股份有限公司 一种多点触摸轨迹跟踪方法
US20140292802A1 (en) * 2013-03-26 2014-10-02 Sharp Laboratories Of America, Inc. Methods and Systems for Correcting a Document Image

Also Published As

Publication number Publication date
CN107608619A (zh) 2018-01-19

Similar Documents

Publication Publication Date Title
WO2019056611A1 (zh) 用于触控屏的笔迹曲线生成方法、装置、设备和存储介质
US8355007B2 (en) Methods for use with multi-touch displays for determining when a touch is processed as a mouse event
US20130027327A1 (en) Gesture recognition method and touch system incorporating the same
US10452205B2 (en) Three-dimensional touch device and method of providing the same
US9632693B2 (en) Translation of touch input into local input based on a translation profile for an application
JP2011526396A (ja) 仮想タッチパッド
US20150091832A1 (en) Information processing apparatus, information processing method, and program
US20120249448A1 (en) Method of identifying a gesture and device using the same
WO2019033655A1 (zh) 一种防误触的方法、装置、设备及存储介质
KR20210036319A (ko) 텍스트 콘텐츠의 식별 방법, 장치 및 전자 기기
WO2017028491A1 (zh) 触控显示设备及触控显示方法
US20140331145A1 (en) Enhancing a remote desktop with meta-information
US20150074597A1 (en) Separate smoothing filter for pinch-zooming touchscreen gesture response
US10394442B2 (en) Adjustment of user interface elements based on user accuracy and content consumption
WO2021244650A1 (zh) 控制方法、装置、终端及存储介质
CN110727383A (zh) 基于小程序的触控交互方法、装置、电子设备与存储介质
US11328693B2 (en) Image display device, method, medium and electronic device based on mobile terminal
WO2018098960A1 (zh) 一种触屏设备操作方法及触屏设备
CN110162251B (zh) 图像缩放方法及装置、存储介质、电子设备
US20170285902A1 (en) Modifying Settings of an Electronic Test or Measurement Instrument
CN114092556A (zh) 用于确定人体姿态的方法、装置、电子设备、介质
CN110070479B (zh) 图像变形拖拽点定位方法和装置
US20160132179A1 (en) Three Dimensional Object Manipulation Through A Flexible Display Device
CN112140118B (zh) 一种交互方法、装置、机器人和介质
US20230195288A1 (en) Method and apparatus for detecting a click on an icon, device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17925794

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17925794

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.10.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17925794

Country of ref document: EP

Kind code of ref document: A1