CN107977155B - Handwriting recognition method, device, equipment and storage medium - Google Patents
Handwriting recognition method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN107977155B CN107977155B CN201711182238.0A CN201711182238A CN107977155B CN 107977155 B CN107977155 B CN 107977155B CN 201711182238 A CN201711182238 A CN 201711182238A CN 107977155 B CN107977155 B CN 107977155B
- Authority
- CN
- China
- Prior art keywords
- handwriting
- writing area
- writing
- touch
- characters
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 11
- 230000003287 optical effect Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04886—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Character Discrimination (AREA)
Abstract
The embodiment of the invention discloses a handwriting recognition method, a handwriting recognition device, handwriting recognition equipment and a storage medium, wherein the method comprises the following steps: when touch operation acting on a touch screen is detected, determining first handwriting according to the touch operation in first preset time in the touch operation, wherein the first preset time is the time from first touch pressing operation to first touch lifting operation; creating and displaying a writing area corresponding to the position of the first handwriting; and identifying the display handwriting determined according to the touch operation as characters, and displaying the selected characters in the writing area according to the obtained selection operation. The handwriting operation is carried out at any position of the current page, and the handwriting is recognized as characters and displayed in the writing area.
Description
Technical Field
The present invention relates to handwriting input technologies, and in particular, to a handwriting recognition method, apparatus, device, and storage medium.
Background
On a large touch device, a touch input mode is usually adopted to interact with the touch device, and for a user who is not used to use pinyin, handwriting recognition during touch input is very important, for example, a scene that a teacher uses a touch screen to attend a class.
The prior art solutions usually provide a fixed input area on the screen or pop up a fixed virtual keyboard supporting handwriting recognition, both of which limit the position of the user's handwriting input.
Disclosure of Invention
The embodiment of the invention provides a handwriting recognition method, a handwriting recognition device, handwriting recognition equipment and a storage medium, which are used for realizing the handwriting operation at any position of a current page and recognizing handwriting as characters to be displayed in a writing area.
In a first aspect, an embodiment of the present invention provides a handwriting recognition method, where the method includes:
when touch operation acting on a touch screen is detected, determining first handwriting according to the touch operation in first preset time in the touch operation, wherein the first preset time is the time from first touch pressing operation to first touch lifting operation;
creating and displaying a writing area corresponding to the position of the first handwriting;
and identifying the display handwriting determined according to the touch operation as characters, and displaying the selected characters in the writing area according to the obtained selection operation.
In a second aspect, an embodiment of the present invention further provides an apparatus for handwriting recognition, where the apparatus includes:
the first handwriting determining module is used for determining first handwriting according to touch operation within first preset time in the touch operation when the touch operation acting on the touch screen is detected, wherein the first preset time is the time from first touch pressing operation to first touch lifting operation;
the writing area creating module is used for creating and displaying a writing area corresponding to the position of the first handwriting;
and the character adding module is used for identifying the display handwriting determined according to the touch operation as characters and displaying the selected characters in the writing area according to the acquired selection operation.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the handwriting recognition method according to any one of the embodiments of the present invention when executing the computer program.
In a fourth aspect, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the handwriting recognition method according to any one of the embodiments of the present invention.
In the embodiment of the invention, when the touch operation acting on the touch screen is detected, a first handwriting is determined according to the touch operation within a first preset time in the touch operation, and a writing area corresponding to the position of the first handwriting is created and displayed; and identifying the display handwriting determined according to the touch operation as characters, and displaying the selected characters in a writing area according to the obtained selection operation. The handwriting operation is carried out at any position of the current page, and the handwriting is recognized as characters and displayed in the writing area.
Drawings
FIG. 1a is a flow chart of a handwriting recognition method according to an embodiment of the present invention;
FIG. 1b is a schematic diagram of a handwriting and a writing area according to a first embodiment of the present invention;
FIG. 1c is a schematic diagram illustrating the effect of displaying a handwriting applied in the first embodiment of the present invention;
FIG. 1d is a diagram illustrating a method for deleting added text according to a first embodiment of the present invention;
FIG. 2a is a flowchart of a handwriting recognition method according to a second embodiment of the present invention;
FIG. 2b is a schematic diagram illustrating a writing area displaying characters according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a handwriting recognition apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1a is a flowchart of a handwriting recognition method according to an embodiment of the present invention, where this embodiment is applicable to a case of performing handwriting at any position on a touch screen, and the method may be executed by a handwriting recognition apparatus according to an embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner. Referring to fig. 1a, the method may specifically include the steps of:
s110, when the touch operation acting on the touch screen is detected, determining a first handwriting according to the touch operation in a first preset time in the touch operation, wherein the first preset time is the time from the first touch pressing operation to the first touch lifting operation.
When a user performs a touch operation on the touch screen, the touch operation performed on the touch screen may generate touch data, and optionally, the touch screen may be a display screen in a touch-sensitive smart tablet. In the touch operation process of a user, each complete touch operation can generate a corresponding writing handwriting, and one complete touch operation comprises touch down (down), touch move (move) and touch up (up). And determining a first trace according to touch data in first preset time by taking the time from the first touch pressing operation to the first touch lifting operation in the one-time writing process as the first preset time.
Optionally, the touch data generally includes some point sets, for example, a set formed by data such as coordinates of pixel points of the touch point on the touch screen. In one specific example, FIG. 1b shows a writing script and writing area 150 as the writing script, and optionally the first script is the first stroke of the written content, such as the first stroke of "Han" in FIG. 1 b.
And S120, creating and displaying a writing area corresponding to the position of the first handwriting.
Specifically, the position of the first handwriting on the touch screen is automatically judged, and a writing area corresponding to the position is created and displayed. In the writing process, the width of the writing area can be automatically increased according to the writing content of the user. For example, when the user needs to continue writing after writing five words, the position of the writing area is automatically widened.
In a specific example, referring to fig. 1b, 151 is a recognition box, and 152 is a writing area determined by a user according to the position of the first handwriting, wherein the recognition box is displayed at the edge of the writing area in the form of a line.
S130, identifying the display handwriting determined according to the touch operation as characters, and displaying the selected characters in the writing area according to the obtained selection operation.
Specifically, each display handwriting is determined according to the touch operation, and in a specific example, the method for determining the display handwriting can be further implemented by the following method: the duration from each touch down operation to each touch up operation is taken as a time period, wherein data in each time period can determine a writing trace, and the writing traces in a plurality of time periods determine a Chinese character. In a specific example, the total number of "chinese" of the "chinese character" is 5, and the combination of the writing traces determined by the touch data in five continuous time periods is the display trace. It should be noted that, the total stroke number of the Chinese character and the number of the continuous time periods have no direct relationship, and the writing habits of the users are different, and the Chinese character with five strokes as the total stroke may be completed in one time period.
Specifically, each display handwriting is recognized as a character, and the selected character is added to the writing area according to the obtained selection operation. In a specific example, at least one character is recognized by each display handwriting, for example, if the user writes "A", the recognition result may be "Shen", "by" or "Tian", etc. The user selects the required characters to be displayed in the writing area according to the recognized characters, the specific display mode can be realized by adding the characters into the writing area, and optionally, the characters can be added into the writing area by double-clicking the characters by the user to enable the characters to jump to the writing area, or the characters are dragged to the writing area after the user selects the characters.
Optionally, the creating and displaying a writing area corresponding to the position of the first handwriting includes: and determining the font size of the character added in the writing area according to the height of the first character obtained by identifying the first handwriting.
And in the process of creating and displaying the writing area corresponding to the position of the first handwriting, determining the font size of the character added in the writing area according to the height of the first character obtained by identifying the first handwriting. For example, when the recognition result is selected for the first time, the height of the first handwritten character may be obtained, where the first character may be obtained through the first handwriting, and the first handwriting may be the first stroke of the first character, and the initial font size is set according to the height and is used as the font size of the character added in the writing area. Therefore, the display size of the recognized characters is similar to that of the handwritten characters, and the user experience is improved.
In the embodiment of the invention, when the touch operation acting on the touch screen is detected, a first handwriting is determined according to the touch operation within a first preset time in the touch operation, and a writing area corresponding to the position of the first handwriting is created and displayed; and identifying the display handwriting determined according to the touch operation as characters, and displaying the selected characters in a writing area according to the obtained selection operation. The handwriting operation is carried out at any position of the current page, and the handwriting is recognized as characters and displayed in the writing area.
On the basis of the technical scheme, before the displaying the selected characters in the writing area according to the obtained selection operation, the method provided by the embodiment of the invention further comprises the following steps: and displaying the phrases associated with the identified characters in a candidate area by querying a preset common phrase data list, wherein the candidate area is separated from the writing area.
Specifically, before the selected characters are displayed in the writing area according to the obtained selection operation, the data list can be stored in a local database or a cloud database in advance by inquiring a preset common word group data list, and words related to the identified characters are inquired in the preset common word group data list and displayed in the candidate area. The candidate area is separated from the writing area, optionally, the candidate area can be set in the upper area of the writing area, and the user selects the required single character or phrase according to the phrase provided in the candidate area and associated with the recognized character.
In a specific example, FIG. 1c illustrates a presentation of a writing script, wherein 160 represents a writing area; 161 area may be used to display the font and font size of the writing area text, such as microsoft yahei 56; 162 represents a movement symbol, clicking 162 may effect movement of the writing area; 163 is a candidate area for displaying the words and the like associated with the inquired words; 164 represents a close symbol, and clicking 164 may close the display page; 165 indicates the symbol of adding a line and clicking 165 can add a new line for writing. It should be noted that "click" mentioned in this paragraph is only an exemplary operation, and the click operation may be replaced by operations such as touch; furthermore, the candidate area is separate from the writing area and is only for display.
And simultaneously displaying the matched single characters and words beginning with the matched single characters in the recognition result to realize the associated input. The data and the use frequency of the commonly used phrases are stored in the local database or the cloud database, and the most commonly used phrases of the recognized single characters can be obtained by inquiring the preset commonly used phrase data list.
On the basis of the technical method, after the selected characters are displayed in the writing area according to the obtained selection operation, the method further comprises the following steps: and when the operation of the preset gesture is detected, deleting the characters of the current writing area corresponding to the operation of the preset gesture.
Specifically, after the recognition result is selected, the characters are added and displayed in the writing area, the writing area of the added and displayed characters becomes the display area, that is, the display area with the added characters on the touch screen covers the writing area, and the writing area below the display area becomes the non-editable state.
In a specific application scenario, fig. 1d shows a schematic diagram of deleting added characters, after a user adds one or more characters, if the user needs to delete the characters, a gesture is defined in advance to delete the characters, and the gesture is used as a preset gesture. In a specific example, for example, the user slides from the upper right corner to the lower left corner, after the text is deleted, the deleted text disappears in the corresponding display area, and the position of the original display area is in an editable state, that is, the user can respond to the touch operation and generate the handwriting. It should be noted that the meanings of other symbols in fig. 1d are the same as those in fig. 1b, and are not repeated herein. When the added characters are not needed, the characters are deleted, so that more choices are improved for the user, and the user experience is enhanced.
Example two
Fig. 2a is a flowchart of a handwriting recognition method according to a second embodiment of the present invention, where "adding a selected character to the writing area according to an obtained selection operation" is optimized in this embodiment based on the above embodiment. Referring to fig. 2a, the method may specifically include the steps of:
s210, when the touch operation acting on the touch screen is detected, determining a first handwriting according to the touch operation in a first preset time in the touch operation, wherein the first preset time is the time from the first touch pressing operation to the first touch lifting operation.
And S220, creating and displaying a writing area corresponding to the position of the first handwriting.
And S230, recognizing the display handwriting determined according to the touch operation as characters.
S240, judging whether a selection operation is detected in the candidate area within a second preset time of recognizing each displayed handwriting as a character, if so, executing S250, otherwise, executing S260.
Specifically, after each display handwriting is recognized as a character, whether a selection operation is detected in the candidate area within a second preset time of recognizing each display handwriting as a character is judged, wherein the second preset time can be 10 seconds, and the selection operation is used for selecting the character displayed in the candidate area. In a specific application scenario, when the handwriting of the user is "a", the displayed recognized text is "a", "by", or "shen", and if a selection operation of the user, such as a click operation, is detected within 10 seconds, S250 is executed.
And S250, displaying the selected characters in the writing area according to the selection operation.
And when the selection operation of the user is detected in the candidate area within a second preset time, displaying the selected characters in the writing area according to the selection operation of the user. To illustrate by way of example in S250, if the user selects "yes" within 10 seconds, it indicates that the word the user desires is "yes", and it is added to the writing area for display.
Fig. 2b is a diagram of the displayed text after the text is displayed in the writing area, 280 is the displayed text, wherein the area at the position of the "Chinese" character is changed into the display area, wherein the display area is used for displaying the added text, and the writing area is used for responding to the writing operation.
And S260, displaying the characters with default serial numbers in the recognized characters in a writing area.
And when the selection operation of the user cannot be detected in the candidate area within the second preset time, displaying and adding the characters with default serial numbers in the recognized characters in the writing area. To illustrate by way of example in S250, if the user cannot detect the selection operation of the user within 10 seconds, and the default serial number is the first character displayed in the candidate area, a "is displayed in the writing area and added.
In the embodiment of the invention, after the display handwriting determined according to the touch operation is recognized as the character, whether the selection operation is detected in the candidate area within the second preset time for recognizing each display handwriting as the character is judged, if the selection operation is detected in the candidate area within the second preset time for recognizing each display handwriting as the character, the selected character is displayed in the writing area according to the selection operation, and if the selection operation is not detected in the candidate area within the second preset time for recognizing each display handwriting as the character, the character with the default serial number in the recognized character is displayed in the writing area. The determination of the text that is finally presented and added to the writing area is achieved.
Optionally, the creating and displaying a writing area corresponding to the position of the first handwriting may specifically include: acquiring coordinates of a writing position of the first handwriting; and creating and displaying a writing area at least containing the first handwriting according to the coordinates.
Specifically, the creating and displaying process of the writing area may specifically include: the coordinates of the writing position of the first handwriting are obtained, for example, when a user writes "Chinese", the coordinates of the writing position of the first handwriting represent a pen-down position of the user in the writing process, wherein the pen-down position is only used for describing the position of the first pen on the touch screen in the first writing process, and the handwriting is not necessarily generated by the writing pen, and can also be generated by the finger of the user on the touch screen. A writing area containing at least the first stroke is created and presented based on the coordinates.
In one particular example, the user may wish to create a new line each time a line is written, optionally with each line having separate handwriting, display and candidate areas. The touch operation can only be recognized in the handwriting area and responds to the generated handwriting, if the handwriting is written in other places, the system can automatically create a new recognition frame, namely, a new writing area is generated, the original writing area loses focus, and the new writing area becomes an editable state after acquiring the focus. In the writing area with lost focus, except for the display area to which the characters have been added, other areas are hidden, when the area acquires the focus again, the areas of the recognition frame are restored to continue handwriting or editing, and optionally, the acquisition focus can be generated by touching the corresponding area.
The embodiment of the invention can support the handwriting writing at any position of the touch screen to start recognition, generate the recognition frame after recognition, provide the handwriting area, the candidate area, the display area and the editing area with the recognition frame, support the movement, closing and adding of lines, and then continue the handwriting operation in the writing area determined by the recognition frame. When lifted after writing a first stroke, the system has recorded data for the first stroke a, which usually contains some set of points, called set a of points. And creating a recognition frame according to the position of the handwriting A, wherein the recognition frame comprises a writing area capable of receiving handwriting. The point set a is converted into handwriting B, and then the handwriting B is added into the writing area. And triggering an updating event by the writing area, and recognizing characters according to the handwriting. If writing is continued, the recognition result is immediately updated, and the recognition result is displayed in the candidate area to be selected.
On the basis of the technical scheme, the technical scheme provided by the embodiment of the invention can realize the following functions: starting handwriting at any position; lifting the first stroke, and generating a handwriting recognition frame at the handwriting position; then, handwriting is carried out in the recognition frame, the width of the recognition frame is automatically increased, the user operation is simplified, and the user does not need to manually change the width of the writing frame; if the handwriting is carried out outside the identification frame, a new identification frame is generated, and the interference caused by different operations on the same writing frame at the same time is avoided; the recognition frame which does not contain the recognized Chinese characters is automatically removed, so that the visualization effect of the current page is improved; the word size of the recognition result is associated with the size of the handwriting and is displayed on the recognition frame, so that the requirements of the user in handwriting recognition are met; the recognition result comprises matched single words and associated word prompts, so that more choices are provided for the user; after the identification item is selected, before the writing is started again, displaying the associated words according to the single characters; identifying single characters, displaying countdown and automatically applying; the identification frame can be closed and can be moved; the recognition box can add a row manually; the recognized Chinese characters can be deleted by gestures, and the method is simple and quick.
In addition, the technical scheme provided by the embodiment of the invention can also realize the following functions: after the identification frame is out of focus, only the identified Chinese characters are kept visible, other parts are transparent, specifically, when the focus is lost, the identification frame is in a non-editing state and is used for displaying the identified Chinese characters, and other parts are transparently processed, so that the current display page is concise, the added character image is displayed on a screen, and the interference to the identification frame which is currently edited is avoided; the identification frame can click again to obtain the focus and continue editing, and the identification frame losing the focus can be clicked to enter an editable state, so that the Chinese characters in the identification frame which is added with the Chinese characters are modified, and the defect that the added characters are not modifiable is avoided; the font, the font size and the color of the characters in the identification box can be adjusted, and the attributes in the box are consistent; the recognized Chinese characters can be inserted into the page as simple text objects, and other processing can be performed by using the recognized Chinese characters, for example, the recognized Chinese characters are added into the text as text objects to be explained and the like, so that the multi-angle application of the recognized and displayed Chinese characters is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a handwriting recognition apparatus according to a third embodiment of the present invention, which is suitable for executing a handwriting recognition method according to the third embodiment of the present invention. As shown in fig. 3, the apparatus may specifically include:
the first handwriting determining module 310 is configured to determine first handwriting according to a touch operation within a first preset time in the touch operation when the touch operation acting on the touch screen is detected, where the first preset time is a time from a first touch down operation to a first touch up operation;
a writing area creating module 320, configured to create and display a writing area corresponding to the position of the first handwriting;
and the character adding module 330 is configured to recognize the display handwriting determined according to the touch operation as a character, and display the selected character in the writing area according to the obtained selection operation.
Further, the writing area creating module 320 is specifically configured to:
and determining the font size of the character added in the writing area according to the height of the first character obtained by identifying the first handwriting.
Further, the method also comprises the following steps:
and the display module is used for displaying phrases associated with the identified characters in a candidate area by inquiring a preset common phrase data list before displaying the selected characters in the writing area according to the obtained selection operation, wherein the candidate area is separated from the writing area.
Further, the text adding module 330 includes:
the judging submodule is used for judging whether the selection operation is detected in the candidate area within second preset time for recognizing each display handwriting as a character;
the first character adding submodule is used for displaying the selected characters in the writing area according to the selection operation when the selection operation is detected in the candidate area within the second preset time for identifying each display handwriting as the characters;
and the second character adding sub-module is used for displaying the characters with default serial numbers in the recognized characters in the writing area when the selection operation cannot be detected in the candidate area within the second preset time for recognizing each displayed handwriting as the characters.
Further, the writing area creating module 320 is specifically configured to:
acquiring coordinates of a writing position of the first handwriting;
and creating and displaying a writing area at least containing the first handwriting according to the coordinates.
Further, the method also comprises the following steps:
and the character deleting module is used for deleting the characters of the current writing area corresponding to the preset gesture operation when the operation of the preset gesture is detected after the selected characters are displayed in the writing area according to the obtained selection operation.
The handwriting recognition device provided by the embodiment of the invention can execute the handwriting recognition method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only one example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing a handwriting recognition method provided by an embodiment of the present invention:
that is, the processing unit implements, when executing the program: when touch operation acting on a touch screen is detected, determining first handwriting according to the touch operation in first preset time in the touch operation, wherein the first preset time is the time from first touch pressing operation to first touch lifting operation; creating and displaying a writing area corresponding to the position of the first handwriting; and identifying the display handwriting determined according to the touch operation as characters, and displaying the selected characters in the writing area according to the obtained selection operation.
EXAMPLE five
Fifth, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the handwriting recognition method provided in all the embodiments of the present invention:
that is, the program when executed by the processor implements: when touch operation acting on a touch screen is detected, determining first handwriting according to the touch operation in first preset time in the touch operation, wherein the first preset time is the time from first touch pressing operation to first touch lifting operation; creating and displaying a writing area corresponding to the position of the first handwriting; and identifying the display handwriting determined according to the touch operation as characters, and displaying the selected characters in the writing area according to the obtained selection operation.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention 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 invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (8)
1. A handwriting recognition method, comprising:
when touch operation acting on a touch screen is detected, determining first handwriting according to the touch operation in first preset time in the touch operation, wherein the first preset time is the time from first touch pressing operation to first touch lifting operation;
creating and displaying a writing area corresponding to the position of the first handwriting, wherein each line has an independent writing area; the touch operation can only be recognized in the writing area and responds to the generated writing handwriting, if the writing is performed in other places, the system can automatically create a new writing area, the original writing area loses focus, and the new writing area becomes an editable state after acquiring the focus;
identifying the display handwriting determined according to the touch operation as characters, and displaying the selected characters in the writing area according to the obtained selection operation;
wherein the creating and displaying of the writing area corresponding to the position of the first handwriting comprises:
determining the font size of the character added in the writing area according to the height of the first character obtained by identifying the first handwriting;
the method further comprises the following steps: increasing the width of the writing area according to the detected writing content.
2. The method according to claim 1, wherein before displaying the selected text in the writing area according to the obtained selection operation, the method further comprises:
and displaying the phrases associated with the identified characters in a candidate area by querying a preset common phrase data list, wherein the candidate area is separated from the writing area.
3. The method according to claim 2, wherein the displaying the selected text in the writing area according to the obtained selection operation comprises:
judging whether a selection operation is detected in the candidate area within a second preset time for recognizing each displayed handwriting as a character, if so, displaying the selected character in the writing area according to the selection operation;
and if not, displaying the characters with default serial numbers in the recognized characters in the writing area.
4. The method of claim 1, wherein the creating and presenting a writing area corresponding to a location of the first writing comprises:
acquiring coordinates of a writing position of the first handwriting;
and creating and displaying a writing area at least containing the first handwriting according to the coordinates.
5. The method according to claim 1, wherein after the displaying the selected text in the writing area according to the obtained selection operation, further comprising:
and when the operation of the preset gesture is detected, deleting the characters of the current writing area corresponding to the operation of the preset gesture.
6. An apparatus for handwriting recognition, comprising:
the first handwriting determining module is used for determining first handwriting according to touch operation within first preset time in the touch operation when the touch operation acting on the touch screen is detected, wherein the first preset time is the time from first touch pressing operation to first touch lifting operation;
the writing area creating module is used for creating and displaying a writing area corresponding to the position of the first handwriting, wherein each line is provided with an independent writing area; the touch operation can only be recognized in the writing area and responds to the generated writing handwriting, if the writing is performed in other places, the system can automatically create a new writing area, the original writing area loses focus, and the new writing area becomes an editable state after acquiring the focus;
the character adding module is used for identifying the display handwriting determined according to the touch operation as characters and displaying the selected characters in the writing area according to the obtained selection operation;
wherein the writing area creating module is specifically configured to:
determining the font size of the character added in the writing area according to the height of the first character obtained by identifying the first handwriting; and the number of the first and second groups,
increasing the width of the writing area according to the detected writing content.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-5 when executing the program.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711182238.0A CN107977155B (en) | 2017-11-23 | 2017-11-23 | Handwriting recognition method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711182238.0A CN107977155B (en) | 2017-11-23 | 2017-11-23 | Handwriting recognition method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107977155A CN107977155A (en) | 2018-05-01 |
CN107977155B true CN107977155B (en) | 2020-12-29 |
Family
ID=62011075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711182238.0A Active CN107977155B (en) | 2017-11-23 | 2017-11-23 | Handwriting recognition method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107977155B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108845757A (en) * | 2018-07-17 | 2018-11-20 | 广州视源电子科技股份有限公司 | Touch input method and device for intelligent interaction panel, computer readable storage medium and intelligent interaction panel |
CN110968246A (en) * | 2018-09-28 | 2020-04-07 | 北京搜狗科技发展有限公司 | Intelligent Chinese handwriting input recognition method and device |
CN109858323A (en) * | 2018-12-07 | 2019-06-07 | 广州光大教育软件科技股份有限公司 | A kind of character hand-written recognition method and system |
CN110490153B (en) * | 2019-08-22 | 2021-10-19 | 司法鉴定科学研究院 | Offline handwriting individual recognition system and method based on three-dimensional dynamic characteristics |
CN113970971B (en) * | 2021-09-10 | 2022-10-04 | 荣耀终端有限公司 | Data processing method and device based on touch control pen |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003044214A (en) * | 2001-07-26 | 2003-02-14 | Fujitsu Ltd | Handwritten character input device and program for realizing the same |
CN102455869A (en) * | 2011-09-29 | 2012-05-16 | 北京壹人壹本信息科技有限公司 | Method and device for editing characters by using gestures |
CN102866856A (en) * | 2012-09-05 | 2013-01-09 | 鸿富锦精密工业(深圳)有限公司 | Method and device for processing hand-writing input handwritings |
CN102880412A (en) * | 2012-08-23 | 2013-01-16 | 东莞宇龙通信科技有限公司 | Handwriting input method, system and device |
-
2017
- 2017-11-23 CN CN201711182238.0A patent/CN107977155B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003044214A (en) * | 2001-07-26 | 2003-02-14 | Fujitsu Ltd | Handwritten character input device and program for realizing the same |
CN102455869A (en) * | 2011-09-29 | 2012-05-16 | 北京壹人壹本信息科技有限公司 | Method and device for editing characters by using gestures |
CN102880412A (en) * | 2012-08-23 | 2013-01-16 | 东莞宇龙通信科技有限公司 | Handwriting input method, system and device |
CN102866856A (en) * | 2012-09-05 | 2013-01-09 | 鸿富锦精密工业(深圳)有限公司 | Method and device for processing hand-writing input handwritings |
Also Published As
Publication number | Publication date |
---|---|
CN107977155A (en) | 2018-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107977155B (en) | Handwriting recognition method, device, equipment and storage medium | |
RU2702270C2 (en) | Detection of handwritten fragment selection | |
CN106484266B (en) | Text processing method and device | |
CN110300966B (en) | Enhanced pivot table creation and interaction | |
CN112115678B (en) | Information display method and device, storage medium and electronic equipment | |
US20110246875A1 (en) | Digital whiteboard implementation | |
WO2016095689A1 (en) | Recognition and searching method and system based on repeated touch-control operations on terminal interface | |
JP2003303047A (en) | Image input and display system, usage of user interface as well as product including computer usable medium | |
US8952897B2 (en) | Single page soft input panels for larger character sets | |
US10416868B2 (en) | Method and system for character insertion in a character string | |
KR102075433B1 (en) | Handwriting input apparatus and control method thereof | |
US10210141B2 (en) | Stylizing text by replacing glyph with alternate glyph | |
CN110109590B (en) | Automatic reading method and device | |
CN108492349B (en) | Processing method, device and equipment for writing strokes and storage medium | |
US20180357206A1 (en) | Content inker | |
US10339372B2 (en) | Analog strokes to digital ink strokes | |
JP2024064941A (en) | Display method, apparatus, pen type electronic dictionary, electronic equipment, and recording medium | |
US10970476B2 (en) | Augmenting digital ink strokes | |
CN108536686B (en) | Picture translation method, device, terminal and storage medium | |
US11341353B2 (en) | Preserving styles and ink effects in ink-to-text | |
CN113807058A (en) | Text display method and text display device | |
US10514841B2 (en) | Multi-layered ink object | |
CN114745585B (en) | Subtitle display method, device, terminal and storage medium | |
US20150169766A1 (en) | Information processing apparatus, information processing method, and program | |
US20180300301A1 (en) | Enhanced inking capabilities for content creation applications |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |