CN108717744B - Method and device for identifying seal serial number on financial document and terminal equipment - Google Patents

Method and device for identifying seal serial number on financial document and terminal equipment Download PDF

Info

Publication number
CN108717744B
CN108717744B CN201810392213.1A CN201810392213A CN108717744B CN 108717744 B CN108717744 B CN 108717744B CN 201810392213 A CN201810392213 A CN 201810392213A CN 108717744 B CN108717744 B CN 108717744B
Authority
CN
China
Prior art keywords
area
image
serial number
seal
foreground
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
CN201810392213.1A
Other languages
Chinese (zh)
Other versions
CN108717744A (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.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
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 Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201810392213.1A priority Critical patent/CN108717744B/en
Publication of CN108717744A publication Critical patent/CN108717744A/en
Application granted granted Critical
Publication of CN108717744B publication Critical patent/CN108717744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/2016Testing patterns thereon using feature extraction, e.g. segmentation, edge detection or Hough-transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/416Extracting the logical structure, e.g. chapters, sections or page numbers; Identifying elements of the document, e.g. authors

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Character Input (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention is suitable for the technical field of image recognition, and provides a method, a device, terminal equipment and a computer readable storage medium for recognizing a seal serial number on a financial document, wherein the method comprises the following steps: the method comprises the steps of intercepting a characteristic area from a financial document to be identified, carrying out binarization processing on an image of the characteristic area to obtain a binarized image, determining the position of a seal serial number in the binarized image based on pixel distribution characteristics in the binarized image, and identifying the seal serial number at the position. The method and the device can improve the accuracy of identifying the seal serial number of the electronic seal on the financial document.

Description

Method and device for identifying seal serial number on financial document and terminal equipment
Technical Field
The invention belongs to the technical field of image recognition, and particularly relates to a method and a device for recognizing a seal serial number on a financial document, terminal equipment and a computer-readable storage medium.
Background
At present, some financial documents (such as checks) are generally provided with printed electronic seals, seal serial numbers are printed on the electronic seals, and the seal serial numbers can be used as a characteristic for identifying the checks, so banks have a demand for identifying the seal serial numbers of the electronic seals on the financial documents.
However, financial documents generally have many characters, and these characters are easily confused with characters of the seal serial number on the electronic seal, which results in recognition errors, so that the accuracy of recognizing the seal serial number in the prior art is not high enough.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a terminal device and a computer readable storage medium for identifying a seal serial number on a financial document, so as to improve the accuracy of identifying the seal serial number of an electronic seal on the financial document.
The first aspect of the invention provides a method for identifying a seal serial number on a financial document, which comprises the following steps:
intercepting a characteristic area from a financial document to be identified, wherein the characteristic area comprises an area where a seal on the financial document is located;
carrying out binarization processing on the image of the characteristic region to obtain a binarized image;
determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image;
and identifying the serial number of the seal at the position.
Based on the first aspect, in a first possible implementation manner of the first aspect, the determining a position of a seal serial number in the binarized image based on a pixel distribution feature in the binarized image includes:
selecting a target area matched with a preset image template from the binary image based on the pixel distribution characteristics in the binary image;
and determining the position of the seal serial number in the target area according to the position of the seal serial number indicated by the image template.
Based on the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the image template includes a first foreground region and a first background region, and a pixel distribution feature of the image template includes: the number of foreground pixels in the first foreground region is greater than a first preset value, and the number of background pixels in the first background region is greater than a second preset value;
selecting a target area matched with a preset image template in the binary image based on the pixel distribution characteristics in the binary image, wherein the target area comprises:
sliding the image template on the binary image by a preset step length;
counting the pixel distribution characteristics of the corresponding area of the image template on the binary image in the sliding process;
and when the pixel distribution characteristics of the corresponding area of the image template on the binarized image are consistent with the pixel distribution characteristics of the image template, determining the corresponding area of the image template on the binarized image as a target area matched with the image template.
Based on the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the upper and lower boundaries of the first foreground area are used for indicating the upper and lower boundaries of the stamp serial number;
the determining the position of the seal serial number in the target area according to the position of the seal serial number indicated by the image template comprises the following steps:
and determining the upper and lower boundaries of the seal serial number in the target area based on the upper and lower boundaries of the first foreground area.
Based on the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, a left boundary of the first background area is used to indicate a left boundary of a stamp serial number;
the determining the position of the seal serial number in the target area according to the position of the seal serial number indicated by the image template comprises the following steps:
and determining the left boundary of the seal serial number in the target area based on the left boundary of the first background area.
Based on the second possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the image template further includes a second background region, a third background region, a fourth background region, and a second foreground region, and the pixel distribution characteristics of the image template further include: the number of background pixels in the second background area, the third background area and the fourth background area is greater than the second preset value, the number of foreground pixels in the second foreground area is greater than a third preset threshold, and foreground pixels in the second background area are concentrated on preset columns;
the third background area is located between the first foreground area and the second foreground area, the second foreground area is located above the third background area, and the first foreground area is located below the third background area.
Based on any one possible implementation manner of the second to fifth possible implementation manners of the first aspect, in a sixth possible implementation manner, after the performing binarization processing on the image of the feature region to obtain a binarized image, the method further includes:
calculating an integral image of the binarized image;
correspondingly, the pixel distribution characteristics of the corresponding area of the image template on the binarized image in the statistical sliding process include:
and counting the pixel distribution characteristics of the corresponding area of the image template on the binarized image in the sliding process based on the integral image.
A second aspect of the present invention provides an apparatus for identifying a stamp serial number on a financial document, the apparatus comprising:
the area intercepting unit is used for intercepting a characteristic area from the financial document to be identified, wherein the characteristic area comprises an area where a seal on the financial document is located;
a binarization unit, configured to perform binarization processing on the image of the feature region intercepted by the region interception unit to obtain a binarized image;
the position determining unit is used for determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image obtained by the binary unit;
and the seal serial number identification unit is used for identifying the seal serial number at the position determined by the position determination unit.
A third aspect of the invention provides a terminal device comprising a memory, a processor and a computer program stored in the memory and operable on the processor, the processor implementing the steps of the method of identifying a seal number on a financial document as claimed in any one of the preceding claims when executing the computer program.
A fourth aspect of the invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of identifying a seal number on a financial document according to any one of the preceding claims.
Compared with the prior art, the invention has the following beneficial effects:
by intercepting a characteristic area from a financial document to be identified; carrying out binarization processing on the image of the characteristic region to obtain a binarized image; determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image; identifying a stamp serial number at the location; on one hand, characters on non-characteristic areas on the financial document can be directly excluded; on the other hand, the seal serial number has specific pixel distribution characteristics on the binary image of the characteristic area, for example, the character pixels of the seal serial number are concentrated in a specific area, and another specific area except the seal serial number is a background and has no character pixels, and the character boundary of the seal serial number can be accurately positioned through the pixel distribution characteristics, so that other irrelevant characters on the financial document can be eliminated when the seal serial number is identified, and the accuracy of identifying the seal serial number of the electronic seal on the financial document is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating an implementation of a method for identifying a stamp serial number on a financial document according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a financial document according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of a feature area intercepted from a financial document as provided by an embodiment of the invention;
FIG. 4 is a schematic diagram of a binarized image provided by an embodiment of the present invention;
FIG. 5 is a flowchart of an implementation of a method for identifying a seal serial number on a financial document according to another embodiment of the present invention;
FIG. 6-a is a schematic diagram of an image template provided by an embodiment of the invention;
FIG. 6-b is a diagram of an image template according to another embodiment of the present invention;
FIG. 7 is a schematic structural diagram of an apparatus for identifying a serial number of a seal on a financial document according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following description is made by way of specific embodiments with reference to the accompanying drawings.
Referring to fig. 1, it shows a flowchart of an implementation of the method for identifying a stamp serial number on a financial document according to the embodiment of the present invention, which is detailed as follows:
step 101, intercepting a characteristic area from a financial document to be identified, wherein the characteristic area comprises an area where a seal on the financial document is located;
in the embodiment of the invention, the seal on the financial document, such as a check, is generally an electronic seal, the position of the electronic seal on the financial document is relatively fixed, and the inclination is small; therefore, based on the relatively fixed position of the stamp on the financial document, a characteristic area can be intercepted on the financial document to be identified, wherein the characteristic area comprises the area where the stamp is located.
Specifically, referring to fig. 2, a schematic diagram of a financial document according to an embodiment of the present invention is shown; the financial document is provided with an electronic seal of a corresponding bank, and the electronic seal comprises a seal serial number S5F374UY037 ZBPME.
Specifically, referring to fig. 3, a schematic diagram of a feature area cut from a financial document according to an embodiment of the present invention is provided, where the feature area includes an area where a stamp on the financial document is located.
102, carrying out binarization processing on the image of the characteristic region to obtain a binarized image;
in the embodiment of the invention, an image of a characteristic region is obtained through equipment comprising an image sensor, and binarization processing is carried out on the image of the characteristic region to obtain a binarized image of the characteristic region, wherein the binarized image comprises foreground pixels and background pixels, and the foreground pixels form foreground characters in the characteristic region.
Specifically, the maximum inter-class variance method (OTSU algorithm) may be adopted, and a coefficient may be multiplied to determine the binary segmentation threshold, where the coefficient may be 0.5. Specifically, referring to fig. 4, a schematic diagram of a binarized image according to an embodiment of the present invention is provided; on the binarized image, the foreground pixels (character points) are assigned to 1, and the background pixels (non-character points) are assigned to 0.
103, determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image;
in the embodiment of the invention, the pixel distribution characteristics in the binary image are counted, and the position of the seal serial number in the binary image is determined based on the counted pixel distribution characteristics; specifically, the position of the seal serial number in the binary image is determined by a template matching method based on the distribution characteristics of the foreground pixels and the distribution characteristics of the background pixels on the binary image. That is, through a preset stamp serial number template, an area matched with the stamp serial number template is searched in the binary image, and the area is used as the position of the stamp serial number.
And 104, identifying the serial number of the seal at the position.
In the embodiment of the invention, after the position of the seal serial number is determined, the position is identified based on a preset identification algorithm to obtain the corresponding seal serial number.
In view of the above, the present invention intercepts the feature area from the financial document to be identified; carrying out binarization processing on the image of the characteristic region to obtain a binarized image; determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image; identifying a stamp serial number at the location; on one hand, characters on non-characteristic areas on the financial document can be directly excluded; on the other hand, the seal serial number has specific pixel distribution characteristics on the binary image of the characteristic area, for example, the character pixels of the seal serial number are concentrated in a specific area, and another specific area except the seal serial number is a background and has no character pixels, and the character boundary of the seal serial number can be accurately positioned through the pixel distribution characteristics, so that other irrelevant characters on the financial document can be eliminated when the seal serial number is identified, and the accuracy of identifying the seal serial number of the electronic seal on the financial document is improved.
Fig. 5 shows a flowchart of an implementation of identifying a stamp serial number on a financial document according to another embodiment of the present invention, which is detailed as follows:
step 501, intercepting a characteristic area from a financial document to be identified, wherein the characteristic area comprises an area where a seal on the financial document is located;
502, carrying out binarization processing on the image of the characteristic region to obtain a binarized image;
in the embodiment of the present invention, the steps 501 to 502 may refer to the steps 101 to 102 in the embodiment shown in fig. 1.
Step 503, selecting a target area matched with a preset image template in the binary image based on the pixel distribution characteristics in the binary image;
in the embodiment of the invention, a target area matched with a preset image template is selected on the binary image in a template matching mode, and when the target area is consistent with the pixel distribution characteristics on the image template, the target area is determined to be matched with the image template.
Optionally, referring to fig. 6-a, the schematic diagram of an image template provided in the embodiment of the present invention may include a first foreground area 601 and a first background area 611, where specifically, the first foreground area 601 corresponds to a character area of a stamp serial number on a stamp, and the first background area 611 corresponds to a blank background area at an upper left corner of the stamp serial number on the stamp. The pixel distribution characteristics of the image template include: the number of foreground pixels in the first foreground region 601 is greater than a first preset value, and the number of background pixels in the first background region 611 is greater than a second preset value;
the implementation mode of selecting the target area matched with the image template on the binary image is specifically as follows:
sliding the image template on the binary image by a preset step length;
counting the pixel distribution characteristics of the corresponding area of the image template on the binary image in the sliding process;
and when the pixel distribution characteristics of the corresponding area of the image template on the binarized image are consistent with the pixel distribution characteristics of the image template, determining the corresponding area of the image template on the binarized image as a target area matched with the image template.
In the embodiment of the invention, a target area matched with the image template is selected on the binary image by a sliding window method, and the shape and the size of the sliding window are consistent with those of the image template.
Optionally, in order to reduce the amount of computation and increase the computation speed, in the embodiment of the present invention, the way of counting the pixel distribution characteristics of an area on the binarized image is specifically:
calculating an integral image of the binarized image;
and counting the pixel distribution characteristics of the corresponding area of the image template on the binarized image in the sliding process based on the integral image.
Optionally, referring to fig. 6-b, a schematic diagram of an image template according to another embodiment of the present invention is provided; the image template comprises a first foreground area 601, a first background area 611, a second background area 612, a third background area 613, a fourth background area 614 and a second foreground area 602, wherein the second background area 612 corresponds to the background area at the upper right corner of the seal serial number, the third background area 613 corresponds to the background area between the seal serial number and the 'business special seal' typeface, the fourth background area 614 corresponds to the background area below the seal serial number, and the second foreground area 602 corresponds to the 'business special seal' typeface on the seal.
Wherein the pixel distribution characteristics of the image template further include: the numbers of background pixels in the second background area 612, the third background area 613, and the fourth background area 614 are all greater than the second preset value, the number of foreground pixels in the second foreground area 602 is greater than a third preset threshold, and the foreground pixels in the second background area 602 are concentrated on a preset column (the second background area 602 passes through the right border of the table on the financial document, and the preset column corresponds to a foreground pixel point on the right border).
The third background area 613 is located between the first foreground area 601 and the second foreground area 602, the second foreground area 602 is located above the third background area 613, and the first foreground area 601 is located below the third background area 613.
Step 504, determining the position of the seal serial number in the target area according to the position of the seal serial number indicated by the image template;
in the embodiment of the invention, the image template can be obtained based on a standard stamp image, so that the position of the stamp serial number on the image template is determined, and then the position of the stamp serial number in the target area can be determined based on the position of the stamp serial number on the image template.
Optionally, the upper and lower boundaries of the first foreground region 601 may be used to indicate the upper and lower boundaries of the stamp serial number, for example, the upper and lower boundaries of the first foreground region may be the upper and lower boundaries of the stamp serial number, that is, the first foreground region 601 is a partial region on the stamp serial number.
Correspondingly, in the embodiment of the present invention, a specific manner of determining the position of the stamp serial number in the target area includes:
based on the upper and lower boundaries of the first foreground region 601, the upper and lower boundaries of the stamp serial number in the target region are determined.
Optionally, the left boundary of the first background area 611 is used to indicate the left boundary of the stamp serial number; illustratively, the left boundary of the first background area 611 may coincide with the left boundary of the stamp serial number.
Correspondingly, in the embodiment of the present invention, the specific manner of determining the position of the seal serial number in the target area further includes:
based on the left boundary of the first background area 611, the left boundary of the stamp serial number in the target area is determined.
And 505, identifying the seal serial number at the position.
In the embodiment of the present invention, step 505 may specifically refer to step 104 in the embodiment shown in fig. 1, and is not described herein again.
In view of the above, the present invention intercepts the feature area from the financial document to be identified; carrying out binarization processing on the image of the characteristic region to obtain a binarized image; determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image; identifying a stamp serial number at the location; on one hand, characters on non-characteristic areas on the financial document can be directly excluded; on the other hand, the seal serial number has specific pixel distribution characteristics on the binary image of the characteristic area, for example, the character pixels of the seal serial number are concentrated in a specific area, and another specific area except the seal serial number is a background and has no character pixels, and the character boundary of the seal serial number can be accurately positioned through the pixel distribution characteristics, so that other irrelevant characters on the financial document can be eliminated when the seal serial number is identified, and the accuracy of identifying the seal serial number of the electronic seal on the financial document is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The following are embodiments of the apparatus of the invention, reference being made to the corresponding method embodiments described above for details which are not described in detail therein.
Fig. 7 is a schematic structural diagram of an apparatus for identifying a stamp serial number on a financial document according to an embodiment of the present invention, which only shows a part related to the embodiment of the present invention for convenience of description, and the details are as follows:
as shown in fig. 7, the device 7 for identifying the serial number of the seal on the financial document comprises: an area extracting unit 71, a binarizing unit 72, a position determining unit 73, and a stamp number identifying unit 74.
The region intercepting unit 71 is used for intercepting a characteristic region from the financial document to be identified, wherein the characteristic region comprises a region where a seal on the financial document is located;
a binarization unit 72 configured to perform binarization processing on the image of the feature region intercepted by the region interception unit 71 to obtain a binarized image;
a position determining unit 73, configured to determine a position of a seal serial number in the binarized image based on the pixel distribution feature in the binarized image obtained by the binarizing unit 72;
a stamp serial number identifying unit 74 for identifying the stamp serial number at the position specified by the position specifying unit 73.
Optionally, the device 7 for identifying the stamp serial number on the financial document further includes:
the template matching unit is used for selecting a target area matched with a preset image template in the binary image based on the pixel distribution characteristics in the binary image;
the position determining unit is further configured to determine a position of a seal serial number in the target area according to the seal serial number position indicated by the image template.
Optionally, the image template includes a first foreground region and a first background region, and the pixel distribution characteristic of the image template includes: the number of foreground pixels in the first foreground region is greater than a first preset value, and the number of background pixels in the first background region is greater than a second preset value;
the device 7 for identifying the seal serial number on the financial document further comprises:
the template sliding unit is used for sliding the image template on the binary image by a preset step length;
the statistical unit is used for counting the pixel distribution characteristics of the corresponding area of the image template on the binary image in the sliding process;
the template matching unit is further configured to determine that the corresponding area of the image template on the binarized image is a target area matched with the image template when the pixel distribution characteristics of the corresponding area of the image template on the binarized image are consistent with the pixel distribution characteristics of the image template.
Optionally, the upper and lower boundaries of the first foreground region are used for indicating the upper and lower boundaries of the stamp serial number;
the position determining unit 73 is further configured to determine, based on the upper and lower boundaries of the first foreground region, the upper and lower boundaries of the stamp serial number in the target region.
Optionally, the left boundary of the first background area is used for indicating the left boundary of the stamp serial number;
the position determining unit 73 is further configured to determine a left boundary of the stamp serial number in the target area based on the left boundary of the first background area.
Optionally, the image template further includes a second background region, a third background region, a fourth background region, and a second foreground region, and the pixel distribution characteristics of the image template further include: the number of background pixels in the second background area, the third background area and the fourth background area is greater than the second preset value, the number of foreground pixels in the second foreground area is greater than a third preset threshold, and foreground pixels in the second background area are concentrated on preset columns;
the third background area is located between the first foreground area and the second foreground area, the second foreground area is located above the third background area, and the first foreground area is located below the third background area.
Optionally, the device 3 for identifying the stamp serial number on the financial document further includes:
an integral image calculation unit for calculating an integral image of the binarized image;
the statistical unit is further used for counting the pixel distribution characteristics of the corresponding area of the image template on the binarized image in the sliding process based on the integral image.
In view of the above, the present invention intercepts the feature area from the financial document to be identified; carrying out binarization processing on the image of the characteristic region to obtain a binarized image; determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image; identifying a stamp serial number at the location; on one hand, characters on non-characteristic areas on the financial document can be directly excluded; on the other hand, the seal serial number has specific pixel distribution characteristics on the binary image of the characteristic area, for example, the character pixels of the seal serial number are concentrated in a specific area, and another specific area except the seal serial number is a background and has no character pixels, and the character boundary of the seal serial number can be accurately positioned through the pixel distribution characteristics, so that other irrelevant characters on the financial document can be eliminated when the seal serial number is identified, and the accuracy of identifying the seal serial number of the electronic seal on the financial document is improved.
Fig. 8 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 8, the terminal device 8 of this embodiment includes: a processor 80, a memory 81 and a computer program 82 stored in said memory 81 and executable on said processor 80. The processor 80, when executing the computer program 82, implements the steps in the above-mentioned embodiments of the method for identifying a serial number of a seal on a financial document, such as the steps 101 to 104 shown in fig. 1. Alternatively, the processor 80, when executing the computer program 82, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the units 71 to 74 shown in fig. 7.
Illustratively, the computer program 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 82 in the terminal device 8. For example, the computer program 82 may be divided into an area extracting unit, a binarizing unit, a position determining unit and a stamp serial number identifying unit, and the specific functions of each unit are as follows:
the area intercepting unit is used for intercepting a characteristic area from the financial document to be identified, wherein the characteristic area comprises an area where a seal on the financial document is located;
a binarization unit, configured to perform binarization processing on the image of the feature region intercepted by the region interception unit to obtain a binarized image;
the position determining unit is used for determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image obtained by the binary unit;
and the seal serial number identification unit is used for identifying the seal serial number at the position determined by the position determination unit.
The terminal device 8 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of a terminal device 8 and does not constitute a limitation of terminal device 8 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 80 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 81 may be an internal storage unit of the terminal device 8, such as a hard disk or a memory of the terminal device 8. The memory 81 may also be an external storage device of the terminal device 8, 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, which are provided on the terminal device 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the terminal device 8. The memory 81 is used for storing the computer program and other programs and data required by the terminal device. The memory 81 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (6)

1. A method for identifying a seal serial number on a financial document, the method comprising:
intercepting a characteristic area from a financial document to be identified, wherein the characteristic area comprises an area where a seal on the financial document is located;
carrying out binarization processing on the image of the characteristic region to obtain a binarized image;
determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image;
identifying a stamp serial number at the location;
wherein, the determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image comprises:
selecting a target area matched with a preset image template from the binary image based on the pixel distribution characteristics in the binary image;
determining the position of the seal serial number in the target area according to the seal serial number position indicated by the image template;
the image template comprises a first foreground area and a first background area, and the pixel distribution characteristics of the image template comprise: the number of foreground pixels in the first foreground region is greater than a first preset value, and the number of background pixels in the first background region is greater than a second preset value;
selecting a target area matched with a preset image template in the binary image based on the pixel distribution characteristics in the binary image, wherein the target area comprises:
sliding the image template on the binary image by a preset step length;
counting the pixel distribution characteristics of the corresponding area of the image template on the binary image in the sliding process;
when the pixel distribution characteristics of the corresponding area of the image template on the binarized image are consistent with the pixel distribution characteristics of the image template, determining the corresponding area of the image template on the binarized image as a target area matched with the image template;
wherein, the upper and lower boundaries of the first foreground region are used for indicating the upper and lower boundaries of the seal serial number;
the determining the position of the seal serial number in the target area according to the position of the seal serial number indicated by the image template comprises the following steps:
determining the upper and lower boundaries of the seal serial number in the target area based on the upper and lower boundaries of the first foreground area;
the left boundary of the first background area is used for indicating the left boundary of the seal serial number;
the determining the position of the seal serial number in the target area according to the position of the seal serial number indicated by the image template comprises the following steps:
and determining the left boundary of the seal serial number in the target area based on the left boundary of the first background area.
2. The method according to claim 1, wherein the image template further comprises a second background region, a third background region, a fourth background region and a second foreground region, and the pixel distribution characteristics of the image template further comprise: the number of background pixels in the second background area, the third background area and the fourth background area is greater than the second preset value, the number of foreground pixels in the second foreground area is greater than a third preset threshold, and foreground pixels in the second background area are concentrated on preset columns;
the third background area is located between the first foreground area and the second foreground area, the second foreground area is located above the third background area, and the first foreground area is located below the third background area.
3. The method for identifying the serial number of the seal on the financial document according to any one of claims 1 to 2, wherein after the binarization processing is performed on the image of the characteristic region to obtain a binarized image, the method further comprises:
calculating an integral image of the binarized image;
correspondingly, the pixel distribution characteristics of the corresponding area of the image template on the binarized image in the statistical sliding process include:
and counting the pixel distribution characteristics of the corresponding area of the image template on the binarized image in the sliding process based on the integral image.
4. An apparatus for identifying a seal serial number on a financial document, the apparatus comprising:
the area intercepting unit is used for intercepting a characteristic area from the financial document to be identified, wherein the characteristic area comprises an area where a seal on the financial document is located;
a binarization unit, configured to perform binarization processing on the image of the feature region intercepted by the region interception unit to obtain a binarized image;
the position determining unit is used for determining the position of the seal serial number in the binary image based on the pixel distribution characteristics in the binary image obtained by the binary unit;
a seal serial number identification unit for identifying the seal serial number at the position determined by the position determination unit;
wherein the apparatus further comprises:
the template matching unit is used for selecting a target area matched with a preset image template in the binary image based on the pixel distribution characteristics in the binary image;
the position determining unit is further used for determining the position of the seal serial number in the target area according to the position of the seal serial number indicated by the image template;
the image template comprises a first foreground area and a first background area, and the pixel distribution characteristics of the image template comprise: the number of foreground pixels in the first foreground region is greater than a first preset value, and the number of background pixels in the first background region is greater than a second preset value;
correspondingly, the device further comprises:
the template sliding unit is used for sliding the image template on the binary image by a preset step length;
the statistical unit is used for counting the pixel distribution characteristics of the corresponding area of the image template on the binary image in the sliding process;
the template matching unit is further used for determining the corresponding area of the image template on the binarized image as a target area matched with the image template when the pixel distribution characteristics of the corresponding area of the image template on the binarized image are consistent with the pixel distribution characteristics of the image template;
wherein, the upper and lower boundaries of the first foreground region are used for indicating the upper and lower boundaries of the seal serial number; correspondingly, the position determining unit is further configured to determine an upper boundary and a lower boundary of the seal serial number in the target area based on the upper boundary and the lower boundary of the first foreground area;
the left boundary of the first background area is used for indicating the left boundary of the seal serial number; correspondingly, the position determining unit is further configured to determine a left boundary of the stamp serial number in the target area based on the left boundary of the first background area.
5. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN201810392213.1A 2018-04-27 2018-04-27 Method and device for identifying seal serial number on financial document and terminal equipment Active CN108717744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810392213.1A CN108717744B (en) 2018-04-27 2018-04-27 Method and device for identifying seal serial number on financial document and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810392213.1A CN108717744B (en) 2018-04-27 2018-04-27 Method and device for identifying seal serial number on financial document and terminal equipment

Publications (2)

Publication Number Publication Date
CN108717744A CN108717744A (en) 2018-10-30
CN108717744B true CN108717744B (en) 2020-08-18

Family

ID=63899238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810392213.1A Active CN108717744B (en) 2018-04-27 2018-04-27 Method and device for identifying seal serial number on financial document and terminal equipment

Country Status (1)

Country Link
CN (1) CN108717744B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109658584B (en) * 2018-12-14 2021-01-12 泰康保险集团股份有限公司 Bill information identification method and device
CN111353485B (en) * 2018-12-20 2023-09-05 ***通信集团辽宁有限公司 Seal identification method, device, equipment and medium
CN109670447B (en) * 2018-12-20 2019-11-22 中科院成都信息技术股份有限公司 Recognition methods, device and the readable storage medium storing program for executing of seal ballot paper full-filling block diagram picture
CN111489486A (en) * 2019-01-25 2020-08-04 深圳怡化电脑股份有限公司 Method, device and equipment for detecting pasted bills and storage medium
CN112530079B (en) * 2019-09-17 2022-10-11 深圳怡化电脑股份有限公司 Method, device, terminal equipment and storage medium for detecting bill factors

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4136257B2 (en) * 2000-03-17 2008-08-20 株式会社リコー Character recognition device, character recognition method, and storage medium
CN106447910B (en) * 2016-09-08 2019-07-05 深圳怡化电脑股份有限公司 A kind of method and device of paper money recognition
CN106874909B (en) * 2017-01-18 2019-10-11 深圳怡化电脑股份有限公司 A kind of recognition methods of image character and its device
CN107437294B (en) * 2017-08-01 2020-05-01 深圳怡化电脑股份有限公司 Character segmentation method, device, equipment and storage medium
CN107944452B (en) * 2017-12-12 2021-07-23 信翼博达科技(深圳)有限公司 Character recognition method for circular seal

Also Published As

Publication number Publication date
CN108717744A (en) 2018-10-30

Similar Documents

Publication Publication Date Title
CN108717744B (en) Method and device for identifying seal serial number on financial document and terminal equipment
CN107437294B (en) Character segmentation method, device, equipment and storage medium
CN107767541B (en) A kind of recognition methods of bank note, device, terminal device and storage medium
CN110503682B (en) Rectangular control identification method and device, terminal and storage medium
CN108229232B (en) Method and device for scanning two-dimensional codes in batch
CN108091033B (en) Paper money identification method and device, terminal equipment and storage medium
CN110570442A (en) Contour detection method under complex background, terminal device and storage medium
CN107292212B (en) Two-dimensional code positioning method under low signal-to-noise ratio environment
CN109389110B (en) Region determination method and device
CN116403094A (en) Embedded image recognition method and system
CN108665603B (en) Method and device for identifying currency type of paper money and electronic equipment
CN104077557B (en) A kind of method and apparatus obtaining card image
CN110781856A (en) Heterogeneous face recognition model training method, face recognition method and related device
CN107330430A (en) Tibetan character recognition apparatus and method
WO2018080555A1 (en) Identifying document forms using digital fingerprints
CN112232336A (en) Certificate identification method, device, equipment and storage medium
CN110135288B (en) Method and device for quickly checking electronic certificate
CN108960246B (en) Binarization processing device and method for image recognition
CN109800745B (en) Bill detection method, device, terminal and computer readable storage medium
CN113221696A (en) Image recognition method, system, equipment and storage medium
CN110909816B (en) Picture identification method and device
CN117152760A (en) Image processing method, terminal device and storage medium
CN112418089A (en) Gesture recognition method and device and terminal
CN108510636B (en) Image segmentation method, image segmentation device and terminal equipment
CN114724128B (en) License plate recognition method, device, equipment and medium

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
GR01 Patent grant
GR01 Patent grant