CN107705416B - 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 PDF

Info

Publication number
CN107705416B
CN107705416B CN201710812730.5A CN201710812730A CN107705416B CN 107705416 B CN107705416 B CN 107705416B CN 201710812730 A CN201710812730 A CN 201710812730A CN 107705416 B CN107705416 B CN 107705416B
Authority
CN
China
Prior art keywords
image
point
area
processed
boundary
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
CN201710812730.5A
Other languages
Chinese (zh)
Other versions
CN107705416A (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 CN201710812730.5A priority Critical patent/CN107705416B/en
Publication of CN107705416A publication Critical patent/CN107705416A/en
Application granted granted Critical
Publication of CN107705416B publication Critical patent/CN107705416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/2008Testing patterns thereon using pre-processing, e.g. de-blurring, averaging, normalisation or rotation
    • 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/202Testing patterns thereon using pattern matching
    • G07D7/2041Matching statistical distributions, e.g. of particle sizes orientations

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (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; locating the bright-dark boundary of the image; dividing the image into a first area and a second area according to the bright-dark boundary; respectively carrying out image processing on the first area and the second area so as to enable the brightness of the processed first area and the brightness of the processed second area to be consistent; and splicing the processed first area and the processed second area to form a processed image of the paper currency so as to identify the paper currency based on the processed image of the paper currency. The scheme of the invention can eliminate the influence of the bright and dark boundary line on the counterfeit paper money identification operation, and improve the accuracy of the subsequent counterfeit paper money identification.

Description

paper money image processing method, paper money image processing device and electronic equipment
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
the paper money is a value symbol which is issued by the nation or the region and is forcibly used, however, counterfeited or altered paper money is manufactured by lawless persons for profit making and is used and circulated in the market, and the abnormal paper money breaks the principle of social credit and interferes 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. However, due to poor consistency between different channels of the image sensor, the image of the banknote obtained by the image sensor has a significant brightness difference, which may cause a stripe to be formed, i.e. the image is brighter on one side of the stripe and dimmer on the other side of the stripe, and if the stripe happens to appear on the security feature of the banknote, the subsequent counterfeit identification operation on the banknote may easily obtain a false counterfeit identification result.
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 used to eliminate the effect of stripes on the banknote counterfeit discriminating operation and improve the accuracy of banknote counterfeit discrimination.
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;
locating the bright-dark boundary of the image;
Dividing the image into a first area and a second area according to the bright-dark boundary;
respectively carrying out image processing on the first area and the second area so as to enable the brightness of the processed first area and the brightness of the processed second area to be consistent;
and splicing the processed first area and the processed second area to form a processed image of the paper currency so as to identify the paper currency based on the processed image of the paper currency.
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;
a positioning unit for positioning a bright-dark boundary of the image;
A dividing unit configured to divide the image into a first region and a second region according to the boundary between light and dark;
the processing unit is used for respectively carrying out image processing on the first area and the second area so as to enable the brightness of the processed first area and the brightness of the processed second area to be consistent;
and the splicing unit is used for splicing the processed first area and the processed second area to form a processed image of the paper currency so as to identify the paper currency based on the processed image of the paper currency.
a third aspect of the invention provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method as provided in the first aspect above 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, carries out the steps of the method as provided in the first aspect above.
as can be seen from the above, according to the scheme of the present invention, before counterfeit banknote identification is performed on banknotes, an image of the banknotes is obtained, a light and dark boundary of the image is located, the image is divided into a first region and a second region according to the light and dark boundary, then the first region and the second region are respectively subjected to image processing, so that the luminance of the processed first region and the luminance of the processed second region are consistent, and finally the processed first region and the processed second region are spliced to form a processed image of the banknotes, so that the banknotes are identified based on the processed image of the banknotes. According to the scheme, the paper money image is cut according to the bright-dark boundary line appearing in the paper money image, the cut images are respectively subjected to image processing to eliminate the bright-dark difference, and finally the processed images are spliced to eliminate the influence of the bright-dark difference between areas on the subsequent paper money counterfeit identification operation and improve the accuracy of the subsequent paper money counterfeit identification.
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 diagram of a banknote image with a boundary between light and dark regions according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a banknote image processing method according to an embodiment of the present invention;
FIG. 3 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. 4(a) is a schematic diagram of a preset coordinate system constructed in the banknote image processing method according to the embodiment of the present invention;
FIG. 4(b) is a schematic diagram of a target line in a banknote image processing method according to an embodiment of the present invention;
FIG. 4(c) is another schematic diagram of a target line in the banknote image processing method according to the embodiment of the 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.
first, a brief description is given of an image of a banknote with a bright-dark boundary obtained by a conventional image sensor, referring to fig. 1, it should be noted that a plurality of anti-counterfeit features actually exist in the image of the banknote, and are not shown one by one here. It can be seen that in fig. 1, the left area of the boundary is significantly darker than the right area of the boundary, and when the image is processed, the image is usually processed with uniform image processing parameters, for example, when the image is binarized, each point on the image is binarized with a uniform binarization threshold. If the light and dark boundary line just passes through one anti-counterfeiting feature on the image, and the banknote is supposed to be actually normal banknote, when the image is processed through a unified binary threshold value, the anti-counterfeiting mark on one side of the boundary line cannot be accurately identified, so that the counterfeit banknote identification result is wrong, and the normal banknote is likely to be judged as abnormal banknote because one part of the anti-counterfeiting mark passed through by the light and dark boundary line cannot be identified.
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. 2 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 S201, 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 S202, a boundary between light and dark in the image is located;
In the embodiment of the present invention, the boundary between light and dark in the image obtained in step S201 is located. In fact, even if there is a problem of poor consistency between different channels of the image sensor, not all images of the paper money obtained by the image sensor will have a region with obvious brightness difference; even if there is a problem of uniformity between the channels of most image sensors, the difference in brightness of the image of the banknote obtained by them is generally within a tolerable or negligible range. Therefore, it is possible to try to locate the boundary between light and shade of the image, and if the location is successful, that is, if there is an obvious light and shade difference region in the image, the subsequent processing is continued; if the positioning is not successful, namely, if the image has no obvious difference of light and shade areas, the subsequent processing is not needed, and the image can be directly transmitted to the paper currency counterfeit identifying device for counterfeit identification.
In step S203, dividing the image into a first region and a second region according to the boundary between light and dark;
in the embodiment of the present invention, if the boundary is located in step S202, in order to avoid processing the image by using uniform image processing parameters, the image may be divided into a first region and a second region according to the boundary.
In step S204, image processing is performed on each of the first region and the second region;
In the embodiment of the present invention, the image processing may be performed on the first region and the second region obtained by dividing in step S203, wherein when the image processing is performed on the first region and the second region, the image processing means used are the same and the image processing parameters are not the same, so that the luminance of the processed first region and the luminance of the processed second region are the same. Specifically, the first region is binarized based on a preset first binarization threshold, and the second region is binarized based on a preset second binarization threshold, where the first binarization threshold is different from the second binarization threshold, the first binarization threshold is obtained according to a gray value distribution of the first region and a preset algorithm, the second binarization threshold is obtained according to a gray value distribution of the second region and a preset algorithm, and the preset algorithm may be a percentage algorithm or an algorithm.
in step S205, the processed first region and the processed second region are merged to form a processed image of the banknote.
In the embodiment of the present invention, the brightness of the first region and the second region is kept consistent through step S204, that is, the first region and the second region no longer have a distinct bright-dark difference region. The processed first region and the processed second region can be spliced to form a processed image of the paper currency, and the paper currency counterfeit discriminating device can discriminate the paper currency based on the processed image of the paper currency because the processed image has no obvious difference between light and dark regions.
specifically, fig. 3 shows a specific implementation flow of the step S102, which is detailed as follows:
in step S301, based on a preset coordinate system, selecting a line with a vertical coordinate i in the image as a current target line;
In the embodiment of the present invention, in order to realize the positioning of the boundary between light and dark lines, a line with a vertical coordinate i in the image may be selected as a current target line based on a preset coordinate system, wherein an origin of the coordinate system is any vertex of the image of the banknote, a direction from the origin to another vertex on the same long side as the origin is a positive direction of a horizontal axis of the coordinate system, and a direction from the origin to another vertex on the same wide side as the origin is a positive direction of a vertical axis of the coordinate system. Referring to fig. 4(a), fig. 4(a) is an example of a preset coordinate system, where the preset coordinate system is established with a vertex a at a lower left corner of an image as an origin, the vertex a from the lower left corner to the vertex B at the lower right corner are positive directions of a horizontal axis, the vertex a from the lower left corner to the vertex D at the upper left corner are positive directions of a vertical axis, and a line with a vertical coordinate i in the image is selected as a current target line;
In step S302, points with abscissa from n +1 to m-n in the current target row are sequentially selected as target points;
in the embodiment of the present invention, traversing each point with abscissa n +1 to m-n in the target row as the target point may be a sequential traversal, where m is the number of points in the current target row, i.e., the number of columns of the current image, and n is greater than 1 and less than m/2.
in step S303, for each selected target point, obtaining a first average value of the gray values of the first n points of the target point in the current target row;
In the embodiment of the present invention, referring to fig. 4(b), fig. 4(b) is an exemplary diagram of a current target row (i.e. a target row with ordinate i), where each cell is a point of the current target row. It should be noted that, in order to make the display of fig. 4(b) clear, the gray-scale values of the respective points in the current target row cannot be displayed. The abscissa of the first n points of the target points is j-n, j-n +1, … …, j-1; j is the abscissa of the target point, and is shown in bold in fig. 4 (b); the abscissa of each of the above points is shown in each of the squares in fig. 4 (b).
In step S304, a second average value of the gray values of the last n points of the target point in the current target row is obtained;
In the embodiment of the present invention, referring to fig. 4(b), the abscissa of the last n points of the target points are j +1, j +2, … …, j + n, respectively.
in step S305, calculating a gray scale difference between the first average value and the second average value;
in the embodiment of the present invention, referring to fig. 4(b), it can be seen that the first average value and the second average value can be calculated according to the gray-level values of the points included in the dashed square frame region of fig. 4(b), respectively.
in step S306, finding out a target point in the current target row with the largest gray scale difference as a first boundary line point;
In the embodiment of the present invention, since the points with the abscissa of n +1 to m-n in the current target row are sequentially selected as the target points in step 302, the target point with the largest gray scale difference in the current target row can be found out as the first boundary point from the points with the abscissa of n +1 to m-n, that is, the target point with the largest gray scale difference is considered to be located on the light and shade boundary line, it should be noted that the largest gray scale difference should be greater than the preset gray scale difference threshold, and it can be determined that there is an obvious light and shade difference area currently, that is, only when the largest gray scale difference is greater than the preset gray scale difference threshold, the target point with the largest gray scale difference is taken as the first boundary point.
In step S307, the current target line is updated to a line with a vertical coordinate of k in the image, and the steps of sequentially selecting points with horizontal coordinates of n +1 to m-n in the current target line as target points and the subsequent steps are returned to be executed to find out the target point with the largest gray scale difference value in the current target line as a second boundary line point;
In the embodiment of the present invention, after the first boundary line point is determined, a second boundary point needs to be further determined, so that another line needs to be selected as the current target line, where a vertical coordinate of the another line is k, and the above step S302 and subsequent steps are performed again, where i and k are not equal, and i and k are not greater than the total number of lines in the image.
in step S308, the light and dark boundary line of the image is determined based on the first boundary line point and the second boundary line point.
In an embodiment of the invention, the first boundary line point and the second boundary line point may be fitted to the light and dark boundary line of the image based on a preset fitting algorithm, and the fitting algorithm is set by a developer, which is not limited herein. The concrete can be represented as follows: and connecting the first boundary line point and the second boundary line point, and extending the connection line to two ends until the connection line intersects with the edge of the image, wherein the extension line of the connection line of the first boundary line and the second boundary line is the light and dark boundary line of the image.
Alternatively, when acquiring the first average value of the gray scale values of the n points before/after the target point, in order to eliminate noise interference on a single line, the gray scale values of the n points before/after the target point at corresponding positions in a row before the current target row and the gray scale values of the n points before/after the target point at corresponding positions in a row after the current target row may be acquired at the same time, that is, not only the first average value and the second average value are obtained from the current target row, but also the obtained vertical coordinate of the n points before/after the target point is no longer limited to the vertical coordinate i (or k) of the target row, but may be i, i-1, i +1 (or k, k-1, k + 1). For better understanding, referring to fig. 4(c), the first average value and the second average value may be calculated according to the gray-level values of the points included in the dashed square frame region of fig. 4 (c).
Therefore, according to the embodiment of the invention, the image to be processed is cut according to the bright-dark boundary line appearing in the paper money image, the cut image is respectively subjected to image processing, the brightness of the processed image is kept consistent, and finally the processed image is spliced, so that the influence of the bright-dark difference between areas on the subsequent paper money counterfeit identification operation can be eliminated, and the accuracy of the subsequent paper money counterfeit identification 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: the device comprises an acquisition unit 51, a positioning unit 52, a dividing unit 53, a processing unit 54 and a splicing unit 55.
the acquiring unit 51 is used for acquiring an image of the paper currency before the paper currency is identified;
A positioning unit 52 for positioning the boundary between light and dark in the image;
A dividing unit 53 configured to divide the image into a first region and a second region according to the boundary between light and dark;
a processing unit 54 for performing image processing on the first region and the second region so that the luminance of the processed first region and the luminance of the processed second region are the same;
and a splicing unit 55 for splicing the processed first region and the processed second region to form a processed image of the bill so as to discriminate the bill based on the processed image of the bill.
Optionally, the positioning unit 52 includes:
a target line selection subunit, configured to select, as a current target line, a line in the image with a vertical coordinate i based on a preset coordinate system, where an origin of the coordinate system is any vertex of the image of the banknote, a direction from the origin to another vertex on the same long side as the origin is a positive direction of a horizontal axis of the coordinate system, and a direction from the origin to another vertex on the same wide side as the origin is a positive direction of a vertical axis of the coordinate system;
The target point selecting subunit is used for sequentially selecting points with abscissa from n +1 to m-n in the current target row as target points, wherein m is the number of the points in the current target row, and n is greater than 1 and less than m/2;
the first average value calculating subunit is used for acquiring, for each selected target point, a first average value of the gray values of the first n points of the target point in the current target row;
a second average value calculating subunit, configured to obtain a second average value of the grayscale values of the last n points of the target point in the current target row;
a gray difference value calculating subunit, configured to calculate a gray difference value between the first average value and the second average value;
A boundary point searching subunit, configured to search a target point in the current target row with the largest gray scale difference as a first boundary point;
a target line updating subunit, configured to update the current target line to a line with a vertical coordinate of k in the image, and trigger the target point selecting subunit to operate, so as to find a target point with a largest gray difference value in the current target line as a second boundary line point, where i is not equal to k, and i and k are not greater than the total line number of the image;
A boundary line determining subunit, configured to determine a bright-dark boundary line of the image based on the first boundary line point and the second boundary line point.
Optionally, the boundary line determining subunit is specifically configured to fit the first boundary line point and the second boundary line point to a bright-dark boundary line of the image based on a preset fitting algorithm.
optionally, the processing unit 54 includes:
A first processing subunit, configured to binarize the first area based on a preset first binarization threshold;
And a second processing subunit, configured to binarize the second area based on a preset second binarization threshold, where the first binarization threshold is different from the second binarization threshold.
Therefore, according to the embodiment of the invention, the paper money image processing device can cut the image to be processed according to the light and shade boundary line appearing in the paper money image, respectively perform image processing on the cut image, so that the brightness of the processed image is kept consistent, and finally, the processed image is spliced, so that the influence of the light and shade difference between areas on the subsequent paper money counterfeit identification operation can be eliminated, and the accuracy of the subsequent paper money counterfeit identification is improved.
EXAMPLE III
Fig. 6 is a schematic diagram of an electronic device according to an 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 embodiments of the application management method, such as the steps S201 to S205 shown in fig. 2. Alternatively, the processor 60 implements the functions of the units in the device embodiments, such as the functions of the units 51 to 55 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 positioning unit, a dividing unit, a processing unit, and a splicing unit. 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;
A positioning unit for positioning a bright-dark boundary of the image;
a dividing unit configured to divide the image into a first region and a second region according to the boundary between light and dark;
a processing unit configured to perform image processing on the first region and the second region, respectively, so that the luminance of the processed first region and the luminance of the processed second region are the same;
And a splicing unit for splicing the processed first region and the processed second region to form a processed image of the bill so as to discriminate the bill based on the processed image of the bill.
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.
Therefore, according to the embodiment of the invention, the electronic equipment can cut the image to be processed according to the bright-dark boundary line appearing in the paper money image, respectively perform image processing on the cut image, so that the brightness of the processed image is kept consistent, and finally, the processed images are spliced, so that the influence of the bright-dark difference between areas on the subsequent paper money counterfeit identification operation can be eliminated, and the accuracy of the subsequent paper money counterfeit identification 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;
locating the bright-dark boundary of the image;
dividing the image into a first area and a second area according to the bright-dark boundary;
Respectively carrying out image processing on the first area and the second area so as to enable the brightness of the processed first area and the brightness of the processed second area to be consistent;
splicing the processed first area and the processed second area to form a processed image of the paper currency so as to identify the paper currency based on the processed image of the paper currency;
Wherein said locating a boundary between light and dark of said image comprises:
selecting a line with a vertical coordinate i in the image as a current target line based on a preset coordinate system, wherein an original point of the coordinate system is any vertex of the image of the paper money, the direction from the original point to another vertex which is on the same long side with the original point is the positive direction of a horizontal axis of the coordinate system, and the direction from the original point to another vertex which is on the same wide side with the original point is the positive direction of a vertical axis of the coordinate system;
sequentially selecting points with the abscissa from n +1 to m-n in the current target row as target points, wherein m is the number of the points in the current target row, and n is more than 1 and less than m/2;
aiming at each selected target point, acquiring a first average value of gray values of the first n points of the target point in the current target row;
Acquiring a second average value of the gray values of the last n points of the target point in the current target row;
calculating the gray difference value of the first average value and the second average value;
finding out a target point with the maximum gray difference value in the current target row as a first boundary line point;
updating the current target row to a row with the ordinate of k in the image, returning to execute the step of sequentially selecting the points with the abscissa of n +1 to m-n in the current target row as target points and the subsequent steps so as to find out the target point with the maximum gray difference value in the current target row as a second boundary line point, wherein i is not equal to k, and i is not greater than the total row number of the image;
Determining a boundary between light and dark lines of the image based on the first boundary point and the second boundary point.
2. the banknote image processing method according to claim 1, wherein the determining of the boundary between light and dark of the image based on the first boundary point and the second boundary point comprises:
and fitting the first boundary line point and the second boundary line point into a light and dark boundary line of the image based on a preset fitting algorithm.
3. The banknote image processing method according to any one of claims 1 to 2, wherein the performing image processing on the first region and the second region, respectively, comprises:
Carrying out binarization on the first area based on a preset first binarization threshold value;
And binarizing the second area based on a preset second binarization threshold, wherein the first binarization threshold is different from the second binarization threshold.
4. 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;
A positioning unit for positioning a bright-dark boundary of the image;
A dividing unit configured to divide the image into a first region and a second region according to the boundary between light and dark;
the processing unit is used for respectively carrying out image processing on the first area and the second area so as to enable the brightness of the processed first area and the brightness of the processed second area to be consistent;
The splicing unit is used for splicing the processed first area and the processed second area to form a processed image of the paper currency so as to identify the paper currency based on the processed image of the paper currency;
the positioning unit includes:
The target line selection subunit is used for selecting one line with a vertical coordinate i in the image as a current target line based on a preset coordinate system, wherein an origin of the coordinate system is any vertex of the image of the paper money, a direction from the origin to another vertex which is on the same long side with the origin is a positive direction of a horizontal axis of the coordinate system, and a direction from the origin to another vertex which is on the same wide side with the origin is a positive direction of a vertical axis of the coordinate system;
the target point selecting subunit is used for sequentially selecting points with abscissa from n +1 to m-n in the current target row as target points, wherein m is the number of the points in the current target row, and n is greater than 1 and less than m/2;
the first average value calculating subunit is used for acquiring a first average value of the gray values of the first n points of the target point in the current target row aiming at each selected target point;
The second average value calculating subunit is configured to obtain a second average value of the grayscale values of the last n points of the target point in the current target row;
a gray difference value calculating subunit, configured to calculate a gray difference value between the first average value and the second average value;
a boundary point searching subunit, configured to search a target point in the current target row with the largest gray scale difference as a first boundary point;
A target line updating subunit, configured to update the current target line to a line with a vertical coordinate of k in the image, and trigger the target point selecting subunit to operate, so as to find a target point with a largest gray difference value in the current target line as a second boundary line point, where i is not equal to k, and i and k are not greater than the total line number of the image;
a boundary line determining subunit, configured to determine a light and dark boundary line of the image based on the first boundary line point and the second boundary line point.
5. a banknote image processing apparatus according to claim 4, wherein the interface determining subunit is in particular adapted to fit the first interface points and the second interface points to a light-dark interface of the image based on a preset fitting algorithm.
6. the banknote image processing apparatus according to any one of claims 4 to 5, wherein the processing unit includes:
A first processing subunit, configured to binarize the first area based on a preset first binarization threshold;
and the second processing subunit is configured to binarize the second area based on a preset second binarization threshold, where the first binarization threshold is different from the second binarization 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 3 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 3.
CN201710812730.5A 2017-09-11 2017-09-11 paper money image processing method, paper money image processing device and electronic equipment Active CN107705416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710812730.5A CN107705416B (en) 2017-09-11 2017-09-11 paper money image processing method, paper money image processing device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710812730.5A CN107705416B (en) 2017-09-11 2017-09-11 paper money image processing method, paper money image processing device and electronic equipment

Publications (2)

Publication Number Publication Date
CN107705416A CN107705416A (en) 2018-02-16
CN107705416B true CN107705416B (en) 2019-12-06

Family

ID=61172545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710812730.5A Active CN107705416B (en) 2017-09-11 2017-09-11 paper money image processing method, paper money image processing device and electronic equipment

Country Status (1)

Country Link
CN (1) CN107705416B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008152450A (en) * 2006-12-15 2008-07-03 Toshiba Corp Authenticating device for paper sheet and verifying method for paper sheet
CN102737435A (en) * 2011-04-11 2012-10-17 北京新岸线数字图像技术有限公司 Paper money discrimination method and device
CN104298989B (en) * 2014-08-20 2017-08-04 深圳大学 False distinguishing method and its system based on zebra stripes Infrared Image Features
CN105243731B (en) * 2015-09-17 2017-07-18 华中科技大学 A kind of multinational banknote image identifying device of spectrum self adaptation, system and method
CN105261108B (en) * 2015-10-15 2018-06-19 深圳怡化电脑股份有限公司 A kind of method and system of RMB value of money identification
CN106898084B (en) * 2017-03-21 2019-12-06 深圳怡化电脑股份有限公司 method and device for determining image processing threshold

Also Published As

Publication number Publication date
CN107705416A (en) 2018-02-16

Similar Documents

Publication Publication Date Title
CN107180479B (en) Bill identification method, device, equipment and storage medium
CN107169489B (en) Method and apparatus for tilt image correction
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
CN107492187B (en) A kind of recognition methods, device, terminal device and storage medium splicing paper money
US9679354B2 (en) Duplicate check image resolution
CN112102402B (en) Flash light spot position identification method and device, electronic equipment and storage medium
CN108091033B (en) Paper money identification method and device, terminal equipment and storage medium
CN109116129B (en) Terminal detection method, detection device, system and storage medium
CN107610316B (en) Method and device for detecting defect of paper money and terminal equipment
CN107331026B (en) Paper money identification method and device
CN109214229B (en) Bar code scanning method and device and electronic equipment
CN106920318B (en) Method and device for identifying paper money
CN107038794B (en) Method, device and equipment for identifying authenticity of paper money and storage medium
CN105788064B (en) Bill identification method and device
CN109389110B (en) Region determination method and device
CN114264669A (en) Screen damage defect detection method, device and equipment and readable storage medium
CN108764225B (en) Method and device for identifying transversely spliced paper money and electronic equipment
CN113435219B (en) Anti-counterfeiting detection method and device, electronic equipment and storage medium
CN107705414B (en) A kind of recognition methods of bank note, device, terminal device and storage medium
CN112530079B (en) Method, device, terminal equipment and storage medium for detecting bill factors
CN108268868B (en) Method and device for acquiring inclination value of identity card image, terminal and storage medium
CN117611569A (en) Vehicle fascia detection method, device, equipment and medium based on artificial intelligence
CN107705416B (en) paper money image processing method, paper money image processing device and electronic equipment
CN110428027B (en) Identification and counterfeit detection method, device, equipment and medium based on LCD (liquid crystal display) anti-counterfeit label

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