CN113763492A - Method for improving smoothness of drawing board track - Google Patents
Method for improving smoothness of drawing board track Download PDFInfo
- Publication number
- CN113763492A CN113763492A CN202110988656.9A CN202110988656A CN113763492A CN 113763492 A CN113763492 A CN 113763492A CN 202110988656 A CN202110988656 A CN 202110988656A CN 113763492 A CN113763492 A CN 113763492A
- Authority
- CN
- China
- Prior art keywords
- coordinate
- arrays
- drawing board
- thinning
- steps
- 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.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 14
- 238000003491 array Methods 0.000 claims abstract description 33
- 238000010422 painting Methods 0.000 claims abstract description 8
- 238000012163 sequencing technique Methods 0.000 claims abstract description 4
- 230000005540 biological transmission Effects 0.000 abstract description 6
- 230000009286 beneficial effect Effects 0.000 abstract 1
- 238000013500 data storage Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 4
- 238000007906 compression Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 229910002056 binary alloy Inorganic materials 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Image Processing (AREA)
Abstract
The invention relates to a method for improving the smoothness of a drawing board track, which comprises the following steps of 1, obtaining all original coordinate arrays of a painting brush line on an electronic drawing board, and sequencing the arrays in sequence from the starting point of the painting brush line according to the path trend; step 2, performing thinning treatment on the original coordinate data set; step 3, compressing all coordinate arrays which are positioned on the same straight line after thinning: judging the coordinate arrays after thinning according to a linear relation, if the coordinate arrays are positioned on the same straight line, discarding all the coordinate arrays positioned in the middle, and only keeping the first and the last coordinate arrays; and 4, compressing the coordinate array obtained after the processing of the steps by using a 64-system code to obtain a path coordinate array after replacement. The method of the invention is beneficial to network transmission and data storage.
Description
Technical Field
The invention relates to the technical field of drawing board track storage, in particular to a method for improving drawing board track fluency.
Background
The scenes mainly used by the current electronic drawing board are mainly teleconferencing and online teaching. As the number of participants increases, the amount of data that the anchor's handwriting needs to be transmitted to the participants through the server increases. At present, because the network environment of a remote area or a three-line or four-line city is poor, when the network bandwidth of a user is small or the mobile network of a mobile phone is weak, handwriting transmission with high real-time requirement is carried out, and if the handwriting data volume is large and processing is not carried out, a client end is gradually blocked and unsmooth, and unsmooth operation is caused.
Disclosure of Invention
The invention aims to provide a method for improving the smoothness of a drawing board track.
In order to achieve the purpose, the invention adopts the technical scheme that:
a method for improving smoothness of a drawing board track comprises the following steps:
step 1, obtaining all original coordinate arrays of a painting brush line on an electronic drawing board, and sequencing the arrays in sequence from the starting point of the painting brush line according to the path trend;
step 2, performing thinning treatment on the original coordinate data set;
step 3, compressing all coordinate arrays which are positioned on the same straight line after thinning: judging the coordinate arrays after thinning according to a linear relation, if the coordinate arrays are positioned on the same straight line, discarding all the coordinate arrays positioned in the middle, and only keeping the first and the last coordinate arrays;
and 4, compressing the coordinate array obtained after the processing of the steps by using a 64-system code to obtain a path coordinate array after replacement.
The thinning treatment specifically comprises the following steps: and discarding the subscript in the coordinate array at a certain interval coordinate in the coordinate array, and reserving the last coordinate array.
After the scheme is adopted, the handwriting track is preprocessed before data transmission, the X \ Y coordinates of the associated arrays are compared and deleted, data of unnecessary tracks are greatly reduced, the arrays are compressed, the transmission efficiency can be improved, particularly in the environment with a weak network and a small bandwidth, and the fluency of the handwriting of the client is remarkably improved.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a diagram of the original path according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a path after the pump-down process according to an embodiment of the present invention;
FIG. 4 is a diagram of a path after compressing a straight line according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a second compression process according to an embodiment of the present invention.
Detailed Description
As shown in fig. 1, the present invention discloses a method for improving smoothness of drawing board track, which includes the following steps:
step 1, obtaining all original coordinate arrays of the painting brush lines on the electronic drawing board, and sequencing the arrays in sequence from the starting points of the painting brush lines according to the path trend.
As shown in fig. 2, the original path coordinates are:
[[430,817],[446,817],[461,817],[500,817],[522,817],[538,817],[553,817],[568,817],[584,817],[608,817],[623,817],[645,817],[661,817],[676,817],[707,817],[722,817],[737,817],[762,817],[783,817],[814,817],[854,817],[900,817],[922,817],[952,817],[976,817],[1023,817],[1044,817],[1106,795],[1176,773],[1229,742],[1275,718],[1305,687],[1336,665],[1360,656],[1367,641],[1398,619],[1413,604],[1437,588],[1459,558],[1483,533],[1499,518]]。
the original path coordinate data length is 427 bytes.
And 2, discarding the array by using subscripts in the coordinate array at certain intervals to reduce the data volume, performing thinning treatment on the array, and keeping the last coordinate array.
[430,817], [446,817], [461,817] - > [430,817], [461,817] in this embodiment, after the original path coordinates are thinned out, the path coordinates are as follows:
[[430,817],[461,817],[522,817],[553,817],[584,817],[623,817],[661,817],[707,817],[737,817],[783,817],[854,817],[922,817],[976,817],[1044,817],[1176,773],[1275,718],[1336,665],[1367,641],[1413,604],[1459,558],[1499,518]]。
the data length of the thinned path coordinate is 219 bytes, and a line displayed according to the path coordinate is shown in fig. 3.
Step 3, compressing all coordinate arrays which are positioned on the same straight line after thinning: and judging the coordinate arrays after thinning according to a linear relation, if the coordinate arrays are positioned on the same straight line, discarding all the coordinate arrays positioned in the middle, and only keeping the first and the last coordinate arrays.
In the coordinate array after thinning, judging according to the linear relation that the following coordinate arrays are on the same straight line:
[430,817],[461,817],[522,817],[553,817],[584,817],[623,817],[661,817],[707,817],[737,817],[783,817],[854,817],[922,817],[976,817],[1044,817]。
then, discarding the middle coordinate points only retains the head and tail coordinates, i.e., [430,817], [1044,817 ].
The path coordinates after the straight line compression are:
[[430,817],[1044,817],[1176,773],[1275,718],[1336,665],[1367,641],[1413,604],[1459,558],[1499,518]]. The data length of the path coordinate is 99 bytes. The brush line after the line is compressed is shown in fig. 4.
And 4, compressing the coordinate array obtained after the processing of the steps by using a 64-system code to obtain a path coordinate array after replacement.
Traversing coordinate points, and converting x and y coordinates into binary systems, such as 430- > 110101110;
the converted binary data is then split into upper 6 bits and lower 6 bits, e.g., 110101110- > upper 6 bits: 000110 lower 6 bits 101110;
then, the upper 6 bits and the lower 6 bits are replaced with 64-ary codes, for example, 000110- > G, 101110- > u, respectively.
The resulting path coordinates after the replacement by 64-ary encoding in this embodiment are as follows:
GuMxQUMxSYMFT7LOU4KZVXKBWFJcWzIuXbIG;
the length of the coordinate array data of the finally obtained track is 36 bytes, and the display effect is shown in fig. 5.
It can be seen that after the processing by the method of the present invention, the data of the brush line on the electronic drawing board is changed from 427 bytes to 36 bytes, which has almost no influence on the display effect. That is to say, the invention preprocesses the handwriting track before data transmission, compares and deletes the X \ Y coordinates of the associated arrays, greatly reduces the data of unnecessary tracks, compresses the arrays, can improve the transmission efficiency, especially the weak network and the environment with small bandwidth, and obviously improves the fluency of the handwriting of the client.
The above description is only exemplary of the present invention and is not intended to limit the technical scope of the present invention, so that any minor modifications, equivalent changes and modifications made to the above exemplary embodiments according to the technical spirit of the present invention are within the technical scope of the present invention.
Claims (2)
1. A method for improving drawing board track fluency is characterized by comprising the following steps: the method comprises the following steps:
step 1, obtaining all original coordinate arrays of a painting brush line on an electronic drawing board, and sequencing the arrays in sequence from the starting point of the painting brush line according to the path trend;
step 2, performing thinning treatment on the original coordinate data set;
step 3, compressing all coordinate arrays which are positioned on the same straight line after thinning: judging the coordinate arrays after thinning according to a linear relation, if the coordinate arrays are positioned on the same straight line, discarding all the coordinate arrays positioned in the middle, and only keeping the first and the last coordinate arrays;
and 4, compressing the coordinate array obtained after the processing of the steps by using a 64-system code to obtain a path coordinate array after replacement.
2. The method for improving the fluency of drawing board tracks according to claim 1, wherein: the thinning treatment specifically comprises the following steps: and discarding the subscript in the coordinate array at preset interval coordinates, and reserving the last coordinate array.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110988656.9A CN113763492A (en) | 2021-08-26 | 2021-08-26 | Method for improving smoothness of drawing board track |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110988656.9A CN113763492A (en) | 2021-08-26 | 2021-08-26 | Method for improving smoothness of drawing board track |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113763492A true CN113763492A (en) | 2021-12-07 |
Family
ID=78791328
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110988656.9A Withdrawn CN113763492A (en) | 2021-08-26 | 2021-08-26 | Method for improving smoothness of drawing board track |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113763492A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5528003A (en) * | 1994-12-14 | 1996-06-18 | International Business Machines Corporation | Data compression for pen stroke input |
CN102299718A (en) * | 2010-06-25 | 2011-12-28 | 汉王科技股份有限公司 | Compression and decompression methods for locus at hand-written terminal |
CN106201314A (en) * | 2016-06-30 | 2016-12-07 | 成都东方闻道科技发展有限公司 | A kind of display packing realizing handwriting input on touch screen and display device |
CN112596661A (en) * | 2020-12-24 | 2021-04-02 | 广州视源电子科技股份有限公司 | Writing track processing method and device and interactive panel |
CN112639700A (en) * | 2018-11-19 | 2021-04-09 | 深圳市柔宇科技股份有限公司 | Handwriting processing method, handwriting input device and computer readable storage medium |
-
2021
- 2021-08-26 CN CN202110988656.9A patent/CN113763492A/en not_active Withdrawn
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5528003A (en) * | 1994-12-14 | 1996-06-18 | International Business Machines Corporation | Data compression for pen stroke input |
CN102299718A (en) * | 2010-06-25 | 2011-12-28 | 汉王科技股份有限公司 | Compression and decompression methods for locus at hand-written terminal |
CN106201314A (en) * | 2016-06-30 | 2016-12-07 | 成都东方闻道科技发展有限公司 | A kind of display packing realizing handwriting input on touch screen and display device |
CN112639700A (en) * | 2018-11-19 | 2021-04-09 | 深圳市柔宇科技股份有限公司 | Handwriting processing method, handwriting input device and computer readable storage medium |
CN112596661A (en) * | 2020-12-24 | 2021-04-02 | 广州视源电子科技股份有限公司 | Writing track processing method and device and interactive panel |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102204257B (en) | Low latency video encoder | |
US20120079522A1 (en) | Method And Apparatus For Transmitting Video Signals | |
WO2018227819A1 (en) | Handwriting data synchronization method and device, storage medium and terminal device | |
CN1235404C (en) | Video frequency meeting shared white plate realizing method based on Internet | |
US20030177255A1 (en) | Encoding and decoding system for transmitting streaming video data to wireless computing devices | |
CN102045440B (en) | Apparatus and method for transmitting handwritten message including time information | |
CN113315972A (en) | Video semantic communication method and system based on hierarchical knowledge expression | |
CN110891084A (en) | Thin client remote desktop control system based on autonomous HVDP protocol | |
CN107370982A (en) | Tele-conferencing system based on electronic whiteboard | |
CN111372113B (en) | User cross-platform communication method based on digital human expression, mouth shape and sound synchronization | |
CN113763492A (en) | Method for improving smoothness of drawing board track | |
CN113961291B (en) | Mobile equipment remote control method and system based on touch gesture recognition and compressed representation | |
CN101079998A (en) | A video communication system and method | |
CN114265820A (en) | Traceable interactive whiteboard system and traceable interactive whiteboard method thereof | |
US11902522B2 (en) | Character restoration method and apparatus, storage medium, and electronic device | |
CN106331673A (en) | VR video data control method based on distributed control system | |
CN106170003A (en) | Multipart video-meeting system and multipart video-meeting data transmission method | |
CN1127276C (en) | Handwriting inputting, sending and receiving method and system for mobile terminal | |
CN102314235B (en) | Method for realizing synchronization of electronic whiteboards | |
CN102497593B (en) | Text-oriented online remote education video rendering method | |
CN1571541A (en) | Short message transmitting method for PCS short message system | |
CN112422756A (en) | Automatic intelligent dialing method and device and computer readable storage medium | |
CN111754036B (en) | Cantilever pre-batching nesting method, processing device and terminal equipment | |
CN1510871A (en) | Point to point communicaton system based on internet and dynamic IP address acquiring method | |
WO2003067777A1 (en) | Optimized data transmission system and method |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20211227 Address after: 361000 unit 2-a379, 22 / F, Lianqian group building, 323 Qianpu Middle Road, Siming District, Xiamen City, Fujian Province Applicant after: Xiamen Xiaoyan Network Technology Co.,Ltd. Address before: 361000 unit 2-a302, 22 / F, Lianqian group building, 323 Qianpu Middle Road, Siming District, Xiamen City, Fujian Province Applicant before: Xiamen Jingzhi Education Technology Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20211207 |
|
WW01 | Invention patent application withdrawn after publication |