Search

CN-122018770-A - Writing track display method, device, equipment and readable storage medium

CN122018770ACN 122018770 ACN122018770 ACN 122018770ACN-122018770-A

Abstract

The embodiment of the application provides a writing track display method, a device, equipment and a readable storage medium, wherein electronic equipment acquires track points generated by writing operation on a screen of the electronic equipment, interpolates between every two adjacent track points to obtain a plurality of interpolation points, and determines respective brushes of the two adjacent track points and brushes of the interpolation points between the two adjacent track points to obtain a plurality of brushes. And then, the electronic equipment determines the outline of the pen section between two adjacent track points according to the plurality of pen brushes and displays the writing track. By adopting the scheme, the electronic equipment generates brushes for each track point and each interpolation point by interpolating between any two adjacent track points, and the brushes of each track point and each interpolation point are different, so that the writing track has the effects of thinning from thick and thinning from thin, the stroke effect is highlighted to a certain extent, and the aim of improving the display effect is fulfilled.

Inventors

  • LI DEJIAN
  • LIN JIANMIN
  • WANG JIAWEI
  • WANG ZHOUCHENG

Assignees

  • 广州视源电子科技股份有限公司
  • 广州视源人工智能创新研究院有限公司

Dates

Publication Date
20260512
Application Date
20241111

Claims (9)

  1. 1. A writing trace display method, characterized by being applied to an electronic device, the method comprising: Acquiring track points generated by writing operation acting on a screen of the electronic equipment in response to the writing operation; Interpolating between each adjacent two track points to obtain a plurality of interpolation points; Determining respective brushes of two adjacent track points, and determining brushes of interpolation points between the two adjacent track points to obtain a plurality of brushes, wherein the brushes of the track points are used for indicating rendering effects of the track points; Determining a pen segment contour between the two adjacent track points according to the plurality of pen brushes; and displaying the writing track according to the outline of the pen section.
  2. 2. The method of claim 1, wherein said determining a pen segment profile between said two adjacent track points from said plurality of brushes comprises: Determining convex hulls surrounding the plurality of brushes, wherein the brushes of each interpolation point in the convex hulls are positioned between the brushes of two adjacent track points; For each brush in the plurality of brushes, determining a target point from the contour of each brush in the plurality of brushes, wherein the target point is the point with the shortest distance from a target line segment in a plurality of contour points contained in the contour of each brush in the plurality of brushes, and the target line segment is the edge far away from the brush in the edge contained in the convex hull; And sequentially connecting the target points of each brush according to the sequence of the interpolation points to correct the convex hull to obtain a bounding box, and taking the bounding box as the pen segment outline between the two adjacent track points.
  3. 3. The method of claim 1, wherein displaying the writing trace according to the pen segment profile comprises: When a history track point exists before the two adjacent track points, determining a first intersection point and a second intersection point of the pen section outline and the whole outline, wherein the whole outline is generated according to the history track point before the pen section outline, and the first intersection point and the second intersection point are respectively positioned on two opposite sides of the pen section outline; Splicing the pen section outline and the integral outline according to the first intersection point and the second intersection point to obtain a spliced outline; And displaying the writing track according to the splicing outline.
  4. 4. A method according to claim 3, wherein said stitching the pen segment profile and the overall profile according to the first intersection point and the second intersection point to obtain a stitched profile comprises: Determining a first set from the pen section contours according to the first intersection point and the second intersection point, determining a second set from the whole contours according to the first intersection point and the second intersection point, wherein contour points in the first set are positioned in a region corresponding to the whole contours, and contour points in the second set are positioned in a region corresponding to the pen section contours; Deleting contour points in the first set from the pen segment contour, and deleting contour points in the second set from the whole contour; and splicing the residual contour points of the pen section contour and the residual contour points of the whole contour to obtain the spliced contour.
  5. 5. The method according to any one of claims 1 to 4, wherein determining brushes of each of two adjacent track points includes: determining the writing speed corresponding to each of two adjacent track points; inputting the writing speed of each track point into a speed width model so that the speed width model outputs the width of each track point; And for each track point, scaling a preset brush according to the width of the track point to generate the brush of the track point.
  6. 6. The method of claim 5, wherein the step of determining the position of the probe is performed, The outline of the preset brush is the outline of the regular script strokes.
  7. 7. A writing trace display apparatus, the apparatus comprising: The response module is used for responding to writing operation and acquiring track points generated on a screen of the electronic equipment by the writing operation; The interpolation module is used for interpolating between every two adjacent track points to obtain a plurality of interpolation points; The determining module is used for determining the brushes of each of two adjacent track points and determining the brushes of each interpolation point between the two adjacent track points so as to obtain a plurality of brushes, wherein the brushes of the track points are used for indicating the rendering effect of the track points; The processing module is used for determining the pen section outline between the two adjacent track points according to the plurality of pen brushes; And the display module is used for displaying the writing track according to the outline of the pen section.
  8. 8. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, causes the electronic device to implement the method of any one of claims 1 to 6.
  9. 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method according to any of claims 1 to 6.

Description

Writing track display method, device, equipment and readable storage medium Technical Field The embodiment of the application relates to the technical field of touch control, in particular to a writing track display method, a writing track display device, writing track display equipment and a readable storage medium. Background With the rapid development of technology, the writing mode is gradually changed from the traditional writing of a paper pen to the writing of a touch screen. In the writing process of the touch screen, the electronic equipment acquires a series of track points according to the writing operation of a user, sequentially connects the track points, and renders and displays a writing track according to the track points. However, the traditional writing uses a round brush, the writing track width is consistent, the pen falling and the pen collecting are represented as round-head pen points, the aesthetic feeling of the traditional calligraphic pen and the pen collecting cannot be highlighted, and the display effect is poor. Disclosure of Invention The embodiment of the application provides a writing track display method, a device, equipment and a readable storage medium, wherein a plurality of interpolation points are obtained by interpolating any two adjacent track points, pen brushes are generated for each track point and each interpolation point, writing tracks are displayed according to the pen brushes of each track point and the pen brushes of each interpolation point, the pen point effect is highlighted to a certain extent, and the purpose of improving the display effect is realized. In a first aspect, an embodiment of the present application provides a writing track display method, including: Acquiring track points generated by writing operation acting on a screen of the electronic equipment in response to the writing operation; Interpolating between each adjacent two track points to obtain a plurality of interpolation points; Determining respective brushes of two adjacent track points, and determining brushes of interpolation points between the two adjacent track points to obtain a plurality of brushes, wherein the brushes of the track points are used for indicating rendering effects of the track points; Determining a pen segment contour between the two adjacent track points according to the plurality of pen brushes; and displaying the writing track according to the outline of the pen section. In a second aspect, an embodiment of the present application provides a writing trace display apparatus, including: The response module is used for responding to writing operation and acquiring track points generated by the writing operation acting on a screen of the electronic equipment; The interpolation module is used for interpolating between every two adjacent track points to obtain a plurality of interpolation points; The determining module is used for determining the brushes of each of two adjacent track points and determining the brushes of each interpolation point between the two adjacent track points so as to obtain a plurality of brushes, wherein the brushes of the track points are used for indicating the rendering effect of the track points; The processing module is used for determining the pen section outline between the two adjacent track points according to the plurality of pen brushes; And the display module is used for displaying the writing track according to the outline of the pen section. In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to cause the electronic device to implement the method as described above in the first aspect or the various possible implementations of the first aspect. In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored therein computer instructions which, when executed by a processor, are adapted to carry out the method according to the first aspect or the various possible implementations of the first aspect. In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the method as described above in the first aspect or in the various possible implementations of the first aspect. According to the writing track display method, device and equipment and the readable storage medium, the electronic equipment obtains track points generated by writing operation on a screen of the electronic equipment, interpolation is conducted between every two adjacent track points to obtain a plurality of interpolation points, and each brush of the two adjacent track points and each brush of the interpolation points between the two adjacent track points are determined, so that a plurality of brushes are