CN108197512B - Bill magnetic code recognition method and device, bill processing equipment and storage medium - Google Patents

Bill magnetic code recognition method and device, bill processing equipment and storage medium Download PDF

Info

Publication number
CN108197512B
CN108197512B CN201810072061.7A CN201810072061A CN108197512B CN 108197512 B CN108197512 B CN 108197512B CN 201810072061 A CN201810072061 A CN 201810072061A CN 108197512 B CN108197512 B CN 108197512B
Authority
CN
China
Prior art keywords
image
magnetic
code
data
bill
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
CN201810072061.7A
Other languages
Chinese (zh)
Other versions
CN108197512A (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 CN201810072061.7A priority Critical patent/CN108197512B/en
Publication of CN108197512A publication Critical patent/CN108197512A/en
Application granted granted Critical
Publication of CN108197512B publication Critical patent/CN108197512B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/08Methods or arrangements for sensing record carriers, e.g. for reading patterns by means detecting the change of an electrostatic or magnetic field, e.g. by detecting change of capacitance between electrodes
    • G06K7/082Methods or arrangements for sensing record carriers, e.g. for reading patterns by means detecting the change of an electrostatic or magnetic field, e.g. by detecting change of capacitance between electrodes using inductive or magnetic sensors
    • G06K7/087Methods or arrangements for sensing record carriers, e.g. for reading patterns by means detecting the change of an electrostatic or magnetic field, e.g. by detecting change of capacitance between electrodes using inductive or magnetic sensors flux-sensitive, e.g. magnetic, detectors
    • 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/04Testing magnetic properties of the materials thereof, e.g. by detection of magnetic imprint

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Inspection Of Paper Currency And Valuable Securities (AREA)

Abstract

The invention discloses a method and a device for identifying a magnetic code of a bill, bill processing equipment and a storage medium. The method comprises the following steps: collecting magnetic data of a bill to be identified through a magnetic head of a magnetic sensor, wherein the magnetic head is a strip-shaped magnetic head so as to sense the width related to one side of the bill to be identified; acquiring a first image of the bill to be identified through a first image sensor positioned on the same side as the magnetic sensor, and acquiring a second image of the bill to be identified through a second image sensor positioned on the opposite side of the magnetic sensor; determining an image with a magnetic code in the first image and the second image according to the magnetic data, the first image and the second image, and positioning the position of the magnetic code in the image; and identifying the magnetic codes in the image according to the positions of the magnetic codes in the image. The invention can be used for placing tickets without limitation, thereby improving the accuracy of magnetic code identification and improving the identification rate.

Description

Bill magnetic code recognition method and device, bill processing equipment and storage medium
Technical Field
The embodiment of the invention relates to a magnetic identification technology, in particular to a method and a device for identifying a note magnetic code, note processing equipment and a storage medium.
Background
The existing ticket module usually needs to have a Magnetic code Recognition technology, called MICR (Magnetic Ink Character Recognition) for short. This type of character recognition allows reading of text printed in magnetic ink, determining the shape of the character by detecting magnetic substances in the ink, and once the character shape is determined, converting the character shape into a computer text using a character recognition method.
In the prior art, when a ticket is passed, the side with the magnetic code is required to be tightly attached to a magnetic head with a single-point channel, and the direction of the magnetic code is perpendicular to the ticket passing direction, so that the stability of a magnetic signal can be ensured, and more effective identification is achieved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for identifying a magnetic code of a bill, a bill processing device, and a storage medium, so as to improve the accuracy of magnetic code identification and improve the identification rate.
In a first aspect, an embodiment of the present invention provides a method for identifying a magnetic code of a ticket, where the method includes:
collecting magnetic data of a bill to be identified through a magnetic head of a magnetic sensor, wherein the magnetic head is a strip-shaped magnetic head so as to sense the width related to one side of the bill to be identified;
acquiring a first image of the bill to be identified through a first image sensor positioned on the same side as the magnetic sensor, and acquiring a second image of the bill to be identified through a second image sensor positioned on the opposite side of the magnetic sensor;
determining an image with a magnetic code in the first image and the second image according to the magnetic data, the first image and the second image, and positioning the position of the magnetic code in the image;
and identifying the magnetic codes in the image according to the positions of the magnetic codes in the image.
In a second aspect, an embodiment of the present invention further provides an apparatus for identifying a magnetic code of a ticket, where the apparatus includes:
the magnetic data acquisition module is used for acquiring the magnetic data of the bill to be identified through a magnetic head of the magnetic sensor, wherein the magnetic head is a strip-shaped magnetic head so as to sense the width related to one side of the bill to be identified;
the image acquisition module is used for acquiring a first image of the bill to be identified through a first image sensor which is positioned on the same side as the magnetic sensor and acquiring a second image of the bill to be identified through a second image sensor which is positioned on the opposite side of the magnetic sensor;
the magnetic code positioning module is used for determining an image with a magnetic code in the first image and the second image according to the magnetic data, the first image and the second image and positioning the position of the magnetic code in the image;
and the magnetic code identification module is used for identifying the magnetic code in the image according to the position of the magnetic code in the image.
In a third aspect, an embodiment of the present invention further provides a bill processing apparatus, where the apparatus includes:
one or more processors;
storage means for storing one or more programs;
a magnetic sensor for collecting magnetic data;
the first image sensor is positioned on the same side with the magnetic sensor, and the second image sensor is positioned on the opposite side with the magnetic sensor and is used for acquiring images;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for identifying magnetic codes of tickets according to any embodiment of the invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for identifying a magnetic code of a ticket according to any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, the magnetic sensor with the strip-shaped magnetic head is adopted to collect the magnetic data of the bill to be identified and the first image and the second image of the bill to be identified, the images with the magnetic codes in the first image and the second image are determined according to the magnetic data, the first image and the second image, the position of the magnetic codes in the images is positioned, and the magnetic codes in the images are identified according to the position of the magnetic codes in the images.
Drawings
Fig. 1 is a flowchart of a method for identifying a magnetic code of a ticket according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for identifying magnetic codes of bills according to a second embodiment of the present invention;
FIGS. 3 a-3 d are schematic views of a magnetic sensor and check orientation recognition in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for identifying magnetic codes of bills according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a bill processing apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings.
Example one
Fig. 1 is a flowchart of a method for identifying a magnetic code of a ticket according to an embodiment of the present invention, where the embodiment is applicable to a situation of identifying a magnetic code of a ticket, and the method may be executed by a device for identifying a magnetic code of a ticket, where the device may be implemented by software and/or hardware, and may be generally integrated in a ticket processing device, and the method specifically includes the following steps:
and 110, acquiring magnetic data of the bill to be identified through a magnetic head of a magnetic sensor, wherein the magnetic head is a strip-shaped magnetic head so as to sense the width related to one side of the bill to be identified.
The magnetic head comprises a plurality of channels which are uniformly distributed in the strip-shaped magnetic head, the strip-shaped magnetic head with the plurality of channels can sense the width related to one side of a bill to be identified, such as the width related to the short side of the bill to be identified or the width related to the long side of the bill to be identified, when the bill passes, the bill can be fed according to the short side or the long side. The width of the strip-shaped magnetic head can be equal to or larger than the width of one side of the bill to be identified, and is preferably larger than the width of one side of the bill to be identified. The ticket to be recognized is preferably a check.
The magnetic signal in the bill to be identified is sensed by the magnetic head of the magnetic sensor, and the magnetic data is formed by processing the magnetic signal by the magnetic sensor. For example, the linear magnetic head has 12 channels, and when the number of the collected columns is 100, the collected magnetic data is a 12 × 100 matrix.
And 120, acquiring a first image of the bill to be identified through an image sensor positioned on the same side as the magnetic sensor, and acquiring a second image of the bill to be identified through an image sensor positioned on the opposite side of the magnetic sensor.
When the image of the bill to be identified is collected, the double-sided image of the bill to be identified needs to be collected, so that the image with the magnetic code can be selected from the double-sided image to identify the magnetic code. Therefore, images of two sides of the bill to be recognized need to be collected through two image sensors respectively, namely, a first image of the bill to be recognized is collected through a first image sensor which is located on the same side of the bill to be recognized as the magnetic sensor, and a second image of the bill to be recognized is collected through a second image sensor which is located on the opposite side of the bill to be recognized as the magnetic sensor. The first image and the second image may be color images or grayscale images.
Step 130, determining an image with a magnetic code in the first image and the second image according to the magnetic data, the first image and the second image, and positioning the position of the magnetic code in the image.
Wherein, the magnetic code, i.e. the magnetic number, is the number of 0-9 and/or other symbols printed with magnetic ink or with magnetic ribbon at a specific position on the front surface of the check or other ticket. For example, according to standard requirements ANSI 9.100-160Part 2-2007 magnetic ink printing (MICR) layout and positioning, the MICR printing positions are: the magnetic code is printed in the middle 1/4 band of the lower 5/8 'and the upper and lower 3/16' must be left blank to avoid affecting the magnetic font in the magnetic code.
Determining the orientation of the bill to be identified according to the magnetic data, the first image or the second image, further selecting an image with a magnetic code from the first image and the second image, and positioning the position of the magnetic code in the image according to the corresponding relation between the magnetic data and the selected image with the magnetic code. The orientation determined from the magnetic data and the first image is consistent, while the orientation determined from the second image is opposite to the orientation determined from the magnetic data and the first image.
For example, when the front face of the bill to be identified is the magnetic code, the preset face can be the front face including the magnetic code, when the face of the bill to be identified is determined to be the front face forward direction or the front face reverse direction through the magnetic data, the face of the first image can be determined to be the front face forward direction or the front face reverse direction, the face of the second image is determined to be the reverse face forward direction or the reverse face reverse direction, and the preset face is compared with the second image, so that the first image is determined to include the magnetic code, and the first image is selected as the image with the magnetic code.
And step 140, identifying the magnetic codes in the image according to the positions of the magnetic codes in the image.
After the position of the magnetic code in the image is determined, the image in the position can be extracted for identification, so as to obtain the magnetic code therein.
Wherein, according to the position of the magnetic code in the image, identifying the magnetic code in the image optionally comprises:
extracting a magnetic code image from the image according to the position of the magnetic code in the image;
and carrying out optical character recognition on the magnetic code image to obtain the magnetic code in the magnetic code image.
Among them, Optical Character Recognition (OCR) refers to a process in which an electronic device (e.g., a scanner or a digital camera) checks a Character printed on paper, determines its shape by detecting dark and light patterns, and then translates the shape into a computer text by a Character Recognition method; the method is characterized in that characters in a paper document are converted into an image file with a black-white dot matrix in an optical mode aiming at print characters, and the characters in the image are converted into a text format through recognition software for further editing and processing by word processing software.
The position of the magnetic code in the image comprises a line boundary and a column boundary of the magnetic code in the image, so that the image is segmented and extracted according to the line boundary and the column boundary, the image with the magnetic code is extracted from the image to be used as a magnetic code image, and OCR is carried out on the magnetic code image to obtain the magnetic code in the magnetic code image. The magnetic code image is extracted to identify the magnetic code therein, so that the accuracy of magnetic code identification is further improved.
According to the technical scheme of the embodiment, the magnetic data of the bill to be identified and the first image and the second image of the bill to be identified are collected by the magnetic sensor with the strip-shaped magnetic head, the images with the magnetic codes in the first image and the second image are determined according to the magnetic data, the first image and the second image, the position of the magnetic codes in the images is located, the magnetic codes in the images are identified according to the position of the magnetic codes in the images, the strip-shaped magnetic head can sense the width relevant to one side of the bill to be identified, and the double-sided images of the bill to be identified are collected, so that the face-to-face ticket placing can be unlimited, the accuracy of magnetic code identification is improved, the identification rate is improved, and the accuracy of counterfeit bill identification is further improved.
Example two
Fig. 2 is a flowchart of a method for identifying a magnetic code of a bill according to a second embodiment of the present invention, which is optimized based on the above embodiments, and specifically, the method further optimizes "determining images with magnetic codes in the first image and the second image according to the magnetic data, the first image and the second image, and positioning the position of the magnetic code in the images" to determine the orientation of the bill to be identified according to the magnetic data; determining an image with a magnetic code in the first image and the second image according to the orientation; locating the position of a magnetic code in the image based on the magnetic data and the image ". The method specifically comprises the following steps:
and step 210, collecting magnetic data of the bill to be identified through a magnetic head of a magnetic sensor, wherein the magnetic head is a strip-shaped magnetic head so as to sense the width related to one side of the bill to be identified.
And 220, acquiring a first image of the bill to be identified through an image sensor positioned on the same side as the magnetic sensor, and acquiring a second image of the bill to be identified through an image sensor positioned on the opposite side of the magnetic sensor.
And step 230, determining the orientation of the bill to be identified according to the magnetic data.
And determining the position of the magnetic code according to the magnetic data, and further determining the orientation of the bill to be identified according to the position of the magnetic code. The collected magnetic data is a matrix, the data with magnetic signals is larger than the data without magnetic signals in the magnetic data, the data without magnetic signals is generally 0, and then the position of the data with magnetic signals in the matrix can be determined, so that the position of the magnetic code in the magnetic data is determined. When the bill to be recognized is a check, if the position of the magnetic code in the magnetic data is positioned at the lower left position, the bill is positive; if the position of the magnetic code in the magnetic data is positioned at a lower right position, the magnetic code is in a reverse direction and a forward direction; if the position of the magnetic code in the magnetic data is located at the upper right position, the front direction is reverse; if the position of the magnetic code in the magnetic data is located at the upper left position, it indicates a reverse direction.
For example, fig. 3 a-3 d are schematic diagrams illustrating the facing recognition of a magnetic sensor and a check according to an embodiment of the present invention, as shown in fig. 3 a-3 d, a magnetic head of the magnetic sensor 1 includes a plurality of channels, i.e., a channel 1, a channel 2, …, and a channel n, where n is the total number of channels in the magnetic head, a ticket is entered according to a short side, the magnetic sensor 1 and the ticket 2 to be recognized are in a corresponding relationship as shown in the figure, assuming that n is 12 and the number of collected columns is 100, the collected data is a two-dimensional matrix of 12 × 100, when the ticket is entered according to the directions shown in fig. 3 a-3 d, if magnetic signals are distributed in the channels 7-12, it is determined that the facing direction of the ticket 2 to be recognized is the front direction shown in fig. 3a or the front direction shown in fig. 3c, if the distance between the magnetic signal and the left boundary is smaller than the distance, determining that the bill 2 to be recognized faces the front direction shown in fig. 3a, and if the distance between the magnetic signal and the left boundary is greater than that between the magnetic signal and the right boundary, determining that the bill 2 to be recognized faces the back direction shown in fig. 3 c; if the magnetic signal is distributed in 1-6 channels, the facing of the bill 2 to be recognized is determined to be the front-side reversal shown in fig. 3b or the reverse-side reversal shown in fig. 3d, if the distance between the magnetic signal and the left boundary is greater than the distance between the magnetic signal and the right boundary, the facing of the bill 2 to be recognized is determined to be the front-side reversal shown in fig. 3b, and if the distance between the magnetic signal and the left boundary is less than the distance between the magnetic signal and the right boundary, the facing of the bill 2 to be recognized is determined to be the reverse-side reversal shown in fig. 3 d.
Wherein, according to the magnetic data, determining the orientation of the bill to be identified optionally comprises:
performing row projection and column projection on the magnetic data respectively;
determining the position of a magnetic code in the magnetic data according to the row projection and the column projection;
and determining the orientation of the bill to be identified according to the position of the magnetic code in the magnetic data.
Wherein the row projection is to calculate the sum of all data in each row of data in the magnetic data in the matrix form, respectively, and the column projection is to calculate the sum of all data in each column of data in the magnetic data in the matrix form, respectively.
The magnetic sensor may sense a magnetic signal in the magnetic code. In the magnetic data, the data with the magnetic signal is larger than the data without the magnetic signal, so the line boundary of the magnetic code can be determined according to the line projection, the column boundary of the magnetic code can be determined according to the column projection, the position of the magnetic code in the magnetic data is determined, the position of the magnetic code in the magnetic data is inquired in the corresponding relation between the preset position of the magnetic code in the magnetic data and the facing of the bill to be identified, and the facing of the bill to be identified can be determined. Because the data volume of the collected magnetic data is small, the calculation-oriented amount of the bill to be identified is determined to be small through the magnetic data, the calculation complexity is low, and the identification-oriented speed is improved.
And 240, determining an image with a magnetic code in the first image and the second image according to the orientation.
After the face of the bill to be identified is determined according to the magnetic data, an image with the magnetic code can be selected from the first image and the second image according to the face of the preset magnetic code, and specifically, when the face of the bill to be identified determined according to the magnetic data is consistent with the face of the preset magnetic code, the first image is determined to be the image with the magnetic code; and when the determined orientation of the bill to be identified according to the magnetic data is opposite to the preset orientation of the magnetic code, determining the second image as the image with the magnetic code.
And 250, positioning the position of the magnetic code in the image according to the magnetic data and the image.
After the position of the magnetic code in the magnetic data is determined, the position of the magnetic code in the magnetic data is mapped to the position in the image according to the corresponding relation between the magnetic data and the image data of the image, and then the position of the magnetic code in the image is positioned.
Wherein locating the position of the magnetic code in the image based on the magnetic data and the image optionally comprises:
if the image is a first image, determining the position of the magnetic code in the image according to the position of the magnetic code in the magnetic data and the corresponding relation between the magnetic data and the image data of the image;
and if the image is a second image, carrying out mirror image processing on the magnetic data to obtain mirror image magnetic data, determining the position of the magnetic code in the mirror image magnetic data, and determining the position of the magnetic code in the image according to the position of the magnetic code in the mirror image magnetic data and the corresponding relation between the mirror image magnetic data and the image data of the image.
When the image is the first image, the magnetic sensor and the first image sensor are positioned on the same side of the bill to be identified, so that the orientation determined by the magnetic data is the same as the orientation of the bill to be identified in the first image, and the position of the magnetic code in the magnetic data can be mapped to the position of the magnetic code in the image directly according to the corresponding relation between the magnetic data and the image data of the image, so that the position of the magnetic code in the image is determined. Because the data volume of the magnetic data is small, the position of the magnetic code in the image is obtained by mapping according to the mapping relation, and the calculation complexity is reduced. For example, the magnetic data is a matrix of M × N, the image data of the image is a matrix of M × N, and the position of the magnetic code in the magnetic data is (x, y), which is mapped to the position in the image as (x × M/M, y × N/N).
When the image is the second image, the magnetic sensor and the second image sensor are positioned on the opposite sides of the bill to be identified, so that mirror image processing needs to be performed on the magnetic data to obtain mirror image magnetic data, mirror image processing needs to be performed on the position of the magnetic code in the magnetic data to obtain the position of the magnetic code in the mirror image data, and according to the corresponding relation between the mirror image magnetic data and the image data of the image, the position of the magnetic code in the mirror image magnetic data is mapped to the position of the magnetic code in the image data, so that the position of the magnetic code in the image is determined. Because the data volume of the magnetic data is small, the position of the magnetic code in the image is obtained by mapping according to the mapping relation, and the calculation complexity is reduced.
And step 260, identifying the magnetic codes in the image according to the positions of the magnetic codes in the image.
According to the technical scheme of the embodiment, the orientation of the bill to be identified is determined according to the magnetic data, the image with the magnetic code in the first image and the second image is determined according to the orientation, the position of the magnetic code in the image is positioned according to the magnetic data and the image, and the position of the magnetic code in the image is repositioned according to the orientation determined by the magnetic data because the data volume of the magnetic data is smaller than that of the image, so that the calculation complexity can be reduced, and the identification speed of the magnetic code is improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a device for identifying a magnetic code of a bill according to a third embodiment of the present invention, where this embodiment is applicable to a case of identifying a magnetic code of a bill, and the device may be implemented by software and/or hardware, and may be generally integrated in a bill processing device. As shown in fig. 4, the device for identifying magnetic codes of bills according to the present embodiment includes: a magnetic data acquisition module 310, an image acquisition module 320, a magnetic code location module 330, and a magnetic code identification module 340.
The magnetic data acquisition module 310 is configured to acquire magnetic data of a to-be-identified bill through a magnetic head of a magnetic sensor, where the magnetic head is a strip-shaped magnetic head to sense a width related to one side of the to-be-identified bill;
the image acquisition module 320 is used for acquiring a first image of the bill to be identified through a first image sensor which is positioned on the same side as the magnetic sensor, and acquiring a second image of the bill to be identified through a second image sensor which is positioned on the opposite side of the magnetic sensor;
a magnetic code positioning module 330, configured to determine, according to the magnetic data, the first image and the second image, an image with a magnetic code in the first image and the second image, and position a position of the magnetic code in the image;
and the magnetic code identification module 340 is configured to identify the magnetic code in the image according to the position of the magnetic code in the image.
Optionally, the magnetic code positioning module includes:
the face identification unit is used for determining the face of the bill to be identified according to the magnetic data;
an image determining unit configured to determine an image having a magnetic code in the first image and the second image according to the orientation;
and the magnetic code positioning unit is used for positioning the position of the magnetic code in the image according to the magnetic data and the image.
Optionally, the identification-oriented unit is specifically configured to:
performing row projection and column projection on the magnetic data respectively;
determining the position of a magnetic code in the magnetic data according to the row projection and the column projection;
and determining the orientation of the bill to be identified according to the position of the magnetic code in the magnetic data.
Optionally, the magnetic code positioning unit is specifically configured to:
if the image is a first image, determining the position of the magnetic code in the image according to the position of the magnetic code in the magnetic data and the corresponding relation between the magnetic data and the image data of the image;
and if the image is a second image, carrying out mirror image processing on the magnetic data to obtain mirror image magnetic data, determining the position of the magnetic code in the mirror image magnetic data, and determining the position of the magnetic code in the image according to the position of the magnetic code in the mirror image magnetic data and the corresponding relation between the mirror image magnetic data and the image data of the image.
Optionally, the magnetic code identification module includes:
the magnetic code image extraction unit is used for extracting a magnetic code image from the image according to the position of the magnetic code in the image;
and the magnetic code identification unit is used for carrying out optical character identification on the magnetic code image to obtain the magnetic code in the magnetic code image.
Optionally, the bill to be recognized is a check.
The identification device of the magnetic codes of the bills can execute the identification method of the magnetic codes of the bills provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method for identifying a magnetic code of a ticket according to any embodiment of the present invention.
Example four
Fig. 5 is a schematic structural diagram of a bill handling apparatus according to a fourth embodiment of the present invention, as shown in fig. 5, the bill handling apparatus includes a processor 410, a memory 420, an input device 430, an output device 440, a magnetic sensor 450, a first image sensor 460, and a second image sensor 470; the number of the processors 410 in the bill processing device can be one or more, and one processor 410 is taken as an example in fig. 5; the processor 410, memory 420, input device 430, output device 440, magnetic sensor 450, first image sensor 460, and second image sensor 470 in the bill handling apparatus may be connected by a bus or other means, as exemplified by the bus connection in fig. 5.
The memory 420 serves as a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the identification method of the magnetic codes of the ticket in the embodiment of the present invention (for example, the magnetic data acquisition module 310, the image acquisition module 320, the magnetic code positioning module 330, and the magnetic code identification module 340 in the identification device of the magnetic codes of the ticket). The processor 410 executes various functional applications and data processing of the bill processing device by executing software programs, instructions and modules stored in the memory 420, namely, realizes the above-mentioned identification method of the magnetic code of the bill.
The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to the ticket processing device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the bill handling apparatus. The output device 440 may include a display device such as a display screen. The magnetic sensor 450 is used to acquire magnetic data, the first image sensor 460 is located on the same side as the magnetic sensor 450, the second image sensor 470 is located on the opposite side as the magnetic sensor 450, and the first image sensor 460 and the second image sensor 470 are used to acquire images.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a method for identifying a magnetic code of a ticket, and the method includes:
collecting magnetic data of a bill to be identified through a magnetic head of a magnetic sensor, wherein the magnetic head is a strip-shaped magnetic head so as to sense the width related to one side of the bill to be identified;
acquiring a first image of the bill to be identified through a first image sensor positioned on the same side as the magnetic sensor, and acquiring a second image of the bill to be identified through a second image sensor positioned on the opposite side of the magnetic sensor;
determining an image with a magnetic code in the first image and the second image according to the magnetic data, the first image and the second image, and positioning the position of the magnetic code in the image;
and identifying the magnetic codes in the image according to the positions of the magnetic codes in the image.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the identification method of the magnetic code of the ticket provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the device for identifying magnetic codes of bills, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method for identifying magnetic codes of bills is characterized by comprising the following steps:
collecting magnetic data of a bill to be identified through a magnetic head of a magnetic sensor, wherein the magnetic head is a strip-shaped magnetic head so as to sense the width related to one side of the bill to be identified;
acquiring a first image of the bill to be identified through a first image sensor positioned on the same side as the magnetic sensor, and acquiring a second image of the bill to be identified through a second image sensor positioned on the opposite side of the magnetic sensor;
determining an image with a magnetic code in the first image and the second image according to the magnetic data, the first image and the second image, and positioning the position of the magnetic code in the image;
locating a position of a magnetic code in the image based on the magnetic data and the image, comprising:
if the image is a first image, determining the position of the magnetic code in the image according to the position of the magnetic code in the magnetic data and the corresponding relation between the magnetic data and the image data of the image;
if the image is a second image, performing mirror image processing on the magnetic data to obtain mirror image magnetic data, determining the position of the magnetic code in the mirror image magnetic data, and determining the position of the magnetic code in the image according to the position of the magnetic code in the mirror image magnetic data and the corresponding relation between the mirror image magnetic data and the image data of the image;
and identifying the magnetic codes in the image according to the positions of the magnetic codes in the image.
2. The method of claim 1, wherein determining the image of the first image and the second image having the magnetic code and locating the position of the magnetic code in the image based on the magnetic data, the first image and the second image comprises:
determining the orientation of the bill to be identified according to the magnetic data;
determining an image with a magnetic code in the first image and the second image according to the orientation;
and according to the magnetic data and the image, positioning the position of the magnetic code in the image.
3. The method of claim 2, wherein determining the orientation of the document to be recognized based on the magnetic data comprises:
performing row projection and column projection on the magnetic data respectively;
determining the position of a magnetic code in the magnetic data according to the row projection and the column projection;
and determining the orientation of the bill to be identified according to the position of the magnetic code in the magnetic data.
4. The method of claim 1, wherein identifying the magnetic code in the image according to its position in the image comprises:
extracting a magnetic code image from the image according to the position of the magnetic code in the image;
and carrying out optical character recognition on the magnetic code image to obtain the magnetic code in the magnetic code image.
5. The method of claim 1, wherein the document to be recognized is a check.
6. An apparatus for identifying magnetic codes of bills, comprising:
the magnetic data acquisition module is used for acquiring the magnetic data of the bill to be identified through a magnetic head of the magnetic sensor, wherein the magnetic head is a strip-shaped magnetic head so as to sense the width related to one side of the bill to be identified;
the image acquisition module is used for acquiring a first image of the bill to be identified through a first image sensor which is positioned on the same side as the magnetic sensor and acquiring a second image of the bill to be identified through a second image sensor which is positioned on the opposite side of the magnetic sensor;
the magnetic code positioning module is used for determining an image with a magnetic code in the first image and the second image according to the magnetic data, the first image and the second image and positioning the position of the magnetic code in the image;
the magnetic code positioning module is specifically used for:
if the image is a first image, determining the position of the magnetic code in the image according to the position of the magnetic code in the magnetic data and the corresponding relation between the magnetic data and the image data of the image;
if the image is a second image, performing mirror image processing on the magnetic data to obtain mirror image magnetic data, determining the position of the magnetic code in the mirror image magnetic data, and determining the position of the magnetic code in the image according to the position of the magnetic code in the mirror image magnetic data and the corresponding relation between the mirror image magnetic data and the image data of the image;
and the magnetic code identification module is used for identifying the magnetic code in the image according to the position of the magnetic code in the image.
7. The apparatus of claim 6, wherein the magnetic code location module comprises:
the face identification unit is used for determining the face of the bill to be identified according to the magnetic data;
an image determining unit configured to determine an image having a magnetic code in the first image and the second image according to the orientation;
and the magnetic code positioning unit is used for positioning the position of the magnetic code in the image according to the magnetic data and the image.
8. A note processing apparatus, characterized in that the apparatus comprises:
one or more processors;
storage means for storing one or more programs;
a magnetic sensor for collecting magnetic data;
the first image sensor is positioned on the same side with the magnetic sensor, and the second image sensor is positioned on the opposite side with the magnetic sensor and is used for acquiring images;
when executed by the one or more processors, cause the one or more processors to implement a method of ticket magnetic code identification as claimed in any one of claims 1-5.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out a method of identification of a magnetic code of a ticket according to any one of claims 1 to 5.
CN201810072061.7A 2018-01-25 2018-01-25 Bill magnetic code recognition method and device, bill processing equipment and storage medium Active CN108197512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810072061.7A CN108197512B (en) 2018-01-25 2018-01-25 Bill magnetic code recognition method and device, bill processing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810072061.7A CN108197512B (en) 2018-01-25 2018-01-25 Bill magnetic code recognition method and device, bill processing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108197512A CN108197512A (en) 2018-06-22
CN108197512B true CN108197512B (en) 2021-03-12

Family

ID=62591204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810072061.7A Active CN108197512B (en) 2018-01-25 2018-01-25 Bill magnetic code recognition method and device, bill processing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108197512B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136845A (en) * 2013-01-23 2013-06-05 浙江大学 Renminbi (RMB) counterfeit identifying method based on crown-word image characters
CN104091388A (en) * 2014-07-22 2014-10-08 新达通科技股份有限公司 Paper currency authentic identification method and device based on magnetic images
CN104346858A (en) * 2014-10-10 2015-02-11 新达通科技股份有限公司 Paper currency face value identification method and device based on magnetic image
CN104408814A (en) * 2014-12-13 2015-03-11 天津远目科技有限公司 Method for identifying RMB code
CN105160756A (en) * 2015-08-18 2015-12-16 深圳怡化电脑股份有限公司 Paper money facing direction recognition method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050010776A1 (en) * 2003-03-31 2005-01-13 Kenen Leo M. Optically variable devices with encrypted embedded data for authentication of identification documents
CN100415022C (en) * 2004-12-02 2008-08-27 乐金电子(中国)研究开发中心有限公司 CeU phone with magnetic detection function and magnetic bar code identifying method
CN107610320A (en) * 2017-09-06 2018-01-19 深圳怡化电脑股份有限公司 A kind of bank slip recognition method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136845A (en) * 2013-01-23 2013-06-05 浙江大学 Renminbi (RMB) counterfeit identifying method based on crown-word image characters
CN104091388A (en) * 2014-07-22 2014-10-08 新达通科技股份有限公司 Paper currency authentic identification method and device based on magnetic images
CN104346858A (en) * 2014-10-10 2015-02-11 新达通科技股份有限公司 Paper currency face value identification method and device based on magnetic image
CN104408814A (en) * 2014-12-13 2015-03-11 天津远目科技有限公司 Method for identifying RMB code
CN105160756A (en) * 2015-08-18 2015-12-16 深圳怡化电脑股份有限公司 Paper money facing direction recognition method and device

Also Published As

Publication number Publication date
CN108197512A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
US5119433A (en) Method and system for locating the amount field on a document
EP1231558A2 (en) A printing control interface system and method with handwriting discrimination capability
KR102503880B1 (en) Machine readable security mark and process for generating
CN104573616A (en) Information identification method and related device and system
CN102938061A (en) Convenient and electronic professional laptop and automatic page number identification method thereof
CN102903136A (en) Method and system for electronizing handwriting
CN112464941B (en) Invoice identification method and system based on neural network
RU2656573C2 (en) Methods of detecting the user-integrated check marks
US11881043B2 (en) Image processing system, image processing method, and program
CN103577820A (en) Character recognition method, character recognition apparatus and financial apparatus
CN109934213A (en) Bill image recognition methods, device, computer equipment and storage medium
CN109726989B (en) Electronic system for hand-written ticket
CN110390376A (en) The generation method and system of dot matrix label
US20070053610A1 (en) Image processing apparatus and control method therefor
CN108197512B (en) Bill magnetic code recognition method and device, bill processing equipment and storage medium
EP3477547B1 (en) Optical character recognition systems and methods
CN114926840B (en) Method and system for converting photocopy PDF into replicable PDF
CN101266663A (en) A bank handwriting ticket digitization method, system and digital ticket
JP6540597B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM
CN114612919A (en) Bill information processing system, method and device
JP4205554B2 (en) Form processing device
JPS5841542B2 (en) optical character reader
CN112101356A (en) Method and device for positioning specific text in picture and storage medium
JP6167956B2 (en) Information code generation method, information code, information code reader, and information code utilization system
JP2784502B2 (en) Method and apparatus for recording and reading two-dimensional data on digital data recording paper.

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