CN111475045A - Handwriting drawing method, device, equipment and storage medium - Google Patents
Handwriting drawing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN111475045A CN111475045A CN202010259517.8A CN202010259517A CN111475045A CN 111475045 A CN111475045 A CN 111475045A CN 202010259517 A CN202010259517 A CN 202010259517A CN 111475045 A CN111475045 A CN 111475045A
- Authority
- CN
- China
- Prior art keywords
- writing
- handwriting
- user
- screen
- drawing mode
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/80—Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application provides a handwriting drawing method, a handwriting drawing device, handwriting drawing equipment and a storage medium, wherein the method comprises the following steps: determining touch information of a user when the user writes on a screen writing interface; determining a target handwriting drawing mode from a first handwriting drawing mode and a second handwriting drawing mode according to the touch information; the first handwriting drawing mode is used for drawing user writing handwriting directly according to the user writing position coordinates, and the second handwriting drawing mode is used for drawing the user writing handwriting which is determined according to the user writing position coordinates and is structured; and drawing the user writing on the screen writing interface according to the target writing drawing mode. The handwriting drawing method switches and applies the two handwriting drawing modes according to the touch information when the user writes, can give consideration to the synchronization requirement of the user on the handwriting display and the requirement that the user handwriting fits the writing operation of the user, and can improve the user experience when the scheme is applied to the touch display screen.
Description
Technical Field
The present application relates to the field of human-computer interaction technologies, and in particular, to a method, an apparatus, a device, and a storage medium for handwriting drawing.
Background
With the increasing requirements of users on displaying handwriting on the touch display screen, users want the user handwriting displayed on the touch display screen to be more suitable for the user writing operation, for example, the displayed user handwriting is expected to have smoother edge, the handwriting width is matched with the user writing strength, the font type is in accordance with the user expectation, and the like, and meanwhile, the display of the handwriting is expected to be synchronous with the user writing operation.
After the mathematical handwriting of the user is determined according to the writing position coordinates of the user, the writing handwriting displayed on the touch display screen can be more suitable for the writing operation of the user by performing the regularization processing on the writing handwriting of the user. However, the writing of the user is structured, so that the workload of writing display is inevitably increased, the consumption of computing resources is increased, and the refreshing frequency of the writing is reduced, so that the writing display and the writing operation of the user are asynchronous.
The conventional writing drawing scheme can only meet the requirement of a user on the synchronism of writing display, or can only ensure that the drawn user writing fits the writing operation of the user, but cannot give consideration to the synchronism requirement of the user on the writing display and the requirement of the user on the writing operation.
Disclosure of Invention
Based on the defects and shortcomings of the prior art, the application provides a handwriting drawing method, a handwriting drawing device, handwriting drawing equipment and a storage medium, and the user handwriting drawing method, the device, the equipment and the storage medium can be used for drawing the user handwriting by taking the synchronization requirement of the user on the handwriting display and the requirement of the user writing operation into consideration.
A handwriting drawing method, comprising:
determining touch information of a user when the user writes on a screen writing interface;
determining a target handwriting drawing mode from a first handwriting drawing mode and a second handwriting drawing mode according to the touch information; the first handwriting drawing mode is used for drawing user writing handwriting directly according to the user writing position coordinates, and the second handwriting drawing mode is used for drawing the user writing handwriting which is determined according to the user writing position coordinates and is structured;
and drawing the user writing on the screen writing interface according to the target writing drawing mode.
A handwriting drawing apparatus comprising:
the information acquisition unit is used for determining touch information of a user during writing on a screen writing interface;
the mode selection unit is used for determining a target handwriting drawing mode from a first handwriting drawing mode and a second handwriting drawing mode according to the touch information; the first handwriting drawing mode is used for drawing user writing handwriting directly according to the user writing position coordinates, and the second handwriting drawing mode is used for drawing the user writing handwriting which is determined according to the user writing position coordinates and is structured;
and the handwriting drawing unit is used for drawing the user writing handwriting on the screen writing interface according to the target handwriting drawing mode.
A writing script rendering apparatus comprising:
a memory and a processor;
wherein the memory is connected with the processor and used for storing programs;
the processor is used for realizing the handwriting drawing method by operating the program in the memory.
A storage medium having stored thereon a computer program which, when executed by a processor, implements the handwriting drawing method described above.
According to the handwriting drawing method, different handwriting drawing modes can be automatically selected according to the touch information of the user during writing, so that the handwriting drawing modes are matched with the touch information of the user during writing. The first handwriting drawing mode applied in the handwriting drawing method directly draws the user handwriting according to the user writing position coordinates, the processing amount is small, and the requirement of the user on the synchronism of handwriting display can be met; after the second handwriting drawing mode applied in the handwriting drawing method determines the user handwriting according to the user writing position coordinate, the user handwriting is further structured, so that the user handwriting can be more suitable for the user writing operation. The handwriting drawing method switches and applies the two handwriting drawing modes according to the touch information when the user writes, can give consideration to the synchronization requirement of the user on the handwriting display and the requirement that the user handwriting fits the writing operation of the user, and can improve the user experience when the scheme is applied to the touch display screen.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a handwriting drawing method provided by an embodiment of the present application;
FIG. 2 is a flow chart of another handwriting drawing method provided by the embodiment of the application;
FIG. 3 is a schematic structural diagram of a handwriting drawing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a writing apparatus provided in an embodiment of the present application.
Detailed Description
The technical scheme of the embodiment of the application is suitable for application scenes of drawing and displaying the handwriting of the user on the touch display screen, and by the technical scheme of the embodiment of the application, the requirement of the user on the synchronism of the handwriting display can be met, and the handwriting meets the requirement of the user on writing operation.
The technical scheme of the embodiment of the application can be applied to touch screen electronic equipment, such as a smart phone, a tablet computer, an electronic book and the like, and the processor of the touch screen electronic equipment executes the technical scheme of the embodiment of the application to draw the handwriting of a user on the touch display screen of the equipment. The technical scheme of the embodiment of the application can also be applied to a processor or a controller of the touch display screen and used for controlling the touch display screen to draw handwriting of a user. Alternatively, the technical solution of the embodiment of the present application may also be written as a processing program code and executed by any processor.
The technical scheme of the embodiment of the application is mainly applied to a touch display screen with low refresh rate and resolution ratio to display handwriting of a user, such as an ink screen. Due to the limitations of the self performance of touch display screens with low refresh rate and resolution, such as ink screens, the display of handwriting is delayed relative to the writing operation of a user, and the displayed handwriting has saw teeth at the edge, so that the requirements on the synchronism of the handwriting display and the requirement that the handwriting display meets the writing operation of the user are relatively common.
Generally, the electronic device adopting the ink screen sets the refresh rate of the ink screen to be the highest rate so as to display the handwriting to be capable of following the writing operation of the user, or sets the refresh rate of the ink screen to be the lower refresh rate so as to be capable of regulating the handwriting of the user at the refresh interval, thereby enabling the handwriting display of the user to be more suitable for the writing operation of the user. The existing electronic equipment adopting the ink screen cannot give consideration to the requirement of a user on the synchronism of handwriting display and the requirement of the user on writing operation.
The technical scheme of the embodiment of the application is applied to the ink screen, so that when the ink screen displays the handwriting of a user, the requirement of the user on the synchronism of the handwriting display and the requirement of the user on writing operation are both taken into consideration.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a handwriting drawing method, and as shown in fig. 1, the method includes:
s101, determining touch information of a user during writing on a screen writing interface.
The screen writing interface is an interface displayed on the display screen for a user to write when the touch display screen works in a screen writing mode. When a user writes by using the writing body in the interface range, the touch display screen can sense the writing action of the writing body, and then the writing handwriting of the user is displayed on the interface.
In this embodiment of the application, the touch display screen may be any type of touch display screen, such as a capacitive screen, a resistive screen, and the like, and correspondingly, the writing body may be an electromagnetic pen, a conductive silica gel writing pen, a user finger, and the like. In an embodiment of the present invention, the touch display screen refers to an ink screen, and the writing body refers to an electromagnetic pen.
The touch information refers to touch information of the user on the touch display screen acquired by the touch display screen when the user performs writing operation on the screen writing interface through the writing body, and may include, for example, writing position coordinates, writing pressure values, writing speed, and the like.
When the touch display screen is an ink screen, the touch information of the user during writing on the screen writing interface can be determined by receiving the signal of the electromagnetic pen for writing of the user.
And S102, determining a target handwriting drawing mode from the first handwriting drawing mode and the second handwriting drawing mode according to the touch information.
The first handwriting drawing mode is used for drawing the user writing handwriting directly according to the user writing position coordinate, and the second handwriting drawing mode is used for drawing the user writing handwriting which is determined according to the user writing position coordinate and is structured.
Specifically, the embodiment of the application sets two handwriting drawing modes. Both handwriting drawing modes are capable of drawing user writing based on user writing position coordinates. The user writing position coordinate refers to a coordinate of a user writing position acquired by a touch display screen in a user writing process, and may be one of the touch information, or may be information additionally acquired after the touch information is determined in the user writing process, and specific contents and an acquisition mode of the information may refer to a user writing information acquisition scheme in the prior art, which is not described in detail in the embodiments of the present application.
Under the first handwriting drawing mode, when the writing position coordinate of the user when writing on the screen writing interface is obtained, the user handwriting is drawn directly according to the writing position coordinate of the user. Under the model, no regularization processing is carried out on the user writing handwriting, and the user writing handwriting is drawn according to the obtained writing position coordinates.
For example, the writing position coordinates are usually recorded in the form of point coordinates, that is, coordinates of each pixel point on the writing track of the user are recorded, and the written handwriting of the user can be obtained by connecting the recorded pixel points at the coordinates of each point. The processing process needs less calculation amount, can display the handwriting of the user in real time based on high-speed screen refreshing frequency, and achieves the effect of synchronously tracking the writing operation of the user by handwriting display.
And in the second handwriting drawing mode, when the writing position coordinate of the user writing on the screen writing interface is obtained, determining the user writing according to the writing position coordinate, and drawing the adjusted user writing after the determined user writing is adjusted. Therefore, in the second handwriting drawing mode, the user handwriting is determined according to the user writing position coordinates, and the user handwriting is normalized. The regularization processing includes, but is not limited to, smoothing the handwriting of the user, adjusting the width of the handwriting, and adjusting the font type. The regularization processing can lead the handwriting of the user to be matched with the writing operation of the user, lead the displayed handwriting of the user to be more in line with the handwriting characteristics of the user and be more beautiful.
In the second handwriting mode, the user handwriting needs to be structured after being determined according to the writing position coordinates, so that the operation amount is improved, the user handwriting cannot be displayed in time when the screen refreshing frequency is high, and the operation can only be performed at the low-speed screen refreshing frequency.
The first handwriting drawing mode and the second handwriting drawing mode can respectively realize the fast drawing of the user handwriting and the drawing of the normalized user handwriting. By applying the first handwriting drawing mode, the requirement of a user on the synchronism of the handwriting display of the user can be met; by applying the second handwriting drawing mode, the requirement of the user on the fact that the user is familiar with handwriting and fits the writing operation of the user can be met.
According to the method and the device, in the writing process of the user, one of the first handwriting drawing mode and the second handwriting drawing mode is selected as the target handwriting drawing mode according to the touch information written by the user. When the touch information written by the user changes, the selected handwriting drawing mode may also change, so that the handwriting drawing mode is not invariable but is switched between the first handwriting drawing mode and the second handwriting drawing mode in real time along with the writing process of the user, and therefore, the synchronization requirement of the user on the display of the handwriting and the requirement on the displayed handwriting meeting the writing operation of the user can be considered in the writing process of the user.
And S103, drawing the user writing on the screen writing interface according to the target writing drawing mode.
Specifically, when one of the first handwriting drawing mode and the second handwriting drawing mode is selected as the target handwriting drawing mode, the user handwriting is drawn on the screen writing interface according to the selected handwriting drawing mode.
For example, when the first handwriting drawing mode is determined as the target handwriting drawing mode, drawing the user handwriting directly according to the acquired user writing position coordinates; and when the second handwriting drawing mode is determined as the target handwriting drawing mode, determining the user handwriting according to the obtained user writing position coordinates, and drawing and displaying on the screen writing interface after the determined user handwriting is normalized.
According to the handwriting drawing method, different handwriting drawing modes can be automatically selected according to the touch information of the user during writing, and therefore the handwriting drawing modes are matched with the touch information of the user during writing. The first handwriting drawing mode applied in the handwriting drawing method directly draws the user handwriting according to the user writing position coordinates, the processing amount is small, and the requirement of the user on the synchronism of handwriting display can be met; after the second handwriting drawing mode applied in the handwriting drawing method determines the user handwriting according to the user writing position coordinate, the user handwriting is further structured, so that the user handwriting can be more suitable for the user writing operation. The handwriting drawing method switches and applies the two handwriting drawing modes according to the touch information when the user writes, can give consideration to the synchronization requirement of the user on the handwriting display and the requirement that the user handwriting fits the writing operation of the user, and can improve the user experience when the scheme is applied to the touch display screen.
As an optional implementation manner, the touch information when the user writes on the screen writing interface includes a writing speed, that is, a speed at which the user writes on the screen writing interface.
Then, the determining a target handwriting drawing mode from the first handwriting drawing mode and the second handwriting drawing mode according to the touch information includes:
and determining a target handwriting drawing mode from the first handwriting drawing mode and the second handwriting drawing mode according to the writing speed.
Specifically, the first handwriting drawing mode and the second handwriting drawing mode have different calculation amounts, so that the consumption amount of calculation resources is different, and the required processing time is different.
Meanwhile, the writing speed of the user may change at any time during the writing process. When the writing speed of a user is high, if the processing time required in the handwriting drawing process is long, the handwriting display cannot follow the writing operation of the user, and the phenomenon that the written handwriting does not follow the writing can occur; when the writing speed of the user is low, even if the time required by the handwriting drawing process is long, the time difference between the handwriting display and the writing operation of the user is probably not large, and the phenomenon that the obvious handwriting does not follow the pen is avoided.
Therefore, the time length required by the handwriting drawing mode for drawing the handwriting should be matched with the writing speed of the user, so that the writing handwriting can be displayed in time in the writing process of the user.
Because the first handwriting drawing mode and the second handwriting drawing mode have different working contents and the handwriting drawing time required by the first handwriting drawing mode and the second handwriting drawing mode is obviously different, when the target handwriting drawing mode is selected from the first handwriting drawing mode and the second handwriting drawing mode, the handwriting drawing time required by the selected handwriting drawing mode is ensured to be matched with the writing speed of a user. Therefore, according to the writing speed of the user during writing, and by combining the handwriting drawing time required by the first handwriting drawing mode and the second handwriting drawing mode, the target handwriting drawing mode can be determined from the first handwriting drawing mode and the second handwriting drawing mode.
For example, when the target handwriting drawing mode is determined from the first handwriting drawing mode and the second handwriting drawing mode according to the writing speed, the embodiment of the application specifically determines in the following manner:
when the writing speed is greater than a set writing speed threshold value, determining the first handwriting drawing mode as a target handwriting drawing mode;
and when the writing speed is not greater than the set writing speed threshold value, determining the second handwriting drawing mode as a target handwriting drawing mode.
Specifically, a writing speed threshold is preset in the embodiment of the application, when the writing speed of the user is greater than the writing speed threshold, the writing speed of the user is considered to be high, and at the moment, the first handwriting drawing mode is determined as the target handwriting drawing mode. The first handwriting drawing mode is used for drawing the user handwriting directly according to the user writing position coordinates, so that the processing amount is small, the required processing time is short, and the user handwriting can be displayed in time in the user quick writing process.
And when the writing speed of the user is not greater than the writing speed threshold value, the writing speed of the user is considered to be slower, and the second handwriting drawing mode is determined as the target handwriting drawing mode. Because the user writes slowly, draw the demonstration after confirming user writing after the writing, also can realize in user writing process following user writing progress and show user writing, because the handwriting that shows is through regular handwriting, can make user writing display effect more pleasing to the eye, more accords with user writing operation moreover.
As an exemplary implementation manner, the touch information of the user when writing on the screen writing interface includes a writing position coordinate, and the writing position coordinate may be specifically a position coordinate of a screen pixel point that is in contact with a writing body when the user writes on the screen writing interface by using the writing body such as an electromagnetic pen, that is, the writing position coordinate is a form of a series of pixel point coordinates.
When the second handwriting drawing mode is used as a target handwriting drawing mode, drawing the user handwriting on the screen writing interface according to the target handwriting drawing mode, including:
firstly, determining handwriting drawing coordinates according to the writing position coordinates, and determining the gray value of each pixel of the handwriting through anti-aliasing processing.
Illustratively, the writing trace may be formed by connecting the position coordinates of the pixel points included in the writing position coordinates, that is, the coordinates for drawing the writing trace. Therefore, the handwriting drawing coordinates can be determined by performing pixel point connection on the writing position coordinates.
After the handwriting drawing coordinates are determined, the pixel values of the pixel points at the handwriting drawing coordinates are set to be the set pixel values, and handwriting drawing can be achieved. For example, the pixel value of the pixel point at the handwriting drawing coordinate in the writing interface is set to 1, and the pixel value of the pixel point at the non-handwriting drawing coordinate is set to 0, so that the purpose of displaying the handwriting of the user on the writing interface can be realized. However, the pixel value of the pixel point is directly set to the set pixel value, which may cause the sawtooth at the edge of the handwriting. The jaggy phenomenon is more serious particularly when displayed on a screen with a low resolution. For example, when a user writes on an ink screen, the edges of the displayed handwriting always appear more or less jagged due to the lower resolution of the ink screen.
In order to avoid the sawtooth at the edge of the drawn handwriting, after the handwriting drawing coordinate is determined, the handwriting is not drawn at first, but the gray value of each pixel of the handwriting is determined through anti-sawtooth processing based on the determined handwriting drawing coordinate.
Illustratively, pixel values of pixels on two sides of a pixel point at the edge of the writing script are mixed, and then the mixed pixel value is used as the pixel value of the pixel point at the edge of the writing script, so that the pixel value at the edge of the writing script is excessively smoother, and the purpose of eliminating the sawtooth is achieved.
Therefore, after determining the handwriting drawing coordinates according to the writing position coordinates, the embodiment of the application determines the gray value of each pixel of the handwriting through anti-aliasing processing based on the determined handwriting drawing coordinates and the preset pixel value displayed by the handwriting.
And then, drawing the user writing on the screen writing interface at least according to the writing drawing coordinates and the gray value of each pixel of the writing.
Specifically, after the handwriting drawing coordinates are determined respectively and the gray values of the pixels of the handwriting are determined, the gray values of the pixels on the handwriting drawing coordinates are set to be the gray values determined through calculation, and then the user handwriting can be drawn.
Further, the touch information may further include a writing pressure value. The writing pressure-sensitive value refers to a pressure value sensed by the touch display screen when a user writes on the touch display screen by means of the writing body, and the writing pressure-sensitive value can directly reflect the writing strength of the user when the user writes.
When the target handwriting drawing mode is the second handwriting drawing mode, drawing the user writing on the screen writing interface according to the target handwriting drawing mode, and further including:
and determining the width of the handwriting according to the writing pressure value.
Specifically, the writing pressure value can directly reflect the writing strength of the user. Generally, when the writing strength of the user is different, the thickness of the handwriting is different, that is, the width of the handwriting of the user changes along with the change of the writing strength of the user.
Based on the above rules, the embodiment of the application determines the width of the handwriting of the user according to the above writing pressure sensing value. For example, the handwriting width may be determined based on the handwriting pressure value according to a rule that the handwriting width of the user is proportional to the handwriting pressure value.
Based on the determined writing trace width, drawing the writing trace of the user on the screen writing interface at least according to the trace drawing coordinate and the gray value of each pixel of the writing trace, and the method comprises the following steps:
and drawing the user handwriting on the screen writing interface at least according to the handwriting drawing coordinates, the gray value of each pixel of the handwriting and the width of the handwriting.
Illustratively, according to the determined writing trace width, the pixel points contained in the writing trace can be determined on the basis of the determined trace drawing coordinates. And then, combining the gray value of each pixel of the handwriting, and drawing and displaying the handwriting of the user on the screen writing interface.
Furthermore, when the user handwriting is drawn, the user handwriting can be drawn by referring to a font type preset by the user, namely the user handwriting is drawn on the screen writing interface according to the handwriting drawing coordinate, the gray value of each pixel of the handwriting, the width of the handwriting and the preset font type.
The font type may be a writing font type preset by a user, for example, a regular script, a song script, or the like, or a font style simulating a pen character, a brush character, or the like.
The writing width and the font type are combined, so that the writing drawing coordinate and the gray value of each pixel of the writing can be further corrected, the writing of the user is drawn on the screen writing interface based on the corrected result, the drawn writing of the user can better meet the user requirement, and the writing operation of the user can be better matched.
It can be understood that, in the embodiment of the application, based on the second handwriting drawing mode, the regularity of the user handwriting is realized through anti-aliasing processing, the writing pressure value and the font type, so that the drawn user handwriting is more attractive, and the user handwriting drawing mode accords with user settings and fits the writing operation of the user.
The specific processing procedure for the user writing order can also be implemented by referring to a common writing order ordering or beautifying scheme in the prior art, and the embodiment of the application is not described in detail.
For example, referring to fig. 2, when the first handwriting drawing mode is determined as the target handwriting drawing mode, when determining the touch information of the user when writing on the screen writing interface, and drawing the user handwriting on the screen writing interface according to the first handwriting drawing mode, step S204 is further performed to cache the writing position coordinates and the writing pressure value of the user when writing on the screen writing interface.
For example, the writing position coordinates and the writing pressure value may be information included in the touch information when the user writes on the screen writing interface.
After determining the touch information of the user when writing on the screen writing interface, according to the first handwriting drawing mode, the user writing handwriting is drawn only by using the writing position coordinate without performing normalization processing on the user writing handwriting, but the embodiment of the application still performs cache recording on the writing position coordinate and the writing pressure value acquired in the user writing process, so that the drawn user writing handwriting is normalized and redrawn at a later period in an idle state.
According to the first handwriting drawing mode, drawing the user handwriting on the screen writing interface, and caching the writing position coordinates and the writing pressure values of the user during writing on the screen writing interface, the embodiment of the application further executes step S205 in real time, detects whether the user stops writing, and executes step S206 according to the second handwriting drawing mode when detecting that the user stops writing, and redraws the regular user handwriting at the cached writing position according to the cached writing position coordinates and the writing pressure values.
Specifically, when the user stops writing, the touch display screen enters an idle state, and at the moment, according to a second handwriting drawing mode, the displayed user writing is drawn again after being normalized according to the cached writing position coordinates and the writing pressure value.
For example, assuming that a user writes on a screen writing interface at a higher speed, according to the technical solution of the embodiment of the present application, the user writing handwriting is drawn on the screen writing interface according to the first handwriting drawing mode, and the writing position coordinates and the writing pressure value of the user during writing are cached. And if the user stops writing when the first line of text is written, redrawing the first line of text handwriting according to the cached writing position coordinates and the written pressure values in the second handwriting drawing mode. Because the second handwriting drawing mode can be used for regularizing the writing handwriting, after the first line of text handwriting is redrawn according to the second handwriting drawing mode and the cached writing position coordinates and the writing pressure sensitivity values, the irregular writing handwriting displayed in the first line is changed into the regularized writing handwriting. The specific processing procedure of redrawing the normalized user writing at the cached writing position coordinate according to the cached writing position coordinate and the cached writing pressure value in the second writing drawing mode is the same as the process of drawing the user writing on the screen writing interface in the second writing drawing mode described in the above embodiment, and the execution is described with reference to the above embodiment.
The displayed user writing handwriting is normalized according to the second handwriting drawing mode and the cached writing position coordinates and the writing pressure value, and the normalization processing of the user writing is executed in a controller or a processor of the touch display screen or a processor of the electronic equipment provided with the touch display screen, and then the normalized user writing is drawn and displayed by the touch display screen after the normalization processing of the user writing is executed by the controller or the processor.
As an exemplary implementation manner, the above-mentioned detecting whether the user stops writing may be implemented by detecting whether a time length that the writing body leaves the screen exceeds a set time length, detecting whether the user writes in an area outside the screen writing interface, and detecting whether the user raises the head.
And if the time length that the writing body leaves the screen is detected to exceed the set time length, and/or the user is detected to write in an area outside the screen writing interface, and/or the user is detected to raise the head, determining that the user stops writing.
If the writing body is an electromagnetic pen, the time length of the writing body leaving the screen exceeds the set time length, and it can be considered that the pen lifting of the user exceeds the set time length, that is, the time length of the writing body leaving the screen still does not contact the screen again after exceeding the set time length, at this time, it can be determined that the user does not write on the screen within the set time length, and it can be considered that the user stops writing. Similarly, the user can write in an area outside the screen writing interface, or the user raises his head, which can be regarded as that the user stops writing.
As an optional implementation manner, the detecting whether the user heads up may be implemented by acquiring a head image of the user, and determining whether the user heads up according to the acquired head image of the user.
For example, the embodiment of the application trains a head-up recognition model in advance, and the head-up recognition model can recognize whether a user heads up according to a head image of the user. Based on the head-up recognition model, the head of the user is shot by the front camera of the electronic equipment to obtain a head image of the user, and then the shot head image of the user is input into the head-up recognition model, so that whether the user heads up or not can be judged. The head-up recognition model can be obtained based on deep learning network training.
Further, in the process of drawing the user handwriting on the screen writing interface according to the first handwriting drawing mode and caching the writing position coordinate and the writing pressure value of the user when writing on the screen writing interface, the embodiment of the application further executes step S207 in real time to detect whether to quit the current writing interface, and executes step S209 in real time after quitting the current writing interface to detect whether to return to the current writing interface.
The current writing interface is a writing interface displayed on the touch display screen at the current moment, and the writing interface is an interface on which a user writes at the current moment.
It can be understood that when exiting from the current writing interface, the writing operation of the user on the current writing interface is definitely ended, and at this time, the writing handwriting already displayed on the current writing interface can be redrawn after being normalized.
Therefore, when it is detected that the current writing interface exits, the embodiment of the present application executes step S208, and determines the normalized user writing trace corresponding to the cached writing position coordinate and the writing pressure value according to the second writing trace drawing mode.
The cached writing position coordinates and the cached writing pressure-sensitive values specifically refer to the cached writing position coordinates and the cached writing pressure-sensitive values in the writing process of the user on the current writing interface.
According to the embodiment of the application, the second handwriting drawing mode is operated, the writing position coordinate and the writing pressure value of the user are cached, the writing coordinate of the user is determined, the writing of the user is normalized, and the normalized writing of the user is determined.
At the moment, the regular user handwriting is not drawn and displayed, but the specific user handwriting related data is stored.
When the return to the current writing interface is detected by executing the step S209, executing a step S210 to replace the drawn user writing at the cached writing position coordinates with the normalized user writing. Namely, the regular user writing is used for correspondingly replacing the user writing displayed on the current writing interface.
It can be understood that, in the above processing procedure, when the user does not execute the writing operation, the displayed user writing is normalized, and the normalized user writing is used to replace the displayed user writing. Through the technical scheme, the user writing handwriting can be synchronously displayed when the user writes, and the user writing handwriting is regulated when the user stops writing, so that the synchronization requirement of the user on the writing handwriting display is considered, and the writing handwriting display meets the requirement of the user on writing operation.
As an exemplary implementation manner, the detection of whether to exit from the current writing interface may be implemented by detecting whether to switch to another display interface, detecting whether to turn a page, and detecting whether to exit from the screen writing mode.
The switching to other display interfaces means that the display interface of the screen is switched from the current writing interface to other display interfaces.
The above-mentioned detection of whether to turn a page means detecting whether to turn a page of the writing interface displayed on the screen. When the writing interface displayed on the screen is full of characters or a user manually clicks a page turning button, the next writing interface of the current writing interface is displayed on the screen, and the page turning effect is achieved. It will be appreciated that when a page turn occurs, the current writing interface is no longer displayed, but the next writing interface is displayed.
The screen writing mode is a working mode of the touch display screen electronic device, and when the electronic device works in the screen writing mode, a writing interface is displayed on a screen of the electronic device, and at the moment, a user can be allowed to write on the writing interface. Therefore, it is a prerequisite for a user to write on the screen of the electronic device that the electronic device operates in the screen writing mode.
When the switching to other display interfaces is detected, or any condition of page turning or screen writing mode exiting is detected, the current writing interface can be determined to be exited.
The specific processing procedures of detecting whether to switch to other display interfaces, detecting whether to turn pages, and detecting whether to exit the screen writing mode can be executed by referring to the existing implementation scheme in the prior art, and the embodiment of the application is not described in detail.
As an exemplary implementation manner, a handwriting normalization switch is further provided for the touch display screen, where the handwriting normalization switch is used to turn on a handwriting normalization function, and may be a physical key provided on an electronic device equipped with the touch display screen or a virtual key displayed on the touch display screen.
Before determining the target handwriting drawing mode from the first handwriting drawing mode and the second handwriting drawing mode according to the touch information, detecting whether a handwriting normalization switch is turned on, and if the handwriting normalization switch is turned on, directly determining the second handwriting drawing mode as the target handwriting drawing mode.
Or according to the first handwriting drawing mode, in the process of drawing the user handwriting on the screen writing interface, if the user opens the handwriting regulation switch, the mode is switched to the second handwriting drawing mode, and the user handwriting is drawn on the screen writing interface.
Through the arrangement, the user can independently select whether to order the handwriting, so that the handwriting display adapts to the change of the handwriting display requirement of the user.
Illustratively, the embodiment of the application performs switching control on the screen refreshing frequency while performing switching selection on the handwriting drawing mode.
Drawing the user writing on the screen writing interface according to the target writing drawing mode, wherein the drawing comprises the following steps:
and drawing the user writing on the screen writing interface according to the target writing drawing mode and the screen refreshing frequency which is in direct proportion to the writing speed.
It can be understood that the target handwriting drawing mode selected by the embodiment of the application is a handwriting drawing mode matched with the writing speed of the user. When the writing speed of the user is high, the target handwriting drawing mode only draws the user writing handwriting according to the writing position coordinates, the handwriting drawing is high, and the user writing handwriting can be drawn in time; when the writing speed of the user is low, the target handwriting drawing mode not only draws the handwriting of the user, but also carries out regular processing on the handwriting of the user, so that the drawing of the handwriting of the user can be ensured to follow the writing progress of the user, and the displayed handwriting of the user can be ensured to be matched with the writing operation of the user.
The display and the update of the handwriting of the user are realized by screen refreshing, so the screen refreshing frequency can also influence the drawing progress of the handwriting of the user. For example, assume that the user writing is drawn on the screen writing interface in the first writing drawing mode. When the user writing handwriting is obtained through calculation according to the writing position coordinates, if the screen display is not refreshed, the user writing obtained through calculation cannot be displayed, and the user writing obtained through calculation can be drawn out only when the screen refreshing period comes. For another example, suppose that the user writing is drawn on the screen writing interface according to the second writing drawing mode. In the processing process of calculating the writing handwriting of the user according to the writing position and organizing the writing handwriting of the user, if the screen refreshing period is reached without being organized completely, the writing handwriting of the user which is not organized completely is refreshed and displayed, and the requirement of the user on the writing handwriting display obviously cannot be met.
Therefore, if the screen refreshing frequency is not matched with the writing speed of the user, the drawing progress of the handwriting written by the user is also affected.
In order to ensure that the writing handwriting of the user is displayed in time along with the writing progress of the user, the screen refreshing frequency is adjusted according to the writing speed of the user, namely, the writing handwriting of the user is drawn on the screen writing interface according to the target handwriting drawing mode and the screen refreshing frequency which is in direct proportion to the writing speed of the user. For example, when the writing speed of the user is high, the writing handwriting of the user is drawn on the screen writing interface at a high screen refreshing frequency; and when the writing speed of the user is low, drawing the handwriting of the user on the screen writing interface at a low screen refreshing frequency.
According to the scheme, the screen refreshing frequency is selected and adjusted, refreshing display of handwriting of a user can be matched with the writing speed of the user, and the display of the handwriting can meet the requirements of the user.
As an alternative implementation, when a user needs to write on the touch display screen of the electronic device, the touch display screen of the electronic device should be first controlled to enter the screen writing mode. When the touch display screen enters a screen writing mode, a screen writing interface is displayed, and at the moment, the historical writing handwriting is drawn on the screen writing interface according to the setting of the embodiment of the application.
The historical writing handwriting is specifically a regular handwriting which is written on a screen writing interface by a user before the current writing.
For example, when the user controls the touch display screen to enter the screen writing mode this time, displaying, on the screen writing interface of the touch display screen, the handwriting that the user wrote on the screen writing interface last time, and the handwriting is the normalized handwriting.
When the screen writing mode is entered, the historical writing notes are displayed on the screen writing interface, so that a user can conveniently plan the writing position at this time and determine whether to adjust the writing handwriting regular scheme and the like.
In correspondence with the above-described handwriting drawing method, an embodiment of the present application further provides a handwriting drawing apparatus, as shown in fig. 3, the apparatus including:
the information acquisition unit 100 is used for determining touch information of a user during writing on a screen writing interface;
the mode selection unit 110 is configured to determine a target handwriting drawing mode from a first handwriting drawing mode and a second handwriting drawing mode according to the touch information; the first handwriting drawing mode is used for drawing user writing handwriting directly according to the user writing position coordinates, and the second handwriting drawing mode is used for drawing the user writing handwriting which is determined according to the user writing position coordinates and is structured;
and the handwriting drawing unit 120 is used for drawing the user writing handwriting on the screen writing interface according to the target handwriting drawing mode.
The handwriting drawing device can automatically select different handwriting drawing modes according to the touch information of the user during writing, so that the handwriting drawing modes are matched with the touch information of the user during writing. The first handwriting drawing mode applied by the handwriting drawing device directly draws the user handwriting according to the user writing position coordinates, the processing amount is small, and the requirement of the user on the synchronism of the handwriting display can be met; after the second handwriting drawing mode applied by the handwriting drawing device determines the user handwriting according to the user writing position coordinate, the user handwriting is normalized, so that the user handwriting can be more suitable for the user writing operation. The handwriting drawing device switches and applies the two handwriting drawing modes according to the touch information when the user writes, can give consideration to the synchronization requirement of the user on handwriting display and the requirement that the user handwriting fits the writing operation of the user, and can improve the user experience when being applied to the touch display screen.
As an optional implementation manner, the touch information includes writing speed;
the mode selection unit 110 is specifically configured to, when determining the target handwriting drawing mode from the first handwriting drawing mode and the second handwriting drawing mode according to the touch information:
and determining a target handwriting drawing mode from the first handwriting drawing mode and the second handwriting drawing mode according to the writing speed.
As an optional implementation manner, the determining, by the mode selecting unit 110, a target handwriting drawing mode from the first handwriting drawing mode and the second handwriting drawing mode according to the writing speed includes:
when the writing speed is greater than a set writing speed threshold value, determining the first handwriting drawing mode as a target handwriting drawing mode;
and when the writing speed is not greater than the set writing speed threshold value, determining the second handwriting drawing mode as a target handwriting drawing mode.
As an optional implementation manner, the touch information includes a writing position coordinate;
when the target handwriting drawing mode is the second handwriting drawing mode, the handwriting drawing unit 120 draws the user writing on the screen writing interface according to the target handwriting drawing mode, and specifically includes:
determining a handwriting drawing coordinate according to the writing position coordinate, and determining the gray value of each pixel of the writing through anti-aliasing processing;
and drawing the user handwriting on the screen writing interface at least according to the handwriting drawing coordinates and the gray value of each pixel of the handwriting.
As an optional implementation manner, the touch information further includes a writing pressure value;
when the target handwriting drawing mode is the second handwriting drawing mode, the handwriting drawing unit 120 draws the user writing on the screen writing interface according to the target handwriting drawing mode, and further includes:
determining the width of the handwriting according to the writing pressure value;
drawing the user handwriting on the screen writing interface at least according to the handwriting drawing coordinates and the gray value of each pixel of the handwriting, and the drawing method comprises the following steps:
and drawing the user handwriting on the screen writing interface at least according to the handwriting drawing coordinates, the gray value of each pixel of the handwriting and the width of the handwriting.
As an optional implementation manner, the drawing the user handwriting on the screen writing interface at least according to the handwriting drawing coordinates, the gray value of each pixel of the handwriting and the handwriting width includes:
and drawing the user handwriting on the screen writing interface according to the handwriting drawing coordinates, the gray value of each pixel of the handwriting, the width of the handwriting and a preset font type.
As an optional implementation manner, when the target handwriting drawing mode is the first handwriting drawing mode, the handwriting drawing unit 120 is further configured to:
caching the writing position coordinates and the writing pressure values of a user when the user writes on a screen writing interface;
as an optional implementation manner, when the handwriting drawing unit 120 draws the user writing handwriting on the screen writing interface according to the first handwriting drawing mode, the handwriting drawing unit is further configured to:
detecting whether the user stops writing;
and when the fact that the user stops writing is detected, according to the second handwriting drawing mode, drawing the normalized user writing again at the cached writing position coordinate according to the cached writing position coordinate and the cached writing pressure value.
As an optional implementation manner, the detecting whether the user stops writing includes:
detecting whether the time length of the writing body leaving the screen exceeds a set time length, detecting whether a user writes in an area outside the screen writing interface, and detecting whether the user raises the head;
and if the time length that the writing body leaves the screen is detected to exceed the set time length, and/or the user is detected to write in an area outside the screen writing interface, and/or the user is detected to raise the head, determining that the user stops writing.
As an optional implementation manner, the detecting whether the user heads up includes:
acquiring a head image of a user, and determining whether the user raises the head according to the head image of the user.
As an optional implementation manner, when the handwriting drawing unit 120 draws the user writing handwriting on the screen writing interface according to the first handwriting drawing mode, the handwriting drawing unit is further configured to:
detecting whether a current writing interface exits or not, and detecting whether the current writing interface returns or not after the current writing interface exits;
when the current writing interface is detected to be exited, regular user writing handwriting corresponding to the cached writing position coordinates and the writing pressure sensing values is determined according to the second handwriting drawing mode;
and when the current writing interface is detected to be returned, replacing the drawn user writing handwriting at the cached writing position coordinate by using the normalized user writing handwriting.
As an optional implementation manner, the detecting whether to exit the current writing interface includes:
detecting whether to switch to other display interfaces, whether to turn pages, and whether to exit a screen writing mode;
and when the switching to other display interfaces is detected, or page turning is detected, or exit from the screen writing mode is detected, determining to exit from the current writing interface.
As an optional implementation manner, the mode selection unit 110 is further configured to:
detecting whether a handwriting regulation switch is turned on or not;
and when the handwriting regulating switch is turned on, determining the second handwriting drawing mode as the target handwriting drawing mode.
As an optional implementation manner, the handwriting drawing unit 120 is specifically configured to, according to the target handwriting drawing mode, when drawing the user writing on the screen writing interface:
and drawing the user writing on the screen writing interface according to the target writing drawing mode and the screen refreshing frequency which is in direct proportion to the writing speed.
As an optional implementation manner, the handwriting drawing unit 120 is further configured to:
drawing historical writing handwriting on a screen writing interface when entering a screen writing mode;
and the historical writing handwriting is a regular handwriting which is written on the screen writing interface before the user writes the current time.
Specifically, the specific work content of each unit of the handwriting drawing device can participate in the corresponding content of the above method embodiment, and is not repeated here.
Another embodiment of the present application further discloses a device for drawing handwriting, as shown in fig. 4, the device includes:
a memory 200 and a processor 210;
wherein, the memory 200 is connected to the processor 210 for storing programs;
the processor 210 is configured to implement the handwriting drawing method disclosed in any of the above embodiments by running the program stored in the memory 200.
Specifically, the evaluation device for the target detection result may further include: a bus, a communication interface 220, an input device 230, and an output device 240.
The processor 210, the memory 200, the communication interface 220, the input device 230, and the output device 240 are connected to each other through a bus. Wherein:
a bus may include a path that transfers information between components of a computer system.
The processor 210 may be a general-purpose processor, such as a general-purpose Central Processing Unit (CPU), microprocessor, etc., an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs in accordance with the present invention. But may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The processor 210 may include a main processor and may also include a baseband chip, modem, and the like.
The memory 200 stores programs for executing the technical solution of the present invention, and may also store an operating system and other key services. In particular, the program may include program code including computer operating instructions. More specifically, memory 200 may include a read-only memory (ROM), other types of static storage devices that may store static information and instructions, a Random Access Memory (RAM), other types of dynamic storage devices that may store information and instructions, a disk storage, a flash, and so forth.
The input device 230 may include a means for receiving data and information input by a user, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer, or gravity sensor, among others.
Output device 240 may include equipment that allows output of information to a user, such as a display screen, a printer, speakers, and the like.
The processor 2102 executes programs stored in the memory 200 and invokes other devices, which may be used to implement the steps of the handwriting drawing method provided by the embodiments of the present application.
Another embodiment of the present application further provides a storage medium, on which a computer program is stored, and when being executed by a processor, the computer program implements the steps of the handwriting drawing method provided in any of the above embodiments.
The details of the operations of the parts of the apparatus for drawing handwriting and the details of the processing of the computer program stored in the storage medium when the computer program is executed by the processor are all referred to in the description of the above embodiments of the method of the present application and will not be repeated here.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present application is not limited by the order of acts or acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The steps in the method of each embodiment of the present application may be sequentially adjusted, combined, and deleted according to actual needs, and technical features described in each embodiment may be replaced or combined.
The modules and sub-modules in the device and the terminal in the embodiments of the application can be combined, divided and deleted according to actual needs.
In the several embodiments provided in the present application, it should be understood that the disclosed terminal, apparatus and method may be implemented in other manners. For example, the above-described terminal embodiments are merely illustrative, and for example, the division of a module or a sub-module is only one logical division, and there may be other divisions when the terminal is actually implemented, for example, a plurality of sub-modules or modules may be combined or integrated into another module, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules or sub-modules described as separate parts may or may not be physically separate, and parts that are modules or sub-modules may or may not be physical modules or sub-modules, may be located in one place, or may be distributed over a plurality of network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, each functional module or sub-module in the embodiments of the present application may be integrated into one processing module, or each module or sub-module may exist alone physically, or two or more modules or sub-modules may be integrated into one module. The integrated modules or sub-modules may be implemented in the form of hardware, or may be implemented in the form of software functional modules or sub-modules.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software unit executed by a processor, or in a combination of the two. The software cells may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (15)
1. A handwriting drawing method, comprising:
determining touch information of a user when the user writes on a screen writing interface;
determining a target handwriting drawing mode from a first handwriting drawing mode and a second handwriting drawing mode according to the touch information; the first handwriting drawing mode is used for drawing user writing handwriting directly according to the user writing position coordinates, and the second handwriting drawing mode is used for drawing the user writing handwriting which is determined according to the user writing position coordinates and is structured;
and drawing the user writing on the screen writing interface according to the target writing drawing mode.
2. The method of claim 1, wherein the touch information comprises writing speed;
determining a target handwriting drawing mode from a first handwriting drawing mode and a second handwriting drawing mode according to the touch information, and the method comprises the following steps:
and determining a target handwriting drawing mode from the first handwriting drawing mode and the second handwriting drawing mode according to the writing speed.
3. The method as claimed in claim 2, wherein the determining a target handwriting drawing mode from a first handwriting drawing mode and a second handwriting drawing mode according to the writing speed comprises:
when the writing speed is greater than a set writing speed threshold value, determining the first handwriting drawing mode as a target handwriting drawing mode;
and when the writing speed is not greater than the set writing speed threshold value, determining the second handwriting drawing mode as a target handwriting drawing mode.
4. The method of claim 1, wherein the touch information includes writing position coordinates;
when the target handwriting drawing mode is the second handwriting drawing mode, drawing the user writing handwriting on the screen writing interface according to the target handwriting drawing mode, including:
determining a handwriting drawing coordinate according to the writing position coordinate, and determining the gray value of each pixel of the writing through anti-aliasing processing;
and drawing the user handwriting on the screen writing interface at least according to the handwriting drawing coordinates and the gray value of each pixel of the handwriting.
5. The method of claim 4, wherein the touch information further comprises a written pressure value;
when the target handwriting drawing mode is the second handwriting drawing mode, drawing the user writing handwriting on the screen writing interface according to the target handwriting drawing mode, and further comprising:
determining the width of the handwriting according to the writing pressure value;
drawing the user handwriting on the screen writing interface at least according to the handwriting drawing coordinates and the gray value of each pixel of the handwriting, and the drawing method comprises the following steps:
and drawing the user handwriting on the screen writing interface at least according to the handwriting drawing coordinates, the gray value of each pixel of the handwriting and the width of the handwriting.
6. The method as claimed in claim 5, wherein the drawing the user writing on the screen writing interface according to at least the writing drawing coordinates, the gray value of each pixel of the writing, and the writing width comprises:
and drawing the user handwriting on the screen writing interface according to the handwriting drawing coordinates, the gray value of each pixel of the handwriting, the width of the handwriting and a preset font type.
7. The method according to claim 1, wherein when the target writing drawing mode is the first writing drawing mode, the method further comprises:
and caching the writing position coordinates and the writing pressure values when the user writes on the screen writing interface.
8. The method of claim 7, wherein when drawing user writing in the screen writing interface in the first writing drawing mode, the method further comprises:
detecting whether the user stops writing;
and when the fact that the user stops writing is detected, according to the second handwriting drawing mode, drawing the normalized user writing again at the cached writing position coordinate according to the cached writing position coordinate and the cached writing pressure value.
9. The method of claim 8, wherein the detecting whether the user stopped writing comprises:
detecting whether the time length of the writing body leaving the screen exceeds a set time length, detecting whether a user writes in an area outside the screen writing interface, and detecting whether the user raises the head;
and if the time length that the writing body leaves the screen is detected to exceed the set time length, and/or the user is detected to write in an area outside the screen writing interface, and/or the user is detected to raise the head, determining that the user stops writing.
10. The method of claim 7, wherein when drawing user writing in the screen writing interface in the first writing drawing mode, the method further comprises:
detecting whether a current writing interface exits or not, and detecting whether the current writing interface returns or not after the current writing interface exits;
when the current writing interface is detected to be exited, regular user writing handwriting corresponding to the cached writing position coordinates and the writing pressure sensing values is determined according to the second handwriting drawing mode;
and when the current writing interface is detected to be returned, replacing the drawn user writing handwriting at the cached writing position coordinate by using the normalized user writing handwriting.
11. The method according to claim 2, wherein the drawing the user writing on the screen writing interface according to the target writing drawing mode comprises:
and drawing the user writing on the screen writing interface according to the target writing drawing mode and the screen refreshing frequency which is in direct proportion to the writing speed.
12. The method of claim 1, further comprising:
drawing historical writing handwriting on a screen writing interface when entering a screen writing mode;
and the historical writing handwriting is a regular handwriting which is written on the screen writing interface before the user writes the current time.
13. A handwriting drawing apparatus, comprising:
the information acquisition unit is used for determining touch information of a user during writing on a screen writing interface;
the mode selection unit is used for determining a target handwriting drawing mode from a first handwriting drawing mode and a second handwriting drawing mode according to the touch information; the first handwriting drawing mode is used for drawing user writing handwriting directly according to the user writing position coordinates, and the second handwriting drawing mode is used for drawing the user writing handwriting which is determined according to the user writing position coordinates and is structured;
and the handwriting drawing unit is used for drawing the user writing handwriting on the screen writing interface according to the target handwriting drawing mode.
14. A handwriting drawing apparatus, comprising:
a memory and a processor;
wherein the memory is connected with the processor and used for storing programs;
the processor is used for implementing the handwriting drawing method according to any one of claims 1 to 12 by running the program in the memory.
15. A storage medium having stored thereon a computer program which, when executed by a processor, implements a method of handwriting rendering according to any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010259517.8A CN111475045A (en) | 2020-04-03 | 2020-04-03 | Handwriting drawing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010259517.8A CN111475045A (en) | 2020-04-03 | 2020-04-03 | Handwriting drawing method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111475045A true CN111475045A (en) | 2020-07-31 |
Family
ID=71750638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010259517.8A Pending CN111475045A (en) | 2020-04-03 | 2020-04-03 | Handwriting drawing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111475045A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113190166A (en) * | 2021-06-30 | 2021-07-30 | 广州文石信息科技有限公司 | Handwriting display method and device based on ink screen |
CN113641283A (en) * | 2021-07-05 | 2021-11-12 | 华为技术有限公司 | Electronic device, screen writing mode switching method and medium thereof |
CN113934394A (en) * | 2021-10-19 | 2022-01-14 | 河北师达教育科技有限公司 | Method and device for realizing memory display in display screen and terminal equipment |
CN115061621A (en) * | 2022-05-25 | 2022-09-16 | 山东蓝贝思特教装集团股份有限公司 | Writing handwriting display control method and system for bistable liquid crystal writing device |
CN115938244A (en) * | 2023-02-20 | 2023-04-07 | 深圳市英唐数码科技有限公司 | Display method, system and storage medium of electronic paper book adapting to multiple pen shapes |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103135915A (en) * | 2011-11-29 | 2013-06-05 | 北京三星通信技术研究有限公司 | Method and device of hand input beautifying |
CN110263519A (en) * | 2019-05-31 | 2019-09-20 | 联想(北京)有限公司 | Information processing method and electronic equipment |
-
2020
- 2020-04-03 CN CN202010259517.8A patent/CN111475045A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103135915A (en) * | 2011-11-29 | 2013-06-05 | 北京三星通信技术研究有限公司 | Method and device of hand input beautifying |
CN110263519A (en) * | 2019-05-31 | 2019-09-20 | 联想(北京)有限公司 | Information processing method and electronic equipment |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113190166A (en) * | 2021-06-30 | 2021-07-30 | 广州文石信息科技有限公司 | Handwriting display method and device based on ink screen |
CN113190166B (en) * | 2021-06-30 | 2021-09-21 | 广州文石信息科技有限公司 | Handwriting display method and device based on ink screen |
CN113641283A (en) * | 2021-07-05 | 2021-11-12 | 华为技术有限公司 | Electronic device, screen writing mode switching method and medium thereof |
CN113934394A (en) * | 2021-10-19 | 2022-01-14 | 河北师达教育科技有限公司 | Method and device for realizing memory display in display screen and terminal equipment |
CN113934394B (en) * | 2021-10-19 | 2024-05-03 | 河北师达教育科技有限公司 | Method, device and terminal equipment for realizing memory display in display screen |
CN115061621A (en) * | 2022-05-25 | 2022-09-16 | 山东蓝贝思特教装集团股份有限公司 | Writing handwriting display control method and system for bistable liquid crystal writing device |
CN115938244A (en) * | 2023-02-20 | 2023-04-07 | 深圳市英唐数码科技有限公司 | Display method, system and storage medium of electronic paper book adapting to multiple pen shapes |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111475045A (en) | Handwriting drawing method, device, equipment and storage medium | |
CN111381754B (en) | Handwriting processing method, equipment and medium | |
CN109284059B (en) | Handwriting drawing method and device, interactive intelligent panel and storage medium | |
US10120568B2 (en) | Hover controlled user interface element | |
KR20130060145A (en) | Processoing method and apparatus for beautifying handwritten input | |
US9921719B2 (en) | Touch display apparatus and wallpaper replacing method thereof | |
CN111083417B (en) | Image processing method and related product | |
CN112114734B (en) | Online document display method, device, terminal and storage medium | |
US9613444B2 (en) | Information input display device and information input display method | |
US10268369B2 (en) | Detecting erasure gestures in an electronic presentation system | |
CN112558812B (en) | Pen point generation method and device, intelligent device and storage medium | |
EP3413179B1 (en) | Rejecting extraneous touch inputs in an electronic presentation system | |
US20150143287A1 (en) | Resizing technique for display content | |
CN111782131A (en) | Pen point implementation method, device, equipment and readable storage medium | |
CN112394838B (en) | Handwriting determining method and touch display device | |
CN101281442A (en) | Handwriting indication method, system as well as mobile terminal of touching medium | |
CN104423802A (en) | Window expansion method and associated electronic device | |
CN112639696A (en) | Handwriting board, handwriting board device and writing control method | |
CN112214192A (en) | Operation method and system of intelligent interactive tablet, computer equipment and storage medium | |
CN113296616B (en) | Pen point selection method and device and intelligent terminal | |
CN117930995B (en) | Text drawing method and device | |
WO2024093223A1 (en) | Display device and handwriting display method | |
CN116774854A (en) | Handwriting adjusting method, device, equipment and storage medium | |
US11900568B2 (en) | Writing trajectory processing method, touch control device, writing system and storage medium | |
CN114691009A (en) | Method, system, device and medium for always forward displaying handwriting data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |