CN111913644B - Line drawing method and device for whiteboard and readable storage medium - Google Patents

Line drawing method and device for whiteboard and readable storage medium Download PDF

Info

Publication number
CN111913644B
CN111913644B CN202010744874.3A CN202010744874A CN111913644B CN 111913644 B CN111913644 B CN 111913644B CN 202010744874 A CN202010744874 A CN 202010744874A CN 111913644 B CN111913644 B CN 111913644B
Authority
CN
China
Prior art keywords
points
drawing points
screening
whiteboard
line
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
CN202010744874.3A
Other languages
Chinese (zh)
Other versions
CN111913644A (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.)
Beijing Barley Land Information Technology Co ltd
Original Assignee
Beijing Barley Land Information Technology 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 Beijing Barley Land Information Technology Co ltd filed Critical Beijing Barley Land Information Technology Co ltd
Priority to CN202010744874.3A priority Critical patent/CN111913644B/en
Publication of CN111913644A publication Critical patent/CN111913644A/en
Application granted granted Critical
Publication of CN111913644B publication Critical patent/CN111913644B/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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour

Abstract

The invention provides a line drawing method and device of a whiteboard and a readable storage medium. The method comprises the following steps: receiving drawing operation of a user in a whiteboard drawing area; obtaining coordinates of N drawing points in a drawing track corresponding to the drawing operation, wherein N is an integer greater than 1; screening the N drawing points to obtain M drawing points, wherein M is an integer larger than 1 and is not larger than N; and drawing a line according to the M drawing points. The technical scheme provided by the embodiment of the invention can generate smooth lines on the white board, and provides aesthetic degree and user interaction experience.

Description

Line drawing method and device for whiteboard and readable storage medium
Technical Field
The invention relates to the technical field of drawing, in particular to a line drawing method and device of a whiteboard and a readable storage medium.
Background
In recent years, an application program that simulates whiteboard writing operations implemented on electronic devices such as a PC and a TV is generally called an electronic whiteboard in the industry, and the electronic whiteboard can provide writing and drawing services to a user to better express the viewpoint of the user. At present, the electronic whiteboard is widely applied to various fields of education, meetings, designs and the like.
However, in the actual working process, noise data is easily generated, so that lines generated on the electronic whiteboard have obvious jaggy and unsmooth feeling, and the aesthetic degree and the interactive experience of users are influenced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for drawing lines on a whiteboard, and a readable storage medium, which can generate smooth lines on the whiteboard, and provide an aesthetic measure and a user interaction experience.
According to a first aspect of the embodiments of the present invention, there is provided a line drawing method for a whiteboard, including: receiving drawing operation of a user in a whiteboard drawing area; obtaining coordinates of N drawing points in a drawing track corresponding to drawing operation, wherein N is an integer greater than 1; screening the N drawing points to obtain M drawing points, wherein M is an integer larger than 1 and is not larger than N; and drawing a line according to the M drawing points.
In an embodiment of the present invention, the screening the N drawing points to obtain M drawing points includes: and screening each N drawing points in the N drawing points according to the acquisition sequence of the N drawing points to obtain M drawing points, wherein N is a first preset threshold, N is an integer greater than 1, and N is less than N.
In an embodiment of the present invention, the screening N drawing points of the N drawing points to obtain M drawing points includes: (a) screening the mth N drawing points in the N drawing points, wherein m is an integer greater than or equal to 1; (b) resetting the screened drawing points and the rest drawing points except the mth N drawing points in the N drawing points; (c) and obtaining M drawing points according to the reset drawing points.
In an embodiment of the present invention, the screening each N drawing points of the N drawing points to obtain M drawing points further includes: judging whether the drawing operation is finished or not; when the drawing operation is not ended, the above-described steps (a) and (b) are repeatedly performed, wherein m is sequentially increased by 1.
In an embodiment of the present invention, when the drawing operation is finished, the obtaining M drawing points according to the reset drawing points includes: and screening the non-screened drawing points in the reset drawing points, and combining the non-screened drawing points with the screened drawing points in the reset drawing points to obtain M drawing points.
In an embodiment of the present invention, the method further includes: obtaining curvatures of N drawing points in a drawing track; obtaining a curvature difference value of two drawing points in the N drawing points; wherein, when the curvature difference of two drawing points is greater than the second preset threshold, the above-mentioned screening of N drawing points obtains M drawing points, including: and screening the drawing points between the two drawing points to obtain M drawing points.
In an embodiment of the present invention, the filtering the N drawing points includes: and screening the N drawing points by adopting a Douglas-Puck algorithm.
In an embodiment of the present invention, the drawing a line according to M drawing points includes: and drawing a line by adopting a Bezier curve according to the M drawing points.
According to a second aspect of the embodiments of the present invention, there is provided a line drawing apparatus of a whiteboard, including: the receiving module is used for receiving drawing operation of a user in a whiteboard drawing area; the system comprises an acquisition module, a calculation module and a display module, wherein the acquisition module is used for acquiring coordinates of N drawing points in a drawing track corresponding to drawing operation, and N is an integer greater than 1; the screening module is used for screening the N drawing points to obtain M drawing points, wherein M is an integer larger than 1 and is less than or equal to N; and the drawing module is used for drawing lines according to the M drawing points.
According to a third aspect of embodiments of the present invention, there is provided a computer-readable storage medium storing a computer program for executing any of the methods described above.
According to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus, including: a processor; a memory for storing the processor-executable instructions; the processor is configured to perform any of the methods described above.
According to the technical scheme provided by the embodiment of the invention, the drawing operation of a user in a whiteboard drawing area is received; obtaining coordinates of N drawing points in a drawing track corresponding to drawing operation, wherein N is an integer greater than 1; screening the N drawing points to obtain M drawing points, wherein M is an integer larger than 1 and is not larger than N; the lines are drawn according to the M drawing points, beautification of an original drawing curve can be achieved, smooth lines are generated on the white board, and attractiveness and user interaction experience are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a line drawing method of a whiteboard according to an embodiment of the present invention.
Fig. 2 is a schematic flow chart of a line drawing method of a whiteboard according to another embodiment of the present invention.
Fig. 3 is a schematic flow chart of a line drawing method of a whiteboard according to another embodiment of the present invention.
Fig. 4 is a block diagram illustrating a line drawing apparatus of a whiteboard according to an embodiment of the present invention.
Fig. 5 is a block diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Fig. 1 is a schematic flow chart of a line drawing method of a whiteboard according to an embodiment of the present invention. The method may be performed by a computer device (e.g., a server). As shown in fig. 1, the method includes the following.
S110: and receiving the drawing operation of the user in the whiteboard drawing area.
The user can make the whiteboard display corresponding drawing contents by performing drawing operation in the drawing area of the whiteboard. The drawing operation may be a writing operation or a drawing operation, and the present invention is not limited to this. The operation of the user from touching the whiteboard drawing area, sliding on the whiteboard drawing area, and moving away from the whiteboard drawing area is one drawing operation.
Specifically, the user may slide the input device (e.g., a mouse, a stylus, etc.) in the whiteboard drawing area to implement the drawing operation, or may slide the finger in the whiteboard drawing area to implement the drawing operation, and the manner of the drawing operation is not particularly limited in the present invention.
S120: and acquiring coordinates of N drawing points in the drawing track corresponding to the drawing operation, wherein N is an integer greater than 1.
S130: and screening the N drawing points to obtain M drawing points, wherein M is an integer larger than 1 and is not larger than N.
Illustratively, the N plotted points may be filtered using the Douglas-Pock algorithm.
Specifically, N drawing points are connected in sequence to form an original drawing curve, a straight line is connected between the initial drawing point and the final drawing point of the curve in a virtual mode, and the distance from each of the other drawing points to the straight line is calculated; selecting the maximum distance value dmaxIs less than the threshold value D, if Dmax<D, completely omitting the middle drawing points on the straight line; if d ismax>D, then reserve DmaxAnd (3) dividing the curve into two parts for processing by taking the corresponding drawing point as a boundary, and iteratively operating the steps, namely comparing the maximum distance value with a threshold value, and sequentially selecting the maximum distance value and the threshold value until no point can be eliminated, and finally obtaining the coordinates of the M drawing points meeting the given precision tolerance.
It should be understood that the N drawing points may be all drawing points obtained after one drawing operation is completed, or may be partial drawing points obtained during the drawing operation, which is not limited in the present invention. That is, after one drawing operation is completed, the drawing points can be screened, and the curve can be beautified integrally; and in the process of drawing operation, the drawing points can be screened while drawing, and the curve can be beautified in real time.
S140: and drawing a line according to the M drawing points.
For example, K times a bezier curve may be used to plot a line from a starting point to an ending point, where K is an integer greater than 1.
According to the technical scheme provided by the embodiment of the invention, the drawing operation of a user in a whiteboard drawing area is received; obtaining coordinates of N drawing points in a drawing track corresponding to drawing operation, wherein N is an integer greater than 1; screening the N drawing points to obtain M drawing points, wherein M is an integer larger than 1 and is not larger than N; the lines are drawn according to the M drawing points, beautification of an original drawing curve can be achieved, smooth lines are generated on the white board, and attractiveness and user interaction experience are improved.
In another embodiment of the present invention, the filtering the N drawing points to obtain M drawing points includes: and screening each N drawing points in the N drawing points according to the acquisition sequence of the N drawing points to obtain M drawing points, wherein N is a first preset threshold, N is an integer greater than 1, and N is less than N.
For example, N is 200 and N is 50. Specifically, the 1 st to 50 th, the 51 st to 100 th, the 101 st-; combining the screened drawing points to obtain M drawing points; and drawing a line according to the combined M drawing points.
It should be understood that after one drawing operation is completed and 200 drawing points corresponding to the drawing operation are obtained, the 1 st to 50 th, 51 st to 100 th, 150 th and 200 th drawing points in the 101 st and 151 th modes can be screened respectively; or in the process of the drawing operation, every 50 drawing points are obtained, the drawing points are screened, for example, after 1 st to 50 th drawing points are obtained, the 1 st to 50 th drawing points are screened, the drawing points are continuously obtained, when 51 st to 100 th drawing points are obtained, the 51 st to 100 th drawing points are screened, and so on. It is to be understood that the present invention is not particularly limited thereto.
Fig. 2 is a schematic flow chart of a line drawing method of a whiteboard according to another embodiment of the present invention. The method may be performed by a computer device (e.g., a server). As shown in fig. 2, the method includes the following.
S210: and receiving the drawing operation of the user in the whiteboard drawing area.
S220: and acquiring coordinates of N drawing points in the drawing track corresponding to the drawing operation, wherein N is an integer greater than 1.
S230: and screening the mth N drawing points in the N drawing points according to the acquisition sequence of the N drawing points, wherein m is an integer greater than or equal to 1.
Illustratively, during the rendering operation, the coordinates of the rendering points are acquired in real time. When the number of drawing points reaches a first preset threshold (for example, n is 50), that is, m is 1, the 50 drawing points are filtered by using the douglas-pock algorithm, and 30 drawing points are obtained.
S240: resetting the screened drawing points and the rest drawing points except the mth N drawing points in the N drawing points.
For example, N is 210, and the 30 plotted points screened in step S230 are reset with the remaining 210-50 being 160, resulting in 30+160 being 190 plotted points after the reset.
S250: and drawing a line according to the reset drawing points.
And drawing the reset 190 drawing points according to a quadratic Bezier curve.
S260: and judging whether the drawing operation is finished or not.
When the drawing operation is not ended, the above-described steps S230 to S250 are repeatedly performed, in which m is sequentially increased by 1.
That is, 51-100 th plotted points (i.e., m is 2) of the 210 plotted points are filtered (corresponding to 31-80 th plotted points of the 190 plotted points after being reset), for example, 20 plotted points after being filtered; resetting the 20 drawing points and the 30 screened drawing points (namely, screening the 1 st to 50 th drawing points to obtain 30 drawing points) and the remaining 210 th to 50 th to 110 un-screened drawing points to obtain 160 reset drawing points; and (4) updating the curve according to the 160 drawing points, and the like, namely sequentially screening, resetting and the like the drawing points of 101-.
For example, the 101 st-150 th drawing points are screened to obtain 30 drawing points; and screening the 151 th and 200 th drawing points to obtain 20 drawing points. The plotted points after reset were 30+20+30+20+ (210-50-50-50) ═ 110.
When the drawing operation ends, step S270 is executed.
S270: and screening the non-screened drawing points in the reset drawing points, and combining the non-screened drawing points with the screened drawing points in the reset drawing points to obtain M drawing points.
For example, the non-screened drawing points of the 110 drawing points after the resetting are 210-50-50-10, the 10 drawing points are screened to obtain 5 drawing points, and the 5 drawing points are combined with the other screened 30+20+30+20 drawing points to obtain 105 drawing points, that is, M is 105.
S280: and drawing a line according to the M drawing points.
The 105 plotted points are plotted according to a quadratic bezier curve.
It should be understood that the step 250 is an optional operation, and the curve can be drawn according to the drawing points after being reset every time the curve is screened, that is, the curve can be beautified in real time without waiting for the end of a single drawing operation; or, after all the drawing points are screened, one-time drawing may be performed, which is not specifically limited in the present invention.
In short, when N equals kn (k is the number of screening times and k is an integer greater than 1), for example, when N equals 200 and N equals 50, k equals 4. For example, a Douglas-Pock algorithm may be used to screen 50 drawing points between 1 st and 50 th drawing points to obtain 30 drawing points; screening 50 drawing points among the 51 st to 100 th drawing points to obtain 20 drawing points; screening 50 drawing points among the 101-150 drawing points to obtain 30 drawing points; and screening 50 drawing points among the 151 th and 200 th drawing points to obtain 20 drawing points. Thus, M is 30+20+30+20 is 100.
When N is kn + b, b < N, i.e. N is a non-integer multiple of N, the remaining b plotted points can be filtered, thus a total of k +1 passes. For example, N is 210 and N is 50, and the total screening is performed 5 times. Specifically, a douglas-pock algorithm can be adopted to screen 50 drawing points between 1-50 drawing points to obtain 30 drawing points; screening 50 drawing points among the 51 st to 100 th drawing points to obtain 20 drawing points; screening 50 drawing points among the 101 st-150 th drawing points to obtain 30 drawing points; screening 50 drawing points among the 151 th and 200 th drawing points to obtain 20 drawing points; and screening 10 drawing points among the 201 st-210 th drawing points to obtain 5 drawing points. Thus, M is 30+20+30+20+5 is 105.
According to the technical scheme provided by the embodiment of the invention, the mth N drawing points in the N drawing points are screened according to the acquisition sequence of the N drawing points; resetting the screened drawing points and the rest drawing points except the mth N drawing points in the N drawing points; drawing lines according to the reset drawing points; judging whether the drawing operation is finished or not; when the drawing operation is not finished, the above steps S230 to S250 are repeatedly performed; when the drawing operation is finished, screening unscreened drawing points in the reset drawing points, and combining the screened drawing points with screened drawing points in the reset drawing points to obtain M drawing points; the line is drawn according to the M drawing points, the original drawing curve can be beautified while the drawing operation is performed, and a smooth line is generated, namely, the curve can be beautified in real time without waiting for the end of a single drawing operation.
Fig. 3 is a schematic flow chart of a line drawing method of a whiteboard according to another embodiment of the present invention. The method may be performed by a computer device (e.g., a server). As shown in fig. 3, the method includes the following.
S310: and receiving drawing operation of a user in the whiteboard drawing area.
S320: and acquiring coordinates of N drawing points in the drawing track corresponding to the drawing operation, wherein N is an integer greater than 1.
S330: and acquiring the curvatures of the N drawing points in the drawing track.
S340: and obtaining the curvature difference value of two drawing points in the N drawing points.
S350: and when the curvature difference value of the two drawing points is larger than a second preset threshold value, screening the drawing points between the two drawing points to obtain M drawing points.
For example, if the curvature difference value between the 1 st drawing point and the 100 th drawing point is greater than a second preset threshold, screening 100 drawing points between the 1 st drawing point and the 100 th drawing point; and if the curvature difference value between the 100 th drawing point and the 150 th drawing point is greater than a second preset threshold value, screening 50 drawing points among the 100 th and 150 th drawing points, and the like.
S360: and drawing a line according to the M drawing points.
According to the technical scheme provided by the embodiment of the invention, the curvatures of N drawing points in the drawing track and the curvature difference value of two drawing points in the N drawing points are obtained; when the curvature difference value of the two drawing points is larger than a second preset threshold value, screening the drawing points between the two drawing points to obtain M drawing points; according to the M drawing points, the screening frequency can be improved when the curvature change of the drawing track is obvious, and the screening frequency is reduced when the drawing track is flat, so that the screening efficiency of the drawing points is improved, and the line drawing efficiency is improved.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Fig. 4 is a block diagram illustrating a line drawing apparatus of a whiteboard according to an embodiment of the present invention. As shown in fig. 5, the line drawing apparatus 400 of the whiteboard includes:
the receiving module 410 is configured to receive a drawing operation of a user in a whiteboard drawing area.
An obtaining module 420, configured to obtain coordinates of N drawing points in the drawing trajectory corresponding to the drawing operation, where N is an integer greater than 1.
And the screening module 430 is configured to screen the N drawing points to obtain M drawing points, where M is an integer greater than 1 and M is not greater than N.
And a drawing module 440, configured to draw a line according to the M drawing points.
According to the technical scheme provided by the embodiment of the invention, the drawing operation of a user in a whiteboard drawing area is received; obtaining coordinates of N drawing points in a drawing track corresponding to drawing operation, wherein N is an integer greater than 1; screening the N drawing points to obtain M drawing points, wherein M is an integer larger than 1 and is not larger than N; the lines are drawn according to the M drawing points, beautification of an original drawing curve can be achieved, smooth lines are generated on the white board, and attractiveness and user interaction experience are improved.
In an embodiment of the present invention, the screening module 430 is further configured to screen each N drawing points of the N drawing points according to an obtaining order of the N drawing points, so as to obtain M drawing points, where N is a first preset threshold, N is an integer greater than 1, and N < N.
In an embodiment of the present invention, the filtering module 430 is further configured to perform the step (a) of filtering an mth N rendering points of the N rendering points, where m is an integer greater than or equal to 1; (b) resetting the screened drawing points and the rest drawing points except the mth N drawing points in the N drawing points; (c) and obtaining M drawing points according to the reset drawing points.
In an embodiment of the present invention, the line drawing device 400 of the whiteboard further includes: a judging module 450, configured to judge whether the drawing operation is finished; a repeating module 460, configured to repeatedly perform the above step (a) and step (b) when the drawing operation is not ended, where m is sequentially increased by 1.
In an embodiment of the present invention, when the drawing operation is finished, the filtering module 430 is further configured to filter an unscreened drawing point of the reset drawing points, and combine the unscreened drawing point with a filtered drawing point of the reset drawing points to obtain M drawing points.
In an embodiment of the present invention, the obtaining module 420 is further configured to obtain curvatures of N drawing points in the drawing track; obtaining a curvature difference value of two drawing points in the N drawing points; when the curvature difference value of the two drawing points is greater than the second preset threshold, the filtering module 430 is further configured to filter the drawing points between the two drawing points to obtain M drawing points.
In an embodiment of the present invention, the filtering module 430 is further configured to filter the N rendering points by using a douglas-pock algorithm.
In an embodiment of the present invention, the drawing module 440 is further configured to draw a line by using a bezier curve according to the M drawing points.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
Fig. 5 is a block diagram of an electronic device 500 according to an embodiment of the invention.
Referring to fig. 5, electronic device 500 includes a processing component 510 that further includes one or more processors and memory resources, represented by memory 520, for storing instructions, such as application programs, that are executable by processing component 510. The application programs stored in memory 520 may include one or more modules that each correspond to a set of instructions. Further, the processing component 510 is configured to execute instructions to perform the line drawing method of the whiteboard described above.
The electronic device 500 may also include a power supply component configured to perform power management of the electronic device 500, a wired or wireless network interface configured to connect the electronic device 500 to a network, and an input/output (I/O) interface. The electronic device 500 may operate based on an operating system stored in the memory 520, such as Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTMOr the like.
A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of the electronic device 500, enable the electronic device 500 to perform a line drawing method of a whiteboard, comprising: receiving drawing operation of a user in a whiteboard drawing area; obtaining coordinates of N drawing points in a drawing track corresponding to drawing operation, wherein N is an integer greater than 1; screening the N drawing points to obtain M drawing points, wherein M is an integer larger than 1 and is not larger than N; and drawing a line according to the M drawing points.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. 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 invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, 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 units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part thereof, which essentially contributes to the prior art, can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program check codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that the combination of the features in the present application is not limited to the combination described in the claims or the combination described in the embodiments, and all the features described in the present application may be freely combined or combined in any manner unless contradictory to each other.
It should be noted that the above-mentioned embodiments are only specific examples of the present invention, and obviously, the present invention is not limited to the above-mentioned embodiments, and many similar variations exist. All modifications which would occur to one skilled in the art and which are, therefore, directly derived or suggested from the disclosure herein are deemed to be within the scope of the present invention.
It should be understood that the first, second, etc. limiting words mentioned in the embodiments of the present invention are only used for describing the technical solutions of the embodiments of the present invention more clearly, and are not used for limiting the protection scope of the present invention.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A line drawing method of a whiteboard is characterized by comprising the following steps:
receiving drawing operation of a user in a whiteboard drawing area;
obtaining coordinates of N drawing points in a drawing track corresponding to the drawing operation, wherein N is an integer greater than 1;
screening the N drawing points according to a Douglas-Puck algorithm to obtain M drawing points, wherein M is an integer greater than 1 and is less than or equal to N;
the screening the N drawing points according to the Douglas-Puck algorithm to obtain M drawing points comprises:
(a) screening the mth N drawing points in the N drawing points according to the acquisition sequence of the N drawing points, wherein m is an integer greater than or equal to 1, N is a first preset threshold, N is an integer greater than 1, and N is less than N;
(b) resetting the screened drawing points and the rest of the N drawing points except the mth N drawing points;
(c) drawing lines according to the reset drawing points;
(d) judging whether the drawing operation is finished or not; when the drawing operation is not ended, repeatedly performing the steps (a) and (b), wherein m is sequentially increased by 1; when the drawing operation is finished, obtaining the M drawing points according to the reset drawing points;
and drawing a line according to the M drawing points to obtain a smooth line.
2. The method of claim 1, wherein obtaining the M plotted points from the reset plotted points when the plotting operation is finished comprises:
and screening the non-screened drawing points in the reset drawing points, and combining the non-screened drawing points with the screened drawing points in the reset drawing points to obtain the M drawing points.
3. The method of claim 1, further comprising:
obtaining curvatures of the N drawing points in the drawing track;
obtaining a curvature difference value of two drawing points in the N drawing points;
when the curvature difference value of the two drawing points is greater than a second preset threshold, the screening the N drawing points to obtain M drawing points includes:
and screening the drawing points between the two drawing points to obtain the M drawing points.
4. The method according to any one of claims 1 to 3, wherein said drawing a line from said M drawing points comprises:
and drawing the line by adopting a Bezier curve according to the M drawing points.
5. A line drawing device of a whiteboard, characterized by comprising:
the receiving module is used for receiving drawing operation of a user in a whiteboard drawing area;
the acquisition module is used for acquiring coordinates of N drawing points in the drawing track corresponding to the drawing operation, wherein N is an integer greater than 1;
the screening module is used for screening the N drawing points according to the Douglas-Puck algorithm to obtain M drawing points, wherein M is an integer larger than 1 and is less than or equal to N;
the screening module is configured to screen the N drawing points according to a douglas-pock algorithm to obtain M drawing points, and includes:
(a) screening the mth N drawing points in the N drawing points according to the acquisition sequence of the N drawing points, wherein m is an integer greater than or equal to 1, N is a first preset threshold, N is an integer greater than 1, and N is less than N;
(b) resetting the screened drawing points and the rest of the N drawing points except the mth N drawing points;
(c) drawing lines according to the reset drawing points;
(d) judging whether the drawing operation is finished or not; when the drawing operation is not ended, repeatedly performing the steps (a) and (b), wherein m is sequentially increased by 1; when the drawing operation is finished, obtaining the M drawing points according to the reset drawing points;
and the drawing module is used for drawing a line according to the M drawing points to obtain a smooth line.
6. A computer-readable storage medium, characterized in that the storage medium stores a computer program for performing the method of any of the preceding claims 1 to 4.
CN202010744874.3A 2020-07-29 2020-07-29 Line drawing method and device for whiteboard and readable storage medium Active CN111913644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010744874.3A CN111913644B (en) 2020-07-29 2020-07-29 Line drawing method and device for whiteboard and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010744874.3A CN111913644B (en) 2020-07-29 2020-07-29 Line drawing method and device for whiteboard and readable storage medium

Publications (2)

Publication Number Publication Date
CN111913644A CN111913644A (en) 2020-11-10
CN111913644B true CN111913644B (en) 2022-06-24

Family

ID=73287730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010744874.3A Active CN111913644B (en) 2020-07-29 2020-07-29 Line drawing method and device for whiteboard and readable storage medium

Country Status (1)

Country Link
CN (1) CN111913644B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527179B (en) * 2020-12-03 2023-01-31 深圳市优必选科技股份有限公司 Scribble image recognition method and device and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598712A (en) * 2014-05-29 2015-05-06 腾讯科技(深圳)有限公司 Positioning point screening method and system
CN105160696A (en) * 2015-08-25 2015-12-16 杭州施强网络科技有限公司 Computer image drawing optimization method
CN106023279A (en) * 2016-05-09 2016-10-12 广州视睿电子科技有限公司 Curve drawing method and system
CN110297677A (en) * 2018-03-22 2019-10-01 阿里巴巴集团控股有限公司 Method for drafting, device, equipment and storage medium
CN111399493A (en) * 2018-12-29 2020-07-10 北京奇虎科技有限公司 Path display method and device of intelligent equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009199308A (en) * 2008-02-21 2009-09-03 Dainippon Screen Mfg Co Ltd Line art processor, program, and line art processing method
JP5294313B2 (en) * 2008-11-07 2013-09-18 Necシステムテクノロジー株式会社 Bezier curve drawing device, Bezier curve drawing method and program
CN105761206A (en) * 2014-12-16 2016-07-13 富泰华工业(深圳)有限公司 Point cloud splicing method and system
CN104932742B (en) * 2015-06-05 2018-05-08 惠州Tcl移动通信有限公司 A kind of touch-screen equipment obtains the method and system of multipoint operation track
CN107102833B (en) * 2016-02-22 2020-01-10 腾讯科技(深圳)有限公司 Line information interaction method and electronic equipment
CN107103634A (en) * 2017-04-20 2017-08-29 广州视源电子科技股份有限公司 Graphics track method for drafting, device, equipment and computer-readable storage medium
CN111124211A (en) * 2018-10-31 2020-05-08 杭州海康威视系统技术有限公司 Data display method and device and electronic equipment
CN111168676B (en) * 2020-01-08 2021-06-15 杭州未名信科科技有限公司 Mechanical arm hand-eye cooperation painting method and device, painting robot and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598712A (en) * 2014-05-29 2015-05-06 腾讯科技(深圳)有限公司 Positioning point screening method and system
CN105160696A (en) * 2015-08-25 2015-12-16 杭州施强网络科技有限公司 Computer image drawing optimization method
CN106023279A (en) * 2016-05-09 2016-10-12 广州视睿电子科技有限公司 Curve drawing method and system
CN110297677A (en) * 2018-03-22 2019-10-01 阿里巴巴集团控股有限公司 Method for drafting, device, equipment and storage medium
CN111399493A (en) * 2018-12-29 2020-07-10 北京奇虎科技有限公司 Path display method and device of intelligent equipment

Also Published As

Publication number Publication date
CN111913644A (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN105183316A (en) Method and apparatus for generating emotion text
CN106447295A (en) Sign-off file template generation method and apparatus thereof
CN111913644B (en) Line drawing method and device for whiteboard and readable storage medium
CN113781356A (en) Training method of image denoising model, image denoising method, device and equipment
CN112862852A (en) Image processing method and device, electronic equipment and computer readable storage medium
CN107122104B (en) Data display method and device
CN104169861A (en) Method and apparatus for combining contact information, and terminal
JP7285899B2 (en) USER IMAGE RECOGNITION MODEL UPDATE METHOD, APPARATUS, ELECTRONIC DEVICE, COMPUTER-READABLE RECORDING MEDIUM, AND COMPUTER PROGRAM
CN109146765B (en) Image processing method, main processor, coprocessor and electronic equipment
CN111144081A (en) Form generation method and device, storage medium and electronic equipment
CN111178937A (en) User reward method and device of application, electronic equipment and readable storage medium
CN109271706B (en) Hair style generation method and device
CN113407254A (en) Form generation method and device, electronic equipment and storage medium
CN111767492A (en) Picture loading method and device, computer equipment and storage medium
CN114820867B (en) Font generation method, font generation model training method and device
KR102003221B1 (en) System for generating note data and method for generating note data using the system
CN109271499A (en) Recommended method, device and the terminal device of answer user in a kind of knowledge question
CN112085103B (en) Data enhancement method, device, equipment and storage medium based on historical behaviors
CN115344187B (en) Method and device for identifying painting brush style by using safety Zhuo Huatu software
CN105740222A (en) Method and device used for reader typesetting, reader and electronic device
CN114880015A (en) Task configuration method, device, equipment and storage medium
CN104267960A (en) User interface window generation method and equipment
CN111737372A (en) Map data generation method and device
CN108961356A (en) Curve drawing drawing method, device, computer equipment and storage medium
CN108777739B (en) Electronic equipment, image display method thereof and device with storage function

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