Handwriting erasing method and device, interactive panel and storage medium
By acquiring touch point information through a high-precision touch frame, analyzing and matching the erasure geometry, the problem of poor handwriting erasure in interactive flat panels is solved, achieving more flexible and efficient handwriting erasure.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-20
- Publication Date
- 2026-03-20
AI Technical Summary
The existing interactive flat panel's touch frame has difficulty accurately determining the type of writing pen, the touch area, and the rotation angle, resulting in poor pen erasure performance.
By acquiring touch point information through a high-precision touch frame, analyzing and matching the erasure geometry, precise erasure of handwriting can be achieved.
It improves the flexibility and efficiency of handwriting erasure, ensuring that the erasure area matches the user's operation.
Smart Images

Figure CN115373772B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the touch writing technology field of electronic equipment, and in particular to a handwriting erasing method and device, an interactive panel and a storage medium. BACKGROUND
[0002] The touch frame is an important hardware component of the interactive panel, and is mainly used to respond to the touch operation of the user on the interactive panel. The touch frame adopted in the interactive panel on the market is mostly a non-high-precision touch frame. The defects of this non-high-precision touch frame mainly include: it is difficult to determine the type of the writing pen; it is difficult to ensure that the touch area generated by the same writing pen in writing is the same; it is difficult to determine whether the touch medium is a writing pen or a finger or an eraser; and it is also difficult to determine the touch rotation angle.
[0003] In the process of implementing the present application, the inventor found that the current software layer of the interactive panel cannot maximize the use of the touch point information fed back by the touch frame, thereby causing the performance effect related to the touch on the interactive panel (such as the erasing effect when erasing the formed handwriting) to not be obviously improved. SUMMARY
[0004] Therefore, the embodiments of the present application provide a handwriting erasing method and device, an interactive panel and a storage medium, and the handwriting erasing effect on the interactive panel is improved.
[0005] In a first aspect, the embodiments of the present application provide a handwriting erasing method applied to an interactive panel, wherein the touch response accuracy of the touch frame equipped in the interactive panel reaches a set accuracy range, and the method comprises the following steps:
[0006] displaying a display interface containing handwriting to be erased through a display screen;
[0007] receiving a handwriting erasing instruction to enter a handwriting erasing mode, wherein the handwriting erasing instruction is formed by the triggering of the user;
[0008] obtaining touch point information fed back by the touch frame when a touch object touches the surface of the display screen and moves, wherein the touch object is controlled by the user;
[0009] erasing the handwriting to be erased in the interface by using an erasing geometric shape matched with the touch object through the analysis of the obtained touch point information and the handwriting to be erased;
[0010] The erasing geometric shape matched with the touch object is embodied by the touch area of the touch object acting on the display screen.
[0011] The erasing geometric shape includes a rounded rectangle, a circle and an arbitrary irregular figure.
[0012] Further, the touch point information fed back by the touch frame includes:
[0013] Each touch signal is recognized by a hardware circuit in the touch frame, the touch signal being generated when the touch object moves on the display screen;
[0014] The touch point information fed back by the touch frame for each touch signal through a human-computer interaction (HID) standard protocol is obtained,
[0015] Each touch point information corresponds to one touch point, and the touch point information includes touch point coordinates, touch point height and width, and touch rotation angle.
[0016] Further, after obtaining the touch point information fed back by the touch frame, further includes:
[0017] Each touch point information is processed so that each touch point information has a uniform unit format and data structure.
[0018] Further, the processing of each touch point information includes:
[0019] According to the size information of the obtained touch frame and the screen resolution information, the unit of each data information in the touch point information is converted into a uniform set unit format;
[0020] The touch point information is recorded by using a data structure corresponding to the set unit format.
[0021] Further, by analyzing the obtained touch point information and the to-be-erased handwriting, an erasing geometric shape matching the touch object is used to erase the to-be-erased handwriting in the interface, including:
[0022] By the obtained touch point information, the erasing geometric shape matching the touch object in movement is determined, and the moving contour geometric figure formed by adjacent touch point pairs in movement under the erasing geometric shape is determined;
[0023] Each handwriting point included in the to-be-erased handwriting is analyzed, each handwriting point is hit tested with the moving contour geometric figure, and the target to-be-erased handwriting falling into the moving contour geometric figure is determined;
[0024] The target to-be-erased handwriting is erased in the display interface.
[0025] Further, the determination of the erasing geometric shape matching the touch object in movement by the obtained touch point information, and the determination of the moving contour geometric figure formed by adjacent touch point pairs in movement under the erasing geometric shape, includes:
[0026] extracting key touch point information, and obtaining a key touch area in the key touch point information, wherein the key touch point information is touch point information of a touch point generated when the touch object first contacts the display screen during movement of the touch object;
[0027] determining an area threshold range to which the key touch area belongs and an area shape, searching for a target shape matching the area shape in each geometric shape corresponding to the area threshold range to which the key touch area belongs, and determining the target shape as an erasing geometric shape matched by the touch object;
[0028] For each adjacent touch point pair in the movement of the touch object, key geometric information of each touch point in the adjacent touch point pair relative to the erasing geometric shape is determined through analysis of touch point information corresponding to the adjacent touch point pair.
[0029] According to each of the key geometric information, a movement contour geometric figure formed by the adjacent touch point pair relative to the erasing geometric shape is determined.
[0030] Further, when the erasing geometric shape is a rounded rectangle, the rounded rectangle includes a rectangle and rounded corners with the rectangle vertices as centers.
[0031] The key geometric information of each touch point in the adjacent touch point pair relative to the erasing geometric shape is determined through analysis of touch point information corresponding to the adjacent touch point pair, including:
[0032] The rounded rectangle is recorded as a first to-be-constructed geometric figure of each touch point in the adjacent touch point pair.
[0033] For each touch point in the adjacent touch point pair, the center point coordinates of the rectangle, the center coordinates of each rounded corner, and the key cut point coordinates and two figure connection point coordinates in the first to-be-constructed geometric figure are determined through the touch point coordinates, touch width, touch height, and touch rotation angle in the corresponding touch point information, combined with a pre-defined rounded corner radius.
[0034] The center point coordinates of the rectangle, the center coordinates of each rounded corner, and the key cut point coordinates and two figure connection point coordinates are regarded as the key geometric information of the touch point relative to the first to-be-constructed geometric figure.
[0035] Each rounded corner in the first to-be-constructed geometric figure includes two key cut points, and each key cut point is a cut point corresponding to the connection of the rounded corner and an adjacent rounded corner by a tangent.
[0036] Further, the movement contour geometric figure formed by the adjacent touch point pair in the erasing geometric shape is determined according to each of the key geometric information, including:
[0037] extracting a cornered circle center coordinate of a corresponding rounded rectangle from the key geometric information of the adjacent touch point pair, and selecting a key connection point pair required for constructing an outer contour;
[0038] obtaining a key circular region determined based on each of the key circle center points;
[0039] extracting a rectangular vertex coordinate and a center point coordinate of a corresponding rounded rectangle from the key geometric information of the adjacent touch point pair, and selecting a key connection point pair required for constructing an outer contour;
[0040] obtaining an outer rectangular region determined based on each of the key connection point pairs, and a vertex connection closed region determined based on each of the rectangular vertex coordinates;
[0041] combining each of the key circular regions, each of the outer rectangular regions, and the vertex connection closed region to form a first moving contour geometric figure constituted by the adjacent touch point pair relative to the rounded rectangle.
[0042] Further, each of the handwriting points included in the handwriting to be erased is subjected to a hit test with the moving contour geometric figure to determine a target handwriting to be erased falling into the moving contour geometric figure, including:
[0043] dissolving the first moving contour figure to obtain the vertex connection closed region, and a corresponding number of outer rectangular regions and key circular regions;
[0044] for each handwriting point included in the handwriting to be erased, the handwriting point is subjected to a first hit test with the vertex connection closed region and each of the outer rectangular regions;
[0045] if the first hit test is successful, the handwriting point is added to a first target point set; otherwise, the handwriting point is subjected to a second hit test with each of the key circular regions;
[0046] if the second hit test is successful, the handwriting point is added to the first target point set;
[0047] the handwriting formed based on each handwriting point in the first target point set is determined as a target handwriting to be erased falling into the moving contour geometric figure.
[0048] Further, the first hit test of the handwriting point with each of the outer rectangular regions includes:
[0049] combining the vertex connection closed region with each of the outer rectangular regions to obtain a corresponding convex polygon region, and obtaining each region vertex constituting the convex polygon region;
[0050] Connect the stroke points to each of the region vertices to obtain triangles of the same number as the region vertices;
[0051] Determine the angle value of the vertex angle formed by the stroke points in each of the triangles;
[0052] If the sum of the angle values is 360 degrees, then the first hit test of the handwriting point is considered successful.
[0053] Further, the second hit test of the handwriting points and each of the key circular regions includes:
[0054] Obtain the center and radius of each key circular region, and determine the distance between the stroke point and the center of each region.
[0055] If there is a line distance smaller than the radius of the corresponding area, then the second hit test of the handwriting point is considered successful.
[0056] Furthermore, after determining the erase geometry matching the touched object during movement using the obtained touch point information, the method further includes:
[0057] When it is determined that the erase geometry is a rounded rectangle and it is detected that the touched object has not moved within a set time, the static touch point corresponding to the touch object touching the display screen within the set time is determined.
[0058] Based on the touch point information of the static touch point, a static rounded rectangle is determined relative to the static touch point;
[0059] The system performs a hit test between each stroke point in the erased strokes and the static rounded rectangle, and erases the strokes that fall into the static rounded rectangle in the interface.
[0060] Furthermore, the static rounded rectangle includes two static rectangular regions and four static circular regions;
[0061] Accordingly, the step of performing a hit test between each stroke point included in the erased strokes and the static rounded rectangle, and erasing the erased strokes falling into the static rounded rectangle in the interface, includes:
[0062] For each stroke in the writing to be erased, a hit test is performed between the stroke and two static rectangular areas and four circular areas.
[0063] If the handwriting point meets the conditions for a successful hit test, then the handwriting point is added to the static point set.
[0064] erasing a handwriting formed based on each handwriting point in the static point set.
[0065] Further, when the erasing geometric pattern is a circle, the determining, by the analysis on the touch point information corresponding to each touch point in the adjacent touch point pair, of key geometric information of each touch point in the adjacent touch point pair relative to the erasing geometric pattern, comprises:
[0066] marking the circle as a second to-be-constructed geometric pattern of each touch point in the adjacent touch point pair;
[0067] determining, by the touch point coordinates, the touch width and the touch height in the touch point information corresponding to each touch point in the adjacent touch point pair, circle center coordinates and each key intersection point coordinate of the corresponding second to-be-constructed geometric pattern;
[0068] taking the circle center coordinates and each key intersection point coordinate corresponding to each touch point as key geometric information relative to the second to-be-constructed geometric pattern.
[0069] Further, the determining, by the touch point coordinates, the touch width and the touch height in the touch point information corresponding to each touch point in the adjacent touch point pair, circle center coordinates and each key intersection point coordinate of the corresponding second to-be-constructed geometric pattern, comprises:
[0070] determining, by the touch point coordinates, the touch width and the touch height in the touch point information corresponding to each touch point in the adjacent touch point pair, circle center coordinates of the corresponding second to-be-constructed circle;
[0071] connecting the corresponding two circle center coordinates to obtain a circle center connecting line;
[0072] constructing, through each circle center coordinate, a straight line perpendicular to the circle center connecting line to obtain each key intersection point coordinate determined after the intersection of each straight line and the corresponding second to-be-constructed circle.
[0073] Further, the determining, according to each key geometric information, of a moving contour geometric pattern formed by the adjacent touch point pair under the erasing geometric pattern, comprises:
[0074] extracting the circle center coordinates contained in the key geometric information of the adjacent touch point;
[0075] obtaining a second to-be-constructed geometric pattern region determined based on each circle center coordinate;
[0076] extracting each key intersection point coordinate contained in the key geometric information of the adjacent touch point;
[0077] obtaining a key intersection point connecting region determined based on each key intersection point coordinate;
[0078] combining each of the second to-be-constructed geometric figures with the key intersection connection region, forming a second moving contour figure of the adjacent touch point pair relative to the circle.
[0079] Further, analyzing each of the handwriting points included in the handwriting to be erased, performing a third hit test of the handwriting point with the key intersection connection region, determining a target handwriting to be erased falling into the moving contour geometric figure, comprising:
[0080] disassembling the second moving contour figure to obtain a key intersection connection region and two second to-be-constructed geometric figures;
[0081] performing a third hit test of each handwriting point included in the handwriting to be erased with the key intersection connection region;
[0082] if the third hit test is successful, adding the handwriting point to a second target point set; otherwise, performing a fourth hit test of the handwriting point with each of the second to-be-constructed geometric figures with a circle region;
[0083] if the fourth hit test is successful, adding the handwriting point to the second target point set;
[0084] determining handwriting formed based on each handwriting point in the second target point set as a target handwriting to be erased falling into the moving contour geometric figure.
[0085] Further, the third hit test of the handwriting point with the key intersection connection region comprises:
[0086] when the key intersection connection region is determined as a rectangular region, selecting two rectangular edge vectors formed by one vertex from the rectangular region, and performing a hit test of the handwriting point with the rectangular region by comparing the handwriting point with each of the rectangular edge vectors; otherwise,
[0087] determining a same number of to-be-compared edge vectors as the number of vertices of the key intersection connection region based on each vertex of the key intersection connection region;
[0088] performing a hit test of the handwriting point with the rectangular region by comparing the handwriting point with each of the to-be-compared edge vectors.
[0089] Further, when the erasing geometric pattern is an arbitrary irregular figure, the key geometric information of each touch point in the adjacent touch point pair relative to the erasing geometric pattern is determined by analyzing the corresponding touch point information of the adjacent touch point pair, comprising:
[0090] determining a third to-be-constructed geometric figure of each touch point in the adjacent touch point pair as an arbitrary irregular figure, and determining combined figure information contained in the third to-be-constructed geometric figure;
[0091] for each touch point in the adjacent touch point pair, determining a key trajectory point existing on the third to-be-constructed geometric figure relative to the touch point and figure representation information of the third to-be-constructed geometric figure by combining the corresponding touch point information with the combined figure information;
[0092] taking the figure representation information of each combined figure and the key trajectory point as key geometric information of the touch point relative to the third to-be-constructed geometric figure.
[0093] Further, the determining of the key trajectory point existing on the third to-be-constructed geometric figure relative to the touch point and the figure representation information of the third to-be-constructed geometric figure by combining the corresponding touch point information with the combined figure information comprises:
[0094] analyzing the combined figure information;
[0095] when the third to-be-constructed geometric figure only contains a polygonal line polygon, determining a key trajectory point existing on the polygonal line polygon relative to the touch point by the corresponding touch point information, and obtaining first figure representation information representing the polygonal line polygon;
[0096] when the third to-be-constructed geometric figure contains a polygonal line polygon and a target circle, determining a key trajectory point from the polygonal line polygon and the key circle by the corresponding touch point information, and obtaining second figure representation information representing the polygonal line polygon and the key circle.
[0097] Further, the determining of the key trajectory point existing on the polygonal line polygon relative to the touch point by the corresponding touch point information and the obtaining of the first figure representation information representing the polygonal line polygon comprise:
[0098] determining a polygonal line center point coordinate and each polygonal line vertex coordinate of the polygonal line polygon as the first figure representation information by touch point coordinates, touch height and touch width in the corresponding touch point information;
[0099] selecting a key trajectory point meeting a trajectory point screening condition from each polygonal line vertex coordinate by the polygonal line center point coordinate and the corresponding touch point information.
[0100] Further, the determining of the key trajectory point from the polygonal line polygon and the key circle by the corresponding touch point information and the obtaining of the second figure representation information representing the polygonal line polygon and the key circle comprise:
[0101] determining the polyline center point coordinates and each polyline vertex coordinates of the polyline polygon, and the center point coordinates and the radius of the key circle, as the second graphical representation information, through the touch point coordinates, the touch height and the touch width in the corresponding touch point information;
[0102] selecting the key trajectory points meeting the trajectory point screening condition from the circumference of the key circle and each of the polyline vertex coordinates, through the polyline center point coordinates, the center point coordinates, the radius of the key circle and the corresponding touch point information.
[0103] Further, the movement contour geometry formed by the adjacent touch point pair relative to the erasing geometry is determined according to each of the key geometric information, including:
[0104] extracting the first graphical representation information or the second graphical representation information from the key geometric information of the adjacent touch point pair respectively;
[0105] obtaining the combined geometric figure determined based on the corresponding first graphical representation information or the second graphical representation information respectively;
[0106] extracting the key trajectory point from the key geometric information of the adjacent touch point pair respectively;
[0107] obtaining the key trajectory area formed by connecting each of the key trajectory points;
[0108] combining each of the combined geometric figures with the key trajectory area to form a third movement contour figure formed by the adjacent touch point pair relative to the arbitrary irregular figure.
[0109] Further, the each of the handwriting points included in the handwriting to be erased is analyzed, and each of the handwriting points is subjected to a hit test with the movement contour geometry to determine the target handwriting to be erased falling into the movement contour geometry, including:
[0110] dissolving the third movement contour figure to obtain the key trajectory area and each of the combined geometric figures;
[0111] for each handwriting point included in the handwriting to be erased, if the combined geometric figure is only a polyline polygon, the handwriting point is subjected to a corner hit test with each of the polyline polygons using a corner method; or,
[0112] if the combined geometric figure contains a polyline polygon and a key circle, the handwriting point is subjected to a distance hit test with each of the polyline polygons and the key circle using a distance method respectively;
[0113] add the handwriting point to the third target point set when the corner or distance hit test succeeds; otherwise, perform a vector hit test on the handwriting point and the key trajectory region, and add the handwriting point to the third target point set when the vector hit test succeeds;
[0114] determine handwriting formed based on each handwriting point in the third target point set as target handwriting to be erased falling into the movement contour geometric figure.
[0115] In a second aspect, an embodiment of the present application provides a handwriting erasing device configured in an interactive tablet, wherein a touch response accuracy of a touch frame of the interactive tablet reaches a set accuracy range, and the device comprises:
[0116] a display module configured to display a display interface containing handwriting to be erased through a display screen;
[0117] a trigger module configured to receive a handwriting erasing instruction, and enter a handwriting erasing mode, wherein the handwriting erasing instruction is formed by a user's trigger;
[0118] an acquisition module configured to obtain touch point information fed back by the touch frame when a touch object touches a surface of the display screen and moves, wherein the touch object is controlled by a user;
[0119] an erasing module configured to erase the handwriting to be erased in the interface by analyzing the obtained touch point information and the handwriting to be erased, and adopting an erasing geometric shape matched with the touch object.
[0120] In a third aspect, an embodiment of the present application further provides an interactive tablet, comprising:
[0121] a touch frame having a touch response accuracy reaching a set accuracy range, and configured to respond to a touch operation of a touch object through a hardware circuit included therein;
[0122] a display screen, which is covered by the touch frame to form a touch screen, and configured to display interactive content;
[0123] one or more processors;
[0124] a storage device configured to store one or more programs;
[0125] when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the present application.
[0126] In a fourth aspect, an embodiment of the present application further provides a storage medium containing computer executable instructions, which are used to execute the method provided in the first aspect when executed by a computer processor.
[0127] The above-described handwriting erasure method, apparatus, interactive whiteboard, and storage medium are described above. The proposed method can be executed by an interactive whiteboard equipped with a touch frame whose touch response accuracy reaches a set accuracy range. The method first displays an interface containing the handwriting to be erased on a screen; then, it receives a handwriting erasure command and enters a handwriting erasure mode; then, when a touch object touches and moves on the surface of the screen, it obtains touch point information fed back through the touch frame; finally, by analyzing the obtained touch point information and the handwriting to be erased, it uses an erasure geometry matching the touch object to erase the handwriting on the interface. The above-described technical solution in this embodiment, for an interactive tablet with a high-precision touch frame configured in the hardware structure, can optimize the functionality of the configured high-precision touch frame at the software application level through the method provided in this embodiment. Compared with existing interactive tablets that have not been optimized at the software level, the method provided in this embodiment can ensure that the erasure response to the erased writing on the interface is more compatible with the erasure geometry of the object being touched by the user, thereby enabling flexible adjustment of the erasure area during the erasure process and thus improving the erasure efficiency on the interactive tablet. Attached Figure Description
[0128] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0129] Figure 1 A flowchart illustrating a handwriting erasure method provided in Embodiment 1 of this application is given;
[0130] Figure 1 a This is a diagram illustrating the effect of the touch frame responding to a touch object in a handwriting erasure method provided in Embodiment 1 of this application;
[0131] Figure 1 b The following diagram illustrates the effect of the erased geometric shape in the handwriting erasure method provided in Embodiment 1 of this application.
[0132] Figure 1 c An illustration of the effect of the moving contour geometry of the erasure area in the handwriting erasure method provided in Embodiment 1 of this application is given;
[0133] Figure 2 A flowchart illustrating a handwriting erasure method provided in Embodiment 2 of this application is given;
[0134] Figure 2a The following diagram illustrates the effect of the handwriting erasure method provided in Embodiment 2 of this application;
[0135] Figure 2bAn implementation flow chart of the determination of the erasing mode and the outline figure in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0136] Figures 2c-2h A related schematic illustration of the determination of the key geometric information when the erasing geometric mode is a rounded rectangle in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0137] Figures 2i-2l A related schematic illustration of the determination of the key geometric information when the erasing geometric mode is a circle in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0138] Figure 2m An effect display figure when the erasing geometric mode is an arbitrary irregular figure in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0139] Figures 2n-2p A related schematic illustration of the determination of the key geometric information when the erasing geometric mode is an arbitrary irregular figure and only contains a polyline geometric figure in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0140] Figure 2q And Figure 2r A related schematic illustration of the determination of the key geometric information when the erasing geometric mode is an arbitrary irregular figure in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0141] Figure 2s An implementation flow chart of the determination of the target handwriting to be erased in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0142] Figure 3 And Figure 4 A schematic illustration of the implementation of the hit test used when the erasing geometric mode is a rounded rectangle in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0143] Figure 5 Another implementation flow chart of the determination of the target handwriting to be erased in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0144] Figure 6 And Figure 7 A schematic illustration of one of the implementations of the hit test used when the erasing geometric mode is a circle in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0145] Figure 8 Still another implementation flow chart of the determination of the target handwriting to be erased in the handwriting erasing method provided in Embodiment Two of the present application is given;
[0146] Figure 9An effect display diagram of the static rounded rectangle in the handwriting erasing method provided by Embodiment Two of the present application is given.
[0147] Figure 10 A structural block diagram of a handwriting erasing device provided by Embodiment Three of the present application is given.
[0148] Figure 11 A structural schematic diagram of an interactive tablet provided by Embodiment Four of the present application is given. DETAILED DESCRIPTION
[0149] In order to make the objects, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application with reference to the accompanying drawings. It should be understood that the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0150] The following description refers to the accompanying drawings. Unless otherwise indicated, same numbers in different drawings indicate same or similar elements. The implementations described in the following example embodiments are not meant to represent all implementations consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0151] In the description of the present application, it should be understood that the terms "first", "second", "third" and the like are only used to distinguish similar objects, and do not necessarily mean a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, "a plurality of" means two or more, unless otherwise specified. "And / or", which describes the association between objects, means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0152] In practical applications, the hardware part of the interactive tablet is composed of a display screen, an intelligent processing system and the like, which are combined together by integral structural members, and are also supported by a dedicated software system.
[0153] The display screen can specifically include a Light Emitting Diode (LED) display screen, an Organic Light-Emitting Diode (OLED) display screen, a Liquid Crystal Display (LCD) display screen, and the like. By arranging optical touch sensors on both sides of the surface of the display screen, a touch frame can be formed to form a touch display screen. The optical touch sensors forming the touch frame can scan the surface of the display screen with light signals to touch objects such as a user's finger, a stylus, and the like. It can be understood that, in order to protect the display screen from being scratched by the touch objects, a cover glass can be arranged on the surface of the display screen. Therefore, in the embodiments of the present specification, the surface of the display screen refers to the surface of the cover glass of the display screen.
[0154] When a touch object touches the display screen and triggers a certain interface on the display screen, positioning and other operations are performed. The touch frame can respond to the above touch operation and transmit corresponding touch operation information to the intelligent processing system at the application layer, so as to realize various interactive applications through the intelligent processing system.
[0155] Taking one of the optical touch sensors forming the touch frame as an example, the touch frame is described from the technical principle:
[0156] Specifically, the optical touch sensor can include an infrared emitter and an infrared receiver. The infrared emitter is configured to emit infrared signals, and the infrared receiver is configured to receive the infrared signals. The infrared touch frame is formed by arranging infrared emitters and infrared receivers around the display screen to form a horizontal and vertical grid of light beams.
[0157] When the display screen has the above touch frame, when the touch object blocks the infrared signals, the light measurement value at the corresponding infrared receiver will be reduced, so that the position of the touch point on the screen can be determined.
[0158] Specifically, the infrared emitter is installed on a first side of the frame of the display screen, and the infrared receiver is installed on a second side of the frame of the display screen. The first side and the second side are opposite to each other, that is, the infrared receiver is within the scanning range of the infrared emitter, so that the infrared signals emitted by the infrared emitter are received by the infrared receiver.
[0159] For different business needs, the shape of the display screen is different, such as rectangular, hexagonal, circular, and the like. The shape of the frame is also different from the shape of the display screen, such as rectangular, hexagonal, circular, and the like. For different shapes of the frame, the arrangement of the infrared emitter and the infrared receiver in each infrared module is also different.
[0160] Generally, the conventional touch frame arranged on the interactive whiteboard has a touch response precision within a conventional range when responding to a touch signal of a touch object. For a non-high-precision touch frame with a touch response precision within the conventional range, it is difficult to identify the size of the touch area of the touch object on the display screen, so it is difficult to determine what type of touch object is used for writing in the touch writing mode, or it is also difficult to determine what touch medium (finger, writing pen) is used for touch. For example, in the touch erasing mode, it is difficult to determine what type of touch object is used for erasing, and only a conventional erasing mode is used for erasing. At the same time, the non-high-precision touch frame also cannot guarantee that the same type of touch object presents the same touch area during the touch process.
[0161] The interactive whiteboard in the embodiment has a high-precision touch frame with high touch response precision, compared with the conventional touch frame with touch response precision within a conventional range. The high touch response precision can be understood as the touch response precision reaching a set precision range, in which the precision limit of the set precision range is higher than that of the conventional precision range. The touch frame can provide more detailed touch information to the upper application layer, such as the touch area of the touch object, more accurate touch point coordinates, the rotation angle of the touch object during the touch process, and the like.
[0162] At the same time, the intelligent processing system in the interactive whiteboard can include a host processor, which is a processor of the interactive whiteboard. The software built in the host processor can realize different functional applications and display pictures on the display screen to produce vivid audio and video effects.
[0163] The host processor is a high-performance computing module.
[0164] For example, the host processor can be an Android module, which can install an Android system and be configured with components such as a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a RAM (random access memory), and a ROM (Read-Only Memory). For example, for the Android 7.0 version, the CPU is a dual-core A72 and a quad-core A53, the GPU is a Mali T860, the RAM is 4 GB, and the ROM is 32 GB.
[0165] For example, the host processor can be a PC module configured with a CPU, a GPU, a memory, a hard disk and the like. For example, for a plug-in Intel Core series modular computer, the CPU is an Intel Core i5 / i7, the GPU is an Intel HD Graphics, the memory is a DDR4 8G / 16G, and the hard disk is a 128G / 256G.
[0166] Embodiment One
[0167] Figure 1 A flowchart of a handwriting erasing method provided by Embodiment One of the present application is given. The present embodiment can be applied to the case of erasing handwriting in the interface in the erasing mode. The method can be executed by a handwriting erasing device, which can be realized by software and / or hardware, and can be configured in an interactive tablet, especially in a processor of the interactive tablet, which can be a host processor in a smart processing system. Meanwhile, the interactive tablet is equipped with a touch frame, which has a touch response accuracy reaching a set accuracy range. In addition, the touch frame is electrically connected with the display screen.
[0168] As shown in Figure 1 , a handwriting erasing method provided by Embodiment One of the present application specifically includes the following steps:
[0169] S101, displaying a display interface containing handwriting to be erased on the display screen.
[0170] It can be known that the interactive tablet in which the execution subject of the method provided by the present embodiment is arranged also has a graphics processing unit (GPU) that can provide video processing functions. Specifically, the GPU can receive information from the host processor, place it in the frame memory, and generate serial display data and scanning control timing required by the display screen for video signals in a partition driving mode. On the basis of the above operation, the display screen arranged on the interactive tablet can play frame data information according to the serial display data and scanning control timing, so as to display various pictures on the display screen.
[0171] In the present embodiment, the display interface can be considered as an interface displayed on the display screen after the user writes or edits in the writing or editing mode. Specifically, the element information presented in the display interface at least contains handwriting to be erased formed by user operation. It can be known that the handwriting to be erased can be handwriting presented by user writing operation in the writing mode, in which the color and thickness of the handwriting can be selected by the user, and the presented handwriting style can also show the writing style of the user.
[0172] Generally, the display interface can be an independent interface. For example, the interactive tablet provides an electronic whiteboard. The user triggers a control operation of displaying the electronic whiteboard in the interactive tablet. The interactive tablet receives the control operation and displays the electronic whiteboard as the display interface presented as an element.
[0173] In addition, the display interface can also be an interface with a background. For example, the interactive tablet displays a local courseware, displays data transmitted by a screen transmission device (USB Dongle, USB software protector) and belonging to a source device (such as a notebook computer, etc.), and the user triggers a comment operation in the interactive tablet. The interactive tablet receives the comment operation, freezes the courseware, the screen picture and the like, and makes it a background, that is, maintains the current frame picture of the courseware, the screen picture and the like, and generates a mask layer on the courseware, the screen picture and the like, thereby as the currently presented display interface.
[0174] The courseware can refer to a course document produced according to the requirements of teaching, through the links of teaching target determination, teaching content and task analysis, teaching activity structure and interface design, etc. For example, the courseware can be a file in a public format such as a Word document, a PPT (PowerPoint, presentation), or a self-defined page composed of text, tables, pictures and the like. The present embodiment does not limit this.
[0175] S102, receiving a handwriting erasing instruction, entering a handwriting erasing mode, the handwriting erasing instruction being formed by triggering of the user.
[0176] In the present embodiment, from the perspective of the user, the user can trigger a touch operation on the display screen, that is, the presented display interface. The touch operation can be a point touch, a long-time press touch and a moving touch. The point touch is mostly applied to triggering of any button or icon in the display interface. The long-time press touch is mostly applied to drag control of an element. The moving touch is mostly used for handwriting writing or erasing, wherein the moving touch is often represented in the form of a track.
[0177] Generally, the control operation on the display interface of the interactive tablet includes but is not limited to a touch operation, a keyboard operation, a mouse operation, and a physical key operation. The operation of generating the handwriting erasing instruction in the present embodiment can also preferably adopt a touch operation, a mouse operation and a keyboard operation, etc.
[0178] For example, the pre-operation of performing the step can be described as follows: a function button for entering the erasing mode, such as an erasing button, is displayed in the interface, and the user touches the erasing button, the touch frame in the interactive whiteboard responds to the touch signal of the touch operation, and feeds back the touch information related to the touch signal to the upper layer (such as the main processor in the intelligent processing system). Thus, the step can receive the handwriting erasing instruction generated by the upper layer and respond to the handwriting erasing instruction to enter the handwriting erasing mode.
[0179] In the embodiment, the handwriting erasing mode can be understood as that the interactive whiteboard has the permission to erase the displayed elements in the display interface after the mode is started. That is, after entering the erasing mode, the handwriting presented in the display interface in the writing mode can be regarded as an erasing object, and the permission to erase the handwriting is obtained.
[0180] S103, when the touch object touches the surface of the display screen and moves, obtaining the touch point information fed back by the touch frame, the touch object being controlled by the user.
[0181] In the embodiment, the touch object can be specifically a finger of the user, an active stylus or a passive stylus, etc., and the user can control the touch object to move on the surface of the display screen of the interactive whiteboard, wherein the moving state of the touch object when moving can be used for erasing the handwriting in the erasing mode. For example, the touch object when erasing can be a physical eraser (such as a touch blackboard eraser) specially matched with the interactive whiteboard, or a body part of the user, such as a hand, etc.
[0182] Regarding the touch of the touch object to the display screen and the information feedback, it can be known from the above description in the embodiment that the interactive whiteboard is further configured with a touch frame combined with the display screen, wherein the touch frame can be specifically a frame composed of optical touch sensors and embedded in the edge of the display screen. In the step, the touch frame can generate a touch signal based on the optical touch sensors contained therein when the touch object moves on the display screen, and identify the corresponding touch point information through the response to the touch signal.
[0183] Specifically, Figure 1 a An effect display diagram of the touch frame responding to the touch object in a handwriting erasing method provided in Embodiment One of the application is shown in FIG. 1. Figure 1 a As shown in FIG. 1, one or more optical touch sensors 120 are installed on both sides of the edge of the display screen 110 of the interactive whiteboard, constituting a touch frame. The moving state of the touch object (such as the finger of the user as the touch object required for erasing) of the user on the display screen 110 can be presented by finger states 131 to 135.
[0184] According to the above description, during the starting and running of the interactive tablet, the processor can start the optical touch sensor 120, the optical touch sensor 120 scans the light signal on the surface of the display screen of the interactive tablet, detects whether the touch object appears on the surface of the display screen according to the transmission of the light signal, and generates the corresponding touch signal in real time during the movement of the touch object when the touch object is detected. At the same time, the touch frame can respond to the generated touch signal, so as to feed back the touch point data recognized after the response to the upper layer (such as the main processor in the intelligent processing system) of the interactive tablet. In this embodiment, the touch point data is referred to as touch point information.
[0185] In this embodiment, considering that the touch response accuracy of the touch frame arranged on the interactive tablet relative to the touch object reaches the set accuracy range, it can be considered that the touch frame adopted in this embodiment is a high-precision touch frame. The touch point information fed back by the touch frame in the above-mentioned step is superior to the touch point information fed back by the existing conventional touch frame in terms of accuracy and information detail. For example, the touch point information fed back by the touch frame to the upper layer of the interactive tablet at least includes the touch point coordinates of the touch point, the touch point height and width and the touch area generated by the touch signal of the touch object, and the corresponding touch rotation information when the touch object rotates.
[0186] S104, by analyzing the obtained touch point information and the to-be-erased handwriting, using an erasing geometric shape matched with the touch object to erase the to-be-erased handwriting in the interface.
[0187] In this embodiment, from the perspective of the user, when the user touches into the erasing mode, it can be known that the user has the intention to erase the elements in the display interface, and the elements that meet the erasing condition can be preferably the handwriting generated by the user in advance. In this embodiment, the handwriting displayed in the display interface is referred to as to-be-erased handwriting.
[0188] It should be noted that in the existing erasing implementation, after the touch enters the erasing mode, the geometric shape of the eraser used for the erasing operation is often pre-set by the user, such as a circle or a rectangle; and the erasing size of the eraser can only be the same as the size of the eraser. In the existing erasing, the geometric shape of the eraser, especially the shape after the rotation of the eraser and the erasing size will not change due to the change of the shape or size of the touch object, and often need to be set artificially. Therefore, when erasing based on the existing erasing method, there is a problem that the erasing time is long due to the small size of the eraser.
[0189] In the interactive tablet, if the user wants to realize the individualized erasing of the handwriting and improve the erasing efficiency of the handwriting, the data information capable of representing the shape of the touch object used by the user needs to be acquired, and then the erasing geometry shape matched with the touch object during the erasing of the handwriting can be determined through the processing of the data information. Finally, the eraser shape and size are presented according to the determined erasing geometry shape, and the erasing of the handwriting is performed through the presented eraser, so as to realize the diversification of the presented geometry shape of the eraser in the handwriting erasing operation, and improve the erasing efficiency of the handwriting erasing operation.
[0190] It should be noted that the determination of the erasing geometry shape corresponding to the touch object is mainly based on the touch area of the touch point information. Different sizes of the touch area often correspond to different erasing geometry shapes, that is, the erasing geometry shape matched with the touch object is embodied by the touch area of the touch object acting on the display screen. In this embodiment, the geometry shape matched with the touch area can be determined through the analysis of the touch area in the touch point information, and the geometry shape is taken as the erasing geometry shape corresponding to the touch object. The erasing geometry shape determined through this step at least includes a circular shape, a rounded rectangular shape and an arbitrary irregular shape.
[0191] For example, the corresponding relationship between the touch area and the erasing geometry shape is mainly determined according to the shape and size of the touch area. For example, when the touch object is a finger, the touch area in the touch point information can actually represent the coverage area of the finger touch, and the shape of the touch area is close to a circular shape. Therefore, it is considered that the erasing performed by using the touch object is a small area range erasing, so that a circular shape with an area equal to the touch area can be taken as the erasing geometry shape of the touch object, and an eraser with the erasing geometry shape (circular shape) is presented in the erasing mode to perform the erasing of the handwriting.
[0192] For another example, when the touch object is a back of hand, the touch area in the touch point information can actually represent the coverage area of the back of hand touch, and the shape of the touch area is close to a quadrilateral with a rounded corner. Therefore, it is considered that the erasing performed by using the touch object is a large area range erasing, so that a rounded rectangular shape with an area corresponding to the coverage area of the back of hand can be formed as the erasing geometry shape of the touch object.
[0193] For another example, when the touch object is a fist after the hand is clenched (i.e. the position of the little finger side), the touch area in the touch point information can actually represent the coverage area of the fist touch, and the shape of the touch area is more like a combination of two geometry shapes, such as a polygon and a circular shape. Therefore, in this case, the shape after the combination of the polygon and the circular shape can be taken as the erasing geometry shape of the touch object, and the combined shape can be considered as an arbitrary irregular shape.
[0194] In the embodiment, the touch frame tends to feed back the touch point information in a collection cycle, and the fed back touch point information tends to contain the data information of the touch points corresponding to the touch signals received in the collection cycle. In the erasing mode, the touch object is in contact with the display screen during the process of erasing the handwriting by moving on the display screen, that is, the touch object does not leave the display screen, and the interactive tablet can continuously realize the erasing of the handwriting by the movement of the touch object. Therefore, under the above premise, when the erasing geometry of the touch object is determined, only the touch point information of the touch point generated when the touch object first contacts the display screen is needed, that is, the determination of the erasing geometry of the touch object is only needed once during the process that the touch object does not leave the display screen.
[0195] In this step, the specific implementation process of erasing the handwriting to be erased according to the determined erasing geometry is analyzed as follows: first, the touch points generated by the touch object on the touch frame at a certain moment can all present eraser patterns consistent with the erasing geometry; second, considering that the touch object is touch moving on the display screen, that is, the formed eraser patterns are also discrete and continuously presented, thus by connecting the presented eraser patterns, a continuous geometric closed figure can be formed, which is equivalent to the moving contour geometric figure formed after the movement of the touch object; third, the formed moving contour geometric figure constitutes the erasing area on the display interface, and finally, the handwriting to be erased in the erasing area can be determined, and the erasing of the handwriting to be erased is realized.
[0196] Among them, the eraser patterns presented in the erasing geometry include a first eraser pattern 140 presented in a rounded rectangle and a second eraser pattern 150 presented in a circle. Figure 1 b The effect diagram of the erasing geometry presented in the handwriting erasing method provided by the embodiment one of the application is shown in FIG. 1. Figure 1 b As shown in FIG. 1, the first eraser pattern 140 presented in a rounded rectangle and the second eraser pattern 150 presented in a circle are included. Figure 1 b Among them, the continuous geometric closed figure formed in the movement of the touch object includes a moving contour geometric figure 160 formed when the erasing geometry is a rounded rectangle.
[0197] The effect diagram of the moving contour geometric figure as the erasing area in the handwriting erasing method provided by the embodiment one of the application is shown in FIG. 2. Figure 1 c As shown in FIG. 2, the moving contour geometric figure 160 formed when the erasing geometry is a rounded rectangle is included. Figure 1 c Figure 1 c
[0198] In the specific implementation of the present step, the construction of the moving contour geometric figure needs to be performed in the movement of the touch object. Through analysis, it can be found that the continuous moving contour geometric figure is actually equivalent to the area formed after the erasing geometric figure presented by each touch point. Therefore, for the determination of the moving contour geometric figure, it is only necessary to determine the figure formed after the connection of the adjacent two touch points presenting the erasing geometric figure. Due to the difference of the erasing geometric figure, the formation mode of the moving contour geometric figure based on the figure of the adjacent erasing geometric figure is also different. In order to normally perform the erasing operation, the present step needs to construct the moving contour geometric figure corresponding to different erasing geometric figures respectively.
[0199] For example, when the erasing geometric figure is a rounded rectangle, the corresponding contour construction mode of the rounded rectangle needs to be used to realize it. Specifically, the figure representation of two rounded rectangles can be determined, and then some points selected on the two rounded rectangles are connected through region expansion, thereby constructing the closed area formed based on the two rounded rectangles as the corresponding moving contour geometric figure of the rounded rectangle.
[0200] For example, when the erasing geometric figure is a circle, the corresponding contour construction mode of the circle needs to be used to realize it. Specifically, the figure representation of two circles can be determined, and then two connection points selected on the two circles are connected, thereby constructing the closed area formed based on the two circles as the corresponding moving contour geometric figure of the circle.
[0201] The handwriting erasing method provided by the embodiment one can be executed by an interactive panel, and the touch response accuracy of the touch frame equipped on the interactive panel reaches the set accuracy range. The method can first display a display interface containing handwriting to be erased through a display screen, then receive a handwriting erasing instruction to enter a handwriting erasing mode, then obtain touch point information fed back by the touch frame when a touch object touches the surface of the display screen and moves, and finally erase the handwriting to be erased in the interface by using an erasing geometric figure matched with the touch object through analysis of the obtained touch point information and the handwriting to be erased. The execution subject of the method, the interactive panel, is configured with a high-precision touch frame in the hardware structure, and the high-precision touch frame can realize function optimization in the software application level by using the method provided in the embodiment. Compared with the existing interactive panel which is not optimized in the software level, the method provided in the embodiment can ensure that the erasing response to the handwriting to be erased in the interface is more matched with the erasing geometric figure of the touch object used by the user, so as to realize flexible adjustment of the erasing area in the erasing process, and further realize the improvement of the erasing efficiency on the interactive panel.
[0202] As an optional embodiment of the embodiment one of the present application, the optional embodiment can further optimize after obtaining the touch point information fed back by the touch frame, comprising: processing each touch point information, so that each touch point information has a uniform unit format and data structure.
[0203] It should be noted that the present embodiment for the presentation operation of the writing handwriting is mainly executed by the intelligent processing system on the upper layer of the interactive tablet, and specifically can be executed by the host processor, and the touch point information required for the presentation of the writing handwriting is mainly fed back by the touch frame on the hardware layer of the interactive tablet. The present embodiment can regard the touch point information fed back by the touch frame as the input information required by the upper layer.
[0204] For the touch frame configured on the interactive tablet, if it comes from different manufacturers, the execution parameters possessed by the touch frame also exist different, which can very likely lead to the difference in the representation form of the touch information fed back by the touch frame, affecting the normal execution of the handwriting erasing method. In order to ensure the uniformization of the data information in the execution flow of the presentation of the writing handwriting, the information processing operation proposed in the present optional embodiment is added on the basis of the above-mentioned embodiment one.
[0205] For example, the present optional embodiment can analyze the production information and batch information of the touch frame, determine the original information format possessed by the touch point information fed back by the touch frame, and then process the unit format and data structure of the touch point information, so as to ensure that the data input to the upper layer of the interactive tablet has a uniform information format. After processing, the unit format related to the manufacturer or batch of the touch frame is removed, such as the touch area unit in the original information format of the touch point information, which is basically according to the number of optical trigger sensors blocked on the touch frame as the touch width unit and touch height unit. The present optional embodiment can convert it into a unified abstract unit in the software, such as a pixel unit.
[0206] On the basis of the above optimization, the present embodiment can specifically process each touch point information as follows:
[0207] According to the size information of the touch frame and the screen resolution information, the unit of each data information in the touch point information is converted into a uniform set unit format;
[0208] The data structure corresponding to the set unit format is used to record the touch point information.
[0209] In the specific implementation of the present optional embodiment, in order to obtain relatively accurate data information from the touch frame, it is necessary to understand the size of the touch frame currently equipped on the interactive tablet and the screen resolution information of the display screen, etc., and these information can be obtained by communicating with the touch frame hardware or reading from the intelligent processing system.
[0210] For the specific processing item of the touch point information, the optional embodiment can uniformly convert the data information such as the touch point coordinates, the height and width of the touch point, or the vertex of the geometric figure formed during the touch, which are identified by the touch frame in the original information format, into the unit values of the software layer, such as the coordinate points, the width or height values represented by pixels.
[0211] Similarly, another advantage of the high-precision touch frame is that it can also capture the rotation operation of the touch object during the touch and determine the rotation angle of the touch rotation. At this time, the initial obtained rotation angle can also be processed according to the uniform radian unit through the processing manner of the optional embodiment.
[0212] The above optional embodiment of the embodiment one of the application specifically optimizes the processing operation of the touch point information fed back by the touch frame. Through the processing operation, the unified input of the touch point information can be realized, the incompatible situation of the touch point information in the subsequent execution process caused by different attribute parameter information possessed by the touch frame itself is avoided, and the execution efficiency of the handwriting erasing is effectively improved.
[0213] Embodiment two
[0214] Figure 2 A flowchart of a handwriting erasing method provided by the embodiment two of the application is given. The embodiment is optimized based on the above embodiment. In the embodiment, the touch point information obtained through the feedback of the touch frame can be specifically optimized as follows: the hardware circuit in the touch frame identifies each touch signal, the touch signal is generated when the touch object moves on the display screen; the touch point information fed back by the touch frame for each touch signal through the human-computer interaction (HID) standard protocol is obtained, wherein one touch point information corresponds to one touch point, and the touch point information includes the touch point coordinates, the height and width of the touch point, and the touch rotation angle.
[0215] Meanwhile, the embodiment can also specifically optimize the erasing of the handwriting to be erased in the interface by using the erasing geometric shape matched with the touch object through the analysis of the obtained touch point information and the handwriting to be erased as follows: the touch point information obtained is used to determine the erasing geometric shape matched by the touch object in the movement and to determine the movement contour geometric figure constituted by the adjacent touch points in the movement in the erasing geometric shape; each handwriting point included in the handwriting to be erased is analyzed, a hit test is performed on each handwriting point and the movement contour geometric figure, the target handwriting to be erased falling into the movement contour geometric figure is determined, and the target handwriting to be erased is erased in the display interface.
[0216] As Figure 2As shown, the handwriting erasing method provided in Embodiment Two of the present application specifically comprises the following operations:
[0217] S201, a display interface containing handwriting to be erased is displayed through a display screen.
[0218] Exemplarily, the display interface with element information such as handwriting to be erased can be triggered by a user, or can be triggered in some associated scenarios (such as a courseware display scenario).
[0219] S202, a handwriting erasing instruction is received, and a handwriting erasing mode is entered, wherein the handwriting erasing instruction is formed by triggering of the user.
[0220] Exemplarily, the handwriting erasing instruction can be received by the user through triggering of an erasing button in the display interface, so as to enter the handwriting erasing mode, and to start the permission of erasing handwriting in the display interface.
[0221] S203, when a touch object touches the surface of the display screen and moves, each touch signal is recognized by the hardware circuit in the touch frame, wherein the touch signal is generated when the touch object moves on the display screen.
[0222] In the embodiment, the operation of touching the display screen and moving thereon by the touch object is analyzed from the perspective of the touch frame. Specifically, the optical touch sensor can be regarded as a core component of the touch frame. After the optical touch sensor is powered on by the interactive panel, whether the light beam grid formed by the densely arranged infrared signals in different directions is blocked or not can be used to detect whether there is a touch object on the surface of the display screen by the optical touch sensor arranged at the edge of the display screen (such as the infrared emitter arranged on one side and the infrared receiver arranged on the other side).
[0223] If there is a touch object, the corresponding touch signal can be generated at the corresponding position when the touch object blocks the normally emitted infrared signal. Then, the hardware circuit arranged in the touch frame can determine the coordinate information of the position of the touch signal represented by the data at the hardware level, the corresponding width information and height information of the touch object when the touch object blocks the light beam grid, and even the touch area information and rotation information of the touch object, by recognizing the touch signal, such as recognizing the high and low levels of the touch signal.
[0224] It can be understood that a group of touch signals can be generated accordingly with the movement of the touch object on the display screen, and the hardware circuit on the touch frame can effectively recognize the related touch information of each touch signal in the group. Meanwhile, the pressure information of the touch object at each touch point can also be determined by the pressure of the touch object acting on the hardware circuit of the touch frame.
[0225] S204, obtaining the touch point information fed back by the touch frame for each touch signal through a human-computer interaction (HID) standard protocol.
[0226] As described above, it can be known that, considering that the touch frame is a hardware structure on the interactive panel, the touch point information recognized by the hardware circuit on the touch frame is difficult to be directly input to the upper-layer software processing module, and thus the touch point information recognized at the hardware level can be converted into touch point information readable at the software level through the special HID standard protocol in this step.
[0227] In the handwriting erasing operation implemented based on the embodiment, each touch point information fed back by the touch frame specifically represents one touch point triggered by the touch object, and the required touch point information at least includes touch point coordinates, touch point height and width, and a touch rotation angle.
[0228] Specifically, the touch point coordinates are basic information of touch control, the touch point height and width can be used to represent the size of the shielding of the optical sensor on the touch frame by the user when moving the touch object, and the touch area is used to represent the coverage area of the touch signal generated by the touch frame by the user when moving the touch object, and the above information can be used to determine the matching erasing geometric shape of the touch object. Similarly, the touch rotation angle can represent the rotation information of the touch object when moving, and the rotation information can also be regarded as basic information required for determining the moving contour geometric figure corresponding to the erasing geometric shape.
[0229] Through the above steps of the embodiment, the touch point information fed back by the touch frame can be obtained in real time during the movement of the touch object, and thus the embodiment can realize the erasing of the handwriting to be erased on the display interface through S205 to S207 described below.
[0230] S205, determining the matching erasing geometric shape of the touch object in movement and determining the moving contour geometric figure constituted by adjacent touch points in the erasing geometric shape through the obtained touch point information.
[0231] In the embodiment, this step specifically realizes the determination of two important information required in the erasing operation, one is the matching erasing geometric shape of the touch object, and the other is the moving contour geometric figure formed by the adjacent two touch points in the determined erasing geometric shape.
[0232] According to the description in the above embodiment, the determination of the erasing geometry only needs to focus on the touch point information of the touch point generated when the touch object first contacts the display screen in the movement process, and the touch area in the touch point information can be used to determine the geometry matching the touch area, so that the matching geometry can be used as the erasing geometry that can be presented in this erasing.
[0233] According to the description in the above embodiment, the erasing geometry at least includes a rounded rectangle, a circle and an arbitrary irregular figure, and based on the touch point information of each touch point, a rubber eraser pattern consistent with the erasing geometry can be presented for each touch point, and the rubber eraser patterns of adjacent two touch points can be connected in a certain way, and the closed area formed by the connection can be regarded as the movement contour geometry corresponding to the adjacent two touch points.
[0234] For example, when the rubber eraser images of the adjacent two touch points are rounded rectangles, each rounded rectangle is equivalent to replacing several corners of a rectangle with rounded corners, that is, a rounded rectangle at least includes the side length of the rectangle and part of the circular arc of the circle.
[0235] For two rounded rectangles represented in the above form, first, the key points constituting each rounded rectangle are obtained, and then some connection points are selected from the key points of the two rounded rectangles and connected, and finally the self-area of the two rounded rectangles and the closed area formed by the connection are obtained, and the combination of the self-area and the closed area constitutes the movement contour geometry corresponding to the adjacent two touch points when the erasing geometry is a rounded rectangle.
[0236] In addition, when the erasing geometry is a circle or an arbitrary irregular figure, there is also a corresponding movement contour geometry determination method. In summary, regardless of the erasing geometry, the graph representation information of the corresponding figure of the erasing geometry itself needs to be determined first, and then the connection points required for connection are selected based on the obtained graph representation information, to form a closed combination area based on the connection points and the corresponding figure of the erasing geometry itself, as the corresponding movement contour geometry.
[0237] It should be noted that the rounded rectangle and the circle can be regarded as two special cases of the arbitrary irregular figure, and when the two special case figures are used to determine the movement contour geometry, they can not be determined according to the determination method corresponding to the arbitrary irregular figure, but there are other preferred determination schemes. Therefore, the present embodiment regards the rounded rectangle and the circle as two independent figures different from the arbitrary geometric combination figure, and also gives the corresponding determination scheme for the determination of the movement contour geometry.
[0238] S206, analyze each stroke point included in the to-be-erased stroke, perform a hit test on each stroke point and the moving contour geometric figure, and determine target to-be-erased strokes falling into the moving contour geometric figure.
[0239] S205 corresponds to determining the to-be-erased area (moving contour geometric figure) with erasing authority formed by the movement of the touch object in the erasing operation. This step mainly implements how to determine which strokes in the display interface fall into the moving contour geometric figure. If there are strokes falling into the moving contour geometric figure, these strokes are considered as current erasable strokes, which are recorded as target to-be-erased strokes in this embodiment.
[0240] In this embodiment, the to-be-erased strokes in the display interface can be understood as the content written or edited by the user into the interface in the writing or editing mode. These to-be-erased strokes can also be represented by corresponding stroke information, and the key information in the stroke information is the stroke point coordinates of the stroke points constituting these to-be-erased strokes. This step can directly obtain the stroke point coordinates of each stroke point representing the to-be-erased strokes.
[0241] This step can convert the operation of determining which to-be-erased strokes fall into the moving contour geometric figure into the operation of determining whether each stroke point representing the to-be-erased strokes falls into the moving contour geometric figure. The determination of whether a stroke point falls into the moving contour geometric figure can be achieved by performing a hit test on the stroke point and the moving contour geometric figure.
[0242] The hit test on the stroke point and the moving contour geometric figure corresponds to determining whether the stroke point is in the closed area of the moving contour geometric figure. To determine whether the stroke point is in the closed area, it is equivalent to determining the data information representing the closed area. It can be known that the moving contour geometric figure can have an irregular geometric shape and is difficult to represent by direct data information. Therefore, this embodiment considers disassembling the moving contour geometric figure, such as disassembling the moving contour geometric figure into a combination of circular and polygonal geometric figures which are easy to represent, and then determining whether the stroke point exists in the closed area of each geometric figure after disassembly by the hit test method.
[0243] For different geometric figures, the method of performing the hit test on the stroke point can be different. For example, for a circular area, the hit test can be achieved by determining whether the distance between the stroke point and the center of the circle is less than the radius. For example, for a convex polygonal area, the hit test can be achieved by determining whether the stroke point falling into the area is 360 degrees after forming a triangle with each convex polygon vertex. For example, the vector method hit test is used in a rectangular area.
[0244] In the embodiment, after the mobile contour geometry is disassembled, the hit test of the handwriting point in each sub-graphics region can be realized, and when it is determined that the handwriting point exists in a certain region, the handwriting represented by the handwriting point is determined as the target handwriting to be erased.
[0245] S207, erasing the target handwriting to be erased in the display interface.
[0246] In the embodiment, after the target handwriting to be erased is determined through the above steps, the erasing of the target handwriting to be erased can be realized through the step.
[0247] The visual form presented on the display interface is that the eraser presented by the touch object moves on the display interface according to the erasing geometry, and the positions passed by the eraser no longer display the handwriting in the interface which has been edited or written by the user.
[0248] Figure 2a An effect display diagram of the handwriting erasing method provided in Embodiment Two of the present application is given, as shown in FIG. 21. Figure 2a As shown in FIG. 21, the display interface 21 presents the handwriting 22 to be erased which has been written thereon, the user presents the erasing geometry of the circle 23 on the display interface 21 using the touch object controlled by the user, and the handwriting displayed before is no longer displayed on the region moved by the circle, but is presented as a blank region.
[0249] The handwriting erasing method provided in Embodiment Two of the present application specifically realizes the feedback form of the touch point information, and also specifically realizes the erasing mode of the handwriting erasing. The execution of the method is based on the premise that the touch frame with the touch response accuracy within the set accuracy range is equipped on the interactive panel. Compared with the existing interactive panel with the conventional touch frame, after the high-precision touch frame is equipped on the interactive panel in the embodiment, the high-precision touch frame can feed back more accurate touch point information containing more effective information to the application layer. Therefore, in combination with the method provided in the embodiment, the erasing response to the handwriting to be erased in the interface can be more matched with the erasing geometry of the touch object used by the user, so that the flexible adjustment of the erasing region in the erasing process is realized, and the erasing efficiency on the interactive panel is improved.
[0250] For the specific determination of the erasing geometry and the mobile contour geometry, as a first optional embodiment of Embodiment Two, Figure 2b An implementation flowchart of the determination of the erasing geometry and the contour geometry in the handwriting erasing method provided in Embodiment Two of the present application is given. As shown in FIG. 22, Figure 2bAs shown, the first alternative embodiment further particularizes the step S205 of determining, by the obtained touch point information, the erasing geometric pattern matched by the touch object in the movement, and determining the movement contour geometric figure formed by the adjacent touch point pairs in the movement under the erasing geometric pattern, into the following steps:
[0251] S2051, extract the key touch point information, and obtain the key touch area in the key touch point information, wherein the key touch point information is the touch point information of the touch point generated when the touch object first contacts the display screen in the movement.
[0252] For example, the key touch point information can be understood as the information of the key touch point for determining the erasing geometric pattern in the touch point information fed back by the touch frame, and the key touch area generated when the touch object contacts the display screen is also included in the key touch point information.
[0253] In this embodiment, the user controls the touch object to contact the display screen and move on the display screen, and there is no case where the touch object leaves the display screen in the process, so it can be considered that the shape of the touch object used by the user does not change in the process, i.e., the erasing geometric pattern matched by the touch object does not change in the whole movement process.
[0254] To simplify the determination operation of the erasing geometric pattern, the embodiment does not need to determine the erasing geometric pattern of the touch object based on the touch point information corresponding to each touch point, but only needs to screen one touch point information to determine the erasing geometric pattern of the touch object. The embodiment considers using the touch point information of the touch point generated when the touch object first contacts the display screen to determine the operation, and records the touch point information as the key touch point information.
[0255] It can be known that the embodiment preferably but not particularly limits the key touch point information to only use the touch point information corresponding to the first contact.
[0256] S2052, determine the area threshold range to which the key touch area belongs and the area shape, find the target shape matched with the area shape in each geometric shape corresponding to the area threshold range, and determine the target shape as the erasing geometric pattern matched by the touch object.
[0257] In this embodiment, the area value of the key touch area can be divided in a certain area threshold range set in advance, and the embodiment also sets a plurality of geometric shapes matched with each area threshold range in advance, for example, one area threshold range can be matched with a plurality of geometric shapes, and the matched figures include a combination of a circle, a circle and a quadrilateral, a combination of a circle and an ellipse, etc.
[0258] After the area shape is known, a target shape matching the area shape can be determined from each geometric figure corresponding to an area threshold range. For example, if the area shape is a rectangle with an arc, it can be considered that the key touch area matches a rounded rectangle, and finally the rounded rectangle can be taken as the erasing geometric shape of the touch object.
[0259] S2053, for each adjacent touch point pair in the touch object movement, key geometric information of each touch point in the adjacent touch point pair relative to the erasing geometric shape is determined by analyzing touch point information corresponding to the adjacent touch point pair.
[0260] In the embodiment, the touch frame feeds back touch point information in a discrete form in real time in the movement of the touch object, each touch point information corresponds to a touch point, and two adjacent touch points can be considered as a touch point pair. Considering that the touch object in the embodiment functions to realize handwriting erasing, each touch point generated in the movement of the touch object presents an allowed erasing area according to the determined erasing geometric shape, and the key geometric information of each touch point relative to the erasing geometric shape can be understood as mathematical representation information for representing an erasing area presented by the touch point, and mathematical representation information for representing a closed area associated after the erasing areas presented by two adjacent touch points are connected. At least the vertex information or the center information and the radius information of the erasing area presented in the erasing geometric shape can be included in the determined key geometric information.
[0261] In the embodiment, the key geometric information of each touch point relative to the erasing geometric shape can be obtained by combining the corresponding touch point information and the determined erasing geometric shape. Generally, after the touch point coordinates, the touch point height and width, and the touch rotation angle of the touch point are known, mathematical operation can be used to determine the data information required for various graphic representations.
[0262] First, when the erasing geometric shape is a rounded rectangle, the rounded rectangle includes a rectangle and a rounded corner with each vertex of the rectangle as the center, and the execution of the first optional implementation of the above S2053 is specifically described as follows:
[0263] a1, the rounded rectangle is taken as the first to-be-constructed geometric figure of each touch point in the adjacent touch point pair.
[0264] In the embodiment, the erasing area in which each touch point for handwriting erasing is presented on the display screen can be taken as the to-be-constructed geometric figure corresponding to the touch point, and the to-be-constructed geometric figure corresponding to the erasing geometric shape of the rounded rectangle in the embodiment is taken as the first to-be-constructed geometric figure.
[0265] b1. For each touch point in the pair of adjacent touch points, the center point coordinates of the rectangle, the center point coordinates of each rounded corner, and the key cut point coordinates in the first to-be-constructed geometric figure, and the two figure connecting point coordinates are determined by the touch point coordinates, the touch width, the touch height, and the touch rotation angle in the corresponding touch point information, in combination with a pre-defined rounded corner radius.
[0266] For example, the embodiment is described in the mathematical calculation aspect to specifically describe the determination of the key geometric information corresponding to the touch point when the erasing geometric shape is a rounded rectangle. Figures 2c-2h The related schematic description of the determination of the key geometric information when the erasing geometric shape is a rounded rectangle in the handwriting erasing method provided in Embodiment Two of the present application is given.
[0267] Considering that the interactive panel provided in the embodiment also has the response to the rotation operation performed in the movement of the touch object, the embodiment represents a rounded rectangle as one rotated rectangle and four rounded corners, wherein the rotated rectangle can be considered as a rectangle with an angle offset relative to the horizontal and vertical directions of the display interface. In order to facilitate calculation, the embodiment preferably considers the upper left corner of the display interface as the zero-zero point coordinates, and the horizontal coordinates increase from left to right, and the vertical coordinates increase from top to bottom, as shown in Figure 2c .
[0268] Among them, Figure 2c The effect of the first to-be-constructed figure corresponding to one of the touch points, i.e., the rounded rectangle, is shown in FIG. 8B, wherein points A, B, C, and D constitute a rotated rectangle of the rounded rectangle, and points A, B, C, and D also serve as the centers of the four rounded corners included in the rounded rectangle. Then, the adjacent two rounded corners are connected by a cut point, and the combined figure formed thereby can be regarded as the to-be-constructed rounded rectangle, and Figure 2c The radius of the rounded corner in FIG. 8B is a configurable parameter, and the parameter value can be determined in advance. In addition, the length of the side AC plus the diameter of the rounded corner is equivalent to the height of the rounded rectangle; and the length of the side CD plus the diameter of the rounded corner is equivalent to the width of the rounded rectangle.
[0269] It can be known that each touch point in the pair of adjacent touch points has a corresponding to-be-constructed rounded rectangle. Considering that the geometric shape of the rounded rectangle corresponding to each touch point is the same, it can be considered that the implementation manner of determining the corresponding geometric information of each rounded rectangle is the same. The geometric information required to represent the rounded rectangle is equivalent to the determination of the vertex coordinates and the cut point coordinates in the above Figure 2c .
[0270] Specifically, the problem of calculating the geometric information of the rounded rectangle can be converted into the following mathematical problem:
[0271] First, according to the touch point coordinates, the coordinates of the point O1 can be determined, and the height and width of the rounded rectangle can be determined through the touch point height and width. The touch rotation angle and the rounded radius Radius can also be obtained, wherein the touch rotation angle can be considered as the angle of rotation relative to the horizontal and vertical axes of the given coordinate system. That is, after converting the data problem, it can be equivalent to: given O1 and the rotation angle θ and the rounded radius Radius, and the width and height of the rounded rectangle, how to find the coordinates of the vertex of the rotated rectangle in the rounded rectangle.
[0272] Considering that the rounded rectangle has a rotation angle relative to the above coordinate system, in order to simplify the description, the coordinates of the vertex of the rounded rectangle when the assumed rotation angle is 0 can be determined first.
[0273] Specifically, it can be performed first in the rounded rectangle as shown in Figure 2d The calculation of the coordinates of point A relative to O1 given O1 is performed, and the specific formula is as follows:
[0274] O1.X = foo + Width / 2
[0275] A.X = foo + Radius
[0276] A.X - O1.X = the X coordinate of point A relative to O1
[0277] = foo + Radius - (foo + Width / 2)
[0278] = Radius - Width / 2
[0279] After determining the coordinates of point A through the above method respectively, on the basis of the above calculation result, the calculation in the rounded rectangle as shown in Figure 2e is performed:
[0280] Specifically, Figure 2d the rounded rectangle in the above formula is rotated by θ, and can be presented in the figure as shown in Figure 2e At this time, it is equivalent to knowing the coordinates of point A and the rotation angle θ to determine the coordinates of points A, B, C and D relative to point O1 after rotation by θ.
[0281] According to the formula of a new point obtained by rotating a certain point by a specific point (mainly embodied in Figure 2e ), the coordinates of point A after rotation relative to O1 can be calculated; in order to make the coordinates of point A relative to zero, it is necessary to convert the coordinates of point A relative to O1 to the coordinates of point A relative to zero, that is, the specific implementation is to add the coordinates of O1, and finally obtain the coordinates of the rotated point A.
[0282] Similarly, the coordinates of points B, C and D in the rounded rectangle can also be calculated using the same method. The coordinates of the vertices of the rotated rectangle in the rounded rectangle, i.e. the coordinates of the centers of the rounded corners, can be obtained by the above description.
[0283] For the geometric information in the rounded rectangle, the coordinates of the tangent points used when connecting two adjacent rounded corners need to be obtained, such as A1, A2, B1 and B2 shown in Figure 2c
[0284] Specifically, A1 is the vertical coordinate of point A before rotation minus the radius of the rounded corner, and A2 is the horizontal coordinate of point A before rotation minus the radius of the rounded corner. Thus, the coordinates of A1 and A2 can be calculated using the formula for a new point obtained by rotating a certain point by a certain point, and similarly, the coordinates of B1 and B2 can be calculated.
[0285] The coordinates of each point in the rounded rectangle represented by each touch point in a pair of adjacent touch points can be calculated in the above manner. Next, how to calculate the geometric information of each connection area formed after connecting two rounded rectangles is described.
[0286] As shown in Figure 2f , assuming that the rectangle has no rounded corners, the running track connecting two rectangles is shown, wherein the connection of the two rectangles can be attempted in the following manner:
[0287] Each vertex of the two rectangles is attempted to be connected; two line segments that do not intersect the rectangle itself are obtained, and a line segment connecting the centers of the two rectangles. The line segment connecting the centers of the two rectangles is used to verify whether the two line segments obtained that do not intersect the rectangle itself are correct. The correct two line segments should both be parallel to the line segment connecting the centers of the two rectangles.
[0288] After connecting in the above manner, the connection state diagram shown in Figure 2g can be obtained.
[0289] After calculating the connection line of the two rectangles without rounded corners, the coordinates of the key points associated with the connection of the two rounded rectangles after adding rounded corners are calculated as follows:
[0290] First, after adding rounded corners, the connection effect diagram of the two rounded rectangles is shown in Figure 2h .
[0291] As shown in Figure 2h , it can be understood that the B1C2 line segment corresponding to the BC line segment is actually equivalent to moving the BC line segment horizontally by a distance, and the moving distance is the radius distance of the rounded corner, and the moving direction is outward.
[0292] The coordinates of points B and C are known, and the line segment BC can be calculated using existing mathematical methods. If the line segment is translated in a certain direction by a known distance, it can also be calculated using existing mathematical methods. Similarly, the coordinates of each vertex in the circle shown in FIG. 3B can be calculated. The coordinates of each vertex obtained by calculation in FIG. 3B are equivalent to the coordinates of the connecting points of the two figures after the adjacent touch point pair connects the adjacent rounded rectangles, and the effect of connecting the two rounded rectangles to form a moving contour geometric figure is also included in FIG. 3B. Figure 2h Figure 2h Figure 2h
[0293] c1, the center point coordinates of the rectangle, the center coordinates of each rounded corner, and the key point coordinates, and the connecting point coordinates of the two figures are regarded as the key geometric information of the touch points relative to the first to-be-constructed geometric figure;
[0294] Each rounded corner in the first to-be-constructed geometric figure includes two key points. Each key point is a tangent point when the rounded corner and the adjacent rounded corner are connected by a tangent.
[0295] The above mainly gives the specific implementation of this step, i.e., S2053, which determines the key geometric information when the erasing geometric shape is a rounded rectangle.
[0296] Secondly, for the execution and implementation of the second optional implementation of the above S2053 step when the erasing geometric shape is a circle, the specific description is as follows:
[0297] a2, the circle is recorded as the second to-be-constructed geometric figure of each touch point in the adjacent touch point pair.
[0298] For convenience of distinction, in this optional implementation, the erasing region whose erasing geometric shape is a circle to be constructed is recorded as the second to-be-constructed geometric figure.
[0299] b2, the circle center coordinates and the key intersection coordinates of the corresponding second to-be-constructed geometric figure are determined through the touch point coordinates, touch width, and touch height in the touch point information corresponding to each touch point in the adjacent touch point pair.
[0300] When this step determines the geometric information related to the to-be-constructed circle, the touch point information of each touch point in the adjacent touch point pair is also needed. When the key geometric information is determined in this step, the connected two circle models need to be constructed first, and then according to some geometric characteristics of the circle itself, the required key geometric information can be calculated.
[0301] Preferably, the embodiment can further optimize the step b1 above, i.e., determining the circular center coordinates and the key intersection point coordinates of the corresponding second to-be-constructed geometric figure, by the touch point coordinates, touch width and touch height in the touch point information corresponding to each touch point in the adjacent touch point pair.
[0302] determining the circular center coordinates of the corresponding second to-be-constructed circle by the touch point coordinates, touch width and touch height in the touch point information corresponding to each touch point in the adjacent touch point pair; connecting the corresponding two circular center coordinates to obtain a center line; and constructing a straight line perpendicular to the center line through each of the circular center coordinates to obtain the key intersection point coordinates determined after the straight line intersects with the corresponding second to-be-constructed circle.
[0303] For example, the embodiment still describes the conversion of the determination of the key geometric information of the circle into a mathematical problem, wherein, Figures 2i-2l FIG. 1 shows the key geometric information determination of the circle in the handwriting erasing method provided by the second embodiment of the present application.
[0304] First, as shown in FIG. 2, the connection of two circles is included. Thus, the determination of the key geometric information of the two circles can be converted into the determination of the vertices of the line segment parallel to the touch moving direction and intersecting with the circle when the two circles are connected according to the touch moving direction.
[0305] The above description can be abstracted into a mathematical problem as follows: given two circles, the centers of which are P1 and P2, and the radii of which are r1 and r2, respectively; the line segment AB is perpendicular to the line segment P1P2, and the line segment CD is also perpendicular to the line segment P1P2, and the intersection points of the line segment AB and the circle are A and B, respectively; and the intersection points of the line segment CD and the circle are C and D, respectively; the coordinates of the four points A, B, C and D are to be determined.
[0306] It should be noted that, after the touch point information of the adjacent touch point pair is known, the coordinates of the centers P1 and P2 and the radii r1 and r2 can be obtained by a conventional method, and the touch moving direction can also be determined in real time based on the coordinates of the two touch points. The specific description of the calculation of the coordinates of the four points is as follows:
[0307] Since the two circles can be regarded as independent, one of the circles is taken for calculation first, and the other circle is taken for calculation later. Figure 2i For example, if an auxiliary line perpendicular to the horizontal coordinate is drawn through the point P1, the angle between the line P1P2, which is perpendicular to the direction of the circular motion track of the center, and the auxiliary line is θ.
[0308] The above problem of determining the coordinates of the four points is equivalent to determining the angle θ, as shown in FIG. 3, which is solved by using the following formula: Figure 2j Figure 2j It should be noted that, after the touch point information of the adjacent touch point pair is known, the coordinates of the centers P1 and P2 and the radii r1 and r2 can be obtained by a conventional method, and the touch moving direction can also be determined in real time based on the coordinates of the two touch points. The specific description of the calculation of the coordinates of the four points is as follows:
[0307] Since the two circles can be regarded as independent, one of the circles is taken for calculation first, and the other circle is taken for calculation later. Figure 2i For example, if an auxiliary line perpendicular to the horizontal coordinate is drawn through the point P1, the angle between the line P1P2, which is perpendicular to the direction of the circular motion track of the center, and the auxiliary line is θ.
[0308] The above problem of determining the coordinates of the four points is equivalent to determining the angle θ, as shown in FIG. 3, which is solved by using the following formula: Figure 2j Figure 2j It should be noted that, after the touch point information of the adjacent touch point pair is known, the coordinates of the centers P1 and P2 and the radii r1 and r2 can be obtained by a conventional method, and the touch moving direction can also be determined in real time based on the coordinates of the two touch points. The specific description of the calculation of the coordinates of the four points is as follows:
[0307] Since the two circles can be regarded as independent, one of the circles is taken for calculation first, and the other circle is taken for calculation later. Figure 2i For example, if an auxiliary line perpendicular to the horizontal coordinate is drawn through the point P1, the angle between the line P1P2, which is perpendicular to the direction of the circular motion track of the center, and the auxiliary line is θ.
[0308] The above problem of determining the coordinates of the four points is equivalent to determining the angle θ, as shown in FIG. 3, which is solved by using the following formula: Figure 2j Figure 2jFigure 2j As shown in the calculation, after two points P1 and P2 are known, the angle θ can be calculated by the two points. After the angle θ is calculated, the coordinates of point B can be calculated, as shown in the calculation. Figure 2k Similarly, the coordinates of point A can also be calculated by using the calculation as shown in Figure 2l Since the calculation of the two circles is the same, the coordinates of points C and D can also be calculated by using the calculation as shown in Figure 2l .
[0309] After the calculation is converted into a mathematical problem, the coordinates of the centers of the circles corresponding to the touch points can be determined, which are denoted as the circle center coordinates of the circles in the embodiment; and the coordinates of the key intersection points formed after the two circles are connected can also be calculated.
[0310] c2, the circle center coordinates of the circles corresponding to the touch points and the coordinates of the key intersection points are regarded as the key geometric information relative to the second to-be-constructed geometric figure.
[0311] It can be understood that the above determined coordinate point information can be used as the key geometric information associated with the erasing geometric shape of a circle.
[0312] The above mainly gives the specific implementation of the step S2053, i.e., the determination of the key geometric information when the erasing geometric shape is a rounded rectangle.
[0313] Again, for the third optional implementation of the step S2053 when the erasing geometric shape is an arbitrary irregular figure, the specific description of the execution and implementation is as follows:
[0314] a3, the arbitrary irregular figure is denoted as the third to-be-constructed geometric figure of each touch point in the adjacent touch point pair, and the combination figure information contained in the third to-be-constructed geometric figure is determined.
[0315] In the embodiment, the arbitrary irregular figure can be understood as a combination set figure composed of broken lines and / or arcs, and the arbitrary irregular figure in the embodiment is preferably the figure presentation of the erasing area associated with each touch point in the adjacent touch point pair, which is denoted as the third to-be-constructed geometric figure in the embodiment.
[0316] Through the presentation form of the irregular figure, it can be determined which figure information is included in the irregular figure, such as a broken line figure or a circular arc figure, and the determined information can be denoted as combination figure information.
[0317] Exemplarily, Figure 2m The effect display figure when the erasing geometric shape is an arbitrary irregular figure in the handwriting erasing method provided in the second embodiment of the application is given, as shown in Figure 2mAs shown, the arbitrary irregular figure 24 can be considered as a combination of polygons and circles.
[0318] b3、for each touch point in the adjacent touch point pair, determine, by combining the corresponding touch point information and the combined figure information, a key trajectory point existing on the third to-be-constructed geometric figure relative to the touch point and figure representation information of the third to-be-constructed geometric figure.
[0319] In the embodiment, the determination of the key geometric information corresponding to the irregular figure can be implemented in the following manner. Preferably, the embodiment can embody the determination of the key trajectory point existing on the third to-be-constructed geometric figure relative to the touch point and the figure representation information of the third to-be-constructed geometric figure by combining the corresponding touch point information and the combined figure information into:
[0320] b31, analyze the combined figure information.
[0321] In the embodiment, the analysis of the combined figure information can obtain what shapes are included in the arbitrary irregular figure, such as a polygonal broken line, or a circular arc or a circle, or a polygonal broken line and a circle, etc.
[0322] b32, when the third to-be-constructed geometric figure only contains a polygonal broken line, determine, by the corresponding touch point information, a key trajectory point existing on the polygonal broken line relative to the touch point, and obtain first figure representation information representing the polygonal broken line.
[0323] This step b32 mainly gives one situation, i.e., when only a polygonal broken line is contained, the determination of the associated figure representation information (first figure representation information) of the polygonal broken line and the key trajectory point existing when connecting the two touch points corresponding to each polygonal broken line.
[0324] On the basis of the above optimization, the determination of the key trajectory point existing on the polygonal broken line relative to the touch point by the corresponding touch point information and the obtaining of the first figure representation information representing the polygonal broken line include:
[0325] Determine, by the touch point coordinates, touch height and touch width in the corresponding touch point information, the broken line center point coordinates and each broken line vertex coordinates of the polygonal broken line as the first figure representation information; and select, by the broken line center point coordinates and the corresponding touch point information, a key trajectory point meeting a trajectory point screening condition from each broken line vertex coordinate.
[0326] Specifically, the embodiment can also convert the above problem into a mathematical problem. When the irregular figure is only a polygon, the center axis line in the touch moving direction can be calculated first, where the touch moving direction can be determined by the touch point coordinates of the two touch points. Then, the distances of all vertices of the polygon from the center axis line are calculated, and the vertices farthest from the center axis line on both sides are taken as the key trajectory points of the polygon.
[0327] Exemplarily, Figures 2n-2p The related schematic diagrams of determining the key geometric information when the erasing geometry is an arbitrary irregular figure and only contains a polygon in the handwriting erasing method provided by Embodiment Two of the present application are given.
[0328] As Figure 2n shown, the above calculation process can be abstracted as a mathematical problem as follows: given the polygons A and B and the touch moving direction AB, where the polygon A is transformed along the moving direction to the polygon B, the moving trajectory of the polygon A to the polygon B is calculated. The essence of the above calculation is to connect two vertices of each polygon in the two polygons in the AB direction. The vertices used for connection correspond to the key trajectory points.
[0329] Because each geometry is independent, separate calculations can be performed. In addition, because the touch moving direction is a vector, the vector has no coordinates. For any polygon, the vertices that can be selected in any touch moving direction are calculated. The characteristics of the vertices need to be understood. Considering that the vector has no coordinates, the vector of the touch moving direction can be translated arbitrarily in the calculation implementation. The best way is to translate the vector to the center point of the polygon.
[0330] At this time, the above problem can be converted into the problem of finding the two vertices of the polygon farthest from the straight line corresponding to the vector, where the two vertices are located on the two sides of the straight line. As Figure 2o shown in the polygon, it can be understood that the distances of the points b and d from the line segment AB are the farthest points on the two sides of the line segment. Therefore, the points b and d can be considered as Figure 2o the two key trajectory points in the polygon shown in
[0331] It can be known that the key trajectory points corresponding to the polygon of the other touch point in the adjacent touch point pair are calculated using the same method, and the closed area formed by connecting the corresponding vertices can be obtained. The final closed area is shown in Figure 2p , that is, Figure 2p also shows the effect of connecting the two polygons to form a moving contour geometric figure.
[0332] b33. When it is determined that the third geometric shape to be constructed contains a polyline polygon and a target circle, key trajectory points are determined from the polyline polygon and the key circle through the corresponding touch point information, and second graphic representation information representing the polyline polygon and the key circle is obtained.
[0333] Step b33 mainly provides another case, namely, when in addition to containing a polygonal shape, it also contains a circle (referred to as the target circle in this embodiment), and the key trajectory points are determined when connecting the graphic representation information (second graphic representation information) associated with the irregular shape (the combination of polygonal shape and circle) and the irregular shapes corresponding to the two touch points.
[0334] Based on the above embodiments, the step of determining key trajectory points from the polygonal polygon and key circle using the corresponding touch point information, and obtaining second graphic representation information representing the polygonal polygon and key circle, can be optimized as follows:
[0335] Using the touch point coordinates, touch height, and touch width from the corresponding touch point information, the coordinates of the center point of the polygonal line, the coordinates of each vertex of the polygonal line, the coordinates of the center point of the key circle, and the radius of the circle are determined and used as the second graphic representation information. Using the coordinates of the center point of the polygonal line, the coordinates of the center point of the circle, the radius of the circle, and the corresponding touch point information, key trajectory points that meet the trajectory point filtering conditions are selected from the circumference of the key circle and the coordinates of each vertex of the polygonal line.
[0336] For example, this embodiment still describes the determination of the key geometric information of the circle as a mathematical problem, wherein, Figure 2q and Figure 2r The illustrations provided in Embodiment 2 of this application illustrate the determination of key geometric information when the erased geometric shape is an arbitrary irregular shape.
[0337] First, the effect of this irregular shape is shown as follows: Figure 2q As shown, it can contain circles and polygonal lines. Secondly, the specific implementation of this part can be abstracted into a mathematical problem, namely, where the calculation method is to determine whether a certain tangent line of the circle conforms to a key trajectory point. The determination method is: in Figure 2q First, determine the distance between the center of the circle and line segment AB. Then, add the distance to the radius of the circle, which equals the maximum distance between the circle and the line segment. If this distance satisfies the maximum distance condition, then the point of tangency on the circle can be considered a critical trajectory point.
[0338] Wherein, the determination of the key trajectory point described above is described as follows: as shown in 2r specifically, if there is a key trajectory point of the current circle, the intersection of the auxiliary line CD perpendicular to AB passing through the center of the circle and the circle is calculated first, and the point b far from AB is the key trajectory point.
[0339] c3, taking the graphical representation information of each of the combined graphics and each of the key trajectory points as the key geometric information of the third to-be-constructed geometric graphic relative to the touch point.
[0340] It can be understood that, according to different combined graphic information, the three sub-steps included in b3 can be used to specifically implement different determinations of the key trajectory point, and the determined key trajectory point and the graphical representation information of each combined graphic can be taken as the key geometric information of the third to-be-constructed geometric graphic.
[0341] It should be noted that the graphical representation information of the combined graphic described above in the embodiment can generally be directly determined by the given touch point information combined with some parameter information, and mainly includes the center point and vertex coordinates of the combined graphic, or the center coordinates and radius information of the circle, etc.
[0342] S2054, determining a movement contour geometric graphic constituted by the adjacent touch point pair relative to the erasing geometric shape according to the key geometric information.
[0343] In the embodiment, the key geometric information determined above actually includes the graphical representation information of the to-be-constructed geometric graphic corresponding to each of the two touch points in the adjacent touch point pair, and the related geometric information of the closed region formed after connecting the two pieces of graphical representation information. Therefore, the required movement contour geometric graphic can be constructed through the key geometric information.
[0344] Since the movement contour geometric graphic is also associated with different erasing geometric shapes, the embodiment also includes the description of the implementation of determining the movement contour geometric graphic corresponding to each of the different erasing geometric shapes.
[0345] Firstly, it can be known that, in the case of the erasing geometric shape being a rounded rectangle and the key geometric information being determined through the execution steps of the first optional implementation in S2053, the first optional implementation given below can be used to implement the specific determination of the movement contour geometric graphic in S2054:
[0346] a4, extracting the coordinates of the rounded corner center of the rounded rectangle corresponding to the key geometric information of the adjacent touch point pair, and selecting the key center point of the circumscribed contour.
[0347] b4, obtaining a key circular region determined based on each of the key circle center points.
[0348] c4, extracting a rectangular vertex coordinate and a center point coordinate of the corresponding rounded rectangle from the key geometric information of the adjacent touch point pair, and selecting a key connection point pair required for constructing an outer contour.
[0349] d4, obtaining an outer rectangular region determined based on each of the key connection point pairs, and a vertex connection closed region determined based on each of the rectangular vertex coordinates.
[0350] e4, combining each of the key circular regions, each of the outer rectangular regions, and the vertex connection closed region to form a first moving contour geometric figure formed by the adjacent touch point pair relative to the rounded rectangle.
[0351] Based on the above-mentioned related exemplary description of the key geometric information determination when the erasing geometric shape is a rounded rectangle, it can be known that the given Figure 2h includes the moving contour geometric figure corresponding to the rounded rectangle, i.e. the first moving contour geometric figure. In Figure 2h , the first moving contour geometric figure includes 8 circular regions (specifically corresponding to the key circular regions determined in the above-mentioned a4 and b4 steps), and also includes each filled rectangular region filled and displayed (specifically corresponding to the outer rectangular regions determined in the above-mentioned c4 and d4 steps), such as rectangle ABA1B2, and such as rectangle AFA2F1, etc. The key connection point pairs selected in the above-mentioned c4 and d4 steps can include A1B2, AB, AF, A2F1, F2E1, EF, BC, and B2C2, etc.
[0352] In addition, through the above-mentioned c4 and d4 steps, the vertex connection closed region can also be determined, such as Figure 2h the polygonal region formed based on points ABCDEF in Figure 2h , which is also included in Figure 2h as part of the first moving contour geometric figure.
[0353] Similarly, when the erasing geometric shape is a circle, and the key geometric information is determined in the above-mentioned S2053 through the execution steps of the second optional implementation, for the specific determination of the moving contour geometric figure in S2054, the second optional implementation given below can be used to perform and implement:
[0354] a5, extracting the circular center coordinates contained in the key geometric information of the adjacent touch point;
[0355] b5, obtaining a second to-be-constructed geometric figure region determined based on each of the circular center coordinates;
[0356] c5, extracting each key intersection coordinate contained in the key geometric information of the adjacent touch point;
[0357] d5, obtaining a key intersection connection region determined based on each key intersection coordinate;
[0358] e5, combining each second to-be-constructed geometric figure with the key intersection connection region, to form a second movement contour figure of the adjacent touch point pair relative to the circle.
[0359] According to the above description of the related exemplary embodiment of the key geometric information determination when the erasing geometric shape is a circle, it can be seen that the given Figure 2i includes the movement contour geometric figure corresponding to the circle, i.e., the second movement contour figure. In Figure 2i , the second movement contour figure includes two circular regions (which specifically correspond to the second to-be-constructed geometric figure regions determined in the above steps a5 and b5); and also includes a quadrilateral region formed by connecting the vertices ABCD (which specifically corresponds to the key intersection connection region determined in the above steps c5 and d5). Figure 2i The combination of the circular region and the key intersection connection region constitutes the second movement contour figure.
[0360] In addition, on the basis that the erasing geometric shape is an arbitrary irregular figure and the key set information is determined by the execution steps of the third optional implementation in the above S2053, for the specific determination of the movement contour set figure in S2054, the third optional implementation given below can be used to perform and realize:
[0361] a6, extracting first figure representation information or second figure representation information from the key geometric information of the adjacent touch point pair, respectively.
[0362] The first figure representation information can be preferably the figure representation information of a polygonal line polygon; and the second figure representation information can be preferably the figure representation information of the combination of a polygonal line polygon and a circle.
[0363] b6, obtaining a combined geometric figure determined based on the corresponding first figure representation information or second figure representation information, respectively.
[0364] The determined combined geometric figure is a polygonal line polygon, or a combination of a polygonal line polygon and a circle.
[0365] c6, extracting a key trajectory point from the key geometric information of the adjacent touch point pair, respectively.
[0366] d6, obtaining a key trajectory region formed by connecting each key trajectory point.
[0367] e6, combine each of the combination geometric figures with the key trajectory area to form a third moving contour figure composed of the adjacent touch point relative to the arbitrary irregular figure.
[0368] The above-mentioned related exemplary description of the key geometric information determination when the erasing geometric shape is an arbitrary irregular figure is followed by Figure 2p For example, it can be a moving contour geometric figure corresponding to the case where the irregular figure only contains a polygon of broken lines. In Figure 2p , two polygon areas of broken lines can be obtained through the first figure representation information; and a closed area formed by connecting the two polygon areas of broken lines can be obtained through the key trajectory point, which is equivalent to the key trajectory area.
[0369] It should be noted that for the specific determination of the target to-be-erased handwriting, as a second optional embodiment of the second embodiment, the target to-be-erased handwriting can be determined based on the first optional embodiment described above. Specifically, based on the determination that the erasing geometric shape is a rounded rectangle through S205, the determination of the key geometric information through the first optional implementation of S2053, and the determination of the moving contour geometric figure through the first optional implementation of S2054, the second optional embodiment determines the target to-be-erased handwriting through the flow shown in Figure 2b .
[0370] Among them, Figure 2s An implementation flowchart of the determination of the target to-be-erased handwriting in the handwriting erasing method provided by the second embodiment of the present application is given. As Figure 2s shown, the second optional embodiment further includes the step of S206, i.e., analyzing each handwriting point included in the to-be-erased handwriting, performing a hit test on each handwriting point and the moving contour geometric figure, and determining the target to-be-erased handwriting falling into the moving contour geometric figure. The specific position is as follows:
[0371] S2061, disassemble the first moving contour figure to obtain the vertex-connection closed area, and a corresponding number of circumscribed rectangular areas and key circular areas.
[0372] The above-mentioned related exemplary description of the key geometric information determination when the erasing geometric shape is a rounded rectangle shows that the given Figure 2h includes the moving contour geometric figure corresponding to the rounded rectangle, and the Figure 2h includes a vertex-connection closed area, a plurality of circumscribed rectangular areas formed based on each key connection point, and eight key circular areas after disassembling the figure included in the
[0373] S2062. For each stroke point included in the stroke to be erased, perform a first hit test on the closed region connected to the stroke point and the vertex and each of the circumscribed rectangular regions.
[0374] In this embodiment, the specific implementation of performing the first hit test between the handwriting points and each of the circumscribed rectangular regions may preferably include:
[0375] The vertex is connected to the closed region and combined with each of the circumscribed rectangular regions to obtain the corresponding convex polygon region, and the vertices of each region constituting the convex polygon region are obtained; the handwriting point is connected to each of the region vertices to obtain triangles with the same number of region vertices; the angle value of the vertex formed by the handwriting point in each triangle is determined; if the sum of the angle values is 360 degrees, the first hit test of the handwriting point is determined to be successful.
[0376] For example, Figure 3 and Figure 4 A schematic diagram illustrating the hit test implementation used when erasing a rounded rectangle in the handwriting erasure method provided in Embodiment 2 of this application is given. Figure 3 As shown, assuming the first point 25 is the handwriting point to be tested for hits, and the first polygon 26 is the contour corresponding to the abstracted first moving contour graphic, then the vertices of the first point 25 and the first polygon 26 can be connected to form a shape as shown in the figure. Figure 4 The first connection diagram 27 is shown; subsequently, it can be determined that the first point 25 is... Figure 4 The angle values in each triangle shown can be used to calculate whether the sum of the angle values is 360 degrees. If it is 360 degrees, the first hit test can be considered successful.
[0377] S2063. If the first hit test is successful, the handwriting point is added to the first target point set; otherwise, the handwriting point and each of the key circular regions are subjected to a second hit test.
[0378] In this embodiment, the specific implementation of performing a second hit test between the handwriting points and each of the key circular regions may preferably include:
[0379] Obtain the center and radius of each key circular region, and determine the distance between the handwriting point and the center of each region; if there is a distance between the handwriting point and the center of each region that is smaller than the radius of the corresponding region, then the second hit test of the handwriting point is determined to be successful.
[0380] S2064. If the second hit test is successful, the handwriting point is added to the first target point set.
[0381] S2065, determine the handwriting formed based on each handwriting point in the first target point set as target handwriting to be erased falling into the mobile contour geometric figure.
[0382] It can be known that all handwriting points successfully passing the hit test with the first mobile contour figure are summarized in the first target point set, and based on these handwriting points, it can be restored which target handwriting to be erased falls into the first mobile contour figure in the display interface, and these target handwriting to be erased are taken as target handwriting to be erased.
[0383] Similarly, for the specific determination of the target handwriting to be erased, as a third optional embodiment of the second embodiment, the first optional embodiment can be optimized on the basis of the above. Specifically, on the basis of the above S205, the erasing geometric shape is determined to be a circle, and the key geometric information is determined by the second optional implementation corresponding to S2053, and the mobile contour geometric figure is determined by the second optional implementation corresponding to S2054, the third optional embodiment determines the target handwriting to be erased by the flow shown in the figure. Figure 5
[0384] Among them, Figure 5 Another implementation flowchart of the target handwriting to be erased in the handwriting erasing method provided by the second embodiment of the application is given. As shown in the figure, Figure 5 The third optional embodiment further analyzes each handwriting point included in the handwriting to be erased, and performs a hit test on each handwriting point and the mobile contour geometric figure to determine the target handwriting to be erased falling into the mobile contour geometric figure, and the specific position is as follows:
[0385] S2601, disassemble the second mobile contour figure to obtain a key intersection connection area and two second to-be-constructed geometric figures.
[0386] According to the above related exemplary description of the key geometric information determination when the erasing geometric shape is a rounded rectangle, it can be known that the given Figure 2i The mobile contour geometric figure corresponding to the rounded rectangle is included. Figure 2i In the
[0387] S2602, for each handwriting point included in the handwriting to be erased, perform a third hit test on the handwriting point and the key intersection connection area.
[0388] Among them, the third hit test of the handwriting point and the key intersection connection area is specifically optimized as:
[0389] When the key intersection connection region is determined as a rectangular region, two rectangular edge vectors are selected from the rectangular region, and the hit test of the handwriting point and the rectangular region is performed by comparing the handwriting point with each of the rectangular edge vectors; otherwise, the same number of edge vectors to be compared as the number of vertices of the key intersection connection region is determined based on each vertex of the key intersection connection region; and the hit test of the handwriting point and the rectangular region is performed by comparing the handwriting point with each of the edge vectors to be compared.
[0390] In the embodiment, the key intersection connection region is preferably a rectangular region (e.g., two circles with the same radius), but there are also cases where the key intersection connection region is not a rectangular region (e.g., two circles with different radii). The embodiment gives the hit test implementation in the two cases. Exemplarily, Figure 6 and Figure 7 The schematic diagram of one of the hit test implementations used in the handwriting erasing method provided in Embodiment Two of the present application is shown in the case where the erasing geometric shape is a circle.
[0391] When the key intersection connection region is a rectangular region, the hit test problem can be converted into a problem of whether a point is in a rectangle, as shown in Figure 6 The vertices A, B, and D of a rectangle are known, and it is determined whether the handwriting point M is in the rectangle. Then, as shown in Figure 7 the vectors AB and AC and AM are made. Finally, it is determined whether the handwriting point is in the rectangle by the following formula (0<AM·AB<AB·AB)∧(0<AM·AC<AC·AC). If the handwriting point is in the rectangle, it is considered that the handwriting point satisfies the third hit test.
[0392] In addition, when the key intersection connection region is an irregular polygon, after being converted into a mathematical problem, each vertex of the polygon is first connected as a vector in the order of adjacent vertices. How to determine whether a point is in a certain direction of a vector is equivalent to determining the included angle between two vectors. Meanwhile, two vectors are made from the geometric adjacent point and the point to be determined, and the included angle between the two vectors is calculated.
[0393] According to a property of a vector, i.e., the cross product of the vector is used for determination. Specifically, a point on a geometric edge is taken, and the point is connected with the next adjacent point to form a vector in the clockwise or counterclockwise direction. Then, the point and the point to be determined are connected to form a vector, and the cross product of the two vectors is calculated.
[0394] If the cross products of all the vectors are in the same direction, that is, the points are on the same side of the line segment set composed of all the geometric neighbors, that is, the handwriting points are inside the irregular polygon. The cross products of all the vectors are in the same direction can be determined by whether the numerical values of the cross products are greater than zero. If all the numerical values of the cross products are greater than zero or are less than zero, it is proved that the handwriting points are inside the irregular polygon. If the numerical value of the cross product is equal to zero, it is proved that the handwriting points are on an edge of the irregular polygon.
[0395] S2063, if the third hit test succeeds, the handwriting point is added to the second target point set; otherwise, the handwriting point is subjected to a fourth hit test with each of the second to-be-constructed geometric figures and a circular region.
[0396] It can be known that the fourth hit test is also a test of whether the handwriting point is in the circular region.
[0397] S2064, if the fourth hit test succeeds, the handwriting point is added to the second target point set.
[0398] S2065, handwriting formed based on each handwriting point in the second target point set is determined as a target to-be-erased handwriting falling into the mobile contour geometric figure.
[0399] Similarly, the second target point set collects all the handwriting points that successfully pass the hit test with the second mobile contour figure, and based on these handwriting points, it can be determined which to-be-erased handwriting in the display interface falls into the second mobile contour figure, and these to-be-erased handwriting are taken as the target to-be-erased handwriting.
[0400] In addition, for the specific determination of the target to-be-erased handwriting, as a fourth optional embodiment of the second embodiment, the determination of the target to-be-erased handwriting can be optimized on the basis of the first optional embodiment. Specifically, on the basis of the determination of the erasing geometric shape as an arbitrary irregular figure by S205, the determination of the key geometric information by the third optional implementation corresponding to S2053, and the determination of the mobile contour geometric figure by the third optional implementation corresponding to S2054, the fourth optional embodiment determines the target to-be-erased handwriting by the flow shown in the figure. Figure 8
[0401] Among them, Figure 8 Another implementation flowchart of the determination of the target to-be-erased handwriting in the handwriting erasing method provided by the second embodiment of the present application is given. As shown in the figure, Figure 8 As shown, the third optional embodiment further comprises the following steps based on the step S206 of analyzing each stroke point included in the to-be-erased handwriting, performing a hit test on each stroke point and the moving contour geometric figure, and determining the target to-be-erased handwriting falling into the moving contour geometric figure:
[0402] S261, disassembling the third moving contour figure to obtain the key trajectory region and each combined geometric figure.
[0403] Based on the above description of the key geometric information determination when the erasing geometric figure is an arbitrary irregular figure, the above Figure 2p is taken as an example. As an irregular figure, it only contains a polygon with a broken line. In this case, the moving contour geometric figure corresponding to the polygon with a broken line is as follows: Figure 2p After disassembling the third moving contour figure, two polygon regions with a broken line and a key trajectory region formed by a key trajectory point can be obtained.
[0404] S262, for each stroke point included in the to-be-erased handwriting, if the combined geometric figure is only a polygon with a broken line, the stroke point is subjected to a corner hit test with each polygon with a broken line by using a corner method; or if the combined geometric figure contains a polygon with a broken line and a key circle, the stroke point is subjected to a distance hit test with each polygon with a broken line and the key circle by using a distance method.
[0405] It can be understood that the corner hit test is the hit test implementation manner based on the Figure 3 and Figure 4 described above.
[0406] S263, when the corner or distance hit test is successful, the stroke point is added to a third target point set; otherwise, the stroke point is subjected to a vector hit test with the key trajectory region, and when the vector hit test is successful, the stroke point is added to the third target point set.
[0407] It can also be understood that the vector hit test is the hit test implementation based on the vector judgment of a point and an irregular polygon when the third hit test is described above.
[0408] S264, a handwriting formed based on each stroke point in the third target point set is determined as the target to-be-erased handwriting falling into the moving contour geometric figure.
[0409] Similarly, all the handwriting points that pass the hit test with the third moving contour figure are summarized in the third target point set, and based on these handwriting points, it can be determined which to-be-erased handwriting in the display interface falls into the third moving contour figure, and these to-be-erased handwriting are taken as target to-be-erased handwriting.
[0410] In the second embodiment, as a fifth optional embodiment of the second embodiment, a special case implementation of the provided handwriting erasing method is given. The fifth optional embodiment can be optimized on the basis of the first optional embodiment. Specifically, after the operation of determining the erasing geometry matched by the moving touch object by performing the hit test on the obtained touch point information by S205, the fifth optional embodiment further optimizes and adds the following operation:
[0411] It should be noted that the special case can be understood as that the erasing geometry is a rounded rectangle, and the touch object does not move on the display screen but is in a stationary state in contact with the display screen. At this time, the touch point information fed back by the touch frame is the information of the touch point generated when the touch object is in contact with the display screen, and based on the touch point, a to-be-constructed erasing region with a rounded rectangular erasing geometry can be formed, which is equivalent to a static rounded rectangle. Therefore, in this case, the specific implementation of the fifth optional embodiment is as follows:
[0412] a. When it is determined that the erasing geometry is a rounded rectangle and it is monitored that the touch object does not move within a set time, a static touch point corresponding to the touch object contacting the display screen within the set time is determined.
[0413] Wherein, the static touch point can be understood as the touch point corresponding to the touch signal generated when the touch object first contacts the display screen. The touch point information of the static touch point can be obtained in this step.
[0414] b. Based on the touch point information of the static touch point, a static rounded rectangle relative to the static touch point is determined.
[0415] From the above description of the rounded rectangle in the embodiments, it can be known that after the touch point information of the static touch point is known, the related geometric information representing the static rounded rectangle can be determined. Wherein, Figure 9 An effect display diagram of the static rounded rectangle in the handwriting erasing method provided in the second embodiment of the application is given. As shown in Figure 9 It can be considered that the static rounded rectangle includes two rectangles (two filled rectangle areas) and four circles. That is, the static rounded rectangle in the embodiment preferably includes two static rectangular areas and four static circular areas.
[0416] Thus, to determine the static rounded rectangle, it is equivalent to determine the related geometric information of the two rectangles and the four circles. And through the above-mentioned determination operation of the coordinates of each vertex associated with the rounded rectangle, the coordinates of the vertices of the above-mentioned two rectangles, and the center coordinates and radius information of the four circles can also be determined, thereby obtaining the related representation of the static rounded rectangle.
[0417] c. Hit test each handwriting point included in the handwriting to be erased against the static rounded rectangle, and erase the handwriting to be erased falling into the static rounded rectangle in the interface.
[0418] On the basis of the above optimization, the hit test of each handwriting point included in the handwriting to be erased against the static rounded rectangle, and the erasing of the handwriting to be erased falling into the static rounded rectangle in the interface, comprises:
[0419] For each handwriting point in the handwriting to be erased, hit test the handwriting point against two static rectangular regions and four circular regions respectively; if the handwriting point meets the condition of successful hit test, add the handwriting point to a static point set; erase the handwriting formed based on each handwriting point in the static point set.
[0420] It can be understood that in the test of the handwriting point against the static rounded rectangle, it specifically includes hit test of the handwriting point against the rectangular region and hit test of the handwriting point against the circular region. The test of the rectangular region can be realized through the above-mentioned description of the rectangular hit test (vector method hit test), and the test of the circular region can also be realized through the above-mentioned description of the circular hit test (distance method hit test).
[0421] Embodiment three
[0422] Figure 10 A structural block diagram of a handwriting erasing device provided for embodiment three of the present application, which can be integrated in an interactive tablet, wherein the touch response accuracy of the touch frame equipped in the interactive tablet is within a set accuracy range. The device can specifically include the following modules:
[0423] The display module 31 is configured to display a display interface containing handwriting to be erased through a display screen.
[0424] The trigger module 32 is configured to receive a handwriting erasing instruction, enter a handwriting erasing mode, and the handwriting erasing instruction is formed by the user's trigger.
[0425] The acquisition module 33 is configured to obtain touch point information fed back by the touch frame when a touch object touches the surface of the display screen and moves, and the touch object is controlled by the user.
[0426] The erasing module 34 is configured to erase the handwriting to be erased in the interface by analyzing the obtained touch point information and the handwriting to be erased, and using an erasing geometric pattern matched with the touch object.
[0427] The handwriting erasing device provided in Embodiment Three has a high-precision touch frame configured in the hardware structure of the execution body interactive panel, and the high-precision touch frame can be used to realize the function optimization in the software application level by the method provided in the embodiment. Compared with the existing interactive panel without optimization in the software level, Embodiment Three integrates the handwriting erasing device on the interactive panel, which can ensure that the erasing response to the handwriting to be erased in the interface is more matched with the erasing geometric pattern of the touch object used by the user, so as to realize the flexible adjustment of the erasing area in the erasing process, and further improve the erasing efficiency on the interactive panel.
[0428] Further, the erasing geometric pattern matched with the touch object is embodied by the touch area of the touch object acting on the display screen.
[0429] The erasing geometric pattern includes a rounded rectangle, a circle, and an arbitrary irregular pattern.
[0430] Further, the obtaining module 33 can be specifically configured to:
[0431] When the touch object touches the surface of the display screen and moves, each touch signal is recognized by the hardware circuit in the touch frame, and the touch signal is generated when the touch object moves on the display screen.
[0432] The touch point information fed back by the touch frame for each touch signal through the human-computer interaction (HID) standard protocol is obtained.
[0433] In the embodiment, one touch point information corresponds to one touch point, and the touch point information includes touch point coordinates, touch point height and width, and touch rotation angle.
[0434] Further, the device further includes an input processing module,
[0435] The input processing module can be configured to process each touch point information after obtaining the touch point information fed back by the touch frame, so that each touch point information has a unified unit format and data structure.
[0436] On the basis of the above optimization, the specific implementation of the input processing module processing each touch point information can include:
[0437] According to the size information of the touch frame and the screen resolution information, the unit of each data information in the touch point information is converted into a unified set unit format.
[0438] The data structure corresponding to the set unit format is used to record the touch point information.
[0439] Further, the erasing module 34 can specifically include:
[0440] The shape contour determining unit is configured to determine, by the obtained touch point information, an erasing geometric shape matched by the touch object in movement, and determine a movement contour geometric figure constituted by adjacent touch point pairs in movement under the erasing geometric shape.
[0441] The target handwriting determining unit is configured to analyze each handwriting point included in the handwriting to be erased, perform a hit test on each handwriting point and the movement contour geometric figure, and determine a target handwriting to be erased falling into the movement contour geometric figure.
[0442] The erasing executing unit is configured to erase the target handwriting to be erased in the display interface.
[0443] On the basis of the above optimization, the shape contour determining unit can specifically include:
[0444] The information obtaining sub-unit is configured to extract key touch point information and obtain a key touch area in the key touch point information, wherein the key touch point information is touch point information of a touch point generated when the touch object is first in contact with the display screen in movement.
[0445] The shape determining sub-unit is configured to determine an area threshold range and an area shape to which the key touch area belongs, search for a target shape matched with the area shape in each geometric shape corresponding to the area threshold range, and determine the target shape as the erasing geometric shape matched by the touch object.
[0446] The geometric information determining sub-unit is configured to, for each adjacent touch point pair in the movement of the touch object, determine key geometric information of each touch point in the adjacent touch point pair relative to the erasing geometric shape by analyzing touch point information corresponding to the adjacent touch point pair.
[0447] The contour determining sub-unit is configured to determine, according to each key geometric information, a movement contour geometric figure constituted by the adjacent touch point pair relative to the erasing geometric shape.
[0448] On the basis of the above optimization, when the erasing geometric shape is a rounded rectangle, the rounded rectangle includes a rectangle and rounded corners with each vertex of the rectangle as a center.
[0449] The geometric information determining sub-unit is specifically configured to:
[0450] The rounded rectangle is denoted as the first to-be-constructed geometric figure of each touch point in the adjacent touch point pair;
[0451] For each touch point in the adjacent touch point pair, the center point coordinate of the rectangle, the center point coordinate of each rounded corner and the key cut point coordinate, and the two figure connecting point coordinates in the first to-be-constructed geometric figure are determined by the touch point coordinate, the touch width, the touch height and the touch rotation angle in the corresponding touch point information, combined with the pre-defined rounded corner radius.
[0452] The center point coordinate of the rectangle, the center point coordinate of each rounded corner and the key cut point coordinate, and the two figure connecting point coordinates are regarded as the key geometric information of the touch point relative to the first to-be-constructed geometric figure.
[0453] Each rounded corner in the first to-be-constructed geometric figure includes two key cut points. Each key cut point is a cut point when the rounded corner and the adjacent rounded corner are connected by a tangent.
[0454] Further, the contour determination subunit can be specifically used for:
[0455] The rounded corner center point coordinate of the corresponding rounded rectangle is extracted from the key geometric information of the adjacent touch point pair, and the key center point is selected for constructing the circumscribed contour.
[0456] The key circular region determined based on each key center point is obtained.
[0457] The rectangle vertex coordinate and the center point coordinate of the corresponding rounded rectangle are extracted from the key geometric information of the adjacent touch point pair, and the key connecting point pair is selected for constructing the circumscribed contour.
[0458] The circumscribed rectangular region determined based on each key connecting point pair and the vertex connecting closed region determined based on each rectangle vertex coordinate are obtained.
[0459] The key circular region, the circumscribed rectangular region and the vertex connecting closed region are combined to form the first moving contour figure formed by the adjacent touch point pair relative to the rounded rectangle.
[0460] On the basis of the above embodiment, the target handwriting determination unit can be specifically used for:
[0461] The first moving contour figure is disassembled to obtain the vertex connecting closed region, and a corresponding number of circumscribed rectangular regions and key circular regions;
[0462] For each handwriting point included in the handwriting to be erased, the handwriting point is subjected to a first hit test with the vertex connecting closed region and each circumscribed rectangular region.
[0463] If the first hit test succeeds, the handwriting point is added to the first target point set; otherwise, the handwriting point is subjected to a second hit test with each of the key circular regions;
[0464] If the second hit test succeeds, the handwriting point is added to the first target point set;
[0465] The handwriting formed based on each handwriting point in the first target point set is determined as target handwriting to be erased falling into the moving contour geometric figure.
[0466] Further, the specific execution steps of the first hit test of the handwriting point with the vertex-connection closed region and each of the circumscribed rectangular regions include:
[0467] The vertex-connection closed region and each of the circumscribed rectangular regions are combined to obtain a corresponding convex polygon region, and each region vertex constituting the convex polygon region is obtained;
[0468] The handwriting point is connected with each of the region vertices respectively to obtain a number of triangles equal to the number of the region vertices;
[0469] An angle value of a top angle constituted by the handwriting point in each of the triangles is determined;
[0470] If the sum of each of the angle values is 360 degrees, it is determined that the first hit test of the handwriting point succeeds.
[0471] Further, the specific execution steps of the second hit test of the handwriting point with each of the key circular regions include:
[0472] A region center and a region radius of each of the key circular regions are obtained, and a connecting line distance between the handwriting point and each of the region centers is determined;
[0473] If there is a connecting line distance less than the corresponding region radius, it is determined that the second hit test of the handwriting point succeeds.
[0474] On the basis of the above embodiment, the erasing module 34 further includes a static erasing implementation unit,
[0475] The static erasing implementation unit can specifically include:
[0476] A static point determination sub-unit is configured to, after determining that the erasing geometric shape matched by the touch object in movement is a rounded rectangle and monitoring that the touch object does not move within a set time, determine a static touch point corresponding to the touch object contacting the display screen within the set time.
[0477] a static rectangle determining sub-unit, configured to determine a static rounded rectangle relative to the static touch point based on touch point information of the static touch point;
[0478] a static hit test sub-unit, configured to perform a hit test on each stroke point included in the stroke to be erased and the static rounded rectangle, and erase the stroke to be erased falling into the static rounded rectangle in the interface.
[0479] Further, the static rounded rectangle includes two static rectangular regions and four static circular regions;
[0480] Correspondingly, the static hit test sub-unit can be specifically configured to:
[0481] perform a hit test on each stroke point in the stroke to be erased and the two static rectangular regions and the four circular regions respectively;
[0482] if the stroke point meets the condition of a successful hit test, add the stroke point to a static point set;
[0483] erase a stroke formed based on each stroke point in the static point set.
[0484] Further, the geometric information determining sub-unit can be specifically configured to:
[0485] when the erasing geometric shape is a circle, mark the circle as a second to-be-constructed geometric figure of each touch point in the pair of adjacent touch points;
[0486] determine a circular center coordinate and each key intersection coordinate of the corresponding second to-be-constructed geometric figure based on touch point coordinates, touch width and touch height in touch point information corresponding to each touch point in the pair of adjacent touch points;
[0487] regard the circular center coordinate and each key intersection coordinate corresponding to each touch point as key geometric information relative to the second to-be-constructed geometric figure.
[0488] On the basis of the above optimization, the specific execution steps of determining the circular center coordinate and each key intersection coordinate of the corresponding second to-be-constructed geometric figure based on touch point coordinates, touch width and touch height in touch point information corresponding to each touch point in the pair of adjacent touch points can include:
[0489] determine the circular center coordinate of the corresponding second to-be-constructed circle based on touch point coordinates, touch width and touch height in touch point information corresponding to each touch point in the pair of adjacent touch points;
[0490] connect the corresponding two circular center coordinates to obtain a center line;
[0491] By constructing a straight line perpendicular to the line connecting the centers of each circle through the coordinates of the center of each circle, the coordinates of the key intersection point determined after each straight line intersects with the corresponding second circle to be constructed are obtained.
[0492] Furthermore, the contour-defining sub-unit can be specifically used for:
[0493] Extract the coordinates of the center of the circle contained in the key geometric information of the adjacent touch points;
[0494] Obtain the second geometric region to be constructed based on the coordinates of the center of each of the aforementioned circles;
[0495] Extract the coordinates of each key intersection point from the key geometric information of the adjacent touch points;
[0496] Obtain the key intersection connection region determined based on the coordinates of each key intersection point;
[0497] The second geometric shape to be constructed is combined with the key intersection area to form the second moving contour shape formed by the adjacent touch point pairs relative to the circle.
[0498] Based on the above optimizations, the target handwriting determination unit can specifically be used for:
[0499] Disassemble the second moving contour graphic to obtain a key intersection connection region and two second geometric shapes to be constructed;
[0500] For each pen mark included in the pen mark to be erased, a third hit test is performed on the area connecting the pen mark and the key intersection point;
[0501] If the third hit test is successful, the handwriting point is added to the second target point set; otherwise, the handwriting point and each of the second geometric shapes to be constructed are subjected to a fourth hit test of point and circular region.
[0502] If the fourth hit test is successful, the handwriting point is added to the second target point set;
[0503] The handwriting formed based on each handwriting point in the second target point set is identified as the target handwriting to be erased that falls into the moving contour geometry.
[0504] Furthermore, the specific steps for performing a third hit test on the area connecting the handwriting points and the key intersection points include:
[0505] When the key intersection connection region is determined to be a rectangular region, two rectangular side vectors formed by a single vertex are selected from the rectangular region. A match test is performed between the handwriting point and each of the rectangular side vectors; otherwise...
[0506] determining a same number of to-be-compared edge vectors as the number of the vertices based on the vertices of the key intersection connection region;
[0507] performing the hit test of the handwriting point and the rectangular region by comparing the handwriting point with each of the to-be-compared edge vectors.
[0508] Further, the geometric information determining sub-unit can be specifically used for:
[0509] when the erasing geometric shape is an arbitrary irregular figure, recording the arbitrary irregular figure as a third to-be-constructed geometric figure of each touch point in the adjacent touch point pair, and determining the combined figure information contained in the third to-be-constructed geometric figure;
[0510] for each touch point in the adjacent touch point pair, determining the key trajectory point existing on the third to-be-constructed geometric figure relative to the touch point and the figure representation information of the third to-be-constructed geometric figure by combining the corresponding touch point information with the combined figure information;
[0511] taking each of the combined figure representation information and the key trajectory point as the key geometric information of the touch point relative to the third to-be-constructed geometric figure.
[0512] Further, the specific execution steps of determining the key trajectory point existing on the third to-be-constructed geometric figure relative to the touch point and the figure representation information of the third to-be-constructed geometric figure by combining the corresponding touch point information with the combined figure information can include:
[0513] analyzing the combined figure information;
[0514] when the third to-be-constructed geometric figure only contains a polygonal line polygon, determining the key trajectory point existing on the polygonal line polygon relative to the touch point by the corresponding touch point information, and obtaining first figure representation information representing the polygonal line polygon;
[0515] when the third to-be-constructed geometric figure contains a polygonal line polygon and a target circle, determining the key trajectory point from the polygonal line polygon and the key circle by the corresponding touch point information, and obtaining second figure representation information representing the polygonal line polygon and the key circle.
[0516] Further, the specific execution information of determining the key trajectory point existing on the polygonal line polygon relative to the touch point by the corresponding touch point information, and obtaining the first figure representation information representing the polygonal line polygon can include:
[0517] determining, by the touch point coordinates, the touch height and the touch width in the corresponding touch point information, a polyline center point coordinate and each polyline vertex coordinate of a polyline polygon as the first graphical representation information;
[0518] selecting, by the polyline center point coordinate and the corresponding touch point information, a key trajectory point from each of the polyline vertex coordinates that satisfies a trajectory point screening condition.
[0519] Further, the specific implementation steps of determining a key trajectory point from the polyline polygon and the key circle and obtaining the second graphical representation information representing the polyline polygon and the key circle can include:
[0520] determining, by the touch point coordinates, the touch height and the touch width in the corresponding touch point information, a polyline center point coordinate and each polyline vertex coordinate of the polyline polygon, and a circle center point coordinate and a circle radius of the key circle, as the second graphical representation information;
[0521] selecting, by the polyline center point coordinate, the circle center point coordinate, the circle radius and the corresponding touch point information, a key trajectory point from the circumference of the key circle and each of the polyline vertex coordinates that satisfies a trajectory point screening condition.
[0522] On the basis of the above optimization, the contour determination subunit can be specifically used for
[0523] extracting the first graphical representation information or the second graphical representation information from the key geometric information of the adjacent touch point pair respectively;
[0524] obtaining a combined geometric figure determined based on the corresponding first graphical representation information or the second graphical representation information respectively;
[0525] extracting a key trajectory point from the key geometric information of the adjacent touch point pair respectively;
[0526] obtaining a key trajectory area formed by connecting each of the key trajectory points;
[0527] combining each of the combined geometric figures with the key trajectory area to form a third movement contour figure of the adjacent touch point pair relative to the arbitrary irregular figure.
[0528] On the basis of the above embodiment, the target handwriting determination unit can be specifically used for:
[0529] disassembling the third movement contour figure to obtain the key trajectory area and each of the combined geometric figures;
[0530] For each stroke point included in the erased handwriting, if the combined geometry is only a polyline polygon, then the stroke points and each polyline polygon are subjected to a corner hit test using the corner method; or...
[0531] If the combined geometry contains polyline polygons and key circles, then the handwriting points are tested for distance hits with each of the polyline polygons and key circles using the distance method.
[0532] If the corner or distance hit test is successful, the handwriting point is added to the third target point set; otherwise, the handwriting point and the key trajectory area are subjected to a vector hit test, and if the vector hit test is successful, the handwriting point is added to the third target point set.
[0533] The handwriting formed based on each handwriting point in the third target point set is identified as the target handwriting to be erased that falls into the moving contour geometry.
[0534] Example 4
[0535] Figure 11 This is a schematic diagram of an interactive flat panel according to Embodiment 4 of this application. The interactive flat panel includes: a processor 40, a memory 41, a display screen 42, an input device 43, an output device 44, and a touch frame 45. The interactive flat panel may have one or more processors 40. Figure 11 Taking a processor 40 as an example, the number of memory units 41 in this interactive flat panel can be one or more. Figure 11 Taking a memory unit 41 as an example, the processor 40, memory unit 41, display screen 42, input device 43, output device 44, and touch frame 45 of this interactive flat panel can be connected via a bus or other means. Figure 11 Taking the example of a connection between China and Israel via a bus.
[0536] The memory 41, as a computer readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules of the interactive tablet corresponding to the erasing method of handwriting (for example, the display module 31, the triggering module 32, the obtaining module 33 and the presenting module 34 in the erasing device of handwriting). The memory 41 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the device, etc. In addition, the memory 41 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the memory 41 can further include a memory remotely arranged with respect to the processor 40, which can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0537] The display screen 42 and the touch frame 45 cover Figure 11 the above-mentioned cover relationship), which can constitute a touch screen on which the display of the interactive content is performed. Generally, the display screen 42 is used to display data according to the indication of the processor 40, and is also used to receive a touch operation acting on the display screen 42 and send a corresponding signal to the processor 40 or other devices.
[0538] The input device 43 can be used to receive input digital or character information, and generate key signal input related to the user setting and function control of the display device, and can also be a camera for obtaining graphics and a pickup device for obtaining audio data. The output device 44 can include an audio device such as a loudspeaker. It should be noted that the specific composition of the input device 43 and the output device 44 can be set according to the actual situation.
[0539] The touch frame 45 has a touch response accuracy reaching a set accuracy range, and is used to respond to the touch operation of the touch object through the included hardware circuit.
[0540] The processor 40 executes the software programs, instructions and modules stored in the memory 41, thereby performing various function applications and data processing of the device, that is, the above-mentioned erasing method of handwriting is realized.
[0541] The above-mentioned interactive tablet can be used to execute the above-mentioned erasing method of handwriting provided by any embodiment, and has corresponding functions and beneficial effects.
[0542] Example five
[0543] The fifth embodiment of the present application also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to perform a handwriting erasing method, comprising:
[0544] displaying a display interface containing handwriting to be erased through a display screen;
[0545] receiving handwriting erasing instructions, entering a handwriting erasing mode, and the handwriting erasing instructions are formed by triggering of a user;
[0546] obtaining touch point information fed back through the touch frame when a touch object touches the surface of the display screen and moves, and the touch object is manipulated by a user;
[0547] erasing the handwriting to be erased in the interface by using an erasing geometric shape matched with the touch object through analysis of the obtained touch point information and the handwriting to be erased.
[0548] Of course, the storage medium containing computer executable instructions provided by the embodiment of the present application is not limited to the handwriting erasing method operation as described above, but can also perform related operations in the handwriting erasing method provided by any embodiment of the present application, and has corresponding functions and beneficial effects.
[0549] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary general hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH, a hard disk or an optical disk, etc., including a plurality of instructions to make an interactive tablet (which can be a robot, a personal computer, a server, or a network device, etc.) execute the handwriting erasing method described in any embodiment of the present application.
[0550] It is worth noting that the above course recommendation device includes various units and modules, which are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy distinction, and do not limit the protection scope of the present application.
[0551] It should be understood that portions of the present application can be realized with hardware, software, firmware or a combination thereof. In the foregoing embodiments, a number of steps or methods can be realized as software or firmware to be executed by a suitable instruction-executing system. For example, if realized with hardware, and as in another embodiment, any one or a combination of the following technologies known in the art can be used: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.
[0552] It is to be understood that the above-described embodiments and the used technical principles are merely the best modes of the present application. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made without departing from the scope of the present application. Therefore, although the present application has been described in detail with reference to the above embodiments, the present application is not limited to the above embodiments, and includes other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the appended claims.
Claims
1. A method for erasing handwriting, characterized in that, Applied to an interactive flat panel, wherein the touch response accuracy of the touch frame of the interactive flat panel reaches a set accuracy range, the method includes: The display screen shows the interface containing the ink marks to be erased; Upon receiving a handwriting erasure command, the system enters handwriting erasure mode. The handwriting erasure command is generated through user triggering. When a touch object touches and moves on the surface of the display screen, touch point information is obtained through the touch frame, and the touch object is controlled by the user; By analyzing the obtained touch point information and the writing to be erased, the writing to be erased in the interface is erased using an erasing geometry that matches the touch object. The erasure geometry that matches the touch object is represented by the touch area of the touch object on the display screen; The erasure geometry includes rounded rectangles, circles, and any irregular shapes; By analyzing the obtained touch point information and the handwriting to be erased, the handwriting on the interface is erased using an erasing geometry that matches the touched object, including: Based on the obtained touch point information, determine the erasure geometry that the touch object matches during movement, and determine the movement contour geometry formed by adjacent touch point pairs under the erasure geometry during movement. Analyze each stroke point included in the stroke to be erased, perform a hit test between each stroke point and the moving contour geometry, and determine the target stroke to be erased that falls into the moving contour geometry; The target ink marks to be erased are erased in the display interface; After determining the erase geometry matching the touched object during movement using the obtained touch point information, the method further includes: When it is determined that the erase geometry is a rounded rectangle and it is detected that the touched object has not moved within a set time, the static touch point corresponding to the touch object touching the display screen within the set time is determined. Based on the touch point information of the static touch point, a static rounded rectangle is determined relative to the static touch point; The system performs a hit test between each stroke point in the erased strokes and the static rounded rectangle, and erases the strokes that fall into the static rounded rectangle in the interface.
2. The method according to claim 1, characterized in that, The process of obtaining the touch point information fed back through the touch frame includes: Each touch signal is identified by the hardware circuitry within the touch frame; the touch signal is generated when the touch object moves on the display screen. The touch point information is obtained by the touch frame in response to each touch signal via the HID (Human Interface Device) standard protocol. One touch point information corresponds to one touch point, and the touch point information includes: touch point coordinates, touch point height and width, and touch rotation angle.
3. The method according to claim 1, characterized in that, After obtaining the touch point information fed back through the touch frame, the method further includes: The touch point information is processed to ensure that the touch point information has a unified unit format and data structure.
4. The method according to claim 3, characterized in that, The processing of the touch point information includes: Based on the obtained touch frame size information and screen resolution information, the units of each data information in the touch point information are converted into a unified set unit format; The touch point information is recorded using the data structure corresponding to the specified unit format.
5. The method according to claim 1, characterized in that, The process of determining the erase geometry matching the touched object during movement based on the obtained touch point information, and determining the movement contour geometry formed by adjacent touch point pairs under the erase geometry during movement, includes: Extract key touch point information to obtain key touch area from the key touch point information, wherein the key touch point information is the touch point information of the touch point generated when the touch object first contacts the display screen during movement; Determine the area threshold range and area shape to which the key touch area belongs, find the target shape that matches the area shape in each geometric shape corresponding to the area threshold range, and determine the target shape as the erasure geometric shape that matches the touch object. For each pair of adjacent touch points during the movement of the touched object, the key geometric information of each touch point in the adjacent touch point pair relative to the erasure geometry is determined by analyzing the touch point information corresponding to the adjacent touch point pair. Based on the key geometric information, the moving contour geometry formed by the adjacent touch points relative to the erasure geometry is determined.
6. The method according to claim 5, characterized in that, When the erase geometry is a rounded rectangle, the rounded rectangle includes a rectangle and rounded corners centered at each vertex of the rectangle; The step of analyzing the touch point information corresponding to the adjacent touch point pairs to determine the key geometric information of each touch point in the adjacent touch point pairs relative to the erasure geometry includes: The rounded rectangle is designated as the first geometric shape to be constructed for each touch point in the adjacent touch point pair; For each touch point in the adjacent touch point pair, the center point coordinates of the rectangle, the center coordinates of each rounded corner, the coordinates of each key tangent point, and the coordinates of the connection point between the two shapes are determined by using the touch point coordinates, touch width, touch height, and touch rotation angle in the corresponding touch point information, combined with the pre-given rounded corner radius. The coordinates of the center point of the rectangle, the coordinates of the center of each rounded corner, the coordinates of each key tangent point, and the coordinates of the connection point between the two shapes are regarded as the key geometric information of the touch point relative to the first geometric shape to be constructed. In the first geometric shape to be constructed, each rounded corner includes two key tangent points; each key tangent point is the tangent point corresponding to the rounded corner and the adjacent rounded corner when connected by a tangent line.
7. The method according to claim 6, characterized in that, The step of determining the moving contour geometry of the adjacent touch points relative to the erasure geometry based on the key geometric information includes: Extract the coordinates of the rounded center of the corresponding rounded rectangle from the key geometric information of the adjacent touch point pairs, and select the key center point required to construct the circumscribed contour; Obtain key circular regions determined based on each of the key center points; Extract the coordinates of the vertices and center point of the corresponding rounded rectangle from the key geometric information of the adjacent touch point pairs, and select the circumscribed contour to construct the required key connection point pairs; Obtain the circumscribed rectangular region determined based on each of the key connection point pairs, and the vertex connection closed region determined based on the vertex coordinates of each of the rectangles; The key circular regions, the circumscribed rectangular regions, and the vertex-connected closed regions are combined to form the first moving contour graphic formed by the adjacent touch point pairs relative to the rounded rectangles.
8. The method according to claim 7, characterized in that, Analyze each stroke point in the erased handwriting, perform a hit test between each stroke point and the moving contour geometry, and determine the target erased handwriting that falls within the moving contour geometry, including: Disassemble the first moving contour graphic to obtain the vertex-connected closed region, as well as a corresponding number of circumscribed rectangular regions and key circular regions; For each pen point included in the pen mark to be erased, a first hit test is performed on the pen point and the closed region connected to the vertex and each of the circumscribed rectangular regions; If the first hit test is successful, the handwriting point is added to the first target point set; otherwise, the handwriting point and each of the key circular regions are subjected to a second hit test. If the second hit test is successful, the handwriting point is added to the first target point set; The handwriting formed based on each handwriting point in the first target point set is identified as the target handwriting to be erased that falls into the moving contour geometry.
9. The method according to claim 8, characterized in that, The first hit test, which involves connecting the handwriting points and the vertices to enclose the region and each of the circumscribed rectangular regions, includes: The vertex-connected closed region is combined with each of the circumscribed rectangular regions to obtain the corresponding convex polygon region, and the vertices of each region constituting the convex polygon region are obtained. Connect the stroke points to each of the region vertices to obtain triangles of the same number as the region vertices; Determine the angle value of the vertex angle formed by the stroke points in each of the triangles; If the sum of the angle values is 360 degrees, then the first hit test of the handwriting point is considered successful.
10. The method according to claim 8, characterized in that, The second hit test, which involves comparing the handwriting points with each of the key circular regions, includes: Obtain the center and radius of each key circular region, and determine the distance between the stroke point and the center of each region. If there is a line distance smaller than the radius of the corresponding area, then the second hit test of the handwriting point is considered successful.
11. The method according to claim 1, characterized in that, The static rounded rectangle includes two static rectangular regions and four static circular regions; Accordingly, the step of performing a hit test between each stroke point included in the erased strokes and the static rounded rectangle, and erasing the erased strokes falling into the static rounded rectangle in the interface, includes: For each stroke in the writing to be erased, a hit test is performed between the stroke and two static rectangular areas and four circular areas. If the handwriting point meets the conditions for a successful hit test, then the handwriting point is added to the static point set. The handwriting formed based on each handwriting point in the static point set is erased.
12. The method according to claim 5, characterized in that, When the erase geometry is circular, the key geometric information of each touch point in the adjacent touch point pair relative to the erase geometry is determined by analyzing the touch point information corresponding to the adjacent touch point pairs, including: The circle is designated as the second geometric shape to be constructed for each touch point in the adjacent touch point pair; By using the touch point coordinates, touch width, and touch height from the touch point information corresponding to each touch point in the adjacent touch point pair, the coordinates of the circle center and the coordinates of each key intersection point of the corresponding second geometric shape to be constructed are determined. The coordinates of the center of the circle corresponding to each touch point and the coordinates of each key intersection point are regarded as key geometric information relative to the second geometric figure to be constructed.
13. The method according to claim 12, characterized in that, The step of determining the coordinates of the center of the circle and the coordinates of each key intersection point of the corresponding second geometric shape to be constructed by using the touch point coordinates, touch width, and touch height from the touch point information corresponding to each touch point in the adjacent touch point pair includes: The coordinates of the center of the corresponding second circle to be constructed are determined by using the touch point coordinates, touch width, and touch height in the touch point information corresponding to each touch point in the adjacent touch point pair. Connect the coordinates of the centers of the two corresponding circles to obtain the line connecting the centers; By constructing a straight line perpendicular to the line connecting the centers of each circle through the coordinates of the center of each circle, the coordinates of the key intersection point determined after each straight line intersects with the corresponding second circle to be constructed are obtained.
14. The method according to claim 13, characterized in that, The step of determining the moving contour geometry of the adjacent touch points relative to the erasure geometry based on the key geometric information includes: Extract the coordinates of the center of the circle contained in the key geometric information of the adjacent touch points; Obtain the second geometric region to be constructed based on the coordinates of the center of each of the aforementioned circles; Extract the coordinates of each key intersection point from the key geometric information of the adjacent touch points; Obtain the key intersection connection region determined based on the coordinates of each key intersection point; Each of the second geometric shapes to be constructed is combined with the key intersection area to form the second moving contour shape formed by the adjacent touch point pairs relative to the circle.
15. The method according to claim 14, characterized in that, Analyze each stroke point in the erased handwriting, perform a hit test between each stroke point and the moving contour geometry, and determine the target erased handwriting that falls within the moving contour geometry, including: Disassemble the second moving contour graphic to obtain a key intersection connection region and two second geometric shapes to be constructed; For each pen mark included in the pen mark to be erased, a third hit test is performed on the area connecting the pen mark and the key intersection point; If the third hit test is successful, the handwriting point is added to the second target point set; otherwise, the handwriting point and each of the second geometric shapes to be constructed are subjected to a fourth hit test of point and circular region. If the fourth hit test is successful, the handwriting point is added to the second target point set; The handwriting formed based on each handwriting point in the second target point set is identified as the target handwriting to be erased that falls into the moving contour geometry.
16. The method according to claim 15, characterized in that, The third hit test, which connects the handwriting points to the key intersection area, includes: When the key intersection connection region is determined to be a rectangular region, two rectangular side vectors formed by a single vertex are selected from the rectangular region. A match test is performed between the handwriting point and each of the rectangular side vectors; otherwise... Based on each vertex of the key intersection connection region, determine the same number of edge vectors to be compared as the number of vertices. The handwriting points are compared with the edge vectors to be compared to perform a hit test between the handwriting points and the rectangular region.
17. The method according to claim 5, characterized in that, When the erase geometry is an arbitrary irregular shape, the step of determining the key geometric information of each touch point in the adjacent touch point pair relative to the erase geometry by analyzing the touch point information corresponding to the adjacent touch point pairs includes: The arbitrary irregular shape is denoted as the third geometric shape to be constructed for each touch point in the adjacent touch point pair, and the combined graphic information contained in the third geometric shape to be constructed is determined. For each touch point in the adjacent touch point pair, the key trajectory points on the third geometry to be constructed relative to the touch point and the graphic representation information of the third geometry to be constructed are determined by combining the corresponding touch point information with the combined graphic information. The graphic representation information of each of the combined graphics and each of the key trajectory points are regarded as the key geometric information of the touch point relative to the third geometric shape to be constructed.
18. The method according to claim 17, characterized in that, The step of determining the key trajectory points on the third geometry to be constructed relative to the touch points and the graphic representation information of the third geometry to be constructed by combining the corresponding touch point information with the combined graphic information includes: Analyze the combined graphic information; When it is determined that the third geometric shape to be constructed contains only polyline polygons, the key trajectory points of the polyline polygon relative to the touch point are determined by the corresponding touch point information, and the first graphic representation information representing the polyline polygon is obtained. When it is determined that the third geometric shape to be constructed contains a polyline polygon and a target circle, key trajectory points are determined from the polyline polygon and the key circle using the corresponding touch point information, and second graphic representation information representing the polyline polygon and the key circle is obtained.
19. The method according to claim 18, characterized in that, The step of determining the key trajectory points of the polyline polygon relative to the touch point through the corresponding touch point information, and obtaining the first graphic representation information representing the polyline polygon, includes: By using the touch point coordinates, touch height, and touch width in the corresponding touch point information, the coordinates of the center point of the polygonal polygon, which serves as the first graphic representation information, and the coordinates of each vertex of the polygonal polygon are determined. Using the coordinates of the center point of the polyline and the corresponding touch point information, key trajectory points that meet the trajectory point filtering conditions are selected from the coordinates of each vertex of the polyline.
20. The method according to claim 18, characterized in that, The step of determining key trajectory points from the polyline polygon and key circle using the corresponding touch point information, and obtaining second graphic representation information representing the polyline polygon and key circle, includes: By using the touch point coordinates, touch height, and touch width in the corresponding touch point information, the coordinates of the center point of the polygonal polygon and the coordinates of each vertex of the polygonal polygon, as well as the coordinates of the center point and the radius of the key circle, are determined and used as the second graphic representation information. Using the coordinates of the center point of the polyline, the coordinates of the center point of the circle, the radius of the circle, and the corresponding touch point information, key trajectory points that meet the trajectory point filtering conditions are selected from the circumference of the key circle and the coordinates of each vertex of the polyline.
21. The method according to claim 18, characterized in that, The step of determining the moving contour geometry of the adjacent touch points relative to the erasure geometry based on the key geometric information includes: Extract either the first graphic representation information or the second graphic representation information from the key geometric information of the adjacent touch point pairs, respectively; Obtain a combined geometric figure determined based on the corresponding first or second graphic representation information; Extract key trajectory points from the key geometric information of the adjacent touch point pairs respectively; Obtain the key trajectory region formed by connecting the key trajectory points; The combined geometric shapes are combined with the key trajectory region to form a third moving contour shape composed of adjacent touch point pairs relative to the arbitrary irregular shapes.
22. The method according to claim 21, characterized in that, The analysis of each stroke point in the erased handwriting, and the matching test between each stroke point and the moving contour geometry to determine the target erased handwriting falling within the moving contour geometry, includes: Disassemble the third moving contour graphic to obtain the key trajectory region and each of the combined geometric shapes; For each stroke point included in the erased handwriting, if the combined geometry is only a polyline polygon, then the stroke points and each polyline polygon are subjected to a corner hit test using the corner method; or... If the combined geometry contains polyline polygons and key circles, then the handwriting points are tested for distance hits with each of the polyline polygons and key circles using the distance method. If the corner or distance hit test is successful, the handwriting point is added to the third target point set; otherwise, the handwriting point and the key trajectory area are subjected to a vector hit test, and if the vector hit test is successful, the handwriting point is added to the third target point set. The handwriting formed based on each handwriting point in the third target point set is identified as the target handwriting to be erased that falls into the moving contour geometry.
23. A pen-erasing device, characterized in that, Configured on an interactive flat panel, wherein the touch response accuracy of the touch frame of the interactive flat panel reaches a set accuracy range, the device includes: The display module is used to display an interface containing the ink marks to be erased on a screen. The trigger module is used to receive a handwriting erasure command and enter the handwriting erasure mode. The handwriting erasure command is generated by the user's trigger. The acquisition module is used to obtain touch point information fed back by the touch frame when a touch object touches the surface of the display screen and moves, wherein the touch object is controlled by the user; The erasure module is used to erase the handwriting on the interface by analyzing the obtained touch point information and the handwriting to be erased, and using an erasure geometry that matches the touch object. The erase module includes: The shape contour determination unit is used to determine the erasure geometry that the touch object matches during movement based on the obtained touch point information, and to determine the movement contour geometry formed by adjacent touch point pairs under the erasure geometry during movement. The target handwriting determination unit is used to analyze each handwriting point included in the handwriting to be erased, perform a hit test between each handwriting point and the moving contour geometry, and determine the target handwriting to be erased that falls into the moving contour geometry. An erasure execution unit is used to erase the target writing to be erased in the display interface; The erasure module also includes a static erasure implementation unit, which includes: The static point determination subunit is used to determine the static touch point corresponding to the touch object when it touches the display screen within the set time after determining the erase geometry matching the touch object during movement based on the obtained touch point information, when it is determined that the erase geometry is a rounded rectangle and it is detected that the touch object has not moved within the set time. The static rectangle determination subunit is used to determine a static rounded rectangle relative to the static touch point based on the touch point information of the static touch point; The static hit test subunit is used to perform a hit test between each stroke point included in the stroke to be erased and the static rounded rectangle, and to erase the stroke to be erased that falls into the static rounded rectangle in the interface.
24. An interactive flat panel, characterized in that, include: The touch frame has a touch response accuracy that reaches a set accuracy range, and is used to respond to the touch operation of the touch object through the included hardware circuitry. The display screen, covering the touch frame, constitutes a touch screen for displaying interactive content; One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-22.
25. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the method as described in any one of claims 1-22.
Citation Information
Patent Citations
Adjustable digital eraser
CN109643211A