CN108846339A - Character recognition method and device, electronic equipment and storage medium - Google Patents

Character recognition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN108846339A
CN108846339A CN201810563940.XA CN201810563940A CN108846339A CN 108846339 A CN108846339 A CN 108846339A CN 201810563940 A CN201810563940 A CN 201810563940A CN 108846339 A CN108846339 A CN 108846339A
Authority
CN
China
Prior art keywords
text
dimensional coordinate
output
determining
stroke
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.)
Granted
Application number
CN201810563940.XA
Other languages
Chinese (zh)
Other versions
CN108846339B (en
Inventor
马宝兴
黄茵洁
武学良
钟维涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201810563940.XA priority Critical patent/CN108846339B/en
Publication of CN108846339A publication Critical patent/CN108846339A/en
Application granted granted Critical
Publication of CN108846339B publication Critical patent/CN108846339B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/28Recognition of hand or arm movements, e.g. recognition of deaf sign language

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a character recognition method, a character recognition device, electronic equipment and a storage medium, which are used for solving the problems of inaccuracy and inconvenience in character input in the prior art. The method comprises the following steps: detecting whether a preset target gesture for writing exists in a current frame image in a video stream acquired by a camera; if so, determining and storing the coordinate information of the target gesture; and determining and outputting the target characters corresponding to the characters to be output according to each coordinate information corresponding to the stored characters to be output. When the user writes in the near-empty space, the electronic equipment determines the characters written by the user according to each three-dimensional coordinate of the target gesture when the user writes, so that the characters can be quickly and accurately input.

Description

A kind of character recognition method, device, electronic equipment and storage medium
Technical field
The present invention relates to technical field of character recognition, in particular to a kind of character recognition method, device, electronic equipment and deposit Storage media.
Background technique
With science and technology and social progress, people's living standard is continuously improved, and various electronic equipments progress into people's Life, provides various conveniences for user.
Existing electronic equipment is when typing text is used to input information, typically by way of keyboard or touch screen Carry out typing.But in life have many people for the lack of skill of keyboard, the typing text speed by way of keyboard It is very slow.The touch screen of electronic equipment is easily damaged or insensitive, is caused user when passing through touch screen input character, also can It is many inconvenient to occur.
User generally for the writing of text be it is very familiar, how to utilize this advantage, rapidly and accurately typing text Word is to need the problem of studying.
Summary of the invention
The embodiment of the invention discloses a kind of character recognition method, device, electronic equipment and storage mediums, existing to solve Have inaccurate in typing text in technology, it has not been convenient to the problem of.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of character recognition methods, are applied to electronic equipment, described Method includes:
It detects in the current frame image in the video flowing of camera acquisition with the presence or absence of the preset target hand for writing Gesture;If it is, determining the coordinate information of the target gesture, and save;
According to the corresponding each coordinate information of the text to be output of preservation, the corresponding target text of the text to be output is determined Word, and export.
Further, it is used in the current frame image in the video flowing of the detection camera acquisition with the presence or absence of preset The target gesture of writing includes:
The current frame image in video flowing acquired respectively according to two cameras, determines the overlapping in two current frame images Region;It detects in overlapping region with the presence or absence of the preset target gesture for writing;
The coordinate information of the determination target gesture includes:
According to the overlapping region, the first three-dimensional coordinate of the target gesture is determined.
Further, after the first three-dimensional coordinate for determining the target gesture, the method also includes:
It is three-dimensional by described first according to the mapping relations of the writing display area of the overlapping region and display screen pre-saved Coordinate is mapped as first two-dimensional coordinate for writing display area, according to first two-dimensional coordinate in the writing viewing area Domain is shown.
Further, after the first three-dimensional coordinate for determining the target gesture, in the text to be output according to preservation The corresponding each coordinate information of word, before determining the corresponding target text of the text to be output, the method also includes:
According to first three-dimensional coordinate, judges whether current stroke is write and finish;
If it is, carrying out subsequent step.
Further, if there is no the preset target gesture for writing in overlapping region, according to preservation to The corresponding each coordinate information of output character, before determining the corresponding target text of the text to be output, the method is also wrapped It includes:
Judgement is directed to the previous frame image of current frame image, if preserves the second three-dimensional coordinate of the target gesture; If it is, carrying out subsequent step.
Further, the corresponding each three-dimensional coordinate of the text to be output according to preservation, determines the text to be output The corresponding target text of word includes:
According to the corresponding each three-dimensional coordinate of the text to be output of preservation, corresponding first text of the text to be output is determined Word;
First text is matched with the literal pool pre-saved, according to matching result, is determined described to be output The corresponding target text of text.
Further, described according to matching result, determine that the corresponding target text of the text to be output includes:
Highest second text of matching degree is determined as the corresponding target text of the text to be output;Or,
Show the second text of preset quantity from high to low by matching degree;The second text that user selects is determined as described The corresponding target text of text to be output.
Further, the corresponding each three-dimensional coordinate of the text to be output according to preservation, determines the text to be output Corresponding first text of word includes:
According to the determining corresponding every unicursal of text to be output, corresponding first text of text to be output is determined, wherein The corresponding every unicursal of text to be output is to determine the stroke after finishing writing, according to the corresponding each three-dimensional coordinate of the stroke Determining.
Further, according to the first three-dimensional coordinate, determine whether current stroke writes the process finished and include:
According to first three-dimensional coordinate and the second three-dimensional coordinate of the previous frame image preservation for current frame image First distance determines current writing speed;
Judge whether current writing speed is located within the scope of the stroke writing speed pre-saved;
If so, using first three-dimensional coordinate as the effective three-dimensional coordinate for determining stroke;
If not, using first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke;Judge that described second is three-dimensional Coordinate whether be determining stroke effective three-dimensional coordinate, if so, using second three-dimensional coordinate as the end of current stroke Three-dimensional coordinate determines that current stroke writing finishes.
Further, using first three-dimensional coordinate as determine stroke effective three-dimensional coordinate after, the method Further include:
Judge second three-dimensional coordinate whether be determining stroke effective three-dimensional coordinate;
If it is not, then using first three-dimensional coordinate as the beginning three-dimensional coordinate of current stroke.
Further, after determining the corresponding every unicursal of text to be output, according to determining text to be output Corresponding every unicursal, before determining corresponding first text of text to be output, the method also includes:
For every unicursal, determine whether the used time of the stroke is less than preset first duration threshold value;
If so, the stroke is filtered out.
Further, in the corresponding each coordinate information of text to be output according to preservation, the text to be output is determined After corresponding target text, the method also includes:
Delete the corresponding each coordinate information of text to be output.
Further, if being directed to the previous frame image of current frame image, the two or three of the target gesture is not preserved Coordinate is tieed up, the method also includes:
To the overlapping region pre-saved, there is no the frame numbers of the image of the target gesture to be updated.
Further, the method also includes:
When identification, which meets text, writes termination condition, at least one text of writing is subjected to voice broadcast.
Further, identify that meeting text writing termination condition includes:
Identification receives text and writes END instruction;Or
The frame number for recognizing the image that the target gesture is not present in the overlapping region pre-saved is greater than preset quantity.
The embodiment of the invention discloses a kind of character recognition device, described device includes:
Target gesture detection module, for detecting in the current frame image in the video flowing that camera acquires with the presence or absence of pre- If for writing target gesture;
Coordinate information determining module is when being for the testing result in the target gesture detection module, it is determined that institute The coordinate information of target gesture is stated, and is saved;
Text determining module determines described to defeated for the corresponding each coordinate information of text to be output according to preservation The corresponding target text of text out;
Display module, for showing determining target text.
Further, the target gesture detection module, specifically for the video flowing acquired respectively according to two cameras In current frame image, determine the overlapping region in two current frame images;Detection is used in overlapping region with the presence or absence of preset The target gesture of writing;
The coordinate information determining module, when being specifically for the testing result in the target gesture detection module, According to the overlapping region, the first three-dimensional coordinate of the target gesture is determined.
Further, the display module is also used to after the first three-dimensional coordinate for determining the target gesture, according to The mapping relations of the writing display area of the overlapping region and display screen that pre-save, are mapped as institute for first three-dimensional coordinate The first two-dimensional coordinate for writing display area is stated, is shown according to first two-dimensional coordinate in the writing display area.
Further, described device further includes:
First judgment module, for determining the first three-dimensional seat of the target gesture in the coordinate information determining module After mark, according to first three-dimensional coordinate, judges whether current stroke is write and finish;
If the judging result of first judgment module be it is yes, trigger the text determining module.
Further, described device further includes:
When second judgment module for the testing result in the target gesture detection module is no, judgement is for current The previous frame image of frame image, if preserve the second three-dimensional coordinate of the target gesture;If the second judgment module is sentenced Disconnected result be it is yes, then trigger the text determining module.
Further, the text determining module, specifically for the corresponding each three-dimensional of text to be output according to preservation Coordinate determines corresponding first text of the text to be output;
First text is matched with the literal pool pre-saved, according to matching result, is determined described to be output The corresponding target text of text.
Further, the text determining module, specifically for by highest second text of matching degree be determined as it is described to The corresponding target text of output character;Or, showing the second text of preset quantity from high to low by matching degree;By user's selection Second text is determined as the corresponding target text of the text to be output.
Further, the text determining module, specifically for according to the determining corresponding every unicursal of text to be output, Determine corresponding first text of text to be output, wherein the corresponding every unicursal of text to be output is to determine that the stroke writes After, it is determined according to the corresponding each three-dimensional coordinate of the stroke.
Further, the text determining module is specifically used for according to first three-dimensional coordinate and is directed to present frame figure The first distance for the second three-dimensional coordinate that the previous frame image of picture saves, determines current writing speed;
Judge whether current writing speed is located within the scope of the stroke writing speed pre-saved;
If so, using first three-dimensional coordinate as the effective three-dimensional coordinate for determining stroke;
If not, using first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke;Judge that described second is three-dimensional Coordinate whether be determining stroke effective three-dimensional coordinate, if so, using second three-dimensional coordinate as the end of current stroke Three-dimensional coordinate determines that current stroke writing finishes.
Further, the text determining module is also used in having using first three-dimensional coordinate as determining stroke Imitate three-dimensional coordinate after, judge second three-dimensional coordinate whether be determining stroke effective three-dimensional coordinate;
If it is not, then using first three-dimensional coordinate as the beginning three-dimensional coordinate of current stroke.
Further, the text determining module is also used to after determining the corresponding every unicursal of text to be output, According to the determining corresponding every unicursal of text to be output, before determining corresponding first text of text to be output, for every Unicursal, determines whether the used time of the stroke is less than preset first duration threshold value;If so, the stroke is filtered out.
Further, described device further includes:
Removing module, for deleting text to be output corresponding each seat after the completion of the text determining module executes Mark information.
Further, the text determining module does not save if being also used to the previous frame image for current frame image There is the second three-dimensional coordinate of the target gesture, there is no the frames of the image of the target gesture to the overlapping region pre-saved Number is updated.
Further, described device further includes:
Voice broadcast module, for when identification meet text write termination condition when, by least one text of writing into Row voice broadcast.
Further, the voice broadcast module receives text specifically for identification and writes END instruction;Or it recognizes There is no the frame numbers of the image of the target gesture to be greater than preset quantity for the overlapping region pre-saved.
The embodiment of the invention discloses a kind of electronic equipment, including:Processor, communication interface, memory and communication bus, Wherein, processor, communication interface, memory complete mutual communication by communication bus;
It is stored with computer program in the memory, when described program is executed by the processor, so that the place Manage the step of device executes any of the above-described the method.
The embodiment of the invention discloses a kind of computer readable storage medium, it is stored with the meter that can be executed by electronic equipment Calculation machine program, when described program is run on the electronic equipment, so that the electronic equipment executes described in any of the above-described The step of method.
The invention discloses a kind of character recognition method, device, electronic equipment and storage medium, method includes:Root detection With the presence or absence of the preset target gesture for writing in current frame image in the video flowing of camera acquisition;If it is, It determines the coordinate information of the target gesture, and saves;According to the corresponding each coordinate information of the text to be output of preservation, determine The corresponding target text of the text to be output, and export.Since when user, which faces sky, to write, electronic equipment is according to determining user's book Each three-dimensional coordinate of target gesture when writing determines the text that user writes, realizes rapidly and accurately typing text.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Figure 1A is a kind of Text region process schematic provided in an embodiment of the present invention;
Figure 1B is a kind of Text region process schematic provided in an embodiment of the present invention;
Fig. 2 is a kind of strokes of characters determination process schematic diagram provided in an embodiment of the present invention;
Fig. 3 is a kind of character recognition device structure chart provided in an embodiment of the present invention;
Fig. 4 is a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of character recognition method, this method is applied to electronic equipment, this method include with Lower step:
It detects in the current frame image in the video flowing of camera acquisition with the presence or absence of the preset target hand for writing Gesture;If it is, determining the coordinate information of the target gesture, and save;
According to the corresponding each coordinate information of the text to be output of preservation, the corresponding target text of the text to be output is determined Word, and export.
Character recognition method provided in an embodiment of the present invention is applied to electronic equipment, which can be computer, hand Machine etc..Camera on electronic equipment can acquire image information in the form of video recording, and electronic equipment is being video according to video recording When stream information carries out Text region, every frame image according to acquisition can be, real-time perfoming Text region is also possible to first adopt The video flowing of collection saves, and carries out Text region to the video flowing of preservation.
In embodiments of the present invention, for user when facing empty write, first typing is used for the gesture write in the electronic device for meeting, The gesture can be palm, can be fist, can be finger, and the gesture for being used to write is known as target gesture.
Electronic equipment analyzes every frame image in video flowing, determines in every frame image with the presence or absence of the target hand Gesture, if there is the target gesture, it is determined that the corresponding coordinate information of target gesture, and corresponding seat is saved for each frame Mark information.
Electronic equipment can determine the text to be output according to the corresponding each coordinate information of text to be output of preservation Corresponding target text, and export.
Electronic equipment is after being aware of target gesture and what is, it is determined whether there are the process of target gesture belong to it is existing Technology, in embodiments of the present invention without repeating.
Since in embodiments of the present invention, user faces sky and writes, electronic equipment, which passes through, determines target gesture when user writes Coordinate information, determine that user faces the text of empty writing, realize and rapidly and accurately determine text.
Embodiment 1:
In order to make determining text more accurately, in the current frame image in the video flowing of the detection camera acquisition Include with the presence or absence of the preset target gesture for writing:
The current frame image in video flowing acquired respectively according to two cameras, determines the overlapping in two current frame images Region;It detects in overlapping region with the presence or absence of the preset target gesture for writing;
The coordinate information of the determination target gesture includes:
According to the overlapping region, the first three-dimensional coordinate of the target gesture is determined.
Character recognition method provided in an embodiment of the present invention is applied to electronic equipment, which takes the photograph including at least two As head, and there are there are overlapping regions in the picture frame of at least two cameras acquisition.
The embodiment of the present invention is that there are the video flowings of two cameras of overlapping region acquisition in the picture frame for acquisition Carry out Text region.
Two cameras for carrying out video flowing acquisition can be any position setting, as long as the acquisition of two cameras There are overlapping regions in region, and preferably, which forms binocular camera.Two cameras are in entire text Position in identification process will not be moved under normal circumstances, herein under the premise of, two cameras during Text region, The overlapping region of the image of any moment acquisition is generally identical.
Each camera continuous acquisition image, acquiring in each camera of synchronization has image, then two cameras Two field pictures are acquired, electronic equipment can analyze the two field pictures of synchronization, determine two frame figures of synchronization Overlapping region as in.
It will currently analyze, determine that the image of overlapping region is known as current frame image.
Determine that the process of overlapping region belongs to the prior art in two field pictures, in embodiments of the present invention without superfluous It states.
Electronic equipment can determine the weight of two current frame images when analyzing the current frame image that camera acquires Target gesture in folded region with the presence or absence of this for writing, if it does, it can be said that bright user is currently facing empty writing, If it is not, illustrating user currently without carrying out facing empty writing.
Electronic equipment detection overlapping region belongs to the prior art with the presence or absence of the process of target gesture, in the embodiment of the present invention In without repeating.
The text of electronic equipment output is known as target text, which can be understood as the text finally identified Word.
Under normal circumstances, when electronic equipment in detecting overlapping region there are when target gesture, then can be heavy according to this Folded region determines the three-dimensional coordinate of target gesture, and is directed to every frame image, saves the three-dimensional coordinate of target gesture.It will be according to working as The three-dimensional coordinate that the corresponding overlapping region of previous frame determines is known as the first three-dimensional coordinate.
A moment, the three-dimensional coordinate of target gesture is one, and target gesture may be palm, it may be possible to fist, it can It can be finger.Palm, fist, finger can generally occupy multiple coordinate points, can choose one of those, such as central point conduct First three-dimensional coordinate of the target gesture.
The process of the above-mentioned three-dimensional coordinate that target gesture is determined according to overlapping region belongs to the prior art, implements in the present invention Without repeating in example.
In embodiments of the present invention, under what conditions according to the corresponding each coordinate information of the text to be output of preservation, Determine that a kind of specific implementation method of the corresponding target text of the text to be output can be:
If there is no the preset target gesture for writing in overlapping region, judgement is upper for current frame image One frame image, if preserve the second three-dimensional coordinate of the target gesture;If it is, determining that currently to meet target text true Fixed condition determines the corresponding target of the text to be output that is, according to the corresponding each coordinate information of the text to be output of preservation Text.
If do not saved, analysis identification can be carried out using next frame image as current frame image.
If user does not have started writing or user has write some text at the time of upper picture frame corresponds to It is complete, and currently when not carrying out the writing of next text also, current frame image will not detect target hand in corresponding overlapping region Gesture, and target gesture will not be detected in the corresponding overlapping region of previous frame image of current frame image.
Target gesture, i.e. user are not present in determining the corresponding overlapping region of present frame currently without carrying out facing sky book After writing, user can be determined according to whether there is target gesture in the corresponding overlapping region of previous frame image of current frame image Whether a word is just write at the time of previous frame image corresponds to, if it is, thinking that meeting target text determines condition, need Determine target text.
When whether there is target gesture in the corresponding overlapping region of previous frame image for judging current frame image, it can be Judgement is directed to the previous frame image of current frame image, if the second three-dimensional coordinate for preserving the target gesture, by present frame figure The three-dimensional coordinate of the corresponding target gesture of the previous frame image of picture is known as the second three-dimensional coordinate.If preserving the second three-dimensional seat Mark, then can determine at the time of previous frame corresponds to, user just writes a word, then can determine the text.
It is pre-saved in electronic equipment and needs the corresponding each coordinate information of output character i.e. three-dimensional coordinate, it is current determining When meeting target text and determining condition, can according to the corresponding each three-dimensional coordinate of text to be output of preservation, determine it is described to The corresponding target text of output character.After determining target text, it can also be shown on the screen of the electronic device.
When user writes a text, the target gesture for writing can work as overlapping region always in overlapping region In be not present target gesture when, then it is assumed that user has write a text.Target gesture is not present in overlapping region, can be Hand is had left overlapping region to user or user has left overlapping region or user has changed a hand different from target gesture Gesture.The corresponding each three-dimensional coordinate of text to be output can be each three-dimensional coordinate determined in first time period, wherein the There is target gesture in the corresponding overlapping region of each frame image in one period, and each frame figure in first time period There is the picture frame adjacent with current frame image as in.
Assuming that being not present in the 3rd frame, the 5th frame-there are target gesture in the corresponding overlapping region of the 1st the-the 4 frame image of frame In the corresponding overlapping region of 10th frame there are target gestures, it has been determined that go out target gesture in the corresponding overlay region of each frame image Three-dimensional coordinate in domain.Present frame is the 11st frame, and target gesture is not present in the corresponding overlapping region of current frame image, then can be with According to each of determination in the 5th the-the 10 frame of frame, other three-dimensional coordinates determine text, and first time period is the 5th the-the 10 frame structure of frame At period.1st the-the 4 frame of frame is a word writing of user, because target gesture is not present in the 3rd frame, it has been determined that goes out the Text in 1 the-the 4 frame of frame, so without determining again.
In embodiments of the present invention, there are overlapping region in the pickup area of two cameras, electronic equipment can be preparatory Determine the corresponding space lattice in overlapping region.Electronic equipment can determine that the three-dimensional is sat after determining three-dimensional coordinate every time It is marked on corresponding pixel in space lattice, according to the corresponding each three-dimensional coordinate of text to be output, is determined described to be output When the corresponding target text of text, it can be the three-dimensional of each pixel in the dot matrix according to the overlapping region pre-saved and sit Mark, determines the corresponding each three-dimensional coordinate of text to be output corresponding target pixel points in dot matrix, according to determining each mesh Pixel is marked, determines the corresponding target text of the text to be output, that is, the text that each target pixel points are formed is true It is set to target text.The three-dimensional coordinate they target pixel points the corresponding three-dimensional coordinate in dot matrix and determined according to overlapping region It is identical.
Figure 1A is a kind of Text region process schematic provided in an embodiment of the present invention, which includes the following steps:
S101:According to the current frame image that two cameras acquire respectively, the overlapping region in two current frame images is determined.
S102:It detects with the presence or absence of the preset target gesture for writing in overlapping region, if it is, carrying out S103, if it is not, then carrying out S104.
S103:According to the overlapping region, the first three-dimensional coordinate of the target gesture is determined, and save.
S104:Judgement is directed to the previous frame image of current frame image, if preserve the target gesture second is three-dimensional Coordinate;If it is, S105 is carried out, if it is not, then carrying out analysis identification using next frame image as current frame image.
S105:According to the corresponding each three-dimensional coordinate of the text to be output of preservation, determine that the text to be output is corresponding Target text, and export.
Since in embodiments of the present invention, user faces sky and writes, electronic equipment, which passes through, determines target gesture when user writes Three-dimensional coordinate, determine that user faces the text of empty writing, realize and rapidly and accurately determine text.
Embodiment 2:
On the basis of the above embodiments, in embodiments of the present invention, in the first three-dimensional for determining the target gesture After coordinate, in the corresponding each coordinate information of text to be output according to preservation, the corresponding mesh of the text to be output is determined Before marking text, the method also includes:
According to first three-dimensional coordinate, judges whether current stroke is write and finish;
If it is, carrying out subsequent step.
In embodiments of the present invention, when user writes a text, the target gesture for writing can be overlapped always In region, user is typically write according to stroke in writing words, and user writes a stroke of some text Afterwards, in the next stroke for writing the text, target gesture will not leave overlapping region, then there are target gestures in overlapping region.
Electronic equipment after a three-dimensional coordinate of every determining target gesture, can according to the determining three-dimensional coordinate, It determines whether stroke writes completion, is completed if stroke is write, then it is assumed that meet target text and determines condition, it can be according to preservation The corresponding each coordinate information of text to be output, determine the corresponding target text of the text to be output.
By taking the first three-dimensional coordinate as an example, if detecting that there are target gestures in overlapping region, according to the first three-dimensional seat Mark, determines whether current stroke writes completion, if it is, determining that currently meeting target text determines condition;If it is not, then really It is unsatisfactory for target text before settled and determines condition.
Figure 1B is a kind of Text region process schematic provided in an embodiment of the present invention, which includes the following steps:
S106:According to the current frame image that two cameras acquire respectively, the overlapping region in two current frame images is determined.
S107:It detects with the presence or absence of the preset target gesture for writing in overlapping region, if it is, carrying out S108。
S108:According to the overlapping region, the first three-dimensional coordinate of the target gesture is determined, and save.
S109:According to the corresponding each three-dimensional coordinate of the text to be output of preservation, determine that the text to be output is corresponding Target text, and export.
Embodiment 3:
The writing situation that oneself is checked in order to facilitate user, on the basis of the various embodiments described above, in the embodiment of the present invention In, after the first three-dimensional coordinate for determining the target gesture, the method also includes:
It is three-dimensional by described first according to the mapping relations of the writing display area of the overlapping region and display screen pre-saved Coordinate is mapped as first two-dimensional coordinate for writing display area, according to first two-dimensional coordinate in the writing viewing area Domain is shown.
In embodiments of the present invention, there is writing display area in the display screen of electronic equipment, which can be with Show the writing situation of user, the mapping that the writing display area of overlapping region and display screen is pre-saved in electronic equipment is closed Three-dimensional coordinate, can be mapped to two-dimensional coordinate according to the mapping relations, that is, after determining the first three-dimensional coordinate by system, can First three-dimensional coordinate according to the mapping relations, to be mapped as to writing the first two-dimensional coordinate of display area, and then according to the One two-dimensional coordinate is shown in writing display area, specifically be can be and is shown first two-dimensional coordinate pair in writing display area The pixel answered.
It under normal circumstances, can be in two after writing display area and showing the corresponding each three-dimensional coordinate mapping of text to be output Tie up the corresponding pixel of coordinate.The then pixel that user can show according to display area is write, checks the writing situation of oneself, It corrects a mistake promptly, improves and write accuracy.
Embodiment 4:
In order to keep the target text of output more accurate, on the basis of the various embodiments described above, in embodiments of the present invention, According to the corresponding each three-dimensional coordinate of the text to be output of preservation, determine that the corresponding target text of the text to be output includes:
According to the corresponding each three-dimensional coordinate of the text to be output of preservation, corresponding first text of the text to be output is determined Word;
First text is matched with the literal pool pre-saved, according to matching result, is determined described to be output The corresponding target text of text.
In embodiments of the present invention, literal pool has been pre-saved in electronic equipment, has determined each of text to be output Coordinate information that is, after three-dimensional coordinate, can determine corresponding first text of text to be output, specifically according to each three-dimensional coordinate Process is similar with the process in above-described embodiment, is no longer repeated herein.
After determining the first text, which can be matched with the text in literal pool, according to matching As a result, determining the corresponding target text of text to be output, matching result be can be without matched text, then can not export target text Word, it is also possible to which matched text has multiple.
It can be when according to matching result, determining the corresponding target text of the text to be output matching degree is highest Second text is determined as the corresponding target text of the text to be output;It is also possible to show present count from high to low by matching degree Second text of amount;The second text that user selects is determined as the corresponding target text of the text to be output.
First text is matched with literal pool, determines of the second text and the first text determined in literal pool Process with degree height belongs to the prior art, in embodiments of the present invention without repeating.
A kind of specific embodiment:There is no the preset target gestures for writing in overlapping region, and are directed to and work as The previous frame image of prior image frame preserves the second three-dimensional coordinate of the target gesture, it is determined that meets target text and determines Condition, the corresponding each three-dimensional coordinate of the subsequent text to be output according to preservation, determines the text to be output corresponding first Text;First text is matched with the literal pool pre-saved, highest second text of matching degree is determined as institute The corresponding target text of text to be output is stated, or shows the second text of preset quantity from high to low by matching degree;By user Second text of selection is determined as the corresponding target text of the text to be output.
Another specific embodiment:There are the preset target gestures for writing in overlapping region, and according to institute The first three-dimensional coordinate is stated, determines that current stroke writing finishes, it is determined that meet target text and determines condition, it is subsequent according to preservation The corresponding each three-dimensional coordinate of text to be output determines corresponding first text of the text to be output, that is, according to defeated The corresponding every unicursal of text out determines corresponding first text of the text to be output;By first text and preparatory guarantor The literal pool deposited is matched, and shows the second text of preset quantity from high to low by matching degree;By the second text of user's selection Word is determined as the corresponding target text of the text to be output.
Due in embodiments of the present invention, the first text being matched with the second text in literal pool, determines mesh Text is marked, realizes and more accurately determines text.
Embodiment 5:
User is typically write according to fixed stroke in writing words, in the base of the various embodiments described above On plinth, in embodiments of the present invention, according to the corresponding each three-dimensional coordinate of the text to be output of preservation, the text to be output is determined Corresponding first text of word includes:
According to the determining corresponding every unicursal of text to be output, corresponding first text of text to be output is determined, wherein The corresponding every unicursal of text to be output is to determine the stroke after finishing writing, according to the corresponding each three-dimensional coordinate of the stroke Determining.
In embodiments of the present invention, it when determining the first text, can be according to the corresponding each three-dimensional of text to be output Coordinate determines the corresponding every unicursal of text to be output, subsequent to determine text pair to be output according to determining every unicursal The first text answered.
Whether electronic equipment can determine stroke in the three-dimensional coordinate for determining the corresponding target gesture of every frame image every time It writes and completes, if it is determined that after the completion of stroke is write, be determined the process of stroke, be also possible to determining that user write After a complete text, i.e., the second three-dimensional seat of the target gesture is preserved in the determining previous frame image for current frame image After mark, it is determined the process of stroke.It can also be that any moment before determining text determines stroke.
In embodiments of the present invention, after determining each three-dimensional coordinate, it can determine whether stroke writes completion, with For determining the first three-dimensional coordinate, be illustrated, as shown in Fig. 2, according to the first three-dimensional coordinate, determine current stroke whether book Complete process is write to include the following steps:
S201:According to the first distance of first three-dimensional coordinate and the second three-dimensional coordinate saved, current write is determined Speed.
Wherein, the second three-dimensional coordinate is the three-dimensional coordinate saved for the previous frame image of current frame image.
S202:Judge whether current writing speed is located within the scope of the stroke writing speed pre-saved;If it is, into Row S203, if it is not, then carrying out S207.
S203:Using first three-dimensional coordinate as the effective three-dimensional coordinate for determining stroke.
S207:Using first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke;And judge that described second is three-dimensional Whether coordinate is effective three-dimensional coordinate of determining stroke, if it is, carrying out S208.
S208:Using second three-dimensional coordinate as the end three-dimensional coordinate of current stroke, determine that current stroke has been write Finish.
It is possible to further the corresponding each effective three-dimensional coordinate of the current stroke according to preservation, text to be output is determined Corresponding current stroke.
In embodiments of the present invention, for general user in writing words, the writing speed for having oneself conventional is writing a certain pen When picture, usually at the uniform velocity.
Electronic equipment after the three-dimensional coordinate for determining target gesture every time, can according to this time determine three-dimensional coordinate with The three-dimensional coordinate that last time determines compares, it is determined whether has completed the writing of unicursal.
Firstly, by taking current frame image as an example, electronic equipment can be according to corresponding first three-dimensional coordinate of present frame and current Corresponding second three-dimensional coordinate of the previous frame of frame, determines current writing speed, the specific can be that, determine the first three-dimensional coordinate with The first distance of second three-dimensional coordinate is determined currently to write speed according to the time interval of first distance and adjacent two picture frame Degree.
The velocity interval of stroke writing can be pre-saved in electronic equipment, which can be user in electronics It is arranged in equipment, is also possible to what electronic equipment was determined according to the painting and calligraphy writing speed in preset time period.
After determining current writing speed, it can be determined that whether current writing speed, which is located at the stroke pre-saved, is write In velocity interval, if it is, thinking that the writing of user is that normal stroke is write, then using the first three-dimensional coordinate as determining pen The effective three-dimensional coordinate drawn is write in range if being not located at stroke, it is determined that the improper stroke of the writing of user is write, then Using the first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke.
If the first three-dimensional coordinate be determine stroke effective three-dimensional coordinate, can also according to the second three-dimensional coordinate whether be Effective three-dimensional coordinate determines effect of first three-dimensional coordinate in stroke, specifically, using first three-dimensional coordinate as really After the effective three-dimensional coordinate for determining stroke, as shown in Fig. 2, the method also includes following steps:
S204:Judge second three-dimensional coordinate whether be determining stroke effective three-dimensional coordinate;If it is, carrying out S205, if it is not, then carrying out S206.
S206:Using first three-dimensional coordinate as the beginning three-dimensional coordinate of current stroke.
S205:Using first three-dimensional coordinate as the intermediate three-dimensional coordinate of current stroke.
It whether can also be to have according to two-dimensional coordinate if the first three-dimensional coordinate is the invalid three-dimensional coordinate for determining stroke Effect three-dimensional coordinate determines whether the stroke writes, specifically, judging whether second three-dimensional coordinate is the effective of determining stroke Three-dimensional coordinate is sat if it is, determining that the stroke writes using second three-dimensional coordinate as the end three-dimensional of current stroke Mark, if the second three-dimensional coordinate is the invalid three-dimensional coordinate for determining stroke, then it is assumed that current writing is not the normal pen of text It draws.
Using the second three-dimensional coordinate as the end three-dimensional coordinate of current stroke after, so that it may according to the current pen of preservation Corresponding each effective three-dimensional coordinate is drawn, determines the corresponding current stroke of text to be output.
The corresponding each effectively three-dimensional coordinate of current stroke includes the beginning three-dimensional coordinate of current stroke, terminates three-dimensional coordinate And intermediate three-dimensional coordinate.Start the corresponding three-dimensional coordinate of starting point that three-dimensional coordinate is stroke, terminates the end that three-dimensional coordinate is stroke The corresponding unit coordinate of point, start three-dimensional coordinate fix time and terminate really three-dimensional coordinate fix time really between period it is true Fixed is the intermediate three-dimensional coordinate of stroke, either starting point, and terminal or the corresponding point of intermediate three-dimensional coordinate, are all in dot matrix Pixel.
Above-mentioned every unicursal represents the motion profile of target gesture, and the starting point of stroke is the starting point of motion profile, pen The end point of picture is the end point of motion profile.
Embodiment 6:
When facing sky and writing, each movement of target gesture can be recorded user, will lead to be not belonging in this way The stroke of text can also can be regarded as a part of text, in order to improve the accuracy of determining text, in the base of the various embodiments described above On plinth, in embodiments of the present invention, after determining the corresponding every unicursal of text to be output, according to determining to be output The corresponding every unicursal of text, before determining corresponding first text of text to be output, the method also includes:
For every unicursal, determine whether the used time of the stroke is less than preset first duration;
If it is, the stroke is filtered out.
In embodiments of the present invention, the first duration has been pre-saved in electronic equipment, every unicursal in normal words exists When writing, the used time be it is longer, when there is the stroke for being not belonging to text, it is believed that the writing duration is shorter, in order to more accurate Ground determines text, useless stroke can be filtered out, and specifically can be for every unicursal, when determine the stroke used time whether When less than preset first duration, which is filtered out, the first text is determined according to remaining stroke.
The process for determining the used time of stroke includes:The frame number for determining the corresponding picture frame of the stroke, according to the frame number and phase The time interval of adjacent two field pictures determines the used time of the stroke.
Embodiment 7:
In order to keep determining text more accurate, and for electronic equipment memory space is saved, in the various embodiments described above On the basis of, in embodiments of the present invention, in the corresponding each coordinate information of text to be output according to preservation, determine described to defeated Out after the corresponding target text of text, the method also includes:
Delete the corresponding each coordinate information of text to be output.
Electronic equipment, can be by the corresponding coordinate information of the text, such as three-dimensional coordinate after determining a text every time Delete, in this way when determining next text, can understand accurately know which the corresponding three-dimensional coordinate of next text has, i.e., to The corresponding each three-dimensional coordinate of output character can be the whole three-dimensional coordinates currently saved in electronic equipment, improves and determines text The accuracy of word.On the other hand, memory space also is saved for electronic equipment.
Embodiment 8:
On the basis of the various embodiments described above, in embodiments of the present invention, if being directed to the previous frame figure of current frame image Picture does not preserve the second three-dimensional coordinate of the target gesture, the method also includes:
To the overlapping region pre-saved, there is no the frame numbers of the image of the target gesture to be updated.
When target gesture is not present in electronic equipment in determining the corresponding overlapping region of a certain frame, record overlapping can be There is no the frame numbers of the image of target gesture in region, if target hand is not present in the corresponding overlapping region of the previous frame of present frame Gesture can then be updated the frame number of preservation, under normal circumstances to add 1.
Embodiment 9:
User is generally not only to write a text when face empty write, but multiple words, and electronic equipment can be with Whether identification user writes completion, on the basis of the various embodiments described above, in embodiments of the present invention, the method also includes:
When identification, which meets text, writes termination condition, at least one text of writing is subjected to voice broadcast.
In embodiments of the present invention, text is pre-saved in electronic equipment and writes the condition terminated, when identification meets text When word writes termination condition, the text write can be shown for user, in order to further increase user experience, electronic equipment may be used also It is broadcasted with the text for writing user.
Electronic equipment can be when identifying whether that meeting text writes termination condition and identify whether to receive text writing END instruction;Termination condition is write if it is, determining and meeting text.
Text, which writes END instruction, can be end operation or electronic equipment reception of the user on electronic equipment screen The END instruction sent to other equipment.
Electronic equipment can also be when identifying whether to meet text and writing termination condition and detect in overlapping region and not deposit Whether it is more than preset second duration in the preset target gesture for writing, writes knot if it is, determining and meeting text Beam condition.It specifically can be, the frame number for recognizing the image that the target gesture is not present in the overlapping region pre-saved is greater than Preset quantity, then it is assumed that meet text and write termination condition.The quantity is generally higher than 2, can be 5, can be 10.
Embodiment 10:
Fig. 3 is a kind of character recognition device structure chart provided in an embodiment of the present invention, is applied to include at least two camera shootings The character recognition device of head, described device include:
Target gesture detection module 31 whether there is for detecting in the current frame image in the video flowing that camera acquires The preset target gesture for writing;
Coordinate information determining module 32 is when being for the testing result in the target gesture detection module, it is determined that The coordinate information of the target gesture, and save;
Text determining module 33, for the corresponding each coordinate information of text to be output according to preservation, determine it is described to The corresponding target text of output character;
Display module 34, for showing determining target text.
Further, the target gesture detection module 31, specifically for the video acquired respectively according to two cameras Current frame image in stream determines the overlapping region in two current frame images;It detects and whether there is preset use in overlapping region In the target gesture of writing;
The coordinate information determining module 32 is yes specifically for the testing result in the target gesture detection module When, according to the overlapping region, determine the first three-dimensional coordinate of the target gesture.
Further, the display module 34 is also used to after the first three-dimensional coordinate for determining the target gesture, root According to the mapping relations of the writing display area of the overlapping region and display screen pre-saved, first three-dimensional coordinate is mapped as First two-dimensional coordinate for writing display area, is shown according to first two-dimensional coordinate in the writing display area Show.
Further, described device further includes:
First judgment module 35, for determining the 1st of the target gesture the in the coordinate information determining module 32 After tieing up coordinate, according to first three-dimensional coordinate, judges whether current stroke is write and finish;
If the judging result of first judgment module 35 be it is yes, trigger the text determining module 33.
Further, described device further includes:
Second judgment module 36, for the testing result in the target gesture detection module 31 be it is no when, judgement is directed to The previous frame image of current frame image, if preserve the second three-dimensional coordinate of the target gesture;If the second judgment module 36 judging result be it is yes, then trigger the text determining module 33.
Further, the text determining module 33, specifically for the text to be output corresponding each three according to preservation Coordinate is tieed up, determines corresponding first text of the text to be output;
The candidate character is matched with the literal pool pre-saved, according to matching result, is determined described to be output The corresponding target text of text.
Further, the text determining module 33, it is described specifically for highest second text of matching degree to be determined as The corresponding target text of text to be output;Or, showing the second text of preset quantity from high to low by matching degree;User is selected The second text be determined as the corresponding target text of the text to be output.
Further, the text determining module 33, specifically for according to the determining corresponding each pen of text to be output It draws, determines corresponding first text of text to be output, wherein the corresponding every unicursal of text to be output is to determine the stroke book After writing, determined according to the corresponding each three-dimensional coordinate of the stroke.
Further, the text determining module 33 is specifically used for according to first three-dimensional coordinate and is directed to present frame The first distance for the second three-dimensional coordinate that the previous frame image of image saves, determines current writing speed;
Judge whether current writing speed is located within the scope of the stroke writing speed pre-saved;
If so, using first three-dimensional coordinate as the effective three-dimensional coordinate for determining stroke;
If not, using first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke;Judge that described second is three-dimensional Coordinate whether be determining stroke effective three-dimensional coordinate, if so, using second three-dimensional coordinate as the end of current stroke Three-dimensional coordinate determines that current stroke writing finishes.
Further, the text determining module 33 is also used to using first three-dimensional coordinate as determining stroke After effective three-dimensional coordinate, judge second three-dimensional coordinate whether be determining stroke effective three-dimensional coordinate;
If it is not, then using first three-dimensional coordinate as the beginning three-dimensional coordinate of current stroke.
Further, the text determining module 33, be also used to determine the corresponding every unicursal of text to be output it Afterwards, according to the determining corresponding every unicursal of text to be output, before determining corresponding first text of text to be output, for Every unicursal, determines whether the used time of the stroke is less than preset first duration threshold value;If so, the stroke is filtered out.
Further, described device further includes:
Removing module 37, it is corresponding every for after the completion of the text determines 33 pieces of execution of mould, deleting text to be output A coordinate information.
Further, the text determining module 33 is not protected if being also used to the previous frame image for current frame image There is the second three-dimensional coordinate of the target gesture, there is no the images of the target gesture to the overlapping region pre-saved Frame number is updated.
Further, described device further includes:
Voice broadcast module 38, for when identification meet text write termination condition when, by least one text of writing Carry out voice broadcast.
Further, the voice broadcast module 38 receives text specifically for identification and writes END instruction;Or identification To the overlapping region pre-saved, there is no the frame numbers of the image of the target gesture to be greater than preset quantity.
Embodiment 11:
Fig. 4 is a kind of electronic equipment provided in an embodiment of the present invention, including:Processor 41, communication interface 42, memory 43 With communication bus 44, wherein processor 41, communication interface 42, memory 43 complete mutual communication by communication bus 44;
It is stored with computer program in the memory, when described program is executed by the processor, so that the place It manages device and executes following steps:
It detects in the current frame image in the video flowing of camera acquisition with the presence or absence of the preset target hand for writing Gesture;If it is, determining the coordinate information of the target gesture, and save;
According to the corresponding each coordinate information of the text to be output of preservation, the corresponding target text of the text to be output is determined Word, and export.
Further, it is used in the current frame image in the video flowing of the detection camera acquisition with the presence or absence of preset The target gesture of writing includes:
The current frame image in video flowing acquired respectively according to two cameras, determines the overlapping in two current frame images Region;It detects in overlapping region with the presence or absence of the preset target gesture for writing;
The coordinate information of the determination target gesture includes:
According to the overlapping region, the first three-dimensional coordinate of the target gesture is determined.
Further, after the first three-dimensional coordinate for determining the target gesture, according to the overlapping region pre-saved With the mapping relations of the writing display area of display screen, first three-dimensional coordinate is mapped as described to write the of display area One two-dimensional coordinate is shown according to first two-dimensional coordinate in the writing display area.
Further, after the first three-dimensional coordinate for determining the target gesture, in the text to be output according to preservation The corresponding each coordinate information of word, before determining the corresponding target text of the text to be output, the method also includes:
According to first three-dimensional coordinate, judges whether current stroke is write and finish;
If it is, carrying out subsequent step.
Further, if there is no the preset target gesture for writing in overlapping region, according to preservation to The corresponding each coordinate information of output character, before determining the corresponding target text of the text to be output, the method is also wrapped It includes:
Judgement is directed to the previous frame image of current frame image, if preserves the second three-dimensional coordinate of the target gesture; If it is, carrying out subsequent step.
Further, the corresponding each three-dimensional coordinate of the text to be output according to preservation, determines the text to be output The corresponding target text of word includes:
According to the corresponding each three-dimensional coordinate of the text to be output of preservation, corresponding first text of the text to be output is determined Word;
First text is matched with the literal pool pre-saved, according to matching result, is determined described to be output The corresponding target text of text.
Further, described according to matching result, determine that the corresponding target text of the text to be output includes:
Highest second text of matching degree is determined as the corresponding target text of the text to be output;Or,
Show the second text of preset quantity from high to low by matching degree;The second text that user selects is determined as described The corresponding target text of text to be output.
Further, the corresponding each three-dimensional coordinate of the text to be output according to preservation, determines the text to be output Corresponding first text of word includes:
According to the determining corresponding every unicursal of text to be output, corresponding first text of text to be output is determined, wherein The corresponding every unicursal of text to be output is to determine the stroke after finishing writing, according to the corresponding each three-dimensional coordinate of the stroke Determining.
Further, according to the first three-dimensional coordinate, determine whether current stroke writes the process finished and include:
According to first three-dimensional coordinate and the second three-dimensional coordinate of the previous frame image preservation for current frame image First distance determines current writing speed;
Judge whether current writing speed is located within the scope of the stroke writing speed pre-saved;
If so, using first three-dimensional coordinate as the effective three-dimensional coordinate for determining stroke;
If not, using first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke;Judge that described second is three-dimensional Coordinate whether be determining stroke effective three-dimensional coordinate, if so, using second three-dimensional coordinate as the end of current stroke Three-dimensional coordinate determines that current stroke writing finishes.
Further, using first three-dimensional coordinate as determine stroke effective three-dimensional coordinate after, described in judgement Second three-dimensional coordinate whether be determining stroke effective three-dimensional coordinate;
If it is not, then using first three-dimensional coordinate as the beginning three-dimensional coordinate of current stroke.
Further, after determining the corresponding every unicursal of text to be output, according to determining text to be output Corresponding every unicursal, for every unicursal, determines the used time of the stroke before determining corresponding first text of text to be output Whether preset first duration threshold value is less than;
If so, the stroke is filtered out.
Further, in the corresponding each coordinate information of text to be output according to preservation, the text to be output is determined After corresponding target text, the corresponding each coordinate information of text to be output is deleted.
Further, if being directed to the previous frame image of current frame image, the two or three of the target gesture is not preserved Coordinate is tieed up, there is no the frame numbers of the image of the target gesture to be updated to the overlapping region pre-saved.
Further, when identification, which meets text, writes termination condition, at least one text of writing is subjected to voice and is broadcast Report.
Further, identify that meeting text writing termination condition includes:
Identification receives text and writes END instruction;Or
The frame number for recognizing the image that the target gesture is not present in the overlapping region pre-saved is greater than preset quantity.
The communication bus that electronic equipment in the various embodiments described above is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..It is total that the communication bus can be divided into address bus, data Line, control bus etc..Only to be indicated with a thick line in figure, it is not intended that an only bus or a type convenient for indicating The bus of type.
Communication interface, for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit, network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), dedicated collection At circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hard Part component etc..
Embodiment 10:
The embodiment of the invention provides a kind of computer readable storage medium, it is stored with the meter that can be executed by electronic equipment Calculation machine program, when described program is run on the electronic equipment, so that the electronic equipment executes following steps:
It detects in the current frame image in the video flowing of camera acquisition with the presence or absence of the preset target hand for writing Gesture;If it is, determining the coordinate information of the target gesture, and save;
According to the corresponding each coordinate information of the text to be output of preservation, the corresponding target text of the text to be output is determined Word, and export.
Further, it is used in the current frame image in the video flowing of the detection camera acquisition with the presence or absence of preset The target gesture of writing includes:
The current frame image in video flowing acquired respectively according to two cameras, determines the overlapping in two current frame images Region;It detects in overlapping region with the presence or absence of the preset target gesture for writing;
The coordinate information of the determination target gesture includes:
According to the overlapping region, the first three-dimensional coordinate of the target gesture is determined.
Further, after the first three-dimensional coordinate for determining the target gesture, according to the overlapping region pre-saved With the mapping relations of the writing display area of display screen, first three-dimensional coordinate is mapped as described to write the of display area One two-dimensional coordinate is shown according to first two-dimensional coordinate in the writing display area.
Further, after the first three-dimensional coordinate for determining the target gesture, in the text to be output according to preservation The corresponding each coordinate information of word, before determining the corresponding target text of the text to be output, the method also includes:
According to first three-dimensional coordinate, judges whether current stroke is write and finish;
If it is, carrying out subsequent step.
Further, if there is no the preset target gesture for writing in overlapping region, according to preservation to The corresponding each coordinate information of output character, before determining the corresponding target text of the text to be output, the method is also wrapped It includes:
Judgement is directed to the previous frame image of current frame image, if preserves the second three-dimensional coordinate of the target gesture; If it is, carrying out subsequent step.
Further, the corresponding each three-dimensional coordinate of the text to be output according to preservation, determines the text to be output The corresponding target text of word includes:
According to the corresponding each three-dimensional coordinate of the text to be output of preservation, corresponding first text of the text to be output is determined Word;
First text is matched with the literal pool pre-saved, according to matching result, is determined described to be output The corresponding target text of text.
Further, described according to matching result, determine that the corresponding target text of the text to be output includes:
Highest second text of matching degree is determined as the corresponding target text of the text to be output;Or,
Show the second text of preset quantity from high to low by matching degree;The second text that user selects is determined as described The corresponding target text of text to be output.
Further, the corresponding each three-dimensional coordinate of the text to be output according to preservation, determines the text to be output Corresponding first text of word includes:
According to the determining corresponding every unicursal of text to be output, corresponding first text of text to be output is determined, wherein The corresponding every unicursal of text to be output is to determine the stroke after finishing writing, according to the corresponding each three-dimensional coordinate of the stroke Determining.
Further, according to the first three-dimensional coordinate, determine whether current stroke writes the process finished and include:
According to first three-dimensional coordinate and the second three-dimensional coordinate of the previous frame image preservation for current frame image First distance determines current writing speed;
Judge whether current writing speed is located within the scope of the stroke writing speed pre-saved;
If so, using first three-dimensional coordinate as the effective three-dimensional coordinate for determining stroke;
If not, using first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke;Judge that described second is three-dimensional Coordinate whether be determining stroke effective three-dimensional coordinate, if so, using second three-dimensional coordinate as the end of current stroke Three-dimensional coordinate determines that current stroke writing finishes.
Further, using first three-dimensional coordinate as determine stroke effective three-dimensional coordinate after, described in judgement Second three-dimensional coordinate whether be determining stroke effective three-dimensional coordinate;
If it is not, then using first three-dimensional coordinate as the beginning three-dimensional coordinate of current stroke.
Further, after determining the corresponding every unicursal of text to be output, according to determining text to be output Corresponding every unicursal, for every unicursal, determines the used time of the stroke before determining corresponding first text of text to be output Whether preset first duration threshold value is less than;
If so, the stroke is filtered out.
Further, in the corresponding each coordinate information of text to be output according to preservation, the text to be output is determined After corresponding target text, the corresponding each coordinate information of text to be output is deleted.
Further, if being directed to the previous frame image of current frame image, the two or three of the target gesture is not preserved Coordinate is tieed up, there is no the frame numbers of the image of the target gesture to be updated to the overlapping region pre-saved.
Further, when identification, which meets text, writes termination condition, at least one text of writing is subjected to voice and is broadcast Report.
Further, identify that meeting text writing termination condition includes:
Identification receives text and writes END instruction;Or
The frame number for recognizing the image that the target gesture is not present in the overlapping region pre-saved is greater than preset quantity.
Computer readable storage medium in above-described embodiment can be times that the processor in electronic equipment can access What usable medium or data storage device, including but not limited to magnetic storage such as floppy disk, hard disk, tape, magneto-optic disk (MO) etc., Optical memory such as CD, DVD, BD, HVD etc. and semiconductor memory such as ROM, EPROM, EEPROM, nonvolatile memory (NAND FLASH), solid state hard disk (SSD) etc..
The invention discloses a kind of character recognition method, device, electronic equipment and storage medium, method includes:Root detection With the presence or absence of the preset target gesture for writing in current frame image in the video flowing of camera acquisition;If it is, It determines the coordinate information of the target gesture, and saves;According to the corresponding each coordinate information of the text to be output of preservation, determine The corresponding target text of the text to be output, and export.Since when user, which faces sky, to write, electronic equipment is according to determining user's book Each three-dimensional coordinate of target gesture when writing determines the text that user writes, realizes rapidly and accurately typing text.
For systems/devices embodiment, since it is substantially similar to the method embodiment, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or an operation are distinguished with another entity or another operation, without necessarily requiring or implying these entities Or there are any actual relationship or orders between operation.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, the reality of complete hardware embodiment, complete Application Example or connected applications and hardware aspect can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications can be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies Within, then the application is also intended to include these modifications and variations.

Claims (32)

1. a kind of character recognition method, which is characterized in that it is applied to electronic equipment, the method includes:
It detects in the current frame image in the video flowing of camera acquisition with the presence or absence of the preset target gesture for writing;Such as Fruit is, it is determined that the coordinate information of the target gesture, and save;
According to the corresponding each coordinate information of the text to be output of preservation, the corresponding target text of the text to be output is determined, And it exports.
2. the method as described in claim 1, which is characterized in that the present frame figure in the video flowing of the detection camera acquisition Include with the presence or absence of the preset target gesture for writing as in:
The current frame image in video flowing acquired respectively according to two cameras, determines the overlay region in two current frame images Domain;It detects in overlapping region with the presence or absence of the preset target gesture for writing;
The coordinate information of the determination target gesture includes:
According to the overlapping region, the first three-dimensional coordinate of the target gesture is determined.
3. method according to claim 2, which is characterized in that after the first three-dimensional coordinate for determining the target gesture, The method also includes:
According to the mapping relations of the writing display area of the overlapping region and display screen pre-saved, by first three-dimensional coordinate Be mapped as it is described write display area the first two-dimensional coordinate, according to first two-dimensional coordinate the writing display area into Row display.
4. method according to claim 2, which is characterized in that the first three-dimensional coordinate for determining the target gesture it Afterwards, in the corresponding each coordinate information of text to be output according to preservation, the corresponding target text of the text to be output is determined Before, the method also includes:
According to first three-dimensional coordinate, judges whether current stroke is write and finish;
If it is, carrying out subsequent step.
5. method according to claim 2, which is characterized in that if there is no the preset mesh for writing in overlapping region It marks gesture and determines the corresponding target of the text to be output in the corresponding each coordinate information of text to be output according to preservation Before text, the method also includes:
Judgement is directed to the previous frame image of current frame image, if preserves the second three-dimensional coordinate of the target gesture;If It is then to carry out subsequent step.
6. method as described in claim 4 or 5, which is characterized in that according to the corresponding each three-dimensional of the text to be output of preservation Coordinate determines that the corresponding target text of the text to be output includes:
According to the corresponding each three-dimensional coordinate of the text to be output of preservation, corresponding first text of the text to be output is determined;
First text is matched with the literal pool pre-saved, according to matching result, determines the text to be output Corresponding target text.
7. method as claimed in claim 6, which is characterized in that it is described according to matching result, determine the text pair to be output The target text answered includes:
Highest second text of matching degree is determined as the corresponding target text of the text to be output;Or,
Show the second text of preset quantity from high to low by matching degree;The second text that user selects is determined as described to defeated The corresponding target text of text out.
8. method as claimed in claim 6, which is characterized in that the corresponding each three-dimensional of the text to be output according to preservation Coordinate determines that corresponding first text of the text to be output includes:
According to the determining corresponding every unicursal of text to be output, corresponding first text of text to be output is determined, wherein to defeated The corresponding every unicursal of text is to determine the stroke after finishing writing out, is determined according to the corresponding each three-dimensional coordinate of the stroke 's.
9. the method as described in claim 4 or 8, which is characterized in that according to the first three-dimensional coordinate, determine current stroke whether book Writing complete process includes:
According to the first of the second three-dimensional coordinate that first three-dimensional coordinate is saved with the previous frame image for current frame image Distance determines current writing speed;
Judge whether current writing speed is located within the scope of the stroke writing speed pre-saved;
If so, using first three-dimensional coordinate as the effective three-dimensional coordinate for determining stroke;
If not, using first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke;Judge second three-dimensional coordinate Whether be determining stroke effective three-dimensional coordinate, if so, second three-dimensional coordinate is three-dimensional as the end of current stroke Coordinate determines that current stroke writing finishes.
10. method as claimed in claim 9, which is characterized in that in having using first three-dimensional coordinate as determining stroke After imitating three-dimensional coordinate, the method also includes:
Judge second three-dimensional coordinate whether be determining stroke effective three-dimensional coordinate;
If it is not, then using first three-dimensional coordinate as the beginning three-dimensional coordinate of current stroke.
11. method according to claim 8, which is characterized in that after determining the corresponding every unicursal of text to be output, According to the determining corresponding every unicursal of text to be output, before determining corresponding first text of text to be output, the side Method further includes:
For every unicursal, determine whether the used time of the stroke is less than preset first duration threshold value;
If so, the stroke is filtered out.
12. the method as described in claim 1, which is characterized in that in the corresponding each coordinate of text to be output according to preservation Information, after determining the corresponding target text of the text to be output, the method also includes:
Delete the corresponding each coordinate information of text to be output.
13. method as claimed in claim 5, which is characterized in that if being directed to the previous frame image of current frame image, do not save There is the second three-dimensional coordinate of the target gesture, the method also includes:
To the overlapping region pre-saved, there is no the frame numbers of the image of the target gesture to be updated.
14. method as claimed in claim 13, which is characterized in that the method also includes:
When identification, which meets text, writes termination condition, at least one text of writing is subjected to voice broadcast.
15. method as claimed in claim 14, which is characterized in that identification meets text writing termination condition and includes:
Identification receives text and writes END instruction;Or
The frame number for recognizing the image that the target gesture is not present in the overlapping region pre-saved is greater than preset quantity.
16. a kind of character recognition device, which is characterized in that described device includes:
Target gesture detection module, for detecting in the current frame image in the video flowing that camera acquires with the presence or absence of preset Target gesture for writing;
Coordinate information determining module is when being for the testing result in the target gesture detection module, it is determined that the mesh The coordinate information of gesture is marked, and is saved;
Text determining module determines the text to be output for the corresponding each coordinate information of text to be output according to preservation The corresponding target text of word;
Display module, for showing determining target text.
17. device as claimed in claim 16, which is characterized in that the target gesture detection module is specifically used for according to two The current frame image in video flowing that a camera acquires respectively, determines the overlapping region in two current frame images;Detection overlapping With the presence or absence of the preset target gesture for writing in region;
The coordinate information determining module, when being specifically for the testing result in the target gesture detection module, according to The overlapping region determines the first three-dimensional coordinate of the target gesture.
18. device as claimed in claim 16, which is characterized in that the display module is also used to determining the target hand After first three-dimensional coordinate of gesture, according to the overlapping region and display screen pre-saved writing display area mapping relations, First three-dimensional coordinate is mapped as first two-dimensional coordinate for writing display area, is existed according to first two-dimensional coordinate The writing display area is shown.
19. device as claimed in claim 17, which is characterized in that described device further includes:
First judgment module, for determined in the coordinate information determining module target gesture the first three-dimensional coordinate it Afterwards, according to first three-dimensional coordinate, judge whether current stroke is write and finish;
If the judging result of first judgment module be it is yes, trigger the text determining module.
20. device as claimed in claim 17, which is characterized in that described device further includes:
Second judgment module, for the testing result in the target gesture detection module be it is no when, judgement be directed to present frame figure The previous frame image of picture, if preserve the second three-dimensional coordinate of the target gesture;If the judgement knot of the second judgment module Fruit be it is yes, then trigger the text determining module.
21. the device as described in claim 19 or 20, which is characterized in that the text determining module is specifically used for according to guarantor The corresponding each three-dimensional coordinate of the text to be output deposited determines corresponding first text of the text to be output;
First text is matched with the literal pool pre-saved, according to matching result, determines the text to be output Corresponding target text.
22. device as claimed in claim 21, which is characterized in that the text determining module is specifically used for matching degree most The second high text is determined as the corresponding target text of the text to be output;Or, showing present count from high to low by matching degree Second text of amount;The second text that user selects is determined as the corresponding target text of the text to be output.
23. device as claimed in claim 21, which is characterized in that the text determining module, specifically for according to determining The corresponding every unicursal of text to be output, determines corresponding first text of text to be output, wherein text to be output is corresponding every Unicursal is to determine the stroke after finishing writing, is determined according to the corresponding each three-dimensional coordinate of the stroke.
24. the device as described in claim 19 or 23, which is characterized in that the text determining module is specifically used for according to institute The first distance for the second three-dimensional coordinate that the first three-dimensional coordinate is saved with the previous frame image for current frame image is stated, determination is worked as Preceding writing speed;
Judge whether current writing speed is located within the scope of the stroke writing speed pre-saved;
If so, using first three-dimensional coordinate as the effective three-dimensional coordinate for determining stroke;
If not, using first three-dimensional coordinate as the invalid three-dimensional coordinate for determining stroke;Judge second three-dimensional coordinate Whether be determining stroke effective three-dimensional coordinate, if so, second three-dimensional coordinate is three-dimensional as the end of current stroke Coordinate determines that current stroke writing finishes.
25. device as claimed in claim 24, which is characterized in that the text determining module is also used to by described first After three-dimensional coordinate is as the effective three-dimensional coordinate for determining stroke, judge whether second three-dimensional coordinate is having for determining stroke Imitate three-dimensional coordinate;
If it is not, then using first three-dimensional coordinate as the beginning three-dimensional coordinate of current stroke.
26. device as claimed in claim 23, which is characterized in that the text determining module is also used to determining to defeated Out after the corresponding every unicursal of text, according to the determining corresponding every unicursal of text to be output, text to be output is determined Before corresponding first text, for every unicursal, determine whether the used time of the stroke is less than preset first duration threshold value;Such as Fruit is to filter out the stroke.
27. device as claimed in claim 16, which is characterized in that described device further includes:
Removing module, for after the completion of the text determining module executes, deleting the corresponding each coordinate letter of text to be output Breath.
28. device as claimed in claim 20, which is characterized in that the text determining module, if be also used to for current The previous frame image of frame image does not preserve the second three-dimensional coordinate of the target gesture, not to the overlapping region pre-saved There are the frame numbers of the image of the target gesture to be updated.
29. device as claimed in claim 28, which is characterized in that described device further includes:
Voice broadcast module, for when identification meets text and writes termination condition, at least one text of writing to be carried out language Sound casting.
30. device as claimed in claim 29, which is characterized in that the voice broadcast module is received specifically for identification Text writes END instruction;Or it recognizes the overlapping region that pre-saves there is no the frame numbers of the image of the target gesture to be greater than Preset quantity.
31. a kind of electronic equipment, which is characterized in that including:Processor, communication interface, memory and communication bus, wherein place Device, communication interface are managed, memory completes mutual communication by communication bus;
It is stored with computer program in the memory, when described program is executed by the processor, so that the processor Perform claim requires the step of any one of 1-15 the method.
32. a kind of computer readable storage medium, which is characterized in that it is stored with the computer journey that can be executed by electronic equipment Sequence, when described program is run on the electronic equipment, so that the electronic equipment perform claim requires any one of 1-15 institute The step of stating method.
CN201810563940.XA 2018-06-04 2018-06-04 Character recognition method and device, electronic equipment and storage medium Active CN108846339B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810563940.XA CN108846339B (en) 2018-06-04 2018-06-04 Character recognition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810563940.XA CN108846339B (en) 2018-06-04 2018-06-04 Character recognition method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108846339A true CN108846339A (en) 2018-11-20
CN108846339B CN108846339B (en) 2020-11-27

Family

ID=64210683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810563940.XA Active CN108846339B (en) 2018-06-04 2018-06-04 Character recognition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108846339B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110059678A (en) * 2019-04-17 2019-07-26 上海肇观电子科技有限公司 A kind of detection method, device and computer readable storage medium
CN111031232A (en) * 2019-04-24 2020-04-17 广东小天才科技有限公司 Dictation real-time detection method and electronic equipment
CN111081103A (en) * 2019-05-17 2020-04-28 广东小天才科技有限公司 Dictation answer obtaining method, family education equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060018546A1 (en) * 2004-07-21 2006-01-26 Hewlett-Packard Development Company, L.P. Gesture recognition
CN104793724A (en) * 2014-01-16 2015-07-22 北京三星通信技术研究有限公司 Sky-writing processing method and device
CN106484108A (en) * 2016-09-30 2017-03-08 天津大学 Chinese characters recognition method based on double vision point gesture identification
CN107728916A (en) * 2017-09-20 2018-02-23 科大讯飞股份有限公司 Every the display methods and device of empty handwriting tracks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060018546A1 (en) * 2004-07-21 2006-01-26 Hewlett-Packard Development Company, L.P. Gesture recognition
CN104793724A (en) * 2014-01-16 2015-07-22 北京三星通信技术研究有限公司 Sky-writing processing method and device
CN106484108A (en) * 2016-09-30 2017-03-08 天津大学 Chinese characters recognition method based on double vision point gesture identification
CN107728916A (en) * 2017-09-20 2018-02-23 科大讯飞股份有限公司 Every the display methods and device of empty handwriting tracks

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110059678A (en) * 2019-04-17 2019-07-26 上海肇观电子科技有限公司 A kind of detection method, device and computer readable storage medium
CN111031232A (en) * 2019-04-24 2020-04-17 广东小天才科技有限公司 Dictation real-time detection method and electronic equipment
CN111081103A (en) * 2019-05-17 2020-04-28 广东小天才科技有限公司 Dictation answer obtaining method, family education equipment and storage medium

Also Published As

Publication number Publication date
CN108846339B (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN110738101B (en) Behavior recognition method, behavior recognition device and computer-readable storage medium
CN110532984B (en) Key point detection method, gesture recognition method, device and system
CN106934376B (en) A kind of image-recognizing method, device and mobile terminal
CN107609489B (en) Handwriting writing path evaluation device and method and electronic equipment
CN109635772A (en) Dictation content correcting method and electronic equipment
CN108280843A (en) A kind of video object detecting and tracking method and apparatus
CN103065134A (en) Fingerprint identification device and method with prompt information
CN108846339A (en) Character recognition method and device, electronic equipment and storage medium
CN106326853A (en) Human face tracking method and device
CN111160288A (en) Gesture key point detection method and device, computer equipment and storage medium
CN110287862B (en) Anti-candid detection method based on deep learning
CN110969045B (en) Behavior detection method and device, electronic equipment and storage medium
CN104268864B (en) Card edge extracting method and device
CN113743177A (en) Key point detection method, system, intelligent terminal and storage medium
CN110363790A (en) Target tracking method, device and computer readable storage medium
CN107622497A (en) Image cropping method, apparatus, computer-readable recording medium and computer equipment
CN104933145A (en) Photograph processing method and device and mobile terminal
CN109284700A (en) The method of multiple Face datections, storage medium, equipment and system in image
KR102440198B1 (en) VIDEO SEARCH METHOD AND APPARATUS, COMPUTER DEVICE, AND STORAGE MEDIUM
CN109961103B (en) Training method of feature extraction model, and image feature extraction method and device
CN113256683B (en) Target tracking method and related equipment
CN106682669A (en) Image processing method and mobile terminal
CN110222704A (en) A kind of Weakly supervised object detection method and device
CN110765926B (en) Picture book identification method, device, electronic equipment and storage medium
CN105551027B (en) A kind of frontier tracing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant