CN105184289A - Character identification method and apparatus - Google Patents

Character identification method and apparatus Download PDF

Info

Publication number
CN105184289A
CN105184289A CN201510651869.7A CN201510651869A CN105184289A CN 105184289 A CN105184289 A CN 105184289A CN 201510651869 A CN201510651869 A CN 201510651869A CN 105184289 A CN105184289 A CN 105184289A
Authority
CN
China
Prior art keywords
character
connected component
image block
picture
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.)
Granted
Application number
CN201510651869.7A
Other languages
Chinese (zh)
Other versions
CN105184289B (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

The invention discloses a character identification method and apparatus. The method in one specific embodiment comprises steps of: receiving a character image including at least one character arranged in a row; merging at least one communication component in the character image in order to obtain at least one image block area; identifying the character strings of each image block area and obtaining the position, in the character image, of each character in each character string and the identification confidence coefficient of each character according to the position of each image block area and the identified character strings; and according to the position, in the character image, of each character and the identification confidence coefficient of each character, obtaining a character of the character image by means of a preset search algorithm, and outputting the character of the character image. The method and the apparatus achieve high-precision character identification.

Description

Character identifying method and device
Technical field
The application relates to field of computer technology, is specifically related to field of terminal technology, particularly relates to character identifying method and device.
Background technology
Along with popularizing of the electronic products such as smart mobile phone, digital camera, scanner, increasing information is shown in the form of images.It is text formatting that optical character identification (OpticalCharacterRecognition, OCR) technology is used for the character conversion in image, and user only need input the image that comprises character, and OCR technology just can automatically identify the character in image.Because OCR technology can reduce or replace loaded down with trivial details text event detection, therefore significant.
But in practical application scene, because image can be subject to the impact of the factors such as shooting angle, illumination, font in imaging process, therefore, in existing OCR technology recognition image, the accuracy of identification of character is not high.
Summary of the invention
The object of the application is to propose a kind of character identifying method and device, solves the technical matters that above background technology part is mentioned.
First aspect, this application provides a kind of character identifying method, and described method comprises: receive character picture, described character picture comprises at least one character be arranged in rows; Merge at least one Connected component in described character picture, obtain at least one image block areas; Identify the character string of each described image block areas, and according to the position at each described image block areas place and the character string that identifies, obtain the position of each character in described character picture in each described character string and the recognition confidence of each character; According to the position of each character in described character picture and recognition confidence, obtained the character of described character picture by the searching algorithm preset, and the character of described character picture is exported.
In certain embodiments, at least one Connected component in the described character picture of described merging, obtains at least one image block areas, comprising: extract at least one Connected component in described character picture; The adjacent Connected component of setting quantity is merged, obtains at least one image block areas.
In certain embodiments, at least one Connected component in the described character picture of described merging, obtains at least one image block areas, comprising: extract at least one Connected component in described character picture; Travel through each Connected component from left to right, and be initial with the left side, calculate current Connected component and adjacent Connected component merge after the position of total Connected component region; Calculate the distance from top between the top of current Connected component and the top of total Connected component, calculate the distance from top between the top of the Connected component adjacent with current Connected component and the top of total Connected component; Calculate the distance from bottom between the bottom of current Connected component and the bottom of total Connected component, calculate the distance from bottom between the bottom of the Connected component adjacent with current Connected component and the bottom of total Connected component; Choose the maximal value in distance from top and distance from bottom; Judging whether above-mentioned maximal value is less than the threshold value of setting, if be less than, is then new Connected component with total Connected component, and continues to check whether described new Connected component merges; If be not less than, be then new Connected component with current Connected component; Finally obtain at least one new Connected component, new Connected component is image block areas.
In certain embodiments, at least one Connected component in the described character picture of described extraction, comprising: described character picture is carried out binary conversion treatment, obtains the binary image of described character picture; At least one Connected component of described binary image is extracted based on connect component analysis algorithm; Remove size at least one Connected component described and be less than the Connected component of setting size; Remove at least one Connected component described and be positioned at the top of described character picture and the Connected component of bottom setting regions; Merge Connected component adjacent on vertical direction.
In certain embodiments, the character string of each described image block areas of described identification, and according to the position at each described image block areas place and the character string that identifies, obtain position in described character picture of each character in each described character string and each character recognition degree of confidence, comprise: utilize the character string of each image block areas of training the recurrent neural networks model obtained to calculate at least one image block areas described to export, and the position of each character in described character string in described character picture and each character recognition degree of confidence, wherein, the position of each character in described character string in described character picture and each character recognition degree of confidence are obtained by the position calculation of described recurrent neural networks model according to the position of described each character in described character string and this image block areas.
In certain embodiments, described according to the position of each character in described character picture and recognition confidence, the full line character of described character picture is obtained by the searching algorithm preset, and described full line character is exported, comprising: each character in all image block areas is sorted according to the position in described character picture; According to language model and the recognition confidence of each character and the position in described character picture, the full line word being obtained described character picture by Optimization of Beam Search Algorithm is exported.
Second aspect, this application provides a kind of net character recognition device, described device comprises: receiving element, is configured for reception character picture, and described character picture comprises at least one character be arranged in rows; Merge cells, is configured at least one Connected component merged in described character picture, obtains at least one image block areas; Recognition unit, be configured for the character string identifying each described image block areas, and according to the position at each described image block areas place and the character string that identifies, obtain the position of each character in described character picture in each described character string and the recognition confidence of each character; Output unit, is configured for according to the position of each character in described character picture and recognition confidence, is obtained the character of described character picture, and exported by the character of described character picture by the searching algorithm preset.
In certain embodiments, described merge cells is configured for further: extract at least one Connected component in described character picture; The adjacent Connected component of setting quantity is merged, obtains at least one image block areas.
In certain embodiments, described merge cells is configured for further: extract at least one Connected component in described character picture; Travel through each Connected component from left to right, and be initial with the left side, calculate current Connected component and adjacent Connected component merge after the position of total Connected component region; Calculate the distance from top between the top of current Connected component and the top of total Connected component, calculate the distance from top between the top of the Connected component adjacent with current Connected component and the top of total Connected component; Calculate the distance from bottom between the bottom of current Connected component and the bottom of total Connected component, calculate the distance from bottom between the bottom of the Connected component adjacent with current Connected component and the bottom of total Connected component; Choose the maximal value in distance from top and distance from bottom; Judging whether above-mentioned maximal value is less than the threshold value of setting, if be less than, is then new Connected component with total Connected component, and continues to check whether described new Connected component merges; If be not less than, be then new Connected component with current Connected component; Finally obtain at least one new Connected component, new Connected component is image block areas.
In certain embodiments, described merge cells is configured for further: described character picture is carried out binary conversion treatment, obtains the binary image of described character picture; At least one Connected component of described binary image is extracted based on connect component analysis algorithm; Remove size at least one Connected component described and be less than the Connected component of setting size; Remove at least one Connected component described and be positioned at the top of described character picture and the Connected component of bottom setting regions; Merge Connected component adjacent on vertical direction.
In certain embodiments, described recognition unit is configured for further: utilize the character string of each image block areas of training the recurrent neural networks model obtained to calculate at least one image block areas described to export, and the position of each character in described character string in described character picture and each character recognition degree of confidence, wherein, the position of each character in described character string in described character picture and each character recognition degree of confidence are obtained by the position calculation of described recurrent neural networks model according to the position of described each character in described character string and this image block areas.
In certain embodiments, described output unit is configured for further: sorted according to the position in described character picture by each character in all image block areas; According to language model and the recognition confidence of each character and the position in described character picture, the full line word being obtained described character picture by Optimization of Beam Search Algorithm is exported.
The character identifying method that the application provides and device, by the Connected component extracted from character picture is merged at least one image block areas, then identify the character string of each image block areas, and the position of each character in character string in character picture and recognition confidence, finally obtain the character of character picture according to the searching algorithm of setting, thus improve the accuracy of identification of character recognition algorithm.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, the other features, objects and advantages of the application will become more obvious:
Fig. 1 is the exemplary system architecture figure that the application can be applied to wherein;
Fig. 2 is the process flow diagram of an embodiment of character identifying method according to the application;
Fig. 3 is the schematic diagram of an application scenarios of character identifying method according to the application;
Fig. 4 is the structural representation of an embodiment of character device according to the application;
Fig. 5 is the structural representation of the computer system be suitable for for the terminal device or server realizing the embodiment of the present application.
Embodiment
Below in conjunction with drawings and Examples, the application is described in further detail.Be understandable that, specific embodiment described herein is only for explaining related invention, but not the restriction to this invention.It also should be noted that, for convenience of description, in accompanying drawing, illustrate only the part relevant to Invention.
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the application in detail in conjunction with the embodiments.
Fig. 1 shows the exemplary system architecture 100 can applying the character identifying method of the application or the embodiment of character recognition device.
As shown in Figure 1, system architecture 100 can comprise terminal device 101,102,103, network 104 and server 105.Network 104 is in order at terminal device 101, the medium providing communication link between 102,103 and server 105.Network 104 can comprise various connection type, such as wired, wireless communication link or fiber optic cables etc.
User can use terminal device 101,102,103 mutual by network 104 and server 105, to receive or to send message etc.Terminal device 101,102,103 can be provided with the application of various telecommunication customer end, such as e-book reading class application, the application of copy editor's class, the application of scanning class etc.
Terminal device 101,102,103 can be have display screen and support the various electronic equipments that image inputs and character exports, include but not limited to smart mobile phone, panel computer, E-book reader, MP3 player (MovingPictureExpertsGroupAudioLayerIII, dynamic image expert compression standard audio frequency aspect 3), MP4 (MovingPictureExpertsGroupAudioLayerIV, dynamic image expert compression standard audio frequency aspect 4) player, pocket computer on knee and desk-top computer etc.
Server 105 can be to provide the server of various service, such as, to the background server that the character of display on terminal device 101,102,103 provides support.Background server can the character picture that sends of receiving terminal apparatus 101,102,103, and the character in identification character image, and recognition result is fed back to terminal device.
It should be noted that, the character identifying method that the embodiment of the present application provides can be performed separately by terminal device 101,102,103, or also jointly can be performed by terminal device 101,102,103 and server 105.Correspondingly, character recognition device can be arranged in terminal device 101,102,103, also the unit of character recognition device can be arranged in server 105.
Should be appreciated that, the number of the terminal device in Fig. 1, network and server is only schematic.According to realizing needs, the terminal device of arbitrary number, network and server can be had.
Continue with reference to figure 2, show the flow process 200 of an embodiment of the character identifying method according to the application.Described character identifying method, comprises the following steps:
Step 201, receive character picture, above-mentioned character picture comprises at least one character be arranged in rows.
In the present embodiment, the electronic equipment (terminal device 101,102,103 such as shown in Fig. 1 or server 105) that character identifying method runs thereon can receive character picture by wired connection mode or radio connection from outside or the imaging device of self, under normal circumstances, when the character picture received is coloured image, first the coloured image received can be converted into gray level image, then carry out follow-up process.Wherein, above-mentioned character picture comprises at least one character be arranged in rows.Above-mentioned character can be various countries' word, numeral, punctuation mark, graphical symbol etc.It is pointed out that above-mentioned radio connection can include but not limited to 3G/4G connection, WiFi connection, bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultrawideband) connection and other radio connection developed known or future now.
Step 202, merges at least one Connected component in character picture, obtains at least one image block areas.
In the present embodiment, at least one Connected component in the character picture that combining step 201 receives, obtain at least one image block areas, wherein, above-mentioned Connected component can for having similar gray-value in character picture and the image-region of the adjacent foreground pixel point composition in position, and foreground pixel refers to the colored pixels of character stroke in above-mentioned character picture.Here, in order to avoid the information dropout in character picture, when obtaining multiple image block areas, by overlapping for an adjacent image block areas Connected component.Such as, 10 Connected component: C1 are extracted from certain character picture, C2, C3, C4, C5, C6, C7, C8, C9, C10, after these Connected component are merged, obtain image block areas { C1, C2, C3}, { C3, C4, C5, C6}, { C6, C7, C8}, { C8, C9, C10}, wherein image block areas { C1, C2, C3} and adjacent image block areas { C3, C4, C5, an overlapping Connected component C3 between C6}, image block areas { C3, C4, C5, C6} and adjacent image block areas { C6, C7, an overlapping Connected component C6 between C8}, image block areas { C6, C7, C8} and adjacent image block areas { C8, C9, an overlapping Connected component C8 between C10}.
In some optional implementations of the present embodiment, merge at least one Connected component in above-mentioned character picture, first can extract at least one Connected component in above-mentioned character picture, then, the adjacent Connected component of setting quantity is merged, thus obtains at least one image block areas.
In some optional implementations of the present embodiment, merge at least one Connected component in above-mentioned character picture, first can extract at least one Connected component in above-mentioned character picture, then, travel through each Connected component of extraction from left to right, and be initial with the left side, calculate current Connected component and adjacent Connected component merge after the position of total Connected component region.Calculate the distance from top between the top of current Connected component and the top of total Connected component, calculate the distance from top between the top of the Connected component adjacent with current Connected component and the top of total Connected component.Calculate the distance from bottom between the bottom of current Connected component and the bottom of total Connected component, calculate the distance from bottom between the bottom of the Connected component adjacent with current Connected component and the bottom of total Connected component.Choose the maximal value in distance from top and distance from bottom.Judge whether above-mentioned maximal value is less than the threshold value of setting, if be less than, then with merge after total Connected component be new Connected component, and continue repeat above-mentioned steps check whether above-mentioned new Connected component merges; If be not less than, be then new Connected component with current Connected component; Finally obtain at least one new Connected component, new Connected component is image block areas.Such as, first, travel through each Connected component of extraction from left to right, suppose that i-th Connected component is CC i[x i0, y i0, x i1, y i1], wherein, x i0, y i0, x i1, y i1represent minimum horizontal ordinate, minimum ordinate, maximum horizontal ordinate, the maximum ordinate of i-th Connected component respectively.The i-th+1 Connected component adjacent with it is CC i+1[x i+1,0, y i+1,0, x i+1,1, y i+1,1], wherein, x i+1,0, y i+1,0, x i+1,1, y i+1,1represent the minimum horizontal ordinate of the i-th+1 Connected component, minimum ordinate, maximum horizontal ordinate, maximum ordinate respectively.By Connected component CC i[x i0, y i0, x i1, y i1] and Connected component CC i+1[x i+1,0, y i+1,0, x i+1,1, y i+1,1] total Connected component after merging is CC merge[x m0, y m0, x m1, y m1], wherein, x m0, y m0, x m1, y m1represent the minimum horizontal ordinate of total Connected component, minimum ordinate, maximum horizontal ordinate, maximum ordinate respectively.
Secondly, calculating Connected component is CC itop and bottom and total Connected component CC mergetop and bottom between distance be respectively dist i, 0, dist i, 1; In like manner, Connected component is CC i+1top and bottom and total Connected component CC mergetop and bottom between distance be respectively dist i+1,0, dist i+1,1; Calculate the maximal value of distance from top and distance from bottom respectively:
dist max,0=max(dist i,0,dist i+1,0)
dist max,1=max(dist i,1,dist i+1,1)
Finally, if dist max, 0(or dist max, 1) lower than the threshold value set, then Connected component CC after merging mergeas new Connected component, check CC according to above-mentioned steps mergebe adjacent between Connected component and can merge; If dist max, 0(or dist max, 1) exceed the threshold value of setting, then can not by Connected component CC iwith CC i+1combine, now CC ias an image block areas.To Connected component CC i+1repeat above-mentioned steps and check that can itself and adjacent Connected component merge.
In some optional implementations of the present embodiment, extract at least one Connected component in character picture, can first Binarization methods be adopted to process above-mentioned character picture, obtain the binary image of above-mentioned character picture, wherein, above-mentioned Binarization methods can be overall Binarization methods or local binarization algorithm.Then, connect component analysis method is adopted to extract at least one Connected component of above-mentioned binary image.Remove the Connected component that size at least one Connected component above-mentioned is less than setting size, remove at least one Connected component above-mentioned and be positioned at the top of character picture and the Connected component of bottom setting regions.Finally, Connected component adjacent on vertical direction is merged.
Step 203, identifies the character string of each image block areas, and according to the position at each image block areas place and the character string that identifies, obtains the position of each character in character picture in each character string and the recognition confidence of each character.
In the present embodiment, a Connected component is at least comprised in each image block areas, the various model for character recognition can be utilized to identify each image block areas, identify the character string of each image block areas, and according to the position at each image block areas place and the character string that identifies, obtain the position of each character in above-mentioned character picture in above-mentioned character string and the recognition confidence of each character, wherein, above-mentioned recognition confidence is calculated by the above-mentioned model for character recognition, represent that a character belongs to the probability of certain character, the higher identical probability of recognition confidence of two characters is larger, such as, the recognition confidence that the character identified belongs to Chinese character " I " is 0.999, the recognition confidence belonging to Chinese character " you " is 0.001, then illustrate that this character belongs to the probability of Chinese character " I " very high.
In some optional implementations of the present embodiment, the character string of training the recurrent neural networks model obtained to calculate each image block areas at least one image block areas above-mentioned is utilized to export, and the position of each character in this character string in above-mentioned character picture and each character recognition degree of confidence, wherein, the position of each character in above-mentioned character string in described character picture and each character recognition degree of confidence are obtained by the position calculation of above-mentioned recurrent neural networks model according to the position of above-mentioned each character in above-mentioned character string and this image block areas.
Step 204, according to the position of each character in character picture and recognition confidence, is obtained the character of character picture, and is exported by the character of character picture by the searching algorithm preset.
In the present embodiment, according to the position of each character drawn in step 203 in above-mentioned character picture and recognition confidence, searched in corresponding language model by searching algorithm, finally obtain the full line character Output rusults of above-mentioned character picture, and above-mentioned full line character is exported.Wherein, searching algorithm is the part or all of possibility situation in an autotelic exhaustive solution space, thus obtains a kind of method of the solution of problem.In the present embodiment, searching algorithm can adopt greedy algorithm, dynamic programming etc.
In some optional implementations of the present embodiment, each character in all image block areas is sorted according to the position in above-mentioned character picture; According to language model and the recognition confidence of each character and the position in above-mentioned character picture, and exported by the full line word that Optimization of Beam Search Algorithm obtains above-mentioned character picture, wherein, Optimization of Beam Search Algorithm is a kind of heuristic search algorithm.
Continue a schematic diagram of the application scenarios see Fig. 3, Fig. 3 being character identifying method according to the present embodiment.In the application scenarios of Fig. 3, first user sends a character picture with character to terminal device; Afterwards, this terminal device can merge at least one Connected component of character row in this character picture, obtains at least one image block areas; Then, the character string of this each image block areas of terminal device identification, and the position of each character in this character picture and the recognition confidence of each character in each character string; Finally, according to the position of each character in this character picture and recognition confidence, searched in corresponding language model by the searching algorithm preset, the character of this character picture finally obtained is exported, as shown in Figure 3, the character identified from this character picture will be exported.
The method that above-described embodiment of the application provides processes by character picture being divided at least one image block areas, achieves 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 an a kind of embodiment of character recognition device, this device embodiment is corresponding with the embodiment of the method shown in Fig. 2, and this device specifically can be applied in various electronic equipment.
As shown in Figure 4, the character recognition device 400 described in the present embodiment comprises: receiving element 401, merge cells 402, recognition unit 403 and output unit 404.Wherein, receiving element 401, is configured for reception character picture, and described character picture comprises at least one character be arranged in rows; Merge cells 402, is configured at least one Connected component merged in described character picture, obtains at least one image block areas; Recognition unit 403, be configured for the character string identifying each described image block areas, and according to the position at each described image block areas place and the character string that identifies, obtain the position of each character in described character picture in each described character string and the recognition confidence of each character; Output unit 404, is configured for according to the position of each character in described character picture and recognition confidence, is obtained the character of described character picture, and exported by the character of described character picture by the searching algorithm preset.
In the present embodiment, the receiving element 401 of character recognition device 400 can receive character picture by wired connection mode or radio connection from outside or the imaging device of self, and above-mentioned character picture comprises at least one character be arranged in rows.
In the present embodiment, based on the character picture that receiving element 401 obtains, above-mentioned merge cells 402 can merge at least one Connected component in above-mentioned character picture, thus obtains at least one image block areas.
In the present embodiment, above-mentioned recognition unit 403 identifies each image block areas that above-mentioned merge cells 402 obtains, identify the character string of this image block areas, and according to the position at this image block areas place and the character string that identifies, obtain the position of each character in described character picture in this character string and the recognition confidence of each character.
In the present embodiment, the position of each character that above-mentioned output unit 404 can obtain according to above-mentioned recognition unit 403 in character picture and recognition confidence, obtained the full line character Output rusults of above-mentioned character picture by the searching algorithm preset, 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 also comprises some other known features, such as processor, storeies etc., in order to unnecessarily fuzzy embodiment of the present disclosure, these known structures are not shown in the diagram.
Below with reference to Fig. 5, it illustrates the structural representation of the computer system 500 of terminal device or the server be suitable for for realizing the embodiment of the present application.
As shown in Figure 5, computer system 500 comprises CPU (central processing unit) (CPU) 501, and it or can be loaded into the program random access storage device (RAM) 503 from storage area 508 and perform various suitable action and process according to the program be stored in ROM (read-only memory) (ROM) 502.In RAM503, also store system 500 and operate required various program and data.CPU501, ROM502 and RAM503 are connected with each other by bus 504.I/O (I/O) interface 505 is also connected to bus 504.
I/O interface 505 is connected to: the importation 506 comprising keyboard, mouse etc. with lower component; Comprise the output 507 of such as cathode-ray tube (CRT) (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.; Comprise the storage area 508 of hard disk etc.; And comprise the communications portion 509 of network interface unit of such as LAN card, modulator-demodular unit etc.Communications portion 509 is via the network executive communication process of such as the Internet.Driver 510 is also connected to I/O interface 505 as required.Detachable media 511, such as disk, CD, magneto-optic disk, semiconductor memory etc., be arranged on driver 510 as required, so that the computer program read from it is mounted into storage area 508 as required.
Especially, according to embodiment of the present disclosure, the process that reference flow sheet describes above may be implemented as computer software programs.Such as, embodiment of the present disclosure comprises a kind of computer program, and it comprises the computer program visibly comprised on a machine-readable medium, and described computer program comprises the program code for the method shown in flowchart.In such embodiments, this computer program can be downloaded and installed from network by communications portion 509, and/or is mounted from detachable media 511.
Process flow diagram in accompanying drawing and block diagram, illustrate according to the architectural framework in the cards of the system of the various embodiment of the application, method and computer program product, function and operation.In this, each square frame in process flow diagram or block diagram can represent a part for module, program segment or a code, and a part for described module, program segment or code comprises one or more executable instruction for realizing the logic function specified.Also it should be noted that at some as in the realization of replacing, the function marked in square frame also can be different from occurring in sequence of marking in accompanying drawing.Such as, in fact the square frame that two adjoining lands represent can perform substantially concurrently, and they also can perform by contrary order sometimes, and this determines according to involved function.Also it should be noted that, the combination of the square frame in each square frame in block diagram and/or process flow diagram and block diagram and/or process flow diagram, can realize by the special hardware based system of the function put rules into practice or operation, or can realize with the combination of specialized hardware and computer instruction.
Be described in unit involved in the embodiment of the present application to be realized by the mode of software, also can be realized by the mode of hardware.Described unit also can be arranged within a processor, such as, can be described as: a kind of processor comprises receiving element, merge cells, recognition unit and output unit.Wherein, the title of these unit does not form the restriction to this unit itself under certain conditions, and such as, receiving element can also be described to " receiving the unit of character picture ".
As another aspect, present invention also provides a kind of non-volatile computer storage medium, this non-volatile computer storage medium can be the non-volatile computer storage medium comprised in device described in above-described embodiment; Also can be individualism, be unkitted the non-volatile computer storage medium allocated in terminal.Above-mentioned non-volatile computer storage medium stores one or more program, when one or more program described is performed by an equipment, makes described equipment: receive character picture, described character picture comprises at least one character be arranged in rows; Merge at least one Connected component in described character picture, obtain at least one image block areas; Identify the character string of each described image block areas, and according to the position at each described image block areas place and the character string that identifies, obtain the position of each character in described character picture in each described character string and the recognition confidence of each character; According to the position of each character in described character picture and recognition confidence, obtained the character of described character picture by the searching algorithm preset, and the character of described character picture is exported.
More than describe and be only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art are to be understood that, invention scope involved in the application, be not limited to the technical scheme of the particular combination of above-mentioned technical characteristic, also should be encompassed in when not departing from described inventive concept, other technical scheme of being carried out combination in any by above-mentioned technical characteristic or its equivalent feature and being formed simultaneously.The technical characteristic that such as, disclosed in above-mentioned feature and the application (but being not limited to) has similar functions is replaced mutually and the technical scheme formed.

Claims (12)

1. a character identifying method, is characterized in that, described method comprises:
Receive character picture, described character picture comprises at least one character be arranged in rows;
Merge at least one Connected component in described character picture, obtain at least one image block areas;
Identify the character string of each described image block areas, and according to the position at each described image block areas place and the character string that identifies, obtain the position of each character in described character picture in each described character string and the recognition confidence of each character;
According to the position of each character in described character picture and recognition confidence, obtained the character of described character picture by the searching algorithm preset, and the character of described character picture is exported.
2. method according to claim 1, is characterized in that, at least one Connected component in the described character picture of described merging, obtains at least one image block areas, comprising:
Extract at least one Connected component in described character picture;
The adjacent Connected component of setting quantity is merged, obtains at least one image block areas.
3. method according to claim 1, is characterized in that, at least one Connected component in the described character picture of described merging, obtains at least one image block areas, comprising:
Extract at least one Connected component in described character picture;
Travel through each Connected component from left to right, and be initial with the left side, calculate current Connected component and adjacent Connected component merge after the position of total Connected component region;
Calculate the distance from top between the top of current Connected component and the top of total Connected component, calculate the distance from top between the top of the Connected component adjacent with current Connected component and the top of total Connected component;
Calculate the distance from bottom between the bottom of current Connected component and the bottom of total Connected component, calculate the distance from bottom between the bottom of the Connected component adjacent with current Connected component and the bottom of total Connected component;
Choose the maximal value in distance from top and distance from bottom;
Judging whether above-mentioned maximal value is less than the threshold value of setting, if be less than, is then new Connected component with total Connected component, and continues to check whether described new Connected component merges; If be not less than, be then new Connected component with current Connected component;
Finally obtain at least one new Connected component, new Connected component is image block areas.
4. according to the method in claim 2 or 3, it is characterized in that, at least one Connected component in the described character picture of described extraction, comprising:
Described character picture is carried out binary conversion treatment, obtains the binary image of described character picture;
At least one Connected component of described binary image is extracted based on connect component analysis algorithm;
Remove size at least one Connected component described and be less than the Connected component of setting size;
Remove at least one Connected component described and be positioned at the top of described character picture and the Connected component of bottom setting regions;
Merge Connected component adjacent on vertical direction.
5. method according to claim 1, it is characterized in that, the character string of each described image block areas of described identification, and according to the position at each described image block areas place and the character string that identifies, obtain position in described character picture of each character in each described character string and each character recognition degree of confidence, comprising:
The character string of each image block areas of training the recurrent neural networks model obtained to calculate at least one image block areas described is utilized to export, and the position of each character in described character string in described character picture and each character recognition degree of confidence, wherein, the position of each character in described character string in described character picture and each character recognition degree of confidence are obtained by the position calculation of described recurrent neural networks model according to the position of described each character in described character string and this image block areas.
6. method according to claim 1, it is characterized in that, described according to the position of each character in described character picture and recognition confidence, the full line character of described character picture is obtained by the searching algorithm preset, and described full line character is exported, comprising:
Each character in all image block areas is sorted according to the position in described character picture;
According to language model and the recognition confidence of each character and the position in described character picture, the full line word being obtained described character picture by Optimization of Beam Search Algorithm is exported.
7. a character recognition device, is characterized in that, described device comprises:
Receiving element, is configured for reception character picture, and described character picture comprises at least one character be arranged in rows;
Merge cells, is configured at least one Connected component merged in described character picture, obtains at least one image block areas;
Recognition unit, be configured for the character string identifying each described image block areas, and according to the position at each described image block areas place and the character string that identifies, obtain the position of each character in described character picture in each described character string and the recognition confidence of each character;
Output unit, is configured for according to the position of each character in described character picture and recognition confidence, is obtained the character of described character picture, and exported by the character of described character picture by the searching algorithm preset.
8. device according to claim 7, is characterized in that, described merge cells is configured for further:
Extract at least one Connected component in described character picture;
The adjacent Connected component of setting quantity is merged, obtains at least one image block areas.
9. device according to claim 7, is characterized in that, described merge cells is configured for further:
Extract at least one Connected component in described character picture;
Travel through each Connected component from left to right, and be initial with the left side, calculate current Connected component and adjacent Connected component merge after the position of total Connected component region;
Calculate the distance from top between the top of current Connected component and the top of total Connected component, calculate the distance from top between the top of the Connected component adjacent with current Connected component and the top of total Connected component;
Calculate the distance from bottom between the bottom of current Connected component and the bottom of total Connected component, calculate the distance from bottom between the bottom of the Connected component adjacent with current Connected component and the bottom of total Connected component;
Choose the maximal value in distance from top and distance from bottom;
Judging whether above-mentioned maximal value is less than the threshold value of setting, if be less than, is then new Connected component with total Connected component, and continues to check whether described new Connected component merges; If be not less than, be then new Connected component with current Connected component;
Finally obtain at least one new Connected component, new Connected component is image block areas.
10. device according to claim 8 or claim 9, it is characterized in that, described merge cells is configured for further:
Described character picture is carried out binary conversion treatment, obtains the binary image of described character picture;
At least one Connected component of described binary image is extracted based on connect component analysis algorithm;
Remove size at least one Connected component described and be less than the Connected component of setting size;
Remove at least one Connected component described and be positioned at the top of described character picture and the Connected component of bottom setting regions;
Merge Connected component adjacent on vertical direction.
11. devices according to claim 7, is characterized in that, described recognition unit is configured for further:
The character string of each image block areas of training the recurrent neural networks model obtained to calculate at least one image block areas described is utilized to export, and the position of each character in described character string in described character picture and each character recognition degree of confidence, wherein, the position of each character in described character string in described character picture and each character recognition degree of confidence are obtained by the position calculation of described recurrent neural networks model according to the position of described each character in described character string and this image block areas.
12. devices according to claim 7, is characterized in that, described output unit is configured for further:
Each character in all image block areas is sorted according to the position in described character picture;
According to language model and the recognition confidence of each character and the position in described character picture, the full line word being obtained described character picture by Optimization of Beam Search Algorithm is exported.
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 true CN105184289A (en) 2015-12-23
CN105184289B 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)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017118356A1 (en) * 2016-01-05 2017-07-13 腾讯科技(深圳)有限公司 Text image processing method and apparatus
CN107016387A (en) * 2016-01-28 2017-08-04 苏宁云商集团股份有限公司 A kind of method and device for recognizing label
WO2017168252A1 (en) * 2016-03-31 2017-10-05 Maluuba Inc. Method and system for processing an input query
CN107305630A (en) * 2016-04-25 2017-10-31 腾讯科技(深圳)有限公司 Text sequence recognition methods and device
CN107679074A (en) * 2017-08-25 2018-02-09 百度在线网络技术(北京)有限公司 A kind of Picture Generation Method and equipment
CN108304842A (en) * 2018-02-01 2018-07-20 重庆中陆承大科技有限公司 Meter reading recognition methods, device and electronic equipment
CN109919154A (en) * 2019-02-28 2019-06-21 北京科技大学 A kind of character intelligent identification Method and identification device
CN111783695A (en) * 2020-07-06 2020-10-16 北京易真学思教育科技有限公司 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 (5)

* 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
US20100054599A1 (en) * 2008-08-26 2010-03-04 Fuji Xerox Co., Ltd. Document processing apparatus, document processing method, and computer readable medium
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

Patent Citations (5)

* 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
US20100054599A1 (en) * 2008-08-26 2010-03-04 Fuji Xerox Co., Ltd. Document processing apparatus, document processing method, and computer readable medium
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

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10572728B2 (en) 2016-01-05 2020-02-25 Tencent Technology (Shenzhen) Company Limited Text image processing method and apparatus
WO2017118356A1 (en) * 2016-01-05 2017-07-13 腾讯科技(深圳)有限公司 Text image processing method and apparatus
CN107016387A (en) * 2016-01-28 2017-08-04 苏宁云商集团股份有限公司 A kind of method and device for recognizing label
CN107016387B (en) * 2016-01-28 2020-02-28 苏宁云计算有限公司 Method and device for identifying label
WO2017168252A1 (en) * 2016-03-31 2017-10-05 Maluuba Inc. Method and system for processing an input query
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
CN107305630A (en) * 2016-04-25 2017-10-31 腾讯科技(深圳)有限公司 Text sequence recognition methods and device
CN107305630B (en) * 2016-04-25 2021-03-19 腾讯科技(深圳)有限公司 Text sequence identification method and device
CN107679074A (en) * 2017-08-25 2018-02-09 百度在线网络技术(北京)有限公司 A kind of Picture Generation Method and equipment
US10839244B2 (en) 2017-08-25 2020-11-17 Baidu Online Network Technology (Beijing) Co., Ltd. Method and device for generating image
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
CN109919154A (en) * 2019-02-28 2019-06-21 北京科技大学 A kind of character intelligent identification Method and identification device
CN109919154B (en) * 2019-02-28 2020-10-13 北京科技大学 Intelligent character recognition method and device
CN111783695A (en) * 2020-07-06 2020-10-16 北京易真学思教育科技有限公司 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

Also Published As

Publication number Publication date
CN105184289B (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN105184289A (en) Character identification method and apparatus
US11710293B2 (en) Target detection method and apparatus, computer-readable storage medium, and computer device
CN107016387B (en) Method and device for identifying label
WO2020119420A1 (en) Front-end page generation method and apparatus, computer device, and storage medium
US10282643B2 (en) Method and apparatus for obtaining semantic label of digital image
EP2767928B1 (en) Device and method for automatically identifying a qr code
US20210209426A1 (en) Image Fusion Classification Method and Device
KR102472821B1 (en) Method, device, chip circuit and computer program product for recognizing mixed typeset texts
CN109934181A (en) Text recognition method, device, equipment and computer-readable medium
US20180089525A1 (en) Method for line and word segmentation for handwritten text images
JP2017084336A (en) Methods and apparatus for extracting text from imaged documents
WO2021208617A1 (en) Method and apparatus for recognizing station entering and exiting, terminal, and storage medium
CN102870399A (en) Segmentation of a word bitmap into individual characters or glyphs during an OCR process
CN109840520A (en) A kind of invoice key message recognition methods and system
CN113822116A (en) Text recognition method and device, computer equipment and storage medium
CN108288064B (en) Method and device for generating pictures
CN105551044A (en) Picture comparing method and device
CN115019322A (en) Font detection method, device, equipment and medium
US20210374490A1 (en) Method and apparatus of processing image, device and medium
CN106663212B (en) Character recognition device, character recognition method, and computer-readable storage medium
CN102368299B (en) System and method for identifying electronic waste in raster images
CN111199240A (en) Training method of bank card identification model, and bank card identification method and device
CN111611883A (en) Table layout analysis method, system and equipment based on minimum cell clustering
CN113869317A (en) License plate recognition method and device, electronic equipment and storage medium
CN115114481A (en) Document format conversion method, device, storage medium and equipment

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