Patent Description:
An electronic whiteboard is an intelligent interaction device that combines many high-tech technologies such as a cutting-edge electronic technology and software technology. A user may write characters or draw patterns on an electronic whiteboard with an electronic stylus or a finger, and can also delete written and drawn content, to realize paperless office and teaching.

With the development of science and technology, electronic whiteboards are applied to more and more fields. Currently on the market, a method for erasing handwriting on an electronic whiteboard includes: using touch points formed by four fingers held together or a fist, and recognizing an erasing mode when the quantity of touch points is greater than <NUM> to <NUM> after pressing for the first time.

However, when the foregoing method is used, in a case of four fingers held together, the quantity of touch points on a multi-touch screen is not greater than <NUM>, and the quantity of touch points between a fist and the touch screen is generally not greater than <NUM>. Therefore, when the foregoing method is run on a current device on the market, the device may fail to enter an erasing mode. Meanwhile, because a size of an erasing region can only be determined according to an area formed by four fingers held together or a fist in the foregoing solution, the size of the erasing region is fixed. Therefore, the size of the erasing region cannot be controlled dynamically. Moreover, referring to <FIG>, touch points uploaded at an initial position are ABCD. As the touch points are uploaded by the touch screen at a certain frequency, when the touch points move to A<NUM>B<NUM>C<NUM>D<NUM> rapidly, the touch screen cannot upload all the touch points. As a result, handwriting in a partial region in the middle cannot be deleted.

<CIT> describes a presentation system. The system can display indicia of such contacts, such as when a user writes with a fingertip, and can remove or alter such indicia responsive to other geatures and contacts. The system can accurately distinguish between types of gestures detected, such as between a writing gesture and an erasing gesture, thereby obviating the need for a user to make additional selective inputs to transition from one type of gesture to another. Reference document.

To solve the foregoing technical problem, the present disclosure provides a method and an apparatus for erasing handwriting on an electronic whiteboard, to enter an erasing mode rapidly and erase handwriting effectively, thus improving the practicability of the electronic whiteboard. The technical solution is as follows:.

An embodiment of the present disclosure provides a method for erasing handwriting on an electronic whiteboard, including:.

In some embodiments of the present disclosure, the calculating an erasing region according to the first contact points and the second contact points specifically includes:.

In some embodiments of the present disclosure, the deleting handwriting data in the erasing region specifically includes:.

In some embodiments of the present disclosure, the determining whether the geometric figure intersects with the convex polygon includes:
upon detecting that at least one endpoint of a line segment forming the handwriting is within the convex polygon, determining that the line segment intersects with the convex polygon.

In some embodiments of the first aspect of the present disclosure, the determining whether the geometric figure intersects with the convex polygon includes:
upon detecting that a line segment forming the handwriting intersects with any edge of the convex polygon, determining that the line segment intersects with the convex polygon.

In some embodiments of the first aspect of the present disclosure, the obtaining first contact points, and enabling an erasing mode when a quantity of the first contact points is greater than a preset value further includes:
exiting the erasing mode when a touch screen of the electronic whiteboard detects no contact point.

The present disclosure herein provides an apparatus for erasing handwriting on an electronic whiteboard, including:.

In a first possible implementation of the second aspect of the present disclosure, the region calculation module further includes:.

In some embodiments of the present disclosure, the data deletion module further includes:.

In some embodiments of the present disclosure provides a device for erasing handwriting on an electronic whiteboard, including a processor, a memory, and a computer program that is stored in the memory and configured to be executed by the processor, where when executing the computer program, the processor implements the above method for erasing handwriting on an electronic whiteboard.

Compared with the prior art, embodiments of the present disclosure have the following beneficial effects:
The present disclosure provides a method for erasing handwriting on an electronic whiteboard. When a user applies the method to a device, the erasing mode can be enabled provided that the user inputs, on a touch screen, first contact points of which the quantity is greater than a preset value. Compared with an existing erasing method in which contact points are inputted using a special gesture such as four fingers held together or a clenched fist, the method for erasing handwriting on an electronic whiteboard according to the present disclosure has higher recognition accuracy for contact points, which helps enter the erasing mode rapidly and improves use efficiency of the electronic whiteboard.

In the method for erasing handwriting on an electronic whiteboard according to the present disclosure, an erasing region is calculated according to first contact points and second contact points. Because positions and quantities of the first contact points and the second contact points on the touch screen can be customized by the user, the user can set the size of the erasing region as required. Compared with the prior art, the present disclosure is more flexible and practical. In addition, once being set, the erasing region is relatively stable, thus avoiding incomplete deletion of handwriting due to variations of the erasing region.

The following clearly and completely describes the technical solutions in the embodiments of the present disclosure with reference to accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are merely a part rather than all of the embodiments of the present disclosure. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.

<FIG> shows an exemplary embodiment of the present disclosure. A method for erasing handwriting on an electronic whiteboard includes the following steps:.

In this embodiment, the first contact points are contact points that are detected by a touch screen of the electronic whiteboard and initially inputted by a user. When the user touches the touch screen of the electronic whiteboard with N fingers simultaneously, a system uploads N points, and each point has coordinates (x, y) on the screen. In this embodiment, the preset value is set to <NUM>, and when N><NUM>, the erasing mode is entered. After the second contact points are obtained in the erasing mode, the erasing mode is exited. The second contact points are contact points that are detected by the screen and inputted by the user when exiting erasing mode. That is, when the user raises the hand, all the contact points disappear, and at the same time, the erasing mode is exited. Last contact points before the user raises the hand are the second contact points.

In a possible implementation of this embodiment, when detecting no contact point, the touch screen of the electronic whiteboard exits the erasing mode while recognizing last detected contact points as the second contact points.

In the method for erasing handwriting on an electronic whiteboard provided in the present disclosure, when a user applies the method to a device, the erasing mode can be enabled provided that the user inputs, on a touch screen, first contact points of which the quantity is greater than a preset value; alternatively, the erasing mode can be exited provided that the user does not touch the touch screen so that there is no contact point on the touch screen. Compared with an existing erasing method in which contact points are inputted using a special gesture such as four fingers held together or a clenched fist, the method for erasing handwriting on an electronic whiteboard according to the present disclosure has higher recognition accuracy for contact points, which helps enter the erasing mode rapidly and improves use efficiency of the electronic whiteboard.

In the method for erasing handwriting on an electronic whiteboard according to the present disclosure, an erasing region is calculated according to first contact points and second contact points. Because positions and quantities of the first contact points and the second contact points on the touch screen can be customized by the user, the user can set the size of the erasing region as required. Compared with the prior art, the present disclosure is more flexible and practical. In addition, once being set, the erasing region is relatively stable, thus avoiding incomplete deletion of partial handwriting due to variations of the erasing region.

Preferably, the calculating an erasing region according to the first contact points and the second contact points specifically includes:.

It may be appreciated that, the convex hull is a concept in computational geometry (graphics). In a real-number vector space V, for a given set X, an intersection S of all convex sets including X is referred to as a convex hull. The convex hull of X may be constructed by using convex combinations of all points (X1,. In a two-dimensional Euclidean space, the convex hull may be imagined as a rubber ring exactly encircling all the points.

In this embodiment, a variable mlastupload is defined to store data of the contact points uploaded by the touch screen. mlastupload is used for storing, upon recognition that a deletion mode has been entered, data uploaded by the touch screen last time. The variable is meaningful only in the deletion mode. After it is determined that the deletion mode has been entered, data of the first contact points for determining the entry into the deletion mode is uploaded for the first time after the entry into the deletion mode. When all the contact points disappear, it means that the deletion mode is exited. Therefore, the variable is initialized automatically.

Referring to <FIG>, mlastupload and the N points uploaded this time can form a point set including M points. Next, data stored in mlastupload is replaced with data of the points uploaded this time. For the set of the M points that are uploaded successively, a convex hull may be calculated by using the convex hull algorithm, to obtain a convex polygon including all the points. The convex hull algorithm may be implemented using an existing algorithm, for example, a Graham scan method or a Jarvis march method.

Referring to <FIG>, it may be appreciated that in the electronic whiteboard, any line of handwriting may be considered as formed by a line connecting multiple points. Therefore, a line of handwriting in a computer may be represented by all points forming the line of handwriting.

In this embodiment, a convex polygon formed by multiple vertexes may be obtained through the convex hull algorithm. If the handwriting intersects with the convex polygon, the handwriting needs to be deleted. Determining whether the handwriting intersects with the convex polygon may be equivalent to determining whether each line segment forming the handwriting intersects with the convex polygon; if any line segment intersects with the polygon, the handwriting intersects with the convex polygon; otherwise, the handwriting does not intersect with the convex polygon.

Preferably, the determining whether the geometric figure intersects with the convex polygon includes:
upon detecting that at least one endpoint of a line segment forming the handwriting is within the convex polygon, determining that the line segment intersects with the convex polygon.

In this embodiment, it is assumed that two points forming the line segment are (X1, Y1), and (X2, Y2), and the convex polygon is formed by N vertexes. It is determined whether either of the two points forming the line segment is within the convex polygon; if yes, the line segment intersects with the convex polygon. An algorithm for determining whether a point is within a convex polygon may be implemented by C programming language as follows:
<IMG>
<IMG>.

Preferably, the determining whether the geometric figure intersects with the convex polygon includes:
upon detecting that a line segment forming the handwriting intersects with any edge of the convex polygonal, determining that the line segment intersects with the convex polygon.

In this embodiment, if neither of the two points is within the convex polygon, to determine whether the line segment intersects with the convex polygon is to determine whether the line segment (X1, Y1) (X2, Y2) intersects with any edge (Xn-<NUM>, Yn-<NUM>) (Xn, Yn) of the convex polygon; and if yes, the line segment intersects with the convex polygon. An algorithm for determining whether two line segments intersect may be implemented as follows:
<IMG>
<IMG>.

<FIG> shows an exemplary embodiment of the present disclosure. An apparatus for erasing handwriting on an electronic whiteboard includes:.

Preferably, the region calculation module further includes:.

Preferably, the data deletion module further includes:.

Preferably, the intersection determining module is further configured to: upon detecting that at least one endpoint of a line segment forming the handwriting is within the convex polygon, determine that the line segment intersects with the convex polygon.

Preferably, the intersection determining module is further configured to: upon detecting that a line segment forming the handwriting intersects with any edge of the convex polygon, determine that the line segment intersects with the convex polygon.

Preferably, the mode switching module is further configured to exit the erasing mode when a touch screen of the electronic whiteboard detects no contact point.

In the present disclosure, the mode switching module and the region calculation module each may include one or more sensors and processors, or may be an integrated chip. The data deletion module may be one or more processors. If necessary, the data deletion module may further include a memory, a related interface, and a system transmission bus. The variable generating module and the convex hull calculation module may be independent processors or share a processor. The data parsing module and the intersection determining module may be independent processors or share a processor. The processor executes related code of a program to implement corresponding functions.

An exemplary embodiment of the present disclosure provides a device for erasing handwriting on an electronic whiteboard, including a processor, a memory, and a computer program that is stored in the memory and configured to be executed by the processor. When executing the computer program, the processor implements the foregoing method for erasing handwriting on an electronic whiteboard.

The descriptions above are preferred examples of the present disclosure, and it should be noted that for those of ordinary skill in the art, various improvements and modifications can be made without departing from the principles of the present disclosure.

Claim 1:
A method for erasing handwriting on an electronic whiteboard, comprising:
obtaining first contact points; and enabling an erasing mode when a quantity of the first contact points is greater than a preset value;
obtaining second contact points in the erasing mode, and calculating an erasing region according to the first contact points and the second contact points; and
deleting handwriting data in the erasing region;
wherein the calculating an erasing region according to the first contact points and the second contact points specifically comprises:
generating contact point variables, wherein the contact point variables comprise quantity information and position information of contact points in the erasing mode; and
calculating a convex polygonal erasing region according to the contact point variables by using a convex hull algorithm; wherein
the deleting handwriting data in the erasing region specifically comprises:
dividing handwriting into a plurality of geometric figures; and
determining whether the geometric figure intersects with the convex polygon; and deleting handwriting data of the geometric figure when the geometric figure intersects with the convex polygon; and
the determining whether the geometric figure intersects with the convex polygon comprises:
upon detecting that a line segment forming the handwriting intersects with any edge of the convex polygon, determining that the line segment intersects with the convex polygon.