CN107680245B - paper money image processing method, paper money image processing device and electronic equipment - Google Patents
paper money image processing method, paper money image processing device and electronic equipment Download PDFInfo
- Publication number
- CN107680245B CN107680245B CN201710891098.8A CN201710891098A CN107680245B CN 107680245 B CN107680245 B CN 107680245B CN 201710891098 A CN201710891098 A CN 201710891098A CN 107680245 B CN107680245 B CN 107680245B
- Authority
- CN
- China
- Prior art keywords
- image
- counterfeit
- paper money
- lines
- preset
- 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
Links
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07D—HANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
- G07D7/00—Testing 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/20—Testing patterns thereon
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Inspection Of Paper Currency And Valuable Securities (AREA)
Abstract
the invention discloses a banknote image processing method, a banknote image processing device, electronic equipment and a computer readable storage medium, wherein the banknote image processing method comprises the following steps: before carrying out paper currency discrimination on paper currency, acquiring an image of the paper currency; detecting whether the image has lines or not; if the image has the lines, the counterfeit identifying condition of the counterfeit paper money identification is relaxed, so that the counterfeit paper money is identified based on the relaxed counterfeit identifying condition. The scheme of the invention can reduce the influence of the lines on the counterfeit paper money identification operation and improve the accuracy of the counterfeit paper money identification.
Description
Technical Field
The present invention relates to image processing technologies, and in particular, to a banknote image processing method, a banknote image processing apparatus, an electronic device, and a computer-readable storage medium.
background
however, in order to make profit, lawbreakers have made counterfeit or altered banknotes (collectively referred to as abnormal banknotes) for use and circulation in the market, and these abnormal banknotes destroy the principle of social credit and interfere with the normal order of currency circulation. If abnormal paper money is overflowed, the national economy is unstable, and even the social crisis of the economic society is caused. Therefore, in order to maintain the financial order of society and prevent abnormal paper money from being circulated in the market, the anti-counterfeit characteristics of paper money in various countries are continuously improved, and the technology for identifying counterfeit paper money is also continuously improved.
among them, image processing techniques are widely used in the detection of banknotes. After the image sensor obtains the image of the paper currency, the paper currency identification device carries out identification operation on the paper currency according to the image of the paper currency. However, if the image sensor fails, a parallel line will appear in the obtained image, and in severe cases, the accuracy of the counterfeit identification of the following paper money will be affected.
disclosure of Invention
In view of the above, the present invention provides a banknote image processing method, a banknote image processing apparatus, an electronic device and a computer readable storage medium, which are intended to reduce the influence of texture on the banknote counterfeit detection operation and improve the accuracy of banknote counterfeit detection.
A first aspect of the present invention provides a banknote image processing method including:
Before carrying out paper currency discrimination on paper currency, acquiring an image of the paper currency;
Detecting whether the image has lines or not;
if the image has the lines, the counterfeit identifying condition of the counterfeit paper money identification is relaxed, so that the counterfeit paper money is identified based on the relaxed counterfeit identifying condition.
A second aspect of the present invention provides a banknote image processing apparatus including:
The acquiring unit is used for acquiring an image of the paper currency before the paper currency is identified;
The detection unit is used for detecting whether the image has the lines or not;
and the processing unit is used for relaxing the counterfeit identification condition of counterfeit paper money identification when the image has the lines so as to identify the counterfeit paper money based on the relaxed counterfeit identification condition.
A third aspect of the present invention provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
a fourth aspect of the invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect.
as can be seen from the above, according to the embodiment of the present invention, before counterfeit paper money identification is performed on paper money, an image of the paper money is obtained, whether a line exists in the image is detected, and if the line exists in the image, the counterfeit identification condition for counterfeit paper money identification is relaxed, so that the paper money is identified based on the relaxed counterfeit identification condition. The method can dynamically adjust the counterfeit distinguishing condition according to the image quality of the obtained paper money image, so that when the image has lines, the influence of the lines on the counterfeit distinguishing operation of the paper money is reduced, and the counterfeit distinguishing accuracy of the paper money is improved.
drawings
in order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart of a banknote image processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a specific implementation of step S102 of a banknote image processing method according to an embodiment of the present invention;
fig. 3(a) is a schematic diagram of an anti-counterfeit feature region and a generic anti-counterfeit feature region of a banknote image with a texture in a banknote image processing method according to an embodiment of the present invention;
Fig. 3(b) is a schematic diagram of an anti-counterfeit feature region and a generic anti-counterfeit feature region of a banknote image without lines in the banknote image processing method according to the embodiment of the present invention;
FIG. 3(c) is a schematic diagram of a non-security feature region of a banknote image with a texture in the banknote image processing method according to the embodiment of the present invention;
Fig. 3(d) is a schematic diagram of a spliced non-anti-counterfeit feature region of a banknote image with a texture in the banknote image processing method according to the embodiment of the present invention;
FIG. 4 is a schematic diagram of another specific implementation flow of step S102 of the banknote image processing method according to the embodiment of the present invention;
FIG. 5 is a block diagram of a banknote image processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
in the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
in order to explain the technical means of the present invention, the following description will be given by way of specific examples.
example one
Fig. 1 shows an implementation flow of a banknote image processing method according to a first embodiment of the present invention, which is detailed as follows:
In step S101, before performing banknote authentication on a banknote, acquiring an image of the banknote;
in the embodiment of the invention, before the paper money is counterfeit-discriminated, the image of the paper money is acquired through the image sensor, and the image is preprocessed, so that the paper money counterfeit-discriminating device is prevented from obtaining an error counterfeit-discriminating result through counterfeit-discriminating the paper money on the image of the paper money in an area with obvious brightness difference. Since the shape of the banknote is rectangular, the image of the banknote obtained also appears rectangular.
In step S102, detecting whether there is a texture in the image;
In the embodiment of the present invention, it is detected whether there is a texture in the image obtained in step S101. In practice, even if the image of the banknote obtained by most image sensors is more or less somewhat textured, it is generally within tolerable or negligible limits. Therefore, whether the image has the lines which can influence the paper money counterfeit distinguishing operation or not can be detected firstly, and if the image has the lines which can influence the paper money counterfeit distinguishing operation, the subsequent processing is continued; if the image has no lines which can influence the counterfeit identification operation of the paper money, the subsequent processing is not needed, and the counterfeit identification operation of the paper money can be directly carried out according to the image.
in step S103, if the image has a texture, the counterfeit condition for counterfeit banknote identification is relaxed.
in the embodiment of the present invention, if there is a texture in the image, the counterfeit identification condition for counterfeit banknote identification is relaxed, for example, assuming that the ratio of the number of foreground dots to the number of background dots in a certain security feature region needs to be greater than Y1 after a binarization process is performed on the security feature region, when it is determined that there is a texture in the image, the counterfeit identification condition for counterfeit banknote identification is relaxed, and the ratio of the number of foreground dots to the number of background dots in the security feature region needs only to be greater than Y2, and Y2 is smaller than Y1. In this case, the banknotes may be authenticated based on the relaxed authentication condition. Further, if the image has the texture, a reminding instruction can be sent to a preset mailbox address to remind maintenance personnel to timely maintain the image sensor according to the reminding instruction.
Specifically, fig. 2 shows a specific implementation flow of the step S102, which is detailed as follows:
In step S201, a non-anti-counterfeiting feature area is located in a pre-set generic anti-counterfeiting feature area of the image;
In the embodiment of the invention, the anti-counterfeiting characteristic area of each batch of paper money can be changed according to different batches of the paper money printing factory. That is, the location of each security feature area is not fixed, but varies over a small range. Thus, for a specific security feature region (e.g., optically variable 100 region), a generic security feature region (e.g., optically variable 100 region) may be pre-set by a developer, the generic security feature region encompasses all possible locations of the particular security feature region, i.e. the specific security feature area of all banknotes to be authenticated must be located within the generic security feature area, and, obviously, the area of the generic anti-counterfeit feature region is inevitably larger than that of the anti-counterfeit feature region, and the generic anti-counterfeit feature region is not fixed, and the generic anti-counterfeit feature region set by a developer before the counterfeit paper money to be authenticated is authenticated on different electronic devices may be different, specifically, please refer to fig. 3(a) and 3(b), fig. 3(a) is a schematic diagram of a textured generic security feature region, and fig. 3(b) is a schematic diagram of a non-textured generic security feature region. It should be noted that the texture in fig. 3(a) is merely exemplary, and the texture of the image of the bill will be finer when the actual image sensor is abnormal. Further, the non-security feature region is a region of the generic security feature region other than the security feature region, and specifically, referring to fig. 3(c), the non-security feature region is a region of the generic security feature region that is above the security feature region and below the security feature region. Thus, only the upper and lower boundaries of the security feature area need be located to locate the non-security feature area. Specifically, the non-security feature areas may be located by:
Sequentially detecting the line gray level average value of each line in the general anti-counterfeiting characteristic area according to the sequence from top to bottom in the general anti-counterfeiting characteristic area;
If the average line gray level value detected by the continuous M lines is smaller than a preset line gray level threshold value and the M is larger than the preset line threshold value, respectively determining a first line and a last line in the M lines as an upper boundary and a lower boundary of the anti-counterfeiting feature area, wherein the M is a positive integer larger than 1;
In the generic security feature region, a region above the upper boundary and a region below the lower boundary are non-security feature regions.
in step S202, dividing the non-anti-counterfeit feature region into a preset number of image segments;
in the embodiment of the present invention, the non-anti-counterfeit feature region located in step S201 is divided into a preset number of image segments, where each image segment includes X rows of pixel points, and X is a positive integer greater than 1. Specifically, referring to fig. 3(d), in the general anti-counterfeiting feature region, other regions located above the anti-counterfeiting feature region and below the anti-counterfeiting feature may be spliced together to form a non-anti-counterfeiting feature region, and then divided into a preset number of image segments, where the divided image segments all include X rows of pixel points. If the spliced non-anti-counterfeiting characteristic area cannot be uniformly divided, the last image segment can be composed of more than X rows of pixel points.
In step S203, sequentially detecting whether each image segment is an image segment with a texture;
In an embodiment of the present invention, it is sequentially detected whether each image segment obtained by dividing in step S202 is an image segment with a texture, and specifically, the following may be expressed: calculating a second ratio of the average gray value of the darkest line to the average gray value of the brightest line in the image segments for each image segment; and if the second ratio is smaller than a preset second ratio threshold, determining the image section as an image section with grains. Alternatively, it can also be expressed as: and calculating the gray difference value of the average gray value of the brightest row and the average gray value of the darkest row in the image segments aiming at each image segment, and if the gray difference value is greater than a preset gray difference threshold value, determining that the image segment is the image segment with the texture. Wherein, the darkest line and the lightest line can be obtained by the following method: and calculating the gray level average value of each line in the image segment, wherein the brightest line is the line with the largest gray level average value in the image segment, and the darkest line is the line with the smallest gray level average value in the image segment. Because the image segment is divided from the non-anti-counterfeiting characteristic region, and the non-anti-counterfeiting characteristic region does not have anti-counterfeiting characteristics, if the image does not have lines, the gray level average value of the lines of the non-anti-counterfeiting characteristic region does not have great difference; similarly, the difference between the average gray scale value of the brightest line and the average gray scale value of the darkest line should be within a certain range. If the image has lines, the difference between the gray level average value of the brightest line and the gray level average value of the darkest line is necessarily larger; and quickly determining whether the image section has the texture or not by the second ratio or the gray difference value obtained by calculation according to the gray average value of the brightest line and the gray average value of the darkest line.
in step S204, if the number of the image segments with texture exceeds a preset number threshold, it is determined that texture exists in the image.
in the embodiment of the present invention, if the number of the image segments with the texture detected in step S204 exceeds the preset number threshold, it may be determined that the image has the texture. Specifically, the number threshold may be calculated according to the preset number in step S202, for example, the number threshold may be a value obtained by multiplying the preset number by a preset second coefficient B, where B is a decimal larger than 0 and smaller than 1; preferably, a may be set to 0.8.
Further, fig. 4 shows another specific implementation flow of the step S102, which is detailed as follows:
In step S401, in the pre-set generic anti-counterfeit feature region of the image, a non-anti-counterfeit feature region is located, and step S402 and step S404 are respectively executed;
in step S402, dividing the non-anti-counterfeit feature region into a preset number of image segments;
in step S403, sequentially detecting whether each image segment is an image segment with a texture;
In the embodiment of the present invention, the steps S401, S402, and S403 are the same as or similar to the steps S201, S202, and S203, respectively, and reference may be specifically made to the description of the steps S201, S202, and S203, which is not repeated herein.
In step S404, a first ratio of the average gray-scale value of the first N lines which are darkest and the average gray-scale value of the first N lines which are brightest in the non-anti-counterfeit feature region is calculated;
in the embodiment of the present invention, although the image may be preliminarily determined to have the texture in step S403, since each image segment is detected separately during the detection in step S403, the obtained preliminary detection result may not reflect the entire situation of the entire non-anti-counterfeit feature region accurately, and thus the preliminary detection result may still be incorrect; in order to reduce the possibility of false detection results during texture detection, the overall condition of the non-anti-counterfeiting feature region is detected, and a first ratio of the average gray value of the first darkest N rows and the average gray value of the first brightest N rows in the non-anti-counterfeiting feature region can be further calculated, wherein N is a positive integer greater than 1.
In step S405, if the number of the image segments with texture exceeds a preset number threshold, and the first ratio is smaller than a preset first ratio threshold, it is determined that texture exists in the image.
in the embodiment of the present invention, if the image passes not only the detection of step S403 but also the detection of step S404, it can be determined that the texture exists in the image.
of course, in step S404, a second gray-scale difference between the average gray-scale value of the brightest previous N rows and the average gray-scale value of the darkest previous N rows in the non-security feature region may also be calculated, and then step S405 may be: and if the number of the image sections with the grains exceeds a preset number threshold value and the second gray difference value is greater than a preset second gray difference value threshold value, determining that the grains exist in the image.
further, before determining that the image has a texture, the banknote image processing apparatus further includes:
Respectively detecting whether the number of dark rows in each image segment is greater than a preset dark row number threshold, wherein the average gray value of the dark rows in the image segment is less than the row with the preset row average gray value threshold;
Determining that the image has a texture, comprising:
And if the number of the image sections with the grains exceeds a preset number threshold, the first ratio is smaller than a preset first ratio threshold, and the number of the dark lines in each image section is larger than a preset dark line number threshold, determining that the grains exist in the image.
wherein, in order to obtain more accurate testing result, can also carry out simple detection to the light and shade line distribution of each image section. According to the number of dark lines in each image segment, whether the image has the texture can be determined more accurately by combining the specific implementation process of the step S102.
as can be seen from the above, according to the embodiment of the present invention, before the counterfeit paper money is identified, whether the obtained image of the paper money has the texture is detected, and if the image has the texture, the counterfeit identification condition for counterfeit paper money identification is relaxed, so that the paper money is identified based on the relaxed counterfeit identification condition. The invention can dynamically adjust the counterfeit distinguishing condition according to the image quality of the obtained paper money image, so that when the image has lines, the influence of the lines on the counterfeit distinguishing operation of the paper money is reduced, and the counterfeit distinguishing accuracy of the paper money is improved.
it should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
example two
fig. 5 is a block diagram showing a specific configuration of a banknote image processing apparatus according to an embodiment of the present invention, and only a part related to the embodiment of the present invention is shown for convenience of explanation. The banknote image processing apparatus 5 includes: an acquisition unit 51, a detection unit 52, a processing unit 53.
The acquiring unit 51 is used for acquiring an image of the paper currency before the paper currency is identified;
A detecting unit 52, configured to detect whether there is a grain in the image;
and a processing unit 53 for relaxing a counterfeit discriminating condition for discriminating the bill when the grain exists in the image, so as to discriminate the bill based on the relaxed counterfeit discriminating condition.
optionally, the detecting unit 52 includes:
A positioning subunit, configured to position a non-anti-counterfeiting feature region in a pre-set generic anti-counterfeiting feature region of the image, where the non-anti-counterfeiting feature region is a region other than the anti-counterfeiting feature region in the generic anti-counterfeiting feature region;
a dividing subunit, configured to divide the non-anti-counterfeiting feature area into a preset number of image segments, where each image segment includes X rows of pixel points, and X is a positive integer greater than 1;
the line detection subunit is used for sequentially detecting whether each image segment is an image segment with lines;
And the determining subunit is used for determining that the lines exist in the image when the number of the image segments with the lines exceeds a preset number threshold.
Optionally, the detecting unit 52 further includes:
the first ratio operator unit is used for calculating a first ratio of the average gray value of the darkest front N lines and the average gray value of the brightest front N lines in the non-anti-counterfeiting feature region;
The determining subunit is specifically configured to determine that the image has the texture if the number of the image segments having the texture exceeds a preset number threshold and the first ratio is smaller than a preset first ratio threshold.
optionally, the texture detecting subunit is specifically configured to, for each image segment, calculate a second ratio between an average gray value of a darkest row and an average gray value of a brightest row in the image segment, and determine that the image segment is an image segment with a texture if the second ratio is smaller than a preset second ratio threshold.
optionally, the texture detecting subunit is specifically configured to, for each image segment, calculate a grayscale difference between an average grayscale value of a brightest row and an average grayscale value of a darkest row in the image segment, and determine that the image segment is an image segment with a texture if the grayscale difference is greater than a preset grayscale difference threshold.
As can be seen from the above, according to the embodiment of the present invention, the banknote image processing apparatus detects whether a texture exists in an obtained image of a banknote before performing a counterfeit detection operation on the banknote, and if the texture exists, relaxes a counterfeit detection condition for counterfeit detection of the banknote, so as to perform counterfeit detection on the banknote based on the relaxed counterfeit detection condition. The invention can dynamically adjust the counterfeit distinguishing condition according to the image quality of the obtained paper money image, so that when the image has lines, the influence of the lines on the counterfeit distinguishing operation of the paper money is reduced, and the counterfeit distinguishing accuracy of the paper money is improved.
EXAMPLE III
Fig. 6 is a schematic diagram of an electronic device according to a third embodiment of the present invention. As shown in fig. 6, the electronic apparatus 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62, such as an application management program, stored in the memory 61 and operable on the processor 60. The processor 60 executes the computer program 62 to implement the steps in the various embodiments of the application management method, such as the steps S101 to S103 shown in fig. 1. Alternatively, the processor 60 implements the functions of the units in the device embodiments, such as the functions of the units 51 to 53 shown in fig. 5, when executing the computer program 62.
Illustratively, the computer program 62 may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the electronic device 6. For example, the computer program 62 may be divided into an acquisition unit, a detection unit, and a processing unit, and the specific functions of each unit are as follows:
The acquiring unit is used for acquiring an image of the paper currency before the paper currency is identified;
The detection unit is used for detecting whether the image has the lines or not;
and the processing unit is used for relaxing the counterfeit distinguishing condition of counterfeit paper money discrimination when the image has the lines so as to distinguish the paper money based on the relaxed counterfeit distinguishing condition.
The electronic device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The electronic device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of an electronic device 6, and does not constitute a limitation of the electronic device 6, and may include more or less components than those shown, or combine certain components, or different components, for example, the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
the memory 61 may be an internal storage unit of the electronic device 6, such as a hard disk or a memory of the electronic device 6. The memory 61 may be an external storage device of the electronic device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided in the electronic device 6. Further, the memory 61 may include both an internal storage unit and an external storage device of the electronic device 6. The memory 61 is used for storing the computer program and other programs and data required by the electronic device. The above-mentioned memory 61 may also be used to temporarily store data that has been output or is to be output.
As can be seen from the above, according to the embodiment of the present invention, before performing the counterfeit identification operation on the paper money, the electronic device detects whether the obtained image of the paper money has a texture, and if the image of the paper money has the texture, the counterfeit identification condition for counterfeit identification of the paper money is relaxed, so as to counterfeit the paper money based on the relaxed counterfeit identification condition. The invention can dynamically adjust the counterfeit distinguishing condition according to the image quality of the obtained paper money image, so that when the image has lines, the influence of the lines on the counterfeit distinguishing operation of the paper money is reduced, and the counterfeit distinguishing accuracy of the paper money is improved.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
in the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
in addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
the integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and can implement the steps of the embodiments of the method when the computer program is executed by a processor. . The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media excludes electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (8)
1. a banknote image processing method is characterized by comprising the following steps:
Before carrying out paper currency discrimination on paper currency, acquiring an image of the paper currency;
Detecting whether the image has lines or not;
If the image has the lines, relaxing the counterfeit distinguishing condition of counterfeit paper money discrimination so as to distinguish the counterfeit paper money based on the relaxed counterfeit distinguishing condition, and sending a reminding instruction to a preset mailbox address so as to remind a maintenance person to maintain the image sensor according to the reminding instruction;
Wherein, whether the detection has the line in the picture includes:
Positioning a non-anti-counterfeiting feature area in a preset universal anti-counterfeiting feature area of the image, wherein the non-anti-counterfeiting feature area is the area except the anti-counterfeiting feature area in the universal anti-counterfeiting feature area;
dividing the non-anti-counterfeiting characteristic area into a preset number of image segments, wherein each image segment comprises X rows of pixel points, and X is a positive integer greater than 1;
Sequentially detecting whether each image segment is an image segment with grains;
and if the number of the image sections with the grains exceeds a preset number threshold, determining that the grains exist in the image.
2. A banknote image processing method according to claim 1 wherein said determining the presence of a grain in said image further comprises:
Calculating a first ratio of the average gray value of the darkest previous N rows to the average gray value of the brightest previous N rows in the non-anti-counterfeiting feature area, wherein N is a positive integer greater than 1;
if the number of the image segments with the grains exceeds a preset number threshold, determining that the grains exist in the image, including:
and if the number of the image sections with the grains exceeds a preset number threshold value and the first ratio is smaller than a preset first ratio threshold value, determining that the grains exist in the image.
3. the banknote image processing method according to claim 1 or 2, wherein the sequentially detecting whether each image segment is an image segment with a texture comprises:
for each image segment, calculating a second ratio of the average gray value of the darkest row to the average gray value of the brightest row in the image segment;
And if the second ratio is smaller than a preset second ratio threshold, determining that the image section is an image section with grains.
4. the banknote image processing method according to claim 1 or 2, wherein the sequentially detecting whether each image segment is an image segment with a texture comprises:
Calculating the gray difference value of the average gray value of the brightest row and the average gray value of the darkest row in the image segments aiming at each image segment;
And if the gray difference value is larger than a preset gray difference value threshold value, determining the image section as an image section with grains.
5. a banknote image processing apparatus, comprising:
the acquiring unit is used for acquiring an image of the paper currency before the paper currency is identified;
the detection unit is used for detecting whether the image has the lines or not;
The processing unit is used for relaxing a counterfeit distinguishing condition of counterfeit paper money discrimination when the image has the lines so as to distinguish the counterfeit paper money based on the relaxed counterfeit distinguishing condition, and sending a reminding instruction to a preset mailbox address so as to remind a maintenance person to maintain the image sensor according to the reminding instruction;
The detection unit further includes:
The positioning subunit is used for positioning a non-anti-counterfeiting feature area in a preset generic anti-counterfeiting feature area of the image, wherein the non-anti-counterfeiting feature area is the other area except the anti-counterfeiting feature area in the generic anti-counterfeiting feature area;
The dividing subunit is used for dividing the non-anti-counterfeiting characteristic area into a preset number of image segments, wherein each image segment comprises X rows of pixel points, and X is a positive integer greater than 1;
The line detection subunit is used for sequentially detecting whether each image segment is an image segment with lines;
And the determining subunit is used for determining that the lines exist in the image when the number of the image segments with the lines exceeds a preset number threshold.
6. The banknote image processing apparatus according to claim 5, wherein the detection unit further comprises:
The first ratio operator unit is used for calculating a first ratio of the average gray value of the darkest front N lines and the average gray value of the brightest front N lines in the non-anti-counterfeiting feature region;
the determining subunit is specifically configured to determine that the image has the texture if the number of the image segments having the texture exceeds a preset number threshold and the first ratio is smaller than a preset first ratio threshold.
7. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 4 are implemented when the computer program is executed by the processor.
8. a computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710891098.8A CN107680245B (en) | 2017-09-27 | 2017-09-27 | paper money image processing method, paper money image processing device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710891098.8A CN107680245B (en) | 2017-09-27 | 2017-09-27 | paper money image processing method, paper money image processing device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107680245A CN107680245A (en) | 2018-02-09 |
CN107680245B true CN107680245B (en) | 2019-12-10 |
Family
ID=61138440
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710891098.8A Active CN107680245B (en) | 2017-09-27 | 2017-09-27 | paper money image processing method, paper money image processing device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107680245B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110599665B (en) * | 2018-06-13 | 2021-08-24 | 深圳兆日科技股份有限公司 | Paper pattern recognition method and device, computer equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104751559A (en) * | 2015-03-25 | 2015-07-01 | 深圳怡化电脑股份有限公司 | Money detector and money detecting method |
CN105243731A (en) * | 2015-09-17 | 2016-01-13 | 华中科技大学 | Spectrum-adaptive multinational paper money image recognition device, system and method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0981824A (en) * | 1995-09-20 | 1997-03-28 | Fuji Electric Co Ltd | Method for identifying paper money |
JP6282040B2 (en) * | 2013-03-25 | 2018-02-21 | 株式会社高見沢サイバネティックス | Paper sheet discrimination device and paper sheet discrimination method |
-
2017
- 2017-09-27 CN CN201710891098.8A patent/CN107680245B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104751559A (en) * | 2015-03-25 | 2015-07-01 | 深圳怡化电脑股份有限公司 | Money detector and money detecting method |
CN105243731A (en) * | 2015-09-17 | 2016-01-13 | 华中科技大学 | Spectrum-adaptive multinational paper money image recognition device, system and method |
Non-Patent Citations (2)
Title |
---|
基于多光谱图像的纸币防伪鉴定技术研究;蒋天瑜;《中国优秀硕士学位论文全文数据库》;20140615;9-47 * |
纸币非接触成像计数系统算法研究;刘燕燕;《中国优秀硕士学位论文全文数据库》;20090515;4-55 * |
Also Published As
Publication number | Publication date |
---|---|
CN107680245A (en) | 2018-02-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110473242B (en) | Texture feature extraction method, texture feature extraction device and terminal equipment | |
CN107103683B (en) | Paper money identification method and device, electronic equipment and storage medium | |
CN107331026B (en) | Paper money identification method and device | |
CN106952393B (en) | Paper money identification method and device, electronic equipment and storage medium | |
CN104992496A (en) | Paper money face identification method and apparatus | |
CN107767541B (en) | A kind of recognition methods of bank note, device, terminal device and storage medium | |
CN110490204B (en) | Image processing method, image processing device and terminal | |
CN107610316B (en) | Method and device for detecting defect of paper money and terminal equipment | |
CN112102402A (en) | Flash lamp light spot position identification method and device, electronic equipment and storage medium | |
CN105788064B (en) | Bill identification method and device | |
CN107038794B (en) | Method, device and equipment for identifying authenticity of paper money and storage medium | |
CN106920318B (en) | Method and device for identifying paper money | |
CN107492187A (en) | A kind of recognition methods, device, terminal device and storage medium for splicing paper money | |
CN109800745B (en) | Bill detection method, device, terminal and computer readable storage medium | |
CN108764225B (en) | Method and device for identifying transversely spliced paper money and electronic equipment | |
CN107680245B (en) | paper money image processing method, paper money image processing device and electronic equipment | |
CN112530079B (en) | Method, device, terminal equipment and storage medium for detecting bill factors | |
CN107895424B (en) | Paper money identification method and system and financial terminal | |
CN108711213B (en) | Method and device for identifying black and white blocks of paper money zebra stripes | |
CN109543554B (en) | Bill detection method, device, terminal and computer readable storage medium | |
CN107705414B (en) | A kind of recognition methods of bank note, device, terminal device and storage medium | |
US20230036391A1 (en) | Hologram detection service providing server and hologram detection method | |
CN108537945B (en) | Bill watermark detection method and system and self-service equipment | |
CN114998282B (en) | Image detection method, device, electronic equipment and storage medium | |
CN108510638B (en) | Paper money identification method and device |
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 |