Generation, character detection method, device, equipment and the medium of character machining modelTechnical field
The embodiment of the present disclosure be related to data technique more particularly to a kind of generation of character machining model, character detection method,Device, equipment and medium.
Background technique
OCR (Optical Character Recognition, optical character identification) refers to that electronic equipment (such as scansInstrument or digital camera) check the character printed on paper, its shape is determined by the mode for detecting dark, bright, then uses character recognitionShape is translated into the process of computword by method.
In OCR identification process, the position using each character in character machining model inspection picture to be identified is first had toInformation, and then obtain character picture corresponding with each character.Training character machining model needs a large amount of character machining trainingSample data, wherein every group of character machining training sample data include at least each word in picture to be identified and picture to be identifiedAccord with the location information of image.Character machining training sample data, it is especially relevant to rare foreign languages text (e.g. Hindi)Character machining training sample data are normally based on and generate after being manually labeled to each character in picture to be identified,But the efficiency manually marked is relatively low, cost of labor is relatively high.
Summary of the invention
The embodiment of the present disclosure provides generation, character detection method, device, equipment and the medium of a kind of character machining model,To realize the automatic marking to character each in picture, artificial character label work is substituted, improves the efficiency of character label, in turnA large amount of character machining training sample data are quickly generated for training character machining model.
In a first aspect, the embodiment of the present disclosure provides a kind of generation method of character machining model, this method comprises:
An at least text picture to be identified is constructed according at least one character picture and blank background picture;
Obtain the location information of each character picture in an at least text picture to be identified;
The location information of each character picture in the text picture to be identified and the text picture to be identified is correspondingAs one group of character machining training sample data;
Using at least one set of character machining training sample data, standard test models are trained, generate character machiningModel.
Further, described that an at least text to be identified is constructed according at least one character picture and blank background picturePicture, comprising:
At least one character picture is spliced at least one character row image;
An at least text picture to be identified is constructed according at least one described character row image and blank background picture.
Further, described at least one character row image according to and blank background picture construct at least one wait knowOther text picture, comprising:
At least one described character row image is added on the blank background picture according to default location information, is constructedAn at least text picture to be identified out.
Further, the location information includes location information and rotation angle information.
Further, described by each character picture in the text picture to be identified and the text picture to be identifiedLocation information to before should be used as one group of character machining training sample data, further includes:
Noise is added to the text picture to be identified.
Further, the standard test models are original machine learning model;
It is described that standard test models are trained using at least one set of character machining training sample data, generate characterDetection model, comprising:
Using at least one set of character machining number of training accordingly and standard character detect training sample set, to described originalMachine learning model is trained, and generates character machining model.
Further, the character includes hindi characters.
Second aspect, the embodiment of the present disclosure additionally provide a kind of character detection method, comprising:
Obtain text picture to be identified;
The text picture to be identified is input to the life by character machining model described in disclosure any embodimentThe character machining model generated at method;
Obtain the location information of each character picture in the text picture to be identified of the character machining model output.
Further, the location information includes location information and rotation angle information, and the character includes Hindi wordSymbol.
The third aspect, the embodiment of the present disclosure additionally provide a kind of generating means of character machining model, which includes:
Text picture constructing module to be identified, for being constructed at least according at least one character picture and blank background pictureOne text picture to be identified;
Location information obtains module, for obtaining the positioning of each character picture in an at least text picture to be identifiedInformation;
Training sample data generation module, being used for will be in the text picture to be identified and the text picture to be identifiedThe location information of each character picture is to should be used as one group of character machining training sample data;
Model training module, for being carried out to standard test models using at least one set of character machining training sample dataTraining generates character machining model.
Further, the text picture constructing module to be identified includes: character row image configuration unit and text to be identifiedWord picture structural unit, wherein
The character row image configuration unit, at least one character picture to be spliced at least one character row figurePicture;
The text picture structural unit to be identified, for according at least one described character row image and blank background figurePiece constructs an at least text picture to be identified.
Further, the text picture structural unit to be identified is specifically used for pressing at least one described character row imageIt is added on the blank background picture according to default location information, constructs an at least text picture to be identified.
Further, the location information includes location information and rotation angle information.
Further, the generating means of the character machining model further include: picture processing module, for will it is described toThe location information of each character picture is to should be used as one group of character machining in identification text picture and the text picture to be identifiedBefore training sample data, noise is added to the text picture to be identified.
Further, the standard test models are original machine learning model;
The model training module is specifically used for using at least one set of character machining number of training accordingly and standard characterTraining sample set is detected, the original machine learning model is trained, generates character machining model.
Further, the character includes hindi characters.
Fourth aspect, the embodiment of the present disclosure additionally provide a kind of character machining device, comprising: text picture to be identified obtainsModule, for obtaining text picture to be identified;
Detection module, for being input to the text picture to be identified by character described in disclosure any embodimentThe character machining model that the generating means of detection model generate;
Testing result obtains module, each in the text picture to be identified for obtaining the character machining model outputThe location information of character picture.
Further, the location information includes location information and rotation angle information, and the character includes Hindi wordSymbol.
5th aspect, the embodiment of the present disclosure additionally provide a kind of electronic equipment, which includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processingDevice realizes the generation method of the character machining model as described in disclosure any embodiment.
6th aspect, the embodiment of the present disclosure additionally provide a kind of computer readable storage medium, are stored thereon with computerProgram realizes the generation method of the character machining model as described in the disclosure any embodiment when program is executed by processor.
7th aspect, the embodiment of the present disclosure additionally provide a kind of electronic equipment, which includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processingDevice realizes the character detection method as described in disclosure any embodiment.
Eighth aspect, the embodiment of the present disclosure additionally provide a kind of computer readable storage medium, are stored thereon with computerProgram realizes the character detection method as described in the disclosure any embodiment when program is executed by processor.
The embodiment of the present disclosure passes through to be identified according at least one character picture and blank background picture construction at least oneCharacter image, and then by the location information of each character picture in text picture to be identified and text picture to be identified to should be used asThe technical solution of one group of character machining training sample data quickly generates a large amount of character machining training sample to realize, is come with thisSubstitution by way of generating character machining training sample, improves the generation of character machining training sample effect manually markingRate, and then training sample can be provided quickly and in large quantities for training character machining model.Above-mentioned technical proposal is for that can examineThe character machining model for surveying rare foreign languages text is that significantly, solve by manually marking and generate for rare foreign languages textExisting low efficiency and problem at high cost when the character machining training sample of word.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the generation method for character machining model that the embodiment of the present disclosure one provides;
Fig. 2 is a kind of flow chart for character detection method that the embodiment of the present disclosure two provides;
Fig. 3 is a kind of structural schematic diagram of the generating means for character machining model that the embodiment of the present disclosure three provides;
Fig. 4 is a kind of structural schematic diagram for character machining device that the embodiment of the present disclosure four provides;
Fig. 5 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present disclosure five provides.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouchedThe specific embodiment stated is used only for explaining the disclosure, rather than the restriction to the disclosure.It also should be noted that in order to justPart relevant to the disclosure is illustrated only in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart of the generation method for character machining model that the embodiment of the present disclosure one provides, the present embodimentIt is applicable to the case where generating the character machining model for detecting location information of the character in text picture to be identified, the partyMethod can be executed by the generating means of character machining model, which can be realized by the way of software and/or hardware, shouldDevice can be configured in electronic equipment, such as typically computer etc..As shown in Figure 1, this method specifically includes following stepIt is rapid:
S110, an at least text picture to be identified is constructed according at least one character picture and blank background picture.
Typically, character picture is the image of single character corresponding with rare foreign languages language, specifically can be Hindi wordAccord with image.The a large amount of character machining training sample data for rare foreign languages language are constructed to instruct character machining modelPractice, so that the character machining model after training can successfully detect determining for each rare foreign languages character in text picture to be identifiedPosition information, and then character recognition model can be used, character is carried out to each rare foreign languages character picture in text picture to be identifiedIdentification.
Specifically, a large amount of corpus corresponding with rare foreign languages language on network, root can be obtained by web crawlers technologyAccording to and the corresponding Unicode of corpus the character picture of each character corresponding with corpus is obtained in fontlib, and then will be eachCharacter picture addition constitutes a text picture to be identified on a blank background picture, wherein adds by character pictureWhen on blank background picture, need to determine location information of the character picture in blank background picture first.
Specifically, location information includes location information and rotation angle information.
Wherein, location information specifically can be the coordinate of the boundary point or central point of character picture in blank background pictureLocation information, (generally directed to each character figure of same language by taking rectangle frame known to size is in the boundary of character picture as an exampleThe size of picture is consistent), then can by the co-ordinate position information of the upper left boundary point of the character picture and bottom right boundary point (orThe co-ordinate position information of person lower-left boundary point and upper right boundary point) location information as the character picture, it can also be by the wordAccord with location information of the co-ordinate position information of the central point of image as the character picture.Rotation angle information specifically can be wordAccord with the horizontal symmetry axis of image and the angle information of horizontal direction, or the apical axis of character picture and the folder of vertical directionAngle information, the angle (acute angle) that horizontal symmetry axis can be specifically rotated clockwise to horizontal direction are set as positive value, will be horizontal symmetricalThe angle (acute angle) that axis rotates counterclockwise to horizontal direction is set as negative value, and axis of ordinates can also be set in the same wayIt is fixed.
It, can will be according at least one character picture and blank background figure as a kind of specific embodiment of the present embodimentPiece constructs an at least text picture to be identified, specifically: at least one character picture is spliced at least one character row figurePicture;An at least text picture to be identified is constructed according at least one character row image and blank background picture.
It is following to be explained with Chinese due to using rare foreign languages to be not easy to be illustrated.For example, according to corpus" I am Chinese " get respectively with character " I ", "Yes", " in ", the corresponding character picture of " state ", " people ", wherein it is eachThe pixel of character picture is 10*10, this five character pictures can be spliced into the character row figure that a pixel is 10*50 firstThen picture determines the rotation angle when character row image that this pixel is 10*50 is added on blank background picture again, withAnd the location information in the blank background picture that pixel is 480*480, it finally will according to determining rotation angle and location informationThe addition of character row image is configured to a text picture to be identified in blank background picture.
The example above be by least one character picture it is seamless spliced at least one character row image, can also be nearA few character picture is spliced at least one character row image by preset interval, wherein is spaced between each adjacent character imagePixel size can be identical, be also possible to different (needing respectively record the pixel size at each interval).
Typically, at least a text to be identified will can be constructed according at least one character row image and blank background pictureWord picture, specifically: at least one character row image is added on blank background picture according to default location information, is constructedAn at least text picture to be identified.
Default location information can be the location information determined according to random algorithm and rotation angle information.
The specific can be that determining the location point information and rotation angle of the left upper apex of character row image boundary to be addedDegree, such as the pixel coordinate of location point information is (5,20), rotation angle is 5 °, then by the left upper apex pair of the character row imageQuasi- pixel coordinate is the location point of (5,20), while being added to blank background picture after the character row image is rotated 5 ° counterclockwiseIn.
Wherein, text picture to be identified is constituted after only can adding a character row image in a blank background picture,Text picture to be identified is constituted after at least two character row images can also be added.
If at least two character row images are added on blank background picture simultaneously, need to comprehensively consider at least twoPixel size, location information and the rotation angle information of each character row image in a character row image, to avoid existing notThe phenomenon that being overlapped with character row image.
Specifically, blank background picture can be divided at least two row regions, distinguished based on each row region randomThe location information and rotation angle information for determining the character row image being added in corresponding row region, so that character row image is completeIt falls into corresponding row region.Wherein, the quantity for being added to character row image in blank background picture is less than or equal to the row dividedThe quantity in region.
First determine first character row image in the position of blank background picture according to random algorithm specifically, can also beThe rotation angle information of information and first character row image, and then first character row image is added to blank background figureIn piece;Then position of second character row image in the remaining area of the blank background picture is determined further according to random algorithmThe rotation angle information of information and second character row image, and then second character row image is added to the blank background(do not occur with first character row image be overlapped) in picture, adds third character row image Shi Buyu first character row figurePicture and second character row image are overlapped, and so on.
It above are only exemplary illustration, the present embodiment is not specifically limited in this embodiment, as long as can be by least two character rowsImage is not added to overlappingly in blank background picture.
S120, the location information for obtaining each character picture in an at least text picture to be identified.
After construction complete text picture to be identified, the position letter of each character picture in the text picture to be identified is obtainedBreath and rotation angle information.
Connect aforementioned citing, the pixel of character row image is 10*50, including five character pictures, each character picturePixel is 10*10, and location information of the character row image in text picture to be identified is the picture of character row image left upper apexPlain coordinate is (5,20), and rotation angle is 5 °.It follows that in character row image each character picture rotation angle and wordThe identical rotation angle of symbol row image is 5 °, and the pixel coordinate of the left upper apex of first character picture is (5,20), and eachThe pixel size of character picture be it is known, connected between each character picture without interval, and then can successively determine each wordAccord with the location information of image.Specifically, the location information of each character picture determined can be each boundary point of character picturePixel coordinate information, be also possible to the pixel coordinate information of character picture central point.
If not being to be connected without interval between each character picture in character row image, in conjunction with the picture at each intervalPlain size can also successively determine the location information of each character picture.
If text picture to be identified is generated after successively each character picture is added on blank background picture,So there is a proprietary location information and rotation angle for each character picture, and then each character picture is proprietaryLocation information and rotation angle respectively as corresponding character picture location information.
S130, by the location information of each character picture in text picture to be identified and text picture to be identified to should be used asOne group of character machining training sample data.
In text picture to be identified has been determined after the location information of each character picture, by the positioning of these character picturesInformation is mapped with text picture to be identified, can be used as one group of character machining training sample data.
Multistage corpus corresponding with rare foreign languages language is obtained by web crawlers, can be constructed largely based on these corpusText picture to be identified, and then generate the character machining training sample data for being largely directed to rare foreign languages language.Even, forThe same section of corpus that web crawlers obtains, can be by each character picture corresponding from the corpus according to different default location informationsIt is added in different blank background pictures, to generate different text pictures to be identified, a large amount of needle thus also can be generatedTo the character machining training sample data of rare foreign languages language.
As a kind of specific embodiment of the present embodiment, by the text picture to be identified and the text to be identifiedThe location information of each character picture, can also be to described to before should be used as one group of character machining training sample data in word pictureText picture to be identified adds noise.
Often there is noise spot on the text picture to be identified that character machining model detects in practical applications, e.g.Gaussian noise or salt-pepper noise.Therefore, for the text picture to be identified in simulation of real scenes, can construction generate toAfter identifying text picture, picture noise, e.g. Gaussian noise or salt-pepper noise etc. are added for it.
S140, using at least one set of character machining training sample data, standard test models are trained, generate characterDetection model.
After generating a large amount of character machining training sample data, using these character machining training sample data to markQuasi- detection model is trained, and generation is able to detect to be identified after learning standard test models according to these sample datasThe character machining model of each rare foreign languages character picture in text picture.
Optionally, the standard test models are original machine learning model.
It is corresponding, it is described that standard test models are trained using at least one set of character machining training sample data, it is rawAt character machining model, specifically: accordingly and standard character detects training sample using at least one set of character machining number of trainingThis collection is trained the original machine learning model, generates character machining model.
Original machine learning model can refer to unbred machine learning model.Character machining model can refer to throughThe machine learning model after training is crossed, for detecting the location information of each character picture in text picture to be identified, inputs and isText picture to be identified exports as the location information of each character picture in text picture to be identified.Wherein, standard character detectsTraining sample concentrate include character machining training sample can refer to it is existing, for training character machining model that can succeedIt detects the training sample of majority language in picture to be identified (such as Chinese, English etc.) character picture location information, namely is notThe character machining training sample generated by S110-S130.In turn, using a large amount of character machining number of training accordingly and markQuasi- character machining training sample set generates character machining model, can either detect after being trained to original machine learning modelThe location information of majority language character picture in text picture to be identified out is also capable of detecting when small in text picture to be identifiedThe location information of languages character picture.
In the above-mentioned technical solutions, the corpus for being largely directed to rare foreign languages language is obtained by web crawlers technology, according toThe contents of these corpus obtain with the character picture of corresponding each character, and then by these character pictures according to preset positioningInformation is added in blank background picture, constructs a large amount of text picture to be identified automatically.By text picture to be identified and itsIn each character picture location information be mapped can be used as train character machining model character machining training sample data,A large amount of character machining training sample data can be quickly generated using method provided in this embodiment as a result, so that characterDetection model can effectively identify the location information of corresponding rare foreign languages character picture in text picture to be identified after being trained to.
Above-mentioned technical proposal is instead of manually using callout box to text to be identified existing, corresponding with rare foreign languages languageEach character is labeled in picture, determines location information of each character in text picture to be identified, and then generates training characterThe character machining training sample data of detection model solve the problems, such as manually to mark existing low efficiency and at high cost, realizationThe automation for generating character machining training sample data, improves the formation efficiency of character machining training sample data.
Embodiment two
Fig. 2 is a kind of flow chart for character detection method that the embodiment of the present disclosure two provides, and the present embodiment is applicable to examineThe case where surveying the location information of each character picture in text picture to be identified, this method can be executed by character machining device,The device can realize that the device can be configured in electronic equipment, such as be typically by the way of software and/or hardwareComputer etc..
As shown in Fig. 2, this method specifically comprises the following steps:
S210, text picture to be identified is obtained.
Text picture to be identified in the present embodiment refers to that user needs to carry out character recognition in actual applicationThe text picture with rare foreign languages language, e.g. have hindi characters text picture.
S220, text picture to be identified is input to life by character machining model described in disclosure any embodimentThe character machining model generated at method.
In the actual application for carrying out character recognition to text picture to be identified, it is necessary first to use character machining mouldType detects the location information of each character in text picture to be identified, is then being based on each character using character recognition modelLocation information each character in text picture to be identified is identified.
Wherein, character machining model is referred to the description of previous embodiment, and character machining model specifically refers to energyEnough detect the character machining model of the location information of each hindi characters in text picture to be identified.
The text picture to be identified including hindi characters that will acquire is input to method described in the embodiment of the present disclosure oneIn the character machining model of generation, to obtain the location information of each hindi characters in text picture to be identified.
S230, the location information for obtaining each character picture in the text picture to be identified of character machining model output.
Wherein, location information includes location information and rotation angle information.
After character machining model detects text picture to be identified, each print ground in the text picture to be identified is exportedThe location information of language character picture, and then make character recognition model to each hindi characters image in text picture to be identifiedCarry out character recognition.
Using aforementioned when the embodiment of the present disclosure detects the location information of each character in text picture to be identifiedThe character machining model that embodiment provides, since the character machining model that previous embodiment provides is a large amount of according to constructing automaticallyWhat training sample was trained, training sample can be specific to a certain rare foreign languages language, e.g. Hindi, Jin ErbenThe character detection method that embodiment provides can effectively detect corresponding rare foreign languages language character figure in text picture to be identifiedThe location information of picture.
Embodiment three
Fig. 3 is a kind of structural schematic diagram of the generating means for character machining model that the embodiment of the present disclosure provides, this implementationExample is applicable to the case where generating the character machining model for detecting location information of the character in text picture to be identified.It shouldDevice can realize that the device can be configured in electronic equipment by the way of software and/or hardware.As shown in figure 3, the dressSet may include: that text picture constructing module 310 to be identified, location information obtain module 320, training sample data generation module330 and model training module 340, wherein.
Text picture constructing module 310 to be identified, for being constructed according at least one character picture and blank background pictureAn at least text picture to be identified;
Location information obtains module 320, for obtaining each character picture in an at least text picture to be identifiedLocation information;
Training sample data generation module 330 is used for the text picture to be identified and the text figure to be identifiedThe location information of each character picture is to should be used as one group of character machining training sample data in piece;
Model training module 340, for using at least one set of character machining training sample data, to standard test models intoRow training, generates character machining model.
Further, text picture constructing module 310 to be identified includes: character row image configuration unit and text to be identifiedPicture structural unit, wherein
The character row image configuration unit, at least one character picture to be spliced at least one character row figurePicture;
The text picture structural unit to be identified, for according at least one described character row image and blank background figurePiece constructs an at least text picture to be identified.
Further, the text picture structural unit to be identified is specifically used for pressing at least one described character row imageIt is added on the blank background picture according to default location information, constructs an at least text picture to be identified.
Further, the location information includes location information and rotation angle information.
Further, the generating means of above-mentioned character machining model further include: picture processing module, for will it is described toThe location information of each character picture is to should be used as one group of character machining in identification text picture and the text picture to be identifiedBefore training sample data, noise is added to the text picture to be identified.
Further, the standard test models are original machine learning model;
Model training module 340 is specifically used for using at least one set of character machining number of training accordingly and standard character inspectionTraining sample set is surveyed, the original machine learning model is trained, generates character machining model.
Specifically, the character includes hindi characters.
The embodiment of the present disclosure obtains the corpus for being largely directed to rare foreign languages language by web crawlers technology, according to these languagesThe content of material obtain with the character picture of corresponding each character, and then these character pictures are added according to preset location informationIt adds in blank background picture, constructs a large amount of text picture to be identified automatically.By text picture to be identified and wherein each wordThe location information of symbol image, which is mapped, can be used as training the character machining training sample data of character machining model, as a result,A large amount of character machining training sample data can be quickly generated using method provided in this embodiment, so that character machining mouldType can effectively identify the location information of corresponding rare foreign languages character picture in text picture to be identified after being trained to.
Above-mentioned technical proposal is instead of manually using callout box to text to be identified existing, corresponding with rare foreign languages languageEach character is labeled in picture, determines location information of each character in text picture to be identified, and then generates training characterThe character machining training sample data of detection model solve the problems, such as manually to mark existing low efficiency and at high cost, realizationThe automation for generating character machining training sample data, improves the formation efficiency of character machining training sample data.
The generating means for the character machining model that the embodiment of the present disclosure provides, the character machining model provided with embodiment oneGeneration method belong to same inventive concept, the technical detail of detailed description not can be found in embodiment in the embodiments of the present disclosureOne, and the embodiment of the present disclosure and the beneficial effect having the same of embodiment one.
Example IV
Fig. 4 is a kind of structural schematic diagram for character machining device that the embodiment of the present disclosure provides, and the present embodiment is applicable toThe case where detecting the location information of each character picture in text picture to be identified.The device can be using software and/or hardwareMode realizes that the device can be configured in electronic equipment.As shown in figure 4, the apparatus may include: text picture to be identified obtainsModulus block 410, detection module 420 and testing result obtain module 430, wherein
Text picture to be identified obtains module 410, for obtaining text picture to be identified;
Detection module 420, for the text picture to be identified to be input to character described in disclosure any embodimentThe character machining model that the generating means of detection model generate;
Testing result obtains module 430, for obtaining the text picture to be identified of the character machining model outputIn each character picture location information.
Further, the location information includes location information and rotation angle information, and the character includes Hindi wordSymbol.
Using aforementioned when the embodiment of the present disclosure detects the location information of each character in text picture to be identifiedThe character machining model that embodiment provides, since the character machining model that previous embodiment provides is a large amount of according to constructing automaticallyWhat training sample was trained, training sample can be specific to a certain rare foreign languages language, e.g. Hindi, Jin ErbenThe character detection method that embodiment provides can effectively detect corresponding rare foreign languages language character figure in text picture to be identifiedThe location information of picture.
The character machining device that the embodiment of the present disclosure provides, the character detection method provided with embodiment two belong to same hairBright design, the technical detail of detailed description not can be found in embodiment two in the embodiments of the present disclosure, and the embodiment of the present disclosure withThe beneficial effect having the same of embodiment two.
Embodiment five
The embodiment of the present disclosure provides a kind of electronic equipment, and below with reference to Fig. 5, it illustrates be suitable for being used to realizing the disclosureThe structural schematic diagram of the electronic equipment (such as terminal device or server) 500 of embodiment.Electronics in the embodiment of the present disclosure is setIt is standby to can include but is not limited to such as mobile phone, laptop, digit broadcasting receiver, personal digital assistant (PDA), put downThe mobile terminal of plate computer (PAD), portable media player (PMP), car-mounted terminal (such as vehicle mounted guidance terminal) etc.And the fixed terminal of such as number TV, desktop computer etc..Electronic equipment shown in Fig. 5 is only an example, is not answeredAny restrictions are brought to the function and use scope of the embodiment of the present disclosure.
As shown in figure 5, electronic equipment 500 may include processing unit (such as central processing unit, graphics processor etc.)501, random access can be loaded into according to the program being stored in read-only memory (ROM) 502 or from storage device 508Program in memory (RAM) 503 and execute various movements appropriate and processing.In RAM 503, it is also stored with electronic equipmentVarious programs and data needed for 500 operations.Processing unit 501, ROM 502 and RAM 503 pass through the phase each other of bus 504Even.Input/output (I/O) interface 505 is also connected to bus 504.
In general, following device can connect to I/O interface 505: including such as touch screen, touch tablet, keyboard, mouse, taking the photographAs the input unit 506 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibrationThe output device 507 of dynamic device etc.;Storage device 508 including such as tape, hard disk etc.;And communication device 509.Communication device509, which can permit electronic equipment 500, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 5 shows toolThere is the electronic equipment 500 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be withAlternatively implement or have more or fewer devices.
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 descriptionSoftware program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable mediumOn computer program, which includes the program code for method shown in execution flow chart.In such realityIt applies in example, which can be downloaded and installed from network by communication device 509, or from storage device 508It is mounted, or is mounted from ROM 502.When the computer program is executed by processing unit 501, the embodiment of the present disclosure is executedCharacter machining model generation method or character detection method in the above-mentioned function that limits.
Embodiment six
The embodiment of the present disclosure additionally provides a kind of computer readable storage medium, and computer-readable medium can be computerReadable signal medium or computer readable storage medium either the two any combination.Computer readable storage mediumSuch as may be-but not limited to-system, device or the device of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, orAny above combination.The more specific example of computer readable storage medium can include but is not limited to: have one or moreIt is the electrical connection of a conducting wire, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasableFormula programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storageDevice, magnetic memory device or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can beIt is any to include or the tangible medium of storage program, the program can be commanded execution system, device or device using or withIt is used in combination.And in the disclosure, computer-readable signal media may include in a base band or as carrier wave a partThe data-signal of propagation, wherein carrying computer-readable program code.The data-signal of this propagation can use a variety ofForm, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media may be used alsoTo be any computer-readable medium other than computer readable storage medium, which can send,It propagates or transmits for by the use of instruction execution system, device or device or program in connection.ComputerThe program code for including on readable medium can transmit with any suitable medium, including but not limited to: electric wire, optical cable, radio frequencyOr above-mentioned any appropriate combination (RF) etc..
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and notIt is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricityWhen sub- equipment executes, so that the electronic equipment: according at least one character picture and blank background picture construct at least one toIdentify text picture;Obtain the location information of each character picture in an at least text picture to be identified;By described wait knowThe location information of each character picture is instructed to should be used as one group of character machining in other text picture and the text picture to be identifiedPractice sample data;Using at least one set of character machining training sample data, standard test models are trained, generate character inspectionSurvey model.
Perhaps above-mentioned computer-readable medium carries one or more program when said one or multiple program quiltsWhen the electronic equipment executes, so that the electronic equipment: obtaining text picture to be identified;The text picture to be identified is input toThe character machining model generated by the generation method of character machining model described in disclosure any embodiment;Obtain the wordAccord with the location information of each character picture in the text picture to be identified of detection model output.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereofMachine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C++, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code canFully to execute, partly execute on the user computer on the user computer, be executed as an independent software package,Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part.In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN)Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet serviceProvider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journeyThe architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generationA part of one module, program segment or code of table, a part of the module, program segment or code include one or more useThe executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in boxThe function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actuallyIt 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 to infuseMeaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holdingThe dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instructionCombination realize.
Being described in module involved in the embodiment of the present disclosure can be realized by way of software, can also be by hardThe mode of part is realized.Wherein, the title of module does not constitute the restriction to the module itself under certain conditions, for example, " toIdentification text picture constructing module " is also described as " module of at least one text picture to be identified of construction ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the artMember is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristicScheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent featureAny combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosureCan technical characteristic replaced mutually and the technical solution that is formed.