CN105279525B - A kind of method and device of image procossing - Google Patents

A kind of method and device of image procossing Download PDF

Info

Publication number
CN105279525B
CN105279525B CN201510801585.1A CN201510801585A CN105279525B CN 105279525 B CN105279525 B CN 105279525B CN 201510801585 A CN201510801585 A CN 201510801585A CN 105279525 B CN105279525 B CN 105279525B
Authority
CN
China
Prior art keywords
geometry
verification
content
region
angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510801585.1A
Other languages
Chinese (zh)
Other versions
CN105279525A (en
Inventor
张家重
董毅
李光瑞
王玉奎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Financial Information Technology Co Ltd
Original Assignee
Inspur Financial Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Financial Information Technology Co Ltd filed Critical Inspur Financial Information Technology Co Ltd
Priority to CN201510801585.1A priority Critical patent/CN105279525B/en
Publication of CN105279525A publication Critical patent/CN105279525A/en
Application granted granted Critical
Publication of CN105279525B publication Critical patent/CN105279525B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • G06V10/7515Shifting the patterns to accommodate for positional errors

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Character Input (AREA)

Abstract

The present invention provides a kind of method and devices of image procossing, including:Verification template is preset, further includes:Obtain at least one geometry and word content in images to be recognized;According at least one described geometry and the word content, at least one verification region of the images to be recognized is determined;According to the verification template and the word content, the content in each verification region is verified.The present invention provides a kind of method and devices of image procossing, can be improved the accuracy of verification images to be recognized.

Description

A kind of method and device of image procossing
Technical field
The present invention relates to image identification technical field, in particular to a kind of method and device of image procossing.
Background technique
Bill includes various marketable securities and voucher.With the rapid development of society, a large amount of bill can be all generated daily. How accurately to identify the information on these bills, becomes particularly significant.The identification of these bills can by manually realizing, But when the data of bill are larger, identify the information efficiency on bill with regard to relatively low by manually, it may be desirable to very long Time.
In order to improve the efficiency of bank slip recognition, in the prior art by some billing information processing equipments come automatic identification ticket According to upper information.It the size of certain or several pairs of bills that these equipment are typically specific in identification certain industry and fills in Contents norm has strict requirements bill.Special tool of this kind of equipment generally be directed to the identification of certain bills.It was identifying Generally the content in bill specialization region can only be identified and be analyzed in journey, to other non-standardization elements in bill Lack simply and effectively verification means.Even the similar-type products in same field, once production/user is different, such The compatibility of product is also relatively limited, not can be carried out accurate identification.Such as:During check processing, although market Field is identical, bill type is identical, but the check processing routine between different bank can not be general.In short, the prior art In bank slip recognition method have to attributes such as the size of bill, fill substance, note forms and compare strict requirements, meet the requirements Bill just can be carried out verification.The accuracy of the verification for general bill of bill method of calibration in the prior art is lower.
Summary of the invention
In view of this, can be improved verification images to be recognized the present invention provides a kind of method and device of image procossing Accuracy.
On the one hand, the present invention provides a kind of methods of image procossing, including:Verification template is preset, further includes:
S1:Obtain at least one geometry and word content in images to be recognized;
S2:According at least one described geometry and the word content, at least the one of the images to be recognized is determined A verification region;
S3:According to the verification template and the word content, the content in each verification region is verified.
Further, the S1, including:
The color-values for obtaining each pixel of the images to be recognized will be described according to the color-values of each pixel Images to be recognized is divided at least one figure layer;
Obtain the geometry and word content in each figure layer.
Further, the word content obtained in each figure layer, including:
A1:Data space is established, current layer is loaded into data space;
A2:Obtain the text geometry in current layer;
A3:Obtain the connection track of each text geometry in current layer;
A4:In the data space, the coordinate of each endpoint in each text geometry is obtained;
A5:According to the coordinate of each endpoint in each text geometry, each of each text geometry is determined The angle of angle;
A6:Whether the angle for judging each angle is preset standard angle, is otherwise successively held if it is, executing A8 Row step A7, A8;
A7:Adjustment is not the coordinate of the corresponding endpoint of angle of standard angle, so that every in each text geometry The angle of a angle is standard angle, executes step A8;
A8:According to the coordinate of the connection track and each endpoint of each text geometry, by each text geometry All endpoints be correspondingly connected with, obtain the grapholect geometry of each text geometry;
A9:Each grapholect geometry in current layer is identified, is obtained in the text in current layer Hold.
Further, the S2, including:
According to the word content, from where the word content geometry and with where the word content At least one verification region is determined in the adjacent geometry of geometry.
Further, the verification template includes:Verify the attribute specification of the content in region;
The S3, including:
According to the word content in the adjacent geometry of content and current verification region in current verification region, determine The current attribute specification verified in the corresponding verification template in region;
Whether the content in the current verification region of judgement meets corresponding attribute specification in the verification template, if so, The content in current verification region is then determined by verification, otherwise, it determines current verification goes the content in hospital not over school It tests.
On the other hand, the present invention provides a kind of devices of image procossing, including:
Setting unit, for verification template to be arranged;
Acquiring unit, for obtaining at least one geometry and word content in images to be recognized;
Determination unit, for determining the figure to be identified according at least one described geometry and the word content At least one verification region of picture;
Verification unit, for according to the verification template and the word content, to each content verified in region into Row verification.
Further, the acquiring unit, the color-values of each pixel for obtaining the images to be recognized, according to The images to be recognized is divided at least one figure layer, obtains the geometry in each figure layer by the color-values of each pixel And word content.
Further, the acquiring unit is specific to execute when executing the word content obtained in each figure layer:
A1:Data space is established, current layer is loaded into data space;
A2:Obtain the text geometry in current layer;
A3:Obtain the connection track of each text geometry in current layer;
A4:In the data space, the coordinate of each endpoint in each text geometry is obtained;
A5:According to the coordinate of each endpoint in each text geometry, each of each text geometry is determined The angle of angle;
A6:Whether the angle for judging each angle is preset standard angle, is otherwise successively held if it is, executing A8 Row step A7, A8;
A7:Adjustment is not the coordinate of the corresponding endpoint of angle of standard angle, so that every in each text geometry The angle of a angle is standard angle, executes step A8;
A8:According to the coordinate of the connection track and each endpoint of each text geometry, by each text geometry All endpoints be correspondingly connected with, obtain the grapholect geometry of each text geometry;
A9:Each grapholect geometry in current layer is identified, is obtained in the text in current layer Hold.
Further, the determination unit is used for according to the word content, from the geometry knot where the word content At least one verification region is determined in structure and the geometry adjacent with the geometry where the word content.
Further, the verification template includes:Verify the attribute specification of the content in region;
The verification unit, for the adjacent geometry according to content and current verification region in current verification region In word content, determine the attribute specification in the corresponding verification template in current verification region, judge in current verification region Whether content meets corresponding attribute specification in the verification template, if it is, determining that the content in current verification region is logical Verification is crossed, otherwise, it determines current verification goes the content in hospital not over verification.
A kind of method and device of the image procossing provided through the invention obtains the geometry and text of images to be recognized Word content determines verification region according to geometry and word content, according to verification template and word content to verification region In content verified, can be verified for any type of images to be recognized, can be improved verification figure to be identified The accuracy of picture.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow chart of the method for image procossing that one embodiment of the invention provides;
Fig. 2 is the flow chart of the method for another image procossing that one embodiment of the invention provides;
Fig. 3 (a) is a kind of schematic diagram for complete bill that one embodiment of the invention provides;
Fig. 3 (b) is a kind of schematic diagram for incomplete bill that one embodiment of the invention provides;
Fig. 4 is a kind of schematic diagram of the cut zone for bill that one embodiment of the invention provides;
Fig. 5 is a kind of schematic diagram of the device for image procossing that one embodiment of the invention provides;
Fig. 6 is the schematic diagram of the device for another image procossing that one embodiment of the invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, this method may include following step the embodiment of the invention provides a kind of method of image procossing Suddenly:
S0:Preset verification template;
S1:Obtain at least one geometry and word content in images to be recognized;
S2:According at least one described geometry and the word content, at least the one of the images to be recognized is determined A verification region;
S3:According to the verification template and the word content, the content in each verification region is verified.
A kind of method of the image procossing provided through the embodiment of the present invention obtains the geometry and text of images to be recognized Word content determines verification region according to geometry and word content, according to verification template and word content to verification region In content verified, can be verified for any type of images to be recognized, can be improved verification figure to be identified The accuracy of picture.
In one possible implementation, the S1, including:
The color-values for obtaining each pixel of the images to be recognized will be described according to the color-values of each pixel Images to be recognized is divided at least one figure layer;Obtain the geometry and word content in each figure layer.
Specifically, data space is established, in the data space a reference axis is color axis, and each pixel is loaded On to color axis at coordinate position identical with the color-values size of current pixel point.
In this implementation, images to be recognized installation color-values are layered, reduce the number of colors in every layer, subtracts The small complexity of the color of each figure layer, then identifies every layer, improves the accuracy rate of image recognition, so that Check results are more accurate.
In one possible implementation, the word content obtained in each figure layer, including:
A1:Data space is established, current layer is loaded into data space;
A2:Obtain the text geometry in current layer;
A3:Obtain the connection track of each text geometry in current layer;
A4:In the data space, the coordinate of each endpoint in each text geometry is obtained;
A5:According to the coordinate of each endpoint in each text geometry, each of each text geometry is determined The angle of angle;
A6:Whether the angle for judging each angle is preset standard angle, is otherwise successively held if it is, executing A8 Row step A7, A8;
A7:Adjustment is not the coordinate of the corresponding endpoint of angle of standard angle, so that every in each text geometry The angle of a angle is standard angle, executes step A8;
A8:According to the coordinate of the connection track and each endpoint of each text geometry, by each text geometry All endpoints be correspondingly connected with, obtain the grapholect geometry of each text geometry;
A9:Each grapholect geometry in current layer is identified, is obtained in the text in current layer Hold.
It, can be right by OCR (Optical Character Recognition, optical character identification) in step A9 Grapholect geometry is identified.
In this implementation, the angle in each text geometry is adjusted, so that each text geometry knot Structure more standard, more standardizes, and convenient for identification, can be improved the accuracy rate of word content in images to be recognized, and then can mention The accuracy rate of high check results.
In one possible implementation, the preset standard angle includes:45°,90°,135°,180°;
The A7, including:
When leading angle angle [20 °, 45 °) or (45 °, 70 °) range in when, will be adjusted to when the angle of leading angle 45°;
When leading angle angle [70 °, 90 °) or (90 °, 110 °) range in when, will be adjusted to when the angle of leading angle 90°;
When leading angle angle [110 °, 135 °) or (135 °, 160 °) range in when, will when leading angle angle adjust To 135 °;
When leading angle angle [160 °, 180 °) or (0 °, 20 °) range in when, will be adjusted to when the angle of leading angle 180°。
In one possible implementation, the S2, including:
According to the word content, from where the word content geometry and with where the word content At least one verification region is determined in the adjacent geometry of geometry.
For example, geometry 1 is adjacent with geometry 2, and the word content in geometry 1 is " name ", then may be used To think that the word content in geometry 2 is the address name that user fills in, determine geometry 2 for verification region.
In one possible implementation, the verification template includes:Verify the attribute specification of the content in region;
The S3, including:
According to the word content in the adjacent geometry of content and current verification region in current verification region, determine The current attribute specification verified in the corresponding verification template in region;
Whether the content in the current verification region of judgement meets corresponding attribute specification in the verification template, if so, The content in current verification region is then determined by verification, otherwise, it determines current verification goes the content in hospital not over school It tests.
For example, the content currently in verification region is " Zhang San ", the current text verified in the adjacent geometry in region Word content is " name ", then can determine that current verification region is the attribute specification to " name ".Determine " surname in verification template The corresponding attribute specification of name ", the attribute specification can be:It cannot be empty, cannot be number etc..If currently in verification region Content meets the attribute specification and then passes through verification, it is clear that " Zhang San " passes through the verification.
In addition, the attribute specification of the content in verification region may include:Verify format, the check field of the content in region Whether the content in domain must fill out, verify the character format of content in region etc..
In one possible implementation, this method can also include:According to geometry, images to be recognized is judged Whether physical structure is complete.The integrality, the integrality of striped, bill structure of ticket text frame can be judged by geometry Integrality etc..Bill table area missing, the damage of bill structure cannot identify, can be regarded as verification failure.In conjunction with ticket According to the specific process of verification, such as judge the feature of background striped, can also be used as the foundation of identification.For example, wherein one A geometry is not closed completely, it may be considered that the integrality of the images to be recognized is destroyed, cannot pass through verification.
To make the object, technical solutions and advantages of the present invention clearer, with reference to the accompanying drawing and specific embodiment to this Invention is described in further detail.
In embodiments of the present invention, images to be recognized is bill, is verified through the embodiment of the present invention to bill.
As shown in Fig. 2, this method may include following step the embodiment of the invention provides a kind of method of image procossing Suddenly:
Step 201:Verification template is preset, the verification template includes:Verify the attribute specification of the content in region.
The attribute specification of the content in region is verified, including:Verify region in content format, verification region in it is interior The character format that whether must fill out, verify content in region held.For example, attribute specification includes:User's signature region cannot There must be seal for empty, seal region, the character format of content in user's signature region cannot be number, in seal region The color-values (can be red, blue etc.) different from the printing type face on bill of content, content in seal region it is outer Enclosing the format that profile is content rectangular or round, in date region is yyyy-mm-dd.
Correction verification module can according to need customized, can be generated according to images to be recognized.For example, images to be recognized For bill, the bill that template can be blank is verified, and the verification region in bill is provided in current verification region The attribute specification of content.When determining the attribute specification in the corresponding verification template in current verification region, by the way that template will be verified It is matched with images to be recognized to determine.Such as:The current verification region of images to be recognized and the verification region A of verification template Position match, then can will verify and verify the attribute specification of region A in template as currently verifying the corresponding verification in region Attribute specification in template.
Step 202:The color-values for obtaining each pixel of bill, according to the color-values of each pixel, by bill point At at least one figure layer.
For example, in images to be recognized, there are three geometric areas, and the color-values of each geometric areas are different, then These three geometric areas can be assigned in different figure layers respectively.Only one geometric areas in each figure layer, convenient for identification.
Step 203:Obtain the geometry and word content in each figure layer.
Specifically, A1:Data space is established, current layer is loaded into data space;
A2:Obtain the text geometry in current layer;
A3:Obtain the connection track of each text geometry in current layer;
A4:In the data space, the coordinate of each endpoint in each text geometry is obtained;
A5:According to the coordinate of each endpoint in each text geometry, each of each text geometry is determined The angle of angle;
A6:Whether the angle for judging each angle is preset standard angle, is otherwise successively held if it is, executing A8 Row step A7, A8;
A7:Adjustment is not the coordinate of the corresponding endpoint of angle of standard angle, so that every in each text geometry The angle of a angle is standard angle, executes step A8;
A8:According to the coordinate of the connection track and each endpoint of each text geometry, by each text geometry All endpoints be correspondingly connected with, obtain the grapholect geometry of each text geometry;
A9:Each grapholect geometry in current layer is identified, is obtained in the text in current layer Hold.
Step 204:According to the word content, from where the word content geometry and in the text At least one verification region is determined in the adjacent geometry of the geometry at appearance place.
For example, geometry of the word content where " name " is geometry A, is adjacent on the right side of geometry mechanism Geometry B, then can using geometry B as verification region.
Step 205:According to the text in the adjacent geometry of content and current verification region in current verification region Content determines the attribute specification in the corresponding verification template in current verification region.
For example, geometry B is verification region, and the left side of geometry B is adjacent geometry A, geometry knot Word content in structure A is " name ", then can determine that the attribute in the corresponding verification template of geometry B about " name " is wanted It asks.
Step 206:Whether the content in the current verification region of judgement meets corresponding attribute specification in the verification template, If it is, determining that the content in current verification region passes through verification, otherwise, it determines currently the content in verification region is not led to Cross verification.
For example, the content in geometry B is " Zhang San ", and geometry B is corresponding to be verified in template about " name " Attribute specification include:It cannot be empty, cannot be number, length no more than 10 bytes.Meet institute by verifying " Zhang San " It requires, all by verification, the part is effective.
Method provided in an embodiment of the present invention can very easily be obtained various by traditional, universal scanning device Effective information on class bill, and it is capable of the type and integrality of automatic identification these information, it can be used as a kind of general ticket It is believed that breath automatic processing scheme, bank, the tax, digitlization bill management and other be related to the neck of OCR identification technology Domain all has great importance.
Method provided in an embodiment of the present invention is using multidimensional Image Information Processing technology by the identification of billing information from list Pure OCR verification upgrade to it is a kind of with space, the associated intelligent information analytic method of geometry, thus by mathematical model Intelligent processing come that perfect adaptation is various known or unknown bill types.Method provided in an embodiment of the present invention and bill class Type or size are unrelated, are a kind of general recognition processing methods.
Method provided in an embodiment of the present invention can be used to validity check when solving bank slip recognition and content recognition is asked Topic.By taking cash in bank check as an example, the content integrity of check information can be verified by this method, such as:With the presence or absence of signature, With the presence or absence of seal, whether content fills in specification, complete etc., while billing information can also be identified by OCR technique, such as: Date, signature, amount of funds etc..
In method provided in an embodiment of the present invention, divide billing information using billing information color-values demixing technology Structure figure layer and geometrical characteristic, so as to check the integrality of bill entirety according to the integrity information of these structures, together When the subsequent verifying work such as can also damage, is counterfeit, altering to bill more sufficient judgment basis is provided.As shown in figure 3, It is complete bill in Fig. 3 (a), the bill in Fig. 3 (b) lacks seal, therefore is incomplete bill.
Billing information is generally divided into following three types:Note form information, content location information, client's effective information.
Note form information includes the basic format of bill, such as:Background lines, table, cut-off rule, symbol mark etc., it is main To be used to verify papers, verifying bill integrality etc., not make content output, only make basic geometry comparison to it is related Checking treatment is seldom related to OCR identification technology.
Content location information is mainly used as guidance user and fills in relevant information in correct position, and traditional ticket contents are known Other program is handled because comprehensive analysis can not be done to the content of passable bill, thus ignores the contents of the section mostly, but Directly come position and the identification region of fixation and recognition data using coordinate value, however this method can only be used as the place of single bill Reason, lacks effective versatility processing means.Limitation in order to solve the above problem, the embodiment of the invention provides a kind of general The ticket contents locating module of change, this programme realize a kind of automation by multidimensional spatial data geometry cutting techniques Identification, analysis, the method for positioning ticket contents.
In method provided in an embodiment of the present invention, it is first depending on the recognition result of note form information, it is, using Data space technology obtains the geometry of bill to be identified, identifies the table of bill, will be to be identified according to form color values Bill is divided at least one figure layer, and the geometry of table is obtained in each figure layer, and continuously feature positions independent zones The position in domain, such as the text box being closed etc..Then, the basic content of bill to be identified is subjected to region segmentation, that is, pressed According to the content blocks that geometry is divided, such as text filed, seal region etc..Further according to the printing word in different zones Prompt information come judge user input information type, format and validity etc..For example, if the content in text box is surname Name, then fill substance thereafter then cannot be empty or cannot be number.
Client's effective information is the main information of ticket contents identification, therefore more demanding to the accuracy rate of information identification, However since the input mode of the partial information is mostly that user is manually entered, even if in the tradition for being directed to special bank slip recognition Bill process field, the recognizable rate of the contents of the section are also universal lower.To solve the problems, such as that the contents of the section discrimination is lower, Bill to be identified is divided at least one figure layer according to color-values, for each figure layer by method provided in an embodiment of the present invention In word content be standardized so that handwritten form input also has identification close to print hand writing Rate.
In traditional bank slip recognition field, the verification for being directed to ticket contents validity is all often to be set at bill It is handled in a certain region, and due to being restricted by the effective discrimination of OCR technique, these regions are generally also only limitted to sequence Number identification, number is read and the relatively simple content such as date verification, in input text, seal, signature of user etc. The validity check process of appearance still needs by manually participating in, this automated process for allowing for bill processing is difficult to obtain always Great breakthrough.The method provided through the embodiment of the present invention, program can very easily pass through the image layered skill of color-values Different types of ticket contents are divided, verified to art, as seal geometrical characteristic and content, format specification and content whether Meet fill request etc..
Effectiveness of information verifies mainly by note form information, content location information and client's effective information three parts structure At detailed process is as follows:
Application program locks the verification region of bill via note form information, such as:According to verification template content come Locking, for example, verification template in set name column after fill substance cannot for sky, then just according to OCR Text region result first Name region is positioned, its adjacent content is then positioned and fills in region, it is exactly to verify region which, which fills in section,.Obtain these Region is verified, verification region can export by way of picture.
According to the verification region of acquisition, judgement verifies the contents attribute in region one by one, such as:Text, number, whether can be with For sky etc..For example, as shown in figure 4, including region 1, region 2,3 three, region cut zone, in region 1【Name】Word Section, representative attribute is exactly the directive property content in table, and name just specifies the attribute that content may include thereafter, such as must Fill out region etc..And in table followed by【User's signature】Field is effective field to be identified, and what is referred to is exactly region 2 In word content, need OCR identify specifying information.Similarly, seal attribute should include following feature in region 3:It is different from The color-values (red, blue etc.) of printing type face, peripheral geometric profile (circle, side etc.), seal content.
According to check results, to judge whether bill meets expection, such as:Judgment rule is set in verification template, or It is customized by other rules, as name whether be it is empty, seal with the presence or absence of etc..
Finally, output judging result or identification character.
Wherein, verification template is used to specify the attribute of content, if text must be filled out and be only in name region, and date region Need to meet date specification etc..Correction verification module supports user customized, supports the self-defined template of particular note format, supports print Chapter, proof of identity etc..
In addition, method provided in an embodiment of the present invention, can be realized by following steps:
Step 1:It calls function MDS_InitBillRecognition (), starts multidimensional bill automatic identification process.
Step 2:It calls function MDS_ReadPicture (), reads bill images file, file content is reduced to original Pixel Information, and together with the related contents such as resolution ratio, color information among storage to mds_pic_info structure.
Step 3:Multidimensional image color hierarchical block is called, is divided picture material according to the color-values of pixel in image For different figure layers, geometry, word content etc. in each figure layer are obtained.
Step 4:The successively content in processing step 3 in obtained difference figure layer, according to the geometry of figure, text Content etc. judges the integrality of bill physical structure.
Such as:Integrality, the integrality of striped, integrality of bill structure of ticket text frame etc. can pass through bill It can recognize the integrality of content above to judge, for example, bill table area lacks, the damage of bill structure cannot be identified, all may be used To be regarded as recognition failures.In conjunction with the specific process that bill verifies, such as judge the feature of background striped, can also be used as identification Foundation.Corresponding judgment basis can be arranged in verification template.
Step 5:6 are entered step if bill structural integrity, otherwise return to error message.
Step 6:Multidimensional pictograph standardized module is called, the word content analyzed in 4 is successively handled.
Specifically, the 1. affiliated figure layer for finding bill table by the difference of color-values first.2. identifying these tables The region that lattice are partitioned into.3. identifying the content of print hand writing in that region.4. according to the word content of block letter Position its adjacent position for filling in region and contents attribute, verification region is in adjacent region of filling in here.5. standardizing school It tests in region and fills in text.
Step 7:By the text structure after the standardization in step 6, OCR recognizer is passed to, and obtains recognition result.
Step 8:It calls function MDS_GeometryPaser (), the geometry of bill figure is analyzed, according to geometry Neighbouring relations judge the relevance of word content.
For example, the adjacent region default association of geometry, the region on the right side of name frame are defaulted as name and fill in Area.
Step 9:It calls function MDS_ReadPaserXML (), reads the verification template of identification bill, according to verification template The attribute specification of middle setting judges the validity of ticket contents.
Specifically, verification template can be customized by the user, and be mainly used to the specification limit and content in setting verification region Attribute, such as:Date region will meet the date and fill in specification, yyyy-mm-dd.
1. judging the specification and limitation of fill substance in its adjacent area by the recognition result of print hand writing, 2. will These fill substances match with verification template, and 3. return to matching result, such as:Required field, length limitation etc..
Step 10:It calls function MDS_MessageCheck (), is successively verified according to the feedback information of step 8 and step 9 The validity of user information.
Failure result is returned to if the failure of the matching result of fill substance and recognition template, otherwise then ticket document is effective.
Step 11:Back-checking result.
As shown in Figure 5, Figure 6, the embodiment of the invention provides a kind of devices of image procossing.Installation practice can pass through Software realization can also be realized by way of hardware or software and hardware combining.For hardware view, as shown in figure 5, for this A kind of hardware structure diagram of equipment where a kind of device for image procossing that inventive embodiments provide, in addition to processing shown in fig. 5 Except device, memory, network interface and nonvolatile memory, the equipment in embodiment where device usually can also include Other hardware, such as it is responsible for the forwarding chip of processing message.Taking software implementation as an example, as shown in fig. 6, anticipating as a logic Device in justice is to be read computer program instructions corresponding in nonvolatile memory by the CPU of equipment where it Operation is formed in memory.A kind of device of image procossing provided in this embodiment, including:
Setting unit 601, for verification template to be arranged;
Acquiring unit 602, for obtaining at least one geometry and word content in images to be recognized;
Determination unit 603, for determining described to be identified according at least one described geometry and the word content At least one verification region of image;
Verification unit 604 is used for according to the verification template and the word content, to the content in each verification region It is verified.
In one possible implementation, the acquiring unit 602, for obtaining each picture of the images to be recognized The images to be recognized is divided at least one figure layer according to the color-values of each pixel by the color-values of vegetarian refreshments, is obtained each Geometry and word content in figure layer.
In one possible implementation, the acquiring unit 602 is executing the text obtained in each figure layer It is specific to execute when content:
A1:Data space is established, current layer is loaded into data space;
A2:Obtain the text geometry in current layer;
A3:Obtain the connection track of each text geometry in current layer;
A4:In the data space, the coordinate of each endpoint in each text geometry is obtained;
A5:According to the coordinate of each endpoint in each text geometry, each of each text geometry is determined The angle of angle;
A6:Whether the angle for judging each angle is preset standard angle, is otherwise successively held if it is, executing A8 Row step A7, A8;
A7:Adjustment is not the coordinate of the corresponding endpoint of angle of standard angle, so that every in each text geometry The angle of a angle is standard angle, executes step A8;
A8:According to the coordinate of the connection track and each endpoint of each text geometry, by each text geometry All endpoints be correspondingly connected with, obtain the grapholect geometry of each text geometry;
A9:Each grapholect geometry in current layer is identified, is obtained in the text in current layer Hold.
In one possible implementation, the determination unit 603 is used for according to the word content, from the text Determined in geometry and the geometry adjacent with the geometry where the word content where word content to A few verification region.
In one possible implementation, the verification template includes:Verify the attribute specification of the content in region;
The verification unit 604, for the adjacent geometry according to content and current verification region in current verification region Word content in structure determines the attribute specification in the corresponding verification template in current verification region, judges current verification region In content whether meet corresponding attribute specification in the verification template, if it is, determining interior in current verification region Hold through verification, otherwise, it determines current verification goes the content in hospital not over verification.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned apparatus, due to implementing with the method for the present invention Example is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, and details are not described herein again.
A kind of method and device of the image procossing provided through the embodiment of the present invention, has the advantages that:
1, a kind of method and device of the image procossing provided through the embodiment of the present invention obtains the geometry of images to be recognized Structure and word content determine verification region according to geometry and word content, according to verification template and word content pair Content in verification region is verified, and can be verified for any type of images to be recognized, can be improved verification The accuracy of images to be recognized.
2, images to be recognized is installed color by a kind of method and device of the image procossing provided through the embodiment of the present invention Value is layered, and the number of colors in every layer is reduced, and is reduced the complexity of the color of each figure layer, is then known to every layer Not, the accuracy rate of image recognition is improved, so that check results are more accurate.
3, the method and device of a kind of image procossing provided through the embodiment of the present invention, in each text geometry Angle be adjusted so that each text geometry more standard, more standardizes, convenient for identification, can be improved to be identified The accuracy rate of word content in image, and then can be improved the accuracy rate of check results.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including There is also other identical factors in the process, method, article or equipment of the element.
Those of ordinary skill in the art will appreciate that:Realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes:ROM, RAM, magnetic disk or light In the various media that can store program code such as disk.
Finally, it should be noted that:The foregoing is merely presently preferred embodiments of the present invention, is merely to illustrate skill of the invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (6)

1. a kind of method of image procossing, which is characterized in that including:Verification template is preset, further includes:
S1:Obtain at least one geometry and word content in images to be recognized;
S2:According at least one described geometry and the word content, at least one school of the images to be recognized is determined Test region;
S3:According to the verification template and the word content, the content in each verification region is verified;
The S1, including:
The color-values for obtaining each pixel of the images to be recognized, according to the color-values of each pixel, by described wait know Other image is divided at least one figure layer;
Obtain the geometry and word content in each figure layer;
The word content obtained in each figure layer, including:
A1:Data space is established, current layer is loaded into data space;
A2:Obtain the text geometry in current layer;
A3:Obtain the connection track of each text geometry in current layer;
A4:In the data space, the coordinate of each endpoint in each text geometry is obtained;
A5:According to the coordinate of each endpoint in each text geometry, each angle in each text geometry is determined Angle;
A6:Whether the angle for judging each angle is preset standard angle, if it is, otherwise executing A8 successively executes step Rapid A7, A8;
A7:Adjustment is not the coordinate of the corresponding endpoint of angle of standard angle, so that each folder in each text geometry The angle at angle is standard angle, executes step A8;
A8:According to the coordinate of the connection track and each endpoint of each text geometry, by the institute of each text geometry There is endpoint to be correspondingly connected with, obtains the grapholect geometry of each text geometry;
A9:Each grapholect geometry in current layer is identified, the word content in current layer is obtained.
2. the method according to claim 1, wherein the S2, including:
Geometry according to the word content, where from the geometry where the word content and with the word content At least one verification region is determined in the adjacent geometry of structure.
3. the method according to claim 1, wherein the verification template includes:Verify the content in region Attribute specification;
The S3, including:
According to the word content in the adjacent geometry of content and current verification region in current verification region, determine current Verify the attribute specification in the corresponding verification template in region;
Whether the content in the current verification region of judgement meets corresponding attribute specification in the verification template, if it is, really Content before settled in verification region is by verification, otherwise, it determines current verification goes the content in hospital not over verification.
4. a kind of device of image procossing, which is characterized in that including:
Setting unit, for verification template to be arranged;
Acquiring unit, for obtaining at least one geometry and word content in images to be recognized;
Determination unit, for determining the images to be recognized according at least one described geometry and the word content At least one verification region;
Verification unit, for carrying out school to the content in each verification region according to the verification template and the word content It tests;
The acquiring unit, the color-values of each pixel for obtaining the images to be recognized, according to each pixel The images to be recognized is divided at least one figure layer by color-values, obtains geometry and word content in each figure layer;
The acquiring unit is specific to execute when executing the word content obtained in each figure layer:
A1:Data space is established, current layer is loaded into data space;
A2:Obtain the text geometry in current layer;
A3:Obtain the connection track of each text geometry in current layer;
A4:In the data space, the coordinate of each endpoint in each text geometry is obtained;
A5:According to the coordinate of each endpoint in each text geometry, each angle in each text geometry is determined Angle;
A6:Whether the angle for judging each angle is preset standard angle, if it is, otherwise executing A8 successively executes step Rapid A7, A8;
A7:Adjustment is not the coordinate of the corresponding endpoint of angle of standard angle, so that each folder in each text geometry The angle at angle is standard angle, executes step A8;
A8:According to the coordinate of the connection track and each endpoint of each text geometry, by the institute of each text geometry There is endpoint to be correspondingly connected with, obtains the grapholect geometry of each text geometry;
A9:Each grapholect geometry in current layer is identified, the word content in current layer is obtained.
5. device according to claim 4, which is characterized in that the determination unit, for according to the word content, from In geometry and the geometry adjacent with the geometry where the word content where the word content really Make at least one verification region.
6. device according to claim 4, which is characterized in that the verification template includes:Verify the content in region Attribute specification;
The verification unit, in the adjacent geometry according to content and current verification region in current verification region Word content determines the attribute specification in the corresponding verification template in current verification region, judges the content in current verification region Whether in the verification template corresponding attribute specification is met, if it is, determining that the content in current verification region passes through school It tests, otherwise, it determines current verification goes the content in hospital not over verification.
CN201510801585.1A 2015-11-19 2015-11-19 A kind of method and device of image procossing Active CN105279525B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510801585.1A CN105279525B (en) 2015-11-19 2015-11-19 A kind of method and device of image procossing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510801585.1A CN105279525B (en) 2015-11-19 2015-11-19 A kind of method and device of image procossing

Publications (2)

Publication Number Publication Date
CN105279525A CN105279525A (en) 2016-01-27
CN105279525B true CN105279525B (en) 2018-11-27

Family

ID=55148506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510801585.1A Active CN105279525B (en) 2015-11-19 2015-11-19 A kind of method and device of image procossing

Country Status (1)

Country Link
CN (1) CN105279525B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102496618B1 (en) 2016-03-16 2023-02-06 삼성전자주식회사 Method and apparatus for identifying content
CN107463868B (en) * 2016-06-02 2021-02-23 阿里巴巴集团控股有限公司 Electronic form verification method and device
CN107622255B (en) * 2017-10-12 2020-09-01 江苏鸿信***集成有限公司 Bill image field positioning method and system based on position template and semantic template
CN108241861A (en) * 2018-01-05 2018-07-03 新华智云科技有限公司 A kind of data visualization method and equipment
CN110457973A (en) * 2018-05-07 2019-11-15 北京中海汇银财税服务有限公司 A kind of method and system of bank slip recognition
CN108764194A (en) * 2018-06-04 2018-11-06 科大讯飞股份有限公司 A kind of text method of calibration, device, equipment and readable storage medium storing program for executing
CN109492533A (en) * 2018-10-11 2019-03-19 平安科技(深圳)有限公司 The method, apparatus and computer equipment of educational background are verified using image recognition technology
CN111127673A (en) * 2019-12-27 2020-05-08 航天信息股份有限公司 Invoice self-service authentication method and system supporting high-speed scanner
CN111414866A (en) * 2020-03-24 2020-07-14 上海眼控科技股份有限公司 Vehicle application form detection method and device, computer equipment and storage medium
CN113569863B (en) * 2021-09-26 2022-01-25 广东电网有限责任公司中山供电局 Document checking method, system, electronic equipment and storage medium
CN115131910B (en) * 2022-05-30 2024-02-13 华中科技大学同济医学院附属协和医院 Bill checking system based on big data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5428694A (en) * 1993-10-14 1995-06-27 International Business Machines Corporation Data processing system and method for forms definition, recognition and verification of scanned images of document forms
CN101739441A (en) * 2009-12-01 2010-06-16 中国建设银行股份有限公司 Method of image information input and system thereof
CN101923643A (en) * 2010-08-11 2010-12-22 中科院成都信息技术有限公司 General form recognizing method
CN102236782A (en) * 2010-04-30 2011-11-09 陈斌 Character identification method for certificates
CN103488999A (en) * 2013-09-11 2014-01-01 东华大学 Invoice data recording method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5428694A (en) * 1993-10-14 1995-06-27 International Business Machines Corporation Data processing system and method for forms definition, recognition and verification of scanned images of document forms
CN101739441A (en) * 2009-12-01 2010-06-16 中国建设银行股份有限公司 Method of image information input and system thereof
CN102236782A (en) * 2010-04-30 2011-11-09 陈斌 Character identification method for certificates
CN101923643A (en) * 2010-08-11 2010-12-22 中科院成都信息技术有限公司 General form recognizing method
CN103488999A (en) * 2013-09-11 2014-01-01 东华大学 Invoice data recording method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于统计和结构特征的手写数字识别研究;双小川等;《计算机工程与设计》;20120430;第33卷(第4期);第1533-1537页, *

Also Published As

Publication number Publication date
CN105279525A (en) 2016-01-27

Similar Documents

Publication Publication Date Title
CN105279525B (en) A kind of method and device of image procossing
WO2021042747A1 (en) Invoice picture recognition and verification method and system, device, and readable storage medium
CN109658584B (en) Bill information identification method and device
US20050207635A1 (en) Method and apparatus for printing documents that include MICR characters
CN109033058B (en) Contract text verification method, apparatus, computer device and storage medium
WO2020233035A1 (en) Information verification method and related apparatus
WO2021017272A1 (en) Pathology image annotation method and device, computer apparatus, and storage medium
JP2011510365A (en) Document verification using dynamic document identification framework
US20140046954A1 (en) Software tool for creation and management of document reference templates
CN105511791A (en) Handwriting processing method and device for electronic test and quality control record chart
JP2011507101A (en) Identification and verification of unknown documents by eigenimage processing
CN109271951B (en) Method and system for improving accounting and auditing efficiency
CN109446345A (en) Nuclear power file verification processing method and system
CN108734849B (en) Automatic invoice true-checking method and system
CN112989990B (en) Medical bill identification method, device, equipment and storage medium
CN112464925A (en) Mobile terminal account opening data bank information automatic extraction method based on machine learning
WO2018073986A1 (en) Operation assistance device and operation assistance program
CN113487286B (en) Safety quality inspection system, method, computer equipment and storage medium
CN103902995B (en) Table content method for automatically inputting and device
JP2018101327A (en) Data registering apparatus and data registering method
CN111104853A (en) Image information input method and device, electronic equipment and storage medium
CN205563854U (en) Serve all -in -one by oneself based on face detection and character recognition
CN110136317A (en) Papery voucher authentication information production method, device and distinguishing method between true and false, device and system
TWM626292U (en) Business-oriented key item key-value identification system
TWI684109B (en) A computer implemented system and method for collating and presenting multi-format information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20181016

Address after: 215100 818 Wusong Road, Wusong River Industrial Park, Wuzhong development area, Suzhou, Jiangsu

Applicant after: Tide Financial Information Technology Co Ltd

Address before: 250100 Ji'nan hi tech Zone No. 2877, Shandong Province

Applicant before: Inspur Group Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant