CN105184289B - Character identifying method and device - Google Patents

Character identifying method and device Download PDF

Info

Publication number
CN105184289B
CN105184289B CN201510651869.7A CN201510651869A CN105184289B CN 105184289 B CN105184289 B CN 105184289B CN 201510651869 A CN201510651869 A CN 201510651869A CN 105184289 B CN105184289 B CN 105184289B
Authority
CN
China
Prior art keywords
character
connected component
picture
image block
character picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510651869.7A
Other languages
Chinese (zh)
Other versions
CN105184289A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510651869.7A priority Critical patent/CN105184289B/en
Publication of CN105184289A publication Critical patent/CN105184289A/en
Application granted granted Critical
Publication of CN105184289B publication Critical patent/CN105184289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • G06V10/23Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition based on positionally close patterns or neighbourhood relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

This application discloses character identifying methods and device.One specific embodiment of the method includes: reception character picture, and the character picture includes at least one character being arranged in rows;Merge at least one Connected component in the character picture, obtains at least one image block areas;It identifies the character string in each described image block region, and according to the position where each described image block region and the character string identified, obtains the recognition confidence of position and each character of each character in each character string in the character picture;According to position of each character in the character picture and recognition confidence, the character of the character picture is obtained by preset searching algorithm, and the character of the character picture is exported.The embodiment realizes high-precision character recognition.

Description

Character identifying method and device
Technical field
This application involves field of computer technology, and in particular to field of terminal technology more particularly to character identifying method and Device.
Background technique
With popularizing for the electronic products such as smart phone, digital camera, scanner, more and more information are with the shape of image Formula is shown.Optical character identification (Optical Character Recognition, OCR) technology is used for will be in image Character is converted to text formatting, and user need to only input the image comprising character, and OCR technique can automatically identify image In character.Since OCR technique can reduce or replace cumbersome text input, it is of great significance.
However, in practical application scene, due to image in imaging process can by shooting angle, illumination, font etc. because The influence of element, therefore, the accuracy of identification of character is not high in existing OCR technique identification image.
Summary of the invention
The purpose of the application is to propose a kind of character identifying method and device, mentions to solve background section above The technical issues of.
In a first aspect, this application provides a kind of character identifying methods, which comprises character picture is received, it is described Character picture includes at least one character being arranged in rows;Merge at least one Connected component in the character picture, obtains At least one image block areas;Identify the character string in each described image block region, and according to where each described image block region Position and the character string identified obtain position of each character in each character string in the character picture and each The recognition confidence of character;According to position of each character in the character picture and recognition confidence, pass through preset search Algorithm obtains the character of the character picture, and the character of the character picture is exported.
In some embodiments, described at least one Connected component merged in the character picture, obtains at least one Image block areas, comprising: extract at least one Connected component in the character picture;To set the adjacent connection of quantity at Division simultaneously, obtains at least one image block areas.
In some embodiments, described at least one Connected component merged in the character picture, obtains at least one Image block areas, comprising: extract at least one Connected component in the character picture;Each Connected component is traversed from left to right, And the position of total Connected component region after current Connected component merges with adjacent Connected component is calculated to originate with the left side It sets;The distance from top between the top of current Connected component and the top of total Connected component is calculated, is calculated and current Connected component Distance from top between the top of adjacent Connected component and the top of total Connected component;Calculate the bottom of current Connected component with Distance from bottom between the bottom of total Connected component, calculate the bottom of the Connected component adjacent with current Connected component be always connected to Distance from bottom between the bottom of ingredient;Choose the maximum value in distance from top and distance from bottom;Whether judge above-mentioned maximum value Less than the threshold value of setting, if it is less, with total Connected component for new Connected component, and continue checking the new Connected component and be It is no to merge;If it is not, then with current Connected component for new Connected component;Finally obtain at least one it is new connection at Point, new Connected component is image block areas.
In some embodiments, described at least one Connected component extracted in the character picture, comprising: by the word It accords with image and carries out binary conversion treatment, obtain the binary image of the character picture;Institute is extracted based on Connected component parser State at least one Connected component of binary image;It removes size at least one described Connected component and is less than the company being sized Logical ingredient;Remove the connection being located in the top and bottom setting regions of the character picture at least one described Connected component Ingredient;Merge Connected component adjacent on vertical direction.
In some embodiments, the character string in identification each described image block region, and according to each described image block area Position where domain and the character string identified, obtain each character in each character string in the character picture Position and each character recognition confidence level, comprising: using the obtained recurrent neural networks model of training calculate it is described at least one Each character in the character string output of each image block areas in image block areas and the character string is in the character figure Position and each character recognition confidence level as in, wherein position of each character in the character picture in the character string It sets and position of each character recognition confidence level by the recurrent neural networks model according to each character in the character string It sets and the position of the image block areas is calculated.
In some embodiments, the position and recognition confidence according to each character in the character picture, passes through Preset searching algorithm obtains the full line character of the character picture, and the full line character is exported, comprising: will own Each character in image block areas is ranked up according to the position in the character picture;According to language model and each character Recognition confidence and the position in the character picture, the full line text of the character picture is obtained by Optimization of Beam Search Algorithm Output.
Second aspect, this application provides a kind of net character recognition device, described device includes: receiving unit, and configuration is used In receiving character picture, the character picture includes at least one character being arranged in rows;Combining unit is configured to merge institute At least one Connected component in character picture is stated, at least one image block areas is obtained;It is each to be configured to identification for recognition unit The character string in described image block region, and according to the position where each described image block region and the character string identified, it obtains To the recognition confidence of position and each character of each character in each character string in the character picture;Output is single Member is configured to position and recognition confidence according to each character in the character picture, is obtained by preset searching algorithm It is exported to the character of the character picture, and by the character of the character picture.
In some embodiments, the combining unit is further configured to: extracting at least one in the character picture A Connected component;The adjacent Connected component for setting quantity is merged, at least one image block areas is obtained.
In some embodiments, the combining unit is further configured to: extracting at least one in the character picture A Connected component;Each Connected component is traversed from left to right, and is starting with the left side, is calculated current Connected component and is connected into adjacent The position of total Connected component region after division simultaneously;Calculate current Connected component top and total Connected component top it Between distance from top, calculate the top between the top of Connected component and the top of total Connected component adjacent with current Connected component Portion's distance;The distance from bottom between the bottom of current Connected component and the bottom of total Connected component is calculated, calculate and is currently connected to Distance from bottom between the bottom of the adjacent Connected component of ingredient and the bottom of total Connected component;Choose distance from top and bottom away from Maximum value from;Judge whether above-mentioned maximum value is less than the threshold value of setting, if it is less, being new connection with total Connected component Ingredient, and continue checking whether the new Connected component merges;If it is not, being then new connection with current Connected component Ingredient;At least one new Connected component is finally obtained, new Connected component is image block areas.
In some embodiments, the combining unit is further configured to: the character picture is carried out at binaryzation Reason, obtains the binary image of the character picture;The binary image is extracted at least based on Connected component parser One Connected component;It removes size at least one described Connected component and is less than the Connected component being sized;Removal is described extremely The Connected component being located in the top and bottom setting regions of the character picture in a few Connected component;Merge vertical direction Upper adjacent Connected component.
In some embodiments, the recognition unit is further configured to: the recurrent neural network obtained using training Model calculates in the character string output and the character string of each image block areas at least one described image block areas Position and each character recognition confidence level of each character in the character picture, wherein each character in the character string Position and each character recognition confidence level in the character picture are by the recurrent neural networks model according to each word The position for according with position and the image block areas in the character string is calculated.
In some embodiments, the output unit is further configured to: by each character in all image block areas It is ranked up according to the position in the character picture;According to the recognition confidence of language model and each character and described Position in character picture is exported by the full line text that Optimization of Beam Search Algorithm obtains the character picture.
Character identifying method and device provided by the present application, by merging into the Connected component extracted from character picture At least one image block areas then identifies the character string of each image block areas and each character in character string in character figure Position and recognition confidence as in, finally obtain the character of character picture according to the searching algorithm of setting, to improve word Accord with the accuracy of identification of recognizer.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the character identifying method of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the character identifying method of the application;
Fig. 4 is the structural schematic diagram according to one embodiment of the character device of the application;
Fig. 5 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present application Figure.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the exemplary system of the embodiment of the character identifying method or character recognition device of the application System framework 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications can be installed, such as e-book reading class is answered on terminal device 101,102,103 With the application of, copy editor's class, scanning class application etc..
Terminal device 101,102,103 can be with display screen and support the various electricity that image inputs and character exports Sub- equipment, including but not limited to smart phone, tablet computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) player, knee Mo(u)ld top half portable computer and desktop computer etc..
Server 105 can be to provide the server of various services, such as to showing on terminal device 101,102,103 Character provides the background server supported.Background server can receive the character picture of the transmission of terminal device 101,102,103, And identify the character in character picture, and recognition result is fed back into terminal device.
It should be noted that character identifying method provided by the embodiment of the present application can by terminal device 101,102, 103 are individually performed, or can also be executed jointly by terminal device 101,102,103 and server 105.Correspondingly, character is known Other device can be set in terminal device 101,102,103, the unit of character recognition device can also be set to clothes It is engaged in device 105.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the process 200 of one embodiment of the character identifying method according to the application is shown.It is described Character identifying method, comprising the following steps:
Step 201, character picture is received, above-mentioned character picture includes at least one character being arranged in rows.
In the present embodiment, electronic equipment (such as the terminal device shown in FIG. 1 of character identifying method operation thereon 101,102,103 or server 105) can be by wired connection mode or radio connection from external or itself imaging Character picture is received in equipment, it is generally the case that when received character picture is color image, the coloured silk that will can first receive Chromatic graph picture is converted into gray level image, then carries out subsequent processing.Wherein, above-mentioned character picture includes at least one being arranged in rows Character.Above-mentioned character can be various countries' text, number, punctuation mark, graphical symbol etc..It should be pointed out that above-mentioned wireless Connection type can include but is not limited to 3G/4G connection, WiFi connection, bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection and other currently known or exploitation in the future radio connections.
Step 202, merge at least one Connected component in character picture, obtain at least one image block areas.
In the present embodiment, merge at least one Connected component in the character picture that step 201 receives, obtain at least One image block areas, wherein above-mentioned Connected component can for have in character picture similar gray-value and position it is adjacent before The image-region of scene vegetarian refreshments composition, and foreground pixel refers to the colored pixels of character stroke in above-mentioned character picture.Herein, it is The information in character picture is avoided to lose, in the case where obtaining multiple images block region, by adjacent image block areas weight Fold a Connected component.For example, 10 Connected components: C1, C2, C3, C4, C5, C6, C7, C8 are extracted from certain character picture, C9, C10 are obtained image block areas { C1, C2, C3 }, { C3, C4, C5, C6 } after merging these Connected components, and C6, C7, C8 }, { C8, C9, C10 } is wherein heavy between image block areas { C1, C2, C3 } and adjacent image block areas { C3, C4, C5, C6 } A Connected component C3 is folded, is overlapped between image block areas { C3, C4, C5, C6 } and adjacent image block areas { C6, C7, C8 } One Connected component C6 is overlapped one between image block areas { C6, C7, C8 } and adjacent image block areas { C8, C9, C10 } Connected component C8.
In some optional implementations of the present embodiment, merge at least one of above-mentioned character picture connection at Point, at least one Connected component in above-mentioned character picture can be first extracted, then, the adjacent Connected component of quantity will be set Merge, to obtain at least one image block areas.
In some optional implementations of the present embodiment, merge at least one of above-mentioned character picture connection at Point, can first extract at least one Connected component in above-mentioned character picture, then, from left to right traversal extract it is each be connected at Point, and be starting with the left side, calculate total Connected component region after current Connected component merges with adjacent Connected component Position.The distance from top between the top of current Connected component and the top of total Connected component is calculated, calculate and is currently connected into Distance from top between the top of the Connected component of split-phase neighbour and the top of total Connected component.Calculate the bottom of current Connected component Distance from bottom between the bottom of total Connected component, calculates the bottom of the Connected component adjacent with current Connected component and always connects Distance from bottom between the bottom of logical ingredient.Choose the maximum value in distance from top and distance from bottom.Judging above-mentioned maximum value is The no threshold value for being less than setting, if it is less, with total Connected component after merging for new Connected component, and continue to repeat above-mentioned step It is rapid to check whether above-mentioned new Connected component merges;If it is not, then with current Connected component for new Connected component;Most At least one new Connected component is obtained eventually, and new Connected component is image block areas.For example, firstly, traversal is extracted from left to right Each Connected component, it is assumed that i-th Connected component is CCi[xi0,yi0,xi1,yi1], wherein xi0、yi0、xi1、yi1Respectively indicate The minimum abscissa of i Connected component, minimum ordinate, maximum abscissa, maximum ordinate.The i+1 company adjacent with it Logical ingredient is CCi+1[xi+1,0,yi+1,0,xi+1,1,yi+1,1], wherein xi+1,0、yi+1,0、xi+1,1、yi+1,1Respectively indicate i+1 The minimum abscissa of Connected component, minimum ordinate, maximum abscissa, maximum ordinate.By Connected component CCi[xi0,yi0, xi1,yi1] and Connected component CCi+1[xi+1,0,yi+1,0,xi+1,1,yi+1,1] total Connected component after merging is CCMerge[xM0,yM0, xM1,yM1], wherein xM0、yM0、xM1、yM1Respectively indicate the minimum abscissa, minimum ordinate, maximum horizontal seat of total Connected component Mark, maximum ordinate.
Secondly, calculating Connected component is CCiTop and bottom and total Connected component CCMergeTop and bottom between Distance respectively disti,0, disti,1;Similarly, Connected component CCi+1Top and bottom and total Connected component CCMergeTop The distance between portion and bottom are respectively disti+1,0, disti+1,1;Calculate separately the maximum value of distance from top and distance from bottom:
distmax,0=max (disti,0,disti+1,0)
distmax,1=max (disti,1,disti+1,1)
Finally, if distmax,0(or distmax,1) lower than the threshold value of setting, then Connected component CC after mergingMergeAs New Connected component checks CC according to above-mentioned stepsMergeIt can be merged between Connected component adjacent thereto;If distmax,0(or distmax,1) it is more than the threshold value set, then it cannot be by Connected component CCiWith CCi+1It merges, at this time CCi As an image block areas.To Connected component CCi+1It repeats the above steps to check that can it be closed with adjacent Connected component And.
In some optional implementations of the present embodiment, at least one Connected component in character picture is extracted, it can First to handle above-mentioned character picture using Binarization methods, the binary image of above-mentioned character picture is obtained, wherein on Stating Binarization methods can be global Binarization methods or local binarization algorithm.Then, it is mentioned using Connected component analysis method Take at least one Connected component of above-mentioned binary image.It removes at least one above-mentioned Connected component size and is less than and be sized Connected component, remove the connection being located in the top and bottom setting regions of character picture in above-mentioned at least one Connected component Ingredient.Finally, merging Connected component adjacent on vertical direction.
Step 203, it identifies the character string of each image block areas, and according to the position where each image block areas and is identified Character string out obtains the recognition confidence of position and each character of each character in each character string in character picture.
In the present embodiment, a Connected component is included at least in each image block areas, can use various be used for The model of character recognition identifies each image block areas, identifies the character string of each image block areas, and according to each Position where image block areas and the character string identified, obtain each character in above-mentioned character string in above-mentioned character figure The recognition confidence of position and each character as in, wherein above-mentioned recognition confidence is by the above-mentioned mould for character recognition What type was calculated, indicate that a character belongs to the probability of some character, the recognition confidence of two characters the high identical general Rate is bigger, for example, the recognition confidence that a character of identification belongs to Chinese character " I " is 0.999, belongs to the identification of Chinese character " you " Confidence level is 0.001, then illustrate the character belong to Chinese character " I " probability it is very high.
In some optional implementations of the present embodiment, calculated using the recurrent neural networks model that training obtains Each character in the character string output and the character string of each image block areas at least one image block areas is stated upper State the position in character picture and each character recognition confidence level, wherein each character in above-mentioned character string is in the character figure Position and each character recognition confidence level as in are according to above-mentioned each character by above-mentioned recurrent neural networks model in above-mentioned word What the position of position and the image block areas in symbol string was calculated.
Step 204, the position according to each character in character picture and recognition confidence, are obtained by preset searching algorithm It is exported to the character of character picture, and by the character of character picture.
In the present embodiment, it is set according to position and identification of each character obtained in step 203 in above-mentioned character picture Reliability is scanned in corresponding language model by searching algorithm, and the full line character for finally obtaining above-mentioned character picture is defeated Out as a result, and exporting above-mentioned full line character.Wherein, searching algorithm is the portion of a purposive exhaustive problem solution space Point or all possibility situations, so as to find out a kind of method of the solution of problem.In the present embodiment, searching algorithm can be using greed Algorithm, Dynamic Programming etc..
In some optional implementations of the present embodiment, by each character in all image block areas according to above-mentioned Position in character picture is ranked up;According to the recognition confidence of language model and each character and in above-mentioned character picture Position, and by Optimization of Beam Search Algorithm obtain above-mentioned character picture full line text export, wherein Optimization of Beam Search Algorithm is that one kind opens Hairdo searching algorithm.
With continued reference to the schematic diagram that Fig. 3, Fig. 3 are according to the application scenarios of the character identifying method of the present embodiment.? In the application scenarios of Fig. 3, user sends the character picture for having character to terminal device first;Later, the terminal device At least one Connected component that character row in the character picture can be merged, obtains at least one image block areas;Then, the end End equipment identify in the character string and each character string of each image block areas position of each character in the character picture with And the recognition confidence of each character;Finally, according to position of each character in the character picture and recognition confidence, by pre- If searching algorithm scanned in corresponding language model, the character of the finally obtained character picture is exported, It will be as shown in figure 3, the character that output is identified from the character picture.
The method provided by the above embodiment of the application by by character picture be divided at least one image block areas into Row processing realizes the high-precision identification of character picture.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, this application provides a kind of character recognition dresses The one embodiment set, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to respectively In kind electronic equipment.
As shown in figure 4, character recognition device 400 described in the present embodiment include: receiving unit 401, combining unit 402, Recognition unit 403 and output unit 404.Wherein, receiving unit 401 are configured to receive character picture, the character picture packet Include at least one character being arranged in rows;Combining unit 402 is configured to merge the connection of at least one of described character picture Ingredient obtains at least one image block areas;Recognition unit 403 is configured to identify the character string in each described image block region, And according to the position where each described image block region and the character string identified, each word in each character string is obtained Accord with the recognition confidence of the position and each character in the character picture;Output unit 404 is configured to according to each character Position and recognition confidence in the character picture obtain the character of the character picture by preset searching algorithm, And the character of the character picture is exported.
In the present embodiment, the receiving unit 401 of character recognition device 400 can be by wired connection mode or wireless Connection type receives character picture from outside or the imaging device of itself, and above-mentioned character picture includes at least one to be arranged in rows A character.
In the present embodiment, the character picture obtained based on receiving unit 401, above-mentioned combining unit 402 can merge At least one Connected component in character picture is stated, to obtain at least one image block areas.
In the present embodiment, each image block areas that above-mentioned recognition unit 403 obtains above-mentioned combining unit 402 into Row identification, identify the character string of the image block areas, and according to the position where the image block areas and is identified Character string obtains the recognition confidence of position and each character of each character in the character string in the character picture.
In the present embodiment, above-mentioned output unit 404 can be according to each character that above-mentioned recognition unit 403 obtains in character Position and recognition confidence in image obtain the full line character output knot of above-mentioned character picture by preset searching algorithm Fruit, and above-mentioned full line character is exported.
It will be understood by those skilled in the art that above-mentioned character recognition device 400 further includes some other known features, such as Processor, memory etc., in order to unnecessarily obscure embodiment of the disclosure, these well known structures are not shown in Fig. 4.
Below with reference to Fig. 5, it illustrates the calculating of the terminal device or server that are suitable for being used to realize the embodiment of the present application The structural schematic diagram of machine system 500.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in Program in memory (ROM) 502 or be loaded into the program in random access storage device (RAM) 503 from storage section 508 and Execute various movements appropriate and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data. CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always Line 504.
I/O interface 505 is connected to lower component: the importation 506 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 508 including hard disk etc.; And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because The network of spy's net executes communication process.Driver 510 is also connected to I/O interface 505 as needed.Detachable media 511, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 510, in order to read from thereon Computer program be mounted into storage section 508 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in machine readable Computer program on medium, the computer program include the program code for method shown in execution flow chart.At this In the embodiment of sample, which can be downloaded and installed from network by communications portion 509, and/or from removable Medium 511 is unloaded to be mounted.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer The combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include receiving unit, combining unit, recognition unit and output unit.Wherein, the title of these units not structure under certain conditions The restriction of the pairs of unit itself, for example, receiving unit is also described as " receiving the unit of character picture ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating Machine storage medium can be nonvolatile computer storage media included in device described in above-described embodiment;It is also possible to Individualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is deposited One or more program is contained, when one or more of programs are executed by an equipment, so that the equipment: receiving Character picture, the character picture include at least one character being arranged in rows;Merge at least one of described character picture Connected component obtains at least one image block areas;Identify the character string in each described image block region, and according to each described image Position where block region and the character string identified, obtain each character in each character string in the character picture In position and each character recognition confidence;According to position of each character in the character picture and recognition confidence, The character of the character picture is obtained by preset searching algorithm, and the character of the character picture is exported.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (10)

1. a kind of character identifying method, which is characterized in that the described method includes:
Character picture is received, the character picture includes at least one character being arranged in rows;
Merge at least one Connected component in the character picture, obtains at least one image block areas;
It identifies the character string in each described image block region, and according to the position where each described image block region and is identified Character string obtains the identification confidence of position and each character of each character in each character string in the character picture Degree;
According to position of each character in the character picture and recognition confidence, the word is obtained by preset searching algorithm The character of image is accorded with, and the character of the character picture is exported;And
The position and recognition confidence according to each character in the character picture, obtains institute by preset searching algorithm The full line character of character picture is stated, and the full line character is exported, comprising:
Each character in all image block areas is ranked up according to the position in the character picture;
According to the recognition confidence and the position in the character picture of language model and each character, pass through Optimization of Beam Search Algorithm Obtain the full line text output of the character picture.
2. the method according to claim 1, wherein described merge the connection of at least one of described character picture Ingredient obtains at least one image block areas, comprising:
Extract at least one Connected component in the character picture;
The adjacent Connected component for setting quantity is merged, at least one image block areas is obtained.
3. the method according to claim 1, wherein described merge the connection of at least one of described character picture Ingredient obtains at least one image block areas, comprising:
Extract at least one Connected component in the character picture;
Each Connected component is traversed from left to right, and is starting with the left side, is calculated current Connected component and is merged with adjacent Connected component The position of total Connected component region afterwards;
The distance from top between the top of current Connected component and the top of total Connected component is calculated, is calculated and current Connected component Distance from top between the top of adjacent Connected component and the top of total Connected component;
The distance from bottom between the bottom of current Connected component and the bottom of total Connected component is calculated, is calculated and current Connected component Distance from bottom between the bottom of adjacent Connected component and the bottom of total Connected component;
Choose the maximum value in distance from top and distance from bottom;
Judge whether above-mentioned maximum value is less than the threshold value of setting, if it is less, with total Connected component for new Connected component, and after It is continuous to check whether the new Connected component merges;If it is not, then with current Connected component for new Connected component;
At least one new Connected component is finally obtained, new Connected component is image block areas.
4. according to the method in claim 2 or 3, which is characterized in that described to extract at least one of described character picture Connected component, comprising:
The character picture is subjected to binary conversion treatment, obtains the binary image of the character picture;
At least one Connected component of the binary image is extracted based on Connected component parser;
It removes size at least one described Connected component and is less than the Connected component being sized;
Remove the connection that is located in the top and bottom setting regions of the character picture at least one described Connected component at Point;
Merge Connected component adjacent on vertical direction.
5. the method according to claim 1, wherein it is described identification each described image block region character string, and Position where each described image block region and the character string identified, each character obtained in each character string exist Position and each character recognition confidence level in the character picture, comprising:
Each image block area at least one described image block areas is calculated using the recurrent neural networks model that training obtains It sets position and each character recognition of each character in the character picture in the character string output in domain and the character string Reliability, wherein position and each character recognition confidence level of each character in the character picture in the character string are by institute The position for stating position and the image block areas of the recurrent neural networks model according to each character in the character string calculates It obtains.
6. a kind of character recognition device, which is characterized in that described device includes:
Receiving unit is configured to receive character picture, and the character picture includes at least one character being arranged in rows;
Combining unit is configured to merge at least one Connected component in the character picture, obtains at least one image block Region;
Recognition unit is configured to identify the character string in each described image block region, and according to where each described image block region Position and the character string that is identified, obtain position of each character in each character string in the character picture and The recognition confidence of each character;
Output unit is configured to position and recognition confidence according to each character in the character picture, by preset Searching algorithm obtains the character of the character picture, and the character of the character picture is exported;And
The output unit is further configured to:
Each character in all image block areas is ranked up according to the position in the character picture;
According to the recognition confidence and the position in the character picture of language model and each character, pass through Optimization of Beam Search Algorithm Obtain the full line text output of the character picture.
7. device according to claim 6, which is characterized in that the combining unit is further configured to:
Extract at least one Connected component in the character picture;
The adjacent Connected component for setting quantity is merged, at least one image block areas is obtained.
8. device according to claim 6, which is characterized in that the combining unit is further configured to:
Extract at least one Connected component in the character picture;
Each Connected component is traversed from left to right, and is starting with the left side, is calculated current Connected component and is merged with adjacent Connected component The position of total Connected component region afterwards;
The distance from top between the top of current Connected component and the top of total Connected component is calculated, is calculated and current Connected component Distance from top between the top of adjacent Connected component and the top of total Connected component;
The distance from bottom between the bottom of current Connected component and the bottom of total Connected component is calculated, is calculated and current Connected component Distance from bottom between the bottom of adjacent Connected component and the bottom of total Connected component;
Choose the maximum value in distance from top and distance from bottom;
Judge whether above-mentioned maximum value is less than the threshold value of setting, if it is less, with total Connected component for new Connected component, and after It is continuous to check whether the new Connected component merges;If it is not, then with current Connected component for new Connected component;
At least one new Connected component is finally obtained, new Connected component is image block areas.
9. device according to claim 7 or 8, which is characterized in that the combining unit is further configured to:
The character picture is subjected to binary conversion treatment, obtains the binary image of the character picture;
At least one Connected component of the binary image is extracted based on Connected component parser;
It removes size at least one described Connected component and is less than the Connected component being sized;
Remove the connection that is located in the top and bottom setting regions of the character picture at least one described Connected component at Point;
Merge Connected component adjacent on vertical direction.
10. device according to claim 6, which is characterized in that the recognition unit is further configured to:
Each image block area at least one described image block areas is calculated using the recurrent neural networks model that training obtains It sets position and each character recognition of each character in the character picture in the character string output in domain and the character string Reliability, wherein position and each character recognition confidence level of each character in the character picture in the character string are by institute The position for stating position and the image block areas of the recurrent neural networks model according to each character in the character string calculates It obtains.
CN201510651869.7A 2015-10-10 2015-10-10 Character identifying method and device Active CN105184289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510651869.7A CN105184289B (en) 2015-10-10 2015-10-10 Character identifying method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510651869.7A CN105184289B (en) 2015-10-10 2015-10-10 Character identifying method and device

Publications (2)

Publication Number Publication Date
CN105184289A CN105184289A (en) 2015-12-23
CN105184289B true CN105184289B (en) 2019-06-28

Family

ID=54906355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510651869.7A Active CN105184289B (en) 2015-10-10 2015-10-10 Character identifying method and device

Country Status (1)

Country Link
CN (1) CN105184289B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106940799B (en) 2016-01-05 2020-07-24 腾讯科技(深圳)有限公司 Text image processing method and device
CN107016387B (en) * 2016-01-28 2020-02-28 苏宁云计算有限公司 Method and device for identifying label
US10437929B2 (en) 2016-03-31 2019-10-08 Maluuba Inc. Method and system for processing an input query using a forward and a backward neural network specific to unigrams
CN107305630B (en) * 2016-04-25 2021-03-19 腾讯科技(深圳)有限公司 Text sequence identification method and device
CN107679074B (en) 2017-08-25 2021-05-04 百度在线网络技术(北京)有限公司 Picture generation method and equipment
CN108304842A (en) * 2018-02-01 2018-07-20 重庆中陆承大科技有限公司 Meter reading recognition methods, device and electronic equipment
CN109919154B (en) * 2019-02-28 2020-10-13 北京科技大学 Intelligent character recognition method and device
CN111783695B (en) * 2020-07-06 2022-06-07 北京易真学思教育科技有限公司 Text recognition method and device, electronic equipment and storage medium
CN113343981A (en) * 2021-06-16 2021-09-03 北京百度网讯科技有限公司 Visual feature enhanced character recognition method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615251A (en) * 2008-06-24 2009-12-30 三星电子株式会社 The method and apparatus that is used for identification character in the character recognition device
CN102024139A (en) * 2009-09-18 2011-04-20 富士通株式会社 Device and method for recognizing character strings
CN102063619A (en) * 2010-11-30 2011-05-18 汉王科技股份有限公司 Character row extraction method and device
CN102930262A (en) * 2012-09-19 2013-02-13 北京百度网讯科技有限公司 Method and device for extracting text from image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4661921B2 (en) * 2008-08-26 2011-03-30 富士ゼロックス株式会社 Document processing apparatus and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615251A (en) * 2008-06-24 2009-12-30 三星电子株式会社 The method and apparatus that is used for identification character in the character recognition device
CN102024139A (en) * 2009-09-18 2011-04-20 富士通株式会社 Device and method for recognizing character strings
CN102063619A (en) * 2010-11-30 2011-05-18 汉王科技股份有限公司 Character row extraction method and device
CN102930262A (en) * 2012-09-19 2013-02-13 北京百度网讯科技有限公司 Method and device for extracting text from image

Also Published As

Publication number Publication date
CN105184289A (en) 2015-12-23

Similar Documents

Publication Publication Date Title
CN105184289B (en) Character identifying method and device
US10867171B1 (en) Systems and methods for machine learning based content extraction from document images
US10127441B2 (en) Systems and methods for classifying objects in digital images captured using mobile devices
US10282643B2 (en) Method and apparatus for obtaining semantic label of digital image
US20210209459A1 (en) Processing method and system for convolutional neural network, and storage medium
CN107016387B (en) Method and device for identifying label
CN109934181A (en) Text recognition method, device, equipment and computer-readable medium
CN103608823B (en) Method for parallel processing and equipment for determining text message from image
CN107911753A (en) Method and apparatus for adding digital watermarking in video
CN110222694B (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN108830780A (en) Image processing method and device, electronic equipment, storage medium
JP2013250975A (en) Document processor, document processing method and scanner
US20240161449A1 (en) Apparatus and methods for converting lineless talbes into lined tables using generative adversarial networks
CN108304562B (en) Question searching method and device and intelligent terminal
CN108491825A (en) information generating method and device
CN104766082B (en) Image-recognizing method and device based on android system
CN109389096A (en) Detection method and device
CN107622504A (en) Method and apparatus for handling picture
CN106354885A (en) Searching method and device
CN109993749A (en) The method and apparatus for extracting target image
CN108288064A (en) Method and apparatus for generating picture
CN114972847A (en) Image processing method and device
CN112836692A (en) Method, apparatus, device and medium for processing image
CN114724145A (en) Character image recognition method, device, equipment and medium
CN110674802A (en) Improved text detection method for parallelogram candidate box

Legal Events

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