Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a writing identification method and system of an electronic whiteboard, a storage medium and the electronic whiteboard so as to realize separation of a hand pen and a pen.
On one hand, the embodiment of the application provides a writing recognition method of an electronic whiteboard, which is applied to whiteboard equipment of an infrared touch screen, wherein the whiteboard equipment is configured with a hand-pen separation mode, and when the hand-pen separation mode is started, the method comprises the following steps:
acquiring a first touch event, wherein the touch event comprises a touch position and a touch area;
judging whether the current first touch event is triggered by a finger or not according to the touch area;
and when the touch event is determined to be triggered by the finger, stopping distributing the first touch event to the processing unit.
In some embodiments, the determining, according to the touch area, whether the current first touch event is triggered by a finger specifically includes:
and when the touch area of the first touch event is larger than the lower limit value of the finger touch area and smaller than the upper limit value of the finger touch area, judging that the first touch event is triggered by the finger.
In some embodiments, the following steps are included prior to initiating the stylus detach mode:
collecting a second touch event written with a finger;
and determining an upper limit value and a lower limit value of the finger touch area according to the touch areas of the plurality of second touch events.
In some embodiments, the determining the upper limit value and the lower limit value of the finger touch area according to the touch areas of the plurality of second touch events specifically includes:
acquiring touch events triggered by writing of multiple groups of fingers, and acquiring the maximum value and the minimum value of the touch area written by each group of fingers;
writing a plurality of groups of fingers correspondingly to obtain the maximum value of the touch area, and averaging to obtain the upper limit value of the finger touch area;
and correspondingly writing a plurality of groups of fingers to obtain the minimum value of the touch area, and averaging to obtain the lower limit value of the finger touch area.
In some embodiments, further comprising the steps of:
and when the touch area of the first touch event is smaller than the touch area lower limit value, determining that the pen tip is operated, and distributing the first touch event to the processing unit when the first touch event is determined to be triggered by the pen tip operation.
In some embodiments, the touch area is determined by:
obtaining a plurality of shielded detection points;
and classifying adjacent detection points into the same touch area, and determining the touch area according to the number of the detection points belonging to the same touch area.
In some embodiments, further comprising the steps of:
when the first touch event is distributed to the processing unit, the processing unit draws a stroke image according to the touch event.
On the other hand, an embodiment of the present application provides a writing recognition system for an electronic whiteboard, including:
a memory for storing a program;
and the processor is used for loading the program to execute the writing recognition method of the electronic whiteboard.
On the other hand, an embodiment of the present application provides an electronic whiteboard, including:
the infrared touch screen detects a touch event through an infrared matrix;
provided is a writing recognition system of an electronic whiteboard.
In another aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a program, and when the program is executed by a processor, the program implements the method for recognizing writing on an electronic whiteboard.
The embodiment of the application adopts a low-cost infrared touch scheme, and a stylus separation mode is configured on the basis of the scheme, wherein a first touch event is obtained in the scheme, and the touch event comprises a touch position and a touch area; then judging whether the current first touch event is triggered by a finger or not according to the touch area; when the touch event is judged to be triggered by the finger, the first touch event is stopped being distributed to the processing unit, through the mode, only the content written by the pen can be processed when the separation of the pen and the hand is started, and the touch event of the hand is ignored.
Detailed Description
In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below through embodiments with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present invention, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and larger, smaller, larger, etc. are understood as excluding the present numbers, and larger, smaller, inner, etc. are understood as including the present numbers. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly defined, terms such as set, etc. should be broadly construed, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the detailed contents of the technical solutions.
In the description of the present invention, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means that a particular feature or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The embodiment of the application provides a writing identification method of an electronic whiteboard, which is applied to whiteboard equipment of an infrared touch screen, wherein the whiteboard equipment is configured with a hand-pen separation mode, and when the hand-pen separation mode is started, the method comprises the following steps:
and S1, acquiring a first touch event, wherein the touch event comprises a touch position and a touch area. In particular, the touch event may be implemented based on a MotionEvent of the android system. A motionEvent is a class of Android native screen touch events that can record the type of event (including ACTION _ DOWN press, ACTION _ MOVE MOVE, ACTION _ UP lift, etc.) and touch XY axis coordinate position, etc.
And S2, judging whether the current first touch event is triggered by the finger according to the touch area.
Specifically, the infrared touch screen has the working principle that infrared receiving tubes and infrared transmitting tubes are fully distributed around the touch screen, the infrared tubes are arranged on the surface of the touch screen in a one-to-one corresponding position relationship to form an optical network formed by infrared rays, when an object (such as a finger, a hand with gloves or any touch object) enters the infrared optical network to block infrared rays at a certain position for transmitting and receiving, the intensity of the infrared rays received by the receiving infrared tubes in the transverse and vertical directions at the point can be changed, and the device can know where the touch is performed by knowing the change of infrared ray receiving. The infrared touch screen can perform interpolation calculation on data of each point by designing hardware and programming software, and can achieve the resolution of 4096 x 4096 due to the working principle of the infrared touch screen. In the same moment when the infrared touch screen works, only one pair of infrared geminate transistors (a transmitting tube and a receiving tube corresponding to the physical positions) carry out data work, and the circuit can quickly respond by collecting high-frequency data of the infrared geminate transistors.
Therefore, when the touch area of the touch screen is analyzed, the corresponding area can be calculated according to the shielded point positions in one frame of scanning, generally, the touch screen is divided according to the number of the point positions, and each point position represents an equal touch area, so that the touch area can be determined only by determining the number of the shielded point positions. Whether a plurality of point locations belong to the same touch event can be determined based on the position relationship of the occluded point locations, and point locations with adjacent relationships are generally attributed to the same touch event. In this embodiment, only one touch area range belonging to the finger needs to be defined. As shown in FIG. 2, point A is not adjacent to other points and is therefore attributed to one touch event, while point B, C, D, E, F are both directly or indirectly adjacent and are attributed to the same touch event.
Therefore, it can be considered that the touch area is determined by: obtaining a plurality of shielded detection points; and classifying adjacent detection points into the same touch area, and determining the touch area according to the number of the detection points belonging to the same touch area.
And S3, stopping distributing the first touch event to the processing unit when the touch event is judged to be triggered by the finger.
In this embodiment, if certain touch events are determined to be triggered by a finger when stylus pen separation is initiated, the events are ignored, and not distributed to the processing unit. Thus, the processing unit does not draw because no event is received, and the corresponding strokes are not displayed on the screen.
And S4, when the touch area of the first touch event is smaller than the touch area lower limit value, determining that the pen tip is operated, and when the first touch event is determined to be triggered by the pen tip operation, distributing the first touch event to the processing unit. When the first touch event is distributed to the processing unit, the processing unit draws a stroke image according to the touch event.
Specifically, if the touch is determined to be triggered by the pen tip, the touch event is sent to the processing unit, and the processing unit draws a relevant track according to the touch event.
The finger writing and the pen point writing are distinguished through the touch area, and the pen-hand separation function can be achieved on the basis of the infrared touch screen with low cost.
In some embodiments, the determining, according to the touch area, whether the current first touch event is triggered by a finger specifically includes:
and when the touch area of the first touch event is larger than the lower limit value of the finger touch area and smaller than the upper limit value of the finger touch area, judging that the first touch event is triggered by the finger. Because fingers of different people have different sizes and the touch area is changed during writing, an upper limit value and a lower limit value can be set to judge whether the touch event is triggered by the fingers or not. If not, a compare operation may be concluded. Of course, since the upper limit value and the lower limit value of the finger are set, an operation of a palm or the like may be performed if the upper limit value is larger than the upper limit value of the finger touch area, and an interactive processing method may be separately set for such an operation. If the value is less than the lower limit value, it can be determined that the pen tip is performing writing operation. Of course, in order to simplify the determination, the determination between the upper limit value and the lower limit value may be performed by a finger operation, and the other may be performed by a pen tip operation. Because in practice a larger area of touch will occur less often. Wherein different account numbers are configured with separate maximum and minimum values of the touch area. It can be understood that, in this embodiment, a personalized configuration may be implemented, and different touch thresholds may be configured for accounts corresponding to different users to adapt to sizes of fingers of different users.
With respect to the upper and lower values of the finger touch area, in some embodiments, an initial entry may be made first before the stylus-detached mode is initiated:
a second touch event written with a finger is collected. Different fingers and different people can be used for writing, and the writing process can be continuously writing a plurality of characters.
And determining an upper limit value and a lower limit value of the finger touch area according to the touch areas of the plurality of second touch events. The method comprises the following steps:
and acquiring touch events triggered by writing of multiple groups of fingers, and acquiring the maximum value and the minimum value of the touch area written by each group of fingers. The maximum and minimum values of the touch area are obtained while each group of fingers is writing. And correspondingly writing a plurality of groups of fingers to obtain the maximum value of the touch area, and averaging to obtain the upper limit value of the finger touch area. And correspondingly writing a plurality of groups of fingers to obtain the minimum value of the touch area, and averaging to obtain the lower limit value of the finger touch area. And averaging the maximum values and the minimum values of the multiple groups. Therefore, the related threshold value can be obtained more accurately, and the touch events of the hand and the pen can be distinguished more accurately.
On the other hand, an embodiment of the present application provides a writing recognition system for an electronic whiteboard, including:
a memory for storing a program;
and the processor is used for loading the program to execute the writing recognition method of the electronic whiteboard.
On the other hand, an embodiment of the present application provides an electronic whiteboard, including:
the infrared touch screen detects a touch event through an infrared matrix;
provided is a writing recognition system of an electronic whiteboard.
In another aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a program, and when the program is executed by a processor, the program implements the method for recognizing writing on an electronic whiteboard.
The integrated units described in this application may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.