WO2020103053A1 - 手写笔迹处理方法、手写输入设备及计算机可读存储介质 - Google Patents

手写笔迹处理方法、手写输入设备及计算机可读存储介质

Info

Publication number
WO2020103053A1
WO2020103053A1 PCT/CN2018/116786 CN2018116786W WO2020103053A1 WO 2020103053 A1 WO2020103053 A1 WO 2020103053A1 CN 2018116786 W CN2018116786 W CN 2018116786W WO 2020103053 A1 WO2020103053 A1 WO 2020103053A1
Authority
WO
WIPO (PCT)
Prior art keywords
sampling point
attribute information
handwriting
current sampling
relative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/116786
Other languages
English (en)
French (fr)
Inventor
李友
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Royole Technologies Co Ltd
Original Assignee
Shenzhen Royole Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Royole Technologies Co Ltd filed Critical Shenzhen Royole Technologies Co Ltd
Priority to CN201880096013.XA priority Critical patent/CN112889017A/zh
Priority to PCT/CN2018/116786 priority patent/WO2020103053A1/zh
Publication of WO2020103053A1 publication Critical patent/WO2020103053A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a three-dimensional [3D] space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors

Definitions

  • the present application relates to the technical field of data processing, and in particular, to a method for processing handwriting, a handwriting input device, and a computer-readable storage medium.
  • the text content is usually handwritten on the handwriting input device by means of touch input.
  • the handwriting input device converts the real handwriting into electronic handwriting data And send the electronic handwriting to the display terminal (for example, mobile phone) for display.
  • the display terminal for example, mobile phone
  • the embodiments of the present application disclose a handwriting processing method, a handwriting input device, and a computer-readable storage medium, which can effectively compress handwriting data, reduce the burden of data storage and data transmission, and improve the user experience.
  • a method for processing handwriting disclosed in an embodiment of the present application is applied to a handwriting input device.
  • the method for processing handwriting includes the following steps:
  • the attribute information of the current sampling point is maintained
  • the relative change amount of the attribute information of the current sampling point and the attribute information of the previous sampling point is calculated to obtain relative attribute information.
  • a handwriting input device disclosed in an embodiment of the present application includes a memory and a processor.
  • the memory stores a corresponding program of a handwriting process method
  • the processor runs the corresponding program of the handwriting process method to perform the following operations:
  • attribute information of the current sampling point is maintained
  • the relative change amount of the attribute information of the current sampling point and the attribute information of the previous sampling point is calculated to obtain relative attribute information.
  • a computer-readable storage medium disclosed in an embodiment of the present application a program corresponding to a handwriting process method is stored on the computer-readable storage medium, and the program corresponding to the handwriting process method is executed by a processor to implement the above-mentioned handwriting Handwriting processing method.
  • the handwriting process method, handwriting input device and computer-readable storage medium of the present application when it is determined that the current sampling point is not the first sampling point, calculates the relative change of the attribute information of the current sampling point and the attribute information of the previous sampling point , Because the data of the relative change is small, the occupied memory and transmitted data bits are less than the original attribute information, which can effectively compress handwriting data, reduce the burden of data storage and data transmission, and improve the user experience .
  • FIG. 1 is a flowchart of a method for processing handwriting in an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a writing system in an embodiment of the application.
  • FIG. 3 is a schematic diagram of handwriting according to the calculation principle of the angle offset in an embodiment of the present application.
  • FIG. 4 is a flowchart of a method for processing handwriting in another embodiment of the present application.
  • FIG. 5 is a flowchart of a method for processing handwriting in yet another embodiment of the present application.
  • FIG. 6 is a flowchart of a method for processing handwriting in another embodiment of the present application.
  • FIG. 7 is a structural block diagram of a handwriting input device in an embodiment of the application.
  • FIG. 1 is a flowchart of a method for processing handwriting disclosed in an embodiment of the present application.
  • the method for processing handwriting is applied to a handwriting input device.
  • the method for processing handwriting includes the following steps:
  • step S11 the data points of the handwriting are sampled to obtain the current sampling point, and the attribute information of the current sampling point is obtained.
  • FIG. 2 is a block diagram of a writing control system 1000 according to an embodiment of the present application.
  • the writing control system 1000 includes a handwriting input device 300 and an electronic device 500.
  • the handwriting input device 300 is communicatively connected to the electronic device 500 via the network 600.
  • the handwriting input device 300 includes a handwriting input device 100 and a stylus pen 200, and the handwriting input device 100 and the stylus pen 200 can also be communicatively connected through the network 600.
  • the network 600 can be the Internet, On-Demand Virtual Lease Line, wireless network including WIFI, Bluetooth, and telephones including GPRS network and CDMA network. Networks, radio and television networks, etc.
  • the handwriting input device 100 is a handwriting tablet, and generates handwriting handwriting data by sensing the writing operation of the stylus 200, and sends the handwriting handwriting data to the electronic device 500 through the network 600 for display.
  • the electronic device 500 includes a display screen, and is communicatively connected to a plurality of handwriting input devices 100, that is, handwriting data of the plurality of handwriting input devices 100 are simultaneously sent to the electronic device 100 and displayed at the same time.
  • the electronic device 500 may also be in communication connection with a handwriting input device 100. It should be noted that the number of handwriting input devices 100 communicatively connected to the electronic device 500 may be determined according to specific usage conditions, and is not limited herein.
  • the handwriting input device 100 may also be disposed on the electronic device 500, that is, the handwriting input device 100 is an input device on the electronic device 500, and is controlled by the electronic device 500.
  • the handwriting input device 100 senses the writing operation of the stylus 200 to generate handwriting data, by performing a data point on the handwriting Sampling to get multiple sampling points, and obtain the attribute information of each sampling point.
  • the handwriting includes several data points. Sampling refers to sampling the data points in the handwriting.
  • the handwriting may include 5 data points, but only the first, third, and fifth data The points are sampled to obtain the current sampling points respectively. Therefore, in some embodiments, the data point may be the first data point in the handwritten note or any data point.
  • the first sampling point is not the first data point, it means that the sampling is started from the middle data point in the handwriting, not from the starting data point.
  • the attribute information includes but is not limited to coordinate attribute information, pressure attribute information, time attribute information, color attribute information, width attribute information, transparency attribute information, and the like.
  • the coordinate attribute information represents the position of each sampling point on the display screen of the handwriting input device 100 or the electronic device 500.
  • the position of the handwriting input device 100 and the position of the electronic device 500 have a one-to-one mapping relationship.
  • the coordinate attribute information includes X-axis and Y-axis data. Therefore, the position of each sampling point on the display screen can be determined according to the coordinate attribute information of each sampling point.
  • the pressure attribute information represents the pressure value of each sampling point, that is, the pressure value generated by the stylus 200 at each position on the handwriting input device 100 during handwriting input, wherein the pressure value affects handwriting Display effect.
  • the time attribute information represents the sampling time of each sampling point.
  • the time can be obtained by the system clock of the handwriting input device 100. For example, when the time for sampling the handwriting for the first time is 10:01, the time is used as the time attribute information of the first sampling point. Therefore, the time attribute information of each sampling point is different, and the sampling order of multiple sampling points can be determined by the time attribute information.
  • the color attribute information represents the color of each sampling point.
  • the color of the handwriting may be red, yellow, or green.
  • the width attribute information represents the width of each sampling point.
  • the width of the handwriting may be 1 mm, 0.5 mm, etc.
  • the transparency attribute information represents the transparency of each sampling point.
  • the transparency may be 90% or 95%.
  • step S12 it is judged whether the current sampling point is the first sampling point; if so, step S13 is executed; if not, step S14 is executed.
  • step S13 the attribute information of the current sampling point is maintained.
  • step S14 the relative change amount of the attribute information of the current sampling point and the attribute information of the previous sampling point is calculated to obtain relative attribute information.
  • the amount of change of the X-axis and Y-axis data of the current sampling point relative to the X-axis and Y-axis of the previous sampling point can be calculated, and further according to the X-axis and Y-axis
  • the amount of change in the axis calculates the angular offset as relative attribute information; when the attribute information includes pressure attribute information, the amount of change in the pressure data of the current sampling point relative to the pressure data of the previous sampling point can be calculated as relative attribute information
  • the attribute information includes time attribute information
  • the amount of change of the time data of the current sampling point relative to the time data of the previous sampling point can be calculated as relative attribute information, which is not limited herein.
  • the handwriting writing processing method disclosed in this application maintains the attribute information of the current sampling point when determining that the current sampling point is the first sampling point, and calculates the attribute of the current sampling point when determining that the current sampling point is not the first sampling point.
  • the relative change between the information and the attribute information of the previous sampling point because the data of the relative change is small, the occupied storage space and data bits are less than the original attribute information, so that the handwriting data can be effectively Compression reduces the burden of data storage and data transmission and improves the user experience.
  • the attribute information includes coordinate attribute information.
  • the calculating the relative change of the attribute information of the current sampling point and the previous sampling point to obtain relative attribute information includes: calculating the relative change of the coordinate attribute information of the current sampling point and the coordinate attribute information of the previous sampling point To obtain relative coordinate attribute information, calculate the angular offset between the current sampling point and the previous sampling point according to the relative coordinate attribute information, to obtain the relative attribute information including the angular offset.
  • the electronic device 500 can determine the absolute coordinate information of the second sampling point, and so on, the receiving end can calculate the absolute coordinate attribute information of the subsequent sampling point, and then determine the X-axis and Y-axis coordinate values of each sampling point .
  • the calculation of the relative change between the attribute information of the current sampling point and the previous sampling point to obtain relative attribute information includes: calculating the coordinate attribute information of the current sampling point and the previous sampling point. The relative change amount of the coordinate attribute information to obtain the relative coordinate attribute information, thereby obtaining the relative attribute information including the relative coordinate attribute information.
  • the sampling the data points of the handwriting to obtain the current sampling point includes: sampling the data points of the handwriting with a sampling distance R.
  • the sampling distance R refers to the distance between two adjacent sampling points, that is, the length of a straight line segment between the current sampling point and the previous sampling point. It can be understood that the sampling distance R may be the same or different. Taking the word "person" as an example, the sampling distance between the first sampling point and the second sampling point is R, the sampling distance between the third sampling point and the second sampling point is also R, and so on The sampling distance between the Nth sampling point and the N-1th sampling point is also R. Among them, N is a positive integer greater than 1.
  • the angular offset between the current sampling point and the previous sampling point is calculated according to the relative coordinate attribute information to obtain the relative attribute information including the angular offset
  • the information includes:
  • the sampling distance R and the relative coordinate attribute information calculate the angular offset ⁇ between the current sampling point and the previous sampling point to obtain the relative attribute information including the angular offset ⁇ .
  • the sampling distance R can be set by the user or can be the system default, which is not limited herein.
  • the calculating the angular offset ⁇ between the current sampling point and the previous sampling point according to the sampling distance R and the relative coordinate attribute information includes:
  • the previous sampling point establishes a Cartesian coordinate system for the coordinate origin, and calculates the relative coordinate attribute information according to the Cartesian coordinate system.
  • the Cartesian coordinate system is a rectangular coordinate system.
  • the first sampling point may also be used to establish a Cartesian coordinate system for the coordinate origin, and then the coordinates of other sampling points, that is, relative coordinates, may be known.
  • the angle offset ⁇ refers to the angle between the line segment of the straight line formed by the current sampling point and the previous sampling point and the positive X axis in the Cartesian coordinate system in the second quadrant direction. Therefore, you can first calculate ⁇ 'based on the absolute value of the sampling distance R and the change in the X-axis or Y-axis, and then calculate the angle offset ⁇ , of course, you can use the sampling distance R and the change in the X-axis or Y-axis , Directly calculate the angle offset ⁇ . For example, if the relative value of the amount of change in the X axis is ⁇ x and the sampling distance is R, then the angular offset ⁇ can be obtained from arccos ( ⁇ x / R).
  • the attribute information includes pressure attribute information.
  • the calculating the relative change of the attribute information of the current sampling point and the previous sampling point to obtain relative attribute information includes: calculating the relative change of the pressure attribute information of the current sampling point and the pressure attribute information of the previous sampling point To obtain relative pressure attribute information, thereby obtaining the relative attribute information including the relative pressure attribute information.
  • the attribute information includes time attribute information.
  • the calculating the relative change of the attribute information of the current sampling point and the previous sampling point to obtain relative attribute information includes: calculating the relative change of the time attribute information of the current sampling point and the time attribute information of the previous sampling point To obtain relative time attribute information, thereby obtaining the relative attribute information including the relative time attribute information.
  • the processing method for handwriting is different from the processing method in FIG. 1 as follows.
  • the step S13 further includes a step S131: maintaining the attribute information of the current sampling point, and encoding the information of the current sampling point.
  • Step S14 further includes step S141: calculating the relative change amount of the attribute information of the current sampling point and the attribute information of the previous sampling point to obtain relative attribute information, and encoding the relative attribute information.
  • the handwriting processing method further includes step S41: sending the encoded data of the current sampling point to the electronic device 500 through the network for display.
  • attribute information needs to be encoded before transmission, so that its data format conforms to the transmission protocol standard of the network 600. Therefore, the attribute information of the first sampling point and the relative attribute information of subsequent sampling points need to be encoded before they can be sent.
  • the existing handwriting input device 100 obtains the attribute information of each sampling point after sampling the handwriting, and encodes the attribute information of each sampling point and sends it through the network.
  • the attribute information includes coordinate attribute information, pressure attribute information, and time attribute information
  • the coordinate attribute information of each sampling point requires 32 bits, where X-axis data and Y-axis data each require 16 bits; the pressure attribute of each sampling point The information needs 16 bits; the time attribute information of each sampling point needs 32 bits. That is, the attribute information of each sampling point requires a total of 80 bits of data for encoding.
  • the relative change amount of the attribute information of the current sampling point and the attribute information of the previous sampling point is encoded as the relative attribute information of the current sampling point, which can occupy fewer data bits.
  • the coordinate attribute information only needs 16 bits
  • the pressure attribute information only needs 8 bits
  • the time attribute information needs only 6 bits.
  • the relative change in coordinates between the current sampling point and the previous sampling point can be calculated according to the sampling distance R and the angular offset ⁇ , and further The coordinates of the current sampling point can be determined.
  • the sine and cosine values of the sampling distance R and the angular offset ⁇ can be used to calculate the X-axis and Y-axis coordinate changes of the current sampling point image with respect to the previous sampling point, respectively.
  • FIG. 5 is a flowchart of a handwriting processing method in still another embodiment of the present application.
  • the handwriting processing method further includes the following steps after step S41:
  • Step S51 Determine whether the response data sent by the electronic device 500 is received within a preset time. If yes, go to step S11; if no, go to step S41.
  • the response data is a response signal that the electronic device 500 receives the encoded data of the current sampling point sent by the handwriting input device 100.
  • the handwriting input device 100 needs to determine whether the receiving end has successfully received the encoded data of the current sampling point.
  • the response data refers to data that is fed back by the receiving end (electronic device 500) after successfully receiving the encoded data of the current sampling point. If the response data is not received within the preset time, it indicates that the receiving end has not successfully received the encoded data of the current sampling point. Therefore, the encoded data of the current sampling point needs to be resent, that is, step S41 is executed.
  • the receiving end when the receiving end successfully receives the encoded data of the current sampling point, it will send a response data to the handwriting input device 100. If the encoded data of the current sampling point is not successfully received, the response data will not be fed back to The handwriting input device 100.
  • FIG. 6 is a flowchart of a handwriting processing method in another embodiment of the present application.
  • the handwriting processing method further includes the following steps before step S11:
  • step S61 it is determined whether it is in the writing mode; if it is, step S11 is executed; if not, the flow ends.
  • the writing function of the handwriting input device 100 when the writing function of the handwriting input device 100 is turned on, it indicates that the writing mode needs to be entered. When the writing function of the handwriting input device 100 is turned off, it indicates that it is not necessary to enter the writing mode.
  • the writing function can be turned on or off by a physical key provided in the handwriting input device 100, and can also be turned on or off by inputting a specific gesture on the touch panel, which is not limited herein. It can be understood that the writing mode of the handwriting input device 100 can also be turned on or off by the electronic device 500.
  • the handwriting input device 100 When the handwriting input device 100 is in the writing mode, it indicates that the stylus 200 can write on the handwriting input device 100, and the handwriting will be generated at this time. Therefore, the handwriting is sampled only when it is in the writing mode, which can Less resource allocation efficiency, so as not to sample the handwriting when there is no writing action.
  • FIG. 7 is a structural block diagram of the handwriting input device 100 in an embodiment of the present application.
  • the handwriting input device 100 includes but is not limited to the touch panel 10, the memory 20, and the processor 30. Specifically, the touch panel 10, the memory 20, and the processor 30 may be coupled through a communication bus 40.
  • FIG. 6 is only an example of the handwriting input device 100, and does not constitute a limitation on the handwriting input device 100.
  • the handwriting input device 100 may include more information than shown in FIG. More or fewer components, or a combination of certain components, or different components, for example, the handwriting input device 100 may further include an input and output device, a network access device, and the like.
  • the touch panel 10 generates a touch signal in response to a writing operation, and the processor 30 of the handwriting input device 100 receives the touch signal of the touch panel 10 to recognize various positions of writing, and determines the various positions according to the writing Write track.
  • the touch panel 10 may only have a touch response function.
  • the touch panel 10 may also be a liquid crystal display integrated with a touch panel, an organic light emitting diode display, or the like.
  • the memory 20 may be used to store computer programs and / or modules.
  • the processor 30 executes or executes the computer programs and / or modules stored in the memory 20 and calls the data stored in the memory 20 to achieve The various functions of the handwriting input device 100 will be described.
  • the memory 20 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD) Card, flash card (Flash Card), multiple disk storage devices, flash memory devices, or other volatile solid-state storage devices.
  • a non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD) Card, flash card (Flash Card), multiple disk storage devices, flash memory devices, or other volatile solid-state storage devices.
  • SD secure digital
  • the processor 30 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
  • the processor is the control center of the handwriting input device 100, and uses various interfaces and lines to connect the entire handwriting input device 100 various parts.
  • the memory 20 stores the corresponding program of the handwriting process method
  • the processor 30 runs the corresponding program of the handwriting process method to perform the following operations: sampling the data points of the handwriting process to obtain the current Sampling point, and obtain the attribute information of the current sampling point; determine whether the current sampling point is the first sampling point; when it is determined that the current sampling point is the first sampling point, keep the attribute information of the current sampling point; when determining the current sampling point When it is not the first sampling point, the relative change amount of the attribute information of the current sampling point and the previous sampling point is calculated to obtain relative attribute information.
  • the attribute information includes but is not limited to coordinate attribute information, pressure attribute information, time attribute information, color attribute information, width attribute information, transparency attribute information, and the like.
  • the coordinate attribute information represents the position of each sampling point on the display screen of the handwriting input device 100 or the electronic device 500.
  • the position of the handwriting input device 100 and the position of the electronic device 500 have a one-to-one mapping relationship.
  • the coordinate attribute information includes X-axis and Y-axis data. Therefore, the position of each sampling point on the display screen can be determined according to the coordinate attribute information of each sampling point.
  • the pressure attribute information represents the pressure value of each sampling point, that is, the pressure value generated by the stylus 200 at each position on the handwriting input device 100 during handwriting input, wherein the pressure value affects handwriting Display effect.
  • the time attribute information represents the sampling time of each sampling point.
  • the time can be obtained by the system clock of the handwriting input device 100. For example, when the time for sampling the handwriting for the first time is 10:01, the time is used as the time attribute information of the first sampling point. Therefore, the time attribute information of each sampling point is different, and the sampling order of multiple sampling points can be determined by the time attribute information.
  • the processor 30 determines that the current sampling point is not the first sampling point, it calculates the relative change between the attribute information of the current sampling point and the attribute information of the previous sampling point.
  • the amount of change data is small, and the occupied storage space and data bits are less than the original attribute information, which can effectively compress handwriting data, reduce the burden of data storage and data transmission, and improve the user experience.
  • the data point may be the first data point in the handwritten note, or any data point.
  • the first sampling point is not the first data point, it means that the sampling is started from the middle data point in the handwriting, not from the starting data point.
  • the attribute information includes coordinate attribute information.
  • the calculating the relative change of the attribute information of the current sampling point and the previous sampling point to obtain relative attribute information includes: calculating the relative change of the coordinate attribute information of the current sampling point and the coordinate attribute information of the previous sampling point To obtain relative coordinate attribute information, calculate the angular offset between the current sampling point and the previous sampling point according to the relative coordinate attribute information, to obtain the relative attribute information including the angular offset.
  • the receiving end can determine the absolute coordinate information of the second sampling point, and so on, the receiving end can calculate the absolute coordinate attribute information of the subsequent sampling point, and then determine the X-axis and Y-axis coordinate values of each sampling point.
  • the sampling of the handwriting includes: sampling the handwriting at a sampling distance R.
  • the sampling distance R refers to the distance between two adjacent sampling points, that is, the length of a straight line segment between the current sampling point and the previous sampling point.
  • the calculating the angular offset between the current sampling point and the previous sampling point according to the relative coordinate attribute information further includes: according to the sampling distance R and the relative coordinate attribute information Calculate the angle offset ⁇ between the current sampling point and the previous sampling point.
  • the angle offset ⁇ refers to the angle between the line segment of the straight line formed by the current sampling point and the previous sampling point and the positive X axis in the Cartesian coordinate system in the second quadrant direction. Therefore, you can first calculate ⁇ 'based on the absolute value of the sampling distance R and the amount of change in the X-axis or Y-axis, and then calculate the angular offset ⁇ , of course, according to the sampling distance R and the amount of change in the X-axis or Y-axis , Directly calculate the angle offset ⁇ . For example, if the relative value of the amount of change in the X axis is ⁇ x and the sampling distance is R, then the angular offset ⁇ can be obtained from arccos ( ⁇ x / R).
  • the attribute information includes pressure attribute information.
  • the calculating the relative change of the attribute information of the current sampling point and the previous sampling point to obtain relative attribute information includes: calculating the relative change of the pressure attribute information of the current sampling point and the pressure attribute information of the previous sampling point To obtain relative pressure attribute information. For example, if the pressure at the current sampling point is 1.05 and the pressure at the previous sampling point is 1, then the relative pressure between the current sampling point and the previous sampling point is 0.05.
  • the attribute information includes time attribute information.
  • the calculating the relative change of the attribute information of the current sampling point and the previous sampling point to obtain relative attribute information includes: calculating the relative change of the time attribute information of the current sampling point and the time attribute information of the previous sampling point To obtain relative time attribute information. For example, if the time of the current sampling point is 9:00 and the pressure of the previous sampling point is 8:59, the relative time between the current sampling point and the previous sampling point is 0:01.
  • the maintaining the attribute information of the current sampling point includes: maintaining the attribute information of the current sampling point, and checking the current sampling point Encoding of the information;
  • the calculating the relative change amount of the attribute information of the current sampling point and the previous sampling point to obtain relative attribute information includes: calculating the current sampling point The relative change amount of the attribute information of the sampling point and the attribute information of the previous sampling point to obtain relative attribute information, and encode the relative attribute information;
  • the processor 30 runs the corresponding program of the handwriting processing method and further performs the following operation: sending the encoded data of the current sampling point to the electronic device 500 through the network for display.
  • the processor 30 runs the corresponding program of the handwriting processing method to perform the following operations: determine whether the response data of the electronic device 500 is received within a preset time; when it is determined to be within the preset time When the response data is received, the steps of sampling the data points of the handwriting to obtain the current sampling point and acquiring the attribute information of the current sampling point are performed. When it is determined that no response data is received within the preset time, the step of transmitting the encoded data of the current sampling point through the network is performed.
  • the response data is a response signal that the electronic device 500 receives the encoded data of the current sampling point sent by the handwriting input device 100.
  • the handwriting input device 100 needs to determine whether the receiving end of the electronic device 500 has successfully received the encoded data of the current sampling point.
  • the response data refers to data that is fed back after the receiving end (electronic device 500) successfully receives the encoded data of the current sampling point. If the response data is not received within the preset time, it indicates that the receiving end has not successfully received the encoded data of the current sampling point.
  • the processor 30 before performing the operation of sampling the handwriting and obtaining the attribute information of the current sampling point, the processor 30 also performs the following operations to determine whether the handwriting input device 100 is in the writing mode, when When it is determined that the handwriting input device is in the writing mode, the operation of sampling the handwriting and acquiring the attribute information of the current sampling point is performed.
  • the handwriting input device 100 When the handwriting input device 100 is in the writing mode, it indicates that the stylus 200 can write on the handwriting input device 100, and the handwriting will be generated at this time. Therefore, the handwriting is sampled only when it is in the writing mode, which can Less resource allocation efficiency, so as not to sample the handwriting when there is no writing action.
  • the method for processing handwriting provided by the present application may be implemented in hardware or firmware, or as software or computer code that can be stored in a computer-readable storage medium such as CD, ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or The computer code that can be stored as original on a remote recording medium or non-transitory machine-readable medium, downloaded over a network, and stored in a local recording medium, so that the method described here can utilize a general-purpose computer or a special processor or in such as ASIC or Programmable or dedicated hardware such as FPGA is presented as software stored on a recording medium.
  • a computer-readable storage medium such as CD, ROM, RAM, floppy disk, hard disk, or magneto-optical disk
  • a computer, processor, microprocessor, controller, or programmable hardware includes memory components, such as RAM, ROM, flash memory, etc., which are accessed when the computer, processor, or hardware implements the processing methods described herein
  • the memory component may store or receive the software or computer code.
  • the general-purpose computer accesses the code for implementing the processing shown here, the execution of the code converts the general-purpose computer into a dedicated computer for performing the processing shown here.
  • the computer-readable storage medium may be solid-state memory, memory card, optical disc, etc.
  • the computer-readable storage medium stores program instructions for the computer to execute the handwriting processing method shown in FIGS. 1-5.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请公开一种手写笔迹处理方法,应用于手写输入设备中,所述手写笔迹处理方法包括如下步骤:对手写笔迹的数据点进行采样以得到当前采样点,并获取当前采样点的属性信息;判断当前采样点是否为第一个采样点;当确定当前采样点是第一个采样点时,操持所述当前采样点的属性信息;当确定当前采样点不是第一个采样点时,计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息网络。本申请还公开一种手写输入设备和一种计算机可读存储介质。本申请能够有效对手写笔迹数据进行压缩,减少数据存储和数据传输的负担。

Description

手写笔迹处理方法、手写输入设备及计算机可读存储介质 技术领域
本申请涉及数据处理技术领域,尤其涉及一种手写笔迹处理方法、手写输入设备及计算机可读存储介质。
背景技术
目前,为实现文字内容的数字化显示,通常采用触摸输入的方式在手写输入设备上对文字内容进行手写输入,例如,在手写输入设备上进行书写时,手写输入设备将真实笔迹转化成电子笔迹数据并将电子笔迹发送至显示终端(例如,手机)以进行显示。
然而,当手写输入的内容信息比较大或者多个手写输入设备与显示终端相连时,会导致存储的数据量大以及数据传输时耗时过长等问题。
发明内容
本申请实施例公开一种手写笔迹处理方法、手写输入设备及计算机可读存储介质,能够有效对手写笔迹数据进行压缩,减少数据存储和数据传输的负担,提高用户体验。
本申请实施例公开的一种手写笔迹处理方法,应用于手写输入设备中,所述手写笔迹处理方法包括如下步骤:
对手写笔迹的数据点进行采样以得到当前采样点,并获取所述当前采样点的属性信息;
判断当前采样点是否为第一个采样点;
当确定当前采样点是第一个采样点时,保持所述当前采样点的属性信息;
当确定当前采样点不是第一个采样点时,计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息。
本申请实施例公开的一种手写输入设备,包括存储器和处理器,所述存储器存有手写笔迹处理方法的相应程序,所述处理器运行所述手写笔迹处理方法的相应程序执行如下操作:
对手写笔迹的数据点进行采样以得到当前采样点,并获取所述当前采样点的属性信息;
判断所述当前采样点是否为第一个采样点;
当确定所述当前采样点是第一个采样点时,保持所述当前采样点的属性信息;
当确定所述当前采样点不是第一个采样点时,计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息。
本申请实施例公开的一种计算机可读存储介质,所述计算机可读存储介质上存储有手写笔迹处理方法的相应程序,所述手写笔迹处理方法的相应程序被处理器执行时实现上述的手写笔迹处理方法。
本申请的手写笔迹处理方法、手写输入设备及计算机可读存储介质,当确定当前采样点不是第一个采样点时,计算当前采样点的属性信息与前一采样点的属性信息的相对变化量,由于相对变化量的数据较小,所占的内存及传输的数据位相较于原始的属性信息较少,能够有效对手写笔迹数据进行压缩,减少数据存储和数据传输的负担,提高了用户体验。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一实施例中的手写笔迹处理方法的流程图。
图2为本申请一实施例中的书写系统的架构示意图。
图3为本申请一实施例中的角度偏移量的计算原理手写笔迹的示意图。
图4为本申请另一实施例中的手写笔迹处理方法的流程图。
图5为本申请再一实施例中的手写笔迹处理方法的流程图。
图6为本申请又一实施例中的手写笔迹处理方法的流程图。
图7为本申请一实施例中的手写输入设备的结构框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
请参阅图1,图1为本申请一实施例公开的手写笔迹处理方法的流程图。所述手写笔迹处理方法应用于一手写输入设备中,如图1所示,所述手写笔迹处理方法包括如下步骤:
步骤S11,对手写笔迹的数据点进行采样以得到当前采样点,并获当前采样点的属性信息。
请再参阅图2,图2为本申请一实施方式提供的书写控制系统1000的方框示意图。书写控制系统1000包括手写输入装置300和电子装置500。手写输入装置300通过网络600与电子装置500通信连接。手写输入装置300包括手写输入设备100和手写笔200,且所述手写输入设备100和手写笔200也可通过网络600通信连接。可以理解,网络600可为互联网(Internet)、按需虚拟专线网(On-Demand virtual Lease Line)、包括WIFI、蓝牙在内的无线网(Wireless network)、包括GPRS网络、CDMA网络在内的电话网、广播电视网等。
在本实施方式中,所述手写输入设备100为手写板,并通过感测所述手写笔200的书写操作生成手写笔迹数据,并将手写笔迹数据通过网络600发送至电子装置500进行显示。在本实施方式中,所述电子装置500包括显示屏,且与多个手写输入设备100通信连接,即,多个手写输入设备100的笔迹数据同 时发送至所述电子装置100并同时显示。在其他实施方式中,所述电子装置500也可以与一个手写输入设备100进行通信连接。需要说明的是,和电子装置500通信连接的手写输入设备100的数量可以依据具体的使用情况而定,在此不做限定。另外,手写输入设备100还可设置在电子装置500上,即,手写输入设备100为电子装置500上的一输入设备,且受电子装置500的控制。
当用户使用所述手写笔200在所述手写输入设备100上进行书写操作时,手写输入设备100感测所述手写笔200的书写操作生成手写笔迹数据,通过对所述手写笔迹的数据点进行采样以得到多个采样点,并获得各个采样点的属性信息。需要说明的是,手写笔迹包括若干数据点,采样是指对手写笔迹中的数据点进行采样,例如,手写笔迹中可能包括5个数据点,但只对其中的第1、3、5个数据点进行采样以分别得到当前采样点,因此,在一些实施例中,所述数据点可以是手写笔记中的第一个数据点,也可以是任意的数据点。当第一的采样点不是第一个数据点是,说明是从手写笔迹中的中间数据点开始采样,并不是从起始数据点开始采样的。
在本实施方式中,所述属性信息包括但不限于坐标属性信息、压力属性信息、时间属性信息、颜色属性信息、宽度属性信息、透明度属性信息等。
所述坐标属性信息代表每个采样点在手写输入设备100或电子装置500的显示屏上的位置。其中,手写输入设备100的位置与电子装置500的位置具有一一映射关系。具体地,所述坐标属性信息包括X轴和Y轴的数据,因此,根据每个采样点的坐标属性信息即可确定每个采样点在显示屏上的位置。
所述压力属性信息代表了每个采样点的压力值,即,手写笔200在手写输入时在所述手写输入设备100上每个位置所述产生的压力值,其中,所述压力值影响笔迹的显示效果。
所述时间属性信息代表了每个采样点采样时间。其中,所述时间可以通过手写输入设备100的系统时钟获得。例如,当对手写笔迹进行第一次采样的时间为10:01时,则将该时间作为第一个采样点的时间属性信息。因此,每个采样点的时间属性信息时不同的,且通过所述时间属性信息可以确定多个采样点采样的顺序。
所述颜色属性信息代表了每个采样点的颜色。例如,所述笔迹的颜色可以 是红色、黄色或者是绿色。所述宽度属性信息代表了每个采样点的宽度。例如,所述笔迹的宽度可以是1mm、0.5mm等。所述透明度属性信息代表了每个采样点的透明度。例如,透明度可以是90%或者95%等。
步骤S12,判断当前采样点是否为第一个采样点;若是,则执行步骤S13;若否,则执行步骤S14。
步骤S13,保持当前采样点的属性信息。
若是第一个采样点,保持原有的属性信息即可,并可作为后续采样的点的参照依据。
步骤S14,计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息。
可以理解,当所述属性信息包括坐标属性信息时,可以计算当前采样点的X轴和Y轴的数据相对于前一采样点的X轴和Y轴的变化量,并进一步根据X轴和Y轴的变化量计算出角度偏移量作为相对属性信息;当所述属性信息包括压力属性信息时,可以计算当前采样点的压力数据相对于前一采样点的压力数据的变化量作为相对属性信息;当所述属性信息包括时间属性信息时,可以计算当前采样点的时间数据相对于前一采样点的时间数据的变化量作为相对属性信息,在此不做限定。
本申请所公开的手写笔迹处理方法,当确定当前采样点是第一个采样点时,保持当前采样点的属性信息,当确定当前采样点不是第一个采样点时,计算当前采样点的属性信息与前一采样点的属性信息的相对变化量,由于相对变化量的数据较小,所占的存储空间和数据位相较于原始的属性信息均较少,进而可以有效的对手写笔迹数据进行压缩,减少数据存储和数据传输的负担,提高了用户体验。
在一些实施方式中,所述属性信息包括坐标属性信息。所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的坐标属性信息与前一采样点的坐标属性信息的相对变化量以获得相对坐标属性信息,根据所述相对坐标属性信息计算出当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信息。由于第一个采样点的坐标属性信息是绝对的坐标属性信息,因此,知道了第二 个采样点相对于第一个采样点的相对坐标属性信息(X轴和Y轴的相对偏移量),电子装置500即可确定第二的采样点的绝对坐标信息,以此类推,接收端可以计算出后续采样点的绝对坐标属性信息,进而确定每个采样点的X轴和Y轴的坐标值。
在其他是实施方式中,所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的坐标属性信息与前一采样点的坐标属性信息的相对变化量以获得相对坐标属性信息,从而得到包括相对坐标属性信息的所述相对属性信息。
请再参阅图3,在一些实施方式中,所述对手写笔迹的数据点进行采样以得到当前采样点,包括:以采样距离R对所述手写笔迹的数据点进行采样。其中,所述采样距离R是指相邻的两个采样点之间的距离,即,当前采样点与前一采样点之间的直线线段的长度。可以理解,所述采样距离R可以相同也可以不同。以“人”字为例,第一个采样点和第二个采样点之间的采样距离为R,第三个采样点与第二个采样点之间的采样距离也为R,以此类推,第N个采样点与第N-1个采样点之间的采样距离也为R。其中,N为大于1的正整数。在本实施方式中,根据所述相对坐标属性信息计算出当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信,息包括:依据所述采样距离R及所述相对坐标属性信息计算当前采样点与前一采样点之间的角度偏移量θ,以得到包括角度偏移量θ的所述相对属性信息。需要说明的是,所述采样距离R可以用户自行设定,也可以系统默认,在此不做限定。
进一步地,所述依据所述采样距离R及所述相对坐标属性信息计算当前采样点与前一采样点之间的角度偏移量θ,包括:
以前一采样点为坐标原点建立笛卡尔坐标系,并根据所述笛卡尔坐标系计算所述相对坐标属性信息。其中,所述笛卡尔坐标系为直角坐标系。在其他实施方式中,还可以第一个采样点为坐标原点建立笛卡尔坐标系,进而可以获知其他采样点的坐标即相对坐标。
在本实施方式中,角度偏移量θ是指当前采样点与前一采样点所组成的直线的线段与笛卡尔坐标系中的X轴正轴向第二象限方向之间的角度。因此, 可以先依据采样距离R和X轴或者Y轴的变化量的绝对值计算出θ’,然后再计算出角度偏移量θ,当然可以根据采样距离R和X轴或者Y轴的变化量,直接计算出角度偏移量θ。例如,设X轴的变化量的相对值为Δx,采样距离为R,则可根据arc cos(Δx/R)求出角度偏移量θ。
在一些实施方式中,所述属性信息包括压力属性信息。所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的压力属性信息与前一采样点的压力属性信息的相对变化量以获得相对压力属性信息,从而得到包括相对压力属性信息的所述相对属性信息。
在一些实施方式中,所述属性信息包括时间属性信息。所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的时间属性信息与前一采样点的时间属性信息的相对变化量以获得相对时间属性信息,从而得到包括相对时间属性信息的所述相对属性信息。
请再参阅图4,其为本申请另一实施例中的笔迹处理方法的流程图。在一些实施方式中,所述手写笔迹处理方法较之图1中的处理方法有如下不同。在本实施方式中,所述步骤S13进一步包括步骤S131:保持所述当前采样点的属性信息,并对所述当前采样点的信息进行编码。步骤S14进一步包括步骤S141:计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,并对所述相对属性信息进行编码。所述手写笔迹处理方法还包括步骤S41:将所述当前采样点的编码数据通过网络发送至电子装置500以进行显示。
在本实施方式中,由于属性信息在传输前需要进行编码,以使其数据格式符合网络600的传输协议标准。因此,第一个采样点的属性信息以及后续采样点的相对属性信息均需要编码后才能发送。
现有的手写输入设备100在对手写笔迹进行采样后,获取各个采样点的属性信息,并将各个采样点的属性信息进行编码后通过网络进行发送。例如,当属性信息包括坐标属性信息、压力属性信息和时间属性信息时,每个采样点的坐标属性信息需要32bit,其中,X轴数据和Y轴数据各需要16bit;每个采样 点的压力属性信息需要16bit;每个采样点的时间属性信息需要32bit。即,每个采样点的属性信息共需要80bit的数据进行编码。如此,若在会议或课堂教学等多人同时在线书写和展示场景下,假定40人,平均每300ms采集300个点完成一个字书写,则理论上需要近3.2Mbps的带宽的才能进行流畅书写。
而在本实施方式中,将当前的采样点的属性信息与前一采样点的属性信息的相对变化量,作为当前采样点的相对属性信息进行编码,则可以占用较少的数据位。例如,坐标属性信息只需要16bit,压力属性信息只需要8bit,时间属性信息则需要6bit就够了,如此,在相同的应用环境下,相比现有技术,只需要1.3Mbp的宽带即可正常传输,因此,本申请可以有效减少笔迹数据的传输量,减少网络的占用,保证数据的正常传输。
可以理解,当电子装置500接收端接收到角度偏移量θ时,根据采样距离R及角度偏移量θ即可计算出当前采样点与前一采样点之间的坐标的相对变化量,进而可以确定当前采样点的坐标。例如,通过采样距离R和角度偏移量θ的正弦值和余弦值即可分别计算出当前采样点像对于前一采样点的X轴和Y轴的坐标变化量。该实施例中,由于发送的是当前采样点和前一采样点的偏移角度,相对于坐标的变化量占用更少的数据编码资源,只需要用10bit数据位即可实现对角度偏移量θ的编码,进一步减少了数据资源。请再参阅图5,其为本申请再一实施例中的笔迹处理方法的流程图。在本实施方式中,所述笔迹处理方法较之图4中的方法在步骤S41之后还包括如下步骤:
步骤S51,判断在预设时间内是否收到所述电子装置500发送的响应数据。若是,则执行步骤S11;若否,则执行步骤S41。
其中,所述响应数据为所述电子装置500接收到所述手写输入设备100发送的所述当前采样点的编码数据的响应信号。
虽然将编码好的数据通过网络600进行了发送,但是由于网络故障、数据拥堵或者接收端故障等因素,会导致接收端没有正常接收到消息,而此时若直接发送下一个采样点的数据,将导致接收端显示的手写笔迹与实际的手写笔迹不符。因此,为了提高数据传输的准确性,手写输入设备100需要判断接收端是否成功接收到了当前采样点的编码数据。
在本实施方式中,所述响应数据是指接收端(电子装置500)成功接收到 当前采样点的编码数据后而反馈的数据。若是在预设时间内没有接收到响应数据,则表明接收端没有成功接收到当前采样点的编码数据,因此,需要将当前采样点的编码数据重新发送,即执行步骤S41。
需要说明的是,当接收端成功接收到当前采样点的编码数据后会发送一响应数据至所述手写输入设备100,若是没有成功接收到当前采样点的编码数据,则不会反馈响应数据至所述手写输入设备100。
请再参阅图6,其为本申请又一实施例中的笔迹处理方法的流程图。在本实施方式中,所述笔迹处理方法较之图1中的方法在步骤S11之前还包括如下步骤:
步骤S61,判断是否处于书写模式;若是,则执行步骤S11;若否,则流程结束。
在本实施方式中,当手写输入设备100的书写功能开启时,表明需要进入书写模式。当手写输入设备100的书写功能关闭时,表明不需要进入书写模式。其中,书写功能可以通过设置于手写输入设备100的实体按键来开启或者关闭,还可以通过对所述触摸板输入特定的手势来开启或者关闭,在此不做限定。可理解,所述手写输入设备100的书写模式还可通过电子装置500来开启或者关闭。
当手写输入设备100处于书写模式时,表明手写笔200能够在所述手写输入设备100上进行书写,此时才会产生手写笔迹,因此,当处于书写模式时才对手写笔迹进行采样,可以较少资源的配置效率,以免在没有产生书写动作时,对笔迹进行采样。
请参阅图7,其为本申请一实施例中的手写输入设备100的结构框图。所述手写输入设备100包括但不限于触摸板10、存储器20以及处理器30。具体地,所述触摸板10、存储器20及所述处理器30可以通过通信总线40耦合。本领技术人员应当理解的是,所述图6仅是所述手写输入设备100的示例,并不构成对所述手写输入设备100的限定,所述手写输入设备100可以包括比图1所示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述手写输入设备100还可以包括输入输出设备、网络接入设备等。其中,所述触摸板10响应书写操作而产生触控信号,所述手写输入设备100的处理器30接收 触摸板10的触控信号而识别出书写的各个位置,并根据书写的各个位置确定出书写轨迹。在本实施方式中,所述触摸板10可以仅仅具有触控响应功能。在其他实施方式中,所述触摸板10还可以是整合有触摸板的液晶显示屏、有机发光二极管显示屏等。
所述存储器20可用于存储计算机程序和/或模块,所述处理器30通过运行或执行存储在所述存储器20内的计算机程序和/或模块,以及调用存储在存储器20内的数据,实现所述手写输入设备100的各种功能。所述存储器20可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
所述处理器30可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器是所述手写输入设备100的控制中心,利用各种接口和线路连接整个所述手写输入设备100的各个部分。
在本实施方式中,所述存储器20存有手写笔迹处理方法的相应程序,所述处理器30运行所述手写笔迹处理方法的相应程序执行如下操作:对手写笔迹的数据点进行采样以得到当前采样点,并获取当前采样点的属性信息;判断当前采样点是否为第一个采样点;当确定当前采样点是第一个采样点时,保持当前采样点的属性信息;当确定当前采样点不是第一个采样点时,计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息。
在本实施方式中,所述属性信息包括但不限于坐标属性信息、压力属性信息、时间属性信息、颜色属性信息、宽度属性信息、透明度属性信息等。
所述坐标属性信息代表每个采样点在手写输入设备100或电子装置500的显示屏上的位置。其中,手写输入设备100的位置与电子装置500的位置具有一一映射关系。具体地,所述坐标属性信息包括X轴和Y轴的数据,因此, 根据每个采样点的坐标属性信息即可确定每个采样点在显示屏上的位置。
所述压力属性信息代表了每个采样点的压力值,即,手写笔200在手写输入时在所述手写输入设备100上每个位置所述产生的压力值,其中,所述压力值影响笔迹的显示效果。
所述时间属性信息代表了每个采样点采样时间。其中,所述时间可以通过手写输入设备100的系统时钟获得。例如,当对手写笔迹进行第一次采样的时间为10:01时,则将该时间作为第一个采样点的时间属性信息。因此,每个采样点的时间属性信息时不同的,且通过所述时间属性信息可以确定多个采样点采样的顺序。
本申请所公开的手写输入设备100,所述处理器30当确定当前采样点不是第一个采样点时,计算当前采样点的属性信息与前一采样点的属性信息的相对变化量,由于相对变化量的数据较小,所占的存储空间及数据位相较于原始的属性信息均较少,进而可以有效的对手写笔迹数据进行压缩,减少数据存储和数据传输的负担,提高了用户体验。
在一些实施例中,所述数据点可以是手写笔记中的第一个数据点,也可以是任意的数据点。当第一的采样点不是第一个数据点是,说明是从手写笔迹中的中间数据点开始采样,并不是从起始数据点开始采样的。
在一些实施方式中,所述属性信息包括坐标属性信息。所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的坐标属性信息与前一采样点的坐标属性信息的相对变化量以获得相对坐标属性信息,根据所述相对坐标属性信息计算出当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信息。由于第一个采样点的坐标属性信息是绝对的坐标属性信息,因此,知道了第二个采样点相对于第一个采样点的相对坐标属性信息(X轴和Y轴的相对偏移量),接收端即可确定第二的采样点的绝对坐标信息,以此类推,接收端可以计算出后续采样点的绝对坐标属性信息,进而确定每个采样点的X轴和Y轴的坐标值。
在一些实施方式中,所述对手写笔迹进行采样,包括:以采样距离R对所述手写笔迹进行采样。其中,所述采样距离R是指相邻的两个采样点之间 的距离,即,当前采样点与前一采样点之间的直线线段的长度。在本实施方方式中,所述根据所述相对坐标属性信息计算出当前采样点与前一采样点之间的角度偏移量,还包括:依据所述采样距离R及所述相对坐标属性信息计算当前采样点与前一采样点之间的角度偏移量θ。
在本实施方式中,角度偏移量θ是指当前采样点与前一采样点所组成的直线的线段与笛卡尔坐标系中的X轴正轴向第二象限方向之间的角度。因此,可以先依据采样距离R和X轴或者Y轴的变化量的绝对值计算出θ’,然后再计算出角度偏移量θ,当然可以根据采样距离R和X轴或者Y轴的变化量,直接计算出角度偏移量θ。例如,设X轴的变化量的相对值为Δx,采样距离为R,则可根据arc cos(Δx/R)求出角度偏移量θ。
在一些实施方式中,所述属性信息包括压力属性信息。所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的压力属性信息与前一采样点的压力属性信息的相对变化量以获得相对压力属性信息。例如,当前采样点的压力为1.05,前一采样点的压力为1,则当前采样点与前一采样点的相对压力为0.05。
在一些实施方式中,所述属性信息包括时间属性信息。所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的时间属性信息与前一采样点的时间属性信息的相对变化量以获得相对时间属性信息。例如,当前采样点的时间为9:00,前一采样点的压力为8:59,则当前采样点与前一采样点的相对时间为0:01。
在一些实施方式中,当确定当前采样点是第一个采样点时,所述保持所述当前采样点的属性信息,包括:保持所述当前采样点的属性信息,并对所述当前采样点的信息进行编码;
当确定所述当前采样点不是第一个采样点时,所述计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,并对所述相对属性信息进行编码;
所述处理器30运行所述手写笔迹处理方法的相应程序还执行如下操作:将所述当前采样点的编码数据通过网络发送至电子装置500以进行显示。
在一些实施方式中,所述处理器30运行所述手写笔迹处理方法的相应程序执行如下操作:判断在预设时间内是否收到电子装置500的响应数据;当确定在所述预设时间内收到响应数据时,执行所述对手写笔迹的数据点进行采样以得到当前采样点,并获取当前采样点的属性信息的步骤。当确定在所述预设时间内没有收到响应数据时,执行所述将当前采样点的编码数据通过网络进行发送的步骤。其中,所述响应数据为所述电子装置500接收到所述手写输入设备100发送的所述当前采样点的编码数据的响应信号。
虽然将编码好的数据通过网络600进行了发送,但是由于网络故障、数据拥堵或者接收端故障等因素,会导致接收端没有正常接收到消息,而此时若直接发送下一个采样点的数据,将导致接收端显示的手写笔迹与实际的手写笔迹不符。因此,为了提高数据传输的准确性,手写输入设备100需要判断电子装置500的接收端是否成功接收到了当前采样点的编码数据。
在本实施方式中,所述响应数据是指接收端(电子装置500)成功接收到当前采样点的编码数据后而反馈的数据。若是在预设时间内没有接收到响应数据,则表明接收端没有成功接收到当前采样点的编码数据。
在另一些实施方式中,所述处理器30在执行所述对手写笔迹进行采样,并获当前采样点的属性信息的操作之前,还执行如下操作,判断手写输入设备100是否处于书写模式,当确定所述手写输入设备处于书写模式时,执行所述对手写笔迹进行采样,并获当前采样点的属性信息的操作。
当手写输入设备100处于书写模式时,表明手写笔200能够在所述手写输入设备100上进行书写,此时才会产生手写笔迹,因此,当处于书写模式时才对手写笔迹进行采样,可以较少资源的配置效率,以免在没有产生书写动作时,对笔迹进行采样。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某一些步骤可以采用其他顺序或者同时进行。其次,本领技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详 细描述的部分,可以参见其他实施例的相关描述。
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本申请提供的手写笔迹处理方法可以在硬件、固件中实施,或者可以作为可以存储在例如CD、ROM、RAM、软盘、硬盘或磁光盘的等计算机可读存储介质中的软件或计算机代码,或者可以作为原始存储在远程记录介质或非瞬时的机器可读介质上、通过网络下载并且存储在本地记录介质中的计算机代码,从而这里描述的方法可以利用通用计算机或特殊处理器或在诸如ASIC或FPGA之类的可编程或专用硬件中以存储在记录介质上的软件来呈现。如本领能够理解的,计算机、处理器、微处理器、控制器或可编程硬件包括存储器组件,例如,RAM、ROM、闪存等,当计算机、处理器或硬件实施这里描述的处理方法而存取和执行软件或计算机代码时,存储器组件可以存储或接收软件或计算机代码。另外,当通用计算机存取用于实施这里示出的处理的代码时,代码的执行将通用计算机转换为用于执行这里示出的处理的专用计算机。
其中,所述计算机可读存储介质可为固态存储器、存储卡、光碟等。所述计算机可读存储介质存储有程序指令而供计算机调用后执行图1-5所示的手写笔迹处理方法。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施例进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领的一般技术人员,依据本申请的思想,在具体实施例及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种手写笔迹处理方法,应用于手写输入设备中,其特征在于,所述手写笔迹处理方法包括如下步骤:
    对手写笔迹的数据点进行采样以得到当前采样点,并获取所述当前采样点的属性信息;
    判断所述当前采样点是否为第一个采样点;
    当确定所述当前采样点是第一个采样点时,保持所述当前采样点的属性信息;
    当确定所述当前采样点不是第一个采样点时,计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息。
  2. 如权利要求1所述的手写笔迹处理方法,其特征在于,所述数据点为所述手写笔迹的第一个数据点或者任意数据点。
  3. 如权利要求1所述的手写笔迹处理方法,其特征在于,当确定当前采样点是第一个采样点时,所述保持所述当前采样点的属性信息,包括:保持所述当前采样点的属性信息,并对所述当前采样点的信息进行编码;
    当确定所述当前采样点不是第一个采样点时,所述计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,并对所述相对属性信息进行编码;
    所述手写笔迹处理方法还包括:将所述当前采样点的编码数据通过网络发送至电子装置以进行显示。
  4. 如权利要求1所述的手写笔迹处理方法,其特征在于,所述属性信息包括坐标属性信息;所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的坐标属性信息与前一采样点的坐标属性信息的相对变化量以获得相对坐标属性信息,根据所述相对坐标属性信息计算出当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信息。
  5. 如权利要求4所述的手写笔迹处理方法,其特征在于,所述对手写笔迹数据点进行采样,包括:以采样距离对所述手写笔迹的数据点进行采样;
    所述根据所述相对坐标属性信息计算出当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信息,还包括:依据所述采样距离及所述相对坐标属性信息计算当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信息。
  6. 如权利要求5所述的手写笔迹处理方法,其特征在于,所述采样距离为所述当前采样点与所述前一采样点之间的直线线段的长度。
  7. 如权利要求1所述的手写笔迹处理方法,其特征在于,所述属性信息包括压力属性信息;所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的压力属性信息与前一采样点的压力属性信息的相对变化量以获得相对压力属性信息。
  8. 如权利要求1所述的手写笔迹处理方法,其特征在于,所述属性信息包括时间属性信息;所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的时间属性信息与前一采样点的时间属性信息的相对变化量以获得相对时间属性信息。
  9. 如权利要求3所述的手写笔迹处理方法,其特征在于,所述手写笔迹处理方法在所述将当前采样点的编码数据通过网络发送至电子装置以进行显示的步骤之后,还包括:
    判断在预设时间内是否收到所述电子装置发送的响应数据,所述响应数据为所述电子装置接收到所述手写输入设备发送的所述当前采样点的编码数据的响应信号;
    当确定在所述预设时间内收到所述响应数据时,执行所述对手写笔迹的数据点进行采样,并获取所述当前采样点的属性信息的步骤。
  10. 如权利要求9所述的手写笔迹处理方法,其特征在于,所述手写笔迹处理方法,还包括:
    当确定在所述预设时间内没有收到所述电子装置发送的响应数据时,执行所述将所述当前采样点的编码数据通过网络发送至所述电子装置以进行显示的步骤。
  11. 如权利要求1所述的手写笔迹处理方法,其特征在于,所述手写笔迹处理方法在所述对手写笔迹的数据点进行采样以得到当前采样点,并获取所述 当前采样点的属性信息之步骤之前,还包括:
    判断所述手写输入设备是否处于书写模式;
    当确定所述手写输入设备处于书写模式时,执行对手写笔迹的数据点进行采样以得到当前采样点,并获取所述当前采样点的属性信息的步骤。
  12. 一种手写输入设备,包括存储器和处理器,其特征在于,所述存储器存有手写笔迹处理方法的相应程序,所述处理器运行所述手写笔迹处理方法的相应程序执行如下操作:
    对手写笔迹的数据点进行采样以得到当前采样点,并获取所述当前采样点的属性信息;
    判断所述当前采样点是否为第一个采样点;
    当确定所述当前采样点是第一个采样点时,保持所述当前采样点的属性信息;
    当确定当前采样点不是第一个采样点时,计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息。
  13. 如权利要求12所述的手写输入设备,其特征在于,所述数据点为所述手写笔迹的第一个数据点或者任意数据点。
  14. 如权利要求12所述的手写输入设备,其特征在于,当确定当前采样点是第一个采样点时,所述保持所述当前采样点的属性信息,包括:保持所述当前采样点的属性信息,并对所述当前采样点的信息进行编码;
    当确定所述当前采样点不是第一个采样点时,所述计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算所述当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,并对所述相对属性信息进行编码;
    所述处理器运行所述手写笔迹处理方法的相应程序还执行如下操作:将所述当前采样点的编码数据通过网络发送至电子装置以进行显示。
  15. 如权利要求12所述的手写输入设备,其特征在于,所述属性信息包括坐标属性信息;所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的坐标属性信息与前一采样点的坐标属性信息的相对变化量以获得相对坐标属性信息,根据所述相 对坐标属性信息计算出当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信息。
  16. 如权利要求15所述的手写输入设备,其特征在于,所述对手写笔迹的数据点进行采样,包括:以采样距离对所述手写笔迹的数据点进行采样;
    所述根据所述相对坐标属性信息计算出当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信息,包括:依据所述采样距离及所述相对坐标属性信息计算当前采样点与前一采样点之间的角度偏移量,以得到包括角度偏移量的所述相对属性信息。
  17. 如权利要求16所述的手写输入设备,其特征在于,所述采样距离为所述当前采样点与所述前一采样点之间的直线线段的长度。
  18. 如权利要求12所述的手写输入设备,其特征在于,所述属性信息包括压力属性信息和/或者时间属性信息;所述计算当前采样点的属性信息与前一采样点的属性信息的相对变化量以获得相对属性信息,包括:计算当前采样点的压力属性信息与前一采样点的压力属性信息的相对变化量以获得相对压力属性信息;和/或计算当前采样点的时间属性信息与前一采样点的时间属性信息的相对变化量以获得相对时间属性信息。
  19. 如权利要求14所述的手写输入设备,其特征在于,所述处理器运行所述手写笔迹处理方法的相应程序还执行如下操作:
    判断在预设时间内是否收到所述电子装置发送的响应数据,所述响应数据为所述电子装置接收到所述手写输入设备发送的所述当前采样点的编码数据的响应信号;
    当确定在所述预设时间内没有收到所述响应数据时,执行所述将所述当前采样点的编码数据通过网络发送至所述电子装置以进行显示的步骤。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有手写笔迹处理方法的相应程序,所述手写笔迹处理方法的相应程序被处理器执行时实现如权利要求1-11中任一项所述的手写笔迹处理方法。
PCT/CN2018/116786 2018-11-21 2018-11-21 手写笔迹处理方法、手写输入设备及计算机可读存储介质 Ceased WO2020103053A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880096013.XA CN112889017A (zh) 2018-11-21 2018-11-21 手写笔迹处理方法、手写输入设备及计算机可读存储介质
PCT/CN2018/116786 WO2020103053A1 (zh) 2018-11-21 2018-11-21 手写笔迹处理方法、手写输入设备及计算机可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/116786 WO2020103053A1 (zh) 2018-11-21 2018-11-21 手写笔迹处理方法、手写输入设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2020103053A1 true WO2020103053A1 (zh) 2020-05-28

Family

ID=70773742

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116786 Ceased WO2020103053A1 (zh) 2018-11-21 2018-11-21 手写笔迹处理方法、手写输入设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN112889017A (zh)
WO (1) WO2020103053A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8194921B2 (en) * 2008-06-27 2012-06-05 Nokia Corporation Method, appartaus and computer program product for providing gesture analysis
CN103257711A (zh) * 2013-05-24 2013-08-21 河南科技大学 空间手势输入方法
CN103593430A (zh) * 2013-11-11 2014-02-19 胡宝清 一种基于移动对象时空信息轨迹分段聚类的方法
CN104765476A (zh) * 2015-04-13 2015-07-08 深圳市飞马与星月科技研究有限公司 手写轨迹生成方法和装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761495B (zh) * 2011-04-29 2015-12-16 北京壹人壹本信息科技有限公司 一种基于手写原笔迹的即时通信方法、通信终端和系统
US20130136377A1 (en) * 2011-11-29 2013-05-30 Samsung Electronics Co., Ltd. Method and apparatus for beautifying handwritten input
CN103309513B (zh) * 2013-06-24 2016-02-03 中国科学技术大学 包含手掌侧表面信息的手写笔迹输入设备
CN105868590B (zh) * 2015-01-19 2019-09-10 阿里巴巴集团控股有限公司 一种笔迹数据处理方法和装置
CN107481299A (zh) * 2017-06-27 2017-12-15 北京新国人智慧科技股份有限公司 一种书写笔迹显示方法及系统、智能终端及智能书写系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8194921B2 (en) * 2008-06-27 2012-06-05 Nokia Corporation Method, appartaus and computer program product for providing gesture analysis
CN103257711A (zh) * 2013-05-24 2013-08-21 河南科技大学 空间手势输入方法
CN103593430A (zh) * 2013-11-11 2014-02-19 胡宝清 一种基于移动对象时空信息轨迹分段聚类的方法
CN104765476A (zh) * 2015-04-13 2015-07-08 深圳市飞马与星月科技研究有限公司 手写轨迹生成方法和装置

Also Published As

Publication number Publication date
CN112889017A (zh) 2021-06-01

Similar Documents

Publication Publication Date Title
CN103324348B (zh) 一种基于智能移动终端的Windows桌面控制方法
WO2018192487A1 (zh) 一种控制智能设备联动的方法及装置
CN109032390A (zh) 笔迹数据缓存方法、装置、设备和存储介质
US20180253179A1 (en) Method and apparatus for screen control between terminals and storage medium
TW201504928A (zh) 電子裝置及其配對方法
TWI549017B (zh) 確認處理方法、相關裝置及系統
WO2019105391A1 (zh) 无线局域网络的连接方法、设备及计算机可读存储介质
CN110389730A (zh) 基于虚拟显卡进行大屏显示的方法、装置及电子设备
WO2020135010A1 (zh) 寄宿应用的处理方法、设备及计算机可读存储介质
US10268348B2 (en) Information processing terminal, information processing method, and information processing system
CN108616643A (zh) 通过计算设备控制手机的方法、装置及系统
CN111628956B (zh) 一种网络请求传输数据的格式转换方法、装置和系统
CN108693997A (zh) 智能交互平板的触摸控制方法、装置及智能交互平板
WO2020103053A1 (zh) 手写笔迹处理方法、手写输入设备及计算机可读存储介质
CN112114762A (zh) 一种控制屏幕显示的方法和装置
CN107291270B (zh) 远程笔迹数据的传输方法和装置
CN107656816A (zh) 一种多端同步操作的方法和装置
WO2024114069A9 (zh) 一种多设备协同控制的方法、显示设备及系统
CN103188543A (zh) 遥控方法及装置
CN111951349A (zh) 一种图形顶点类型的调整方法、装置及电子设备
CN117412100A (zh) 视频处理方法及相关设备
CN116208656A (zh) 设备连接方法、装置及服务器
US11729281B2 (en) Calibration data transmissions
CN114330332A (zh) 表单数据的处理方法、装置、电子设备及存储介质
WO2020119545A1 (zh) 归属数据的处理方法、设备及计算机可读存储介质

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: 18940541

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: 18940541

Country of ref document: EP

Kind code of ref document: A1