Method and apparatus for OCR detection of valuable documents by means of a matrix camera
10068150 ยท 2018-09-04
Inventors
Cpc classification
G06V30/1475
PHYSICS
G06V30/18067
PHYSICS
International classification
Abstract
The invention relates to a method for OCR detection of valuable documents in a cash dispenser in the case of which an image of the valuable document is detected by means of a digital video or matrix camera. A Hough transformation is used to calculate edge lines of the valuable document and a rotation angle is calculated therefrom such that the edges of the valuable document are aligned with the image edges. The detected image is homogenized to compensate an inhomogeneous image background. This is followed by OCR detection of alphanumeric information on the valuable document.
Claims
1. Method for optical character recognition (OCR) detection of documents in a self-service machine, in particular an automatic teller machine or cash dispenser, comprising: a) detecting an image of a document by means of a digital video or matrix camera having a detection region; b) establishing an intermediate document image by: i) reducing the detected image, ii) determining a position of a document region, corresponding to the document and also edge pixels in the detected image, iii) detecting straight edge lines of the document region with the aid of the determined edge pixels by using a Hough transformation, iv) determining a rotation angle by which the document region in the detected image must be rotated for alignment at edges of the detection region of the digital video or matrix camera, and v) rotating the document region by the rotation angle, resulting in the intermediate document image; and c) forming a background image by: i) reducing the intermediate document image, ii) after said reducing the intermediate document image, removing smaller details from the reduced intermediate document image by filtering the document region, resulting in the background image; d) creating a brightness map of the background image; and e) binarizing the background image to segment alphanumeric character information.
2. Method according to claim 1, in which use is made in said detecting straight edge lines of an edge filter which outputs a binary edge image of the document region.
3. Method according to claim 2, in which the Hough transformation is executed with the aid of the binary edge image.
4. Method according to claim 3, in which during the Hough transformation it is determined for each pixel, which line runs therethrough, and an assessment of each line is raised when the pixel is an edge pixel, the straight edge lines corresponding to the lines most highly assessed.
5. Method according to claim 1, in which said forming the background image furthermore comprises: subtracting the brightness map from the detected intermediate document image.
6. Apparatus for optical character recognition (OCR) detection of documents in a self-service machine, in particular an automatic teller machine or cash dispenser, in particular designed as a document detection module, comprising: a digital video or matrix camera having a detection region in order to detect an image of a document; and an image processing section which is designed in order to: a) establish an intermediate document image by: i) reducing the detected image, ii) determining a position of a document region, corresponding to the document and also edge pixels in the detected image, iii) detecting straight edge lines of the document region with the aid of the determined edge pixels by using a Hough transformation, iv) determining a rotation angle by which the document region must be rotated for alignment at edges of the detection region of the digital video or matrix camera, and v) rotating the document region by the rotation angle, resulting in the intermediate document image; and c) form a background image by: i) reducing the intermediate document image, ii) removing smaller details from the reduced intermediate document image after reducing the intermediate document image by filtering the document region, resulting in the background image; and d) creating a brightness map of the background image and binarizing the background image to detect alphanumeric character information by OCR detection.
7. Apparatus according to claim 6, in which the image processing section is further designed to apply an edge filter which outputs a binary edge image of the document region.
8. Apparatus according to claim 7, in which the Hough transformation is executed with the aid of the binary edge image.
9. Apparatus according to claim 8, in which during the Hough transformation it is determined for each pixel, which line runs therethrough, and an assessment of each line is raised when the pixel is an edge pixel, the straight edge lines corresponding to the lines most highly assessed.
10. Apparatus according to one of claim 6, in which the image processing section is further designed to subtract said brightness map from the intermediate document image.
Description
OVERVIEW OF FIGURES
(1) The invention is described below in an exemplary way and with reference to the attached drawings from which further features, advantages and objects to be achieved emerge. In the drawings:
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION OF A PREFERRED EXEMPLARY EMBODIMENT
(8) In accordance with
(9) The camera 2 with its image sensor 13 corresponds to an image signal generator 11 of the image evaluation module 10 shown in
(10) In accordance with
(11) Subsequently, in step S303 the valuable document is identified and its position determined in order to identify a valuable document region, that is to say to identify pixels which correspond to the valuable document deposited on the depositing plate. In step S304, a fine rotation is then performed such that the edges of the valuable document region which is then rotated are aligned with the image edges, that is to say extend substantially parallel thereto. Subsequently in step S305 there is cut to size from the acquired image a rectangular region which corresponds to the valuable document region in which it is intended to execute OCR detection later.
(12) Subsequently, in step S306 the image background is homogenized, and after that an image is stored for later OCR analysis in step S307. The OCR analysis can be executed by means of conventional OCR algorithms which are sufficiently well known and therefore have no need to be considered further.
(13) The steps of an automatic fine rotation for aligning the acquired valuable document region are explained below with the aid of
(14) The valuable document region is then identified in step S403 by automatic thresholding. For example, the image processing section determines whether a pixel value is greater than a predetermined threshold or not, in order thus to binarize an edge image. The threshold can be a fixed value, or a variable which is obtained, for example, with the aid of a variable threshold method. Of course, it is also possible for this purpose to use any other desired algorithms for edge identification.
(15) In the next step S404, the edge pixels of the valuable document region are then calculated. Subsequently, in step S405 a Hough transformation is used to detect the dominant lines in the image. In the Hough method disclosed in U.S. Pat. No. 3,069,654, geometrical objects are detected by creating a dual space in which all possible parameters of the geometrical figure to be found are plotted in the dual space for each point in the image which lies on an edge. Each point in the dual space thereby corresponds to a geometrical object in the image space. When detecting straight lines by means of the Hough transformation, it is necessary firstly to find suitable parameters on a straight line, for example, slope and y-intercept or, preferably, a characterization of a straight line by its Hessian normal form. It is advantageous here that the edges in the starting image were firstly determined in step S404. During the Hough transformation, it is determined for each pixel which line (for example, as determined by angle and distance from the left-hand, upper image corner) runs through it. If the pixel under consideration is an edge pixel, the assessment of the line is raised. The most highly assessed lines then correspond to the dominant lines in the image region.
(16) These dominant lines can then be used in step S406 to easily determine the angle by which the valuable document region must be rotated in order to correct its misalignment and align it parallel to the edges of the field of view or image edges or the depositing plate. Subsequently, the image of the valuable document region is then rotated by this determined rotation angle in step S407. Subsequently, a rectangular image region which contains the valuable document region is cut out in step S408. Owing to the previously performed flush rotation, the alphanumeric characters in this region are aligned flush with the image edges in the case of the underlying rectangular original format, at any rate when an appropriate image correction has been executed previously. Precisely in the case of smaller image formats, such as occur with customary valuable documents, such image distortions are, however, not so interfering that they must necessarily be compensated. Rather, according to the invention it is possible to reliably execute an OCR detection of alphanumeric characters even when the alphanumeric characters are not exactly aligned with the image edges after step S407.
(17)
(18) In order quickly to identify and determine the position of the valuable documents, it is preferred to work on a reduced image on which the details, such as font, dust filaments and lines on the check itself have been removed by applying a median filter, as shown in
(19) The check is then identified by automatic thresholding (compare
(20) As shown in
(21) A simple image binarization based on the image information in accordance with
(22) For homogenization, a brightness map of the image background is created and then subtracted in principle from the original image in accordance with
(23) In summary, the inventive method can be used to reliably execute OCR detection by means of a matrix or video camera. It may expressly be pointed out that the invention can be used in any desired self-service machine, in particular in automatic teller machines or cash dispensers whose function is to support the automatic submission of valuable documents such as, for example, checks.
LIST OF REFERENCE NUMERALS
(24) 1 Valuable document detection module
(25) 2 Video camera/matrix camera
(26) 3 Depositing plate
(27) 4 Valuable document
(28) 5 Field of view of camera 2
(29) 6 Valuable document region
(30) 10 Image evaluation module
(31) 11 Image signal generator
(32) 12 Data processing section
(33) 13 Image sensor
(34) 14 CPU
(35) 15 Memory
(36) 16 Image processing section
(37) 17 Image output device
(38) 18 Program code memory
(39) 19 Control section
(40) 60 Edge region
(41) 61 Valuable document region
(42) 62 Graphic information
(43) 63 Letters
(44) 64 Digits
(45) 65 Barcode
(46) 66 Blurry details
(47) 67 Further prominent details
(48) 68 Edge of valuable document
(49) 69 Edge of further prominent details
(50) 70 Calculated edge lines
(51) 71 Region of higher brightness