WO2014086264A1 - 实时手写笔迹的美化方法及电子设备 - Google Patents
实时手写笔迹的美化方法及电子设备 Download PDFInfo
- Publication number
- WO2014086264A1 WO2014086264A1 PCT/CN2013/088374 CN2013088374W WO2014086264A1 WO 2014086264 A1 WO2014086264 A1 WO 2014086264A1 CN 2013088374 W CN2013088374 W CN 2013088374W WO 2014086264 A1 WO2014086264 A1 WO 2014086264A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- handwriting
- track
- point
- transparency
- size
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/203—Drawing of straight lines or curves
Definitions
- the invention relates to a scheme for handwriting handwriting beautification, in particular to a beautification method and electronic device for real-time handwriting. Background technique
- the existing beautification techniques of handwriting are usually converted into one of several presets or dozens of pens by techniques such as stroke simulation, stroke matching, and template fusion.
- this method does not reflect the writing personality of each user well, making it impossible to effectively promote it in fields such as electronic signatures.
- an object of the present invention is to provide a method and an electronic device for realizing handwritten handwriting in real time, which are used to solve the problem that the handwritten handwriting cannot be easily embodied in the prior art.
- the present invention provides a method for beautifying handwritten handwriting in real time, which is applied to an electronic device having a track input device, which at least includes: 1) when detecting that the track input device starts track input Time, the coordinates and time of the track point on the track are captured in real time until the track input ends; 2) starting from the captured second track point, using the nth track captured Calculating the velocity of the nth track point by using the coordinates and the time and the time of the track point captured by the track point, wherein n is an integer greater than 1; 3) respectively based on the preset track point speed Corresponding to the size and transparency of the handwritten handwriting, to determine the size and transparency of the handwritten handwriting corresponding to the nth track point; 4) using the preset track segmentation rule, the captured plurality of track points are Each segment of the trajectory is beautified according to the corresponding size and transparency of the track points to obtain a beautified handwriting.
- the size and transparency of the handwritten handwriting corresponding to the captured first track point are preset values.
- the manner of determining the size of the handwritten handwriting corresponding to the track point comprises: determining a handwriting handwriting corresponding to the nth track point based on a linear relationship between the speed of the preset track point and the size of the handwriting handwriting size of.
- the manner of determining the transparency of the handwritten handwriting corresponding to the track point comprises: determining a handwriting handwriting corresponding to the nth track point based on a linear relationship between the speed of the preset track point and the transparency of the handwriting handwriting Transparency.
- the step of beautifying each segment of the captured plurality of track points according to the size and transparency of the track points by using the preset track segmentation rule comprises: 3-1) utilizing a preset segmentation rule, which interpolates each segment of the captured plurality of track points to obtain a smooth track formed by the interpolation point and the track point; 3-2) according to the interpolation process The size and transparency of each track point on the track to determine the size and transparency of the handwriting hand corresponding to each of the interpolation points; 3-3) using the interpolation point and the track point respectively corresponding to The size and transparency of the handwriting, the trajectory after the interpolation process is beautified into handwriting with continuous changes in size and transparency.
- the manner in which each of the trajectories formed by the captured plurality of trajectory points is beautified according to the size and transparency of the trajectory points according to the preset trajectory segmentation rule further includes: using formula 1, Interpolating each segment of the track;
- B n (t) MidPo i(P 2n _ 2 , ⁇ 2 ⁇ _, )(1 - tf + 3P 2n (l - t) 2 + 3P 2n t 2 (l - t) + MidPo i(P 2n , P 2n+1 )t formula 1;
- Bn(t) represents the set of coordinates of the interpolation point
- P2n-2, P2n-1, P2n, P2n+1 are the coordinates of the captured track point
- n is an integer greater than 1
- t is a step Number of times, MidPoint ( P2n-2,
- P2n-1) represents the coordinates of the midpoint of the track points P2n-2, P2n-1, and is also the track after the interpolation process Starting point;
- MidPoint ( P2n, P2n+1 ) represents the coordinates of the midpoint of the track points P2n, P2n+1, that is, the end point of the track after the interpolation process.
- the manner of determining the size of the handwritten handwriting corresponding to each of the starting point and the ending point according to the size corresponding to the track point on the trajectory comprises: based on the starting point and the ending point respectively in the captured adjacent The position of the track point determines the size and transparency of the handwriting stroke corresponding to each of the start point and the end point.
- the manner of determining the size of the handwritten handwriting corresponding to each of the interpolation points according to the size corresponding to the track point on the track comprises: using formula 2 to obtain the size of the handwriting hand corresponding to each interpolation point ;
- W(t) represents a set of sizes of handwritten handwriting corresponding to the interpolation point
- BeginPt.Width represents the size of the handwritten handwriting corresponding to the starting point
- ControlPtl. Width ControlPt2. Width respectively represents between the starting point and the ending point
- EndPt.Width represents the size of the handwriting corresponding to the end point.
- the manner of determining the transparency of the handwriting hand corresponding to each of the interpolation points according to the transparency corresponding to the track point on the track comprises: using formula 3 to obtain the transparency of the handwriting hand corresponding to each interpolation point ;
- A(t) (1 - 3 BeginPt. Alpha + 3t(l - t) 2 ControlPtl Alpha ., .
- A(t) represents a set of transparency of the interpolation point
- BeginPt.Alpha represents the transparency of the start point of the track after the interpolation process
- ControlPtl. Alpha ControlPt2.
- Alpha represents the two between the start point and the end point Transparency of the track point
- EndPt. Alpha represents the transparency of the end point of the track after the interpolation process.
- the manner of beautifying the trajectory after the interpolation process into handwritten handwriting with continuously varying size and transparency further comprises: sequentially performing the track point and the interpolation point in a corresponding size and transparency according to a template of the preset handwriting handwriting Splicing of handwriting.
- the present invention further provides an electronic device, comprising: at least: a track input device; and a capture module, configured to capture a track point on the track in real time when detecting that the track input device starts to perform track input Coordinates and time until the end of the trajectory input; speed calculation module, used to The second track point captured by the capture module starts, and the nth track point and the coordinates and time of one track point previously captured by the capture module are used to calculate the nth a velocity of the track point, where n is an integer greater than 1; a handwriting processing module, configured to calculate a correspondence between a speed of the preset track point and a size and transparency of the handwritten handwriting, respectively, and a calculation by the speed calculation module The speed of the nth track point is determined to determine the size and transparency of the handwriting handwriting corresponding to the nth track point; the beautification processing module is configured to use the preset track segmentation rule to capture the captured Each of the plurality of track points is beautified according to the size
- the size and transparency of the handwritten handwriting corresponding to the captured first track point are preset values.
- the handwriting processing module includes: a handwriting size processing sub-module, configured to perform a linear relationship between a speed of the preset track point and a size of the handwritten handwriting, and an nth calculated by the speed calculation module The velocity of the track point is used to determine the size of the handwritten handwriting corresponding to the nth track point.
- the handwriting processing module includes: a handwriting transparency processing sub-module, configured to perform a linear relationship between a speed of the preset track point and a transparency of the handwritten handwriting, and an nth calculated by the speed calculation module The velocity of the track point is used to determine the transparency of the handwritten handwriting corresponding to the nth track point.
- the beautification processing module includes: an interpolation processing sub-module, configured to perform interpolation processing on each of the plurality of track points captured by the capturing module by using a preset segmentation rule to obtain a smooth trajectory formed by the interpolation point and the track point; a handwriting processing sub-module of the interpolation point, configured to determine the interpolation according to the size and transparency corresponding to each track point on the track after the interpolation process The size and transparency of the handwritten handwriting corresponding to each point; the beautification processing sub-module, for the size and transparency of the handwritten handwriting corresponding to the interpolation point and the track point, and the beautification of the track after the interpolation process into a continuous size and transparency Changed handwriting.
- an interpolation processing sub-module configured to perform interpolation processing on each of the plurality of track points captured by the capturing module by using a preset segmentation rule to obtain a smooth trajectory formed by the interpolation point and the track point
- the handwriting processing sub-module of the interpolation point is further configured to: perform interpolation processing on each trajectory by using Equation 1:
- B n (t) MidPoint(P 2n _ 2 , ⁇ 2 ⁇ _, )(1 - t + 3P 2n _ l t(l - t) 2 + 3P 2n t 2 (l - t) + MidPoint(P 2n , P 2n+l )t formula 1 ;
- Bn(t) represents the set of coordinates of the interpolation point
- P2n-2, P2n-1, P2n, P2n+1 are the coordinates of the captured track point
- n is an integer greater than 1
- t is a step Number of times
- MidPoint ( P2n-2, P2n-1) represents the coordinates of the midpoint of the track points P2n-2, P2n-1, and is also the starting point of the track after the interpolation process
- MidPoint (P2n, P2n+1) represents the track points P2n, P2n+1 The coordinates of the midpoint, that is, the end point of the trajectory after interpolation.
- the handwriting processing sub-module of the interpolation point is further configured to determine, according to the positions of the captured adjacent track points, the size of the handwriting hand corresponding to each of the starting point and the ending point, respectively, based on the start point and the end point. And transparency.
- the handwriting sub-module of the interpolation point is further used to obtain the size of the handwriting hand corresponding to each interpolation point by using Equation 2;
- W(t) (1 - 3 BeginPt Width + 3t(l - t) 2 ControlPtl Width ,, .
- W(t) represents a set of sizes of handwritten handwriting corresponding to the interpolation point
- BeginPt.Width represents the size of the handwritten handwriting corresponding to the starting point
- ControlPtl. Width ControlPt2. Width respectively represents between the starting point and the ending point
- EndPt.Width represents the size of the handwriting corresponding to the end point.
- the handwriting processing sub-module of the interpolation point is further used to obtain the transparency of the handwriting hand corresponding to each interpolation point by using Equation 3;
- A(t) (1- 3 BeginPt. Alpha + 3t(l - t) 2 ControlPtl .Alpha .. .
- A(t) represents a set of transparency of the interpolation point
- BeginPt.Alpha represents the transparency of the start point of the track after the interpolation process
- ControlPtl. Alpha ControlPt2.
- Alpha represents the two between the start point and the end point Transparency of the track point
- EndPt. Alpha represents the transparency of the end point of the track after the interpolation process.
- the beautification processing sub-module is further configured to perform the splicing processing of the handwriting handwriting with the corresponding size and transparency in sequence according to the preset template of the handwriting handwriting.
- the realizing handwriting handwriting beautification method and electronic device of the present invention have the following beneficial effects: acquiring the velocity of the track point by capturing the coordinates and time of the track point in real time, and according to the speed of each track point and the size of the handwriting handwriting Corresponding relationship with transparency to beautify the trajectory formed by each track point, thereby effectively obtaining the strokes and strokes with the user's writing style; and, by using the third-order Bezier curve algorithm for interpolation, Obtaining a track with excellent smoothing effect; and, using the Bezier curve algorithm to calculate the size and transparency of the handwriting handwriting corresponding to each interpolation point, the handwriting can be obtained The strokes and strokes with smooth width and transparency can better reflect the user's style.
- FIG. 1 is a flow chart showing a method for beautifying the real-time handwriting of the present invention.
- FIG. 2 is a flow chart showing the steps of beautifying processing in the beautification method of the real-time handwriting of the present invention.
- 3 is a schematic view showing the structure of an electronic device of the present invention.
- FIG. 4 is a schematic view showing the structure of a handwriting processing module in the electronic device of the present invention.
- FIG. 5 is a schematic structural view showing a beautification processing module in the electronic device of the present invention. detailed description
- the present invention provides a beautification method for real-time handwriting.
- the beautification method is mainly performed by the beautification system.
- the beautification method is applicable to an electronic device having a track input device such as a mouse or a touch screen.
- the electronic device includes, but is not limited to, a mobile phone, a tablet, and the like.
- step S1 the beautification system captures the coordinates and time of the track point on the track in real time when it is detected that the track input device starts the track input until the track input ends.
- the beautification system monitors the start action and the end action of the handwriting input by the user using the track input device, and during this time, captures the track point coordinates and time passed by the track input device in real time.
- the landscaping system detects the action of the user pressing the mouse, it confirms that the handwriting input starts, and captures the track points that the mouse passes at the preset time interval, and when the user raises the mouse motion, confirms that the handwriting input ends. .
- step S2 the beautification system starts from the captured second trajectory point, and uses the captured nth trajectory point and the coordinates and time of one of the previously captured trajectory points to calculate the The velocity of n of the track points, where n is an integer greater than one.
- the beautification system captures the first track point, only the coordinates and time of the track point are recorded, and the speed of all the captured track points is calculated in real time from the capture of the second track point.
- the manner of capturing the speed of the nth track point is to calculate the displacement between the captured two track points by using the captured nth track point and the coordinates of a previously captured track point; Then, the speed of the nth track point is obtained according to the ratio of the displacement to the time difference between the two track points.
- the coordinates of the mouse capture beautification system has elapsed locus of points (Xl, yi), and the time T 1; and the coordinates of the trajectory point P 2 (, Y 2) and the time T 2;
- Equation (1) The resulting track points Pi and ?
- the average velocity v between 2 , and the average velocity V is taken as the velocity of the track point P 2 .
- step S3 the beautification system determines the size and transparency of the handwritten handwriting corresponding to the nth track point based on the correspondence between the speed of the preset track point and the size and transparency of the handwriting handwriting, respectively.
- the size may be the width of the handwriting.
- the correspondence between the speed of the preset track point and the size of the handwriting, and the correspondence between the speed and the transparency of the handwriting are calculated according to the experience of people's writing habits, for example, according to the writing habits of people. Statistics, the faster the writing speed, the finer the handwriting is; the faster the writing speed, the more transparent the handwriting is. Therefore, the correspondence between the speed and the size and transparency of the handwriting, respectively, may be a proportional correspondence.
- the beautification system determines the size of the handwritten handwriting corresponding to the nth track point based on a linear relationship between the preset speed and the size of the handwriting.
- the beautification system uses equation (2) to determine the size of the handwritten handwriting corresponding to the captured nth track point.
- W represents the size of the handwritten handwriting corresponding to the nth track point
- V represents the nth track point handwriting speed
- the parameter WW mm represents the maximum and minimum values of the handwritten handwriting respectively
- v max Vmm respectively represents a maximum value and a minimum value of the velocity of the track point
- WW ⁇ , vmax can adjust the size change effect ⁇ to indicate the degree of change of the size, and the larger the value, the larger
- WW mm , v ma . v can be preset fixed values, or can be preset by the user.
- the beautification system determines the transparency of the handwritten handwriting corresponding to the nth track point based on a linear relationship between the preset speed and the transparency of the handwriting.
- the beautification system uses equation (3) to determine the size of the handwritten handwriting corresponding to the captured nth track point.
- A A max + Amax ⁇ Amin v ( 3 )
- A represents the transparency of the handwritten handwriting corresponding to the nth track point
- V represents the nth track point handwriting speed
- the parameters respectively represent the maximum and minimum values of the transparency of the handwritten handwriting, v max ⁇ respectively indicating the The maximum value and the minimum value of the velocity of the track point
- a max A ⁇ , v max v mn can adjust the transparency change effect ⁇ to indicate the degree of change of the transparency, and the value thereof
- 4_ 4 ⁇ , Vmax , Vmm can be preset fixed values, or can be preset by the user. It should be noted that, according to the first track point captured by the formula (2) (3), since the speed is 0, the size and transparency of the corresponding handwriting handwriting may be the maximum value.
- the size and transparency of the handwritten handwriting corresponding to the captured first track point are preset values.
- the size and transparency of the handwriting stroke corresponding to the first track point captured by the beautification system preset is 1 pixel and 50% transparency, respectively.
- step S4 the beautification system uses a preset trajectory segmentation rule to beautify each trajectory formed by the captured plurality of trajectory points according to the size and transparency of the trajectory points respectively. Handwritten handwriting after beautification.
- the trajectory formed by the trajectory points is subjected to image processing according to the size and transparency of the trajectory points respectively, to obtain the trajectory of the trajectory.
- the track formed by the track points is processed according to the corresponding size and transparency of the corresponding track points; and so on, the beautification system segmentation
- the trajectory formed by each of the track points is beautified to obtain continuous handwriting.
- the landscaping system beautifies the trajectory formed by the three track points of the captured P1 P2 P3 according to a preset landscaping scheme, and then re-captures the trajectory points P3 P4 and P5.
- the trajectory of the composition is beautified to obtain a complete handwriting with a stroke as a point.
- the step S4 further includes: step S41, step S42, and S43.
- step S41 the beautification system performs interpolation processing on each segment of the captured plurality of track points by using a preset segmentation rule to obtain a track composed of the interpolation point and the track point.
- the method of interpolation processing includes but is not limited to: using the DDA interpolation algorithm for interpolation processing.
- the interpolation processing is performed by using the Bezier curve algorithm for interpolation processing.
- the beautification system uses equation (4) to perform interpolation processing on each segment of the track;
- B n (t) represents a set of coordinates of the interpolation point
- P 2n — 2 , P 2n _i P 2n , P 2n+1 are the coordinates of the captured track point
- n is an integer greater than 1
- MidPoint (P 2n — 2 , P 2n — represents the coordinates of the midpoint of the track points P 2n — 2 and ⁇ 2 till- ⁇ , which is also the starting point of the track after the interpolation process
- MidPoint ( ⁇ 2 ⁇ , ⁇ 2 ⁇ + ⁇ ) represents the coordinates of the midpoint of the track points ⁇ 2 ⁇ , ⁇ 2 ⁇ + ⁇ , that is, the end point of the track after the interpolation process.
- the beautification system further performs interpolation processing on the trajectory of the first segment by using formula (5);
- B, ( ⁇ (1 - 3 + 3P 2 i(l - tf + 3P 3 t 2 (l - t + MidPo int(P 3 , P 4 )t 3 (5)
- B t) represents the set of coordinates of the interpolation points in the trajectory of the first segment;
- P 2 , P 3 , P 4 are captured The coordinates of the track point;
- t is the number of steps;
- MidPoint (P 3 , P 4 ) represents the coordinates of the midpoint of the track points P 3 , P 4 .
- step S42 the beautification system determines the size and transparency of the handwriting stroke corresponding to each of the interpolation points according to the size and transparency corresponding to each of the track points on the track after the interpolation process.
- the beautification system divides the size and transparency of the handwritten handwriting corresponding to the adjacent track points according to the number of interpolation points inserted between adjacent track points, to obtain the handwriting corresponding to each interpolation point.
- the size and transparency of the handwriting is a simple measure of the handwriting.
- the beautification system performs interpolation processing on the trajectory formed by the trajectory points P 3 , P 4 , P 5 , and P 6 according to the formula (4) to obtain an interpolation point set B 2 (t) including ⁇ 3 ' , ⁇ 41 ', ⁇ 42 ', ⁇ 43 ', ⁇ 51 ', ⁇ 52 ', ⁇ 53 ', ⁇ 6 ' ⁇ interpolation points, where the interpolation point ⁇ 3 ' is the starting point of the interpolated trajectory Coordinate, ⁇ ⁇ 41 ', ⁇ 42 ', ⁇ 43 ' ⁇
- the interpolation point is the coordinates of the interpolation point between the track points ⁇ 4 and ⁇ 5 , ⁇ ⁇ 5 ⁇ ', ⁇ 52 ', ⁇ 53 ' ⁇
- the interpolation point is the trajectory Point ⁇ 5 , ⁇ 6 the coordinates of the interpolation point, ⁇ 6 ' is the coordinates of the end point of the interpolated trajectory
- the average value is used to determine the transparency of the handwritten handwriting corresponding to the starting point ⁇ 3 '; similarly, the size and transparency of the handwritten handwriting corresponding to the ending point ' 6 ' are the handwritten handwriting corresponding to each of the track points ⁇ 5 and ⁇ 6
- the average of the size and transparency is obtained; the size and transparency of the handwritten handwriting corresponding to the interpolation points ⁇ ⁇ 41 ' , ⁇ 42 ' , ⁇ 43 ' ⁇ are equally divided by the trajectory points ⁇ 4 and ⁇ 5 respectively.
- the transparency is calculated; the interpolation points ⁇ ⁇ 51 ', ⁇ 52 ', ⁇ 53 ' respectively correspond to the size and transparency of the handwritten handwriting by halving the track point 5 ,? 6 corresponding to the corresponding size and transparency calculated.
- the beautification system uses formula (6) to obtain the size of the handwriting stroke corresponding to each interpolation point;
- W(t) represents a set of sizes of handwritten handwriting corresponding to the interpolation point
- BeginPt.Width represents the size of the handwritten handwriting corresponding to the starting point of the track
- ControlPtl. Width ControlPt2. Width respectively represents the starting point and the ending point
- EndPt.Width represents the size of the handwritten handwriting corresponding to the end point of the track.
- the beautification system uses formula (7) to obtain the transparency of the handwriting stroke corresponding to each interpolation point;
- A(t) represents a set of transparency of the interpolation point
- BeginPt.Alpha represents the transparency of the start point of the track after the interpolation process
- ControlPtl. Alpha ControlPt2.
- Alpha represents the two between the start point and the end point Transparency of the track point
- EndPt. Alpha represents the transparency of the end point of the track after the interpolation process.
- the beautification system determines, according to the position of each of the start point and the end point between the adjacent trajectory points after scaling, corresponding to the start point and the end point respectively The transparency of handwriting.
- the starting point is the midpoint of two adjacent track points
- the transparency of the handwriting hand corresponding to the starting point is an average value of the transparency corresponding to each of the two track points. Determining the transparency of the handwriting handwriting corresponding to the end point and determining the transparency of the handwriting handwriting corresponding to the starting point The same or similar.
- step S43 the beautification system converts the interpolated processed track into a handwriting handwriting whose size and transparency continuously change by using the interpolation point of the interpolated processed track and the size and transparency of the handwritten handwriting corresponding to each of the track points.
- the beautification system may convert the interpolation points and the track points into the handwriting strokes whose size and transparency continuously change according to the manner in the step S4.
- the beautification system performs the splicing process of the handwriting handwriting in sequence with the corresponding size and transparency according to the preset template of the handwriting handwriting.
- the templates of the handwriting include but are not limited to: a brush-style template, a pen-style template, and the like.
- the manner of the splicing processing includes but is not limited to: a manner of image rendering, and the like.
- the template of the preset handwriting is a brush-style template
- the track points and interpolation points on the track after the interpolation process are ⁇ P 3 , P 4 , P 41 , P 42 , P 43 , P 5 , P 51 ,, P 52 ,, P 53 ,, P 6 , P 6 , ⁇ , wherein P 4 , P 5 , P 6 are track points, and other points are interpolation points, then the beautification system is pressed
- the size and transparency of the handwriting stroke corresponding to each point obtained in step S42 render a handwriting handwriting of a brush style conforming to the size and transparency in the vicinity of each point, to obtain a handwritten handwriting with a smooth stroke and smoothness of the ink stroke.
- the present invention also provides an electronic device 1.
- the electronic device 1 includes: a track input device 11, a capture module 12, a speed calculation module 13, a handwriting processing module 14, and a beautification processing module 15.
- the track input device 11 includes any device capable of manually inputting a track, including but not limited to: a mouse, a stylus pen, a touch screen, and the like.
- the capturing module 12 is configured to capture coordinates and time of a track point on the track in real time when detecting that the track input device 11 starts to perform track input until the track input ends.
- the capturing module 12 monitors the start and end actions of the handwriting input by the user using the track input device 11, and during this time, captures the coordinates and time of each track point that the track input device 11 passes in real time.
- the capture module 12 detects the action of the user pressing the mouse, it confirms that the handwriting input starts, captures the track points that the mouse passes at the preset time interval, and confirms the handwriting input when the user moves the mouse up motion. End.
- the speed calculation module 13 is configured to start from the second track point captured by the capturing module 12, using the nth track point captured by the capturing module 12, and one of the previously captured tracks The coordinates of the point and the time to calculate the velocity of the nth track point, where n is an integer greater than one. Specifically, when the speed calculation module 13 captures the first track point, only the coordinates and time of the track point are recorded, and all the track points captured are calculated in real time starting from capturing the second track point. speed.
- the manner of capturing the speed of the nth track point is to calculate the displacement between the captured two track points by using the captured nth track point and the coordinates of a previously captured track point; Then, the speed of the nth track point is obtained according to the ratio of the displacement to the time difference between the two track points.
- the speed calculation module 13 sequentially captures the coordinates ( Xl , yi) and time of the trajectory point Pi through which the mouse passes, and the coordinates (, y 2 ) of the trajectory point P 2 and the time t 2 ; ) The resulting track points Pi and ? The average velocity v between 2 , and the average velocity V is taken as the velocity of the track point P 2 .
- the handwriting processing module 14 is configured to calculate a correspondence between a speed of the preset track point and a size and a transparency of the handwritten handwriting, and a speed of the nth track point calculated by the speed calculation module 13 Determining the size and transparency of the handwritten handwriting corresponding to the nth track point.
- the correspondence between the speed of the preset track point and the size of the handwriting, and the correspondence between the speed and the transparency of the handwriting are calculated according to the experience of people's writing habits, for example, according to the writing habits of people. Statistics, the faster the writing speed, the finer the handwriting is; the faster the writing speed, the more transparent the handwriting is. Therefore, the correspondence between the speed and the size and transparency of the handwriting, respectively, may be a proportional correspondence.
- the handwriting processing module 14 includes a handwriting size processing sub-module 141 and a handwriting transparency processing sub-module 142.
- the handwriting size processing sub-module 141 is configured to determine, according to a linear relationship between a speed of the preset track point and a size of the handwriting handwriting, and a speed of the nth track point calculated by the speed calculation module 13 The size of the handwritten handwriting corresponding to the nth track point.
- the handwriting size processing sub-module 141 uses the formula (2) to determine the size of the handwritten handwriting corresponding to the captured nth track point.
- W W ⁇ —— ⁇ v ( 2)
- W represents the size of the handwritten handwriting corresponding to the nth track point
- V represents the nth track point handwriting speed
- W ! ⁇ ⁇ represents the maximum and minimum values of the handwritten handwriting, respectively
- V n-un respectively represents the maximum value and the minimum value of the velocity of the track point;
- W L v... can adjust the size change effect ⁇ to indicate the degree of change of the size, and the larger the value, the larger
- WW ⁇ , v max Vmm can be a preset fixed value, or can be preset by the user.
- the handwriting transparency processing sub-module 142 is configured to determine, according to a linear relationship between the speed of the preset track point and the transparency of the handwritten handwriting, and the speed of the nth track point calculated by the speed calculation module 13 The transparency of the handwritten handwriting corresponding to the nth track point.
- the handwriting transparency processing sub-module 142 uses the formula (3) to determine the size of the handwritten handwriting corresponding to the captured nth track point.
- A A max + Amax ⁇ Amin v ( 3 )
- A represents the transparency of the handwritten handwriting corresponding to the nth track point
- V represents the nth handwritten speed of the track point
- the parameters respectively represent the maximum and minimum values of the transparency of the handwritten handwriting, v max V, respectively
- a max v max v mn can adjust the transparency change effect U °"n represents the degree of change of the transparency, and the value thereof
- ⁇ _ A ⁇ , v max , Vmm may be preset fixed values, or may be preset by the user. It should be noted that, according to the first track point captured by the formula (2) (3), since the speed is 0, the size and transparency of the corresponding handwriting handwriting may be the maximum value.
- the size and transparency of the handwritten handwriting corresponding to the captured first track point are preset values.
- the size and transparency of the handwriting stroke corresponding to the first track point captured by the preset are 1 pixel and 50% transparency, respectively.
- the beautification processing module 15 is configured to use, according to a preset trajectory segmentation rule, each trajectory formed by the captured plurality of trajectory points to correspond to the trajectory points obtained by the handwriting processing module 14
- the size and transparency are beautified to get the beautified handwriting.
- the beautification processing module 15 starts to perform image processing on the trajectories formed by the track points according to the size and transparency of the track points when the track points satisfying the preset number are captured, to obtain the segment.
- the module 15 performs the beautification processing on the trajectory formed by each of the track points to obtain a continuous handwriting.
- the beautification processing module 15 beautifies the trajectories formed by the three track points of the captured P1, P2, and P3 according to the preset beautification processing scheme, and then recaptures the track points P3, P4, and P5.
- the formed trajectory is beautified to obtain a complete handwriting with a stroke as a point.
- the beautification processing module 15 includes: an interpolation processing sub-module 151, a handwriting processing sub-module 152 for interpolating points, and a beautification processing sub-module 153.
- the interpolation processing sub-module 151 is configured to perform interpolation processing on each of the plurality of track points captured by the capturing module 12 by using a preset segmentation rule to obtain an interpolation point and the track point.
- the interpolation processing includes but is not limited to: using the DDA interpolation algorithm for interpolation processing.
- the interpolation processing is performed by using the Bezier curve algorithm for interpolation processing.
- the interpolation processing sub-module 151 performs interpolation processing for each segment of the trajectory by using formula (4);
- B n (t) represents a set of coordinates of the interpolation point
- P 2n — 2 , P 2n _i P 2n , P 2n+1 are the coordinates of the captured track point
- n is an integer greater than 1
- MidPoint (P 2n — 2 , P 2n — represents the coordinates of the midpoint of the track points P 2n — 2 and ⁇ 2 till- ⁇ , which is also the starting point of the track after the interpolation process
- MidPoint ( ⁇ 2 ⁇ , ⁇ 2 ⁇ + ⁇ ) represents the coordinates of the midpoint of the track points ⁇ 2 ⁇ , ⁇ 2 ⁇ + ⁇ , that is, the end point of the track after the interpolation process.
- the interpolation processing sub-module 151 further performs interpolation processing on the trajectory of the first segment by using formula (5);
- B, ( (1 - 3 + 3P 2 i(l - tf + 3P 3 t 2 (l - t) + MidPo int(P 3 , P 4 )t 3 (5)
- B t) represents the first segment a set of coordinates of the interpolation points in the trajectory
- P 2 , P 3 , P 4 are the coordinates of the captured track points
- t is the number of steps
- MidPoint (P 3 , P 4 ) represents the Rail The coordinates of the midpoint of the trace points P 3 and P 4 .
- the handwriting sub-module 152 of the interpolation point is configured to determine the size and transparency of the handwriting hand corresponding to each of the interpolation points according to the size and transparency corresponding to each track point on the track after the interpolation process. .
- the handwriting processing sub-module 152 of the interpolation point equally divides the size and transparency of the handwriting handwriting corresponding to the adjacent track points according to the number of interpolation points inserted between adjacent track points, to obtain each The size and transparency of the handwriting trace corresponding to the interpolation point.
- the handwriting sub-module 152 of the interpolation point performs interpolation processing on the trajectory formed by the track points P 3 , P 4 , P 5 and P 6 according to the formula (4) to obtain an interpolation point set B 2 (t), It includes ⁇ 3 ' , ⁇ 41 ', ⁇ 42 ', ⁇ 43 ' , ⁇ 51 ', ⁇ 52 ', ⁇ 53 ' , ⁇ 6 ' ⁇ interpolation points, where the interpolation point ⁇ 3 ' is interpolated
- the interpolation point is the coordinates of the interpolation point between the track points ⁇ 4 and ⁇ 5 , ⁇ ⁇ 51 ' , ⁇ 52 ', ⁇ 53 ' ⁇
- Interpolation point is the coordinates of the interpolation point between the track points 5 and ⁇ 6 , ⁇ 6 '
- the handwriting sub-module 152 of the interpolation point uses the formula (6) to obtain the size of the handwriting corresponding to each interpolation point;
- W(t) represents a set of sizes of handwritten handwriting corresponding to the interpolation point
- BeginPt.Width represents the size of the handwritten handwriting corresponding to the starting point of the track
- ControlPtl. Width, ControlPt2.Width respectively indicate the starting point and the ending point
- EndPt.Width represents the size of the handwritten handwriting corresponding to the end point of the track.
- the handwriting processing sub-module 152 of the interpolation point uses the formula (7) to obtain the transparency of the handwriting stroke corresponding to each interpolation point;
- A(t) (1- BeginPt. Alpha + 3t(l - t) ControlPtl Alpha ( ? )
- A(t) represents a set of transparency of the interpolation point
- BeginPt.Alpha represents the transparency of the start point of the track after the interpolation process
- ControlPtl. Alpha ControlPt2.
- Alpha represents the two between the start point and the end point Transparency of the track point
- EndPt. Alpha represents the transparency of the end point of the track after the interpolation process.
- the beautification system determines, according to the position of each of the start point and the end point between the adjacent trajectory points after scaling, corresponding to the start point and the end point respectively The transparency of handwriting.
- the starting point is the midpoint of two adjacent track points
- the transparency of the handwriting hand corresponding to the starting point is the average value of the transparency corresponding to each of the two track points.
- the manner in which the transparency of the handwriting corresponding to the end point is determined is the same as or similar to the method of determining the transparency of the handwriting corresponding to the starting point.
- the beautification processing sub-module 153 is configured to beautify the interpolated trajectory into a handwriting with continuous change in size and transparency by using the interpolation point of the interpolated trajectory and the size and transparency of the handwriting stroke corresponding to each of the trajectory points. Handwriting.
- the beautification processing sub-module 153 can convert the interpolation point and the track point according to the manner of the track into a handwriting hand whose size and transparency continuously change according to the manner in the step S4.
- the beautification processing sub-module 153 sequentially performs the stitching processing of the handwriting handwriting with the corresponding size and transparency according to the preset template of the handwriting handwriting.
- the templates of the handwriting include, but are not limited to: a brush-style template, a pen-style template, and the like.
- the manner of the splicing processing includes but is not limited to: a manner of image rendering, and the like.
- the template of the preset handwriting is a brush-style template
- the track points and interpolation points on the track after the interpolation process are ⁇ P 3 , P 4 , P 41 , P 42 , P 43 , P 5 , P 51 ,, P 52 ,, P 53 ,, P 6 , P 6 , ⁇ , wherein P 4 , P 5 , P 6 are track points, and other points are interpolation points
- the beautification processing sub-module 153 according to the size and transparency of the handwriting corresponding to each point obtained in step S42, sequentially render a brush-style handwriting with a matching size and transparency in the vicinity of each point, to obtain a stroke thickness and a smooth variation of the ink color.
- the beautification processing sub-module 153 according to the size and transparency of the handwriting corresponding to each point obtained in step S42, sequentially render a brush-style handwriting with a matching size and transparency in the vicinity of each point, to obtain a stroke thickness and a smooth variation
- the working process of the electronic device 1 is as follows:
- the user performs handwriting input by using the track input device 11, and the capturing module 12 is based on the user.
- the start of the handwriting input is started, until the end of the action, the coordinates and time of the track point that the track input device 11 passes are captured in real time, and the coordinates and time of the captured track point are supplied to the speed calculation.
- the module 13 is configured to calculate the speed of the track point by the speed calculation module 13; and calculate the captured track point by the handwriting processing module 14 based on the linear relationship between the speed of the preset track point and the size and transparency of the handwriting handwriting.
- the handwriting processing sub-module 152 obtains the size and transparency corresponding to each interpolation point based on the corresponding size and transparency of the corresponding track point, and then the interpolation and tracking points are sequentially performed by the beautification sub-processing module.
- the rendering process is performed to obtain handwritten handwriting, that is, strokes or strokes, in which the size and transparency of the handwriting are smoothly changed.
- the realizing handwriting handwriting beautification method and electronic device of the present invention acquires the velocity of the track point by capturing the coordinates and time of the track point in real time, and according to the speed of each track point and the size and transparency of the handwriting handwriting.
- the relationship is used to beautify the trajectory formed by each track point, thereby effectively obtaining the strokes and strokes with the user's writing style.
- the third-order Bezier curve algorithm is used for the interpolation process, and the smoothing effect can be obtained.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本发明提供一种实时手写笔迹的美化方法及电子设备。根据本发明所述的电子设备,能够实时捕获轨迹输入装置进行手写输入时的轨迹点,并根据所捕获的轨迹点的坐标和时间来计算该轨迹点的速度,再基于预设的轨迹点的速度分别与手写轨迹的尺寸和透明度的对应关系来确定每一个轨迹点所对应的尺寸和透明度;再依据预设的轨迹分段规则,将所捕获的多个所述轨迹点所构成的每一段轨迹按照所述轨迹点各自所对应的尺寸和透明度进行美化处理,以得到美化后的手写笔迹。由此,能够有效地取得具有用户书写风格的笔锋、笔画。
Description
实时手写笔迹的美化方法及电子设备 技术领域
本发明涉及一种手写笔迹美化的方案, 特别是涉及一种实时手写笔迹的美化 方法及电子设备。 背景技术
随着计算机设备的普及, 利用计算机设备进行文字输入已成为人们日常生活 的一部分。 在即时通信、 电子签名等多种应用场景中, 人们需要将自己的笔迹输 入至所述计算机设备中。 目前, 常用的做法是获取原始的输入笔迹, 并不对输入 的笔迹进行美化处理。 例如, 即时通信软件中手写输入模式。 然而, 对于这些手 写轨迹的处理往往风格单调, 缺乏个性, 不够生动。
目前, 现有的手写笔迹的美化技术通常利用笔画模拟、 笔画匹配、 模板融合 等技术将手写输入的文字转换成预设的几种或几十种笔体中的一种。 然而这种方 式不能很好地反映每个用户的书写个性,使得在电子签名等领域中无法有效推广。
为了解决手写笔迹无法体现个性化的问题, 市场上还出现一种电子写字板, 其具有压力传感器等传感装置, 写字板可以所检测到的手写输入时的压力值、 速 度值等来绘制能体现原始笔迹、 且具有毛笔或钢笔美化效果的手写笔迹。 但该电 子写字板需要用户单独购买, 成本过高。
因此, 需要对现有的手写笔迹的美化方案进行改进, 使得用户利用鼠标、 触 摸笔等常用轨迹输入装置来得到具有美化效果的手写笔迹。 发明内容
鉴于以上所述现有技术的缺点, 本发明的目的在于提供一种实时手写笔迹的 美化方法及电子设备, 用于解决现有技术中手写笔迹无法简便的体现个性化特点 的问题。
为实现上述目的及其他相关目的,本发明提供一种实时手写笔迹的美化方法, 应用于具有轨迹输入装置的电子设备中, 其至少包括: 1 )当检测到所述轨迹输入 装置开始进行轨迹输入时, 实时捕获所述轨迹上的轨迹点的坐标和时间, 直至所 述轨迹输入结束; 2)从所捕获的第二个轨迹点开始, 利用所捕获的第 n个所述轨
迹点、 及此前所捕获的一个所述轨迹点的坐标和时间, 来计算第 n个所述轨迹点 的速度, 其中, n为大于 1的整数; 3 )基于预设的轨迹点的速度分别与手写笔迹 的尺寸和透明度的对应关系, 来确定第 n个所述轨迹点所对应的手写笔迹的尺寸 和透明度; 4)利用预设的轨迹分段规则, 将所捕获的多个轨迹点所构成的每一段 轨迹按照所述轨迹点各自所对应的尺寸和透明度进行美化处理, 以得到美化后的 手写笔迹。
优选地, 所捕获的第一个所述轨迹点所对应的手写笔迹的尺寸和透明度均为 预设值。
优选地, 确定所述轨迹点所对应的手写笔迹的尺寸的方式包括: 基于预设的 轨迹点的速度与手写笔迹的尺寸的线性关系, 来确定第 n个所述轨迹点所对应的 手写笔迹的尺寸。
优选地, 确定所述轨迹点所对应的手写笔迹的透明度的方式包括: 基于预设 的轨迹点的速度与手写笔迹的透明度的线性关系, 来确定第 n个所述轨迹点所对 应的手写笔迹的透明度。
优选地, 利用预设的轨迹分段规则, 将所捕获的多个轨迹点所构成的每一段 轨迹按照所述轨迹点各自所对应的尺寸和透明度进行美化处理的步骤包括: 3-1 ) 利用预设的分段规则,将所捕获的多个轨迹点所构成的每一段轨迹进行插值处理, 以得到由插值点和所述轨迹点所构成的平滑轨迹; 3-2)根据经插值处理后的所述 轨迹上的各所述轨迹点所对应的尺寸和透明度来确定所述插值点各自所对应的手 写笔迹的尺寸和透明度; 3-3 ) 利用所述插值点和轨迹点各自所对应的手写笔迹 的尺寸和透明度, 将插值处理后的轨迹美化处理成尺寸和透明度连续变化的手写 笔迹。
优选地, 利用预设的轨迹分段规则, 将所捕获的多个轨迹点所构成的每一段 轨迹按照所述轨迹点各自所对应的尺寸和透明度进行美化处理的方式还包括: 利 用公式 1, 将每一段轨迹进行插值处理;
Bn (t) = MidPo i(P2n_2 , Ρ2η_, )(1 - tf + 3P2n (l - t)2 + 3P2nt2 (l - t) + MidPo i(P2n , P2n+1 )t 公式 1 ;
其中, Bn(t)表示插值点的坐标的集合; P2n-2、 P2n-1、 P2n、 P2n+1均为所捕 获的所述轨迹点的坐标; n为大于 1 的整数; t为步进次数、 MidPoint ( P2n-2,
P2n- 1 ) 表示所述轨迹点 P2n-2、 P2n-1 的中点的坐标, 也是插值处理后的轨迹的
起点; MidPoint ( P2n, P2n+1 ) 表示所述轨迹点 P2n、 P2n+1 的中点的坐标, 也 就是插值处理后的轨迹的终点。
优选地, 根据所述轨迹上的所述轨迹点所对应的尺寸来确定所述起点和终点 各自所对应的手写笔迹的尺寸的方式包括: 基于所述起点和终点分别在所捕获的 相邻的所述轨迹点的位置来确定所述起点和终点各自所对应的手写笔迹的尺寸和 透明度。
优选地, 根据所述轨迹上的所述轨迹点所对应的尺寸来确定所述插值点各自 所对应的手写笔迹的尺寸的方式包括: 利用公式 2来取得各插值点所对应的手写 笔迹的尺寸;
W (0 = (1 - 03 BeginPt Width + 3t(l - t)2 ControlPtl Width ,、 _^
+ 3t3 (1 - t)ControlPt2.Width + t3EndPt Width ,
其中, W(t)表示插值点所对应的手写笔迹的尺寸的集合; BeginPt.Width表示 所述起点所对应的手写笔迹的尺寸; ControlPtl . Width、 ControlPt2. Width 分别表 示所述起点和终点之间的两个所述轨迹点所对应的手写笔迹的尺寸; EndPt.Width 表示所述终点所对应的手写笔迹的尺寸。
优选地, 根据所述轨迹上的所述轨迹点所对应的透明度来确定所述插值点各 自所对应的手写笔迹的透明度的方式包括: 利用公式 3来取得各插值点所对应的 手写笔迹的透明度;
A(t) = (1- 3 BeginPt. Alpha + 3t(l - t)2 ControlPtl Alpha ., .
公式 3;
+ 3r (1 - t)ControlPtl.Alpha + t EndPt. Alpha
其中, A(t)表示插值点的透明度的集合; BeginPt.Alpha表示插值处理后的所 述轨迹的起点的透明度; ControlPtl . Alpha、 ControlPt2. Alpha表示所述起点和终 点之间的两个所述轨迹点的透明度; EndPt. Alpha表示插值处理后的所述轨迹的 终点的透明度。
优选地, 将插值处理后的轨迹美化处理成尺寸和透明度连续变化的手写笔迹 的方式还包括: 按照预设的手写笔迹的模板, 将所述轨迹点和插值点依次以相应 的尺寸和透明度进行手写笔迹的拼接处理。
基于上述目的, 本发明还提供一种电子设备, 其至少包括: 轨迹输入装置; 捕获模块, 用于当检测到所述轨迹输入装置开始进行轨迹输入时, 实时捕获所述 轨迹上的轨迹点的坐标和时间, 直至所述轨迹输入结束; 速度计算模块, 用于从
所述捕获模块所捕获的第二个轨迹点开始, 利用所述捕获模块所捕获的第 n个所 述轨迹点、 及此前所捕获的一个所述轨迹点的坐标和时间, 来计算第 n个所述轨 迹点的速度, 其中, n为大于 1的整数; 笔迹处理模块, 用于基于预设的轨迹点 的速度分别与手写笔迹的尺寸和透明度的对应关系、 以及所述速度计算模块所计 算出的第 n个所述轨迹点的速度, 来确定第 n个所述轨迹点所对应的手写笔迹的 尺寸和透明度; 美化处理模块, 用于利用预设的轨迹分段规则, 将所捕获的多个 轨迹点所构成的每一段轨迹按照所述笔迹处理模块所取得的所述轨迹点各自所对 应的尺寸和透明度进行美化处理, 以得到美化后的手写笔迹。
优选地, 所捕获的第一个所述轨迹点所对应的手写笔迹的尺寸和透明度均为 预设值。
优选地, 所述笔迹处理模块包括: 笔迹尺寸处理子模块, 用于基于预设的轨 迹点的速度与手写笔迹的尺寸的线性关系、 以及所述速度计算模块所计算出的第 n个所述轨迹点的速度, 来确定第 n个所述轨迹点所对应的手写笔迹的尺寸。
优选地, 所述笔迹处理模块包括: 笔迹透明度处理子模块, 用于基于预设的 轨迹点的速度与手写笔迹的透明度的线性关系、 以及所述速度计算模块所计算出 的第 n个所述轨迹点的速度, 来确定第 n个所述轨迹点所对应的手写笔迹的透明 度。
优选地, 所述美化处理模块包括: 插值处理子模块, 用于利用预设的分段规 则, 将所述捕获模块所捕获的多个轨迹点所构成的每一段轨迹进行插值处理, 以 得到由插值点和所述轨迹点所构成的平滑轨迹; 插值点的笔迹处理子模块, 用于 根据经插值处理后的所述轨迹上的各所述轨迹点所对应的尺寸和透明度来确定所 述插值点各自所对应的手写笔迹的尺寸和透明度; 美化处理子模块,用于所述插 值点和轨迹点各自所对应的手写笔迹的尺寸和透明度, 将插值处理后的轨迹美化 处理成尺寸和透明度连续变化的手写笔迹。
优选地, 所述插值点的笔迹处理子模块还用于: 利用公式 1, 将每一段轨迹 进行插值处理;
Bn (t) = MidPoint(P2n_2 , Ρ2η_, )(1 - t + 3P2n_lt(l - t)2 + 3P2nt2 (l - t) + MidPoint(P2n , P2n+l )t 公式 1 ;
其中, Bn(t)表示插值点的坐标的集合; P2n-2、 P2n-1、 P2n、 P2n+1均为所捕 获的所述轨迹点的坐标; n为大于 1 的整数; t为步进次数、 MidPoint ( P2n-2,
P2n-1 ) 表示所述轨迹点 P2n-2、 P2n-1 的中点的坐标, 也是插值处理后的轨迹的 起点; MidPoint ( P2n, P2n+1 ) 表示所述轨迹点 P2n、 P2n+1 的中点的坐标, 也 就是插值处理后的轨迹的终点。
优选地, 所述插值点的笔迹处理子模块还用于基于所述起点和终点分别在所 捕获的相邻的所述轨迹点的位置来确定所述起点和终点各自所对应的手写笔迹的 尺寸和透明度。
优选地, 所述插值点的笔迹处理子模块还用于利用公式 2来取得各插值点所 对应的手写笔迹的尺寸;
W(t) = (1- 3 BeginPt Width + 3t(l - t)2 ControlPtl Width ,、 .
公式 2;
+ 3ί3 (1 - t)ControlPt2Width + t3EndPt Width
其中, W(t)表示插值点所对应的手写笔迹的尺寸的集合; BeginPt.Width表示 所述起点所对应的手写笔迹的尺寸; ControlPtl . Width、 ControlPt2. Width 分别表 示所述起点和终点之间的两个所述轨迹点所对应的手写笔迹的尺寸; EndPt.Width 表示所述终点所对应的手写笔迹的尺寸。
优选地, 所述插值点的笔迹处理子模块还用于利用公式 3来取得各插值点所 对应的手写笔迹的透明度;
A(t) = (1- 3 BeginPt. Alpha + 3t(l - t)2 ControlPtl .Alpha .. .
公式 3 ;
+ 3r (1 - t)ControlPtl.Alpha + t EndPt. Alpha
其中, A(t)表示插值点的透明度的集合; BeginPt.Alpha表示插值处理后的所 述轨迹的起点的透明度; ControlPtl . Alpha、 ControlPt2. Alpha表示所述起点和终 点之间的两个所述轨迹点的透明度; EndPt. Alpha表示插值处理后的所述轨迹的 终点的透明度。
优选地, 美化处理子模块还用于按照预设的手写笔迹的模板, 将所述轨迹点 和插值点依次以相应的尺寸和透明度进行手写笔迹的拼接处理。
如上所述, 本发明的实时手写笔迹的美化方法及电子设备, 具有以下有益效 果: 通过实时捕获轨迹点的坐标和时间来获取轨迹点的速度, 并依据各轨迹点的 速度与手写笔迹的尺寸和透明度的对应关系来对各轨迹点所构成的轨迹进行美化 处理, 由此, 能够有效地取得具有用户书写风格的笔锋、 笔画; 另外, 利用三阶 贝赛尔曲线算法来进行插值处理, 能够得到平滑效果出色的轨迹; 并且, 利用贝 赛尔曲线算法来计算各插值点所对应的手写笔迹的尺寸和透明度, 能够得到笔迹
宽度、 透明度平滑变化的笔锋、 笔画, 更能体现用户的笔体风格。 附图说明
图 1显示为本发明的实时手写笔迹的美化方法的流程图。
图 2显示为本发明的实时手写笔迹的美化方法中美化处理步骤的流程图。 图 3显示为本发明的电子设备的结构示意图。
图 4显示为本发明的电子设备中的笔迹处理模块的结构示意图。
图 5显示为本发明的电子设备中的美化处理模块的结构示意图。 具体实施方式
以下通过特定的具体实例说明本发明的实施方式, 本领域技术人员可由本说 明书所揭露的内容轻易地了解本发明的其他优点与功效。 本发明还可以通过另外 不同的具体实施方式加以实施或应用, 本说明书中的各项细节也可以基于不同观 点与应用, 在没有背离本发明的精神下进行各种修饰或改变。
如图 1所示, 本发明提供一种实时手写笔迹的美化方法。 所述美化方法主要 由美化***来执行。 所述美化方法适用于具有鼠标、 触摸屏等轨迹输入装置的电 子设备中。 所述电子设备包括但不限于: 手机、 平板电脑等。
在步骤 S1 中, 所述美化***当检测到所述轨迹输入装置开始进行轨迹输入 时, 实时捕获所述轨迹上的轨迹点的坐标和时间, 直至所述轨迹输入结束。
具体地, 所述美化***监测用户利用轨迹输入装置进行手写输入的开始动作 以及结束的动作, 并在此期间, 实时捕获所述轨迹输入装置所经过的各轨迹点坐 标和时间。
例如, 所述美化***监测到用户按下鼠标的动作时, 确认手写输入开始, 按 预设时间间隔捕获鼠标所经过的各轨迹点, 当监测到用户抬起鼠标的动作时, 确 认手写输入结束。
在步骤 S2 中, 所述美化***从所捕获的第二个轨迹点开始, 利用所捕获的 第 n个所述轨迹点、 及此前所捕获的一个所述轨迹点的坐标和时间, 来计算第 n 个所述轨迹点的速度, 其中, n为大于 1的整数。
具体地, 所述美化***捕获第一个所述轨迹点时, 仅记录所述轨迹点的坐标 和时间, 从捕获第二个所述轨迹点开始, 实时计算所捕获的所有轨迹点的速度。
其中, 捕获第 n个所述轨迹点的速度的方式为利用所捕获的第 n个轨迹点、 及此前所捕获的一个轨迹点的坐标, 计算所捕获的该两个轨迹点之间的位移; 再 根据所述位移与该两个轨迹点的时间之差的比值, 来取得第 n个所述轨迹点的速 度。
例如, 所述美化***先后捕获鼠标所经过的轨迹点 的坐标 (Xl, yi ) 和时 间 t1 ; 及轨迹点 P2的坐标 ( , y2) 和时间 t2; 接着, 利用公式 (1 ) 所得到的轨 迹点 Pi和?2之间的平均速度 v, 并将所述平均速度 V作为轨迹点 P2的速度。
在步骤 S3 中, 所述美化***基于预设的轨迹点的速度分别与手写笔迹的尺 寸和透明度的对应关系, 来确定第 n个所述轨迹点所对应的手写笔迹的尺寸和透 明度。 其中, 所述尺寸可以是手写笔迹的宽度。
具体地, 预设的轨迹点的速度与手写笔迹的尺寸的对应关系、 及速度与手写 笔迹的透明度的对应关系是根据人们的书写习惯的经验进行计算得到的, 例如, 根据对人们书写习惯的统计, 书写速度越快, 手写笔迹就越细; 书写速度越快, 手写笔迹就越透明。 因此, 所述速度分别与手写笔迹的尺寸和透明度的对应关系 可以是成比例的对应关系。
优选地, 所述美化***基于预设的速度与手写笔迹的尺寸的线性关系, 来确 定第 n个所述轨迹点所对应的手写笔迹的尺寸。
例如, 所述美化***利用公式(2)来确定所捕获的第 n个轨迹点所对应的手 写笔迹的尺寸。
W - W
W = W^ ≡——≡^v ( 2)
V mi .n ― V max
其中, W表示第 n个轨迹点所对应的手写笔迹的尺寸; V表示第 n个所述轨 迹点手写速度,参数 W Wmm分别表示手写笔迹的尺寸的最大值和最小值, vmax Vmm分别表示所述轨迹点的速度的最大值和最小值; W W^ , vmax 能够 调整所述尺寸变化效果^ 表示所述尺寸的变化程度, 它的值越大, 则所
V mm . — V max
述尺寸变化越明显。
其中, W Wmm , vma . v 可为预设的固定值, 也可以由用户预先设定。
所述美化***基于预设的速度与手写笔迹的透明度的线性关系, 来确定第 n 个所述轨迹点所对应的手写笔迹的透明度。
例如, 所述美化***利用公式(3 )来确定所捕获的第 n个轨迹点所对应的手 写笔迹的尺寸。
A = Amax + Amax ~ Amin v ( 3 )
v mi■n— v max
其中, A表示第 n个轨迹点所对应的手写笔迹的透明度; V表示第 n个所述 轨迹点手写速度,参数 分别表示手写笔迹的透明度的最大值和最小值, vmax ^ 分别表示所述轨迹点的速度的最大值和最小值; Amax A^ , vmax vmn 能够调整所述透明度变化效果 κ 表示所述透明度的变化程度, 它的值越
V mm . — V max
大, 则所述透明度变化越明显。
其中, 4_ 4^、 Vmax、 Vmm可为预设的固定值, 也可以由用户预先设定。 需要说明的是, 按照公式 (2) ( 3 ) 所捕获的第一个所述轨迹点由于速度 为 0, 则其所对应的手写笔迹的尺寸和透明度可以均为最大值。
优选地, 所捕获的第一个所述轨迹点所对应的手写笔迹的尺寸和透明度均为 预设值。
例如, 所述美化***预设捕获的第一个所述轨迹点所对应的手写笔迹的尺寸 和透明度分别为 1个像素和 50%的透明度。
在步骤 S4 中, 所述美化***利用预设的轨迹分段规则, 将所捕获的多个轨 迹点所构成的每一段轨迹按照所述轨迹点各自所对应的尺寸和透明度进行美化处 理, 以得到美化后的手写笔迹。
具体地, 所述美化***在捕获到满足预设数量的轨迹点时, 开始对这些轨迹 点所构成的轨迹按照所述轨迹点各自所对应的尺寸和透明度进行图像处理, 以得 到该段轨迹所对应的手写笔迹, 然后当再捕获相应数量的轨迹点时, 将该段轨迹 点所构成的轨迹按照相应轨迹点各自所对应的尺寸和透明度进行图像处理; 依此 类推, 所述美化***分段地将各所述轨迹点所构成的轨迹进行美化处理, 以得到 连续的手写笔迹。
例如, 所述美化***按照预设的美化处理的方案, 将已捕获的 Pl P2 P3 三个轨迹点所构成的轨迹进行美化处理, 然后将再捕获的轨迹点 P3 P4和 P5所
构成的轨迹进行美化处理, 以得到笔画为点的完整的手写笔迹。
优选地, 如图 2所示, 所述步骤 S4还包括: 步骤 S41、 步骤 S42、 S43。
在步骤 S41中, 所述美化***利用预设的分段规则, 将所捕获的多个轨迹点 所构成的每一段轨迹进行插值处理,以得到由插值点和所述轨迹点所构成的轨迹。 其中, 插值处理的方式包括但不限于: 利用 DDA插值算法进行插值处理。 优选 地, 插值处理的方式为利用贝塞尔曲线算法进行插值处理。
具体地, 所述美化***利用公式 (4) , 将每一段轨迹进行插值处理;
Bn (0 = MidPo (P2„—2 , Ρ2η_γ )(1 - 1)3 + ?>P2nj{l - tf + 3P2nt2 (1 - 0 + MidPo (P2„ , P2n+1 )t (4)
其中, Bn(t)表示插值点的坐标的集合; P2n— 2、 P2n_i P2n、 P2n+1均为所捕获的 所述轨迹点的坐标; n为大于 1的整数; t为步进次数、 MidPoint (P2n— 2, P2n— 表示所述轨迹点 P2n— 2、 Ρ2„-ι 的中点的坐标, 也是插值处理后的轨迹的起点; MidPoint (Ρ2η, Ρ2η+ι ) 表示所述轨迹点 Ρ2η、 Ρ2η+ι的中点的坐标, 也就是插值处 理后的轨迹的终点。
优选地, 所述美化***还利用公式 (5) 对第一段所述轨迹进行插值处理; B, ( = ^ (1- 3 + 3P2i(l - tf + 3P3t2 (l - t) + MidPo int(P3 , P4 )t3 (5) 其中, B t)表示第一段所述轨迹中的插值点的坐标的集合; 、 P2、 P3、 P4 均为所捕获的所述轨迹点的坐标; t为步进次数; MidPoint (P3, P4) 表示所述轨 迹点 P3、 P4的中点的坐标。
在步骤 S42中, 所述美化***根据经插值处理后的所述轨迹上的各所述轨迹 点所对应的尺寸和透明度来确定所述插值点各自所对应的手写笔迹的尺寸和透明 度。
具体地, 所述美化***按照相邻轨迹点之间***的插值点的数量, 对相邻的 轨迹点所对应的手写笔迹的尺寸和透明度进行均分, 以得到每一个插值点所对应 的手写笔迹的尺寸和透明度。
例如, 所述美化***按照公式 (4) 将轨迹点 P3、 P4、 P5和 P6所构成的轨迹 进行插值处理,以得到插值点集合 B2(t),其包括 {Ρ3', Ρ41',Ρ42',Ρ43',Ρ51',Ρ52',Ρ53',Ρ6' } 个插值点,其中,插值点 Ρ3'为经插值处理后的轨迹的起点的坐标, { Ρ41',Ρ42',Ρ43' } 插值点为轨迹点 Ρ4、 Ρ5之间的插值点的坐标, { Ρ5ι',Ρ52',Ρ53' }插值点为轨迹点 Ρ5、 Ρ6之间的插值点的坐标, Ρ6'为经插值处理后的轨迹的终点的坐标; 则所述美化系
统按照轨迹点 P3、 P4各自所对应的手写笔迹的尺寸的平均值来确定起点 Ρ3'所对 应的手写笔迹的尺寸, 按照轨迹点 Ρ3、 Ρ4各自所对应的手写笔迹的透明度的平均 值来确定起点 Ρ3'所对应的手写笔迹的透明度; 类似的, 所述终点 Ρ6'所对应的手 写笔迹的尺寸和透明度由轨迹点 Ρ5和 Ρ6各自所对应的手写笔迹的尺寸和透明度 的平均值来得到;插值点 { Ρ41' ,Ρ42' ,Ρ43' }各自所对应的手写笔迹的尺寸和透明度则 通过等分轨迹点 Ρ4、Ρ5各自所对应的尺寸和透明度计算而得;插值点 { Ρ51' ,Ρ52' ,Ρ53' 各自所对应的手写笔迹的尺寸和透明度则通过等分轨迹点 Ρ5、?6各自所对应的尺 寸和透明度计算而得。
优选地, 所述美化***利用公式 (6)来取得各插值点所对应的手写笔迹的尺 寸;
W (0 = (1— 03 BeginPtWidth + 3t(l - t)2 ControlPtl Width , 、
( 6);
+ 3t3 (1 - t)ControlPt2Width + 13 EndPt Width
其中, W(t)表示插值点所对应的手写笔迹的尺寸的集合; BeginPt.Width表示 所述轨迹的起点所对应的手写笔迹的尺寸; ControlPtl . Width、 ControlPt2. Width 分别表示所述起点和终点之间的两个所述轨迹点所对应的手写笔迹的尺寸; EndPt.Width表示所述轨迹的终点所对应的手写笔迹的尺寸。
类似的, 所述美化***利用公式(7 )来取得各插值点所对应的手写笔迹的透 明度;
A(t) = (1 - tf BeginPt.Alpha + 3t(l - 1) 2 ControlPtl .Alpha ( ? ) + 3t3 (1 - t)ControlPtl Alpha + t3EndPt. Alpha
其中, A(t)表示插值点的透明度的集合; BeginPt.Alpha表示插值处理后的所 述轨迹的起点的透明度; ControlPtl . Alpha、 ControlPt2. Alpha表示所述起点和终 点之间的两个所述轨迹点的透明度; EndPt. Alpha表示插值处理后的所述轨迹的 终点的透明度。
其中, 所述轨迹的起点和终点若是插值点, 则所述美化***基于所述起点和 终点各自在縮放后的相邻的轨迹点之间的位置, 来确定所述起点和终点各自所对 应的手写笔迹的透明度。
本实施例中, 所述起点为相邻两个所述轨迹点的中点, 则所述起点所对应的 手写笔迹的透明度为该两轨迹点各自所对应的透明度的平均值。 确定所述终点所 对应的手写笔迹的透明度的方式与确定所述起点所对应的手写笔迹的透明度的方
式相同或相似。
在步骤 S43中, 所述美化***利用经插值处理后的轨迹的插值点、 以及轨迹 点各自所对应的手写笔迹的尺寸和透明度, 将插值处理后的轨迹转换成尺寸和透 明度连续变化的手写笔迹。
需要说明的是, 所述美化***可按照所述步骤 S4 中的方式将插值点、 以及 轨迹点依所述轨迹的顺序转换成尺寸和透明度连续变化的手写笔迹。
优选地, 所述美化***按照预设的手写笔迹的模板, 将所述轨迹点和插值点 依次以相应的尺寸和透明度进行手写笔迹的拼接处理。 其中, 手写笔迹的模板包 括但不限于: 毛笔风格的模板、 钢笔风格的模板等。 其中, 所述拼接处理的方式 包括但不限于: 图像渲染的方式等。
例如, 预设的手写笔迹的模板为毛笔风格的模板, 经过插值处理后的轨迹上 的轨迹点和插值点依次为 { P3,,P4, P41,,P42,,P43,,P5,P51,,P52,,P53,,P6,P6,}, 其中, P4、 P5、 P6为轨迹点, 其他点为插值点, 则所述美化***按在步骤 S42中取得的各点 所对应的手写笔迹的尺寸和透明度, 依次在各点附近渲染出尺寸和透明度相符合 的毛笔风格的手写笔迹, 以得到一条笔画粗细和笔墨浓淡变化平滑的手写笔迹。
如图 3所示, 本发明还提供一种电子设备 1。 所述电子设备 1包括: 轨迹输 入装置 11、捕获模块 12、速度计算模块 13、笔迹处理模块 14和美化处理模块 15。
所述轨迹输入装置 11包括任何能够手动输入轨迹的装置, 其包括但不限于: 鼠标、 触屏笔、 触摸屏等。
所述捕获模块 12用于当检测到所述轨迹输入装置 11开始进行轨迹输入时, 实时捕获所述轨迹上的轨迹点的坐标和时间, 直至所述轨迹输入结束。
具体地, 所述捕获模块 12监测用户利用轨迹输入装置 11进行手写输入的开 始动作以及结束的动作, 并在此期间,实时捕获所述轨迹输入装置 11所经过的各 轨迹点坐标和时间。
例如, 所述捕获模块 12监测到用户按下鼠标的动作时, 确认手写输入开始, 按预设时间间隔捕获鼠标所经过的各轨迹点, 当监测到用户抬起鼠标的动作时, 确认手写输入结束。
所述速度计算模块 13用于从所述捕获模块 12所捕获的第二个轨迹点开始, 利用所述捕获模块 12所捕获的第 n个所述轨迹点、及此前所捕获的一个所述轨迹 点的坐标和时间, 来计算第 n个所述轨迹点的速度, 其中, n为大于 1的整数。
具体地,所述速度计算模块 13捕获第一个所述轨迹点时,仅记录所述轨迹点 的坐标和时间, 从捕获第二个所述轨迹点开始, 实时计算所捕获的所有轨迹点的 速度。
其中, 捕获第 n个所述轨迹点的速度的方式为利用所捕获的第 n个轨迹点、 及此前所捕获的一个轨迹点的坐标, 计算所捕获的该两个轨迹点之间的位移; 再 根据所述位移与该两个轨迹点的时间之差的比值, 来取得第 n个所述轨迹点的速 度。
例如, 所述速度计算模块 13先后捕获鼠标所经过的轨迹点 Pi的坐标 (Xl, yi ) 和时间 , 及轨迹点 P2的坐标 ( , y2) 和时间 t2 ; 接着, 利用公式 ( 1 ) 所 得到的轨迹点 Pi和?2之间的平均速度 v, 并将所述平均速度 V作为轨迹点 P2的 速度。
所述笔迹处理模块 14用于基于预设的轨迹点的速度分别与手写笔迹的尺寸 和透明度的对应关系、以及所述速度计算模块 13所计算出的第 n个所述轨迹点的 速度, 来确定第 n个所述轨迹点所对应的手写笔迹的尺寸和透明度。
具体地, 预设的轨迹点的速度与手写笔迹的尺寸的对应关系、 及速度与手写 笔迹的透明度的对应关系是根据人们的书写习惯的经验进行计算得到的, 例如, 根据对人们书写习惯的统计, 书写速度越快, 手写笔迹就越细; 书写速度越快, 手写笔迹就越透明。 因此, 所述速度分别与手写笔迹的尺寸和透明度的对应关系 可以是成比例的对应关系。
优选地,如图 4所示,所述笔迹处理模块 14包括:笔迹尺寸处理子模块 141、 笔迹透明度处理子模块 142。
所述笔迹尺寸处理子模块 141用于基于预设的轨迹点的速度与手写笔迹的尺 寸的线性关系、 以及所述速度计算模块 13所计算出的第 n个所述轨迹点的速度, 来确定第 n个所述轨迹点所对应的手写笔迹的尺寸。
例如, 所述笔迹尺寸处理子模块 141利用公式(2)来确定所捕获的第 n个轨 迹点所对应的手写笔迹的尺寸。
W - W
W = W ≡——≡^v ( 2)
其中, W表示第 n个轨迹点所对应的手写笔迹的尺寸; V表示第 n个所述轨 迹点手写速度,参数 W ! ^η分别表示手写笔迹的尺寸的最大值和最小值, V
V n—un分别表示所述轨迹点的速度的最大值和最小值; W L v…能够 调整所述尺寸变化效果^ 表示所述尺寸的变化程度, 它的值越大, 则所
V mm■ — V max
述尺寸变化越明显。
其中, W W^ , vmax Vmm可为预设的固定值, 也可以由用户预先设定。 所述笔迹透明度处理子模块 142用于基于预设的轨迹点的速度与手写笔迹的 透明度的线性关系、以及所述速度计算模块 13所计算出的第 n个所述轨迹点的速 度, 来确定第 n个所述轨迹点所对应的手写笔迹的透明度。
例如, 所述笔迹透明度处理子模块 142利用公式 (3 ) 来确定所捕获的第 n 个轨迹点所对应的手写笔迹的尺寸。
A = Amax + Amax ~ Amin v ( 3 )
v mi■n— v max
其中, A表示第 n个轨迹点所对应的手写笔迹的透明度; V表示第 n个所述 轨迹点手写速度,参数 分别表示手写笔迹的透明度的最大值和最小值, vmax V,分别表示所述轨迹点的速度的最大值和最小值; Amax vmax vmn 能够调整所述透明度变化效果 U °"n表示所述透明度的变化程度, 它的值越
V mm■ ― V max
大, 则所述透明度变化越明显。
其中, Α_ A^ , vmax、 Vmm可为预设的固定值, 也可以由用户预先设定。 需要说明的是, 按照公式 (2) ( 3 ) 所捕获的第一个所述轨迹点由于速度 为 0, 则其所对应的手写笔迹的尺寸和透明度可以均为最大值。
优选地, 所捕获的第一个所述轨迹点所对应的手写笔迹的尺寸和透明度均为 预设值。
例如, 预设捕获的第一个所述轨迹点所对应的手写笔迹的尺寸和透明度分别 为 1个像素和 50%的透明度。
所述美化处理模块 15用于利用预设的轨迹分段规则,将所捕获的多个轨迹点 所构成的每一段轨迹按照所述笔迹处理模块 14所取得的所述轨迹点各自所对应
的尺寸和透明度进行美化处理, 以得到美化后的手写笔迹。
具体地,所述美化处理模块 15在捕获到满足预设数量的轨迹点时,开始对这 些轨迹点所构成的轨迹按照所述轨迹点各自所对应的尺寸和透明度进行图像处 理, 以得到该段轨迹所对应的手写笔迹, 然后当再捕获相应数量的轨迹点时, 将 该段轨迹点所构成的轨迹按照相应轨迹点各自所对应的尺寸和透明度进行图像处 理;依此类推,所述美化处理模块 15分段地将各所述轨迹点所构成的轨迹进行美 化处理, 以得到连续的手写笔迹。
例如, 所述美化处理模块 15按照预设的美化处理的方案, 将已捕获的 Pl、 P2、 P3三个轨迹点所构成的轨迹进行美化处理, 然后将再捕获的轨迹点 P3、 P4 和 P5所构成的轨迹进行美化处理, 以得到笔画为点的完整的手写笔迹。
优选地, 如图 5所示, 所述美化处理模块 15包括: 插值处理子模块 151、 插 值点的笔迹处理子模块 152、 美化处理子模块 153。
所述插值处理子模块 151用于利用预设的分段规则,将所述捕获模块 12所捕 获的多个轨迹点所构成的每一段轨迹进行插值处理, 以得到由插值点和所述轨迹 点所构成的平滑轨迹。 其中, 插值处理的方式包括但不限于: 利用 DDA插值算 法进行插值处理。优选地,插值处理的方式为利用贝塞尔曲线算法进行插值处理。
具体地, 所述插值处理子模块 151利用公式(4), 将每一段轨迹进行插值处 理;
Bn (0 = MidPoint(P2n_2 , Ρ2η_, )(1 - 1† + P2nj{\ - tf + 3P2nt2 (1 - 0 + MidPoint(P2n , P2n+1 )t (4)
其中, Bn(t)表示插值点的坐标的集合; P2n— 2、 P2n_i P2n、 P2n+1均为所捕获的 所述轨迹点的坐标; n为大于 1的整数; t为步进次数、 MidPoint (P2n— 2, P2n— 表示所述轨迹点 P2n— 2、 Ρ2„-ι 的中点的坐标, 也是插值处理后的轨迹的起点; MidPoint (Ρ2η, Ρ2η+ι ) 表示所述轨迹点 Ρ2η、 Ρ2η+ι的中点的坐标, 也就是插值处 理后的轨迹的终点。
优选地, 所述插值处理子模块 151还利用公式(5)对第一段所述轨迹进行插 值处理;
B, ( = (1 - 3 + 3P2i(l - tf + 3P3t2 (l - t) + MidPo int(P3 , P4 )t3 (5) 其中, B t)表示第一段所述轨迹中的插值点的坐标的集合; 、 P2、 P3、 P4 均为所捕获的所述轨迹点的坐标; t为步进次数; MidPoint (P3, P4) 表示所述轨
迹点 P3、 P4的中点的坐标。
所述插值点的笔迹处理子模块 152用于根据经插值处理后的所述轨迹上的各 所述轨迹点所对应的尺寸和透明度来确定所述插值点各自所对应的手写笔迹的尺 寸和透明度。
具体地, 所述插值点的笔迹处理子模块 152按照相邻轨迹点之间***的插值 点的数量, 对相邻的轨迹点所对应的手写笔迹的尺寸和透明度进行均分, 以得到 每一个插值点所对应的手写笔迹的尺寸和透明度。
例如, 所述插值点的笔迹处理子模块 152按照公式 (4) 将轨迹点 P3、 P4、 P5和 P6所构成的轨迹进行插值处理, 以得到插值点集合 B2(t), 其包括 {Ρ3' , Ρ41',Ρ42',Ρ43' ,Ρ51',Ρ52',Ρ53' ,Ρ6' }个插值点, 其中, 插值点 Ρ3'为经插值处理后的轨迹 的起点的坐标, { Ρ41',Ρ42',Ρ43' }插值点为轨迹点 Ρ4、 Ρ5之间的插值点的坐标, { Ρ51' ,Ρ52',Ρ53' }插值点为轨迹点 Ρ5、 Ρ6之间的插值点的坐标, Ρ6'为经插值处理后 的轨迹的终点的坐标; 则所述插值点的笔迹处理子模块 152按照轨迹点 Ρ3、 Ρ4各 自所对应的手写笔迹的尺寸的平均值来确定起点 Ρ3'所对应的手写笔迹的尺寸,按 照轨迹点 Ρ3、 Ρ4各自所对应的手写笔迹的透明度的平均值来确定起点 Ρ3'所对应 的手写笔迹的透明度;类似的,所述终点 Ρ6'所对应的手写笔迹的尺寸和透明度由 轨迹点 Ρ5和 Ρ6各自所对应的手写笔迹的尺寸和透明度的平均值来得到; 插值点 { Ρ41',Ρ42' ,Ρ43' }各自所对应的手写笔迹的尺寸和透明度则通过等分轨迹点 Ρ4、 Ρ5 各自所对应的尺寸和透明度计算而得;插值点 { Ρ51' ,Ρ52' ,Ρ53' }各自所对应的手写笔 迹的尺寸和透明度则通过等分轨迹点 Ρ5、Ρ6各自所对应的尺寸和透明度计算而得。
优选地, 所述插值点的笔迹处理子模块 152利用公式 (6)来取得各插值点所对 应的手写笔迹的尺寸;
W (0 = (1— 03 BeginPtWidth + 3t(l - t)2 ControlPtl Width , 、
( 6);
+ 3ί3 (1 - t)ControlPt2Width + 13 EndPt Width
其中, W(t)表示插值点所对应的手写笔迹的尺寸的集合; BeginPt.Width表示 所述轨迹的起点所对应的手写笔迹的尺寸; ControlPtl . Width、 ControlPt2.Width 分别表示所述起点和终点之间的两个所述轨迹点所对应的手写笔迹的尺寸; EndPt.Width表示所述轨迹的终点所对应的手写笔迹的尺寸。
类似的, 所述插值点的笔迹处理子模块 152利用公式(7 )来取得各插值点所 对应的手写笔迹的透明度;
A(t) = (1- BeginPt. Alpha + 3t(l - t) ControlPtl Alpha ( ? )
+ 3t3 (1 - t)ControlPtl Alpha + t3EndPt. Alpha
其中, A(t)表示插值点的透明度的集合; BeginPt.Alpha表示插值处理后的所 述轨迹的起点的透明度; ControlPtl . Alpha、 ControlPt2. Alpha表示所述起点和终 点之间的两个所述轨迹点的透明度; EndPt. Alpha表示插值处理后的所述轨迹的 终点的透明度。
其中, 所述轨迹的起点和终点若是插值点, 则所述美化***基于所述起点和 终点各自在縮放后的相邻的轨迹点之间的位置, 来确定所述起点和终点各自所对 应的手写笔迹的透明度。
本实施例中, 所述起点为相邻两个所述轨迹点的中点, 则所述起点所对应的 手写笔迹的透明度为该两轨迹点各自所对应的透明度的平均值。 确定所述终点所 对应的手写笔迹的透明度的方式与确定所述起点所对应的手写笔迹的透明度的方 式相同或相似。
所述美化处理子模块 153用于利用经插值处理后的轨迹的插值点、 以及轨迹 点各自所对应的手写笔迹的尺寸和透明度, 将插值处理后的轨迹美化处理成尺寸 和透明度连续变化的手写笔迹。
需要说明的是, 所述美化处理子模块 153可按照所述步骤 S4中的方式将插 值点、 以及轨迹点依所述轨迹的顺序转换成尺寸和透明度连续变化的手写笔迹。
优选地, 所述美化处理子模块 153按照预设的手写笔迹的模板, 将所述轨迹 点和插值点依次以相应的尺寸和透明度进行手写笔迹的拼接处理。 其中, 手写笔 迹的模板包括但不限于: 毛笔风格的模板、 钢笔风格的模板等。 其中, 所述拼接 处理的方式包括但不限于: 图像渲染的方式等。
例如, 预设的手写笔迹的模板为毛笔风格的模板, 经过插值处理后的轨迹上 的轨迹点和插值点依次为 { P3,,P4, P41,,P42,,P43,,P5,P51,,P52,,P53,,P6,P6,}, 其中, P4、 P5、 P6为轨迹点, 其他点为插值点, 则所述美化处理子模块 153按在步骤 S42中 取得的各点所对应的手写笔迹的尺寸和透明度, 依次在各点附近渲染出尺寸和透 明度相符合的毛笔风格的手写笔迹, 以得到一条笔画粗细和笔墨浓淡变化平滑的 手写笔迹。
所述电子设备 1的工作过程如下:
用户利用所述轨迹输入装置 11进行手写输入, 所述捕获模块 12基于用户进
行手写输入的开始动作时起, 直至结束动作时止, 实时捕获所述轨迹输入装置 11 所经过的轨迹点的坐标和时间, 并将所捕获的轨迹点的坐标和时间提供给所述速 度计算模块 13, 以供所述速度计算模块 13计算所述轨迹点的速度; 再基于预设 的轨迹点的速度与手写笔迹的尺寸和透明度的线性关系,由笔迹处理模块 14计算 出所捕获的轨迹点所对应的手写笔迹的尺寸和透明度; 再由所述美化模块中的插 值处理子模块 151对所捕获的多个轨迹点所构成的轨迹进行插值平滑处理, 并取 得多个插值点, 再由插值点的笔迹处理子模块 152基于相应的所述轨迹点所对应 的尺寸和透明度来取得各插值点所对应的尺寸和透明度, 再由所述美化子处理模 块将各所述插值点和轨迹点依次进行渲染处理, 以得到手写笔迹的尺寸和透明度 都平滑变化的手写笔迹, 即笔画或笔锋。
综上所述, 本发明的实时手写笔迹的美化方法及电子设备, 通过实时捕获轨 迹点的坐标和时间来获取轨迹点的速度, 并依据各轨迹点的速度与手写笔迹的尺 寸和透明度的对应关系来对各轨迹点所构成的轨迹进行美化处理, 由此, 能够有 效地取得具有用户书写风格的笔锋、 笔画; 另外, 利用三阶贝赛尔曲线算法来进 行插值处理, 能够得到平滑效果出色的轨迹; 并且, 利用贝赛尔曲线算法来计算 各插值点所对应的手写笔迹的尺寸和透明度, 能够得到笔迹宽度、 透明度平滑变 化的笔锋、 笔画, 更能体现用户的笔体风格。 所以, 本发明有效克服了现有技术 中的种种缺点而具高度产业利用价值。
上述实施例仅例示性说明本发明的原理及其功效, 而非用于限制本发明。 任 何熟悉此技术的人士皆可在不违背本发明的精神及范畴下, 对上述实施例进行修 饰或改变。 因此, 举凡所属技术领域中具有通常知识者在未脱离本发明所揭示的 精神与技术思想下所完成的一切等效修饰或改变, 仍应由本发明的权利要求所涵 。
Claims
权利要求书
、 一种实时手写笔迹的美化方法, 应用于具有轨迹输入装置的电子设备中, 其特征在于, 至少包括:
当检测到所述轨迹输入装置开始进行轨迹输入时, 实时捕获所述轨迹上的轨迹点的 坐标和时间, 直至所述轨迹输入结束;
从所捕获的第二个轨迹点开始, 利用所捕获的第 n个所述轨迹点、 及此前所捕获的 一个所述轨迹点的坐标和时间, 来计算第 n个所述轨迹点的速度, 其中, n为大于 1 的 整数;
基于预设的轨迹点的速度分别与手写笔迹的尺寸和透明度的对应关系, 来确定第 n 个所述轨迹点所对应的手写笔迹的尺寸和透明度;
利用预设的轨迹分段规则, 将所捕获的多个轨迹点所构成的每一段轨迹按照所述轨 迹点各自所对应的尺寸和透明度进行美化处理, 以得到美化后的手写笔迹。 、 根据权利要求 1 所述的实时手写笔迹的美化方法, 其特征在于, 所捕获的第一个所述轨 迹点所对应的手写笔迹的尺寸和透明度均为预设值。 、 根据权利要求 1 所述的实时手写笔迹的美化方法, 其特征在于, 确定所述轨迹点所对应 的手写笔迹的尺寸的方式包括: 基于预设的轨迹点的速度与手写笔迹的尺寸的线性关 系, 来确定第 n个所述轨迹点所对应的手写笔迹的尺寸。 、 根据权利要求 1 所述的实时手写笔迹的美化方法, 其特征在于, 确定所述轨迹点所对应 的手写笔迹的透明度的方式包括: 基于预设的轨迹点的速度与手写笔迹的透明度的线性 关系, 来确定第 n个所述轨迹点所对应的手写笔迹的透明度。 、 根据权利要求 1 所述的实时手写笔迹的美化方法, 其特征在于, 利用预设的轨迹分段规 贝 ϋ, 将所捕获的多个轨迹点所构成的每一段轨迹按照所述轨迹点各自所对应的尺寸和透 明度进行美化处理的步骤包括:
利用预设的分段规则, 将所捕获的多个轨迹点所构成的每一段轨迹进行插值处理, 以得到由插值点和所述轨迹点所构成的平滑轨迹;
根据经插值处理后的所述轨迹上的各所述轨迹点所对应的尺寸和透明度来确定所述 插值点各自所对应的手写笔迹的尺寸和透明度;
利用所述插值点和轨迹点各自所对应的手写笔迹的尺寸和透明度, 将插值处理后的 轨迹美化处理成尺寸和透明度连续变化的手写笔迹。 、 根据权利要求 5 所述的实时手写笔迹的美化方法, 其特征在于, 利用预设的轨迹分段规 贝 ϋ, 将所捕获的多个轨迹点所构成的每一段轨迹按照所述轨迹点各自所对应的尺寸和透 明度进行美化处理的方式还包括: 利用公式 1, 将每一段轨迹进行插值处理;
其中, Bn(t)表示插值点的坐标的集合; P2n— 2、 P2n_! P2n、 P2n+1均为所捕获的所述轨 迹点的坐标; n为大于 1 的整数; t为步进次数、 MidPoint ( Ρ2η_2, Ρ2η_ι ) 表示所述轨迹 点 P2n— 2、 Pm-i的中点的坐标, 也是插值处理后的轨迹的起点; MidPoint ( P2n, P2n+1 ) 表 示所述轨迹点 P2n、 P2n+1的中点的坐标, 也就是插值处理后的轨迹的终点。 、 根据权利要求 6 所述的实时手写笔迹的美化方法, 其特征在于, 根据所述轨迹上的所述 轨迹点所对应的尺寸来确定所述起点和终点各自所对应的手写笔迹的尺寸的方式包括: 基于所述起点和终点分别在所捕获的相邻的所述轨迹点的位置来确定所述起点和终点各 自所对应的手写笔迹的尺寸和透明度。 、 根据权利要求 6 所述的实时手写笔迹的美化方法, 其特征在于, 根据所述轨迹上的所述 轨迹点所对应的尺寸来确定所述插值点各自所对应的手写笔迹的尺寸的方式包括: 利用 公式 2来取得各插值点所对应的手写笔迹的尺寸;
W(t) = (1 - 3 BeginPt. Width + 3t(l - 1) 2 ControlPtl Width ,、 ^
公式 2;
+ 3t3 (1 - t)ControlPt2Width + t3EndPt Width
其中, W(t)表示插值点所对应的手写笔迹的尺寸的集合; BeginPt.Width表示所述起 点所对应的手写笔迹的尺寸; ControlPtl . Width、 ControlPt2. Width 分别表示所述起点和 终点之间的两个所述轨迹点所对应的手写笔迹的尺寸; EndPt.Width 表示所述终点所对 应的手写笔迹的尺寸。 、 根据权利要求 6 所述的实时手写笔迹的美化方法, 其特征在于, 根据所述轨迹上的所述 轨迹点所对应的透明度来确定所述插值点各自所对应的手写笔迹的透明度的方式包括: 利用公式 3来取得各插值点所对应的手写笔迹的透明度;
A(t) = (1 - tf BeginPt. Alpha + 3t(l - 1) 2 ControlPtl .Alpha ., .
公式 3;
+ 3r (1 - t)ControlPtl. Alpha + t EndPt. Alpha
其中, A(t)表示插值点的透明度的集合; BeginPt. Alpha表示插值处理后的所述轨迹的 起点的透明度; ControlPtl. Alpha、 ControlPt2. Alpha表示所述起点和终点之间的两个所 述轨迹点的透明度; EndPt. Alpha表示插值处理后的所述轨迹的终点的透明度。 、 根据权利要求 5 所述的实时手写笔迹的美化方法, 其特征在于, 将插值处理后的轨迹 美化处理成尺寸和透明度连续变化的手写笔迹的方式还包括: 按照预设的手写笔迹的模 板, 将所述轨迹点和插值点依次以相应的尺寸和透明度进行手写笔迹的拼接处理。 、 一种电子设备, 其特征在于, 至少包括:
轨迹输入装置;
捕获模块, 用于当检测到所述轨迹输入装置开始进行轨迹输入时, 实时捕获所述轨 迹上的轨迹点的坐标和时间, 直至所述轨迹输入结束;
速度计算模块, 用于从所述捕获模块所捕获的第二个轨迹点开始, 利用所述捕获模 块所捕获的第 n个所述轨迹点、 及此前所捕获的一个所述轨迹点的坐标和时间, 来计算 第 n个所述轨迹点的速度, 其中, n为大于 1的整数;
笔迹处理模块, 用于基于预设的轨迹点的速度分别与手写笔迹的尺寸和透明度的对 应关系、 以及所述速度计算模块所计算出的第 n个所述轨迹点的速度, 来确定第 n个所 述轨迹点所对应的手写笔迹的尺寸和透明度;
美化处理模块, 用于利用预设的轨迹分段规则, 将所捕获的多个轨迹点所构成的每 一段轨迹按照所述笔迹处理模块所取得的所述轨迹点各自所对应的尺寸和透明度进行美 化处理, 以得到美化后的手写笔迹。 、 根据权利要求 11 所述的电子设备, 其特征在于, 所捕获的第一个所述轨迹点所对应的 手写笔迹的尺寸和透明度均为预设值。 、 根据权利要求 11 所述的电子设备, 其特征在于, 所述笔迹处理模块包括: 笔迹尺寸处 理子模块, 用于基于预设的轨迹点的速度与手写笔迹的尺寸的线性关系、 以及所述速度 计算模块所计算出的第 n个所述轨迹点的速度, 来确定第 n个所述轨迹点所对应的手写 笔迹的尺寸。
、 根据权利要求 11 所述的电子设备, 其特征在于, 所述笔迹处理模块包括: 笔迹透明度 处理子模块, 用于基于预设的轨迹点的速度与手写笔迹的透明度的线性关系、 以及所述 速度计算模块所计算出的第 n个所述轨迹点的速度, 来确定第 n个所述轨迹点所对应的 手写笔迹的透明度。 、 根据权利要求 11所述的电子设备, 其特征在于, 所述美化处理模块包括:
插值处理子模块, 用于利用预设的分段规则, 将所述捕获模块所捕获的多个轨迹点 所构成的每一段轨迹进行插值处理, 以得到由插值点和所述轨迹点所构成的平滑轨迹; 插值点的笔迹处理子模块, 用于根据经插值处理后的所述轨迹上的各所述轨迹点所 对应的尺寸和透明度来确定所述插值点各自所对应的手写笔迹的尺寸和透明度;
美化处理子模块, 用于所述插值点和轨迹点各自所对应的手写笔迹的尺寸和透明 度, 将插值处理后的轨迹美化处理成尺寸和透明度连续变化的手写笔迹。 、 根据权利要求 15 所述的电子设备, 其特征在于, 所述插值点的笔迹处理子模块还用 于: 利用公式 1, 将每一段轨迹进行插值处理;
„( )二 ^/^ /^— l - )3 + 3/^— ^(l - )2 + 3/5 2„ 2 (l-0 + MW/5。int(/5 2„, JP2„+1 ) 3 公 式 1 ;
其中, Bn(t)表示插值点的坐标的集合; P2n— 2、 P2n_! P2n、 P2n+1均为所捕获的所述轨 迹点的坐标; n为大于 1 的整数; t为步进次数、 MidPoint ( Ρ2η_2, Ρ2η_ι ) 表示所述轨迹 点 P2n— 2、 Pm-i的中点的坐标, 也是插值处理后的轨迹的起点; MidPoint ( P2n, P2n+1 ) 表 示所述轨迹点 P2n、 P2n+1的中点的坐标, 也就是插值处理后的轨迹的终点。 、 根据权利要求 16 所述的电子设备, 其特征在于, 所述插值点的笔迹处理子模块还用于 基于所述起点和终点分别在所捕获的相邻的所述轨迹点的位置来确定所述起点和终点各 自所对应的手写笔迹的尺寸和透明度。 、 根据权利要求 16 所述的电子设备, 其特征在于, 所述插值点的笔迹处理子模块还用于 利用公式 2来取得各插值点所对应的手写笔迹的尺寸;
W(t) = (1 - 3 BeginPt. Width + 3t(l - 1) 2 ControlPtl Width 公 _^ ^
+ 3t3 (1 - t)ControlPt2Width + t3EndPt Width '
其中, W(t)表示插值点所对应的手写笔迹的尺寸的集合; BeginPt.Width表示所述起
点所对应的手写笔迹的尺寸; ControlPtl. Width、 ControlPt2. Width 分别表示所述起点和 终点之间的两个所述轨迹点所对应的手写笔迹的尺寸; EndPt.Width 表示所述终点所对 应的手写笔迹的尺寸。 、 根据权利要求 16 所述的电子设备, 其特征在于, 所述插值点的笔迹处理子模块还用于 利用公式 3来取得各插值点所对应的手写笔迹的透明度;
A(t) = (1 - tf BeginPt. Alpha + 3t(l - 1) 2 ControlPtl .Alpha ., .
公式 3;
+ 3r (1 - t)ControlPtl. Alpha + t EndPt. Alpha
其中, A(t)表示插值点的透明度的集合; BeginPt. Alpha表示插值处理后的所述轨迹的 起点的透明度; ControlPtl. Alpha、 ControlPt2. Alpha表示所述起点和终点之间的两个所 述轨迹点的透明度; EndPt. Alpha表示插值处理后的所述轨迹的终点的透明度。 、 根据权利要求 15 所述的电子设备, 其特征在于, 美化处理子模块还用于按照预设的手 写笔迹的模板, 将所述轨迹点和插值点依次以相应的尺寸和透明度进行手写笔迹的拼接 处理。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210513019.7 | 2012-12-04 | ||
CN201210513019.7A CN102937849B (zh) | 2012-12-04 | 2012-12-04 | 实时手写笔迹的美化方法及电子设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2014086264A1 true WO2014086264A1 (zh) | 2014-06-12 |
Family
ID=47696749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/088374 WO2014086264A1 (zh) | 2012-12-04 | 2013-12-03 | 实时手写笔迹的美化方法及电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102937849B (zh) |
WO (1) | WO2014086264A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023115312A1 (zh) * | 2021-12-21 | 2023-06-29 | 京东方科技集团股份有限公司 | 手写笔迹生成方法、装置、计算机设备和可读介质 |
Families Citing this family (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102937849B (zh) * | 2012-12-04 | 2015-09-23 | 上海合合信息科技发展有限公司 | 实时手写笔迹的美化方法及电子设备 |
CN103336590B (zh) * | 2013-07-17 | 2016-12-28 | 天脉聚源(北京)传媒科技有限公司 | 一种输入方法及装置 |
CN104346091B (zh) * | 2013-07-31 | 2020-04-21 | 北京壹人壹本信息科技有限公司 | 笔迹的显示方法和装置 |
CN104345948B (zh) * | 2013-07-31 | 2017-08-25 | 北京壹人壹本信息科技有限公司 | 一种手写原笔迹的实现方法、实现装置及电子设备 |
EP3072038B1 (en) * | 2013-11-19 | 2019-09-18 | Wacom Co., Ltd. | Method and system for ink data generation, ink data rendering, ink data manipulation and ink data communication |
CN104049874B (zh) * | 2014-06-10 | 2017-04-05 | 广州视睿电子科技有限公司 | 触控笔的触摸笔迹生成方法和*** |
CN106095141A (zh) * | 2016-06-12 | 2016-11-09 | 福建天泉教育科技有限公司 | 手机端模拟激光笔的方法及*** |
CN106527940B (zh) * | 2016-11-03 | 2019-12-10 | 青岛海信电器股份有限公司 | 书写笔迹确定方法及装置 |
CN106708406B (zh) * | 2016-12-07 | 2020-03-10 | 南京仁光电子科技有限公司 | 毛笔笔迹美化方法和装置 |
CN106886282B (zh) * | 2017-01-04 | 2020-12-25 | 奇酷互联网络科技(深圳)有限公司 | 字符输入方法和装置 |
CN107728916B (zh) * | 2017-09-20 | 2020-07-28 | 科大讯飞股份有限公司 | 隔空手写轨迹的显示方法及装置 |
CN111027344B (zh) * | 2018-10-09 | 2023-12-26 | 珠海金山办公软件有限公司 | 一种显示方法及装置 |
CN109857322B (zh) * | 2019-01-24 | 2021-12-31 | 广东第二师范学院 | 一种基于安卓的画笔宽度控制方法和装置 |
CN110688044B (zh) * | 2019-09-30 | 2021-04-13 | 联想(北京)有限公司 | 一种输入方法及电子设备 |
CN110851071A (zh) * | 2019-11-19 | 2020-02-28 | 北京字节跳动网络技术有限公司 | 一种笔迹数据的处理、获取方法及装置 |
CN111381754B (zh) | 2020-04-30 | 2021-10-22 | 京东方科技集团股份有限公司 | 笔迹处理方法、设备及介质 |
US11561637B2 (en) | 2020-05-20 | 2023-01-24 | Boe Technology Group Co., Ltd. | Method and device of drawing handwriting track, electronic apparatus, medium, and program product |
CN112394838B (zh) * | 2020-11-17 | 2023-11-10 | 青岛海信商用显示股份有限公司 | 笔迹的确定方法及触控显示设备 |
CN114356201B (zh) * | 2021-12-23 | 2024-02-20 | 科大讯飞股份有限公司 | 一种书写美化方法、装置、设备和可读存储介质 |
CN115220853A (zh) * | 2022-09-21 | 2022-10-21 | 广州市保伦电子有限公司 | 基于多线程的墨迹作图方法、装置、设备及存储介质 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101308578A (zh) * | 2008-06-20 | 2008-11-19 | 华南理工大学 | 一种手写汉字美化方法 |
CN101699518A (zh) * | 2009-10-30 | 2010-04-28 | 华南理工大学 | 一种基于轨迹分析的手写汉字的美化方法 |
CN102937849A (zh) * | 2012-12-04 | 2013-02-20 | 上海合合信息科技发展有限公司 | 实时手写笔迹的美化方法及电子设备 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100520692C (zh) * | 2007-01-17 | 2009-07-29 | 北京书生国际信息技术有限公司 | 一种实现笔锋效果的手写输入方法 |
CN101393645A (zh) * | 2008-09-12 | 2009-03-25 | 浙江大学 | 一种手写体汉字的计算机生成与美化方法 |
CN101639942A (zh) * | 2009-08-25 | 2010-02-03 | 华南理工大学 | 一种用于手写汉字的美化方法 |
CN102073870A (zh) * | 2011-01-10 | 2011-05-25 | 杭州电子科技大学 | 一种触摸屏汉字笔迹识别方法 |
-
2012
- 2012-12-04 CN CN201210513019.7A patent/CN102937849B/zh active Active
-
2013
- 2013-12-03 WO PCT/CN2013/088374 patent/WO2014086264A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101308578A (zh) * | 2008-06-20 | 2008-11-19 | 华南理工大学 | 一种手写汉字美化方法 |
CN101699518A (zh) * | 2009-10-30 | 2010-04-28 | 华南理工大学 | 一种基于轨迹分析的手写汉字的美化方法 |
CN102937849A (zh) * | 2012-12-04 | 2013-02-20 | 上海合合信息科技发展有限公司 | 实时手写笔迹的美化方法及电子设备 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023115312A1 (zh) * | 2021-12-21 | 2023-06-29 | 京东方科技集团股份有限公司 | 手写笔迹生成方法、装置、计算机设备和可读介质 |
Also Published As
Publication number | Publication date |
---|---|
CN102937849B (zh) | 2015-09-23 |
CN102937849A (zh) | 2013-02-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2014086264A1 (zh) | 实时手写笔迹的美化方法及电子设备 | |
CN102937848B (zh) | 对手写笔迹进行编辑处理的方法及电子设备 | |
WO2014086263A1 (zh) | 实时手写笔迹的美化方法及电子设备 | |
CN110531875B (zh) | 书写笔锋的生成方法、终端设备及存储介质 | |
US8963836B2 (en) | Method and system for gesture-based human-machine interaction and computer-readable medium thereof | |
JP5722482B2 (ja) | 画像処理システムおよび画像処理方法 | |
US9020266B2 (en) | Methods and devices for processing handwriting input | |
KR20130088104A (ko) | 비접촉 방식의 인터페이스를 제공하기 위한 휴대 장치 및 방법 | |
CN107239216A (zh) | 基于触摸屏的绘制处理方法和装置 | |
WO2013075466A1 (zh) | 一种基于图像传感模块的字符输入方法、装置及终端 | |
CN108062529B (zh) | 一种化学结构式的智能识别方法 | |
CN104809436B (zh) | 一种弯曲书面文字识别方法 | |
US20130050076A1 (en) | Method of recognizing a control command based on finger motion and mobile device using the same | |
TW201510771A (zh) | 指向位置偵測裝置及其方法、程式及電腦可讀取紀錄媒體 | |
RU2015119631A (ru) | Система коррекции изображения, способ коррекции изображения и компьютерный программный продукт | |
TW201303788A (zh) | 圖像分割方法以及圖像分割系統 | |
TWI571772B (zh) | 虛擬滑鼠驅動裝置及虛擬滑鼠模擬方法 | |
TW201017557A (en) | Video based handwritten character input device and method thereof | |
WO2012103794A1 (zh) | 一种手写原笔迹的实现方法、实现装置及电子装置 | |
CN103413137B (zh) | 基于多规则的交互手势运动轨迹分割方法 | |
TW201324208A (zh) | 人像效果處理系統及方法 | |
CN109857322B (zh) | 一种基于安卓的画笔宽度控制方法和装置 | |
CN105894554A (zh) | 图像处理方法和装置 | |
JP5698355B2 (ja) | ジェスチャーに基づく人間と機械のインタラクション方法およびシステム、コンピュータ記録媒体 | |
CN103838429A (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: 13859962 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: 13859962 Country of ref document: EP Kind code of ref document: A1 |