Summary of the invention
The embodiment of the present application provides the method and apparatus that a kind of numeral identifies, in order to by the numeral in image
Horizontal property parameters and vertical features parameter remove the method that identifies the numeral in image, Statistical error image
Flow process, decreases flow process and judges number of times, and by searching the horizontal map table preset, determine horizontal properties
Parameter and digital mapping relations, thus further increase the speed of numeral identification, improve identification effect
Rate.
A kind of numeral that the embodiment of the present application provides knows method for distinguishing, including:
The image including individual digit is analyzed, determines that the horizontal properties of the numeral in this image is joined
Number;
Judge whether the horizontal map table preset including, described horizontal property parameters closes with the mapping of numeral
System;
If, it is determined that the numeral corresponding to described horizontal property parameters is the numeral in described image;No
Then, according to the vertical features parameter of the numeral in described horizontal property parameters and described image, institute is determined
State the numeral in image.
In the embodiment of the present application, gone with vertical features parameter by the horizontal property parameters of the numeral in image
Identify the numeral in image, Statistical error image flow process, decrease flow process and judge number of times, and by searching
The horizontal map table preset, determines the mapping relations of horizontal property parameters and numeral, thus improves further
The speed of digital identification, improves recognition efficiency.
It is preferred that according to the vertical features ginseng of the numeral in described horizontal property parameters and described image
Number, determines the numeral corresponding to described image, including:
According to described horizontal property parameters, determine vertical mapping table by searching the identification mapping table preset,
Wherein, described identification mapping table includes the mapping relations of horizontal property parameters and the vertical mapping table preset;
According to the vertical features parameter of the numeral in the vertical mapping table determined and described image, determine institute
State the numeral corresponding to image.
In the embodiment of the present application, by the way of identification mapping table coordinates with vertical mapping table in identification image
Numeral, decrease the judgement number of times identified required for numeral, improve the speed of numeral identification.
It is preferred that described vertical mapping table includes, vertical features parameter and digital mapping relations;
According to the vertical features parameter of the numeral in the vertical mapping table determined and described image, determine institute
State the numeral corresponding to image, including:
According in described image numeral vertical features parameter, the vertical mapping table determined by lookup,
Determine the numeral corresponding to described image.
It is preferred that the method also includes:
According to the numeral in described image, determine the digital width in described image;
If the width of the numeral in described image is in preset characters width range, it is determined that described image institute
Corresponding numeral.
In the embodiment of the present application, by the way of comparing the width of the numeral of digital picture in identification image
Numeral, decreases the judgement number of times identified required for numeral, improves the speed of numeral identification.
It is preferred that described vertical mapping table includes, vertical features parameter and digital mapping relations, its
In, described mapping relations include at least one vertical features parameter mapping relations to same numeral.
The equipment that a kind of numeral that the embodiment of the present application provides identifies, this equipment includes:
Determine unit, for the image including individual digit is analyzed, determine the number in this image
The horizontal property parameters of word;
Judging unit, for judge whether the horizontal map table preset includes described horizontal property parameters with
The mapping relations of numeral;
Processing unit, if for, it is determined that the numeral corresponding to described horizontal property parameters is described figure
Numeral in Xiang;Otherwise, according to the vertical spy of the numeral in described horizontal property parameters and described image
Levy parameter, determine the numeral in described image.
In the embodiment of the present application, gone with vertical features parameter by the horizontal property parameters of the numeral in image
Identify the numeral in image, Statistical error image flow process, decrease flow process and judge number of times, and by searching
The horizontal map table preset, determines the mapping relations of horizontal property parameters and numeral, thus improves further
The speed of digital identification, improves recognition efficiency.
It is preferred that described processing unit is according to the numeral in described horizontal property parameters and described image
Vertical features parameter, determines the numeral corresponding to described image, specifically for:
According to described horizontal property parameters, determine vertical mapping table by searching the identification mapping table preset,
Wherein, described identification mapping table includes the mapping relations of horizontal property parameters and the vertical mapping table preset;
According to the vertical features parameter of the numeral in the vertical mapping table determined and described image, determine institute
State the numeral corresponding to image.
In the embodiment of the present application, by the way of identification mapping table coordinates with vertical mapping table in identification image
Numeral, decrease that identification numeral is required judges number of times, improve the digital speed identified.
It is preferred that described vertical mapping table includes, vertical features parameter and digital mapping relations;
Described processing unit is according to the vertical features of the numeral in the vertical mapping table determined and described image
Parameter, determines the numeral corresponding to described image, specifically for:
According in described image numeral vertical features parameter, the vertical mapping table determined by lookup,
Determine the numeral corresponding to described image.
It is preferred that described processing unit is additionally operable to:
According to the numeral in described image, determine the digital width in described image;
If the width of the numeral in described image is in preset characters width range, it is determined that described image institute
Corresponding numeral.
In the embodiment of the present application, by the way of comparing the width of the numeral of digital picture in identification image
Numeral, decreases the judgement number of times identified required for numeral, improves the speed of numeral identification.
It is preferred that described vertical mapping table includes, vertical features parameter and digital mapping relations, its
In, described mapping relations include at least one vertical features parameter mapping relations to same numeral.
Detailed description of the invention
The embodiment of the present application provides the method and apparatus that a kind of numeral identifies, in order to by utilizing digital picture
The method of horizontal property parameters and vertical features parameter packet, identify the numeral corresponding to digital picture, carry
Rise the efficiency that numeral identifies.
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the application is carried out clear,
It is fully described by, it is clear that described embodiment is some embodiments of the present application rather than whole
Embodiment.Based on the embodiment in the application, those of ordinary skill in the art are not making creative labor
The every other embodiment obtained under dynamic premise, broadly falls into the scope of the application protection.
The embodiment of the present application is by the 4th numeral method section in table 1, the 5th numeral method section, the 6th number
Code pipe display segment and the 7th numeral method section are divided into horizontal property parameters group, by the first numeral method
Section, the second numeral method section and the 3rd numeral method section are divided into vertical features parameter group.Therefore, will
Binary numeral of horizontal property parameters group is converted to metric numeral, i.e. obtains horizontal property parameters,
And binary numeral of vertical features parameter group is converted to metric numeral, i.e. obtain vertical features ginseng
Number, thus obtain the coding schedule of horizontal property parameters and vertical features parameter, table 2.
Table 2
Learn in conjunction with table 2, when the numeral corresponding to image is 2 or 5 or 6, horizontal property parameters and number
Word is the mapping relations mapped one by one.That is, if the numeral corresponding to image is 2, then the numeral in this image
Horizontal property parameters be 6;If the numeral corresponding to image is 5, then the level of the numeral in this image is special
Levying parameter is 9;If the numeral corresponding to image is 6, then the horizontal property parameters of the numeral in this image is
11.Therefore, according to above-mentioned corresponding relation, the horizontal map table table 3 preset is generated.Look-up table 3, passes through
Horizontal property parameters, determines the numeral corresponding to image.
Table 3
Learn in conjunction with table 2, if the numeral corresponding to image is 1 or 3 or 7, then in this image numeral
Horizontal property parameters is 5;If the numeral corresponding to image is 8 or 0, then the water of the numeral in this image
Flat characteristic parameter is 15;If the numeral corresponding to image is 4 or 9, then the level of the numeral in this image
Characteristic parameter is 13.Therefore, according to above-mentioned corresponding relation, the identification mapping table table 4 preset is generated.Look into
Look for table 4, by horizontal property parameters, determine vertical mapping table.
Table 4
Wherein, the first vertical mapping table includes, vertical features parameter and the mapping relations of numeral 1, vertically special
Levy the mapping relations of parameter and the mapping relations of numeral 3 and vertical features parameter and numeral 7.
Second vertical mapping table includes, vertical features parameter and the mapping relations of numeral 0 and vertical features ginseng
Number and the mapping relations of numeral 8.
3rd vertical mapping table includes, vertical features parameter and the mapping relations of numeral 4 and vertical features ginseng
Number and the mapping relations of numeral 9.
In conjunction with vertical features parameter in table 2, pre-set the first vertical mapping table table 5, second and vertically map
Table table 6 and the 3rd vertical mapping table table 7.
Therefore, if the numeral corresponding to horizontal property parameters, then look-up table 4 cannot be determined by look-up table 3
Determine the vertical mapping table corresponding to this horizontal property parameters, then search this vertical mapping table, according to vertically
Characteristic parameter determines the numeral corresponding to image.
Table 5
Table 6
Table 7
Seeing Fig. 2, the embodiment of the present application provides numeral and knows method for distinguishing, and the method includes:
S201, the image including individual digit is analyzed, determines the level of numeral in this image
Characteristic parameter;
Whether the horizontal map table that S202, judgement are preset includes that described horizontal property parameters reflects with digital
Penetrate relation;
If S203, it is determined that the numeral corresponding to described horizontal property parameters is the number in described image
Word;Otherwise, according to the vertical features parameter of the numeral in described horizontal property parameters and described image,
Determine the numeral in described image.
Specifically, step S202 includes, according to the horizontal property parameters determined, it is judged that horizontal map table table
The mapping relations of described horizontal property parameters and numeral whether are included in 3.
If horizontal map table includes the mapping relations of described horizontal property parameters and numeral, then this is utilized to reflect
Penetrate relation, determine the numeral corresponding to described horizontal property parameters, obtain the number corresponding to described image
Word;
If not including the mapping relations of this horizontal property parameters and numeral, then with reference to the method in Fig. 3.
In summary, if the numeral in image is 2 or 5 or 6, the numeral provided by the embodiment of the present application
Know method for distinguishing, identify that the numeral in this image the most only need to judge 1 time.
With reference to Fig. 3, according to the numeral in described horizontal property parameters and described image in step S203
Vertical features parameter, determines the numeral corresponding to described image, including:
S301, according to described horizontal property parameters, by searching the identification mapping table preset, determine vertical
Mapping table;
S302, according in the vertical mapping table determined and described image numeral vertical features parameter,
Determine the numeral corresponding to described image.
Wherein, described identification mapping table includes that horizontal property parameters closes with the mapping of the vertical mapping table preset
System
Specifically, step S301 includes:
If the numeral in image is not 2 or 5 or 6, then according to the horizontal property parameters of the numeral in image,
Utilize and identify horizontal property parameters and the mapping relations of vertical mapping table in mapping table table 4, determine that this level is special
Levying the corresponding vertical mapping table of parameter is table 5 or table 6 or table 7.
Wherein, described vertical mapping table includes, vertical features parameter and digital mapping relations;
Now, step S302, including:
According in described image numeral vertical features parameter, the vertical mapping table determined by lookup,
Determine the numeral corresponding to described image.
Specifically, seeing Fig. 4, the method also includes:
S401, according to the numeral in described image, determine the width of numeral in described image;
If the width of the numeral in the described image of S402 is in preset characters width range, it is determined that described
Numeral corresponding to image.
Wherein, according to described preset characters width range, the height and the width of described image determine.
Step S402, including:
If the width of the numeral in described image is less than or equal to the character duration preset, it is determined that described figure
As corresponding numeral.
Specifically, the method also includes:
If the depth-width ratio of the numeral in described image is in the range of default depth-width ratio, it is determined that described image institute
Corresponding numeral;
Specifically, if the depth-width ratio of the numeral in described image is more than or equal to 3, it is determined that described image institute
Corresponding numeral is 1.
See table 8, know method for distinguishing by a kind of numeral provided in the embodiment of the present application, determine average one
Numeral in image needs to carry outSecondary identification judges, decreases knowledge
The number of times required for numeral in other image, improves the speed of numeral identification, improves recognition efficiency.
Table 8
Owing to threading method needs associating seven segment digital tubes display segment just can carry out the identification of numeral, and display number
The display effect of the intersection of the electrical screen of word is poor, causes the first numeral method section 101 and/or the 3rd
Mistake is identified at numeral method section 103.Such as, when vertical features parameter normally shows and should be 5, by
At the first numeral method section 101 and/or the 3rd numeral method section 103, show mistake, cause according to figure
The vertical features parameter that numeral in Xiang determines is 0 or 1 or 4;Should be when vertical features parameter normally shows
When 7, owing to showing mistake at the first numeral method section 101 and/or the 3rd numeral method section 103, lead
The vertical features parameter causing to determine according to the numeral in image is 2 or 3 or 6.Due to vertical features parameter
Mistake will cause numeral to identify obstacle occur, in the case of particularly identifying numeral 7 and numeral 9.
But, the numeral provided due to the embodiment of the present application knows the described vertical mapping table bag in method for distinguishing
Including, vertical features parameter and digital mapping relations, wherein, described mapping relations include that at least one hangs down
The straight characteristic parameter mapping relations to same numeral.It is, vertical features parameter is closed with digital mapping
System is mapping relations one to one, or is the mapping relations of multiple vertical features parameter and same numeral.
Now, the first vertical mapping table be the vertical mapping table of table 9, second be table 10 and the 3rd vertical mapping table
For table 11.
Table 9
Table 10
Table 11
According to above-mentioned analysis, the numeral that the embodiment of the present application provides knows method for distinguishing, not only increases
The efficiency that numeral identifies, also improves the accuracy of numeral identification, improves discrimination.
The numeral provided for being better understood from the embodiment of the present application knows method for distinguishing, below in conjunction with flow process
The embodiment of the present application is further explained by figure Fig. 5.
S501, the image comprising individual digit character got is analyzed, obtains in this image
The horizontal property parameters of numerical character;
If this horizontal property parameters of S502 is 6 or 9 or 11, then by tabling look-up 3, determine in described image
Numeral;If this horizontal property parameters is 5 or 15 or 13, by tabling look-up 4, determine that this horizontal properties is joined
Vertical mapping table corresponding to number;
S503, above-mentioned image is analyzed again, obtains the vertical features of numerical character in this image
Parameter;If the vertical mapping table determined in step S502 is table 5, it is determined that the numerical character in image
Width whether in the range of default character duration, if, it is determined that the numeral in described image is 1, no
Then inquiry table 5, determines the numeral in described image;If the vertical mapping table determined in step S502 is table 6
Or table 7, determine the numeral in described image by the vertical mapping table that inquiry determines the most respectively.
See Fig. 6, the equipment that a kind of numeral that the embodiment of the present application provides identifies, including:.
Determine unit 601, for the image including individual digit is analyzed, determine in this image
The horizontal property parameters of numeral;
Judging unit 602, for judging whether include described horizontal property parameters in the horizontal map table preset
Mapping relations with numeral;
Processing unit 603, if for, it is determined that the numeral corresponding to described horizontal property parameters is described
Numeral in image;Otherwise, according in described horizontal property parameters and described image numeral vertical
Characteristic parameter, determines the numeral in described image.
Specifically, described processing unit 603 is according to the numeral in described horizontal property parameters and described image
Vertical features parameter, determine the numeral corresponding to described image, specifically for:
According to described horizontal property parameters, determine vertical mapping table by searching the identification mapping table preset,
Wherein, described identification mapping table includes the mapping relations of horizontal property parameters and the vertical mapping table preset;
According to the vertical features parameter of the numeral in the vertical mapping table determined and described image, determine institute
State the numeral corresponding to image.
Specifically, described vertical mapping table includes, vertical features parameter and digital mapping relations;
Described processing unit 603 is according to the vertical spy of the numeral in the vertical mapping table determined and described image
Levy parameter, determine the numeral corresponding to described image, specifically for:
According in described image numeral vertical features parameter, the vertical mapping table determined by lookup,
Determine the numeral corresponding to described image.
Specifically, described processing unit 603 is additionally operable to:
According to the numeral in described image, determine the digital width in described image;
If the width of the numeral in described image is in the range of predetermined width, it is determined that corresponding to described image
Numeral.
Specifically, described vertical mapping table includes, vertical features parameter and digital mapping relations, its
In, described mapping relations include at least one vertical features parameter mapping relations to same numeral.
In sum, the embodiment of the present application provides the method and apparatus that a kind of numeral identifies, in order to by looking into
Look for default horizontal map table, determine the mapping relations of horizontal property parameters and numeral, decrease identification figure
The number of times required for numeral in Xiang, improves the speed of numeral identification, improves recognition efficiency.
Those skilled in the art are it should be appreciated that embodiments herein can be provided as method, system or meter
Calculation machine program product.Therefore, the application can use complete hardware embodiment, complete software implementation or knot
The form of the embodiment in terms of conjunction software and hardware.And, the application can use and wherein wrap one or more
Computer-usable storage medium containing computer usable program code (include but not limited to disk memory and
Optical memory etc.) form of the upper computer program implemented.
The application is with reference to method, equipment (system) and the computer program product according to the embodiment of the present application
The flow chart of product and/or block diagram describe.It should be understood that can by computer program instructions flowchart and
/ or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedding
The processor of formula datatron or other programmable data processing device is to produce a machine so that by calculating
The instruction that the processor of machine or other programmable data processing device performs produces for realizing at flow chart one
The device of the function specified in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set
In the standby computer-readable memory worked in a specific way so that be stored in this computer-readable memory
Instruction produce and include the manufacture of command device, this command device realizes in one flow process or multiple of flow chart
The function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes
Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices
Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one
The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification without deviating from this Shen to the application
Spirit and scope please.So, if the application these amendment and modification belong to the application claim and
Within the scope of its equivalent technologies, then the application is also intended to comprise these change and modification.