The content of the invention
Based on this, it is necessary to for there is provided a kind of character recognition the problem of the character recognition degree of accuracy is not high in conventional art
Method, device, computer equipment and computer-readable recording medium, overall identification can be carried out to character picture, word is improved
Accord with the degree of accuracy of identification.
A kind of character identifying method, including step:
Character picture to be identified is obtained, gray processing processing is carried out to the character picture to be identified, pretreatment character is obtained
Image;
Default character recognition model is inputted using the pretreatment character picture as an entirety, by the character recognition
Model calculates the first character identification result of pretreatment character picture, wherein instruction of the character recognition model by character picture
Practice sample set training setting neural network model generation;
The pretreatment character picture is rotated several times, one will be used as by postrotational pretreatment character picture every time
Individual entirety inputs the character recognition model, and each postrotational pretreatment character picture is calculated by the character recognition model
The second character identification result;
The character picture to be identified is drawn according to first character identification result and second character identification result
In character.
Above-mentioned character identifying method, pre-sets character recognition model, then will be overall after character picture to be identified processing
Character recognition model is inputted, overall identification is carried out to character picture by character recognition model, it is no longer necessary to carry out Character segmentation,
So as to avoid the misrecognition caused during Character segmentation due to Characters Stuck, the degree of accuracy of character recognition, this method are improved
Effective robust, with larger application value.
In one embodiment, according to being drawn first character identification result and second character identification result
Character in character picture to be identified includes:If first character identification result is identical with each second character identification result,
Calculate the length-width ratio of the pretreatment character picture before rotation and the length-width ratio of each postrotational pretreatment character picture;Calculate
The character total length of first character identification result or the second character identification result;If all length-width ratios are all higher than the word
The product of symbol total length and the first ratio and the product for being less than the character total length and the second ratio, first character is known
Other result or the second character identification result as the character picture to be identified character identification result.In view of working as character picture
Pixel it is more symmetrical when, it is consistent to easily cause each recognition result, can be wrong if at this moment occurring in that misrecognition
As a result final output is treated as, and by the comparison of length-width ratio and character total length, then it is possible to prevente effectively from the problem, is further sieved
Select correct recognition result.
In one embodiment, the character picture to be identified is carried out after gray processing processing, obtains pretreatment character
Before image, in addition to step:Image binaryzation is carried out to the character picture to be identified after gray processing, bianry image is obtained;It is right
The bianry image carries out image normalization.
In one embodiment, carrying out image normalization to the bianry image includes:The bianry image is adjusted to
The pattern of black background white characters.
In one embodiment, the pattern for the bianry image being adjusted into black background white characters includes:Obtain institute
State the first profile of the white portion in bianry image;Black and white upset processing is carried out to the bianry image, obtained after upset
Second profile of the white portion in bianry image;The Breadth Maximum and second profile of the first profile are calculated respectively
Breadth Maximum;If the Breadth Maximum of the first profile is less than the Breadth Maximum of second profile, retain before black and white upset
Bianry image, otherwise retains the bianry image after black and white upset.
In one embodiment, carrying out image normalization to the bianry image also includes:By the side of the bianry image
Boundary is removed, and the bianry image removed behind border is zoomed into pre-set dimension.
In one embodiment, the border of the bianry image is removed includes:Water-filling is entered respectively to the bianry image
Flat integral projection and vertical integral projection;The row pixel of the bianry image after horizontal integral projection is traveled through, the row picture is obtained
Starting line number and end line number in element;The row pixel of the bianry image after vertical integral projection is traveled through, the row picture is obtained
Starting columns and end columns in element;According to starting line number, terminate line number, starting columns and the end columns setting two-value
Area-of-interest in image, will remove the overseas border of region of interest and removes in the bianry image.
A kind of character recognition device, including:
Character picture pretreatment module, for obtaining character picture to be identified, ash is carried out to the character picture to be identified
Degreeization processing, obtains pretreatment character picture;
First character recognition module, knows for the pretreatment character picture to be inputted into default character as an entirety
Other model, the first character identification result of pretreatment character picture is calculated by the character recognition model, wherein the character
Identification model is generated by the training sample set training setting neural network model of character picture;
Second character recognition module, for being rotated several times to the pretreatment character picture, after rotating every time
Pretreatment character picture as entirety input the character recognition model, calculated every time by the character recognition model
Second character identification result of postrotational pretreatment character picture;
Character identification result determining module, for according to first character identification result and the second character recognition knot
Fruit draws the character in the character picture to be identified.
Above-mentioned character recognition device, pre-sets character recognition model, then will be overall after character picture to be identified processing
Character recognition model is inputted, overall identification is carried out to character picture by character recognition model, it is no longer necessary to carry out Character segmentation,
So as to avoid the misrecognition caused during Character segmentation due to Characters Stuck, the degree of accuracy of character recognition is improved, the character
The effective robust of identifying device, with larger application value.
A kind of computer equipment, including memory, processor and storage can be run on a memory and on a processor
Computer program, the step of above-mentioned any one methods described is realized during the computing device described program.
Above computer equipment, pre-sets character recognition model, then will be overall defeated after character picture to be identified processing
Enter character recognition model, overall identification is carried out to character picture by character recognition model, it is no longer necessary to carry out Character segmentation, from
And the misrecognition caused during Character segmentation due to Characters Stuck is avoided, the degree of accuracy of character recognition is improved, the computer
The effective robust of equipment, with larger application value.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is executed by processor
The step of Shi Shixian above-mentioned any one methods describeds.
Above computer readable storage medium storing program for executing, pre-sets character recognition model, then handles character picture to be identified
Overall input character recognition model, carries out overall identification to character picture, it is no longer necessary to carry out word by character recognition model afterwards
Symbol segmentation, so that the misrecognition caused when avoiding Character segmentation due to Characters Stuck, improves the degree of accuracy of character recognition,
The effective robust of the computer-readable recording medium, with larger application value.
Embodiment
It is below in conjunction with the accompanying drawings and preferably real further to illustrate the effect of the technological means of the invention taken and acquirement
Example is applied, to technical scheme, clear and complete description is carried out.
As shown in figure 1, there is provided a kind of character identifying method, including step in one embodiment:
S110, acquisition character picture to be identified, carry out gray processing processing to the character picture to be identified, are pre-processed
Character picture;
Character picture to be identified is the image for needing to recognize character.Gray processing processing is carried out to images to be recognized can root
Realized according to existing mode in the prior art, to image obtain the pretreatment word of character picture to be identified after gray processing processing
Accord with image.
S120, the pretreatment character picture as entirety inputted into default character recognition model, by the word
Symbol identification model calculates the first character identification result of pretreatment character picture, wherein the character recognition model is by character figure
The training sample set training setting neural network model generation of picture;
Default character recognition model sets the model that neural network model is generated to be trained by training sample set, character
Identification model is used to carry out character recognition to character picture to be identified.Setting neural network model has polytype, optionally, if
Neural network model is determined for BP (Back Propagation, backpropagation) neural network model.Training sample set includes multiple
Character picture training sample, optionally, after original character image is obtained, gray processing, binaryzation is carried out to original character image
With normalization etc. a series of processing, obtain character picture training sample.It is not that character picture, which is pre-processed, as an entirety input
Need to carry out Character segmentation to pretreatment character picture, character recognition is carried out directly as an entirety.Character figure will be pre-processed
As being inputted as an entirety after character recognition model, character recognition model obtains character identification result A.
S130, to it is described pretreatment character picture rotated several times, will every time postrotational pretreatment character picture
The character recognition model is inputted as an entirety, each postrotational pretreatment word is calculated by the character recognition model
Accord with the second character identification result of image;
The number of times that pretreatment character picture is rotated can be determined according to actual needs, each postrotational pretreatment
Character picture inputs character recognition model, obtains every time the character identification result of postrotational pretreatment character picture.For example,
Due to pretreatment character picture be likely to be just put or it is counter put, therefore the direction of character can not be determined, so, as shown in Fig. 2
In one embodiment, three rotations can be carried out to pretreatment character picture:90 is turned clockwise to pretreatment character picture A
Degree obtains pretreatment character picture B, obtains pretreatment character picture C and right to pretreatment character picture A dextrorotation turnbacks
Pretreatment character picture C dextrorotations, which are turn 90 degrees, to be obtained pre-processing character picture D, and pretreatment character picture A is pre- in S120
Processing character image.Three postrotational pretreatment character pictures are inputted into character recognition model respectively, you can to obtain character
Recognition result B, character identification result C and character identification result D.
S140, the character to be identified drawn according to first character identification result and second character identification result
Character in image.
The character identifying method that the present embodiment is provided can realize that program is run in the terminal by corresponding program,
For example in mobile phone, tablet personal computer or computer.This method carries out overall identification to character picture region, eliminates Character segmentation
The step for, it is to avoid the misrecognition caused during Character segmentation due to Characters Stuck, effective robust, with larger application valency
Value.In addition, comparison of this method by each character identification result after image rotation, effectively prevent due to terminal modes of emplacement
The error of character recognition caused by difference, improves the accurate probability of actual identification.
In order to further improve the degree of accuracy of character recognition, in one embodiment, the character picture to be identified is entered
After the processing of row gray processing, obtain before pre-processing character picture, in addition to step:To the character picture to be identified after gray processing
Image binaryzation is carried out, bianry image is obtained;Image normalization is carried out to the bianry image.It should be noted that of the invention
This is not limited, can also only carry out the operation of image binaryzation, or only carry out the operation of image normalization, and or
Person also carried out outside image binaryzation and image normalization the processing of other images.
Image binaryzation is exactly that the gray value of the pixel on image is set into 0 or 255, that is, is in by whole image
Reveal obvious black and white effect.The binaryzation of image is conducive to the further processing of image, image is become simple, and data
Amount reduces, and can highlight the profile of target interested.Image binaryzation has a variety of implementations, optionally, is calculated using big Tianjin
Method realizes image binaryzation.
Image normalization is exactly that (finding one group of parameter using the not bending moment of image can disappear by a series of conversion
The influence converted except other transforming function transformation functions to image), pending original image is converted into corresponding sole criterion form (should
Canonical form image has invariant feature to translation, rotation, scaling equiaffine conversion).Image normalization allows image to support
The attack of anti-geometric transformation.Image normalization has a variety of implementations, for example, in one embodiment, to the bianry image
Carrying out image normalization includes S1101:The bianry image is adjusted to the pattern of black background white characters.
As shown in figure 3, in one embodiment, the bianry image to be adjusted to the pattern bag of black background white characters
Include:
S1101a, the white portion obtained in the bianry image the first profile A;
Extracting the profile of the white portion of bianry image has a variety of implementations, for example, using function
CvFindContours extracts profile A.
S1101b, to the bianry image carry out black and white upset processing, obtain upset after bianry image in white portion
The the second profile B divided;
It is that the white pixel point in bianry image is changed into black pixel point that black and white upset processing is carried out to bianry image,
Black pixel point is changed into white pixel point simultaneously.Carry out after black and white upset, can be extracted by function cvFindContours
Profile B.
S1101c, respectively calculating profile A Breadth Maximum maxw_a and profile B Breadth Maximum maxw_b;
Calculating the Breadth Maximum of profile can realize according to existing mode in the prior art.
If S1101d, profile A Breadth Maximum maxw_a are less than profile B Breadth Maximum maxw_b, retain black and white upset
Preceding bianry image, otherwise retains the bianry image after black and white upset.
Bianry image before upset is the bianry image in S1101a.Due to white portion wheel when picture is black matrix wrongly written or mispronounced character
The Breadth Maximum of white portion profile when wide Breadth Maximum is less than picture for white gravoply, with black engraved characters, therefore can be sentenced according to the rule
Whether disconnected artwork is the pattern of black matrix wrongly written or mispronounced character, so as to adjust.
In another embodiment, carrying out image normalization to the bianry image includes S1102:To the bianry image
Carrying out image normalization also includes:The border of the bianry image is removed, and the bianry image removed behind border is zoomed to
Pre-set dimension.It should be noted that step S1102 and step S1101 can be performed simultaneously, an execution can also be selected.Default chi
Very little to be determined according to actual needs, it is 50 pixels that bianry image for example is zoomed into height.
As shown in figure 4, in one embodiment, the border of the bianry image, which is removed, to be included:
S1102a, horizontal integral projection and vertical integral projection are carried out respectively to the bianry image;
The row pixel of the bianry image, obtains the starting in the row pixel after S1102b, the horizontal integral projection of traversal
Line number and end line number;
The row pixel of the bianry image, obtains the starting in the row pixel after S1102c, traversal vertical integral projection
Columns and end columns;
S1102d, the sense in starting line number, end line number, starting columns and the end columns setting bianry image
Interest region (ROI, region of interest), will remove the overseas border of region of interest and removes in the bianry image.Rise
Begin number, to terminate line number, starting columns and terminate the region that is fenced up of columns be area-of-interest.
It should be noted that the process of above-mentioned character picture processing to be identified is also applied for training sample in character recognition model
The acquisition of this collection, that is, obtain after multiple original character images, can carry out ash to multiple original character images using aforesaid way
Degreeization processing, image binaryzation and image normalization, then pass through nerve of the normalized character picture of multiple images to setting
Network model is trained, and retains network model parameter, obtains character recognition model.
As shown in figure 5, in one embodiment, according to first character identification result and the second character recognition knot
Fruit show that the character in the character picture to be identified includes:
If S1401, first character identification result are identical with each second character identification result, calculate pre- before rotation
The length-width ratio of processing character image and the every time length-width ratio of postrotational pretreatment character picture;First character is calculated to know
The character total length of other result or the second character identification result;
Due in practical, commercial to character recognition accuracy rate require it is stricter, it is therefore desirable to verification step S120 and
Character identification result in step S130 is consistent, could improve the actual accurate probability of identification.Therefore need to obtain in the step
Each character identification result obtained is compared, if each character identification result is consistent, retains the character identification result,
It is inconsistent if there is character identification result, then give up character identification result.For example, being obtained using identification method as shown in Figure 2
Obtain four character identification results:Character identification result A, character identification result B, character identification result C and character identification result D,
If character identification result A=character identification result B=character identification result C=character identification result D, retain, if four times
Character identification result is inconsistent, then gives up the character identification result.
Pretreatment character picture before rotation is the pretreatment character picture in step S120.For example, as shown in Fig. 2 should
Step calculates pretreatment character picture A, pretreatment character picture B, pretreatment character picture C and pretreatment character picture respectively
D four length-width ratio Ratio.
Due to each character identification result all same, so only needing to according to wherein any character identification result meter once
Calculate character total length StrLen.
If S1402, all length-width ratios are all higher than the product of the character total length and the first ratio and are less than the word
The product of total length and the second ratio is accorded with, first character identification result or the second character identification result are waited to know as described
The character identification result of other character picture.
First ratio A is less than the second ratio B, and two ratios can be determined according to actual needs.For example, A is set
For 1/2, B is set to 3/2, judges whether Ratio ∈ ((1/2) * StrLen, (3/2) * StrLen) set up respectively, if each
Ratio values belong in the range of this, then this character identification result is defined as to final recognition result, if part Ratio values do not belong to
In the range of this, then give up the character identification result.
When pixel or the more symmetrical content of character picture, each character identification result one is easily caused
Cause, if there is misrecognition, then the result of mistake can be treated as final output, and can be effective by the embodiment shown in Fig. 5
The problem is solved, correct character identification result is further filtered out.
For a better understanding of the present invention, described in detail with reference to a specific embodiment.
As shown in fig. 6, a kind of character identifying method includes training stage and test phase:
S1, training stage:
S11, acquisition include the training sample set of multiple character pictures, and gray processing is carried out to training sample set;
S12, using Otsu algorithm to after gray processing training sample set carry out image binaryzation, obtain bianry image;
S13, to bianry image carry out image normalization, including:Bianry image is adjusted to black background white characters
Pattern;Border, and uniform sizes size are gone to bianry image;Wherein adjustment pattern and removal border can be according to side described above
Formula is realized;
S14, the bianry image training BP neural network model after normalization is taken, and preserve neural network model parameter, extremely
This character recognition model trained.
S2, test phase:
S21, acquisition character picture to be identified, gray processing is carried out to character picture to be identified;
S22, using Otsu algorithm to after gray processing character picture to be identified carry out image binaryzation, obtain binary map
Picture;
S23, to bianry image carry out image normalization, including:Bianry image is adjusted to black background white characters
Pattern;Border, and uniform sizes size are gone to bianry image;Wherein adjustment pattern and removal border can be according to side described above
Formula is realized;
S24, take normalization after bianry image using train BP neural network model (character recognition model) progress
Identification, is identified result A, with the BP nerve nets trained after then the bianry image dextrorotation after normalization is turn 90 degrees
Network Model Identification is identified result B, then the BP trained will be used after the bianry image dextrorotation turnback after normalization
Neural network model identification is identified result C, with instruction after then the bianry image dextrorotation rotated after 180 degree is turn 90 degrees
The BP neural network Model Identification perfected is identified result D, it is ensured that the character picture of four direction recognized respectively once
To four recognition results, treat that next step is determined;
S25, judge whether recognition result A=recognition result B=recognition result C=recognition results D sets up, if four identification
As a result it is identical, then retain recognition result, into next step, if four recognition results are inconsistent, give up the result;
S26, the length-width ratio Ratio that four character pictures to be identified are calculated respectively and obtained recognition result character
Total length StrLen.Judge whether Ratio ∈ ((1/2) * StrLen, (3/2) * StrLen) set up respectively, if all Ratio values
Belong in the range of this, then this result is defined as to final recognition result, if condition is invalid, give up the result.
Based on same inventive concept, the present invention also provides a kind of character recognition device, below in conjunction with the accompanying drawings to word of the present invention
The embodiment of symbol identifying device is described in detail.
As shown in fig. 7, a kind of character recognition device, including:
Character picture pretreatment module 110, for obtaining character picture to be identified, is carried out to the character picture to be identified
Gray processing processing, obtains pretreatment character picture;
First character recognition module 120, for inputting default word using the pretreatment character picture as an entirety
Identification model is accorded with, the first character identification result of pretreatment character picture is calculated by the character recognition model, wherein described
Character recognition model is generated by the training sample set training setting neural network model of character picture;
Second character recognition module 130, for being rotated several times to the pretreatment character picture, will rotate every time
Pretreatment character picture afterwards inputs the character recognition model as an entirety, is calculated often by the character recognition model
Second character identification result of secondary postrotational pretreatment character picture;
Character identification result determining module 140, for according to first character identification result and second character knowledge
Other result draws the character in the character picture to be identified.
The character recognition device (character classifier) that the present embodiment is provided may operate in terminal, such as mobile phone, flat
In plate computer or computer.The device carries out overall identification to character picture region, and the step for eliminating Character segmentation is kept away
The misrecognition caused during Character segmentation due to Characters Stuck, effective robust, with larger application value are exempted from.In addition, should
Device effectively prevent caused by terminal modes of emplacement is different by the comparison of each character identification result after image rotation
Character recognition error, improve the accurate probability of actual identification.
In one embodiment, character identification result determining module 140 is in first character identification result and each
When two character identification results are identical, the length-width ratio of the pretreatment character picture before rotation and postrotational pretreatment every time are calculated
The length-width ratio of character picture;Calculate the character total length of first character identification result or the second character identification result;If institute
Some length-width ratios are all higher than the product of the character total length and the first ratio and are less than the character total length and the second ratio
Product, the character of first character identification result or the second character identification result as the character picture to be identified is known
Other result.When pixel or the more symmetrical content of character picture, each character identification result is easily caused unanimously,
If there is misrecognition, then the result of mistake can be treated as final output, and the problem can effectively be solved by the embodiment,
Further filter out correct character identification result.
In order to further improve the degree of accuracy of character recognition, in one embodiment, 110 pairs of character picture pretreatment module
The character picture to be identified is carried out after gray processing processing, is obtained before pretreatment character picture, is additionally operable to after gray processing
Character picture to be identified carry out image binaryzation, obtain bianry image, to the bianry image carry out image normalization.
In one embodiment, character picture pretreatment module 110 by the bianry image by being adjusted to black background
The pattern of white characters carries out image normalization to the bianry image.Optionally, character picture pretreatment module 110 obtains institute
State the first profile of the white portion in bianry image;Black and white upset processing is carried out to the bianry image, obtained after upset
Second profile of the white portion in bianry image;The Breadth Maximum and second profile of the first profile are calculated respectively
Breadth Maximum;If the Breadth Maximum of the first profile is less than the Breadth Maximum of second profile, retain before black and white upset
Bianry image, otherwise retains the bianry image after black and white upset.
In one embodiment, character picture pretreatment module 110 is also by the way that the border of the bianry image is removed, and
The bianry image removed behind border is zoomed into pre-set dimension image normalization is carried out to the bianry image.Optionally, character
110 pairs of bianry images of image pre-processing module carry out horizontal integral projection and vertical integral projection respectively;Traversal level is accumulated
Divide the row pixel of the bianry image after projection, obtain the starting line number in the row pixel and terminate line number;The vertical product of traversal
Divide the row pixel of the bianry image after projection, obtain the starting columns in the row pixel and terminate columns;According to initial row
Number, the area-of-interest terminated in line number, starting columns and the end columns setting bianry image, by the bianry image
Except the overseas border of region of interest is removed.
Other technical characteristics of above-mentioned character recognition device are identical with above-mentioned character identifying method, will not be described here.
As shown in figure 8, there is provided a kind of computer equipment, including memory, processor and storage in one embodiment
On a memory and the computer program that can run on a processor, following walk is realized during the computing device described program
Suddenly:
Character picture to be identified is obtained, gray processing processing is carried out to the character picture to be identified, pretreatment character is obtained
Image;
Default character recognition model is inputted using the pretreatment character picture as an entirety, by the character recognition
Model calculates the first character identification result of pretreatment character picture, wherein instruction of the character recognition model by character picture
Practice sample set training setting neural network model generation;
The pretreatment character picture is rotated several times, one will be used as by postrotational pretreatment character picture every time
Individual entirety inputs the character recognition model, and each postrotational pretreatment character picture is calculated by the character recognition model
The second character identification result;
The character picture to be identified is drawn according to first character identification result and second character identification result
In character.
In another embodiment, following steps are also realized during the computing device described program:According to described first
Character identification result and second character identification result show that the character in the character picture to be identified includes:If described
One character identification result is identical with each second character identification result, calculate rotation before pretreatment character picture length-width ratio with
And the length-width ratio of each postrotational pretreatment character picture;Calculate first character identification result or the second character recognition knot
The character total length of fruit;If all length-width ratios are all higher than the product of the character total length and the first ratio and are less than the word
The product of total length and the second ratio is accorded with, first character identification result or the second character identification result are waited to know as described
The character identification result of other character picture.
In another embodiment, following steps are also realized during the computing device described program:To described to be identified
Character picture is carried out after gray processing processing, is obtained before pre-processing character picture, in addition to step:Treating after gray processing is known
Other character picture carries out image binaryzation, obtains bianry image;Image normalization is carried out to the bianry image.
In another embodiment, following steps are also realized during the computing device described program:To the binary map
Include as carrying out image normalization:The bianry image is adjusted to the pattern of black background white characters.
In another embodiment, following steps are also realized during the computing device described program:By the binary map
As the pattern for being adjusted to black background white characters includes:Obtain the first profile of the white portion in the bianry image;It is right
The bianry image carries out black and white upset processing, obtains the second profile of the white portion in the bianry image after upset;Respectively
Calculate the Breadth Maximum of the first profile and the Breadth Maximum of second profile;If the Breadth Maximum of the first profile is small
In the Breadth Maximum of second profile, retain the bianry image before black and white upset, otherwise retain the binary map after black and white upset
Picture.
In another embodiment, following steps are also realized during the computing device described program:To the binary map
Also include as carrying out image normalization:The border of the bianry image is removed, and is scaled the bianry image behind border is removed
To pre-set dimension.
In another embodiment, following steps are also realized during the computing device described program:By the binary map
The border of picture, which is removed, to be included:Horizontal integral projection and vertical integral projection are carried out respectively to the bianry image;Traversal level is accumulated
Divide the row pixel of the bianry image after projection, obtain the starting line number in the row pixel and terminate line number;The vertical product of traversal
Divide the row pixel of the bianry image after projection, obtain the starting columns in the row pixel and terminate columns;According to initial row
Number, the area-of-interest terminated in line number, starting columns and the end columns setting bianry image, by the bianry image
Except the overseas border of region of interest is removed.
Other technical characteristics of above computer equipment are identical with the technical characteristic of above-mentioned character identifying method, refuse herein
Repeat.
In one embodiment there is provided a kind of computer-readable recording medium, computer program is stored thereon with, the meter
Calculation machine program realizes following steps when being executed by processor:
Character picture to be identified is obtained, gray processing processing is carried out to the character picture to be identified, pretreatment character is obtained
Image;
Default character recognition model is inputted using the pretreatment character picture as an entirety, by the character recognition
Model calculates the first character identification result of pretreatment character picture, wherein instruction of the character recognition model by character picture
Practice sample set training setting neural network model generation;
The pretreatment character picture is rotated several times, one will be used as by postrotational pretreatment character picture every time
Individual entirety inputs the character recognition model, and each postrotational pretreatment character picture is calculated by the character recognition model
The second character identification result;
The character picture to be identified is drawn according to first character identification result and second character identification result
In character.
In another embodiment, also realize following steps according to described first when the computer program is executed by processor
Character identification result and second character identification result show that the character in the character picture to be identified includes:If described
One character identification result is identical with each second character identification result, calculate rotation before pretreatment character picture length-width ratio with
And the length-width ratio of each postrotational pretreatment character picture;Calculate first character identification result or the second character recognition knot
The character total length of fruit;If all length-width ratios are all higher than the product of the character total length and the first ratio and are less than the word
The product of total length and the second ratio is accorded with, first character identification result or the second character identification result are waited to know as described
The character identification result of other character picture.
In another embodiment, following steps are also realized when the computer program is executed by processor:Wait to know to described
Other character picture is carried out after gray processing processing, is obtained before pre-processing character picture, in addition to step:To treating after gray processing
Recognize that character picture carries out image binaryzation, obtain bianry image;Image normalization is carried out to the bianry image.
In another embodiment, following steps are also realized when the computer program is executed by processor:To the two-value
Image, which carries out image normalization, to be included:The bianry image is adjusted to the pattern of black background white characters.
In another embodiment, following steps are also realized when the computer program is executed by processor:By the two-value
Image Adjusting includes for the pattern of black background white characters:Obtain the first profile of the white portion in the bianry image;
Black and white upset processing is carried out to the bianry image, the second profile of the white portion in the bianry image after upset is obtained;Point
The Breadth Maximum of the first profile and the Breadth Maximum of second profile are not calculated;If the Breadth Maximum of the first profile
Less than the Breadth Maximum of second profile, retain the bianry image before black and white upset, otherwise retain the two-value after black and white upset
Image.
In another embodiment, following steps are also realized when the computer program is executed by processor:To the two-value
Image, which carries out image normalization, also to be included:The border of the bianry image is removed, and is contracted the bianry image behind border is removed
Put to pre-set dimension.
In another embodiment, following steps are also realized when the computer program is executed by processor:By the two-value
The border of image, which is removed, to be included:Horizontal integral projection and vertical integral projection are carried out respectively to the bianry image;Traversal level
The row pixel of the bianry image after integral projection, obtains the starting line number in the row pixel and terminates line number;Traversal is vertical
The row pixel of the bianry image after integral projection, obtains the starting columns in the row pixel and terminates columns;According to starting
Line number, the line number that terminates, starting columns and end columns set the area-of-interest in the bianry image, by the bianry image
In remove except the overseas border of region of interest.
Other technical characteristics of above computer readable storage medium storing program for executing are identical with the technical characteristic of above-mentioned character identifying method,
It will not be described here.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium
In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality
Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, the scope of this specification record is all considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and it describes more specific and detailed, but simultaneously
Can not therefore it be construed as limiting the scope of the patent.It should be pointed out that coming for one of ordinary skill in the art
Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.