CN112181246B - Electronic whiteboard erasing method, device, equipment and computer readable storage medium - Google Patents

Electronic whiteboard erasing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112181246B
CN112181246B CN202010991882.8A CN202010991882A CN112181246B CN 112181246 B CN112181246 B CN 112181246B CN 202010991882 A CN202010991882 A CN 202010991882A CN 112181246 B CN112181246 B CN 112181246B
Authority
CN
China
Prior art keywords
erasing
user input
current
input object
track
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
CN202010991882.8A
Other languages
Chinese (zh)
Other versions
CN112181246A (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.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital 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 Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN202010991882.8A priority Critical patent/CN112181246B/en
Publication of CN112181246A publication Critical patent/CN112181246A/en
Application granted granted Critical
Publication of CN112181246B publication Critical patent/CN112181246B/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/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
    • 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/04886Interaction 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 by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Abstract

The invention discloses an electronic whiteboard erasing method, device, equipment and a computer readable storage medium, wherein the electronic whiteboard erasing method comprises the following steps: when detecting that the mobile terminal enters an erasing mode, starting a tracking thread and an erasing thread; when the erasing operation is detected, the tracking thread tracks and records the erasing track in real time; and the erasing thread acquires the erasing track recorded in the preset period from the tracking thread once at intervals of a preset period as a current erasing track, and the erasing operation is executed based on the current erasing track. The electronic whiteboard erasing method solves the technical problem of low erasing efficiency, improves the erasing efficiency, and improves the use experience of users.

Description

Electronic whiteboard erasing method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of electronic whiteboard technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for erasing an electronic whiteboard.
Background
With the development of computer technology, the technology of information education is becoming more mature, and various education software is appearing. The whiteboard software plays a significant role in information education, can completely replace the functions of the traditional blackboard, not only can realize all the functions of the traditional blackboard, but also can realize the functions which are not available in many traditional blackboards. A common function of whiteboard software is generally input and erasure, wherein the input includes text and graphics, and the erasure can erase the input object of the user on the whiteboard.
At present, the erasing of the electronic whiteboard comprises two types, the first type is to delete the whole input object, and in this way, the erased object cannot be subjected to secondary operation any more, which is more basic. The second is that at the time of an erasing operation, an object on the screen is divided based on an erasing track, and then the divided image is redrawn on the electronic whiteboard. In this way, since the object is redrawn, the user can edit the redrawn object twice after the erasing operation.
However, in the second erasing method, the object on the electronic whiteboard needs to be divided and redrawn after the erasing operation of the user is finished. When a plurality of objects on the electronic whiteboard are erased simultaneously, time is consumed, and a user is required to wait, so that the use experience of the user is influenced.
Disclosure of Invention
The embodiment of the application provides an electronic whiteboard erasing method, and aims to solve the problem that the existing electronic whiteboard is low in erasing efficiency.
In order to achieve the above object, an embodiment of the present application provides an electronic whiteboard erasing method, including:
when the fact that the mobile terminal enters the erasing mode is detected, starting a tracking thread and an erasing thread;
when an erase operation is detected, the data is written to the memory,
the tracking thread tracks and records an erasing track in real time;
and the erasing thread acquires the erasing track recorded in the preset period from the tracking thread once at intervals of a preset period as a current erasing track, and the erasing operation is executed based on the current erasing track.
In one embodiment, the erase thread performs an erase operation based on the current erase trajectory, including:
acquiring all user input objects in the electronic whiteboard;
acquiring a user input object from all user input objects as a current user input object;
judging whether the current user input object is intersected with the current erasing track;
if the current user input object is intersected with the current user input object, performing erasing operation on the current user input object based on the current erasing track;
and if the two objects are not intersected, acquiring the next user input object until all the user input objects are traversed.
In an embodiment, the determining whether the current user input object intersects the current erase trajectory includes:
and traversing each pixel point of the current user input object, judging whether the pixel point is overlapped with the current erasing track, and if any pixel point is overlapped with the current erasing track, judging that the current user input object is intersected with the current erasing track.
In an embodiment, the determining whether the current user input object intersects the current erasure trajectory further includes, before traversing each pixel point of the current user input object, performing the steps of:
acquiring a starting point and an end point of the current user input object, and acquiring a first rectangular coverage area of the current user input object in the electronic whiteboard based on the starting point and the end point of the current user input object;
acquiring a starting point and an end point of the current erasing track, and acquiring a second rectangular coverage area of the current erasing track in the electronic whiteboard based on the starting point and the end point of the current erasing track;
judging whether an intersection exists between the first rectangular coverage area and the second rectangular coverage area;
and if so, starting to traverse each pixel point of the current user input object.
In an embodiment, the determining whether the current user input object intersects the current erase trajectory further includes, after determining that there is an intersection between the first rectangular coverage area and the second rectangular coverage area, performing the following steps:
dividing the electronic whiteboard into at least two sub-areas;
acquiring a first set of all sub-regions overlapping with the current user input object;
acquiring a second set of all sub-areas overlapped with the current erasing track;
judging whether an intersection exists between the first set and the second set;
and if so, starting to traverse each pixel point of the current input object.
In one embodiment, the performing an erase operation on a current user input object based on the current erase trajectory includes:
acquiring all non-overlapping pixel points of the current user input object and the current erasing track, and generating a redrawing object based on the non-overlapping pixel points;
and deleting the current user input object, and redrawing the redrawn object on the electronic whiteboard.
In one embodiment, when the erasing tracks are overlapped, the tracking thread records only one of the overlapped erasing tracks; and
the erasing track comprises the size of an erasing frame and a moving path of the erasing frame.
In order to achieve the above object, an embodiment of the present application further provides an electronic whiteboard erasing apparatus, including:
the detection device is used for starting a tracking thread and an erasing thread when detecting that the erasing mode is entered;
the detection tracking device is used for tracking and recording an erasing track in real time through the tracking thread when the erasing operation is detected;
and the detection erasing device is used for acquiring an erasing track recorded in a preset period once from the tracking thread at intervals of a preset period through the erasing thread as a current erasing track when the erasing operation is detected, and executing the erasing operation on the basis of the current erasing track.
In order to achieve the above object, an electronic whiteboard erasing apparatus is further provided in an embodiment of the present application, and includes a memory, a processor, and an electronic whiteboard erasing program stored in the memory and executable on the processor, where the processor implements the electronic whiteboard erasing method according to any one of the above items when executing the electronic whiteboard erasing program.
In order to achieve the above object, an embodiment of the present application further provides a computer-readable storage medium, on which an electronic whiteboard erasing program is stored, where the electronic whiteboard erasing program is executed by a processor to implement the electronic whiteboard erasing method according to any of the above items.
According to the electronic whiteboard erasing method, the tracking thread and the erasing thread are started in the erasing mode, when the erasing operation is detected, the tracking thread can track and record the erasing track in real time, the erasing track recorded in the current cycle can be obtained by the erasing thread at intervals of a preset cycle to serve as the current erasing track, and the erasing operation is executed based on the current erasing track, so that the erasing operation can be executed while the user performs the erasing action, the erasing operation does not need to be executed after the erasing action of the user is finished, the erasing time is shortened, the erasing efficiency is improved, and the using experience of the user can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a block diagram of an embodiment of an electronic whiteboard erasing apparatus according to the present invention;
fig. 2 is a schematic flowchart of an embodiment of an electronic whiteboard erasing method according to the present invention;
FIG. 3 is a timing diagram of the trace thread and erase thread of the embodiment of FIG. 2;
fig. 4 is a schematic flowchart of an electronic whiteboard erasing method according to another embodiment of the present invention;
fig. 5 is a schematic flowchart of an electronic whiteboard erasing method according to still another embodiment of the present invention;
fig. 6 is a schematic flowchart of an electronic whiteboard erasing method according to still another embodiment of the present invention;
fig. 7 is a flowchart illustrating an electronic whiteboard erasing method according to another embodiment of the present invention;
fig. 8 is a block diagram of an electronic whiteboard erasing apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
For a better understanding of the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a server 1 (also called an electronic whiteboard erasing apparatus) in a hardware operating environment according to an embodiment of the present invention.
The server provided by the embodiment of the invention comprises equipment with a display function, such as Internet of things equipment, an intelligent air conditioner with a networking function, an intelligent lamp, an intelligent power supply, AR/VR equipment with a networking function, an intelligent sound box, an automatic driving automobile, a PC, a smart phone, a tablet personal computer, an electronic book reader, a portable computer and the like.
As shown in fig. 1, the server 1 includes: memory 11, processor 12, and network interface 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the server 1, for example a hard disk of the server 1. The memory 11 may also be an external storage device of the server 1 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the server 1.
Further, the memory 11 may also include an internal storage unit of the server 1 and also an external storage device. The memory 11 may be used not only to store application software installed in the server 1 and various types of data, such as a code of the electronic whiteboard erasing program 10, but also to temporarily store data that has been output or is to be output.
The processor 12 may be, in some embodiments, a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip, and is used for executing program codes stored in the memory 11 or Processing data, such as executing the electronic whiteboard erasing program 10.
The network interface 13 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), typically used for establishing a communication connection between the server 1 and other electronic devices.
The network may be the internet, a cloud network, a wireless fidelity (Wi-Fi) network, a Personal Area Network (PAN), a Local Area Network (LAN), and/or a Metropolitan Area Network (MAN). Various devices in the network environment may be configured to connect to the communication network according to various wired and wireless communication protocols. Examples of such wired and wireless communication protocols may include, but are not limited to, at least one of: transmission control protocol and internet protocol (TCP/IP), User Datagram Protocol (UDP), hypertext transfer protocol (HTTP), File Transfer Protocol (FTP), ZigBee, EDGE, IEEE 802.11, optical fidelity (Li-Fi), 802.16, IEEE 802.11s, IEEE 802.11g, multi-hop communications, wireless Access Points (APs), device-to-device communications, cellular communication protocol, and/or bluetooth (Blue Tooth) communication protocol, or a combination thereof.
Optionally, the server may further comprise a user interface, which may include a Display (Display), an input unit such as a Keyboard (Keyboard), and an optional user interface may also include a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is used for displaying information processed in the server 1 and for displaying a visualized user interface.
While fig. 1 shows only the server 1 with components 11-13 and electronic whiteboard eraser 10, those skilled in the art will appreciate that the configuration shown in fig. 1 is not limiting of the server 1 and may include fewer or more components than shown, or some components in combination, or a different arrangement of components.
In this embodiment, the processor 12 may be configured to call the electronic whiteboard erasing program stored in the memory 11, and perform the following operations:
when detecting that the mobile terminal enters an erasing mode, starting a tracking thread and an erasing thread;
when an erase operation is detected, the data is written to the memory,
the tracking thread tracks and records an erasing track in real time;
and the erasing thread acquires the erasing track recorded in the preset period from the tracking thread once at intervals of a preset period as a current erasing track, and the erasing operation is executed based on the current erasing track.
In one embodiment, the processor 12 may be configured to call the electronic whiteboard erase program stored in the memory 11, and perform the following operations:
the erasing thread executes an erasing operation based on the current erasing track, and the erasing operation comprises the following steps:
acquiring all user input objects in the electronic whiteboard;
acquiring a user input object from all user input objects as a current user input object;
judging whether the current user input object is intersected with the current erasing track;
if the current user input object is intersected with the current user input object, performing erasing operation on the current user input object based on the current erasing track;
and if the two objects are not intersected, acquiring the next user input object until all the user input objects are traversed.
In one embodiment, the processor 12 may be configured to call the electronic whiteboard erase program stored in the memory 11, and perform the following operations:
the determining whether the current user input object intersects the current erase trajectory includes:
and traversing each pixel point of the current user input object, judging whether the pixel point is overlapped with the current erasing track, and if any pixel point is overlapped with the current erasing track, judging that the current user input object is intersected with the current erasing track.
In one embodiment, the processor 12 may be configured to call the electronic whiteboard erase program stored in the memory 11, and perform the following operations:
the judging whether the current user input object is intersected with the current erasing track further comprises executing the following steps before traversing each pixel point of the current user input object:
acquiring a starting point and an end point of the current user input object, and acquiring a first rectangular coverage area of the current user input object in the electronic whiteboard based on the starting point and the end point of the current user input object;
acquiring a starting point and an end point of the current erasing track, and acquiring a second rectangular coverage area of the current erasing track in the electronic whiteboard based on the starting point and the end point of the current erasing track;
judging whether an intersection exists between the first rectangular coverage area and the second rectangular coverage area;
and if so, starting to traverse each pixel point of the current user input object.
In one embodiment, the processor 12 may be configured to call the electronic whiteboard erase program stored in the memory 11, and perform the following operations:
the judging whether the current user input object intersects with the current erasing track further comprises the following steps of, after judging that the first rectangular coverage area and the second rectangular coverage area have intersection, executing:
dividing the electronic whiteboard into at least two sub-areas;
acquiring a first set of all sub-regions overlapping with the current user input object;
acquiring a second set of all sub-areas overlapped with the current erasing track;
judging whether an intersection exists between the first set and the second set;
and if so, starting to traverse each pixel point of the current input object.
In one embodiment, the processor 12 may be configured to call the electronic whiteboard erase program stored in the memory 11, and perform the following operations:
the executing an erasing operation on the current user input object based on the current erasing track comprises:
acquiring all non-overlapping pixel points of the current user input object and the current erasing track, and generating a redrawing object based on the non-overlapping pixel points;
and deleting the current user input object, and redrawing the redrawn object on the electronic whiteboard.
In one embodiment, the processor 12 may be configured to call the electronic whiteboard erase program stored in the memory 11, and perform the following operations:
when the erasing tracks are overlapped, the tracking thread only records one of the overlapped erasing tracks; and
the erasing track comprises the size of an erasing frame and a moving path of the erasing frame.
Based on the hardware architecture of the electronic whiteboard erasing device, the embodiment of the electronic whiteboard erasing method is provided. The electronic whiteboard erasing method aims to solve the technical problem that the existing electronic whiteboard is low in erasing efficiency so as to improve the use experience of users.
Referring to fig. 2 and fig. 3, fig. 2 is a diagram illustrating an embodiment of an electronic whiteboard erasing method according to the present invention, and fig. 3 is a timing diagram illustrating a tracking thread and an erasing thread in the embodiment illustrated in fig. 2, where the electronic whiteboard erasing method includes the following steps:
and S110, when the entering of the erasing mode is detected, starting a tracking thread and an erasing thread.
Specifically, the erasing mode is a mode in which the user performs an erasing operation on the user input object on the electronic whiteboard, and may be a specific operation interface or may be a mode in which an erasing tool such as an eraser is called. According to the electronic whiteboard erasing method, when the device is detected to enter the erasing mode, the tracking thread and the erasing thread are started at the same time.
And S120, when the erasing operation is detected, the tracking thread tracks and records the erasing track in real time.
Specifically, in the erase mode, the trace thread tracks and records the erase trace in real time as an erase operation is detected. For example, in an electronic device with a touch screen (e.g., a smart phone, a tablet computer, a touch screen notebook computer, etc.), in the erase mode, when it is detected that a user touches the touch screen, it may be considered that the user is about to perform an erase operation. At this time, the tracking thread tracks the movement track of the user's finger (or stylus) in real time, and records the erasing track by combining the size of the erasing frame. It should be noted that, since the erasing operation on the electronic whiteboard is usually implemented by means of the movement of the erasing frame on the electronic whiteboard, the erasing track recorded by the tracking thread includes the size of the erasing frame and the moving path of the erasing frame. That is, the erasing trace finally records an erasing area of the erasing frame on the electronic whiteboard.
S130, the erasing thread acquires the erasing track recorded in the preset period from the tracking thread once every preset period as a current erasing track, and erasing operation is executed based on the current erasing track.
Specifically, when the tracking thread starts to track and record the erasing track, the erasing thread acquires the erasing track recorded in the preset period from the tracking thread once every preset period as the current erasing track. The first current erasing track acquired by the erasing thread is when the tracking thread starts to track and records the erasing track at the end of the first preset period. That is, the erase trace recorded by the trace thread in each preset cycle is obtained by the erase thread at the end of one cycle. Therefore, on one hand, the erasing tracks acquired by the erasing thread every time are not repeated, and on the other hand, enough time is reserved for the erasing thread to execute the erasing operation based on the current erasing track. It is worth noting that the tracking thread can synchronize the erasing track to the erasing thread when recording the erasing track. At this time, when the erasing trace is acquired by the erasing thread every cycle, one node is marked in all the erasing traces to be used as an index. Therefore, even if the tracking thread acquires the erasing track in real time and synchronizes the erasing track to the erasing thread, the erasing thread can acquire the latest erasing track generated in each period according to the index. And when the erasing thread executes the erasing operation based on the current erasing track, erasing the user input object on the electronic whiteboard according to the current erasing track.
The electronic whiteboard erasing method has the advantages that the tracking thread and the erasing thread are started in the erasing mode, when the erasing operation is detected, the tracking thread can track and record the erasing track in real time, the erasing track recorded in the current cycle can be obtained by the erasing thread at preset intervals as the current erasing track, and the erasing operation is executed based on the current erasing track, so that the erasing operation can be executed while the user performs the erasing action, the erasing operation is not required to be executed after the erasing action of the user is finished, the erasing time is shortened, the erasing efficiency is improved, and the using experience of the user can be improved.
It is noted that the predetermined period may be 50 milliseconds, 100 milliseconds, 150 milliseconds, 200 milliseconds, 250 milliseconds, 300 milliseconds, 350 milliseconds, 400 milliseconds, 450 milliseconds, 500 milliseconds, 600 milliseconds, 700 milliseconds, 800 milliseconds, 900 milliseconds, 1 second and more.
It is further worth noting that in one embodiment, when the erase tracks overlap, the tracking thread records only one of the overlapping erase tracks. It can be understood that since the overlapped erase tracks have the same erased area, only one of the overlapped erase tracks is recorded, which can save storage resources and calculation resources of the device.
As shown in fig. 3, in an embodiment, the executing, by the erase thread, an erase operation based on the current erase track includes:
s131, all the user input objects in the electronic whiteboard are acquired.
Specifically, the user input objects refer to lines, graphics, images, colors and other contents input by a user on the electronic whiteboard, and when an erasing operation is performed, all the user input objects on the electronic whiteboard of the system need to be acquired first, and then the user input objects are erased one by one according to the current erasing track.
S132, one user input object is obtained from all the user input objects and is used as the current user input object.
Specifically, since the erasing operation is performed on each user input object one by one, when the erasing operation is performed, one user input object needs to be obtained from all the user input objects first, and the user input object is used as the user input object for which the erasing operation is currently performed.
S133, judging whether the current user input object is intersected with the current erasing track.
Specifically, after determining the current user input object and the current erasing track, before performing the erasing operation, it is determined whether the current user input object and the current erasing track intersect, that is, whether the current erasing track and the current user input object intersect.
And S134, if the current user input object is intersected with the current user input object, executing an erasing operation on the current user input object based on the current erasing track.
Specifically, if the current erase trajectory intersects with the current user input object, an erase operation is performed on the current user input object based on the current erase trajectory.
And S135, if the user input objects are not intersected, acquiring the next user input object until all the user input objects are traversed.
Specifically, if the current erasing track is not intersected with the current user input object, the next user erasing object is obtained, and whether the next user input object is intersected with the current erasing track or not is judged. Thus, the steps S132 to S315 are looped until all the user input object traversals are completed.
It can be understood that before the erasing operation is executed, whether the current user input object is intersected with the current erasing track is judged, and the erasing operation is executed only on the intersected current user input object, so that unnecessary operations can be reduced, and the erasing efficiency can be improved.
In an embodiment, the determining whether the current user input object intersects with the current erase trajectory includes:
s210, traversing each pixel point of the current user input object, judging whether the pixel point is overlapped with the current erasing track, and if any pixel point is overlapped with the current erasing track, judging that the current user input object is intersected with the current erasing track.
Specifically, when judging whether the current user input object is intersected with the current user erasing track, each pixel point of the current user input object is obtained in a traversing mode, whether the current traversed pixel point is overlapped with the current erasing track is judged while the pixel points are traversed, and if any pixel point is overlapped with the current erasing track, the current user input object is judged to be intersected with the current erasing track. The pixel points exist in the electronic whiteboard with the minimum drawing unit, and if the erasing track is the erasing area formed by the erasing frame along the self moving path. And if the pixel point is in the erasing area of the current erasing track, the pixel point is considered to be overlapped with the current erasing track. Otherwise, the two are not overlapped.
As shown in fig. 4, in an embodiment, the determining whether the current user input object intersects with the current erasing track further includes, before traversing each pixel point of the current user input object, performing the following steps:
s310, acquiring a starting point and an end point of the current user input object, and acquiring a first rectangular coverage area of the current user input object in the electronic whiteboard based on the starting point and the end point of the current user input object.
Specifically, when judging whether the current user input object intersects with the current erasing track, a starting point and an end point of the current user input object are obtained first, and a rectangular coverage area of the current user input object in the electronic whiteboard is obtained as a first rectangular coverage area based on the starting point and the end point of the current user input object as two diagonal points of a rectangular frame.
S320, acquiring a starting point and an end point of the current erasing track, and acquiring a second rectangular coverage area of the current erasing track in the electronic whiteboard based on the starting point and the end point of the current erasing track.
Specifically, while a first rectangular coverage area of a current user input object is acquired, a starting point and an end point of a current erasing track are acquired in the same manner, and the starting point and the end point of the current erasing track are used as two diagonal points of a rectangular frame, so that a rectangular coverage area of the current erasing track in the electronic whiteboard is obtained and used as a second rectangular coverage area. In other embodiments, the second rectangular coverage area may be acquired before or after the first rectangular coverage area is acquired.
S330, judging whether an intersection exists between the first rectangular coverage area and the second rectangular coverage area.
Specifically, after the first rectangular coverage area and the second rectangular coverage area are obtained, whether an intersection exists between the first rectangular coverage area and the second rectangular coverage area is judged.
And S340, if the current user input object exists, starting to traverse each pixel point of the current user input object.
Specifically, if the first rectangular coverage area and the second rectangular coverage area have an intersection, it is indicated that the current user input object and the current erasing track may intersect, and on the basis that the current user input object and the current erasing track may intersect, each pixel point of the current user input object is traversed, so that the user input object which is not necessarily intersected with the current erasing track on the electronic whiteboard can be filtered, further, the computing resources of the device can be saved, and the erasing efficiency is improved.
As shown in fig. 5, in an embodiment, the determining whether the current user input object intersects the current erase trajectory further includes, after determining that there is an intersection between the first rectangular coverage area and the second rectangular coverage area, performing the following steps:
and S410, dividing the electronic whiteboard into at least two sub-areas.
Specifically, if an intersection exists between the first rectangular coverage area and the second rectangular coverage area, it is indicated that the current erasing track may intersect with the current user input object, and in order to further judge whether the current erasing track actually intersects with the current user input object before traversing each pixel point of the user input object, after it is determined that an intersection exists between the first rectangular coverage area and the second rectangular coverage area, the electronic whiteboard is divided into at least two sub-areas. For example, in this embodiment, the electronic whiteboard is divided into 9 areas equally, in other embodiments, the electronic whiteboard may be divided into more than 2, 3, 4, 5, 6, 7, 8, and 10 sub-areas, and these sub-areas are not necessarily divided equally.
S420, acquiring a first set of all sub-regions overlapped with the current user input object.
Specifically, after dividing the sub-regions, a first set of all sub-regions overlapping with the current user input object is obtained to determine the distribution of the current user input object in all the divided sub-regions.
S430, acquiring a second set of all sub-areas overlapped with the current erasing track.
Specifically, after dividing the sub-regions, acquiring a second set of all sub-regions overlapping with the current erasing track to determine the distribution of the current erasing track in all the divided sub-regions. The first set and the second set may be acquired sequentially according to a certain sequence, or may be acquired simultaneously.
S440, judging whether an intersection exists between the first set and the second set.
Specifically, after the first set and the second set are obtained, whether an intersection exists between the first set and the second set is further judged, so that whether the current user input object and the current erasing track are distributed in the same sub-area is judged.
And S450, if yes, starting to traverse each pixel point of the current input object.
Specifically, if the intersection exists between the current user input object and the current erasing track, it is indicated that the current user input object and the current erasing track are distributed in at least the same sub-area. On the basis that the first rectangular coverage area and the second rectangular coverage area have intersection, if the first set and the second set have intersection, it is indicated that the current user input object and the current erasing track have higher possibility of intersection. At this time, traversing each pixel point of the current input object is started again to judge whether the current user input object is really intersected with the current erasing track, so that the user input objects which are not intersected with the current erasing track on the electronic whiteboard can be further filtered, further the computing resources of the equipment can be further saved, and the erasing efficiency is improved.
As shown in fig. 6, in an embodiment, the performing an erasing operation on the current user input object based on the current erasing track includes:
s510, all non-overlapping pixel points of the current user input object and the current erasing track are obtained, and a redrawing object is generated based on the non-overlapping pixel points.
Specifically, when judging whether the current user input object is intersected with the current erasing track, all pixel points of the current user input object can be traversed, and the overlapped pixel points and the non-overlapped pixel points of the current user input object and the current erasing track can be determined while the pixel points are traversed. Because the pixel points of the current user input object overlapped with the current erasing track need to be erased, the device generates a redrawn object based on the pixel points of the current user input object not overlapped with the current erasing track, wherein the redrawn object is the shape of the current user input object after being erased.
And S520, deleting the current user input object, and redrawing the redrawn object on the electronic whiteboard.
Specifically, after the redrawn object is obtained, the current user input object is deleted (that is, the data of the current user input object is deleted from the memory), and then the redrawn object is redrawn on the electronic whiteboard (that is, the redrawn object is saved in the memory). Thus, redrawing of the current user input object is completed.
In addition, referring to fig. 7, an embodiment of the present invention further provides an electronic whiteboard erasing apparatus, where the electronic whiteboard erasing apparatus includes:
the detection device is used for starting a tracking thread and an erasing thread when detecting that the erasing mode is entered;
the detection tracking device is used for tracking and recording an erasing track in real time through the tracking thread when the erasing operation is detected;
and the detection erasing device is used for acquiring an erasing track recorded in a preset period once from the tracking thread at intervals of a preset period through the erasing thread as a current erasing track when the erasing operation is detected, and executing the erasing operation based on the current erasing track.
The steps implemented by each functional module of the electronic whiteboard erasing apparatus can refer to each embodiment of the electronic whiteboard erasing method of the present invention, and are not described herein again.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, which may be any one of or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer readable storage medium includes an electronic whiteboard erasing program 10, and the specific implementation of the computer readable storage medium of the present invention is substantially the same as the specific implementation of the electronic whiteboard erasing method and the server 1, which will not be described herein again.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. An electronic whiteboard erasing method, comprising:
when detecting that the mobile terminal enters an erasing mode, starting a tracking thread and an erasing thread;
when an erase operation is detected, the data is written to the memory,
the tracking thread tracks and records an erasing track in real time;
the erasing thread acquires an erasing track recorded in the preset period from the tracking thread once at intervals of a preset period as a current erasing track, and executes erasing operation based on the current erasing track, wherein the tracking thread records one of the overlapped erasing tracks;
wherein the erasing thread performs an erasing operation based on the current erasing track, including:
acquiring all user input objects in the electronic whiteboard;
acquiring a user input object from all user input objects as a current user input object;
judging whether the current user input object is intersected with the current erasing track;
if the current user input object is intersected with the current user input object, performing erasing operation on the current user input object based on the current erasing track;
and if the two objects are not intersected, acquiring the next user input object until all the user input objects are traversed.
2. The electronic whiteboard erasing method of claim 1, wherein the determining whether the current user input object intersects the current erasing trajectory comprises:
and traversing each pixel point of the current user input object, judging whether the pixel point is overlapped with the current erasing track, and if any pixel point is overlapped with the current erasing track, judging that the current user input object is intersected with the current erasing track.
3. The electronic whiteboard erasing method of claim 2, wherein the determining whether the current user input object intersects the current erasing trajectory further comprises, before the traversing each pixel point of the current user input object, performing the steps of:
acquiring a starting point and an end point of the current user input object, and acquiring a first rectangular coverage area of the current user input object in the electronic whiteboard based on the starting point and the end point of the current user input object;
acquiring a starting point and an end point of the current erasing track, and acquiring a second rectangular coverage area of the current erasing track in the electronic whiteboard based on the starting point and the end point of the current erasing track;
judging whether an intersection exists between the first rectangular coverage area and the second rectangular coverage area;
and if so, starting to traverse each pixel point of the current user input object.
4. The electronic whiteboard erasing method of claim 3, wherein the determining whether the current user input object intersects the current erasing trajectory further comprises, after determining that there is an intersection between the first rectangular coverage area and the second rectangular coverage area, performing the steps of:
dividing the electronic whiteboard into at least two sub-areas;
acquiring a first set of all sub-regions overlapping with the current user input object;
acquiring a second set of all sub-areas overlapped with the current erasing track;
judging whether an intersection exists between the first set and the second set;
and if so, starting to traverse each pixel point of the current user input object.
5. The electronic whiteboard erasing method of claim 1, wherein the performing an erasing operation on the current user input object based on the current erasing track comprises:
acquiring all non-overlapping pixel points of the current user input object and the current erasing track, and generating a redrawing object based on the non-overlapping pixel points;
and deleting the current user input object, and redrawing the redrawn object on the electronic whiteboard.
6. The electronic whiteboard erasing method of any one of claims 1 to 5,
when the erasing tracks are overlapped, the tracking thread only records one of the overlapped erasing tracks; and
the erasing track comprises the size of an erasing frame and a moving path of the erasing frame.
7. An electronic whiteboard erasing apparatus, comprising:
the detection device is used for starting a tracking thread and an erasing thread when detecting that the erasing mode is entered;
the detection tracking device is used for tracking and recording an erasing track in real time through the tracking thread when the erasing operation is detected;
the detection erasing device is used for acquiring an erasing track recorded in a preset period once from the tracking thread at intervals of a preset period through the erasing thread as a current erasing track when the erasing operation is detected, and executing the erasing operation on the basis of the current erasing track;
wherein, the detecting and erasing device is further configured to:
acquiring all user input objects in the electronic whiteboard;
acquiring a user input object from all user input objects as a current user input object;
judging whether the current user input object is intersected with the current erasing track;
if the current user input object is intersected with the current user input object, performing erasing operation on the current user input object based on the current erasing track;
and if the two paths are not intersected, acquiring the next user input object until all the user input objects are traversed, wherein the tracking thread records one of the overlapped erasing tracks.
8. An electronic whiteboard erasing apparatus comprising a memory, a processor and an electronic whiteboard erasing program stored on the memory and operable on the processor, the processor implementing the electronic whiteboard erasing method according to any one of claims 1 to 6 when executing the electronic whiteboard erasing program.
9. A computer-readable storage medium, on which an electronic whiteboard erasing program is stored, which, when executed by a processor, implements the electronic whiteboard erasing method according to any one of claims 1 to 6.
CN202010991882.8A 2020-09-18 2020-09-18 Electronic whiteboard erasing method, device, equipment and computer readable storage medium Active CN112181246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010991882.8A CN112181246B (en) 2020-09-18 2020-09-18 Electronic whiteboard erasing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010991882.8A CN112181246B (en) 2020-09-18 2020-09-18 Electronic whiteboard erasing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112181246A CN112181246A (en) 2021-01-05
CN112181246B true CN112181246B (en) 2022-06-10

Family

ID=73957069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010991882.8A Active CN112181246B (en) 2020-09-18 2020-09-18 Electronic whiteboard erasing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112181246B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905092B (en) * 2021-02-22 2023-07-07 深圳市康冠商用科技有限公司 Method and device for adjusting erasure control, electronic equipment and storage medium
CN113282214A (en) * 2021-05-21 2021-08-20 Oppo广东移动通信有限公司 Stroke rendering method, device, storage medium and terminal
CN114003145B (en) * 2021-11-01 2024-01-09 深圳市康冠商用科技有限公司 Touch screen writing and erasing method and device, electronic whiteboard and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016201003A (en) * 2015-04-10 2016-12-01 コニカミノルタ株式会社 Hand writing input device, hand writing input method and program
CN106127685B (en) * 2016-06-29 2020-02-14 福建天泉教育科技有限公司 Method and system for quickly erasing lines
CN106650648B (en) * 2016-12-12 2020-04-03 广东威创视讯科技股份有限公司 Recognition method and system for erasing handwriting
CN109032463B (en) * 2018-07-19 2019-11-05 掌阅科技股份有限公司 Take down notes method for deleting, electronic equipment and computer storage medium
CN111524211B (en) * 2020-04-17 2024-01-23 杭州海康威视数字技术股份有限公司 Handwriting erasing method, handwriting erasing device and handwriting erasing equipment

Also Published As

Publication number Publication date
CN112181246A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN112181246B (en) Electronic whiteboard erasing method, device, equipment and computer readable storage medium
CN106776514B (en) Annotating method and device
US10614120B2 (en) Information search method and device and computer readable recording medium thereof
CN106201170B (en) A kind of the footmark processing method and terminal of application icon
CN107463331B (en) Gesture track simulation method and device and electronic equipment
CN110555073A (en) data processing method and device, electronic equipment and storage medium
CN104536694A (en) Method for rapidly starting application of mobile terminal and mobile terminal
CN105573484A (en) Projection method and terminal
CN108932141A (en) Copy drawing implementation method and device, electronic equipment, storage medium
CN115469954A (en) Canvas-based image annotation method and Canvas-based image annotation system
CN112132654A (en) Method, device and storage medium for displaying house source information
CN106445344A (en) Screenshot processing method and device
CN104133682A (en) Information processing method and device
CN107728875A (en) A kind of switching method of functional mode, device and intelligent terminal
CN105138253A (en) Method and device for batch processing of pictures
CN105320406A (en) Picture management method and terminal
JP2018200614A (en) Display control program, display control method, and display control device
CN103412717A (en) Method and mobile equipment for quickly positioning tops or tail ends of lists
CN110058938B (en) Memory processing method and device, electronic equipment and readable medium
CN108334251B (en) View multiplexing method and device
CN110502419A (en) A kind of test method of graphic user interface, device and equipment
CN110989895B (en) Control display state detection method and device
CN114443022A (en) Method for generating page building block and electronic equipment
CN112181586A (en) Workflow processing method and device based on Kubernetes architecture
CN108491139B (en) Object fixing method and device, terminal equipment and storage medium

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