CN108510638B - Paper money identification method and device - Google Patents

Paper money identification method and device Download PDF

Info

Publication number
CN108510638B
CN108510638B CN201710103242.7A CN201710103242A CN108510638B CN 108510638 B CN108510638 B CN 108510638B CN 201710103242 A CN201710103242 A CN 201710103242A CN 108510638 B CN108510638 B CN 108510638B
Authority
CN
China
Prior art keywords
gray
value
distribution characteristic
image
row
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
CN201710103242.7A
Other languages
Chinese (zh)
Other versions
CN108510638A (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 CN201710103242.7A priority Critical patent/CN108510638B/en
Publication of CN108510638A publication Critical patent/CN108510638A/en
Application granted granted Critical
Publication of CN108510638B publication Critical patent/CN108510638B/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

Landscapes

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

Abstract

The embodiment of the invention discloses a method and a device for identifying paper money. The method comprises the following steps: acquiring a first gray image of a preset characteristic area of the paper money to be detected; determining a gray distribution characteristic value of the first gray image according to the gray value average value of each block image in the first gray image; and if the gray distribution characteristic value of the first gray image is within a preset threshold range, determining that the paper money to be detected is true paper money. The technical scheme of the embodiment of the invention solves the defect of low accuracy of identifying the true and false paper money by using the gray distribution characteristic value of the gray image obtained by the existing calculation method, and realizes the improvement of the identification accuracy of the true and false paper money.

Description

Paper money identification method and device
Technical Field
The embodiment of the invention relates to a paper money detection technology, in particular to a paper money identification method and a device.
Background
Along with the development of economy, the circulation of paper money is larger and larger, and intelligent unmanned charging systems based on paper money recognition technology appear in many industries. For example, the banknote recognition technology can be applied not only to vending and ticketing, but also to a system such as an automated teller machine in a bank or an automated teller machine in a business office. Meanwhile, the invention of the cash register also provides convenience for various industries. The application of the paper money recognition device saves a large amount of human resources and greatly improves the working efficiency.
When the paper money is irradiated by light rays such as infrared light rays and ultraviolet light rays, the black and white images obtained by the true and false paper money are different, and the true and false of the paper money can be identified by calculating the gray distribution characteristic value of the black and white image in any one same region between the black and white images of the true and false paper money.
In the prior art, the method for identifying the authenticity of the paper currency is used for identifying the gray distribution characteristic value of the black-white image determined by using methods such as variance, difference or direct mean calculation and the like, and the accuracy is low.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method and an apparatus for identifying a banknote, so as to solve the defect that the accuracy of identifying the banknote by using the gray-scale distribution characteristic value of the black-and-white image obtained by the existing calculation method is low.
In a first aspect, an embodiment of the present invention provides a banknote recognition method, including:
acquiring a first gray image of a preset characteristic area of the paper money to be detected;
determining a gray distribution characteristic value of the first gray image according to the gray value average value of each block image in the first gray image;
and if the gray distribution characteristic value of the first gray image is within a preset threshold range, determining that the paper money to be detected is true paper money.
In the above method, preferably, the determining a gray distribution characteristic value of the first gray image according to a mean gray value of each block image in the first gray image includes:
dividing the first gray level image according to rows and columns to obtain each block image;
calculating the gray distribution characteristic value of each row and the gray distribution characteristic value of each column according to the gray value average value of each block image;
and calculating the gray distribution characteristic value of the first gray image according to the gray distribution characteristic value of each row and the gray distribution characteristic value of each column.
In the above method, preferably, the calculating a gray scale distribution characteristic value of each row and a gray scale distribution characteristic value of each column according to the gray scale value average value of each block image includes:
respectively summing the gray value average values of all the block images in each row and each column, and calculating to obtain the gray value average value sum of each row and the gray value average value sum of each column;
summing the gray value average sum of each row and the gray value average sum of each column respectively, and calculating to obtain a gray value average total row and a gray value average total column sum;
respectively carrying out quotient calculation on the gray value average value of each row and the total row sum of the gray value average values to obtain the gray distribution characteristic value of each row; respectively carrying out quotient calculation on the gray value average value of each row and the total row sum of the gray value average values to obtain a gray distribution characteristic value of each row;
or,
respectively summing the gray value average values of all the block images in each row and each column, and calculating to obtain the gray value average value sum of each row and the gray value average value sum of each column; respectively carrying out quotient calculation on the gray value average value of each row and the maximum value in the gray value average value of each row to obtain a gray distribution characteristic value of each row; respectively carrying out quotient calculation on the gray value average value of each row and the maximum value in the gray value average value sum of each row to obtain the gray distribution characteristic value of each row;
or,
selecting all the block images on any diagonal line of the first gray level image; respectively carrying out quotient calculation on the gray value mean value of all the selected block images and the maximum value of the gray value mean value of all the block images in the row where the block images are located, and calculating to obtain the gray distribution characteristic value of each row; and respectively carrying out quotient calculation on the gray value mean value of all the selected block images and the maximum value of the gray value mean value of all the block images in the column where the block images are located, and calculating to obtain the gray distribution characteristic value of each column.
In the above method, it is preferable that the calculating a gray scale distribution feature value of the first gray scale image based on the gray scale distribution feature values of the respective rows and the gray scale distribution feature values of the respective columns includes:
using the formula
Figure BDA0001232313580000031
Calculating a gray distribution characteristic value of the first gray image, wherein pr [ i [ ] i]Gray of ith rowCharacteristic value of degree distribution, pc [ i ]]And N is the minimum value of the total row number and the total column number of the block diagram.
In the above method, preferably, before acquiring the first grayscale image of the preset feature region of the banknote to be measured, the method further includes:
acquiring gray distribution characteristic values of second gray images in preset characteristic areas of a plurality of genuine coins;
and determining the preset threshold range according to the gray distribution characteristic value of the second gray image.
In the above method, preferably, the determining the preset threshold range according to the gray distribution characteristic value of the second gray image includes:
and selecting the minimum value and the maximum value in the gray distribution characteristic values of the second gray images in the preset characteristic areas of the true coins, and taking a value range which is formed by taking the maximum value and the minimum value as endpoints as the preset threshold range.
In the above method, preferably, the calculating a mean value of the gray values of the block images includes:
acquiring the total number and the gray value of all pixel points in each block image; respectively summing the gray values of all pixel points in each block image, and correspondingly dividing the sum by the total number of all pixel points of each block image to obtain the gray value average value of each block image by calculation;
or,
respectively acquiring the total number and gray value of pixel points of all even columns and even rows in each block image; and summing the gray values of the pixel points of all even-numbered columns and even-numbered rows in each block image respectively, and then correspondingly dividing the sum by the total number of the pixel points of all even-numbered columns and even-numbered rows in each block image to calculate the gray value average value of each block image.
In the above method, preferably, the widths of the rows and the columns are both less than or equal to 20 pixels.
In a second aspect, an embodiment of the present invention provides a banknote recognition apparatus, including:
the gray image acquisition module is used for acquiring a first gray image of a preset characteristic area of the paper money to be detected;
the gray distribution characteristic value determining module is used for determining the gray distribution characteristic value of the first gray image according to the gray value average value of each block image in the first gray image;
and the numerical value judgment module is used for determining that the paper money to be detected is a true paper money if the gray distribution characteristic value of the first gray image is within a preset threshold range.
In the above apparatus, it is preferable that the gradation distribution characteristic value determination module includes:
the block image acquisition unit is used for dividing the first gray level image according to rows and columns to obtain each block image;
the row-column gray distribution characteristic value calculating unit is used for calculating gray distribution characteristic values of all rows and gray distribution characteristic values of all columns according to the gray value average value of all the block images;
and the gray distribution characteristic value calculating unit is used for calculating the gray distribution characteristic value of the first gray image according to the gray distribution characteristic value of each row and the gray distribution characteristic value of each column.
According to the paper currency identification method and device provided by the embodiment of the invention, the first gray image of the preset characteristic region of the paper currency to be detected is obtained, the gray distribution characteristic value of the first gray image is determined according to the gray value average value of each block image in the first gray image, and if the gray distribution characteristic value of the first gray image is within the preset threshold range, the paper currency to be detected is determined to be the true currency, so that the defect of low true and false accuracy of identifying the paper currency by using the gray distribution characteristic value of the gray image obtained by using the existing calculation method is overcome, and the identification accuracy of the true and false paper currency is improved.
Drawings
FIG. 1 is a flow chart of a banknote recognition method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a banknote recognition method according to a second embodiment of the present invention;
fig. 3 is a structural diagram of a banknote recognition apparatus according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in further detail below with reference to the accompanying drawings. 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. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a banknote recognition method according to an embodiment of the present invention, where the method according to this embodiment may be implemented by a banknote recognition apparatus, and the apparatus may be implemented by hardware and/or software, and may be generally integrated into apparatuses, such as a banknote validator and an ATM, that are used for or require a banknote to be identified. The method of the embodiment specifically includes:
and 110, acquiring a first gray image of a preset characteristic area of the paper money to be detected.
In this embodiment, the banknote to be detected may be any banknote, the preset feature region may be any region of front and back surfaces of the banknote to be detected, and may typically be a back-surface hall region of rmb.
As will be understood by those skilled in the art, the gray scale map of the banknote can be obtained by infrared transmission or ultraviolet reflection, and because the characteristics of the inks used in the respective regions of the banknote are different, the transmittances and reflectances of the inks with different characteristics with respect to the same light source are different, and the transmittances and reflectances of the same ink with respect to different light sources are also different, the gray scale maps obtained by using different light sources or using the same light source but using different receiving methods (e.g., transmission or reflection) for the same banknote are different, and based on this phenomenon, the region with the ink characteristics different from the other regions can be preferably used as the preset feature region in this embodiment.
Illustratively, in the gray-scale image obtained by infrared transmission of the reverse side of the RMB, the image of the hall area is clearer, which is determined by the characteristics of the ink used at the hall pattern, so that the hall area can be selected as the preset characteristic area for the gray-scale image obtained by infrared transmission of the reverse side of the RMB.
It should be further noted that, since the banknote has a problem of face orientation (for example, front-to-front direction, front-to-back direction, back-to-back direction, etc.), the present embodiment is performed on the premise that the face orientation of the banknote to be measured is known.
In addition, because the positions of the preferred preset characteristic areas of the banknotes of different currencies are different due to the difference in the manufacturing process, the raw materials and the like of the banknotes of different currencies, the present embodiment is performed on the premise that the currency of the banknote to be measured is known.
In this embodiment, on the premise that the currency and the face of the banknote to be detected are known, the specific position of the preset feature region in the gray scale image of the banknote to be detected can be determined by combining the resolution of the image acquisition device, so as to obtain the first gray scale image of the preset feature region of the banknote to be detected.
And 120, determining a gray distribution characteristic value of the first gray image according to the gray value average value of each block image in the first gray image.
In this embodiment, after a first grayscale image of a preset feature region is obtained, the first grayscale image is partitioned, where the partitioning method specifically refers to partitioning the first grayscale image according to rows and columns, where the number of the rows and the number of the columns may be equal or different, widths of the rows may be equal or different, widths of the columns may be equal or different, and widths of the rows and the columns may typically be 20 pixels.
In this embodiment, after the first grayscale image is segmented, the grayscale distribution characteristic value of each row and the grayscale distribution characteristic value of each column may be calculated according to the grayscale mean value of each segmented image. For example, the gray value average of each block image may be calculated by summing the gray values of all the pixel points in each block image, and then dividing the sum by the total number of all the pixel points in each block image. For example, the method for calculating the gray scale distribution characteristic value of each row may be to first calculate a gray scale value average of each block image in each row, add the gray scale value averages of all block images in each row to obtain a gray scale value average sum of each row, then add the gray scale value average sums of each row to obtain a total row sum of the gray scale value averages, and finally divide the gray scale value average sum of each row by the total row sum of the gray scale value averages, thereby obtaining the gray scale distribution characteristic value of each row, where the gray scale distribution characteristic value of each column may also be calculated according to the above method.
In this embodiment, after the gray scale distribution characteristic values of the rows and the gray scale distribution characteristic values of the columns are obtained through calculation, the gray scale distribution characteristic value of the first gray scale image may be obtained through calculation according to the gray scale distribution characteristic values of the rows and the gray scale distribution characteristic values of the columns. For example, the calculation of the gray distribution characteristic value of the first gray image may be by using a formula
Figure BDA0001232313580000081
Calculating a gray distribution characteristic value of the first gray image, wherein pr [ i [ ] i]Is the gray distribution characteristic value of the ith row, pc [ i]And N is the minimum value of the total row number and the total column number of the block diagram.
And step 130, if the gray distribution characteristic value of the first gray image is within the preset threshold range, determining that the paper money to be detected is genuine.
In this embodiment, the preset threshold range specifically refers to a value range determined by a gray level distribution characteristic value of a gray level image of a preset characteristic region of a plurality of genuine banknotes having the same currency and face value as those of the banknotes to be tested, and may be typically 100 genuine banknotes.
The method for calculating the gray distribution characteristic value of the gray image in the preset characteristic region of the genuine bill is the same as the method for calculating the gray distribution characteristic value in the step 120. The method for determining the preset threshold range may specifically be to select a minimum value and a maximum value from gray distribution characteristic values of gray images of a preset characteristic region of a plurality of true banknotes having the same currency and face value as those of the banknotes to be tested, and use a value range composed of the maximum value and the minimum value as endpoints as the preset threshold range.
According to the paper currency identification method provided by the embodiment of the invention, the first gray image of the preset characteristic region of the paper currency to be detected is obtained, the gray distribution characteristic value of the first gray image is determined according to the gray value average value of each block image in the first gray image, and if the gray distribution characteristic value of the first gray image is within the preset threshold range, the paper currency to be detected is determined to be the true currency, so that the defect that the accuracy for identifying the true and false of the paper currency is low by using the gray distribution characteristic value of the gray image obtained by using the conventional calculation method is solved, and the identification accuracy of the true and false paper currency is improved.
Example two
Fig. 2 is a flowchart of a banknote recognition method according to a second embodiment of the present invention. In this embodiment, determining the gray distribution characteristic value of the first gray image according to the mean gray value of the block images in the first gray image is optimized based on the following embodiments: dividing the first gray level image according to rows and columns to obtain each block image; calculating the gray distribution characteristic value of each row and the gray distribution characteristic value of each column according to the gray value average value of each block image; and calculating the gray distribution characteristic value of the first gray image according to the gray distribution characteristic value of each row and the gray distribution characteristic value of each column.
Further, calculating the gray distribution characteristic value of each row and the gray distribution characteristic value of each column according to the gray value average value of each block image, and optimizing as follows: respectively summing the gray value average values of all the block images in each row and each column, and calculating to obtain the gray value average value sum of each row and the gray value average value sum of each column; respectively summing the gray value average sum of each row and the gray value average sum of each column, and calculating to obtain a gray value average total row and a gray value average total column sum; respectively carrying out quotient calculation on the gray value average value and the gray value average value total row sum of each row to obtain the gray distribution characteristic value of each row; respectively quoting the gray value average sum of each row and the gray value average sum, and calculating to obtain the gray distribution characteristic value of each row; or,
respectively summing the gray value average values of all the block images in each row and each column, and calculating to obtain the gray value average value sum of each row and the gray value average value sum of each column; respectively carrying out quotient calculation on the gray value average value of each row and the maximum value in the gray value average value sum of each row to obtain the gray distribution characteristic value of each row; respectively carrying out quotient calculation on the gray value average value of each row and the maximum value in the gray value average value sum of each row to obtain the gray distribution characteristic value of each row; or,
selecting all block images on any diagonal line of the first gray level image; respectively carrying out quotient calculation on the gray value mean value of all the selected block images and the maximum value of the gray value mean value of all the block images in the row where the block images are located, and calculating to obtain the gray distribution characteristic value of each row; and respectively quoting the gray value mean value of all the selected block images and the maximum value of the gray value mean value of all the block images in the column in which the block images are positioned, and calculating to obtain the gray distribution characteristic value of each column.
Further, the gray distribution characteristic value of the first gray image is calculated according to the gray distribution characteristic value of each row and the gray distribution characteristic value of each column, and the optimization is as follows: using the formula
Figure BDA0001232313580000101
Calculating a gray distribution characteristic value of the first gray image, wherein pr [ i [ ] i]Is the gray scale distribution characteristic of the ith rowCharacteristic value, pc [ i]And N is the minimum value of the total row number and the total column number of the block diagram.
Further, before acquiring the first grayscale image of the preset feature region of the banknote to be detected, the method further includes: acquiring gray distribution characteristic values of second gray images in preset characteristic areas of a plurality of genuine coins; and determining a preset threshold range according to the gray distribution characteristic value of the second gray image.
Further, a preset threshold range is determined according to the gray distribution characteristic value of the second gray image, and the optimization is as follows: and selecting the minimum value and the maximum value in the gray distribution characteristic values of the second gray images in the preset characteristic areas of the true coins, and taking a value range which is composed of the maximum value and the minimum value as endpoints as a preset threshold range.
Further, the mean gray value of each block image is calculated and optimized as follows: acquiring the total number and the gray value of all pixel points in each block image; respectively summing the gray values of all pixel points in each block image, correspondingly dividing the sum by the total number of all pixel points of each block image, and calculating to obtain the mean value of the gray values of each block image; or,
respectively acquiring the total number and gray value of pixel points of all even columns and even rows in each block image; and summing the gray values of the pixel points of all even-numbered columns and even-numbered rows in each block image respectively, and then correspondingly dividing the sum by the total number of the pixel points of all even-numbered columns and even-numbered rows in each block image to calculate the mean value of the gray values of each block image.
Correspondingly, the method of the embodiment specifically includes:
and step 210, acquiring the gray distribution characteristic values of the second gray images in the preset characteristic areas of the true coins.
In this embodiment, the genuine banknote specifically refers to a banknote having the same currency and face value as those of the banknote to be detected, and the preset feature area of the genuine banknote and the preset feature area of the banknote to be detected are the same area. The acquisition mode of the second gray scale map of the preset characteristic region of the true banknote is the same as the acquisition mode of the first gray scale map of the preset characteristic region of the banknote to be detected. The method of calculating the gray distribution characteristic value of the second gray image is the same as the method of calculating the gray distribution characteristic value of the first gray image. The number of genuine coins may be specifically 100, 200, or the like.
And step 220, determining a preset threshold range according to the gray distribution characteristic value of the second gray image.
In this embodiment, after obtaining the gray distribution characteristic values of the second gray image in the preset characteristic regions of the plurality of genuine coins, the minimum value and the maximum value of the gray distribution characteristic values of the second gray image in the preset characteristic regions of the plurality of genuine coins may be selected, a value range composed of endpoints of the maximum value and the minimum value may be used as a preset threshold range, and a value range composed of endpoints of 0.9 times of the minimum value and 1.1 times of the maximum value of the gray distribution characteristic values of the second gray image may also be used as a preset threshold range. For example, when the number of used genuine coins is 100, the preset threshold range may be determined using the second method described above, and when the number of used genuine coins is 1000, the preset threshold range may be determined using the first method described above.
Of course, there may be a deviation or a serious error in the printing process of the banknote, and therefore, if the value of the gray distribution characteristic value of one or some of the second gray scale images is greatly different from the value of the gray distribution characteristic value of other second gray scale images, the value may not be considered in determining the threshold range.
And step 230, acquiring a first gray image of a preset characteristic area of the paper money to be detected.
And 240, dividing the first gray level image according to rows and columns to obtain each block image.
And step 250, calculating the gray distribution characteristic value of each row and the gray distribution characteristic value of each column according to the gray value average value of each block image.
In this embodiment, the method for calculating the gray value average value of each block image may specifically be to first obtain the total number and the gray value of all the pixel points in each block image, then sum the gray values of all the pixel points in each block image, then correspondingly divide by the total number of all the pixel points in each block image, and calculate the gray value average value of each block image, or may also be to first obtain the total number and the gray value of all the pixel points in the even number columns and the even number rows in each block image, then sum the gray values of all the pixel points in the even number columns and the even number rows in each block image, and then correspondingly divide by the total number of the pixel points in all the even number columns and the even number rows in each block image, and calculate the gray value average value of each block image, which is not limited in this embodiment.
In this embodiment, the method for calculating the gray distribution characteristic value of each row and the gray distribution characteristic value of each column according to the gray value average value of each block image may be any one of the following three methods:
the first method is that firstly, the gray value mean values of all the block images in each row and each column are respectively summed, the gray value mean value sum of each row and the gray value mean value sum of each column are obtained through calculation, then the gray value mean value sum of each row and the gray value mean value sum of each column are respectively summed, the gray value mean value total row and the gray value mean value total column sum are obtained through calculation, finally, the gray value mean value sum and the gray value mean value total row sum of each row are respectively subjected to quotient calculation, the gray value distribution characteristic value of each row is obtained through calculation, the gray value mean value sum and the gray value mean value total column sum of each column are respectively subjected to quotient calculation, and the gray value distribution characteristic value of each.
And secondly, respectively summing the gray value average values of all the block images in each row and each column, calculating to obtain the gray value average value sum of each row and the gray value average value sum of each column, respectively quoting the gray value average value sum of each row and the maximum value of the gray value average value sum of each row, calculating to obtain the gray distribution characteristic value of each row, respectively quoting the gray value average value sum of each column and the maximum value of the gray value average value sum of each column, and calculating to obtain the gray distribution characteristic value of each column.
And thirdly, selecting all the block images on any diagonal line of the first gray level image, then respectively performing quotient calculation on the gray level value average values of all the selected block images and the maximum value of the gray level value average values of all the block images in the row where the block images are located, calculating to obtain the gray level distribution characteristic value of each row, respectively performing quotient calculation on the gray level value average values of all the selected block images and the maximum value of the gray level value average values of all the block images in the column where the block images are located, and calculating to obtain the gray level distribution characteristic value of each column.
And step 260, calculating the gray distribution characteristic value of the first gray image according to the gray distribution characteristic value of each row and the gray distribution characteristic value of each column.
In this embodiment, the method for calculating the gray scale distribution characteristic value of the first gray scale image according to the gray scale distribution characteristic value of each row and the gray scale distribution characteristic value of each column may specifically be: using the formula
Figure BDA0001232313580000131
Calculating a gray distribution characteristic value of the first gray image, wherein pr [ i [ ] i]Is the gray distribution characteristic value of the ith row, pc [ i]And N is the minimum value of the total row number and the total column number of the block diagram.
And 270, if the gray distribution characteristic value of the first gray image is within the preset threshold range, determining that the paper money to be detected is genuine.
According to the paper money identification method provided by the second embodiment of the invention, the preset threshold range is determined according to the acquired gray distribution characteristic value of the second gray image of the preset characteristic region of a plurality of true paper money, then the acquired first gray image of the preset characteristic region of the paper money to be detected is subjected to blocking processing, the gray distribution characteristic value of the first gray image is obtained through calculation processing of the gray value of each blocking image, and finally whether the paper money to be detected is the true paper money is determined according to the result of judging whether the gray distribution characteristic value of the first gray image belongs to the preset threshold range.
On the basis of the above-described embodiment, the rows and columns are optimized as: the widths of the rows and the columns are less than or equal to 20 pixel points.
The benefits of this arrangement are: the accuracy of the gradation distribution characteristic value of the first gradation image can be improved.
EXAMPLE III
Fig. 3 is a structural diagram of a banknote recognition apparatus according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a gray scale image obtaining module 101, a gray scale distribution characteristic value determining module 102 and a numerical value judging module 103, wherein:
the gray image acquisition module 101 is used for acquiring a first gray image of a preset characteristic area of the paper money to be detected;
the gray distribution characteristic value determining module 102 is configured to determine a gray distribution characteristic value of the first gray image according to a gray value average value of each block image in the first gray image;
and the numerical value judging module 103 is configured to determine that the paper money to be detected is a genuine paper money if the gray distribution characteristic value of the first gray image is within a preset threshold range.
The paper money identification device provided by the third embodiment of the invention determines the gray distribution characteristic value of the first gray image according to the gray value average value of each block image in the first gray image by acquiring the first gray image of the preset characteristic region of the paper money to be detected, and determines the paper money to be detected as the true paper money if the gray distribution characteristic value of the first gray image is within the preset threshold range, thereby solving the defect of low true and false accuracy of identifying the paper money by using the gray distribution characteristic value of the gray image obtained by using the existing calculation method, and realizing the improvement of the identification accuracy of the true and false paper money
On the basis of the foregoing embodiments, the gray distribution characteristic value determination module may include:
the block image acquisition unit is used for dividing the first gray level image according to rows and columns to obtain each block image;
the row-column gray distribution characteristic value calculating unit is used for calculating the gray distribution characteristic value of each row and the gray distribution characteristic value of each column according to the gray value average value of each block image;
and the gray distribution characteristic value calculating unit is used for calculating the gray distribution characteristic value of the first gray image according to the gray distribution characteristic value of each row and the gray distribution characteristic value of each column.
The paper money recognition device provided by the embodiment of the invention can be used for executing the paper money recognition method provided by any embodiment of the invention, has corresponding functional modules and realizes the same beneficial effects.
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 (7)

1. A banknote recognition method, comprising:
acquiring a first gray image of a preset characteristic area of the paper money to be detected;
determining a gray distribution characteristic value of the first gray image according to the gray value average value of each block image in the first gray image;
if the gray distribution characteristic value of the first gray image is within a preset threshold range, determining that the paper money to be detected is a genuine paper money;
the determining the gray distribution characteristic value of the first gray image according to the gray value average value of each block image in the first gray image comprises:
dividing the first gray level image according to rows and columns to obtain each block image;
calculating the gray distribution characteristic value of each row and the gray distribution characteristic value of each column according to the gray value average value of each block image;
calculating the gray distribution characteristic value of the first gray image according to the gray distribution characteristic value of each row and the gray distribution characteristic value of each column;
the calculating the gray scale distribution characteristic value of the first gray scale image according to the gray scale distribution characteristic value of each row and the gray scale distribution characteristic value of each column includes:
using the formula
Figure FDA0002383430860000011
Calculating a gray distribution characteristic value of the first gray image, wherein pr [ i [ ] i]Is the gray distribution characteristic value of the ith row, pc [ i]And N is the minimum value of the total row number and the total column number of the block diagram.
2. The method according to claim 1, wherein the calculating the gray distribution characteristic value of each row and the gray distribution characteristic value of each column according to the gray value average value of each block image comprises:
respectively summing the gray value average values of all the block images in each row and each column, and calculating to obtain the gray value average value sum of each row and the gray value average value sum of each column;
summing the gray value average sum of each row and the gray value average sum of each column respectively, and calculating to obtain a gray value average total row and a gray value average total column sum;
respectively carrying out quotient calculation on the gray value average value of each row and the total row sum of the gray value average values to obtain the gray distribution characteristic value of each row; respectively carrying out quotient calculation on the gray value average value of each row and the total row sum of the gray value average values to obtain a gray distribution characteristic value of each row;
or,
respectively summing the gray value average values of all the block images in each row and each column, and calculating to obtain the gray value average value sum of each row and the gray value average value sum of each column; respectively carrying out quotient calculation on the gray value average value of each row and the maximum value in the gray value average value of each row to obtain a gray distribution characteristic value of each row; respectively carrying out quotient calculation on the gray value average value of each row and the maximum value in the gray value average value sum of each row to obtain the gray distribution characteristic value of each row;
or,
selecting all the block images on any diagonal line of the first gray level image; respectively carrying out quotient calculation on the gray value mean value of all the selected block images and the maximum value of the gray value mean value of all the block images in the row where the block images are located, and calculating to obtain the gray distribution characteristic value of each row; and respectively carrying out quotient calculation on the gray value mean value of all the selected block images and the maximum value of the gray value mean value of all the block images in the column where the block images are located, and calculating to obtain the gray distribution characteristic value of each column.
3. The method according to any one of claims 1-2, characterized in that before acquiring the first gray scale image of the preset feature area of the banknote to be tested, the method further comprises:
acquiring gray distribution characteristic values of second gray images in preset characteristic areas of a plurality of genuine coins;
and determining the preset threshold range according to the gray distribution characteristic value of the second gray image.
4. The method according to claim 3, wherein the determining the preset threshold range according to the gray distribution characteristic value of the second gray image comprises:
and selecting the minimum value and the maximum value in the gray distribution characteristic values of the second gray images in the preset characteristic areas of the true coins, and taking a value range which is formed by taking the maximum value and the minimum value as endpoints as the preset threshold range.
5. The method according to any one of claims 1-2, wherein calculating a mean of the gray values of the block images comprises:
acquiring the total number and the gray value of all pixel points in each block image; respectively summing the gray values of all pixel points in each block image, and correspondingly dividing the sum by the total number of all pixel points of each block image to obtain the gray value average value of each block image by calculation;
or,
respectively acquiring the total number and gray value of pixel points of all even columns and even rows in each block image; and summing the gray values of the pixel points of all even-numbered columns and even-numbered rows in each block image respectively, and then correspondingly dividing the sum by the total number of the pixel points of all even-numbered columns and even-numbered rows in each block image to calculate the gray value average value of each block image.
6. The method of any of claims 1-2, wherein the width of each of the rows and columns is less than or equal to 20 pixels.
7. A paper money discriminating apparatus characterized by comprising:
the gray image acquisition module is used for acquiring a first gray image of a preset characteristic area of the paper money to be detected;
the gray distribution characteristic value determining module is used for determining the gray distribution characteristic value of the first gray image according to the gray value average value of each block image in the first gray image;
the numerical value judging module is used for determining that the paper money to be detected is a true paper money if the gray distribution characteristic value of the first gray image is within a preset threshold range;
the gray distribution characteristic value determination module includes:
the block image acquisition unit is used for dividing the first gray level image according to rows and columns to obtain each block image;
the row-column gray distribution characteristic value calculating unit is used for calculating gray distribution characteristic values of all rows and gray distribution characteristic values of all columns according to the gray value average value of all the block images;
a gray distribution characteristic value calculation unit, configured to calculate a gray distribution characteristic value of the first gray image according to the gray distribution characteristic values of the rows and the gray distribution characteristic values of the columns;
the gray distribution characteristic value calculating unit is specifically configured to: using the formula
Figure FDA0002383430860000041
Calculating a gray distribution characteristic value of the first gray image, wherein pr [ i [ ] i]Is the gray distribution characteristic value of the ith row, pc [ i]And N is the minimum value of the total row number and the total column number of the block diagram.
CN201710103242.7A 2017-02-24 2017-02-24 Paper money identification method and device Active CN108510638B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710103242.7A CN108510638B (en) 2017-02-24 2017-02-24 Paper money identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710103242.7A CN108510638B (en) 2017-02-24 2017-02-24 Paper money identification method and device

Publications (2)

Publication Number Publication Date
CN108510638A CN108510638A (en) 2018-09-07
CN108510638B true CN108510638B (en) 2020-08-18

Family

ID=63373503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710103242.7A Active CN108510638B (en) 2017-02-24 2017-02-24 Paper money identification method and device

Country Status (1)

Country Link
CN (1) CN108510638B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109345685A (en) * 2018-11-09 2019-02-15 威海华菱光电股份有限公司 Paper product discrimination method and device and storage medium
CN113255674B (en) * 2020-09-14 2024-09-03 深圳怡化时代智能自动化系统有限公司 Character recognition method, character recognition device, electronic equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000163626A (en) * 1998-11-25 2000-06-16 Printing Bureau Ministry Of Finance Japan Printed matter and method and device for discriminating its authenticity
JP2001344632A (en) * 2000-06-02 2001-12-14 Fuji Electric Co Ltd Boundary line detecting method of paper sheets and feature value extracting method of the same
JP2007079792A (en) * 2005-09-13 2007-03-29 Toshiba Corp Paper sheet processor and header card used therefor
CN101727696A (en) * 2008-10-23 2010-06-09 光荣株式会社 Method and apparatus for determining authenticity
CN101933052A (en) * 2008-01-31 2010-12-29 环球娱乐株式会社 Paper sheet identifying device and paper sheet identifying method
CN105261108A (en) * 2015-10-15 2016-01-20 深圳怡化电脑股份有限公司 Method and system for identifying currency value of RMB banknote

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000163626A (en) * 1998-11-25 2000-06-16 Printing Bureau Ministry Of Finance Japan Printed matter and method and device for discriminating its authenticity
JP2001344632A (en) * 2000-06-02 2001-12-14 Fuji Electric Co Ltd Boundary line detecting method of paper sheets and feature value extracting method of the same
JP2007079792A (en) * 2005-09-13 2007-03-29 Toshiba Corp Paper sheet processor and header card used therefor
CN101933052A (en) * 2008-01-31 2010-12-29 环球娱乐株式会社 Paper sheet identifying device and paper sheet identifying method
CN101727696A (en) * 2008-10-23 2010-06-09 光荣株式会社 Method and apparatus for determining authenticity
CN105261108A (en) * 2015-10-15 2016-01-20 深圳怡化电脑股份有限公司 Method and system for identifying currency value of RMB banknote

Also Published As

Publication number Publication date
CN108510638A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN106952393B (en) Paper money identification method and device, electronic equipment and storage medium
CN107103683B (en) Paper money identification method and device, electronic equipment and storage medium
RU2708422C1 (en) Atm management system and method
CN107610322B (en) Banknote version identification method and device, electronic equipment and storage medium
CN104992496A (en) Paper money face identification method and apparatus
JP5616958B2 (en) Method for banknote detector device and banknote detector device
CN107610316B (en) Method and device for detecting defect of paper money and terminal equipment
CN106920318B (en) Method and device for identifying paper money
CN106780966B (en) A kind of paper money discrimination method and device
CN106898078B (en) Port currency version identification method and device
CN108510638B (en) Paper money identification method and device
CN106469483A (en) A kind of method and device of paper money recognition
CN106683261B (en) A kind of false distinguishing method and apparatus of bank note
CN106600812B (en) Paper money identification method and device
CN104537364A (en) Dollar bill denomination and edition identifying method based on texture analysis
CN108711213B (en) Method and device for identifying black and white blocks of paper money zebra stripes
CN107680246B (en) Method and equipment for positioning curve boundary in paper money pattern
CN106780962B (en) A kind of method and device of paper money discrimination
CN105096446A (en) Method and system for identifying and authenticating optically variable ink on banknotes with folding corners
CN109543554B (en) Bill detection method, device, terminal and computer readable storage medium
CN106296975A (en) The recognition methods of a kind of dollar bill face amount and device
CN111563845A (en) Bill surface scratch detection method, device, equipment and storage medium
CN106652168B (en) Method and device for identifying currency value of paper money
CN108074322B (en) Image identification method and device
CN108629886B (en) Method and device for detecting stain grade of paper money

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