CN111638851B - Handwriting display processing method, related device and handwriting interoperation system - Google Patents

Handwriting display processing method, related device and handwriting interoperation system Download PDF

Info

Publication number
CN111638851B
CN111638851B CN202010499835.1A CN202010499835A CN111638851B CN 111638851 B CN111638851 B CN 111638851B CN 202010499835 A CN202010499835 A CN 202010499835A CN 111638851 B CN111638851 B CN 111638851B
Authority
CN
China
Prior art keywords
handwriting
interactive
terminal
interactive handwriting
drawing board
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.)
Active
Application number
CN202010499835.1A
Other languages
Chinese (zh)
Other versions
CN111638851A (en
Inventor
张爱明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
iFlytek Co Ltd
Original Assignee
iFlytek Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN202010499835.1A priority Critical patent/CN111638851B/en
Publication of CN111638851A publication Critical patent/CN111638851A/en
Application granted granted Critical
Publication of CN111638851B publication Critical patent/CN111638851B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Facsimiles In General (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The application provides a handwriting display processing method, a related device and a handwriting interoperation system, wherein the method can be applied to a first terminal and comprises the following steps: mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain interactive handwriting; rendering and displaying the interactive handwriting on the drawing board on a display screen; and sending the coordinates of the interactive handwriting on the drawing board as interactive handwriting information to a second terminal so that the second terminal draws the handwriting on the drawing board with the local target resolution according to the interactive handwriting information and renders the interactive handwriting on the drawing board on a display screen. By executing the scheme, the handwriting drawn by the user at the first terminal can be displayed to the first terminal and the second terminal simultaneously, the requirement of mutual operation of the handwriting of multiple persons and multiple devices can be met, and meanwhile, the consistency of the handwriting display effect in the handwriting interoperation process can be ensured.

Description

Handwriting display processing method, related device and handwriting interoperation system
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a handwriting display processing method, a related apparatus, and a handwriting interoperation system.
Background
With the development of internet technology, the requirement of mutual operation of multiple people and multiple devices on handwriting in the fields of remote teaching, network conferences, digital medical treatment and the like is more and more. The multi-user multi-device handwriting interoperation means that when a local user performs handwriting operations (such as handwriting drawing and handwriting erasing) on local equipment, the handwriting operations of the local user can be completely reproduced on remote equipment connected with the local equipment, and similarly, when the remote user performs the handwriting operations on the remote equipment, the handwriting operations of the remote user can also be completely reproduced on the local equipment.
Therefore, how to realize mutual operation of handwriting of multiple persons and multiple devices is the key for solving the user requirements.
Disclosure of Invention
Based on the requirements, the application provides a handwriting display processing method, a related device and a handwriting interoperation system, so that the mutual operation of multiple persons and multiple devices of handwriting can be realized, and the consistency of the displayed handwriting of the multiple devices can be ensured.
A handwriting display processing method, comprising:
mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain interactive handwriting;
rendering and displaying the interactive handwriting on the drawing board on a display screen;
and sending the coordinates of the interactive handwriting on the drawing board as interactive handwriting information to a second terminal so that the second terminal draws the handwriting on the drawing board with the local target resolution according to the interactive handwriting information and renders the interactive handwriting on the drawing board on a display screen.
A handwriting display processing method, comprising:
acquiring interactive handwriting information sent by a first terminal, wherein the interactive handwriting information comprises interactive handwriting coordinates, and the interactive handwriting coordinates are coordinates of the interactive handwriting obtained by mapping handwriting drawn by a user on a drawing board with a target resolution by the first terminal, and the interactive handwriting is used for rendering and displaying at the first terminal;
drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting;
rendering and displaying the interactive handwriting on the drawing board on a display screen.
A handwriting interoperation system comprising:
a first terminal and a second terminal communicating with each other;
the first terminal is used for mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain interactive handwriting; rendering and displaying the interactive handwriting on the drawing board on a display screen; sending the coordinates of the interactive handwriting on the drawing board as interactive handwriting information to a second terminal;
the second terminal is used for acquiring the interactive handwriting information sent by the first terminal; drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting; rendering and displaying the interactive handwriting on the drawing board on a display screen.
A handwriting display processing apparatus comprising:
the first handwriting drawing unit is used for mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain interactive handwriting;
the first handwriting display unit is used for rendering and displaying the interactive handwriting on the drawing board on a display screen;
and the data sending unit is used for sending the coordinates of the interactive handwriting on the drawing board to a second terminal as interactive handwriting information so that the second terminal draws the handwriting on the drawing board with local target resolution according to the interactive handwriting information and renders the interactive handwriting on the drawing board on a display screen.
A handwriting display processing apparatus comprising:
the data receiving unit is used for acquiring interactive handwriting information sent by a first terminal, wherein the interactive handwriting information comprises interactive handwriting coordinates, the interactive handwriting coordinates are coordinates of the interactive handwriting obtained by mapping handwriting drawn by a user on a drawing board with a target resolution by the first terminal, and the interactive handwriting is used for rendering and displaying at the first terminal;
the second handwriting drawing unit is used for drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting;
and the second handwriting display unit is used for rendering and displaying the interactive handwriting on the drawing board on the display screen.
A handwriting display processing 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 display processing method by operating the program stored in the memory.
A storage medium having stored thereon a computer program which, when executed by a processor, implements the handwriting display processing method described above.
In the technical scheme, the first terminal maps the user handwriting on the drawing board with the target resolution, the handwriting on the drawing board is rendered and displayed, the coordinates of the handwriting on the drawing board are sent to the second terminal by the first terminal, the second terminal draws the handwriting on the drawing board with the local target resolution and renders and displays the handwriting according to the received handwriting coordinates, the display of the same handwriting on different terminals is achieved in the processing process, namely the handwriting drawn by the user at the first terminal is displayed on the first terminal and the second terminal at the same time, and the requirement for mutual operation of the handwriting of multiple persons and multiple devices can be met.
Furthermore, because the drawing board at the first terminal and the drawing board at the second terminal are drawing boards with the same resolution, after the first terminal sends the coordinates of the handwriting on the drawing board to the second terminal, the second terminal draws the handwriting on the local drawing board according to the received handwriting coordinates, and the handwriting on the drawing board at the first terminal has the same resolution and the same size. When the handwriting is rendered and displayed at the first terminal and the second terminal respectively, the handwriting displayed at the first terminal and the second terminal can be the same handwriting. Therefore, the display of the handwriting drawn by the user at the first terminal is completely the same as the display at the second terminal, and the consistency of the handwriting display effect in the handwriting interoperation process is ensured.
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 timing diagram of a handwriting display processing method provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of a handwriting interoperation implementation process provided by an embodiment of the present application;
FIG. 3 is a flow chart illustrating a handwriting display processing method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of handwriting drawn on a drawing board provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of calculating a handwriting edge pixel value according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another handwriting edge pixel value calculation provided in the embodiment of the present application;
FIG. 7 is a schematic diagram of an interactive script provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of an interactive script after a shifting process is performed on the interactive script shown in FIG. 7 according to an embodiment of the present application;
FIG. 9 is a schematic diagram of an interactive script after smoothing processing is performed on the interactive script shown in FIG. 7 according to an embodiment of the present application;
FIG. 10 is a flow chart of another handwriting display processing method provided by the embodiment of the present application;
FIG. 11 is a schematic structural diagram of a handwriting display processing apparatus according to an embodiment of the present application;
FIG. 12 is a schematic structural diagram of another handwriting display processing apparatus provided in the embodiment of the present application;
fig. 13 is a schematic structural diagram of a handwriting display processing device according to an embodiment of the present application.
Detailed Description
The technical scheme of the embodiment of the application is suitable for an application scene that multiple users perform handwriting mutual operation on multiple devices, and by the technical scheme of the embodiment of the application, the same user handwriting operation can be displayed on the devices which are communicated with each other simultaneously when different users perform handwriting operation on the different devices which are communicated with each other.
In order to briefly introduce the technical solution of the embodiment of the present application, the embodiment of the present application takes a system formed by a first terminal and a second terminal which are in communication with each other as a scheme implementation basis, and focuses on how to display the handwriting operation of the first terminal user at the second terminal and the first terminal simultaneously when the user performs the handwriting operation at the first terminal. Similarly, when the user performs handwriting operation on the second terminal, by implementing the technical scheme of the embodiment of the application, the handwriting operation of the user at the second terminal can be displayed on the first terminal and the second terminal at the same time.
It can be understood that the handwriting interoperation realized on the system formed by the first terminal and the second terminal can be applied to a system formed by more terminals, so that when a user performs handwriting operation on any one terminal in the system, the handwriting operation of the user is simultaneously displayed on all the terminals of the system, and the displayed handwriting operations are the same.
The first terminal and the second terminal are only used for distinguishing different terminals which are used for the user to perform note taking operation and are communicated with each other, the sequence and the number of the terminals are not limited, the type of the terminals is not limited, the terminals can be any type of hardware equipment with handwriting operation and display capability, or the first terminal and the second terminal can also be application programs with handwriting operation and display functions and the like which run on the terminal equipment.
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.
Taking the example that the user draws the handwriting at the first terminal, the embodiment of the application mainly introduces the handwriting drawn at the first terminal by the user, and how to display the handwriting drawn at the first terminal by the user in the same form at the first terminal and the second terminal.
Referring to fig. 1, a handwriting display processing method provided in the embodiment of the present application realizes a specific processing procedure in which a first terminal and a second terminal display a handwriting drawn by a user at the first terminal in the same form, and includes:
s101, the first terminal maps the handwriting drawn by the user to a drawing board with a target resolution ratio to obtain the interactive handwriting.
The drawing board with the target resolution is a drawing board which is arranged at the first terminal and the second terminal at the same time and has the same set resolution, and the drawing board can be a drawing board displayed on a display screen of the first terminal or a virtual drawing board. In the embodiment of the application, the first terminal and the second terminal are simultaneously provided with the virtual drawing board with the target resolution, and the virtual drawing board is used for rasterizing coordinates of handwriting drawn by a user, so that the interactive handwriting is drawn on the drawing board. The virtual drawing board is made up of a matrix of pixels, each pixel of which has a unique coordinate in the virtual drawing board. Illustratively, the first terminal and the second terminal both set a virtual drawing board with a pixel resolution of m × n for rasterizing the handwriting drawn by the user.
When the first terminal acquires the handwriting drawn by the user, for example, when the user draws the handwriting on any writing device such as a handwriting board or a screen of the first terminal, assuming that the resolution of the writing device of the first terminal is a × b, the first terminal maps the handwriting drawn on the writing device of the first terminal by the user to a drawing board with a target resolution according to the ratio of a/m, and at this time, the handwriting on the drawing board of the first terminal is called interactive handwriting.
S102, rendering and displaying the interactive handwriting on the drawing board on a display screen by the first terminal.
The first terminal renders and displays the image on the drawing board with the target resolution on the display screen, namely the interactive handwriting on the drawing board is rendered and displayed on the display screen, and the purpose of displaying the handwriting drawn by the user is achieved.
S103, the first terminal takes the coordinates of the interactive handwriting on the drawing board as interactive handwriting information and sends the interactive handwriting information to the second terminal.
After the handwriting drawn by the user is mapped onto the drawing board with the local target resolution by the first terminal, the coordinate of the interactive handwriting obtained by mapping onto the drawing board can be determined according to the pixel coordinate of the drawing board. And the first terminal sends the coordinates of the interactive handwriting on the local drawing board to the second terminal as interactive handwriting information.
It can be understood that the first terminal may also send other information related to the interactive handwriting as the interactive handwriting information to the second terminal, so that the second terminal displays the interactive handwriting. For example, the information such as the pixel value and the line width of the interactive handwriting can be used as the interactive handwriting information and sent to the second terminal.
S104, the second terminal obtains the interactive handwriting information sent by the first terminal.
The interactive handwriting information at least carries coordinate information of the interactive handwriting.
And S105, drawing handwriting on a drawing board with local target resolution by the second terminal according to the interactive handwriting information to obtain the interactive handwriting.
After the second terminal receives the interactive handwriting information, the handwriting can be drawn on a drawing board with a local target resolution of the second terminal according to the coordinates of the interactive handwriting contained in the interactive handwriting information, and the drawn handwriting is the interactive handwriting.
It can be understood that the drawing board at the first terminal and the drawing board at the second terminal are both drawing boards with target resolution, that is, drawing boards with the same resolution. Therefore, after the first terminal sends the coordinates of the interactive handwriting on the local drawing board of the first terminal to the second terminal, when the second terminal draws the handwriting on the local drawing board of the second terminal according to the coordinates of the interactive handwriting, the drawn handwriting is the interactive handwriting. The processing process realizes that the handwriting on the virtual drawing board of the first terminal is displayed on the virtual drawing board of the second terminal in a ratio of 1: 1.
And S106, rendering and displaying the interactive handwriting on the drawing board on a display screen by the second terminal.
The second terminal renders and displays the image on the local drawing board on the display screen, namely the interactive handwriting on the drawing board is rendered and displayed on the display screen, and the purpose of displaying the handwriting drawn by the user is achieved.
In the implementation process of the scheme, in order to ensure that rendering and displaying effects of the first terminal and the second terminal on the handwriting on the drawing board of the first terminal and the handwriting on the drawing board of the second terminal are always guaranteed, the display screens of the first terminal and the second terminal are set to be display screens with the same length-width ratio. Meanwhile, setting the color value ranges of each pixel of the respective drawing boards of the first terminal and the second terminal to be consistent, for example, 0-255; setting the calculation accuracy of the first terminal and the second terminal all the time, for example, keeping a valid number, and processing the exceeding part in a rounding way; the first terminal and the second terminal are set to adopt a consistent edge pixel color value calculation method, which is specifically described later.
As an optional implementation manner, the first terminal may send coordinates of the handwriting drawn by the user to a drawing center, where the drawing center maps the user handwriting onto a drawing board with a target resolution to obtain an interactive handwriting; and then, the drawing center sends information such as coordinates, pixel values and the like of the interactive handwriting on the drawing board to the first terminal and the second terminal. And the first terminal and the second terminal draw the handwriting on the drawing board with local target resolution according to the received information such as the coordinate, the pixel value and the like of the interactive handwriting, and render and display the handwriting drawn on the drawing board.
The implementation mode reduces the workload of handwriting mapping and pixel value calculation of the first terminal and the second terminal. The drawing center may be any device or application program with handwriting mapping and drawing capabilities. The drawing center, the first terminal and the second terminal can be connected through a network.
The upper introduces an implementation scheme that the first terminal sends information of the handwriting drawn by the user to the second terminal for display, and similarly, by executing the scheme, the second terminal can also send the information of the handwriting drawn by the user to the first terminal, so that the first terminal can also display the handwriting drawn by the user at the second terminal, namely, the handwriting interoperation between the first terminal and the second terminal is realized. The handwriting interoperation process between the first terminal and the second terminal is shown in fig. 2.
According to the technical scheme, the first terminal maps the handwriting of the user to the drawing board with the target resolution, the handwriting on the drawing board is rendered and displayed, the coordinates of the handwriting on the drawing board are sent to the second terminal by the first terminal, the second terminal draws the handwriting on the drawing board with the local target resolution and renders and displays the handwriting according to the received coordinates of the handwriting, the display of the same handwriting on different terminals is achieved in the processing process, namely the handwriting drawn by the user on the first terminal is displayed on the first terminal and the second terminal at the same time, and the requirement for mutual operation of the handwriting of multiple users and multiple devices can be met.
Furthermore, because the drawing board at the first terminal and the drawing board at the second terminal are drawing boards with the same resolution, after the first terminal sends the coordinates of the handwriting on the drawing board to the second terminal, the second terminal draws the handwriting on the local drawing board according to the received handwriting coordinates, and the handwriting on the drawing board at the first terminal has the same resolution and the same size. When the handwriting is rendered and displayed at the first terminal and the second terminal respectively, the handwriting displayed at the first terminal and the second terminal can be the same handwriting. Therefore, the display of the handwriting drawn by the user at the first terminal is completely the same as the display at the second terminal, and the consistency of the handwriting display effect in the handwriting interoperation process is ensured.
Through the interaction process of the first terminal and the second terminal, the handwriting drawn by the user at the first terminal can be displayed at the first terminal and the second terminal at the same time, and the handwriting displayed at the first terminal and the second terminal can be ensured to be the same.
Based on the above-mentioned interaction technical solution, an embodiment of the present application provides a handwriting display processing method applied to a first terminal, that is, a handwriting display processing method using the first terminal as an execution subject, as shown in fig. 3, where the method includes:
s301, mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain the interactive handwriting.
The drawing board with the target resolution is a virtual drawing board which is arranged at the first terminal and the second terminal at the same time and has the same set resolution. That is, in the embodiment of the application, the first terminal and the second terminal are both provided with virtual drawing boards with the same resolution, and the virtual drawing boards are used for rasterizing coordinates of the handwriting drawn by the user to obtain the handwriting drawn by the user. Illustratively, the first terminal and the second terminal both set a virtual drawing board with a pixel resolution of m × n for rasterizing the handwriting drawn by the user.
When the first terminal acquires the handwriting drawn by the user, for example, when the user draws the handwriting on any writing device such as a handwriting board or a screen of the first terminal, assuming that the resolution of the writing device of the first terminal is a × b, the first terminal maps the handwriting drawn on the writing device of the first terminal by the user to a drawing board with a target resolution according to the ratio of a/m, and at this time, the handwriting on the drawing board of the first terminal is called interactive handwriting.
And S302, rendering and displaying the interactive handwriting on the drawing board on a display screen.
The first terminal renders and displays the image on the drawing board with the target resolution on the display screen, namely the interactive handwriting on the drawing board is rendered and displayed on the display screen, and the purpose of displaying the handwriting drawn by the user is achieved.
And S303, sending the coordinates of the interactive handwriting on the drawing board as interactive handwriting information to a second terminal so that the second terminal draws handwriting on the drawing board with local target resolution according to the interactive handwriting information and renders the interactive handwriting on the drawing board on a display screen.
After the handwriting drawn by the user is mapped onto the drawing board with the local target resolution by the first terminal, the coordinate of the interactive handwriting obtained by mapping onto the drawing board can be determined according to the pixel coordinate of the drawing board. And the first terminal sends the coordinates of the interactive handwriting on the local drawing board to the second terminal as interactive handwriting information.
Correspondingly, after the second terminal receives the coordinates of the interactive handwriting sent by the first terminal, the second terminal draws the handwriting on a drawing board with local target resolution according to the received coordinates of the interactive handwriting, and then the interactive handwriting is obtained. And the second terminal renders and displays the interactive handwriting drawn on the local drawing board.
Through the processing, after the obtained handwriting drawn by the user, the first terminal maps the handwriting drawn by the user to the drawing board with the target resolution to obtain the interactive handwriting. And the first terminal renders and displays the interactive handwriting on the drawing board, and sends the coordinates of the interactive handwriting on the drawing board to the second terminal, so that the second terminal draws the interactive handwriting on the drawing board with the local target resolution according to the received coordinates of the interactive handwriting, and renders and displays the interactive handwriting on the local drawing board.
Based on the handwriting mapping and the interactive handwriting coordinate sending processing of the first terminal, the second terminal can display the user handwriting the same as that of the first terminal, and therefore mutual operation of the handwriting of multiple persons and multiple devices is achieved. Meanwhile, the first terminal and the second terminal perform handwriting drawing at the same coordinate position on the drawing board with the same target resolution, so that the handwriting displayed by the first terminal and the second terminal is the completely same handwriting, and the unification of the display effects of the handwriting at the two ends is ensured.
As an exemplary implementation manner, the mapping, by the first terminal, the handwriting drawn by the user onto a drawing board with a target resolution to obtain an interactive handwriting specifically includes:
firstly, mapping coordinates of handwriting drawn by a user to a drawing board with a target resolution to obtain interactive handwriting coordinates.
Specifically, the first terminal performs mapping processing on the handwriting drawn by the user according to the ratio of the resolution of the drawing board for drawing the handwriting drawn by the user to the target resolution, so as to obtain an interactive handwriting coordinate.
The drawing board for drawing handwriting by the user includes, but is not limited to, a handwriting display screen of the first terminal, an electronic writing board of the first terminal, or any writing device connected to the first terminal.
For example, assuming that the resolution of the handwriting display screen of the first terminal is a × b and the target resolution is m × n, the user performs handwriting drawing on the handwriting display screen of the first terminal. When the first terminal obtains the handwriting drawn by the user on the handwriting display screen of the first terminal, the coordinates (X, Y) of the handwriting drawn by the user on the a-b handwriting display screen of the first terminal are mapped into the range of m-n according to the ratio of a/m, and interactive handwriting coordinates (U, V) are obtained.
And then, drawing handwriting at the interactive handwriting coordinate on the drawing board with the target resolution by the first terminal to obtain the interactive handwriting.
Specifically, after determining coordinates (U, V) of the handwriting drawn by the user on a drawing board with a target resolution, the first terminal draws the handwriting at the coordinates (U, V) on the drawing board to obtain the interactive handwriting.
As an optional implementation manner, the specific processing procedure of drawing the handwriting at the interactive handwriting coordinate on the drawing board with the target resolution by the first terminal to obtain the interactive handwriting includes the following steps SS 1-SS 3:
and SS1, determining the outline of the interactive handwriting on the drawing board with the target resolution according to the interactive handwriting coordinates.
For example, coordinates of handwriting written by a user are generally expressed in a computer by vertex coordinates of the handwriting written by the user. For example, assuming that the user draws a straight line as shown in fig. 4, the straight line can be represented by coordinates of four vertices of the straight line.
Based on the setting, when the first terminal acquires the interactive handwriting coordinates, adjacent coordinates in the interactive handwriting coordinates are connected on the drawing board with the target resolution, and the outline of the interactive handwriting can be obtained. As shown in fig. 4, the coordinates of the four vertices of the straight line drawn by the user are sequentially connected to obtain the contour of the straight line drawn by the user.
Optionally, the coordinates of the interactive handwriting may also be coordinates of each pixel included in the interactive handwriting. When the coordinates of the interactive handwriting are the coordinates of each pixel contained in the interactive handwriting, the first terminal obtains the minimum circumscribed graph of the coordinates of the interactive handwriting, and then the outline of the interactive handwriting can be obtained.
For example, assuming that the coordinates of the interactive handwriting shown in fig. 4 are represented by the coordinates of each pixel included in the interactive handwriting, the first terminal draws the minimum circumscribed figure including each pixel according to the coordinates of each pixel, and thus a rectangle is obtained, and the rectangle is the outline of the interactive handwriting.
And SS2, respectively calculating pixel values of all pixels at the edge of the interactive handwriting according to preset interactive handwriting display pixel values.
For example, the display pixel value of the interactive handwriting is a preset display pixel value of the user drawn handwriting, and the pixel value may be set by the user or by default by the first terminal.
In general, the pixel values of the pixels located inside the interactive handwriting are the same and are the above-mentioned interactive handwriting display pixel values, so that the display effect of the interactive handwriting conforms to the setting of the user or the first terminal.
As shown in fig. 4, when the outline of the interactive handwriting is determined on the drawing board with the target resolution according to the coordinates of the interactive handwriting, the edge of the interactive handwriting usually does not occupy a whole pixel completely, but generates a cutting effect on the pixel. The pixels located on the edge of the interactive handwriting are referred to as edge pixels of the interactive handwriting.
Because the edge pixels of the interactive handwriting are not all located inside the interactive handwriting, the pixel values of the edge pixels should not be directly set to the display pixel values of the interactive handwriting, so as to prevent the edge of the interactive handwriting from generating a sawtooth phenomenon.
Based on the above situation, in the embodiment of the present application, the pixel values of the pixels located at the edge of the interactive handwriting are separately calculated according to the interactive handwriting display pixel values.
As an alternative implementation, referring to fig. 5, for a pixel abcd located at an edge of the interactive handwriting, determining an inscribed circle of the pixel abcd, and determining a diameter of the inscribed circle, which is perpendicular to the edge of the interactive handwriting, as a target diameter, where the target diameter has a length DInner partThe center of the inscribed circle is o.
The portion (gray portion in the figure) of the inscribed circle whose target diameter is located inside the interactive handwriting is regarded as the covered portion, and it is assumed that the length of the covered portion of the target diameter in fig. 5 is xInner partThen, the length x of the covered portion according to the target diameter of the inscribed circleInner partLength D corresponding to the target diameter of the inscribed circleInner partThe ratio of the distance to the inscribed circle can be determined
Figure BDA0002524303860000111
The coverage ratio can also be used to represent the coverage ratio of the above-mentioned interactive handwriting to the pixel abcd.
Based on the coverage ratio
Figure BDA0002524303860000112
And the pixel value of the interactive handwriting display pixel value can be calculated to obtain the pixel value of the pixel abcd as follows:
Figure BDA0002524303860000113
wherein maxValue represents the pixel value of the interactive handwriting, CInner partA pixel value of the pixel abcd calculated based on the inscribed circle is shown.
Through the calculation process, the pixel value of the pixel abcd positioned at the edge of the interactive handwriting can be determined with less calculation amount.
Further, in order to calculate the pixel value of the edge pixel of the interactive handwriting more accurately, on the basis of the above calculation manner, as shown in fig. 6, while determining the inscribed circle of the pixel abcd, the circumscribed circle of the pixel abcd is also determined in the embodiment of the present application, and the diameter of the circumscribed circle perpendicular to the edge of the interactive handwriting is determined as the target diameter of the circumscribed circle. The length of the target diameter of the circumscribed circle is DOuter cover
The target diameter of the circumscribed circle is considered as the covered portion, and the length of the covered portion of the circumscribed circle target diameter in FIG. 6 is assumed to be xOuter coverThen, the length x of the covered portion according to the target diameter of the circumscribed circleOuter coverLength D corresponding to the target diameter of the circumscribed circleOuter coverThe ratio of the distance to the distance can be determined, and the coverage ratio of the interactive handwriting to the circumscribed circle can be determined
Figure BDA0002524303860000114
The coverage ratio can also be used to represent the coverage ratio of the above-mentioned interactive handwriting to the pixel abcd.
Based on the coverage ratio
Figure BDA0002524303860000121
And the pixel value of the interactive handwriting display pixel value can be calculated to obtain the pixel value of the pixel abcd as follows:
Figure BDA0002524303860000122
and calculating to obtain the pixel value of the pixel according to the coverage proportion of the interactive handwriting to the inscribed circle, the coverage proportion of the interactive handwriting to the circumscribed circle and the preset display pixel value of the interactive handwriting.
Exemplary, calculate CInner partAnd COuter coverAs the pixel value of the pixel abcd.
And SS3, setting the pixel value of each pixel at the edge of the interactive handwriting as the calculated pixel value, and setting the pixel value of each pixel inside the outline of the interactive handwriting as the preset interactive handwriting display pixel value to obtain the interactive handwriting.
Specifically, according to the processing in the step SS2, after the pixel value of each edge pixel of the interactive handwriting is determined, the pixel value of each pixel located at the edge of the interactive handwriting is set to the calculated pixel value, and the pixel value of each pixel located inside the outline of the interactive handwriting is set to the preset interactive handwriting display pixel value, so that the pixel value filling of the outline of the interactive handwriting can be realized, and the interactive handwriting can be obtained.
As another optional implementation manner, when acquiring handwriting information drawn by the user, the first terminal not only acquires coordinates of the handwriting drawn by the user, but also acquires a writing pressure value when the user draws the handwriting, that is, acquires a writing pressure value corresponding to each interactive handwriting coordinate.
The writing pressure-sensitive value is a pressure value applied to the writing instrument when the user writes on the writing instrument.
According to the conventional paper writing habit, when the writing strength of a user is high, the width of the written handwriting is larger; when the writing force of a user is small, the width of the written handwriting is smaller, so that the handwriting with different widths can be formed, and different calligraphy effects can be formed.
Similar to the paper writing effect, when the user draws handwriting on the writing device of the first terminal, the width of the drawn handwriting should be proportional to the pressure value applied when the user draws the handwriting.
In order to facilitate the determination of the width of the handwriting drawn by the user, when the first terminal collects the position coordinates of the handwriting drawn by the user, the first terminal also collects writing pressure values drawn by the user at each coordinate. And when the coordinates of the handwriting drawn by the user are mapped to the coordinates of the interactive handwriting on the drawing board with the target resolution, correspondingly matching the writing pressure values of the user at each coordinate of the drawn handwriting with the coordinates of the interactive handwriting. At this time, the first terminal obtains the writing pressure value corresponding to each interactive handwriting coordinate.
For example, in the embodiment of the application, the first terminal is configured to connect a specific writing board and a writing pen, when a user writes on the writing board by using the writing pen, the writing board may capture coordinates and a writing pressure value of each trace point, and then, the collected writing pressure value is normalized to be between (0, 1). The handwriting coordinates and the writing pressure sensing values corresponding to the handwriting coordinates are sent to the first terminal. And the first terminal executes subsequent mapping of the user drawn handwriting and processing of drawing the interactive handwriting on the drawing board with the target resolution.
On this basis, the drawing of the handwriting at the interactive handwriting coordinate on the drawing board with the target resolution to obtain the interactive handwriting comprises the following steps:
and drawing the handwriting on the drawing board with the target resolution according to the interactive handwriting coordinates and the writing pressure values corresponding to the interactive handwriting coordinates to obtain the interactive handwriting.
The width of the interactive handwriting at any interactive handwriting coordinate is in direct proportion to the writing pressure value corresponding to the interactive handwriting coordinate.
Specifically, referring to the processing procedure of drawing the interactive handwriting on the drawing board with the target resolution introduced in the embodiment of the present application, when the first terminal draws the interactive handwriting on the drawing board with the target resolution, the interactive handwriting coordinates and the writing pressure values corresponding to the interactive handwriting coordinates are combined and used together for drawing the handwriting on the drawing board, so as to obtain the interactive handwriting with the variable handwriting width and thickness.
For example, after acquiring coordinates of handwriting drawn by a user and a writing pressure value corresponding to each handwriting coordinate, the first terminal maps the handwriting drawn by the user onto a drawing board with a target resolution, so as to determine coordinates of the interactive handwriting on the drawing board. Then, the first terminal establishes a corresponding relation between the writing pressure value and the handwriting width, and if the handwriting width is 5 at most, the relation between the writing pressure value p and the handwriting width LineWidth is as follows: LineWidth ═ p × 5.
Assuming that coordinates of user drawn handwriting acquired by a first terminal are mapped on a drawing board with a target resolution, the determined interactive handwriting coordinates and the writing pressure sensing value corresponding to each interactive handwriting coordinate are expressed in a ternary data form as follows:
(12,29,1)(12,30,1)(12,31,1)(12,32,1)(12,33,1)(12,34,1)(12,35,1)(12,36,1)(12,37,1)(12,38,1)
(12,39,1)(12,40,1)(12,41,1)(12,42,1)(12,43,1)(12,44,1)(12,45,1)(12,46,1)(12,47,1)(12,48,0.8)
(12,49,0.8)(12,50,0.8)(12,51,0.8)(12,52,0.8)(12,53,0.8)(12,54,0.4)(12,55,0.4)(12,56,0.4)
(12,57,0.4)(12,58,0.4)(12,59,0.4)(12,60,0.4)(12,61,0.4)(12,62,0.2)(12,63,0.2)(12,64,0.2)
(12,65,0.2)(12,66,0.2)(12,67,0.2)(12,68,0.2)(12,69,0.2)
according to the coordinate and writing pressure value triplets and the predetermined relation between the writing pressure value p and the handwriting width LineWidth, the widths of the interactive handwriting from top to bottom can be determined to be 5,4,2 and 1 respectively.
Then, according to the above-mentioned interactive handwriting coordinates and the calculated and determined handwriting width data, the interactive handwriting drawn by the first terminal on the drawing board with the local target resolution is as shown in fig. 7.
Referring to fig. 7, it can be seen that, due to the different widths of the different handwriting segments of the same interactive handwriting, the problem of non-uniform lines on both sides of the interactive handwriting as shown in fig. 7 occurs. As shown in fig. 7, there are 1 "step" on the left side of the interactive handwriting and 3 "steps" on the right side of the interactive handwriting, and such display effect appears to the user as asymmetric, unsmooth handwriting, and poor visual perception.
In order to solve the problems, after the interactive handwriting with different handwriting widths is drawn by the first terminal, the drawn handwriting is further subjected to smoothing processing.
The smoothing process aims to make the interactive handwriting symmetrical about the central axis and smooth the handwriting on both sides.
Illustratively, the first terminal performs displacement processing on handwriting line segments with different widths in the drawn interactive handwriting, and performs pixel smoothing processing on the interactive handwriting after the displacement processing to obtain the interactive handwriting after the smoothing processing.
Specifically, the above-mentioned displacement processing is performed on the handwriting segments with different widths in the interactive handwriting, and the purpose is to align the center positions of the handwriting segments with different widths by displacing the handwriting segments with different widths.
The pixel smoothing processing on the interactive handwriting aims to enable the transition of the pixel value of each pixel of the interactive handwriting to be smoother, so that phenomena such as sawtooth and sudden change of the pixel value in the handwriting are eliminated.
As an optional implementation manner, the first terminal performs processing according to the following steps SS 20-SS 24, so as to implement displacement processing of handwriting line segments with different widths in the drawn interactive handwriting, and perform pixel smoothing processing on the interactive handwriting after the displacement processing, so as to obtain the smoothed interactive handwriting.
And SS20, enlarging the drawn interactive handwriting by N times to obtain the enlarged interactive handwriting.
Wherein N is a positive integer.
Specifically, in order to facilitate the displacement processing of different handwriting segments of the interactive handwriting, the first terminal expands the interactive handwriting, then performs the handwriting segment displacement processing on the expanded interactive handwriting, and finally reduces the displaced interactive handwriting to the original size.
The above expansion factor N is preferably an even number. In the embodiment of the application, the first terminal enlarges the drawn interactive handwriting by 2 times. At this time, the original interactive handwriting with the width of 5,4,2,1 from top to bottom is changed into the interactive handwriting with the width of 10,8,4,2 from top to bottom.
SS21, respectively determining the offset between each two adjacent handwriting segments with different widths in the enlarged interactive handwriting.
Wherein the offset is determined by the average value of the differences of the widths of the adjacent handwriting line segments with different widths.
Specifically, the first terminal calculates the offset of each two adjacent handwriting line segments with different widths.
The offset is specifically an offset of two side edges of a narrower handwriting line segment relative to two side edges of a wider handwriting line segment adjacent to the narrower handwriting line segment, and the offset can be expressed by a pixel number. The offset of the two side edges of the narrower handwriting line segment relative to the two side edges of the adjacent wider handwriting line segment is the same.
Illustratively, the first terminal takes the average value of the difference values of the widths of the adjacent two handwriting line segments with different widths as the offset between the two.
And SS22, respectively shifting every two adjacent handwriting line segments with different widths according to the offset between every two adjacent handwriting line segments with different widths, so as to align the center positions of the handwriting line segments with different widths.
Specifically, for every two adjacent handwriting line segments with different widths in the interactive handwriting, the first terminal performs the shifting process on the two adjacent handwriting line segments with different widths according to the offset between the two handwriting line segments determined by the calculation in step SS 21. The shift processing is performed to make the offsets of the two side edges of the two handwriting line segments the same. And when the offsets shifted to the two side edges of the two handwriting line segments are the same and are the offsets obtained by the calculation, finishing the shifting processing, and aligning the center positions of the two handwriting line segments at the moment.
It can be understood that the first terminal implements the shifting processing on the handwriting line segments with different widths in the drawn interactive handwriting through the processing of the above steps SS20 to SS22, so that the center positions of the handwriting line segments with different widths are aligned. The interactive handwriting after the above-mentioned shifting process is shown in fig. 8.
Because the interactive handwriting after the shift processing is still the enlarged interactive handwriting, the enlarged interactive handwriting should be restored to convert the enlarged interactive handwriting into an original size, and meanwhile, the pixel value of the enlarged interactive handwriting is smoothed.
As an exemplary implementation manner, the first terminal performs pixel smooth mapping processing on the pixels of the interactive handwriting after the shifting processing according to a preset pixel mapping function, maps the pixels into an original size, and implements pixel smoothing to obtain the interactive handwriting after the smoothing processing.
The specific steps of the pixel smoothing mapping process are shown as the following steps SS23 and SS 24:
and SS23, dividing the interactive handwriting after the shifting processing into N multiplied by N interactive handwriting areas.
And the first terminal divides the interactive handwriting after the shifting processing into N multiplied by N interactive handwriting areas. For example, assuming that the interactive handwriting before expansion is an image of 200 × 100, after expanding by N times, the interactive handwriting area is divided into N × N interactive handwriting areas, so that 200 × 100N × N interactive handwriting areas can be obtained.
And SS24, mapping the pixels in each NxN interactive handwriting area into one pixel according to a preset pixel mapping function, and obtaining the interactive handwriting after smoothing processing.
The pixel mapping function is a function for mapping a plurality of pixels into one pixel.
And the first terminal maps all pixels in each N multiplied by N interactive handwriting area into one pixel by operating a preset pixel mapping function. At this time, the enlarged interactive handwriting can be restored to the original size.
The pixel mapping process based on the pixel mapping function described above can map the pixel values of N × N pixels to the pixel value of one pixel. The process eliminates the condition that the pixel value of the adjacent pixels has step change for the pixels at the handwriting edge, thereby enabling the pixel value change of the pixels at the handwriting edge part to be smoother.
Meanwhile, based on the displacement processing of the handwriting segments with different widths, when the widths of the different handwriting segments in the interactive handwriting are changed, the difference change of the two sides of the handwriting is symmetrical. The displacement processing and the pixel mapping processing are combined, so that the interactive handwriting obtained by processing is smoother.
After the processing of the steps SS 20-SS 24, the finally obtained interactive handwriting is enlarged and shown in FIG. 9.
In the above processing procedure, the pixel mapping function can be flexibly set according to the requirement.
Illustratively, the embodiment of the present application takes the following matrix M as a pixel mapping function:
Figure BDA0002524303860000161
for the sake of calculation, the nxn interactive writing area is expressed in a matrix form as follows:
Figure BDA0002524303860000171
and calculating the inner product of the Image and the matrix M, and mapping the N multiplied by N interactive handwriting area into one pixel. In the above process, calculating the inner product of the matrix M and the Image is equivalent to calculating the average value of all pixels in the nxn interactive handwriting area.
Further, when the above N is greater than 3, and is usually set in an nxn interactive writing area, the pixel at the center has a greater influence on the pixel value of the mapped pixel, and the pixel at the edge has a smaller influence on the pixel value of the mapped pixel, then the matrix M may be set using a gaussian function as the pixel mapping function, where each element of the matrix M takes a value (taking the center of the nxn interactive writing area as a (0,0) point):
Figure BDA0002524303860000172
wherein, the larger the σ is, the closer the influence of the pixel at the central position and the pixel at the edge position on the pixel value of the mapped pixel is; the smaller σ is, the larger difference in influence between the pixel at the center position and the pixel at the edge position on the pixel value of the mapped pixel is. Sigma can be flexibly set according to experience, and can be generally set as:
Figure BDA0002524303860000173
wherein N is a multiple of expanding the interactive handwriting.
The value of each element in the matrix M may be used to represent the weight of the influence of the pixel value of the pixel at the corresponding position in the nxn interactive writing area on the pixel value of the mapped pixel. According to the calculation method of the matrix M described in the embodiment of the present application, the influence weight of the pixels within a range from one σ from the center of the nxn interactive writing area on the pixel values of the mapped pixels reaches more than 60%, while the influence weight of the pixels within a range from 1 σ to 2 σ from the center of the nxn interactive writing area on the pixel values of the mapped pixels is only a dozen percent, and the influence weight of the pixels in the outer layer on the pixel values of the mapped pixels is smaller.
By using the matrix M, the weight of the pixel at each position in the NxN interactive handwriting area can be respectively determined, and the pixels in the NxN interactive handwriting area are subjected to weighted summation based on the determined weight, so that the NxN interactive handwriting area can be mapped into one pixel.
In practical implementation of the technical scheme of the embodiment of the application, the matrix M can be flexibly constructed to serve as a pixel mapping function, and the pixel mapping processing is performed on the interactive handwriting area. In general, when the matrix M generated by the gaussian-like function is used as the pixel mapping function, the interactive handwriting obtained by pixel mapping each interactive handwriting area of the interactive handwriting is smoother, so that the matrix M generated by the gaussian-like function can be preferentially selected.
As another optional implementation manner, the embodiment of the application further provides that when the first terminal obtains the writing pressure values corresponding to each interactive handwriting coordinate of the interactive handwriting on the local drawing board and determines the pixel values of each pixel of the interactive handwriting on the local drawing board, the writing pressure values corresponding to each interactive handwriting coordinate and/or the pixel values of each pixel of the interactive handwriting on the local drawing board and the interactive handwriting coordinate may be jointly used as interactive handwriting information and sent to the second terminal.
The pixel value of each pixel of the interactive handwriting on the local drawing board at the first terminal may be a pixel value of an interactive note drawn on the local drawing board at the first terminal, or may be a pixel value of each pixel of the interactive handwriting after the interactive handwriting is drawn on the local drawing board at the first terminal and the smoothing processing described in the above embodiment is performed on the drawn interactive handwriting.
When the first terminal sends the interactive handwriting coordinates to the second terminal, if the writing pressure values corresponding to the interactive handwriting coordinates are sent to the second terminal, the second terminal can draw the interactive handwriting with flexibly-changed handwriting width according to the interactive handwriting coordinates and the writing pressure values corresponding to the interactive handwriting coordinates by referring to the introduction of the embodiment of the application, and the second terminal can also perform smoothing processing on the interactive handwriting.
Further, if the first terminal directly sends the pixel value of the interactive handwriting or the pixel value of the interactive handwriting after the smoothing processing to the second terminal, the second terminal does not need to calculate the pixel value of the interactive handwriting again or carry out the pixel smoothing processing on the interactive handwriting, but can directly display the interactive handwriting meeting the pixel value requirement or display the interactive handwriting after the smoothing processing according to the received pixel value of the interactive handwriting so as to save the workload of the second terminal.
Based on the technical scheme of interaction between the first terminal and the second terminal shown in fig. 1, an embodiment of the present application further provides a handwriting display processing method applied to the second terminal, that is, a handwriting display processing method using the second terminal as an execution subject, as shown in fig. 10, where the method includes:
s1001, obtaining interactive handwriting information sent by a first terminal, wherein the interactive handwriting information comprises interactive handwriting coordinates, and the interactive handwriting coordinates are coordinates of the interactive handwriting obtained by mapping handwriting drawn by a user on a drawing board with a target resolution ratio by the first terminal, and the interactive handwriting is used for rendering and displaying at the first terminal.
Specifically, referring to the handwriting display processing method applied to the first terminal shown in fig. 3, after the first terminal obtains the handwriting drawn by the user, the handwriting is mapped onto the drawing board with the target resolution to obtain the interactive handwriting, and the interactive handwriting on the drawing board is rendered and displayed on the display screen. Meanwhile, the first terminal sends the coordinates of the interactive handwriting on the local drawing board of the first terminal to the second terminal as interactive handwriting information.
And S1002, drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain the interactive handwriting.
Specifically, after receiving the interactive handwriting information sent by the first terminal, the second terminal draws handwriting on a drawing board with a local target resolution of the second terminal according to the interactive handwriting coordinates contained in the interactive handwriting information, so as to obtain the interactive handwriting.
The implementation process of drawing the interactive handwriting on the drawing board with the local target resolution by the second terminal according to the interactive handwriting coordinate is the same as the process of drawing the interactive handwriting on the drawing board with the local target resolution by the first terminal according to the interactive handwriting coordinate determined by mapping in the embodiment described above, and therefore the implementation can be described and executed with reference to the embodiment described above.
And S1003, rendering and displaying the interactive handwriting on the drawing board on a display screen.
The second terminal renders and displays the image on the drawing board with the target resolution on the display screen, namely the interactive handwriting on the drawing board is rendered and displayed on the display screen, and the purpose of displaying the handwriting drawn by the user is achieved.
Through the processing, after the obtained handwriting drawn by the user, the first terminal maps the handwriting drawn by the user to the drawing board with the target resolution to obtain the interactive handwriting. And the first terminal renders and displays the interactive handwriting on the drawing board, and sends the coordinates of the interactive handwriting on the drawing board to the second terminal, so that the second terminal draws the interactive handwriting on the drawing board with the local target resolution according to the received coordinates of the interactive handwriting, and renders and displays the interactive handwriting on the local drawing board.
Based on the handwriting mapping and the interactive handwriting coordinate sending processing of the first terminal, the second terminal can display the user handwriting the same as that of the first terminal, and therefore mutual operation of the handwriting of multiple persons and multiple devices is achieved. Meanwhile, the first terminal and the second terminal perform handwriting drawing at the same coordinate position on the drawing board with the same target resolution, so that the handwriting displayed by the first terminal and the second terminal is the completely same handwriting, and the unification of the display effects of the handwriting at the two ends is ensured.
Illustratively, the second terminal draws handwriting on a drawing board with a local target resolution according to the interactive handwriting information to obtain a specific processing procedure of the interactive handwriting, including:
firstly, determining the outline of the interactive handwriting on a drawing board with a local target resolution according to the interactive handwriting coordinates in the interactive handwriting information;
then, according to preset interactive handwriting display pixel values, respectively calculating to obtain pixel values of all pixels positioned at the edge of the interactive handwriting;
and finally, setting the pixel value of each pixel at the edge of the interactive handwriting as the calculated pixel value, and setting the pixel value of each pixel inside the outline of the interactive handwriting as the preset interactive handwriting display pixel value to obtain the interactive handwriting.
Specifically, the process of drawing the interactive handwriting on the drawing board by the second terminal according to the interactive handwriting coordinate in the interactive handwriting information is the same as the process of drawing the interactive handwriting on the drawing board by the first terminal according to the interactive handwriting coordinate determined by mapping, which is described in the above embodiment. Therefore, the process of drawing the interactive handwriting by the second terminal according to the interactive handwriting information can be referred to the description of the above embodiment, and is not repeated here.
Optionally, the interactive handwriting information acquired by the second terminal may further include a pixel value corresponding to each interactive handwriting coordinate.
The pixel value corresponding to each interactive handwriting coordinate is the pixel value of each pixel of the determined interactive handwriting when the first terminal draws the interactive handwriting on the local drawing board.
The pixel value may be a pixel value of the interactive handwriting without smoothing, or a pixel value of the interactive handwriting after smoothing.
For the determination of the pixel value corresponding to each interactive writing, reference may be made to the description of the processing procedure of the first terminal drawing the interactive writing on its local drawing board described in the above embodiments, and this is not repeated here.
When the interactive handwriting information received by the second terminal comprises interactive handwriting coordinates and pixel values corresponding to the interactive handwriting coordinates, the second terminal sets the pixel value of the pixel at each interactive handwriting coordinate on the drawing board with the local target resolution as the pixel value corresponding to the interactive handwriting coordinate, and then the interactive handwriting can be obtained, namely the interactive handwriting is drawn on the drawing board with the local target resolution.
The processing process omits the processing of calculating the pixel value of the interactive handwriting by the second terminal, and the second terminal can directly display the interactive handwriting which accords with the pixel setting or display the interactive handwriting which is subjected to smoothing processing under the condition of small processing amount.
Optionally, the interactive handwriting information received by the second terminal may further include a writing pressure value corresponding to the interactive handwriting coordinate, where the writing pressure value is a pressure value sensed at each handwriting coordinate when the first terminal collects the user handwriting drawing information.
And after the first terminal acquires the writing pressure sensing value corresponding to each interactive handwriting coordinate, the writing pressure sensing value corresponding to each interactive handwriting coordinate and each interactive handwriting coordinate are used as interactive handwriting information and sent to the second terminal.
The second terminal draws handwriting on a drawing board with local target resolution according to the received interactive handwriting information to obtain the interactive handwriting, and the method specifically comprises the following steps:
firstly, drawing handwriting on a drawing board with local target resolution according to interactive handwriting coordinates in the interactive handwriting information and a writing pressure value corresponding to the interactive handwriting coordinates to obtain interactive handwriting; wherein, the width of the interactive handwriting at any interactive handwriting coordinate is in direct proportion to the writing pressure value corresponding to the interactive handwriting coordinate;
and then, smoothing the drawn interactive handwriting.
Specifically, the specific processing procedures of drawing the interactive handwriting on the local drawing board of the second terminal and smoothing the interactive handwriting are the same as the specific processing procedures of drawing the interactive handwriting on the local drawing board of the first terminal and smoothing the interactive handwriting of the first terminal, so that the handwriting drawing procedure of the first terminal in the above embodiment can be referred to according to the received interactive handwriting information, and the specific processing procedures are not repeated here.
The embodiment of the present application further provides a handwriting interoperation system, where the system includes:
a first terminal and a second terminal communicating with each other;
the first terminal is used for mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain interactive handwriting; rendering and displaying the interactive handwriting on the drawing board on a display screen; sending the coordinates of the interactive handwriting on the drawing board as interactive handwriting information to a second terminal;
the second terminal is used for acquiring the interactive handwriting information sent by the first terminal; drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting; rendering and displaying the interactive handwriting on the drawing board on a display screen.
Specifically, please refer to the contents of the above method embodiments for the specific working contents of the first terminal and the second terminal in the handwriting interoperation system, which is not repeated here.
It should be noted that, in the embodiment of the present application, only the first terminal and the second terminal in the handwriting interoperation system are taken as an example, and a processing procedure of performing handwriting interoperation between different terminals in the system is described. When the system includes more terminals, the handwriting interoperation process between the terminals can be realized by referring to the description of the above embodiments, and the embodiments of the present application are not described in detail.
In the handwriting interoperation system, after the obtained handwriting drawn by the user, the first terminal maps the handwriting drawn by the user to the drawing board with the target resolution to obtain the interactive handwriting. And the first terminal renders and displays the interactive handwriting on the drawing board, and sends the coordinates of the interactive handwriting on the drawing board to a second terminal in the system, so that the second terminal draws the interactive handwriting on the drawing board with the local target resolution according to the received coordinates of the interactive handwriting, and renders and displays the interactive handwriting on the local drawing board.
Based on the handwriting mapping and the interactive handwriting coordinate sending processing of the first terminal, the second terminal can display the user handwriting the same as that of the first terminal, and therefore mutual operation of the handwriting of multiple persons and multiple devices is achieved. Meanwhile, the first terminal and the second terminal perform handwriting drawing at the same coordinate position on the drawing board with the same target resolution, so that the handwriting displayed by the first terminal and the second terminal is the completely same handwriting, and the unification of the display effects of the handwriting at the two ends is ensured.
Corresponding to the handwriting display processing method applied to the first terminal, the embodiment of the application also provides a handwriting display processing device, and the device can be applied to the first terminal. Referring to fig. 11, the apparatus includes:
the first handwriting drawing unit 100 is configured to map the handwriting drawn by the user onto a drawing board with a target resolution to obtain an interactive handwriting;
a first handwriting display unit 110, configured to render and display interactive handwriting on the drawing board on a display screen;
and the data sending unit 120 is configured to send the coordinates of the interactive handwriting on the drawing board to a second terminal as interactive handwriting information, so that the second terminal draws the handwriting on the drawing board with the local target resolution according to the interactive handwriting information, and renders the interactive handwriting on the drawing board on a display screen.
The first terminal maps the user handwriting to the drawing board with the target resolution ratio by applying the handwriting display processing device, the handwriting on the drawing board is rendered and displayed, the coordinates of the handwriting on the drawing board are sent to the second terminal by the first terminal, the second terminal draws the handwriting on the drawing board with the local target resolution ratio and renders and displays the handwriting according to the received handwriting coordinates, the display of the same handwriting on different terminals is realized in the processing process, namely, the handwriting drawn by the user at the first terminal is displayed on the first terminal and the second terminal at the same time, and the requirement of mutual operation of the handwriting of multiple persons and multiple devices can be met.
Furthermore, because the drawing board at the first terminal and the drawing board at the second terminal are drawing boards with the same resolution, after the first terminal sends the coordinates of the handwriting on the drawing board to the second terminal, the second terminal draws the handwriting on the local drawing board according to the received handwriting coordinates, and the handwriting on the drawing board at the first terminal has the same resolution and the same size. When the handwriting is rendered and displayed at the first terminal and the second terminal respectively, the handwriting displayed at the first terminal and the second terminal can be the same handwriting. Therefore, the display of the handwriting drawn by the user at the first terminal is completely the same as the display at the second terminal, and the consistency of the handwriting display effect in the handwriting interoperation process is ensured.
Optionally, the mapping the handwriting drawn by the user onto the drawing board with the target resolution to obtain the interactive handwriting includes:
mapping coordinates of handwriting drawn by a user to a drawing board with a target resolution to obtain interactive handwriting coordinates;
and drawing handwriting at the interactive handwriting coordinate on the drawing board with the target resolution to obtain the interactive handwriting.
Optionally, the drawing the handwriting at the interactive handwriting coordinate on the drawing board with the target resolution to obtain the interactive handwriting, including:
determining the outline of the interactive handwriting on the drawing board with the target resolution according to the interactive handwriting coordinate;
respectively calculating pixel values of all pixels positioned at the edge of the interactive handwriting according to preset interactive handwriting display pixel values;
setting the pixel value of each pixel at the edge of the interactive handwriting as the calculated pixel value, and setting the pixel value of each pixel inside the outline of the interactive handwriting as the preset interactive handwriting display pixel value to obtain the interactive handwriting.
Optionally, the calculating, according to a preset interactive handwriting display pixel value, a pixel value of each pixel located at an edge of the interactive handwriting, respectively, includes:
determining an inscribed circle of pixels located at the edge of the interactive handwriting, and determining a target diameter of the inscribed circle; wherein the target diameter of the inscribed circle is a diameter perpendicular to the edge of the interactive handwriting;
determining the coverage proportion of the interactive handwriting to the inscribed circle according to the ratio of the length of the covered part of the target diameter of the inscribed circle to the length of the target diameter of the inscribed circle; wherein the covered part of the target diameter of the inscribed circle is the part of the target diameter of the inscribed circle, which is positioned inside the outline of the interactive handwriting;
and calculating to obtain the pixel value of the pixel at least according to the coverage proportion of the interactive handwriting to the inscribed circle and the preset display pixel value of the interactive handwriting.
Optionally, the method further includes, according to a preset interactive handwriting display pixel value, respectively calculating pixel values of pixels located at an edge of the interactive handwriting, and further including:
determining a circumscribed circle of pixels at the edge of the interactive handwriting, and determining a target diameter of the circumscribed circle; wherein the target diameter of the circumscribed circle is a diameter perpendicular to the edge of the interactive handwriting;
determining the coverage proportion of the interactive handwriting to the circumscribed circle according to the ratio of the length of the covered part of the target diameter of the circumscribed circle to the length of the target diameter of the circumscribed circle; wherein the covered part of the target diameter of the circumscribed circle is the part of the target diameter of the circumscribed circle, which is located inside the outline of the interactive handwriting;
then, the calculating to obtain the pixel value of the pixel at least according to the coverage ratio of the interactive handwriting to the inscribed circle and the preset display pixel value of the interactive handwriting comprises:
and calculating to obtain the pixel value of the pixel according to the coverage proportion of the interactive handwriting to the inscribed circle, the coverage proportion of the interactive handwriting to the circumscribed circle and the preset display pixel value of the interactive handwriting.
Optionally, the apparatus further comprises:
the pressure sensing unit is used for acquiring writing pressure sensing values corresponding to the interactive handwriting coordinates;
drawing handwriting at the interactive handwriting coordinate on the drawing board with the target resolution to obtain interactive handwriting, wherein the interactive handwriting drawing method comprises the following steps:
drawing handwriting on the drawing board with the target resolution according to the interactive handwriting coordinates and the writing pressure values corresponding to the interactive handwriting coordinates to obtain interactive handwriting; wherein, the width of the interactive handwriting at any interactive handwriting coordinate is in direct proportion to the writing pressure value corresponding to the interactive handwriting coordinate;
and smoothing the drawn interactive handwriting.
Optionally, the smoothing of the drawn interactive handwriting includes:
and shifting the handwriting line segments with different widths in the drawn interactive handwriting, and performing pixel smoothing on the interactive handwriting after shifting to obtain the smoothed interactive handwriting.
Optionally, the method includes the steps of performing shift processing on handwriting line segments with different widths in the drawn interactive handwriting, and performing pixel smoothing processing on the interactive handwriting after the shift processing to obtain the interactive handwriting after the smoothing processing, including:
performing displacement processing on the handwriting line segments with different widths in the drawn interactive handwriting so as to align the center positions of the handwriting line segments with different widths;
and according to a preset pixel mapping function, carrying out pixel smooth mapping processing on the pixels of the interactive handwriting after the shifting processing to obtain the interactive handwriting after the smoothing processing.
Optionally, the shifting processing is performed on the handwriting line segments with different widths in the drawn interactive handwriting, so that the center positions of the handwriting line segments with different widths are aligned, including:
enlarging the drawn interactive handwriting by N times to obtain enlarged interactive handwriting; wherein N is a positive integer;
respectively determining the offset between every two adjacent handwriting line segments with different widths in the expanded interactive handwriting; wherein the offset is determined by the average value of the difference values of the widths of the adjacent handwriting line segments with different widths;
and respectively shifting every two adjacent handwriting line segments with different widths according to the offset between every two adjacent handwriting line segments with different widths, so that the center positions of the handwriting line segments with different widths are aligned.
Optionally, according to a preset pixel mapping function, performing pixel smooth mapping processing on the pixels of the interactive handwriting after the shifting processing to obtain the interactive handwriting after the smoothing processing, including:
dividing the interactive handwriting after the shifting into N multiplied by N interactive handwriting areas;
and mapping the pixels in each NxN interactive handwriting area into one pixel according to a preset pixel mapping function to obtain the interactive handwriting after smoothing treatment.
Optionally, the data sending unit is further configured to:
and sending the writing pressure values corresponding to the interactive handwriting coordinates of the interactive handwriting on the drawing board and/or the pixel values of the pixels of the interactive handwriting on the drawing board to the second terminal as interactive handwriting information.
Specifically, please refer to the content of the method embodiment for the specific working content of each unit of the handwriting display processing apparatus, which is not described herein again.
Corresponding to the handwriting display processing method applied to the second terminal, the embodiment of the application also provides another handwriting display processing device, and the device can be applied to the second terminal. Referring to fig. 12, the apparatus includes:
the data receiving unit 001 is used for acquiring interactive handwriting information sent by a first terminal, wherein the interactive handwriting information comprises interactive handwriting coordinates, the interactive handwriting coordinates are coordinates of the interactive handwriting obtained by the first terminal by mapping handwriting drawn by a user to a drawing board with a target resolution, and the interactive handwriting is used for rendering and displaying at the first terminal;
the second handwriting drawing unit 002 is used for drawing handwriting on a drawing board with a local target resolution according to the interactive handwriting information to obtain interactive handwriting;
and the second handwriting display unit 003 is used for rendering and displaying the interactive handwriting on the drawing board on the display screen.
And after the acquired handwriting drawn by the user, the first terminal maps the handwriting drawn by the user to a drawing board with a target resolution to obtain the interactive handwriting. And the first terminal renders and displays the interactive handwriting on the drawing board, and sends the coordinates of the interactive handwriting on the drawing board to the second terminal. And the second terminal draws the interactive handwriting on the drawing board with the local target resolution according to the received coordinates of the interactive handwriting by applying the handwriting display processing device, and renders and displays the interactive handwriting on the local drawing board.
Based on the handwriting mapping and the interactive handwriting coordinate sending processing of the first terminal, the second terminal can display the user handwriting the same as that of the first terminal, and therefore mutual operation of the handwriting of multiple persons and multiple devices is achieved. Meanwhile, the first terminal and the second terminal perform handwriting drawing at the same coordinate position on the drawing board with the same target resolution, so that the handwriting displayed by the first terminal and the second terminal is the completely same handwriting, and the unification of the display effects of the handwriting at the two ends is ensured.
Optionally, the drawing handwriting on a drawing board with a local target resolution according to the interactive handwriting information to obtain the interactive handwriting includes:
determining the outline of the interactive handwriting on a drawing board with a local target resolution according to the interactive handwriting coordinates in the interactive handwriting information;
respectively calculating pixel values of all pixels positioned at the edge of the interactive handwriting according to preset interactive handwriting display pixel values;
setting the pixel value of each pixel at the edge of the interactive handwriting as the calculated pixel value, and setting the pixel value of each pixel inside the outline of the interactive handwriting as the preset interactive handwriting display pixel value to obtain the interactive handwriting.
Optionally, the interactive handwriting information further includes a pixel value corresponding to each interactive handwriting coordinate; the pixel value corresponding to each interactive handwriting coordinate is determined by the first terminal when the interactive handwriting is drawn;
drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting, wherein the interactive handwriting drawing method comprises the following steps:
and setting the pixel value of the pixel at each interactive handwriting coordinate on the drawing board with the local target resolution as the pixel value corresponding to the interactive handwriting coordinate to obtain the interactive handwriting.
Optionally, the interactive handwriting information further includes a writing pressure value corresponding to the interactive handwriting coordinate;
drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting, wherein the interactive handwriting drawing method comprises the following steps:
drawing handwriting on a drawing board with local target resolution according to the interactive handwriting coordinates in the interactive handwriting information and the writing pressure values corresponding to the interactive handwriting coordinates to obtain the interactive handwriting; wherein, the width of the interactive handwriting at any interactive handwriting coordinate is in direct proportion to the writing pressure value corresponding to the interactive handwriting coordinate;
and smoothing the drawn interactive handwriting.
Specifically, the specific working contents of each unit of the handwriting display processing apparatus applied to the second terminal are the same as the specific working contents of the corresponding unit of the handwriting display processing apparatus applied to the first terminal, and the specific contents thereof can be referred to the contents of the above method embodiments, and are not repeated here.
Another embodiment of the present application further discloses a data sharing device, as shown in fig. 13, 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 display processing 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.
Communication interface 220 may include any device that uses any transceiver or the like to communicate with other devices or communication networks, such as an ethernet network, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.
The processor 2102 executes programs stored in the memory 200 and invokes other devices, which can be used to implement the steps of the handwriting display processing method provided by the embodiments of the present application.
Another embodiment of the present application further provides a storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program implements the steps of the handwriting display processing method provided in any of the above embodiments.
The specific working contents of the parts of the handwriting display processing device and the specific processing contents of the program in the storage medium when executed by the processor can be referred to the contents of the above method embodiments, and are not 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 (17)

1. A handwriting display processing method, comprising:
mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain interactive handwriting;
rendering and displaying the interactive handwriting on the drawing board on a display screen;
sending the coordinates of the interactive handwriting on the drawing board as interactive handwriting information to a second terminal so that the second terminal draws handwriting on the drawing board with local target resolution according to the interactive handwriting information and renders the interactive handwriting on the drawing board on a display screen;
and the target resolution of the drawing board for mapping the handwriting drawn by the user is the same as the target resolution of the drawing board with the local target resolution.
2. The method of claim 1, wherein the mapping the handwriting drawn by the user onto a drawing board with a target resolution to obtain an interactive handwriting comprises:
mapping coordinates of handwriting drawn by a user to a drawing board with a target resolution to obtain interactive handwriting coordinates;
determining the outline of the interactive handwriting on the drawing board with the target resolution according to the interactive handwriting coordinate;
respectively calculating pixel values of all pixels positioned at the edge of the interactive handwriting according to preset interactive handwriting display pixel values;
setting the pixel value of each pixel at the edge of the interactive handwriting as the calculated pixel value, and setting the pixel value of each pixel inside the outline of the interactive handwriting as the preset interactive handwriting display pixel value to obtain the interactive handwriting.
3. The method as claimed in claim 2, wherein the calculating the pixel value of each pixel at the edge of the interactive handwriting according to the preset interactive handwriting display pixel value comprises:
determining an inscribed circle of pixels located at the edge of the interactive handwriting, and determining a target diameter of the inscribed circle; wherein the target diameter of the inscribed circle is a diameter perpendicular to the edge of the interactive handwriting;
determining the coverage proportion of the interactive handwriting to the inscribed circle according to the ratio of the length of the covered part of the target diameter of the inscribed circle to the length of the target diameter of the inscribed circle; wherein the covered part of the target diameter of the inscribed circle is the part of the target diameter of the inscribed circle, which is positioned inside the outline of the interactive handwriting;
and calculating to obtain the pixel value of the pixel at least according to the coverage proportion of the interactive handwriting to the inscribed circle and the preset display pixel value of the interactive handwriting.
4. The method as claimed in claim 3, wherein the pixel values of the pixels at the edge of the interactive handwriting are respectively calculated according to the preset interactive handwriting display pixel values, further comprising:
determining a circumscribed circle of pixels at the edge of the interactive handwriting, and determining a target diameter of the circumscribed circle; wherein the target diameter of the circumscribed circle is a diameter perpendicular to the edge of the interactive handwriting;
determining the coverage proportion of the interactive handwriting to the circumscribed circle according to the ratio of the length of the covered part of the target diameter of the circumscribed circle to the length of the target diameter of the circumscribed circle; wherein the covered part of the target diameter of the circumscribed circle is the part of the target diameter of the circumscribed circle, which is located inside the outline of the interactive handwriting;
then, the calculating to obtain the pixel value of the pixel at least according to the coverage ratio of the interactive handwriting to the inscribed circle and the preset display pixel value of the interactive handwriting comprises:
and calculating to obtain the pixel value of the pixel according to the coverage proportion of the interactive handwriting to the inscribed circle, the coverage proportion of the interactive handwriting to the circumscribed circle and the preset display pixel value of the interactive handwriting.
5. The method of claim 2, further comprising:
acquiring writing pressure values corresponding to the interactive handwriting coordinates;
drawing handwriting at the interactive handwriting coordinate on the drawing board with the target resolution to obtain interactive handwriting, wherein the interactive handwriting drawing method comprises the following steps:
drawing handwriting on the drawing board with the target resolution according to the interactive handwriting coordinates and the writing pressure values corresponding to the interactive handwriting coordinates to obtain interactive handwriting; wherein, the width of the interactive handwriting at any interactive handwriting coordinate is in direct proportion to the writing pressure value corresponding to the interactive handwriting coordinate;
and smoothing the drawn interactive handwriting.
6. The method according to claim 5, wherein the smoothing of the drawn interactive handwriting comprises:
performing displacement processing on the handwriting line segments with different widths in the drawn interactive handwriting so as to align the center positions of the handwriting line segments with different widths;
and according to a preset pixel mapping function, carrying out pixel smooth mapping processing on the pixels of the interactive handwriting after the shifting processing to obtain the interactive handwriting after the smoothing processing.
7. The method according to claim 6, wherein the shifting the handwriting line segments of different widths in the drawn interactive handwriting to align the center positions of the handwriting line segments of different widths comprises:
enlarging the drawn interactive handwriting by N times to obtain enlarged interactive handwriting; wherein N is a positive integer;
respectively determining the offset between every two adjacent handwriting line segments with different widths in the expanded interactive handwriting; wherein the offset is determined by the average value of the difference values of the widths of the adjacent handwriting line segments with different widths;
and respectively shifting every two adjacent handwriting line segments with different widths according to the offset between every two adjacent handwriting line segments with different widths, so that the center positions of the handwriting line segments with different widths are aligned.
8. The method of claim 1, further comprising:
and sending the writing pressure values corresponding to the interactive handwriting coordinates of the interactive handwriting on the drawing board and/or the pixel values of the pixels of the interactive handwriting on the drawing board to the second terminal as interactive handwriting information.
9. A handwriting display processing method, comprising:
acquiring interactive handwriting information sent by a first terminal, wherein the interactive handwriting information comprises interactive handwriting coordinates, and the interactive handwriting coordinates are coordinates of the interactive handwriting obtained by mapping handwriting drawn by a user on a drawing board with a target resolution by the first terminal, and the interactive handwriting is used for rendering and displaying at the first terminal;
drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting;
rendering the interactive handwriting on the drawing board displaying the local target resolution on a display screen;
and the target resolution of the drawing board for mapping the handwriting drawn by the user is the same as the target resolution of the drawing board with the local target resolution.
10. The method as claimed in claim 9, wherein the drawing handwriting on a drawing board with a local target resolution according to the interactive handwriting information to obtain an interactive handwriting comprises:
determining the outline of the interactive handwriting on a drawing board with a local target resolution according to the interactive handwriting coordinates in the interactive handwriting information;
respectively calculating pixel values of all pixels positioned at the edge of the interactive handwriting according to preset interactive handwriting display pixel values;
setting the pixel value of each pixel at the edge of the interactive handwriting as the calculated pixel value, and setting the pixel value of each pixel inside the outline of the interactive handwriting as the preset interactive handwriting display pixel value to obtain the interactive handwriting.
11. The method according to claim 9, wherein the interactive script information further comprises pixel values corresponding to each interactive script coordinate; the pixel value corresponding to each interactive handwriting coordinate is determined by the first terminal when the interactive handwriting is drawn;
drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting, wherein the interactive handwriting drawing method comprises the following steps:
and setting the pixel value of the pixel at each interactive handwriting coordinate on the drawing board with the local target resolution as the pixel value corresponding to the interactive handwriting coordinate to obtain the interactive handwriting.
12. The method according to claim 9, wherein the interactive script information further comprises written pressure-sensitive values corresponding to interactive script coordinates;
drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting, wherein the interactive handwriting drawing method comprises the following steps:
drawing handwriting on a drawing board with local target resolution according to the interactive handwriting coordinates in the interactive handwriting information and the writing pressure values corresponding to the interactive handwriting coordinates to obtain the interactive handwriting; wherein, the width of the interactive handwriting at any interactive handwriting coordinate is in direct proportion to the writing pressure value corresponding to the interactive handwriting coordinate;
and smoothing the drawn interactive handwriting.
13. A handwriting interoperation system, comprising:
a first terminal and a second terminal communicating with each other;
the first terminal is used for mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain interactive handwriting; rendering and displaying the interactive handwriting on the drawing board on a display screen; sending the coordinates of the interactive handwriting on the drawing board as interactive handwriting information to a second terminal;
the second terminal is used for acquiring the interactive handwriting information sent by the first terminal; drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting; rendering the interactive handwriting on the drawing board displaying the local target resolution on a display screen;
and the target resolution of the drawing board for mapping the handwriting drawn by the user is the same as the target resolution of the drawing board with the local target resolution.
14. A handwriting display processing apparatus, comprising:
the first handwriting drawing unit is used for mapping the handwriting drawn by the user to a drawing board with a target resolution to obtain interactive handwriting;
the first handwriting display unit is used for rendering and displaying the interactive handwriting on the drawing board on a display screen;
the data sending unit is used for sending the coordinates of the interactive handwriting on the drawing board as interactive handwriting information to a second terminal so that the second terminal draws the handwriting on the drawing board with local target resolution according to the interactive handwriting information and renders the interactive handwriting on the drawing board on a display screen;
and the target resolution of the drawing board for mapping the handwriting drawn by the user is the same as the target resolution of the drawing board with the local target resolution.
15. A handwriting display processing apparatus, comprising:
the data receiving unit is used for acquiring interactive handwriting information sent by a first terminal, wherein the interactive handwriting information comprises interactive handwriting coordinates, the interactive handwriting coordinates are coordinates of the interactive handwriting obtained by mapping handwriting drawn by a user on a drawing board with a target resolution by the first terminal, and the interactive handwriting is used for rendering and displaying at the first terminal;
the second handwriting drawing unit is used for drawing handwriting on a drawing board with local target resolution according to the interactive handwriting information to obtain interactive handwriting;
the second handwriting display unit is used for rendering and displaying the interactive handwriting on the drawing board with the local target resolution on the display screen;
and the target resolution of the drawing board for mapping the handwriting drawn by the user is the same as the target resolution of the drawing board with the local target resolution.
16. A handwriting display processing 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 display processing method of any one of claims 1 to 12 by running the program stored in the memory.
17. A storage medium having stored thereon a computer program which, when executed by a processor, implements a handwriting display processing method according to any one of claims 1 to 12.
CN202010499835.1A 2020-06-04 2020-06-04 Handwriting display processing method, related device and handwriting interoperation system Active CN111638851B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010499835.1A CN111638851B (en) 2020-06-04 2020-06-04 Handwriting display processing method, related device and handwriting interoperation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010499835.1A CN111638851B (en) 2020-06-04 2020-06-04 Handwriting display processing method, related device and handwriting interoperation system

Publications (2)

Publication Number Publication Date
CN111638851A CN111638851A (en) 2020-09-08
CN111638851B true CN111638851B (en) 2022-02-25

Family

ID=72332493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010499835.1A Active CN111638851B (en) 2020-06-04 2020-06-04 Handwriting display processing method, related device and handwriting interoperation system

Country Status (1)

Country Link
CN (1) CN111638851B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112540715B (en) * 2020-12-04 2022-05-20 掌阅科技股份有限公司 Pasting method of note content, terminal and computer storage medium
CN114153417B (en) * 2021-12-10 2022-10-28 广州文石信息科技有限公司 Screen updating method and device, storage medium and computer equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8363947B2 (en) * 2010-07-31 2013-01-29 International Business Machines Corporation Handwritten character recognition based on frequency variations in characters
CN102999930B (en) * 2011-09-15 2015-11-25 汉王科技股份有限公司 A kind of electronic handwriting lines plotting method and device
CN104391613B (en) * 2014-12-11 2017-06-16 北京轩文文化发展有限公司 Calligraphy person's handwriting based on optical principle obtains system
CN105405159A (en) * 2015-10-27 2016-03-16 深圳市东向同人科技有限公司 Handwriting display method and device
CN108132727A (en) * 2017-12-07 2018-06-08 青岛海信电器股份有限公司 Handwriting regulation method and device based on touch control face plates
CN111007982B (en) * 2019-11-29 2021-04-20 珠海豹趣科技有限公司 Electronic whiteboard implementation method, device and related system

Also Published As

Publication number Publication date
CN111638851A (en) 2020-09-08

Similar Documents

Publication Publication Date Title
CN112348815B (en) Image processing method, image processing apparatus, and non-transitory storage medium
CN108961303B (en) Image processing method and device, electronic equipment and computer readable medium
US10846870B2 (en) Joint training technique for depth map generation
US10650490B2 (en) Environmental map generation from a digital image
CN111638851B (en) Handwriting display processing method, related device and handwriting interoperation system
CN108288253B (en) HDR image generation method and device
US7688317B2 (en) Texture mapping 2-D text properties to 3-D text
CN109325990B (en) Image processing method, image processing apparatus, and storage medium
CN112433796B (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
CN110070551B (en) Video image rendering method and device and electronic equipment
CN105550973B (en) Graphics processing unit, graphics processing system and anti-aliasing processing method
CN105453010A (en) Method and device for setting background of ui control and terminal
WO2018145568A1 (en) Method and device for generating arc surface model
US20160063670A1 (en) Dynamic Motion Path Blur Kernel
US9955065B2 (en) Dynamic motion path blur user interface
CN112433795A (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
CN113516697B (en) Image registration method, device, electronic equipment and computer readable storage medium
US20160035068A1 (en) Dynamic Motion Path Blur Techniques
US9959672B2 (en) Color-based dynamic sub-division to generate 3D mesh
CN111290822B (en) Desktop wallpaper display method and device and computer readable storage medium
CN113204296A (en) Method, device and equipment for highlighting graphics primitive and storage medium
CN109766530B (en) Method and device for generating chart frame, storage medium and electronic equipment
CN107085521A (en) A kind of icon display method and device
CN111125564B (en) Thermodynamic diagram generation method, thermodynamic diagram generation device, thermodynamic diagram generation computer device and thermodynamic diagram generation storage medium
US7215342B2 (en) System and method for detecting and converting a transparency simulation effect

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
GR01 Patent grant
GR01 Patent grant