CN109215098B - Handwriting erasing method and device - Google Patents

Handwriting erasing method and device Download PDF

Info

Publication number
CN109215098B
CN109215098B CN201810948890.7A CN201810948890A CN109215098B CN 109215098 B CN109215098 B CN 109215098B CN 201810948890 A CN201810948890 A CN 201810948890A CN 109215098 B CN109215098 B CN 109215098B
Authority
CN
China
Prior art keywords
erasing
track
color value
pixel points
handwriting
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
CN201810948890.7A
Other languages
Chinese (zh)
Other versions
CN109215098A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810948890.7A priority Critical patent/CN109215098B/en
Publication of CN109215098A publication Critical patent/CN109215098A/en
Application granted granted Critical
Publication of CN109215098B publication Critical patent/CN109215098B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/80Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • User Interface Of Digital Computer (AREA)
  • Drawing Aids And Blackboards (AREA)

Abstract

The invention discloses a handwriting erasing method and device. Wherein, the method comprises the following steps: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasing track; and executing the erasing operation according to the target color value. The invention solves the technical problem that in the prior art, when handwriting overlaps, one color cannot be selected to execute erasing operation.

Description

Handwriting erasing method and device
Technical Field
The invention relates to the field of control of intelligent interactive panels, in particular to a handwriting erasing method and a handwriting erasing device.
Background
After a user writes by using a handwriting of one color and annotates by using the handwriting of other colors, if the annotated content covers the original written handwriting, the handwriting of multiple colors are overlapped. In such a case, if the user only wants to erase the handwriting of one of the colors, it cannot be realized in the prior art.
Aiming at the problem that in the prior art, when handwriting overlaps, one color cannot be selected to execute an erasing operation, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a handwriting erasing method and a handwriting erasing device, which at least solve the technical problem that in the prior art, when handwriting is overlapped, one color cannot be selected to execute erasing operation.
According to an aspect of an embodiment of the present invention, there is provided a method for erasing a handwriting, including: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track; and executing the erasing operation according to the target color value.
Further, performing an erase operation according to the target color value, including: erasing pixel points covered by the erasing track; and performing rollback processing on the pixel points of which the color values are not the target color values in the erased pixel points.
Further, the erasing track is processed in a segmented mode, and whether the current recording time reaches a corresponding time threshold value or not is detected before the target color value with the most pixels is determined according to the number of pixels of each color value covered by the erasing track; and if the recording time reaches the time threshold, determining that the recording of the erasing track of the current segment is finished, entering a step of determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track, and if not, continuing to record the erasing track of the current segment.
Further, before detecting whether the current recording time reaches the corresponding preset recording time, acquiring a time threshold corresponding to the erased handwriting of the current segment, including: if the erasing handwriting of the current section is the first erasing handwriting, the time threshold corresponding to the erasing handwriting of the current section is a preset initial time threshold; and if the current section of the erased handwriting is not the first section of the erased handwriting, acquiring the running speed of the erasing control in the previous section of the erased handwriting, and determining the time threshold corresponding to the current section of the erased handwriting according to the running speed, wherein the time threshold corresponding to the current section of the erased handwriting is in an inverse proportion relation with the running speed.
Further, obtaining the running speed of the erasing control in the previous section of erasing handwriting comprises: and determining the running speed of the erasing control according to the time threshold corresponding to the last erasing handwriting and the number of control points generated by the erasing control in the last erasing handwriting.
According to another aspect of the embodiments of the present invention, there is also provided a method for erasing a handwriting, including: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; erasing the contents of all pixel points covered by the erasing track; determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasing track; and redrawing pixel points of all color values except the target color value.
According to another aspect of the embodiments of the present invention, there is also provided a handwriting erasing apparatus, including: the recording module is used for recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; the determining module is used for determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track; and the erasing module is used for executing the erasing operation according to the target color value.
Further, the determining module includes: the searching submodule is used for searching the color value with the most pixel points in the color value covered by the erased track; and the determining submodule is used for determining the maximum color value as the target color value.
Further, the erase module includes: the erasing submodule is used for erasing the pixel points covered by the erasing track; and the rollback submodule is used for performing rollback processing on the pixel points of which the color values are not the target color values in the erased pixel points.
According to another aspect of the embodiments of the present invention, there is also provided a handwriting erasing apparatus, including: the recording module is used for recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; the erasing module is used for erasing the contents of all the pixel points covered by the erasing track; the determining module is used for determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track; and the redrawing module is used for redrawing pixel points of all color values except the target color value.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, wherein the storage medium includes a stored program, and wherein, when the program runs, the apparatus on which the storage medium is controlled performs the following steps: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasing track; and executing an erasing operation according to the target color value.
According to another aspect of the embodiments of the present invention, there is further provided a processor, wherein the processor is configured to execute a program, and the program executes the following steps: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track; and executing an erasing operation according to the target color value.
In the embodiment of the invention, the erasing track is recorded, and the target color value with the most pixels is determined according to the number of the pixels of each color value covered by the erasing track; the erasing operation is executed according to the target color value, so that the effect of erasing only one color value in multiple color values is achieved, the aim of fine erasing is also achieved, and the technical problem that one color cannot be selected to execute the erasing operation when handwriting overlaps in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method for erasing a handwriting according to embodiment 1 of the invention;
fig. 2 is a schematic diagram of a whiteboard interface having writing scripts according to embodiment 1 of the present invention;
FIG. 3 is a schematic diagram of an erase track according to embodiment 1 of the present invention;
fig. 4 is a schematic diagram after an erasing process is performed on the example in fig. 3 according to embodiment 1 of the present invention;
FIG. 5 is a flowchart illustrating a method for erasing pen data according to embodiment 2 of the present invention;
FIG. 6 is a flowchart illustrating a method for erasing pen data according to embodiment 3 of the present invention;
FIG. 7 is a schematic diagram of a handwriting erasing apparatus according to embodiment 4 of the present invention;
FIG. 8 is a schematic diagram of a handwriting erasing apparatus according to embodiment 5 of the present invention; and
FIG. 9 is a schematic diagram of a handwriting erasing apparatus according to embodiment 6 of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for handwriting erasure, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
FIG. 1 is a flow chart of a handwriting erasure method according to an embodiment of the invention.
The handwriting erasing method provided by this embodiment may be executed by a writing display device, where the writing display device may be implemented in a software and/or hardware manner, and the writing display device may be formed by two or more physical entities, or may be formed by one physical entity. The writing display device can be a computer, a mobile phone, a tablet, a projector or an intelligent interactive tablet and the like. In an embodiment, an intelligent interactive tablet is described as an example of a writing display device, where the intelligent interactive tablet may be an integrated device that controls content displayed on a display tablet and implements human-computer interaction operations through a touch technology, and integrates one or more functions of a projector, an electronic whiteboard, a curtain, a sound, a television, a video conference terminal, and the like.
In an embodiment, the smart interactive tablet establishes a data connection with at least one external device. Among these, external devices include, but are not limited to: mobile phones, notebook computers, USB flash disks, tablet computers, desktop computers, and the like.
The embodiment of the communication mode of the data connection between the external device and the intelligent interactive tablet is not limited, and the communication mode can be a USB connection mode, an Internet, a local area network, a Bluetooth mode, a Wi-Fi mode or a ZigBee mode and the like.
Further, the smart interactive tablet has a touch screen, and the touch screen may be a touch screen capable of implementing a single touch function, for example: capacitive touch screens, electromagnetic touch screens, and also touch screens capable of simultaneously realizing capacitive sensing, electromagnetic sensing, and infrared sensing. When a user touches the touch screen of the intelligent interaction panel through a finger, the capacitance parameter of the touch position changes, and the touch frame determines the touch position of the finger on the touch screen according to the change of the capacitance; or when the finger contacts the touch frame, the infrared receiving end is blocked to receive the infrared signal, and the touch frame determines the touch position of the finger according to the blocked infrared signal; or when the user releases the touch screen by using the electromagnetic pen, the position of the electromagnetic pen contacted with the touch screen is subjected to electromagnetic induction, so that the change of magnetic flux is generated, and the position of the electromagnetic pen contacted with the touch screen is determined by the electromagnetic screen of the touch frame according to the change of the magnetic flux.
Optionally, the intelligent interactive tablet is installed with whiteboard application software, and the whiteboard application software may be installed in the intelligent interactive tablet in advance, or may be downloaded from a third-party device or a server and installed with writing application software for use when the intelligent interactive tablet is started. The third party device is not limited in the embodiment. Specifically, the whiteboard application software is used for acquiring the operation of a finger or an electromagnetic pen of a user in a writing interface, acquiring a plurality of control points according to the operation of the user, and generating the writing handwriting of the user according to the control points. The intelligent interactive tablet further displays the generated handwriting on the display screen, and parameters such as color, thickness and the like of the handwriting displayed on the display screen can be defaulted by the whiteboard application software or can be selected by a user through the control before writing. After the writing is generated, the whiteboard application software provides an erasing function for erasing the displayed writing. The handwriting erasing mode of the eraser can be that after the user selects the eraser, the eraser is moved so that the moving track of the eraser covers the handwriting to be erased. According to the movement of the eraser, the white board application software sets the color value of the pixel point covered by the eraser to be 0, so that the effect of erasing handwriting is achieved.
As shown in fig. 1, the method includes the following steps:
step S101, an erasing track is recorded, wherein the erasing track covers a plurality of pixel points with different color values.
Specifically, the color value may be an RGB value, and the pixels having different color values exhibit different colors. The pixel point is the basic unit that shows the image in the display screen, and the display screen shows complete image through information such as position, colour value, luminance that express the pixel point.
The erasing track is generated according to the moving track of the eraser. In an optional embodiment, the user selects an eraser control in the whiteboard application software, then the eraser is used for moving on the display interface, the intelligent interactive tablet determines the moving track of the eraser by detecting the position of the eraser, and the detected moving track of the eraser is the erasing track. More specifically, in the process of moving the eraser, the intelligent interactive tablet detects a plurality of control points in the moving process, so that an erasing track is generated according to the control points.
In the above steps, the erasing track covers the plurality of pixel points with different color values. Fig. 2 is a schematic diagram of a whiteboard interface having writing scripts according to embodiment 1 of the present invention, and in conjunction with fig. 2, the "start" is a black writing script, and a red annotation line is included below the black font (illustrated by a thicker black line). The pixel point of the start and the pixel point of the lower batch mark are the pixel points with different color values.
Fig. 3 is a schematic diagram of an erasing track according to an embodiment of the present invention, and as shown in fig. 3, a rectangular frame in the diagram is used to indicate the erasing track (the erasing track is only used as an example, and an actual erasing track is not transparent and is not necessarily in a regular shape).
Step S103, determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track.
The maximum target color value of the pixel points is used for representing the color value which needs to be erased finally in the erasing operation.
The canvas is provided with a plurality of pixel points, and the handwriting display actually renders the pixel points into corresponding color values, so that the positions of the pixel points are in colors corresponding to the color values. If the pixel points covered by the erasing track are all in the same color, the handwriting can be erased according to the erasing track, but in the step S101, the erasing track covers the pixel points with various different color values, so that only one of the pixel points is difficult to erase under the condition that the pixel points with different color values are close to or overlapped with each other, and when a user only needs to erase the pixel with one color value, the target color value needs to be determined. The method comprises the following specific steps:
and step S1031, searching the color value with the most pixel points in the color values covered by the erasing track.
In step S1031, when the user uses the eraser to erase, the color value of the area covered by the erase track with the larger size is the color value of the area covered with more pixels.
Still taking fig. 3 as an example, the erasing track covers pixels of two colors, namely red and black, in this example, the number of covered red pixels is larger, and therefore the color value corresponding to red is the target color value of this erasing.
In step S1033, the maximum color value is determined as the target color value.
When a user erases handwriting, if the handwriting to be erased is close to or overlaps with other handwriting, the erasing track is difficult to avoid other colors to be erased, and therefore the erasing track covers other colors which do not need to be erased. Although the erasing track is difficult to avoid the color which does not need to be erased, the maximum covered target color which still needs to be erased is determined as the target color value based on the presumption.
According to the scheme, the color value with the largest number of the erased tracks covered by the pixels with different color values is determined to be the target color value which needs to be actually erased by the user, so that the color value which needs to be actually erased by the user is presumed, and the purpose of predicting the user behavior is achieved.
In the example shown in fig. 3, the erasing trace covers pixels with two different color values, and the red color value with a larger number of covered pixels is selected as the target color value, but this example is only used to explain the principle of the present solution, and the present solution does not specifically limit the number of each color value covered by the erasing trace.
In a specific embodiment, the number of covered pixel values of two colors is the same, and the color value of the pixel covered by the first erased track can be selected as the target color value.
And step S105, executing an erasing operation according to the target color value.
The step is to execute the erasing operation of the user at this time according to the predicted target color value. The method specifically comprises the following steps:
and step S1051, erasing the pixel points covered by the erasing track.
Specifically, erasing the pixel covered by the erasing track may be to set a color value of the pixel covered by the erasing track to 0, or set a color value of the pixel covered by the erasing track to a background color of the current canvas.
Step S1053, performing rollback processing on the pixel point whose color value is not the target color value among the erased pixel points.
Specifically, the rollback processing refers to an action of restoring the program or data to the previous state. In the solution of this embodiment, the rollback processing refers to restoring a pixel having a color value that is not the target color value to a previous state before the erasure.
After step S1051, the pixel points whose color values are not the target color values are also erased together, and the previous state of the pixel points whose color values are not the target color values is the state that is not erased, so after step S1053, the pixel points whose color values are not the target color values recover the previous color values. Therefore, after the whole erasing process is finished, the final display result of the canvas is that the pixel points with the target color values are erased and the pixel points which are not the target color values are reserved.
Fig. 4 is a schematic diagram of the example in fig. 3 after the erasing processing is performed according to embodiment 1 of the present invention, and in combination with fig. 4, the target color value is a color value corresponding to red, after all the pixels covered by the erasing track are erased, the red and black pixels covered by the erasing track are erased, and after the rollback processing is performed, the black pixels with non-target color values are rolled back, so that the effect shown in fig. 4 is obtained.
As can be known from the combination of FIGS. 3 and 4, even if the red handwriting and the black handwriting in the drawings overlap, the effect of erasing only one of the colors is achieved by the method provided by the above embodiment.
According to the erasing mode provided by the embodiment of the application, the erasing track is recorded, and the maximum target color value of the pixel points is determined according to the number of the pixel points of each color value covered by the erasing track; and executing the erasing operation according to the target color value, thereby achieving the effect of erasing only one color value in the multiple color values, also realizing the aim of fine erasing, and solving the technical problem that one color can not be selected to execute the erasing operation when handwriting overlaps in the prior art.
Example 2
Fig. 5 is a flowchart of a handwriting erasing method according to embodiment 2 of the present invention. The present embodiment is embodied on the basis of embodiment 1 described above.
The embodiment 1 of the application provides a technical scheme for solving the problem that in the prior art, when handwriting overlaps, one color cannot be selected to execute an erasing operation. According to the steps S1051 to S1053, the scheme is that after all pixel points covered by the handwriting are clearly erased, the pixel points which are not in the target color value are rolled back, so that the visual effect which is generated by the user and is not in the target color value disappears firstly and then, in order to reduce the influence brought by the visual effect, a better display mode is achieved, and the handwriting erasing method of the embodiment 2 is further provided.
In the handwriting erasing method of embodiment 2, the handwriting is segmented and segmented, which is specifically described below. Referring to fig. 5, the handwriting erasing method provided in embodiment 2 includes:
step S501, an erasing trace is recorded, where the erasing trace covers a plurality of pixels with different color values.
Specifically, in the present solution, the erasure track is processed in segments.
Step S503, acquiring a time threshold corresponding to the erasure script of the current segment.
Specifically, the time threshold is used for performing segmentation processing on the erased handwriting, that is, processing the erased track recorded within a time threshold, rather than processing a continuous erased track all at once. The specific acquisition mode is as follows:
step S5031, if the current segment of erased handwriting is the first segment of erased handwriting, the time threshold corresponding to the current segment of erased handwriting is a preset initial time threshold.
Specifically, the current erasing trace is the erasing trace currently recorded, and the first erasing trace is the erasing trace recorded from the down point. Because the erasing track before the first erasing track does not exist in a continuous erasing track, the maximum time threshold of the first-selected pixel points cannot be referred by the running speed of the erasing control in the last erasing track, and the time threshold corresponding to the erasing handwriting is determined by a preset mode.
In an alternative embodiment, the initial time threshold may be preset, for example, 100ms.
Step S5033, if the current segment of erased handwriting is not the first segment of erased handwriting, obtaining the running speed of the erasing control in the previous segment of erased handwriting, and determining the time threshold corresponding to the current segment of erased handwriting according to the running speed, wherein the time threshold corresponding to the current segment of erased handwriting is in a proportional relationship with the running speed.
Specifically, the erasing control is a movable erasing control which is displayed on a writing interface after the user selects an eraser, and the erasing interface is used for moving according to the control of the user and generating an erasing track.
Because the time for the user to erase is usually short, and the time threshold selected by the above scheme is in millimeter level, it can be considered that the moving speed of the erasing control in the two continuous erasing tracks is not changed greatly in the erasing process, and therefore the erasing speed of the erasing control in the previous erasing track is used to judge the erasing speed of the erasing track at the current end.
In order to present a better display effect, a user can not feel the process that pixel points of non-target color values disappear and appear as far as possible, the user needs to process a section of erasing track with proper length and record a section of erasing track, so that the time threshold corresponding to the erasing handwriting of the current section is set to be in inverse proportion to the running speed, namely if the speed of the erasing control moving end is high, the corresponding time threshold is short, and if the speed of the erasing control moving end is low, the corresponding time threshold is long.
Obtaining the running speed of the erasing control in the previous section of erasing handwriting, which specifically comprises the following steps:
step S50331, determining the running speed of the erasing control according to the time threshold corresponding to the previous segment of erasing handwriting and the number of control points generated by the erasing control in the previous segment of erasing handwriting.
Specifically, in the time threshold corresponding to the previous segment of erased handwriting, the greater the number of control points, the faster the operation speed of the erasing control is.
In an alternative embodiment, the number of the control points generated by erasing the handwriting in the unit time can be determined according to the time threshold corresponding to the previous segment of the erasing handwriting and the number of the control points, so as to determine the running speed of the erasing control. For example: the time threshold corresponding to the previous erasing trace is 100ms, 1000 control points are generated by the previous erasing trace, and the unit time is 10ms, so that the running speed of the erasing control in the previous erasing trace is 100/10 ms.
Step S505, it is detected whether the current recording time reaches a corresponding time threshold.
Specifically, the time threshold corresponding to the current recording time is the time threshold corresponding to the current segment of erased handwriting.
For the first segment of erasing handwriting, the starting point for recording time is the down point of the erasing control; for the non-first segment of erased handwriting, the starting point of the current recording time is the time point when the last segment of erased handwriting ends.
In an optional embodiment, taking the first segment of the erasing handwriting as an example, when the erasing control contacts the touch screen to generate a down point, timing is started, and in the timing process, whether the timing reaches an initial time threshold value is judged.
Step S507, if the recording time reaches the time threshold, the erasing track of the current segment is determined to be recorded completely, the step of determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track is carried out, and if not, the erasing track is continuously recorded.
In an optional embodiment, taking the first segment of the erased handwriting as an example, when the erasing control contacts the touch screen to generate a down point, timing is started, and in the timing process, whether the timing reaches an initial time threshold value is judged. When the timing time reaches the initial time threshold, it is determined that the recording of the first segment of erased handwriting is completed, and then the first segment of erased track is processed (i.e., step S506 is entered), and the next segment of erased track is recorded.
Step S509, determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasure track.
In step S5011, an erasing operation is performed according to the target color value.
Example 3
Fig. 6 is a flowchart of a handwriting erasing method according to embodiment 3 of the present invention. This embodiment is an alternative to embodiment 2. As shown in fig. 6, this step includes:
in step S61, the user writes with color a and annotates with color B.
A particular user writes and annotates on the whiteboard application using two different colors.
Step S62 enters the erase mode and starts moving the eraser from a desired color position.
Specifically, when the user selects an eraser in the whiteboard application software, the erase mode is entered. If the user wishes to erase the written script, the eraser is moved from the A color, and if the user wishes to erase the endorsement script, the eraser is moved from the B color.
And step S63, recording the track of each moving of the eraser.
Specifically, the trajectory of the eraser movement may be recorded by recording the control point of the eraser movement.
And S64, after the specified time threshold is reached, analyzing the erased handwriting, and confirming the color of the most erased handwriting as the color X to be erased at this time.
In the above step S64, when the recorded time reaches the specified time threshold, the process of the erasing operation for the one piece of the erasing track is started.
Each segment in the erase track is processed separately according to a specified time threshold, i.e.
Specifically, the color X is one of the color a and the color B, which is the target color of the erasing. The most erased handwriting color refers to the most erased color of the pixel points covered by the erasing track, and the color is considered to be the color which the user actually expects to erase.
And step S65, rolling back the handwriting except the non-color X.
The steps are used for rolling back other erased colors which are not the target color, so that the handwriting effect of erasing only the color X is obtained.
And step S66, repeating the steps S64-S65, thereby erasing the predetermined handwriting.
Step S65 performs corresponding erasing processing on the erasing trace recorded in step S64, and then returns to step S64 to continue processing the erasing trace recorded in the next time threshold.
And step S67, ending.
Example 4
The present embodiment provides an embodiment of a method for erasing handwriting, and fig. 7 is a schematic diagram of a method for erasing handwriting according to embodiment 4 of the present invention. As shown in fig. 7, the method includes:
step S71, recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values.
Specifically, the color value may be an RGB value, and the pixels having different color values exhibit different colors. The pixel point is the basic unit that shows the image in the display screen, and the display screen shows complete image through information such as position, colour value, luminance that express the pixel point.
The erasing track is generated according to the moving track of the eraser. In an optional embodiment, the user selects an eraser control in the whiteboard application software, then the eraser is used for moving on the display interface, the intelligent interactive panel determines the moving track of the eraser by detecting the position of the eraser, and the detected moving track of the eraser is the erasing track. More specifically, in the process of moving the eraser, the intelligent interactive panel detects a plurality of control points in the moving process, so that an eraser number track is generated according to the control points.
In the above steps, the erasing track covers the plurality of pixel points with different color values. As shown in connection with fig. 2, the "start" is a black writing script, including red stippling lines (illustrated by thicker black lines in the figure) under the black font. The pixel point of the 'start' and the pixel point of the lower batch mark are the pixel points with different color values.
With reference to fig. 3, a rectangular frame in the figure is used to indicate an erasing track (the erasing track is only used as an example, and an actual erasing track is not transparent, and is not necessarily in a regular shape).
And S73, erasing the contents of all the pixel points covered by the erasing track.
Specifically, the erasing of the content of the pixel covered by the erasing track may be to set the color value of the pixel covered by the erasing track to 0, or to set the color value of the pixel covered by the erasing track to the background color of the current canvas.
And step S75, determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track.
The canvas is provided with a plurality of pixel points, and the handwriting display actually renders the pixel points into corresponding color values, so that the positions of the pixel points are in colors corresponding to the color values. If the pixel points covered by the erasing track are all in the same color, the handwriting can be erased according to the erasing track, but in the step S71, the erasing track covers the pixel points with various different color values, so that only one of the pixel points is difficult to erase under the condition that the pixel points with different color values are close to or overlapped, and therefore when a user only needs to erase the pixel with one color value, the target color value needs to be determined. In the above step, the color value of the pixel with the largest number is used as the target color value.
Step S77, redrawing all the pixels with color values except the target color value.
Specifically, redrawing refers to restoring a pixel point whose color value is not the target color value to a state before erasing.
After step S75, the pixels of all color values except the target color value are erased, and after step S77, the pixels of all color values except the target color value are redrawn, so as to restore to the color value before being erased. Therefore, after the whole erasing process is finished, the final display result of the canvas is that the pixel points with the target color values are erased and the pixel points with all color values except the target color values are reserved.
As shown in fig. 4, the target color value is a color value corresponding to red, after all the pixel points covered by the erasing track are erased, the red and black pixel points covered by the erasing track are erased, and after the redrawing process, the black pixel points outside the target color value are redrawn, so that the effect shown in fig. 4 is obtained.
As can be seen from fig. 3 and 4, even if the red handwriting and the black handwriting in the drawings overlap, the effect of erasing only one of the colors is achieved by the method provided by the above embodiment.
By the above, the erasing track is recorded in the above embodiment of the application, wherein the erasing track covers the pixels with different color values, the content of all the pixels covered by the erasing track is erased, the target color value with the most pixels is determined according to the number of the pixels with each color value covered by the erasing track, and the pixels with all color values except the target color value are redrawn. According to the scheme, all pixel points covered by the erasing track are erased, and the pixel points of the target color value are redrawn, so that the effect of only erasing one color value in multiple color values is achieved, the purpose of fine erasing is also achieved, and the technical problem that one color cannot be selected to execute erasing operation when handwriting overlaps in the prior art is solved.
Example 5
This embodiment provides a handwriting erasing apparatus for implementing the handwriting erasing methods in embodiments 1 and 2, and fig. 8 is a schematic diagram of a handwriting erasing apparatus provided in embodiment 5 of the present invention. As shown in fig. 8, the apparatus includes:
a recording module 80, configured to record an erasing trace, where the erasing trace covers a plurality of pixel points with different color values;
the determining module 82 is configured to determine, according to the number of pixels of each color value covered by the erasure track, a target color value having the largest number of pixels;
and the erasing module 84 is used for executing an erasing operation according to the target color value.
Optionally, according to the foregoing embodiment of the present application, the determining module includes: and the searching submodule is used for searching the color value with the most pixel points in the color value covered by the erasing track. And the determining submodule is used for determining the maximum color value as the target color value.
Optionally, according to the above embodiment of the present application, the erasing module includes: and the erasing submodule is used for erasing the pixel points covered by the erasing track. And the rollback submodule is used for performing rollback processing on the pixel points of which the color values are not the target color values in the erased pixel points.
Optionally, according to the above embodiment of the present application, the erasing track is segmented, and the apparatus further includes, according to the number of the pixel points of each color value covered by the erasing track: the detection module is used for detecting whether the current recording time reaches a corresponding time threshold before determining the target color value with the most pixel points; and the determining module is used for determining that the erasing track of the current section is completely recorded if the recording time reaches the time threshold, entering a step of determining the maximum target color value of the pixels according to the number of the pixels of each color value covered by the erasing track, and otherwise, continuously recording the erasing track of the current section.
Optionally, according to the above embodiment of the present application, before detecting whether the current recording time reaches the corresponding preset recording time, the apparatus further includes: the acquisition module is used for acquiring a time threshold corresponding to the erased handwriting of the current segment, and comprises: the determining submodule is used for determining that the time threshold corresponding to the erasing handwriting of the current section is a preset initial time threshold if the erasing handwriting of the current section is the first erasing handwriting; and the obtaining submodule is used for obtaining the running speed of the erasing control in the previous section of erasing handwriting if the erasing handwriting of the current section is not the first section of erasing handwriting, and determining the time threshold corresponding to the erasing handwriting of the current section according to the running speed, wherein the time threshold corresponding to the erasing handwriting of the current section is in an inverse proportion relation with the running speed.
Optionally, according to the foregoing embodiment of the present application, the obtaining sub-module includes: and the determining unit is used for determining the running speed of the erasing control according to the time threshold corresponding to the previous section of erasing handwriting and the number of the control points generated by the erasing control in the previous section of erasing handwriting.
Example 6
This embodiment provides a handwriting erasing apparatus for implementing the handwriting erasing method in embodiment 4, and fig. 9 is a schematic diagram of a handwriting erasing apparatus provided in embodiment 6 of the present invention. As shown in connection with fig. 9, the apparatus includes:
the recording module 90 is configured to record an erasing trace, where the erasing trace covers a plurality of pixels with different color values.
And the erasing module 92 is configured to erase the contents of all the pixels covered by the erasing track.
The determining module 94 is configured to determine, according to the number of pixels of each color value covered by the erasure track, a target color value having the largest number of pixels.
And the redrawing module 96 is used for redrawing pixel points of all color values except the target color value.
Example 7
The present embodiment provides a storage medium, which includes a stored program, and when the program runs, controls a device on which the storage medium is located to execute the following steps: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasing track; and executing an erasing operation according to the target color value.
Example 8
The present embodiment provides a processor, configured to execute a program, where the program executes the following steps: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasing track; and executing an erasing operation according to the target color value.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be 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, units or modules, and may be in an electrical 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 position, or may be distributed on a plurality of 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 integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit 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 may be embodied in the form of a software product, which is stored in a storage medium and includes 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: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for erasing a handwriting, comprising:
recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values;
determining the maximum target color value of the pixels according to the number of the pixels of each color value covered by the erasing track;
executing an erasing operation according to the target color value;
executing an erasing operation according to the target color value, including:
erasing the pixel points covered by the erasing track;
and performing rollback processing on the pixel points of which the color values are not the target color values in the erased pixel points.
2. The method of claim 1, wherein the erasure track is segmented, and before determining the target color value with the largest number of pixels according to the number of pixels of each color value covered by the erasure track, the method further comprises:
detecting whether the current recording time reaches a corresponding time threshold value;
and if the recording time reaches the time threshold, determining that the recording of the erasing track of the current segment is finished, entering a step of determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track, and if not, continuing to record the erasing track of the current segment.
3. The method of claim 2, wherein before detecting whether the current recording time reaches the corresponding preset recording time, the method further comprises: acquiring a time threshold corresponding to the erasure handwriting of the current segment, wherein the time threshold comprises the following steps:
if the erasing handwriting of the current section is the first erasing handwriting, the time threshold corresponding to the erasing handwriting of the current section is a preset initial time threshold;
and if the current section of erased handwriting is not the first section of erased handwriting, acquiring the running speed of an erasing control in the previous section of erased handwriting, and determining the time threshold corresponding to the current section of erased handwriting according to the running speed, wherein the time threshold corresponding to the current section of erased handwriting is in an inverse proportion relation with the running speed.
4. The method of claim 3, wherein obtaining the running speed of the erasing control in the last erasing handwriting comprises:
and determining the running speed of the erasing control according to the time threshold corresponding to the last section of erasing handwriting and the number of control points generated by the erasing control in the last section of erasing handwriting.
5. A method for erasing a handwriting, comprising:
recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values;
erasing the contents of all pixel points covered by the erasing track;
determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasing track;
and redrawing pixel points of all color values except the target color value.
6. A handwriting erasing apparatus, comprising:
the device comprises a recording module, a judging module and a judging module, wherein the recording module is used for recording an erasing track, and the erasing track covers a plurality of pixel points with different color values;
the determining module is used for determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track;
the erasing module is used for executing erasing operation according to the target color value;
the erase module includes:
the erasing submodule is used for erasing the pixel points covered by the erasing track;
and the rollback submodule is used for performing rollback processing on the pixel points of which the color values are not the target color values in the erased pixel points.
7. The apparatus of claim 6, wherein the determining module comprises:
the searching submodule is used for searching the color value with the most pixel points in the color values covered by the erasing track;
a determining submodule configured to determine the maximum color value as the target color value.
8. A handwriting erasing apparatus, comprising:
the recording module is used for recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values;
the erasing module is used for erasing the contents of all pixel points covered by the erasing track;
the determining module is used for determining the target color value with the most pixels according to the number of the pixels of each color value covered by the erasing track;
and the redrawing module is used for redrawing pixel points of all color values except the target color value.
9. A storage medium, characterized in that the storage medium includes a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the following steps: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasing track; executing an erasing operation according to the target color value; executing an erasing operation according to the target color value, including: erasing the pixel points covered by the erasing track; and performing rollback processing on the pixel points of which the color values are not the target color values in the erased pixel points.
10. A processor, wherein the processor is configured to run a program, wherein the program when executed performs the steps of: recording an erasing track, wherein the erasing track covers a plurality of pixel points with different color values; determining the maximum target color value of the pixel points according to the number of the pixel points of each color value covered by the erasing track; executing an erasing operation according to the target color value; executing an erasing operation according to the target color value, including: erasing the pixel points covered by the erasing track; and performing rollback processing on pixels of which the color values are not the target color values in the erased pixels.
CN201810948890.7A 2018-08-20 2018-08-20 Handwriting erasing method and device Active CN109215098B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810948890.7A CN109215098B (en) 2018-08-20 2018-08-20 Handwriting erasing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810948890.7A CN109215098B (en) 2018-08-20 2018-08-20 Handwriting erasing method and device

Publications (2)

Publication Number Publication Date
CN109215098A CN109215098A (en) 2019-01-15
CN109215098B true CN109215098B (en) 2023-04-11

Family

ID=64989401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810948890.7A Active CN109215098B (en) 2018-08-20 2018-08-20 Handwriting erasing method and device

Country Status (1)

Country Link
CN (1) CN109215098B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035035B (en) * 2020-08-27 2022-06-07 哈尔滨工业大学(深圳) Eraser realizing method and system capable of erasing strokes of top layer local area
CN112182415B (en) * 2020-09-04 2021-08-17 上海松鼠课堂人工智能科技有限公司 Intelligent learning guiding method and system
CN115480654A (en) * 2021-05-29 2022-12-16 华为技术有限公司 Line backspacing method of input panel and related device
CN114296564A (en) * 2021-12-13 2022-04-08 广州朗国电子科技股份有限公司 Writing deleting method and system for electronic whiteboard, electronic whiteboard and storage medium
CN114546174B (en) * 2022-02-28 2024-03-08 京东方科技集团股份有限公司 Handwriting processing method, display device and readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6280774A (en) * 1985-10-04 1987-04-14 Casio Comput Co Ltd Drawn data forming device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105741272A (en) * 2016-01-25 2016-07-06 上海中信信息发展股份有限公司 Method for removing osmotic writing on back surface of document image
CN106610783B (en) * 2016-10-10 2019-12-17 广州视源电子科技股份有限公司 handwriting erasing method and system for infrared touch equipment
CN106599818B (en) * 2016-12-07 2020-10-27 广州视源电子科技股份有限公司 Method and device for generating handwriting format file based on picture
CN106991711A (en) * 2017-03-15 2017-07-28 广州视源电子科技股份有限公司 Person's handwriting edit methods and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6280774A (en) * 1985-10-04 1987-04-14 Casio Comput Co Ltd Drawn data forming device

Also Published As

Publication number Publication date
CN109215098A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN109215098B (en) Handwriting erasing method and device
CN110716680B (en) Control method and device of intelligent interactive panel
CN107547750B (en) Control method, device and the storage medium of terminal
CN108829327B (en) Writing method and device of interactive intelligent equipment
CN108733296B (en) Method, device and equipment for erasing handwriting
CN108874275B (en) Handwriting erasing method, handwriting erasing device, terminal and computer-readable storage medium
CN108304132B (en) Graph display method, device, equipment and storage medium
CN106325663B (en) Mobile terminal and its screenshotss method
CN110928475B (en) Page interaction method, device, equipment and storage medium of intelligent interaction panel
CN110941382B (en) Display operation method, device, equipment and storage medium of intelligent interactive panel
CN108475172B (en) Information display method and device and terminal equipment
CN110941373B (en) Interaction method and device for intelligent interaction panel, terminal equipment and storage medium
CN110413187B (en) Method and device for processing annotations of interactive intelligent equipment
CN111831205B (en) Device control method, device, storage medium and electronic device
CN104239823A (en) Interface content display control method and device
CN105224187A (en) Menu execution control method and terminal equipment
US20170060820A1 (en) Authoring tool including style selector bars for selecting styles for media components
CN107817927B (en) Application icon management method and device
CN110737417B (en) Demonstration equipment and display control method and device of marking line of demonstration equipment
CN108255558B (en) Writing software calling method, device, equipment and computer readable storage medium
US10983686B2 (en) Display control apparatus equipped with touch panel, control method therefor, and storage medium storing control program therefor
CN108804003B (en) Handwriting recognition method and device for intelligent interaction equipment and intelligent interaction equipment
CN112860157B (en) Display element adjusting method, device, equipment and storage medium
CN113923392A (en) Video recording method, video recording device and electronic equipment
CN113485590A (en) Touch operation method and device

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