CN110895690A - Invoice positioning method based on openCV morphology - Google Patents

Invoice positioning method based on openCV morphology Download PDF

Info

Publication number
CN110895690A
CN110895690A CN201910962135.9A CN201910962135A CN110895690A CN 110895690 A CN110895690 A CN 110895690A CN 201910962135 A CN201910962135 A CN 201910962135A CN 110895690 A CN110895690 A CN 110895690A
Authority
CN
China
Prior art keywords
invoice
coordinates
area
picture
identified
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.)
Pending
Application number
CN201910962135.9A
Other languages
Chinese (zh)
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.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
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 Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to CN201910962135.9A priority Critical patent/CN110895690A/en
Publication of CN110895690A publication Critical patent/CN110895690A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • G06V10/225Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition based on a marking or identifier characterising the area

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an invoice positioning method based on openCV morphology, which comprises the following steps: the method comprises the following steps: carrying out binarization processing on the invoice picture to finish picture correction; step two: respectively carrying out one-dimensional opening operation on the processed invoice image by using a horizontal structural element and a vertical structural element to obtain a vertical contour map and a horizontal contour map; step three: weighting and combining the vertical contour map and the horizontal contour map to obtain a weighted and combined map, and outputting a frame line coordinate set; step four: obtaining the coordinates of the lower right corner of each contour line by using list screening calculation, and calculating the coordinates of the area to be identified by using the coordinates as datum points; step five: and cutting the area after the coordinates of the area to be identified are obtained, and finishing the positioning work. When only the invoice photo or the scanned image is provided, the area to be identified can be quickly positioned, a template does not need to be provided, and the positioning is accurate without deviation.

Description

Invoice positioning method based on openCV morphology
Technical Field
The invention relates to the field of text image processing, in particular to an invoice positioning method based on openCV morphology.
Background
With the development of science and technology, computers have gradually replaced the heavy work of manpower. In the field of bank invoice processing, the identification and entry system is more and more widely applied, so that a large amount of time wasted by manual participation is saved, and meanwhile, the working efficiency is improved. But as the early work of the identification system, the positioning of the invoice to-be-identified area is the basis of identification and is also the focus of the current research. At present, an identification system does not have a good method for determining an invoice identification area, so that the design of an invoice positioning method is particularly important.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide an invoice positioning method based on openCV morphology, which accurately positions a text region to be identified in an invoice through a positioning technology of the region to be identified of the invoice detected by contour lines, and solves the problem that the existing identification system has no better determination method for the region to be identified of the invoice.
The invention provides an invoice positioning method based on openCV morphology, which comprises the following steps:
the method comprises the following steps: carrying out binarization processing on the invoice picture to finish picture correction;
step two: respectively carrying out one-dimensional opening operation on the processed invoice image by using a horizontal structural element and a vertical structural element to obtain a vertical contour map and a horizontal contour map;
step three: weighting and combining the vertical contour map and the horizontal contour map to obtain a weighted and combined map, and outputting a frame line coordinate set;
step four: obtaining the coordinates of the lower right corner of each contour line by using list screening calculation, and calculating the coordinates of the area to be identified by using the coordinates as datum points;
step five: and cutting the area after the coordinates of the area to be identified are obtained, and finishing the positioning work.
The further improvement lies in that: in the step one, when the invoice picture is processed, the correction is carried out by using a method of contour extraction and Hough transform detection.
The further improvement lies in that: the invoice picture in the first step is an invoice photo or an invoice scanning picture.
The invention has the beneficial effects that: the method has the advantages that the text area to be identified in the invoice is accurately positioned through the positioning technology of the area to be identified of the invoice detected through the contour lines, the area to be identified can be quickly positioned when only an invoice photo or a scanned image is provided, a template does not need to be provided, and the positioning is accurate without deviation.
Drawings
FIG. 1 is a vertical contour plot of the present invention.
Fig. 2 is a horizontal contour plot of the present invention.
Fig. 3 is a diagram illustrating the combination weighted according to the present invention.
FIG. 4 is a drawing illustrating the clipping according to the present invention.
FIG. 5 is a diagram of the clipping of the present invention.
Detailed Description
For the purpose of enhancing understanding of the present invention, the present invention will be further described in detail with reference to the following examples, which are provided for illustration only and are not to be construed as limiting the scope of the present invention.
As shown in the figure, the present embodiment provides an invoice positioning method based on openCV morphology, where the positioning method includes the following steps:
the method comprises the following steps: carrying out binarization processing on the invoice picture to finish picture correction;
step two: respectively carrying out one-dimensional opening operation on the processed invoice image by using a horizontal structural element and a vertical structural element to obtain a vertical contour map figure 1 and a horizontal contour map figure 2;
step three: weighting and combining the vertical contour diagram figure 1 and the horizontal contour diagram figure 2 to obtain a weighted and combined figure 3, and outputting a frame line coordinate set;
step four: obtaining the coordinates of the lower right corner of each contour line by using list screening calculation, and calculating the coordinates of the area to be identified by using the coordinates as datum points;
step five: and cutting the area after the coordinates of the area to be identified are obtained, and finishing the positioning work.
In the step one, when the invoice picture is processed, the correction is carried out by using a method of contour extraction and Hough transform detection. The invoice picture in the first step is an invoice photo or an invoice scanning picture.

Claims (3)

1. An invoice positioning method based on openCV morphology is characterized in that: the positioning method comprises the following steps:
the method comprises the following steps: carrying out binarization processing on the invoice picture to finish picture correction;
step two: respectively carrying out one-dimensional opening operation on the processed invoice image by using a horizontal structural element and a vertical structural element to obtain a vertical contour map and a horizontal contour map;
step three: weighting and combining the vertical contour map and the horizontal contour map to obtain a weighted and combined map, and outputting a frame line coordinate set;
step four: obtaining the coordinates of the lower right corner of each contour line by using list screening calculation, and calculating the coordinates of the area to be identified by using the coordinates as datum points;
step five: and cutting the area after the coordinates of the area to be identified are obtained, and finishing the positioning work.
2. The invoice locating method based on openCV morphology as claimed in claim 1, wherein: in the step one, when the invoice picture is processed, the correction is carried out by using a method of contour extraction and Hough transform detection.
3. The invoice locating method based on openCV morphology as claimed in claim 1, wherein: the invoice picture in the first step is an invoice photo or an invoice scanning picture.
CN201910962135.9A 2019-10-11 2019-10-11 Invoice positioning method based on openCV morphology Pending CN110895690A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910962135.9A CN110895690A (en) 2019-10-11 2019-10-11 Invoice positioning method based on openCV morphology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910962135.9A CN110895690A (en) 2019-10-11 2019-10-11 Invoice positioning method based on openCV morphology

Publications (1)

Publication Number Publication Date
CN110895690A true CN110895690A (en) 2020-03-20

Family

ID=69786273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910962135.9A Pending CN110895690A (en) 2019-10-11 2019-10-11 Invoice positioning method based on openCV morphology

Country Status (1)

Country Link
CN (1) CN110895690A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101676930A (en) * 2008-09-17 2010-03-24 北大方正集团有限公司 Method and device for recognizing table cells in scanned image
US20110044548A1 (en) * 2008-03-31 2011-02-24 Perceptive Software, Inc. Automatic forms identification systems and methods
CN105528604A (en) * 2016-01-31 2016-04-27 华南理工大学 Bill automatic identification and processing system based on OCR
CN106875546A (en) * 2017-02-10 2017-06-20 大连海事大学 A kind of recognition methods of VAT invoice
CN108460381A (en) * 2018-03-13 2018-08-28 南京邮电大学 Invoice reimbursement Information locating based on image recognition and intercept method
CN109858414A (en) * 2019-01-21 2019-06-07 南京邮电大学 A kind of invoice piecemeal detection method
CN109948617A (en) * 2019-03-29 2019-06-28 南京邮电大学 A kind of invoice image position method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110044548A1 (en) * 2008-03-31 2011-02-24 Perceptive Software, Inc. Automatic forms identification systems and methods
CN101676930A (en) * 2008-09-17 2010-03-24 北大方正集团有限公司 Method and device for recognizing table cells in scanned image
CN105528604A (en) * 2016-01-31 2016-04-27 华南理工大学 Bill automatic identification and processing system based on OCR
CN106875546A (en) * 2017-02-10 2017-06-20 大连海事大学 A kind of recognition methods of VAT invoice
CN108460381A (en) * 2018-03-13 2018-08-28 南京邮电大学 Invoice reimbursement Information locating based on image recognition and intercept method
CN109858414A (en) * 2019-01-21 2019-06-07 南京邮电大学 A kind of invoice piecemeal detection method
CN109948617A (en) * 2019-03-29 2019-06-28 南京邮电大学 A kind of invoice image position method

Similar Documents

Publication Publication Date Title
CN108764229B (en) Water gauge image automatic identification method based on computer vision technology
CN108133216B (en) Nixie tube reading identification method capable of realizing decimal point reading based on machine vision
TWI398157B (en) System and method for boundary scan of an image
CN103258198A (en) Extraction method for characters in form document image
CN102974551A (en) Machine vision-based method for detecting and sorting polycrystalline silicon solar energy
CN103258201A (en) Form line extraction method integrating global information and local information
CN106651831B (en) Bamboo block defect detection method and system
CN111257329A (en) Smartphone camera defect detection method and detection system
CN103279924A (en) Correction method for patent certificate image with any inclination angle
CN106504225A (en) A kind of recognition methodss of regular polygon and device
CN110335280A (en) A kind of financial documents image segmentation and antidote based on mobile terminal
CN103914829B (en) Method for detecting edge of noisy image
CN102073872A (en) Image-based method for identifying shape of parasite egg
CN109635729B (en) Form identification method and terminal
TWI383690B (en) Method for image processing
CN113393430B (en) Thermal imaging image enhancement training method and device for fan blade defect detection
CN113642570A (en) Method for recognizing license plate of mine car in dark environment
CN110751690B (en) Visual positioning method for milling machine tool bit
CN110895690A (en) Invoice positioning method based on openCV morphology
CN110288531B (en) Method and tool for assisting operator in making standard identity card photo
CN110322508B (en) Auxiliary positioning method based on computer vision
CN108921882B (en) Button automatic alignment method based on machine vision
CN107564001B (en) Magnetic sheet corner defect detection method based on pit search
CN115753791A (en) Defect detection method, device and system based on machine vision
CN115620289A (en) OCR data acquisition method for old machine tool

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200320

RJ01 Rejection of invention patent application after publication