CN112308141B - Scanning bill classification method, system and readable storage medium - Google Patents

Scanning bill classification method, system and readable storage medium Download PDF

Info

Publication number
CN112308141B
CN112308141B CN202011188083.3A CN202011188083A CN112308141B CN 112308141 B CN112308141 B CN 112308141B CN 202011188083 A CN202011188083 A CN 202011188083A CN 112308141 B CN112308141 B CN 112308141B
Authority
CN
China
Prior art keywords
template
image
pyramid
matching
classified
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
CN202011188083.3A
Other languages
Chinese (zh)
Other versions
CN112308141A (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.)
China Electronics Great Wall Changsha Information Technology Co ltd
Great Wall Information Co Ltd
Original Assignee
China Electronics Great Wall Changsha Information Technology Co ltd
Great Wall Information 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 China Electronics Great Wall Changsha Information Technology Co ltd, Great Wall Information Co Ltd filed Critical China Electronics Great Wall Changsha Information Technology Co ltd
Priority to CN202011188083.3A priority Critical patent/CN112308141B/en
Publication of CN112308141A publication Critical patent/CN112308141A/en
Application granted granted Critical
Publication of CN112308141B publication Critical patent/CN112308141B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/457Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by analysing connectivity, e.g. edge linking, connected component analysis or slices
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a system for classifying scanning bills and a readable storage medium, wherein the method comprises the following steps: step 1: extracting the edges of the bills to be classified and generating binary edge images; step 2: constructing a pyramid image of the bill to be classified based on the binary edge image of the bill to be classified; and step 3: and matching the pyramid images of the bills to be classified with pyramid images of different types of bills in the template library to identify the types of the bills to be classified. The method realizes matching identification by utilizing the pyramid image, and the algorithm is simpler and more efficient. Furthermore, the pyramid images in the template library comprise the pyramid images of the parent template and the pyramid images of the child template, wherein the child template is skillfully arranged by the parent template, so that preliminary matching and preliminary positioning can be quickly and efficiently performed, and the identification efficiency of the bill categories is improved.

Description

Scanning bill classification method, system and readable storage medium
Technical Field
The invention belongs to the technical field of self-service equipment, and particularly relates to a scanning bill classification method and system and a readable storage medium.
Background
In the using process of the bank bills, the bills issued by different banks are involved, and various categories of the bills issued by each bank exist, such as: deposit orders, transfer checks, cash checks, money orders, bills of entry, vouchers, and the like. Before these documents can be identified and certified, they must be sorted. The traditional manual classification processing efficiency is low, and an automatic and rapid high-efficiency bank scanning bill classification processing system is needed. The prior bank scanning bill classification technology mainly adopts a deep learning algorithm and a template matching algorithm based on image gradient information, the deep learning algorithm needs a large number of training samples, and bank financial bills serve as a very sensitive information source and are very difficult to obtain a large number of sample data; the template matching of the basic image gradient information is sensitive to the interference factors such as the occurrence of a seal and printing information of a target in a bill to be matched, and the error rate is high. Therefore, it is necessary to develop a new technology for classifying bills.
Disclosure of Invention
The invention aims to provide a brand-new technical means for realizing classification and identification of scanned bills.
In one aspect, the invention provides a scanned bill classification method, which comprises the following steps:
step 1: extracting the edges of the bills to be classified and generating binary edge images;
step 2: constructing a pyramid image of the bill to be classified based on the binary edge image of the bill to be classified;
and step 3: and matching the pyramid images of the bills to be classified with pyramid images of different types of bills in the template library to identify the types of the bills to be classified.
In the method, the character tower images in the template library are used as matching standards for identifying the types of the bills to be classified, and the overall scheme is simpler and more efficient.
Preferably, the pyramid image of each type of ticket in the template library comprises a pyramid image of a parent template and a pyramid image of a child template, wherein the child template is a local image of the parent template, and the parent template at least comprises a ticket category mark;
the matching process in the step 3 is as follows: matching the pyramid images of the sub-templates of the bills of one class with the pyramid images of the bills to be classified, if the matching is successful, determining the matching areas of the pyramid images of the father templates and the pyramid images of the bills to be classified by using the sub-templates, matching the two, and if the matching is unsuccessful, matching by replacing the pyramid images of the sub-templates of the bills of the other class; and if the matching is successful, the type of the bills is the type of the bills to be classified.
The pyramid images in the template library comprise pyramid images of a parent template and pyramid images of a child template, wherein the purpose of skillfully setting the child template by using the parent template is as follows: the method can be used for quickly and efficiently carrying out preliminary matching and preliminary positioning, lays a foundation for quickly and accurately matching the follow-up father template with the bills to be classified, and greatly improves the identification efficiency of the bill categories.
Preferably, the pyramid image matching process is implemented according to an improved average Hausdorff distance algorithm, wherein the improved average Hausdorff distance correspondingly calculated by two matching regions is smaller than a preset threshold, and the two matching regions are successfully matched; otherwise, the matching is unsuccessful; the modified average Hausdorff distance formula is as follows:
d MH =max{d m (A,B),d m (B,A)}
Figure BDA0002751983170000021
Figure BDA0002751983170000022
in the formula (d) MH When a certain layer of images of two pyramid images are matched, the improved average Hausdorff distance value corresponding to the matching area is represented, A represents the pixel point set corresponding to the matching area in the pyramid images of the sub template or the father template, and B represents the pixel point set to be classifiedSet of pixel points corresponding to matching regions in pyramid image of document, N A The number of pixels in the pixel point set A, N B Is the number of pixel points in the pixel point set B, a is the pixel of a certain pixel point in the pixel point set A, B is the pixel of a certain pixel point in the pixel point set B, d m (A, B) is the average Hausdorff distance between the pixel point sets A, B, representing the average of the distances from all points in the pixel point set A to the pixel point set B, d m (B, A) is expressed as the average of the distances from all the points in the pixel point set B to the pixel point set A.
The invention is improved based on the traditional Hausdorff distance, and the traditional formula comprises the following components:
Figure BDA0002751983170000023
however, the point set N corresponding to the note to be sorted B The statistics of the method is easy to generate errors, and the problem of inaccurate statistics exists because the positioning of the corresponding region of the bill to be classified is possibly greatly uncertain, so the method limits the matching region of the bill to be classified on the basis of the template window, because if two images are matched, the corresponding regions of the two images are consistent theoretically, and the method can obtain a more accurate matching result by improving an average Hausdorff distance formula.
Preferably, the matching sequence of the matching process in step 3 is: firstly, matching a T-layer image in a pyramid image of a sub-template with a corresponding T-layer image in a pyramid image of a bill to be classified, wherein the T-layer image is a top-layer image of the pyramid image of the sub-template, matching a T-1-layer image in the pyramid image of a father template with a corresponding T-1-layer image in the pyramid image of the bill to be classified if matching is successful, and matching a next-layer image until a bottom-layer image is successfully matched if matching is successful; and if the matching condition exists, the next sub-template is changed for matching again.
The invention can accelerate the overall recognition efficiency by utilizing the matching process of the sub-templates.
Preferably, the construction process of the template library is as follows:
s1: acquiring template images of bill classification, extracting edges of the template images, and taking binary edge images as parent templates, wherein the template images corresponding to bills of each type at least comprise category marks of bills of one type;
s2: constructing a sub-template by using the parent template;
s3: and constructing an image pyramid of the parent template and the child template.
Preferably, the grade of the image pyramid of the parent template and the child template is determined by the size of the child template; the number of stages of the pyramid images of the bill to be classified is determined by the size of the binary edge image of the bill to be classified, and a calculation formula of the number of stages is as follows:
L=min(log(min(width,height))/log(2)-2,4)
in the formula, L is the level of the image pyramid, and width and height are respectively the width and height of the sub-template or the binary edge image of the bill to be classified.
Preferably, the building process of the sub-template is as follows:
firstly, performing rectangular structural element expansion operation on a parent template;
then, performing connected domain analysis on the image after the expansion operation, and setting a foreground pixel value in the maximum connected domain as a background pixel value;
and finally, carrying out exclusive OR operation on the area image of the maximum connected domain and the parent template to obtain a child template.
The maximum area of the connected domain has more reserved characteristics, so that the characteristics contained in the sub-template can be more by using the maximum area to construct the sub-template, the initial positioning and the initial matching can be more accurately performed, and the identification efficiency and the reliability can be finally improved.
In a second aspect, the invention provides a system based on the scanned bill classification method, including:
the bill processing module to be classified: the system comprises a pyramid image generation unit, a classification unit and a classification unit, wherein the pyramid image generation unit is used for extracting edges of bills to be classified, generating binary edge images and constructing pyramid images of the bills to be classified based on the binary edge images of the bills to be classified;
a template library construction module: the method comprises the steps of constructing a template library, wherein the template library comprises pyramid images of different types of bills;
a matching identification module: the method is used for matching the pyramid images of the bills to be classified with the pyramid images of the bills of different types in the template library to identify the types of the bills to be classified.
In a third aspect, the invention provides a system comprising a processor and a memory, the memory storing a computer program, the processor invoking the computer program to perform the steps of the scan ticket categorization method.
In a fourth aspect, the present invention provides a readable storage medium storing a computer program, the computer program being called by a processor to execute the steps of the scanned ticket sorting method.
Advantageous effects
The scanning bill classification method realizes bill matching by utilizing the pyramid images, provides a brand-new technical means for realizing bill classification, and is simpler and more efficient compared with a deep learning algorithm and the like.
Secondly, in a further optimization scheme, the pyramid images in the template library of the invention are provided with pyramid images of a parent template and pyramid images of a child template, wherein the purpose of skillfully setting the child template by using the parent template is as follows: the method can rapidly and efficiently carry out preliminary matching and preliminary positioning, lays a foundation for rapid and accurate matching of a follow-up father template and the bill to be classified, and greatly improves the identification efficiency of the bill category.
Drawings
FIG. 1 is a block diagram of the structure of the bill sorting of the present invention;
FIG. 2 is a block diagram of the present invention's structure for extracting sub-templates from a parent template;
FIG. 3 is a binary parent template process image for image preprocessing and Canny edge extraction in accordance with the present invention;
FIG. 4 is a sub-template image generated by expanding, connected domain analyzing, XOR and cutting the parent template of the present invention;
FIG. 5 is an image of the parent and child templates after feature point optimization.
Detailed Description
The present invention will be further described with reference to the following examples. In the embodiment, the bank notes are taken as an example for description, wherein the classification of the bank notes is generally performed according to the bank classification and according to the note contents, such as deposit receipt, cash check, money order, and the like.
The scanning bill classification method provided by the embodiment mainly comprises two parts, namely: and constructing a template library and identifying the bills to be classified.
The process of constructing the template library comprises the following steps:
a: and importing template images of various bills, and performing image preprocessing on each template image. The imported template image is shown as (one) in fig. 3. The preprocessing is to remove noise interference, and a bilateral filtering algorithm is selected in this embodiment, which is advantageous in removing noise existing in the template image and preserving edge features in the template image, such as the (second) diagram in fig. 3. It should be understood that the template image corresponding to one type of bill at least includes the category label of one type of bill, for example, the bill is differentiated by a bank, the corresponding category label may be a LOGO of each bank, that is, the template image is an image including the LOGO of the bank, and in order to reduce the amount of calculation and improve the recognition reliability, the template image is preferably provided with an image area including only the category label in one type of bill.
B: canny edge detection is performed on the preprocessed template image to obtain an edge image, and a binary edge image is generated, wherein the binary edge image is used as a parent template, such as a (three) diagram in fig. 3.
C: and constructing a sub-template by using the parent template. It should be understood that the local area of the sub-template, which is the parent template, is used for preliminary identification and positioning, in this embodiment, in order to improve the reliability of the preliminary identification and the reliability of the positioning, the acquisition mode of the sub-template is preferably as follows:
firstly, 3 x 3 expansion operation is carried out on a father template image to generate an image (II) in a graph 4, the expansion image is subjected to line passing connected domain analysis through 8 neighborhoods to find a maximum connected domain, and the foreground pixel value 1 of the maximum connected domainSetting the background pixel value to 0, obtaining the (third) image in fig. 4, then performing an exclusive or operation with the original parent template to obtain the (fourth) image in the original child template fig. 4, and then clipping the child template to obtain the final child template image, which is the (fifth) image in fig. 4. The XOR operation is formulated as: dst (x, y) = src 1 (x,y)^src 2 (x, y), where dst (x, y) is the image in the exclusive-or operation, (x, y) denotes the position of the pixel point, src 1 For parent template image, src 2 Is the image after the connected domain analysis.
D: and constructing an image pyramid of the parent template and the child template. In this embodiment, the number of levels L of the image pyramid of the parent template and the child template is determined by the size of the image of the child template, and the calculation formula is as follows: l = min (log (min, height))/log (2) -2,4), where width and height are the width and height of the sub-template image, respectively. Setting the parent template and the child template obtained in the steps 2 and 3 as a level 0 pyramid image, wherein the level 1 pyramid image operation process is as follows:
dividing the binary pyramid image of the 0 th level into cells with the size of 2 multiplied by 2, counting the number of foreground pixels of each cell, wherein the number of the foreground pixels of each cell is 1, judging whether the total number of the foreground pixels with the value of 1 is larger than a preset threshold value, filling all the 2 multiplied by 2 cells into foreground pixels with the value of 1 when the number of the foreground pixels is larger than the threshold value, and otherwise filling all the cells into background pixels with the value of 0. And carrying out interlaced and alternate image sampling operation on the image subjected to the filling operation to obtain a 1 st-level binary pyramid image. The same operation process can be operated on the basis of the pyramid image of the level 1 to obtain the pyramid image of the level 2, and the pyramid image is constructed by analogy.
E: and optimizing feature points of the pyramid images of each level, and exporting and storing the parent template pyramid images and the child template pyramid images after feature point optimization in a file manner, wherein the parent template pyramid images and the child template pyramid images corresponding to various bills form the template library. The optimization method selected in the embodiment is as follows: and traversing each level of image in the pyramid image by using a 5 multiplied by 5 rectangular frame, and setting all feature points of the rectangular frame except the central position as 0 when the pixel value of the central position of the rectangular frame is a foreground pixel value 1.
The identification process of the bill to be classified is as follows:
a: and (4) introducing a color scanning bill to be classified, and converting the color scanning bill into a gray image.
b: the grayscale image is preprocessed, in this embodiment, bilateral filtering operation is performed, so that noise in the image is removed and edge features of the image are protected.
c: and (4) extracting edge feature points of the denoised bill image to be classified by adopting Canny edge detection, and obtaining a binary edge image.
d: and establishing a pyramid image according to the binary edge image of the bill to be classified, wherein the level number of the pyramid image is related to the size of the binary edge image, and the construction process of the pyramid image is described by referring to the corresponding process.
e: and (4) optimizing the characteristic points of all levels of images of the pyramid paper of the bill to be classified.
f: and (5) importing a template library.
g: and matching the pyramid images of the bills to be classified with pyramid images of different types of bills in the template base by adopting an improved average Hausdorff distance algorithm to identify the types of the bills to be classified. The specific implementation process is as follows:
firstly, matching a T-layer image in a pyramid image of a sub-template with a corresponding T-layer image in a pyramid image of a bill to be classified, wherein the T-layer image is a top-layer image of the pyramid image of the sub-template, and if the matching is unsuccessful, replacing the next sub-template for re-matching; if the matching is successful, matching the T-1 layer image in the pyramid image of the father template with the corresponding T-1 layer image in the pyramid image of the bill to be classified, and if the matching is successful, matching the next layer image until the bottom layer image is successfully matched; if the matching condition exists, the next sub-template is changed for matching again. It should be understood that when the pyramid images of the documents to be sorted are matched with the pyramid images of the template, the images, which are all of the same rank, are matched based on the improved average Hausdorff distance.
In order to further accelerate the matching process, when the top images of the pyramid images of the parent template and the child template are matched with the top image of the pyramid image of the bill to be classified, if the number of foreground pixels of a to-be-detected area which takes the current position as the center and takes the template as the size is far larger than or far smaller than the number of foreground pixels of the template, the detection of the bill template is directly skipped, and the next bill detection is carried out.
In this embodiment, the improved average Hausdorff distance formula is as follows:
d MH =max{d m (A,B),d m (B,A)}
Figure BDA0002751983170000061
Figure BDA0002751983170000062
in the formula, d MH When a certain layer of images of two pyramid images are matched, an improved average Hausdorff distance value corresponding to a matching area is represented, A represents a pixel point set corresponding to the matching area in the pyramid images of a sub template or a father template, B represents a pixel point set corresponding to the matching area in the pyramid images of the bills to be classified, and N is represented A The number of pixels in the pixel point set A, N B The number of the pixel points in the pixel point set B, a is the pixel of a certain pixel point in the pixel point set A, B is the pixel of a certain pixel point in the pixel point set B, d m (A, B) is the average Hausdorff distance between the pixel point sets A, B, representing the average of the distances from all points in the pixel point set A to the pixel point set B, d m (B, A) is expressed as the average of the distances from all the points in the pixel point set B to the pixel point set A.
When a certain level in the pyramid images of the bills to be classified is matched with the images corresponding to the level in the pyramid images of the sub template or the father template, the improved average Hausdorff distance values of the two image areas are calculated by adopting the formula, if the improved average Hausdorff distance values are smaller than a preset threshold value, the improved average Hausdorff distance values are considered to be matched with the preset threshold value, and if the improved average Hausdorff distance values are not smaller than the preset threshold value, the improved average Hausdorff distance values are considered to be not matched with the preset threshold value. It will also be appreciated that when a sub-template is matched with a document to be sorted, the matching regions of the parent template and the image of the document to be sorted are determined according to the positions of the corresponding marks in the sub-template, which should be such that the features of the corresponding sub-template regions in the two correspond, for example, the positions of the "silver" words in the two images are correspondingly overlapped in this embodiment.
In some embodiments, the present invention further provides a system based on the scanned bill classification method, including:
the bill to be classified processing module: the pyramid image generating device is used for extracting the edges of the bills to be classified, generating binary edge images and constructing pyramid images of the bills to be classified based on the binary edge images of the bills to be classified;
a template library construction module: the method comprises the steps of constructing a template library, wherein the template library comprises pyramid images of different types of bills;
and the matching identification module is used for matching the pyramid images of the bills to be classified with pyramid images of different types of bills in the template library to identify the types of the bills to be classified.
Specifically, the bill processing module to be classified comprises: the device comprises a to-be-classified bill image preprocessing unit, a to-be-classified bill image edge extracting unit and a pyramid image constructing unit of the to-be-classified bill. The device comprises a to-be-classified bill image preprocessing unit, a to-be-classified bill image preprocessing unit and a to-be-classified bill image preprocessing unit, wherein the to-be-classified bill image preprocessing unit is used for performing gray processing and preprocessing on color scanning photos of the to-be-classified bills. And the bill image to be classified edge extraction unit is used for extracting edge feature points of the denoised bill image to be classified by Canny edge detection and obtaining a binary edge image. The pyramid image construction unit of the bill to be classified is used for constructing a pyramid image according to the binary edge image of the bill to be classified.
The template library construction module comprises: the template image processing system comprises a template image acquisition unit, a template image preprocessing unit, a template image edge extraction unit, a sub-template construction unit and an image pyramid construction unit of a father template and a sub-template.
The template image acquisition unit is used for acquiring template images of various bills, the template image preprocessing unit is used for preprocessing the template images, the template image edge extraction unit is used for performing Canny edge detection on the preprocessed template images to obtain edge images, binary edge images are generated, and the binary edge images are used as parent templates. The sub-template building unit is used for building a sub-template by using the parent template; and the image pyramid constructing units of the parent template and the child template are used for constructing the image pyramids of the parent template and the child template.
It should be understood that, the specific implementation process of the above unit module refers to the method content, and the present invention is not described herein in detail, and the division of the above functional module unit is only a division of a logic function, and there may be another division manner in the actual implementation, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. Meanwhile, the integrated unit can be realized in a hardware form, and can also be realized in a software functional unit form.
In some possible embodiments, the invention also provides a system comprising a processor and a memory, the memory storing a computer program, the processor invoking the computer program to perform the steps of the scanned document sorting method.
In some possible embodiments, the present invention further provides a readable storage medium storing a computer program, which is called by a processor to execute the steps of the scan ticket classifying method.
It should be understood that in the embodiments of the present invention, the Processor may be a Central Processing Unit (CPU), and the Processor may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory may include both read-only memory and random access memory and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.
The readable storage medium is a computer readable storage medium, which may be an internal storage unit of the controller according to any of the foregoing embodiments, for example, a hard disk or a memory of the controller. The readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the controller. Further, the readable storage medium may also include both an internal storage unit and an external storage device of the controller. The readable storage medium is used for storing the computer program and other programs and data required by the controller. The readable storage medium may also be used to temporarily store data that has been output or is to be output.
It should be emphasized that the examples described herein are illustrative and not restrictive, and thus the invention is not to be limited to the examples described herein, but rather to other embodiments that may be devised by those skilled in the art based on the teachings herein, and that various modifications, alterations, and substitutions are possible without departing from the spirit and scope of the present invention.

Claims (8)

1. A scanned bill classification method is characterized in that: the method comprises the following steps:
step 1: extracting the edges of the bills to be classified and generating binary edge images;
step 2: constructing a pyramid image of the bill to be classified based on the binary edge image of the bill to be classified;
and step 3: matching the pyramid images of the bills to be classified with pyramid images of different types of bills in the template library to identify the types of the bills to be classified;
the pyramid image of each type of bill in the template library comprises a pyramid image of a parent template and a pyramid image of a child template, wherein the child template is a local image of the parent template, and the parent template at least comprises a bill category mark;
the matching process in the step 3 is as follows: matching the pyramid images of the sub-templates of the bills of one class with the pyramid images of the bills to be classified, if the matching is successful, determining the matching areas of the pyramid images of the father templates and the pyramid images of the bills to be classified by using the sub-templates, matching the two, and if the matching is unsuccessful, matching by replacing the pyramid images of the sub-templates of the bills of the other class; if the matching is successful, the class of the bills is the class of the bills to be classified;
the matching sequence of the matching process in the step 3 is as follows: firstly, matching a T-layer image in a pyramid image of a sub-template with a corresponding T-layer image in a pyramid image of a bill to be classified, wherein the T-layer image is a top-layer image of the pyramid image of the sub-template, matching a T-1-layer image in the pyramid image of a father template with a corresponding T-1-layer image in the pyramid image of the bill to be classified if matching is successful, and matching a next-layer image of the pyramid image of the father template until a bottom-layer image is successfully matched if matching is successful; and if the matching condition exists, the next sub-template is changed for matching again.
2. The method of claim 1, wherein: the pyramid image matching process is realized according to an improved average Hausdorff distance algorithm, wherein the improved average Hausdorff distance correspondingly calculated by two matching regions is smaller than a preset threshold value, and the two matching regions are successfully matched; otherwise, the matching is unsuccessful; the modified average Hausdorff distance formula is as follows:
d MH =max{d m (A,B),d m (B,A)}
Figure FDA0003823866830000011
Figure FDA0003823866830000012
in the formula (d) MH When images of a certain layer representing two pyramid images are matched, the matching area pairThe improved average Hausdorff distance value is obtained, A represents the pixel point set corresponding to the matching area in the pyramid image of the sub template or the father template, B represents the pixel point set corresponding to the matching area in the pyramid image of the bill to be classified, and N A The number of pixels in the pixel point set A, N B Is the number of pixel points in the pixel point set B, a is the pixel of a certain pixel point in the pixel point set A, B is the pixel of a certain pixel point in the pixel point set B, d m (A, B) is the average Hausdorff distance between the pixel point sets A, B, representing the average of the distances from all points in the pixel point set A to the pixel point set B, d m (B, A) is then expressed as the average of the distances from all points in the set of pixel points B to the set of pixel points A.
3. The method of claim 1, wherein: the construction process of the template library is as follows:
s1: acquiring template images of bill classification, extracting edges of the template images, and taking binary edge images as parent templates, wherein the template images corresponding to bills of each type at least comprise category marks of bills of one type;
s2: constructing a sub-template by using the parent template;
s3: and constructing an image pyramid of the parent template and the child template.
4. The method of claim 3, wherein: the grade numbers of the image pyramids of the parent template and the child template are determined by the size of the child template; the number of stages of the pyramid images of the bill to be classified is determined by the size of the binary edge image of the bill to be classified, and a calculation formula of the number of stages is as follows:
L=min(log(min(width,height))/log(2)-2,4)
in the formula, L is the level of the image pyramid, and width and height are respectively the width and height of the sub-template or the binary edge image of the bill to be classified.
5. The method of claim 3, wherein: the construction process of the sub-template comprises the following steps:
firstly, performing rectangular structural element expansion operation on a parent template;
then, performing connected domain analysis on the image after the expansion operation, and setting a foreground pixel value in the maximum connected domain as a background pixel value;
and finally, carrying out exclusive OR operation on the area image of the maximum connected domain and the parent template to obtain a child template.
6. A system based on the method of any one of claims 1 to 5, characterized in that: the method comprises the following steps:
the bill to be classified processing module: the system comprises a pyramid image generation unit, a classification unit and a classification unit, wherein the pyramid image generation unit is used for extracting edges of bills to be classified, generating binary edge images and constructing pyramid images of the bills to be classified based on the binary edge images of the bills to be classified;
a template library construction module: the method comprises the steps of constructing a template library, wherein the template library comprises pyramid images of different types of bills;
a matching identification module: the method is used for matching the pyramid images of the bills to be classified with the pyramid images of the bills of different types in the template library to identify the types of the bills to be classified.
7. A system, characterized by: comprising a processor and a memory, said memory storing a computer program, said processor invoking the computer program to perform the steps of the method of any of claims 1-5.
8. A readable storage medium, characterized by: a computer program is stored, which is called by a processor to perform the steps of the method of any of claims 1-5.
CN202011188083.3A 2020-10-30 2020-10-30 Scanning bill classification method, system and readable storage medium Active CN112308141B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011188083.3A CN112308141B (en) 2020-10-30 2020-10-30 Scanning bill classification method, system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011188083.3A CN112308141B (en) 2020-10-30 2020-10-30 Scanning bill classification method, system and readable storage medium

Publications (2)

Publication Number Publication Date
CN112308141A CN112308141A (en) 2021-02-02
CN112308141B true CN112308141B (en) 2023-04-07

Family

ID=74332595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011188083.3A Active CN112308141B (en) 2020-10-30 2020-10-30 Scanning bill classification method, system and readable storage medium

Country Status (1)

Country Link
CN (1) CN112308141B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569863B (en) * 2021-09-26 2022-01-25 广东电网有限责任公司中山供电局 Document checking method, system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102194114A (en) * 2011-06-25 2011-09-21 电子科技大学 Method for recognizing iris based on edge gradient direction pyramid histogram
CN102509115A (en) * 2011-11-22 2012-06-20 北京京北方信息技术有限公司 Layered note type recognition method with backtracking and finding mechanism
CN105046197A (en) * 2015-06-11 2015-11-11 西安电子科技大学 Multi-template pedestrian detection method based on cluster
CN106709463A (en) * 2016-12-29 2017-05-24 武汉大学 Hierarchical semantics-based SAR image classification method
CN110533036A (en) * 2019-08-28 2019-12-03 湖南长城信息金融设备有限责任公司 A kind of bill scan image quick slant correction method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101581112B1 (en) * 2014-03-26 2015-12-30 포항공과대학교 산학협력단 Method for generating hierarchical structured pattern-based descriptor and method for recognizing object using the descriptor and device therefor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102194114A (en) * 2011-06-25 2011-09-21 电子科技大学 Method for recognizing iris based on edge gradient direction pyramid histogram
CN102509115A (en) * 2011-11-22 2012-06-20 北京京北方信息技术有限公司 Layered note type recognition method with backtracking and finding mechanism
CN105046197A (en) * 2015-06-11 2015-11-11 西安电子科技大学 Multi-template pedestrian detection method based on cluster
CN106709463A (en) * 2016-12-29 2017-05-24 武汉大学 Hierarchical semantics-based SAR image classification method
CN110533036A (en) * 2019-08-28 2019-12-03 湖南长城信息金融设备有限责任公司 A kind of bill scan image quick slant correction method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Template matching in pyramids;Steven L Tanimoto;《Computer Graphics and Image Processing》;20041001;第356-369页 *
一种基于Hausdorff距离的目标跟踪算法;陶杰 等;《微计算机信息》;20090228;第233-235页 *

Also Published As

Publication number Publication date
CN112308141A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN109657665B (en) Invoice batch automatic identification system based on deep learning
US10943105B2 (en) Document field detection and parsing
US11062131B1 (en) Systems and methods of check detection
Agrawal et al. Automated bank cheque verification using image processing and deep learning methods
KR101446376B1 (en) Identification and verification of an unknown document according to an eigen image process
KR101515256B1 (en) Document verification using dynamic document identification framework
US9230383B2 (en) Document image compression method and its application in document authentication
AU2011288069B2 (en) Valuable file identification method and identification system, device thereof
Van Beusekom et al. Text-line examination for document forgery detection
CN111353491B (en) Text direction determining method, device, equipment and storage medium
US10043071B1 (en) Automated document classification
CN111340035A (en) Train ticket identification method, system, equipment and medium
CN112989921A (en) Target image information identification method and device
CN112395995A (en) Method and system for automatically filling and checking bill according to mobile financial bill
CN113688821A (en) OCR character recognition method based on deep learning
KR101232683B1 (en) Method for recognizing denomination of banknotes using Bayesian approach
CN112308141B (en) Scanning bill classification method, system and readable storage medium
US10115036B2 (en) Determining the direction of rows of text
CN114511866A (en) Data auditing method, device, system, processor and machine-readable storage medium
Dhanawade et al. Open CV based information extraction from cheques
CN115035533B (en) Data authentication processing method and device, computer equipment and storage medium
CN114663899A (en) Financial bill processing method, device, equipment and medium
CN115205882A (en) Intelligent identification and processing method for expense voucher in medical industry
Saxena Identification of Fake Currency: A Case Study of Indian Scenario.
Sathisha Bank automation system for Indian currency-a novel approach

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 410100 No.5, east 3 Road, Changsha Economic and Technological Development Zone, Changsha City, Hunan Province

Applicant after: Great Wall Information Co.,Ltd.

Applicant after: CHINA ELECTRONICS GREAT WALL (CHANGSHA) INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 410100 No.5, east 3 Road, Changsha Economic and Technological Development Zone, Changsha City, Hunan Province

Applicant before: HUNAN GREATWALL INFORMATION FINANCIAL EQUIPMENT Co.,Ltd.

Applicant before: CHINA ELECTRONICS GREAT WALL (CHANGSHA) INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant