CN108629886B - Method and device for detecting stain grade of paper money - Google Patents
Method and device for detecting stain grade of paper money Download PDFInfo
- Publication number
- CN108629886B CN108629886B CN201710159886.8A CN201710159886A CN108629886B CN 108629886 B CN108629886 B CN 108629886B CN 201710159886 A CN201710159886 A CN 201710159886A CN 108629886 B CN108629886 B CN 108629886B
- Authority
- CN
- China
- Prior art keywords
- target
- sub
- region
- determining
- detection area
- 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
Images
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/181—Testing mechanical properties or condition, e.g. wear or tear
- G07D7/187—Detecting defacement or contamination, e.g. dirt
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
- G06T2207/20161—Level set
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Image Analysis (AREA)
- Inspection Of Paper Currency And Valuable Securities (AREA)
Abstract
The embodiment of the invention discloses a method and a device for detecting the contamination grade of paper money. The method comprises the following steps: acquiring at least one target detection area of the images of the front and back surfaces of the paper money to be detected; dividing each target detection area to obtain a detection subarea of each target detection area, and determining the fouling score of each target detection area according to the gray value characteristics of the detection subareas; and determining the soiling grade of the paper money to be detected according to the soiling score of the at least one target detection area. The method and the device for detecting the contamination level of the paper currency provided by the embodiment of the invention can achieve the effect of rapidly and accurately determining the contamination level of the paper currency.
Description
Technical Field
The embodiment of the invention relates to the technical field of paper currency recognition, in particular to a method and a device for detecting the contamination grade of paper currency.
Background
With the rapid development of socio-economy, the daily amount of cash transactions is rapidly increased, and the determination of the soiling level of the paper money is particularly important in the paper money discriminating process.
The level of soiling is an important criterion for determining the currency of a banknote. Common banknote soiling conditions include a signature or a number written on the banknote, but banknote banks of this type generally require that they are not circulated and therefore require accurate identification by the depositing and dispensing machine.
In the prior art, the detection of the contamination level of the paper currency is influenced by the stability of a sensor, image noise and the like, so that the accuracy of the contamination level detection of the paper currency is low, the algorithm is complex, the detection efficiency is low, and the technical problem which troubles researchers all the time is solved.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting the contamination level of paper money, which are used for achieving the effect of rapidly and accurately determining the contamination level of the paper money.
In a first aspect, an embodiment of the present invention provides a method for detecting a banknote contamination level, where the method includes:
acquiring at least one target detection area of the images of the front and back surfaces of the paper money to be detected;
dividing each target detection area to obtain a detection subarea of each target detection area, and determining the fouling score of each target detection area according to the gray value characteristics of the detection subareas;
and determining the soiling grade of the paper money to be detected according to the soiling score of the at least one target detection area.
Further, the acquiring of the at least one target detection area of the images of the front and back surfaces of the paper money to be detected includes:
carrying out statistical analysis on the probability of contamination in the detection area of the sample paper money;
determining the mapping relation between the detection level and the detection area according to the result of the statistical analysis;
and determining a target detection area corresponding to the current detection level according to the mapping relation.
Further, the determining the soiling grade of the banknote to be detected according to the soiling score of each of the target detection areas comprises:
and determining the contamination grade of the paper money to be detected according to the contamination score of each target detection area and the detection grade corresponding to the target detection area.
Further, the dividing each target detection area to obtain a detection sub-area of each target detection area, and determining the fouling score of each target detection area according to the gray-scale value characteristics of the detection sub-areas includes:
dividing the target detection area into a plurality of detector sub-areas;
counting the minimum value of the gray value of the detection sub-region, and determining the detection sub-region with the minimum value of the gray value smaller than a preset threshold value as a target sub-region;
determining whether the current target sub-region is a stained sub-region or not according to the number of pixel points of which the gray value in each target sub-region is smaller than the preset threshold;
and determining the fouling score of the current detection area according to the number of the pixel points with the gray values smaller than the preset threshold value in all the target sub-areas and the number of the fouling sub-areas.
Further, the determining whether the current target sub-region is a stained sub-region according to the number of the pixel points of which the gray value in each target sub-region is smaller than the preset threshold value includes:
counting the number of pixel points with the gray value smaller than the preset threshold value in each target sub-region;
corresponding each target subregion to a corresponding position in the image of the paper money to be detected, and judging whether the corresponding position contains a gray level mean value pattern;
if yes, determining that the target sub-region is a stained sub-region when the number of the pixel points of which the gray value in the target sub-region is smaller than the preset threshold is larger than a first stained threshold;
and if not, determining that the target sub-region is the stained sub-region when the number of the pixel points of which the gray value in the target sub-region is smaller than the preset threshold is larger than a second stained threshold.
In a second aspect, an embodiment of the present invention further provides an apparatus for detecting an insult level of a banknote, the apparatus including:
the target detection area acquisition module is used for acquiring at least one target detection area of the images of the front side and the back side of the paper money to be detected;
the fouling score determining module is used for dividing each target detection area to obtain a detection sub-area of each target detection area, and determining the fouling score of each target detection area according to the gray value characteristics of the detection sub-areas;
and the contamination grade determining module is used for determining the contamination grade of the paper money to be detected according to the contamination score of the at least one target detection area.
Further, the target detection area obtaining module includes:
the statistical analysis unit is used for performing statistical analysis on the probability of contamination of the detection area of the sample paper money;
the mapping relation establishing unit is used for determining the mapping relation between the detection level and the detection area according to the result of the statistical analysis;
and the target detection area determining unit is used for determining a target detection area corresponding to the current detection level according to the mapping relation.
Further, the fouling level determination module includes:
and the contamination grade determining unit is used for determining the contamination grade of the paper money to be detected according to the contamination score of each target detection area and the detection grade corresponding to the target detection area.
Further, the fouling score determination module includes:
the detection subarea segmentation unit is used for segmenting the target detection area into a plurality of detection subareas;
the target sub-region determining unit is used for counting the minimum value of the gray value of the detection sub-region and determining the detection sub-region with the minimum value of the gray value smaller than a preset threshold value as the target sub-region;
the stained subregion judging unit is used for determining whether the current target subregion is a stained subregion according to the number of the pixel points of which the gray value in each target subregion is smaller than the preset threshold;
and the fouling score determining unit is used for determining the fouling score of the current detection area according to the number of the pixel points with the gray values smaller than the preset threshold value in all the target sub-areas and the number of the fouling sub-areas.
Further, the stained sub-region determining unit includes:
the pixel point counting subunit is used for counting the number of pixel points with the gray value smaller than the preset threshold value in each target sub-region;
the pattern corresponding subunit is used for corresponding each target subregion to a corresponding position in the image of the paper money to be detected and judging whether the corresponding position contains a gray level mean value pattern or not;
the first judgment subunit is configured to determine that the target sub-region is a stained sub-region when the number of the pixel points in the target sub-region, of which the gray values are smaller than the preset threshold value, is larger than a first stained threshold value if the gray average pattern exists;
and the second judging subunit is configured to determine that the target sub-region is a stained sub-region when the number of the pixel points in the target sub-region, of which the gray value is smaller than the preset threshold value, is larger than a second stained threshold value without the gray-scale average pattern.
According to the embodiment of the invention, the at least one target detection area of the images of the front side and the back side of the paper money is obtained, and all the target detection areas are segmented to obtain the detection sub-areas, so that the stain fraction of the target detection area is obtained according to the gray value characteristics of the detection sub-areas, the stain grade of the paper money is further obtained, the problems of low stain grade detection accuracy and low detection speed in the prior art are solved, and the effect of quickly and accurately determining the stain grade of the paper money is realized.
Drawings
FIG. 1 is a flow chart of a method for detecting an insult level of a banknote according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for detecting the soiling level of a banknote according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a method for detecting the soiling level of a banknote according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a method for detecting an insult level of a banknote according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a banknote contamination level detection apparatus according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a method for detecting an contamination level of a banknote according to an embodiment of the present invention, where the embodiment is applicable to a case where a contamination level of a banknote is detected, and the method can be executed by an apparatus for detecting a contamination level of a banknote according to an embodiment of the present invention, where the apparatus can be implemented by software and/or hardware, and can be integrated into a cash transaction device.
As shown in fig. 1, the method for detecting the stain level of a bill includes:
s110, acquiring at least one target detection area of the images of the front and back surfaces of the paper money to be detected.
The images of the front and back surfaces of the paper money to be detected can be gray images obtained through scanning. The target detection region may be a region having a certain representative meaning, may be a region including a certain specific pattern or a specific position, or may be a region having a gray value within a certain threshold range. Since the detection result of the target detection area reflects the stain level of the entire banknote, an area corresponding to a position where stains are likely to occur may be preferable. For example, it may be a border area, a blank area, no pattern, or a lighter area.
The target detection area can be a rectangle with a regular shape, and can also be a circle, an ellipse and an irregular figure. The target area can be intercepted on the images of the front side and the back side of the paper money to be detected, or the target area can be preset, and only the target area of the paper money is scanned to obtain the image. The target detection area may be one or a plurality of target detection areas.
S120, dividing each target detection area to obtain a detection sub-area of each target detection area, and determining the fouling score of each target detection area according to the gray value characteristics of the detection sub-areas.
The target detection region may be divided equally, for example, the target detection region is a rectangle with 200 × 150 pixels, and may be divided into a plurality of equal detection sub-regions according to 40 × 30, or may be divided unequally, for example, the target detection region is a rectangle with 203 × 152 pixels, and it is difficult to divide the target detection region into a plurality of equal detection sub-regions, and a certain division rule may be set for the division.
Determining a stain score for each of the target detection zones based on the gray value characteristics of the detection sub-zones. The gray value feature may be an average value of gray values of all pixel points in the detection sub-area, and the gray value feature may also be the number of pixel points in the detection sub-area where the gray value is within a certain range, so that the stain score of each target detection area may be determined by using the average value of the gray values.
For example, when the target detection regions have 3 gray-scale values of 15, 17, and 225, respectively, the stain scores of the 3 target detection regions can be determined to be 90 points, and 10 points based on the average gray-scale values thereof. The judgment basis may be a score having a representative meaning obtained by a large number of experiments, for example, a score of 90 may indicate that the target detection region is stained, and a score of 10 may indicate that the target detection region is not stained.
And S130, determining the contamination grade of the paper money to be detected according to the contamination score of the at least one target detection area.
The insult rating can be defined manually or can be a signature of the insult of a banknote that is widely used in the industry.
In connection with the above example, the soiling level may be determined as the target detection area with soiling according to the number of target detection areas determined to have soiling, for example, the target detection level with a soiling score of 60 or more may be defined as the target detection area with soiling, and the soiling level of the banknote to be detected may be determined as 5 with soiling according to the number of target detection areas determined to have soiling, and accordingly, the soiling level may be five. Correspondingly, a higher rating indicates a more severe soiling of the bank notes to be detected.
The contamination score of the target detection area and the size of the current target detection area may be used as a basis for calculating the contamination level, and a larger target detection area may be assigned a higher weight, and a smaller target detection area may be assigned a lower weight. The size of the target detection area can be determined according to the number of pixel points in the target detection area.
According to the technical scheme of the embodiment, the detection sub-region is obtained by obtaining the at least one target detection region of the images of the front side and the back side of the paper money and segmenting all the target detection regions, so that the contamination fraction of the target detection region is obtained according to the characteristics of the detection sub-region, the contamination grade of the paper money is further obtained, the problems of low accuracy and low detection speed of contamination grade detection in the prior art are solved, and the effect of quickly and accurately determining the contamination grade of the paper money is achieved.
Example two
Fig. 2 is a flowchart of a method for detecting an insult level of a banknote according to a second embodiment of the present invention. The present embodiment is further optimized based on the above embodiments.
As shown in fig. 2, the method for detecting the stain level of a bill includes:
s210, carrying out statistical analysis on the probability of the contamination of the detection area of the sample paper currency.
The sample banknotes may be a certain number of banknotes, for example, 100 banknotes, and the sample banknotes may include contaminated banknotes and non-contaminated banknotes, wherein the contamination may include writing or stamp writing. The sample note may be the same version, same denomination note. If the versions are the same, the denominations are different, but the patterns and the patterns of the same version are all the same, and the patterns can be used as the sample value ratio of the same batch, and the paper money of the same version is the paper money issued by the same bank in the same year.
The detection area can be an area which is divided according to a fixed proportion, and preferably 15 detection areas can be divided for the front and back paper money of the paper money respectively, so that the size of the divided area is moderate, and if each detection area is stained, partial or all stained positions can be covered, so that statistics is facilitated.
The objective of the statistical analysis may be to determine the probability of an insult occurring in each of a number of banknotes in each detection zone, and then to number or order the probabilities of an insult occurring in each detection zone from high to low. After statistical analysis, the detection area with high contamination probability can be used as a priority detection object, so that the time spent on detecting the contamination condition of the paper money can be reduced, and the detection efficiency can be improved.
And S220, determining the mapping relation between the detection level and the detection area according to the result of the statistical analysis.
And determining the mapping relation between the detection level and each detection area according to the probability of contamination of each detection area of the paper money obtained by statistical analysis. For example, if a certain bank has a high tolerance for contamination of a banknote, its detection level may be set to level 1, while another bank has a low tolerance for contamination of a banknote, and any written word appearing on the banknote is not collected, and its detection level may be set to level 5. Different detection levels can be set by staff in relevant function modules of the cash transaction equipment, and after the setting is finished, when a user deposits and withdraws money, the cash transaction equipment detects the paper money at the set detection level. Preferably, the detection level can include 5 levels, and the detection level can be set by staff, and the advantage of this setting is that can adjust different detection levels as required, uses more flexibility.
The mapping relationship between the detection level and the detection area may be a one-to-one mapping or a one-to-many mapping. One detection level may correspond to a plurality of detection regions, or one detection region may correspond to a plurality of detection levels. In the mapping relationship, the detection region may be a sequence number that takes the height of the contamination probability as the rank number according to the statistical result, and when the detection region number is i, it indicates that the contamination probability of the region is the highest, and then the detection region sequentially decreases. In the embodiment of the present invention, preferably, the mapping relationship is established as follows:
mapping relation comparison table
And S230, determining a target detection area corresponding to the current detection level according to the mapping relation.
According to the established mapping relation, determining a target detection area corresponding to the current detection level, wherein the target detection area may be a part of all detection areas, for example, in combination with the above table, when the detection level is level 1, the target detection area may be i, ii, and iii, and when the detection level is level 2, the target detection area may be i, ii, iii, and iv, and so on.
S240, dividing each target detection area to obtain a detection sub-area of each target detection area, and determining the fouling score of each target detection area according to the gray value characteristics of the detection sub-areas.
And S250, determining the contamination grade of the paper money to be detected according to the contamination score of each target detection area and the detection grade corresponding to the target detection area.
Wherein, while calculating the soiling grade of the banknote to be detected according to the soiling score of each target detection area, the soiling grade of the banknote to be detected can also be determined by using the detection grade corresponding to the target detection area, preferably, the reciprocal of the detection level of each target detection region may be used as a weight for adding the stain scores of the target detection regions, this has the advantage that, when the target detection region includes regions of a plurality of detection levels, depending on the detection level to which the target detection region belongs, i.e., the target detection region having a higher probability of occurrence of an insult is weighted higher and the target detection region having a lower probability of occurrence of an insult is weighted lower, to determine the weight at which the insult scores for each target detection region are summed, the numerical value obtained by calculation can better show the contamination condition of the current detection value ratio, meanwhile, the calculation time is saved, and the efficiency of detecting the contamination condition of the paper money is improved.
On the basis of the above embodiments, the present embodiment provides a specific calculation method for determining a target detection area according to a detection level of a banknote and determining an contamination level of the banknote according to the detection level of the target detection area in a process of determining the contamination level of the banknote, and the method can determine the detection level as required, can effectively reflect the contamination condition of the banknote, and has convenient calculation and high efficiency.
EXAMPLE III
Fig. 3 is a flowchart of a method for detecting an insult level of a banknote according to a third embodiment of the present invention. On the basis of the above embodiments, this embodiment divides each target detection region to obtain a detection sub-region of each target detection region, and determines the stain score of each target detection region according to the gray-scale value characteristics of the detection sub-regions for further optimization.
As shown in fig. 3, the method for detecting the stain level of a bill includes:
s310, acquiring at least one target detection area of the images of the front side and the back side of the paper money to be detected.
And S320, dividing the target detection area into a plurality of detection subareas.
Preferably, in the embodiment of the present invention, a target detection region may be divided into 25 detection sub-regions, which has the advantage that each detection sub-region may be used as a detection unit for calculation, thereby facilitating data calculation of each detection region.
The size of each detector sub-region may be Wi × Hi, where Wi may be the width of each detector sub-region, or may be the number of pixel columns in each detector sub-region, where Hi may be the height of each detector sub-region, or may be the number of pixel rows in each detector sub-region. Wi Hi can represent the area size of each detection subarea, and can also be the number of pixel points in each detection subarea.
S330, counting the minimum value of the gray value of the detection sub-region, and determining the detection sub-region with the minimum value of the gray value smaller than a preset threshold value as a target sub-region.
And counting the minimum value of the gray value of the pixel point of each detection subarea in each target detection area. And determining the detection sub-region smaller than the preset threshold value as the target sub-region in all the gray value minimum values. The preset threshold value can be a fixed value, and can also be an average value of minimum values of all gray values in the current target detection area, preferably, the maximum gray value is one third of the minimum values of all the gray values, so that the advantage of the setting is that if the position of the current target detection area corresponds to a pattern with a deeper color on the banknote, a reasonable value can be obtained as the preset threshold value under the condition that the whole gray value is increased or decreased, and the phenomenon that the contamination detection of the whole banknote is influenced by the pattern of the banknote itself due to the fact that the preset threshold value is a fixed value is avoided.
On the basis of the above technical solution, preferably, in the process of counting the minimum value of the gray value of the detection sub-region, the sampling check may be performed with a fixed step size, where the fixed step size may be 4. The method has the advantages that the data calculation amount of the algorithm can be reduced, the calculation speed of the algorithm is improved, and 4 is taken as the step length, so that the situation that if the stained areas such as writing marks, stamp marks and the like are contained on the paper money, the stained areas are sampled and collected can not be missed due to the fact that the set step length is too large, and the accuracy of paper money stained detection is improved.
S340, determining whether the current target sub-region is a stained sub-region according to the number of the pixel points of which the gray value in each target sub-region is smaller than the preset threshold.
After determining that a part of or all of the detection sub-regions are target sub-regions, accurately counting the number of pixel points of which the gray value is smaller than the preset threshold value in each target sub-region, and determining whether the target sub-regions are stained sub-regions according to the number of the pixel points. The number of pixels with the gray value smaller than the preset threshold may be determined as the stained sub-region within a certain range according to a large number of experimental statistics, for example, if the determination value is 100, the detection sub-region may be determined as the stained sub-region when the number of pixels with the gray value smaller than the preset threshold of the current detection sub-region exceeds 100.
And S350, determining the fouling score of the current detection area according to the number of the pixel points with the gray values smaller than the preset threshold value in all the target sub-areas and the number of the fouling sub-areas.
And accurately counting the number of pixel points with the gray values smaller than the preset threshold value in each target subregion, and performing summation calculation to obtain the number of the pixel points with the gray values smaller than the preset threshold value in all the target subregions. And determining the fouling score of the current detection area according to the number of the fouling sub-areas, wherein the fouling score can be specifically calculated by using the following formula:
score=10*sum/(W*H)+S/2
wherein score is the stain score of the current target detection area; sum is the number of pixel points with the gray values smaller than a preset threshold in all target sub-regions; w is the number of pixel points of the target subarea; s is the number of stained subregions.
And S360, determining the contamination grade of the paper money to be detected according to the contamination score of the at least one target detection area.
Preferably, the soiling level of the banknote to be detected can be calculated in particular using the following formula:
grade=Σscore*weight
wherein grade is the fouling grade of the paper money to be detected; score is the insult score for each target detection zone; weight is the reciprocal of the detection level corresponding to each target detection area.
On the basis of the above embodiments, the embodiment provides an algorithm for specifically calculating the stain score of each target area and the detection level of the paper money to be detected, the calculation amount of the algorithm is less than that of the prior art, the calculation accuracy is higher than that of the prior art, the stain detection level can be automatically set according to the requirement, and the practicability of the technical scheme is improved.
In addition to the above-described embodiments, when the stain level grade of the banknote is calculated as a decimal number, it is preferable that the banknote is rounded, and when the grade is 3.8, the current stain level of the banknote is preferably 3. Preferably, ten grades of 0 to 9 are set for the stain level of the banknote, and when the calculation grade is equal to or greater than 10, the stain level of the current banknote is determined to be 9.
Example four
Fig. 4 is a flowchart of a method for detecting an insult level of a banknote according to a fourth embodiment of the present invention. On the basis of the foregoing embodiment, this embodiment determines whether the current target sub-region is a stained sub-region or not according to the number of the pixel points in each target sub-region whose grayscale value is smaller than the preset threshold.
As shown in fig. 4, the method for detecting the stain level of a bill includes:
s401, counting the number of pixel points in each target sub-region, wherein the gray value of each pixel point is smaller than the preset threshold value.
S402, corresponding each target sub-area to a corresponding position in the image of the paper money to be detected, judging whether the corresponding position contains a gray mean value pattern, if so, executing S403, and if not, executing S404.
The gray mean pattern may be a pattern whose gray mean value is smaller than a certain set value, where the set value may be a gray value for distinguishing a deeper or lighter color of the banknote surface pattern, and correspondingly, if the banknote surface pattern is darker, the gray value obtained when detecting the banknote surface pattern is correspondingly lower, and if the banknote surface pattern is avoided from being lighter or without any pattern, the corresponding gray value is also higher, even approaching 255. The mean value of the gray values of the corresponding positions of the paper money corresponding to each target sub-region can be obtained according to experimental statistics.
And S403, when the number of the pixel points with the gray value smaller than the preset threshold value in the target sub-region is larger than a first contamination threshold value, determining that the target sub-region is a contamination sub-region.
Preferably, the first threshold is 100, that is, when the number of pixels having a gray value smaller than the preset threshold is more than 100, the pixel is determined as a stained sub-region.
S404, when the number of the pixel points of which the gray value in the target sub-region is smaller than the preset threshold value is larger than a second contamination threshold value, determining that the target sub-region is a contamination sub-region.
Preferably, the first threshold is 10, that is, when the number of pixels having a gray value smaller than the preset threshold is more than 10, the pixel is determined as an affected sub-region.
On the basis of each technical scheme, the technical scheme has the advantages that the influence on the patterns of the paper money is filtered in the process of detecting the stained grade of the paper money, a more accurate judgment result of the stained grade of the paper money is obtained, and the tolerance of the background patterns of the paper money is improved.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a banknote contamination level detection apparatus according to a fifth embodiment of the present invention. As shown in fig. 5, the apparatus for detecting an insult level of a bill comprises:
a target detection area obtaining module 510, configured to obtain at least one target detection area of images of front and back sides of the banknote to be detected;
a fouling score determining module 520, configured to divide each target detection region to obtain a detection sub-region of each target detection region, and determine a fouling score of each target detection region according to a gray-scale value characteristic of the detection sub-region;
an insult level determination module 530 for determining an insult level of the note to be detected based on the insult score of the at least one target detection zone.
According to the technical scheme of the embodiment, the detection sub-region is obtained by obtaining the at least one target detection region of the images of the front side and the back side of the paper money and segmenting all the target detection regions, so that the contamination fraction of the target detection region is obtained according to the characteristics of the detection sub-region, the contamination grade of the paper money is further obtained, the problems of low accuracy and low detection speed of contamination grade detection in the prior art are solved, and the effect of quickly and accurately determining the contamination grade of the paper money is achieved.
On the basis of the above embodiments, the target detection area obtaining module 510 includes:
the statistical analysis unit is used for performing statistical analysis on the probability of contamination of the detection area of the sample paper money;
the mapping relation establishing unit is used for determining the mapping relation between the detection level and the detection area according to the result of the statistical analysis;
and the target detection area determining unit is used for determining a target detection area corresponding to the current detection level according to the mapping relation.
On the basis of the above embodiments, the fouling level determination module 530 includes:
and the contamination grade determining unit is used for determining the contamination grade of the paper money to be detected according to the contamination score of each target detection area and the detection grade corresponding to the target detection area.
On the basis of the above embodiments, the fouling score determining module 520 includes:
the detection subarea segmentation unit is used for segmenting the target detection area into a plurality of detection subareas;
the target sub-region determining unit is used for counting the minimum value of the gray value of the detection sub-region and determining the detection sub-region with the minimum value of the gray value smaller than a preset threshold value as the target sub-region;
the stained subregion judging unit is used for determining whether the current target subregion is a stained subregion according to the number of the pixel points of which the gray value in each target subregion is smaller than the preset threshold;
and the fouling score determining unit is used for determining the fouling score of the current detection area according to the number of the pixel points with the gray values smaller than the preset threshold value in all the target sub-areas and the number of the fouling sub-areas.
On the basis of the above embodiments, the stained sub-region determination unit includes:
the pixel point counting subunit is used for counting the number of pixel points with the gray value smaller than the preset threshold value in each target sub-region;
the pattern corresponding subunit is used for corresponding each target subregion to a corresponding position in the image of the paper money to be detected and judging whether the corresponding position contains a gray level mean value pattern or not;
the first judgment subunit is configured to determine that the target sub-region is a stained sub-region when the number of the pixel points in the target sub-region, of which the gray values are smaller than the preset threshold value, is larger than a first stained threshold value if the gray average pattern exists;
and the second judging subunit is configured to determine that the target sub-region is a stained sub-region when the number of the pixel points in the target sub-region, of which the gray value is smaller than the preset threshold value, is larger than a second stained threshold value without the gray-scale average pattern.
The product can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (8)
1. A method of detecting a banknote insult level, comprising:
acquiring at least one target detection area of the images of the front and back surfaces of the paper money to be detected;
dividing each target detection area to obtain a detection subarea of each target detection area, and determining the fouling score of each target detection area according to the gray value characteristics of the detection subareas;
determining the soiling grade of the paper money to be detected according to the soiling score of the at least one target detection area;
the method for acquiring the front and back images of the paper money to be detected comprises the following steps:
carrying out statistical analysis on the probability of contamination in the detection area of the sample paper money;
determining the mapping relation between the detection level and the detection area according to the result of the statistical analysis;
and determining a target detection area corresponding to the current detection level according to the mapping relation.
2. The method according to claim 1, wherein the determining the insult level of the note to be tested based on the insult score of the at least one target detection zone comprises:
and determining the contamination grade of the paper money to be detected according to the contamination score of each target detection area and the detection grade corresponding to the target detection area.
3. The method of claim 1, wherein the dividing each of the target detection zones into detection sub-zones for each of the target detection zones and determining the soiling score for each of the target detection zones based on the gray value characteristics of the detection sub-zones comprises:
dividing the target detection area into a plurality of detector sub-areas;
counting the minimum value of the gray value of the detection sub-region, and determining the detection sub-region with the minimum value of the gray value smaller than a preset threshold value as a target sub-region;
determining whether the current target sub-region is a stained sub-region or not according to the number of pixel points of which the gray value in each target sub-region is smaller than the preset threshold;
and determining the fouling score of the current detection area according to the number of the pixel points with the gray values smaller than the preset threshold value in all the target sub-areas and the number of the fouling sub-areas.
4. The method of claim 3, wherein the determining whether the current target sub-region is a stained sub-region according to the number of pixels of each target sub-region having a gray value smaller than the preset threshold comprises:
counting the number of pixel points with the gray value smaller than the preset threshold value in each target sub-region;
corresponding each target subregion to a corresponding position in the image of the paper money to be detected, and judging whether the corresponding position contains a gray level mean value pattern, wherein the gray level mean value pattern is a pattern that the gray level mean value of the corresponding position of the paper money corresponding to the target subregion is smaller than a preset pattern;
if yes, determining that the target sub-region is a stained sub-region when the number of the pixel points of which the gray value in the target sub-region is smaller than the preset threshold is larger than a first stained threshold;
and if not, determining that the target sub-region is the stained sub-region when the number of the pixel points of which the gray value in the target sub-region is smaller than the preset threshold is larger than a second stained threshold.
5. A banknote contamination level detection apparatus, comprising:
the target detection area acquisition module is used for acquiring at least one target detection area of the images of the front side and the back side of the paper money to be detected;
the fouling score determining module is used for dividing each target detection area to obtain a detection sub-area of each target detection area, and determining the fouling score of each target detection area according to the gray value characteristics of the detection sub-areas;
the contamination grade determining module is used for determining the contamination grade of the paper money to be detected according to the contamination score of the at least one target detection area;
wherein, the target detection area acquisition module comprises:
the statistical analysis unit is used for performing statistical analysis on the probability of contamination of the detection area of the sample paper money;
the mapping relation establishing unit is used for determining the mapping relation between the detection level and the detection area according to the result of the statistical analysis;
and the target detection area determining unit is used for determining a target detection area corresponding to the current detection level according to the mapping relation.
6. The apparatus of claim 5, wherein the fouling level determination module comprises:
and the contamination grade determining unit is used for determining the contamination grade of the paper money to be detected according to the contamination score of each target detection area and the detection grade corresponding to the target detection area.
7. The apparatus of claim 5, wherein the fouling score determination module comprises:
the detection subarea segmentation unit is used for segmenting the target detection area into a plurality of detection subareas;
the target sub-region determining unit is used for counting the minimum value of the gray value of the detection sub-region and determining the detection sub-region with the minimum value of the gray value smaller than a preset threshold value as the target sub-region;
the stained subregion judging unit is used for determining whether the current target subregion is a stained subregion according to the number of the pixel points of which the gray value in each target subregion is smaller than the preset threshold;
and the fouling score determining unit is used for determining the fouling score of the current detection area according to the number of the pixel points with the gray values smaller than the preset threshold value in all the target sub-areas and the number of the fouling sub-areas.
8. The apparatus according to claim 7, wherein the contamination sub-region determining unit includes:
the pixel point counting subunit is used for counting the number of pixel points with the gray value smaller than the preset threshold value in each target sub-region;
the pattern corresponding subunit is used for corresponding each target subregion to a corresponding position in the image of the paper money to be detected, and judging whether the corresponding position contains a gray level mean value pattern, wherein the gray level mean value pattern is a pattern in which the gray level mean value of the corresponding position of the paper money corresponding to the target subregion is smaller than a preset value;
the first judgment subunit is configured to determine that the target sub-region is a stained sub-region when the number of the pixel points in the target sub-region, of which the gray values are smaller than the preset threshold value, is larger than a first stained threshold value if the gray average pattern exists;
and the second judging subunit is configured to determine that the target sub-region is a stained sub-region when the number of the pixel points in the target sub-region, of which the gray value is smaller than the preset threshold value, is larger than a second stained threshold value without the gray-scale average pattern.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710159886.8A CN108629886B (en) | 2017-03-17 | 2017-03-17 | Method and device for detecting stain grade of paper money |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710159886.8A CN108629886B (en) | 2017-03-17 | 2017-03-17 | Method and device for detecting stain grade of paper money |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108629886A CN108629886A (en) | 2018-10-09 |
CN108629886B true CN108629886B (en) | 2020-06-09 |
Family
ID=63686846
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710159886.8A Active CN108629886B (en) | 2017-03-17 | 2017-03-17 | Method and device for detecting stain grade of paper money |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108629886B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023072464A1 (en) * | 2021-10-26 | 2023-05-04 | Robert Bosch Gmbh | Method for detecting a soiling on a lens unit of a camera of an agricultural work machine |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06318246A (en) * | 1993-05-06 | 1994-11-15 | Oki Electric Ind Co Ltd | Paper sheets recognizing device |
JP4319173B2 (en) * | 2005-07-25 | 2009-08-26 | 富士通株式会社 | Paper sheet processing equipment |
JPWO2008026286A1 (en) * | 2006-08-31 | 2010-01-14 | グローリー株式会社 | Paper sheet identification apparatus and paper sheet identification method |
JP4834531B2 (en) * | 2006-12-05 | 2011-12-14 | キヤノン株式会社 | Image processing apparatus, image processing apparatus control method, and program |
JP2010277252A (en) * | 2009-05-27 | 2010-12-09 | Toshiba Corp | Paper sheet handling apparatus |
CN103324946B (en) * | 2013-07-11 | 2016-08-17 | 广州广电运通金融电子股份有限公司 | A kind of method and system of paper money recognition classification |
CN103489255B (en) * | 2013-08-23 | 2016-04-06 | 广州智萃电子科技有限公司 | A kind of banknote defect detection apparatus and method |
CN105225335A (en) * | 2015-10-28 | 2016-01-06 | 深圳怡化电脑股份有限公司 | A kind of stained recognition methods of paper money number and system |
CN106355739B (en) * | 2016-08-18 | 2019-03-12 | 深圳怡化电脑股份有限公司 | A kind of method and device that detection bank note is new and old |
-
2017
- 2017-03-17 CN CN201710159886.8A patent/CN108629886B/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023072464A1 (en) * | 2021-10-26 | 2023-05-04 | Robert Bosch Gmbh | Method for detecting a soiling on a lens unit of a camera of an agricultural work machine |
Also Published As
Publication number | Publication date |
---|---|
CN108629886A (en) | 2018-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Wang et al. | A simple guidance template-based defect detection method for strip steel surfaces | |
CN105243730B (en) | Paper Currency Identification and system | |
CN104794491B (en) | Based on the fuzzy clustering Surface Defects in Steel Plate detection method presorted | |
CN107103683B (en) | Paper money identification method and device, electronic equipment and storage medium | |
CN103279735B (en) | Dust stratification detection method and system in a kind of financial document identification module | |
CN104464079B (en) | Multiple Currencies face amount recognition methods based on template characteristic point and topological structure thereof | |
CN101923741A (en) | Paper currency number identification method based on currency detector | |
CN106952393B (en) | Paper money identification method and device, electronic equipment and storage medium | |
CN106875545B (en) | Method and device for identifying paper money | |
CN105069900A (en) | Method and device for processing banknote information | |
CN106898078B (en) | Port currency version identification method and device | |
CN106920318B (en) | Method and device for identifying paper money | |
CN107134047B (en) | White watermark detection method and device | |
CN105139508B (en) | A kind of method and device of detection bank note | |
CN115272305B (en) | Button hole defect detection method | |
CN106204616B (en) | Method and device for identifying currency value of Iran paper money | |
CN108629886B (en) | Method and device for detecting stain grade of paper money | |
CN107680246B (en) | Method and equipment for positioning curve boundary in paper money pattern | |
CN106447904B (en) | Method and device for identifying paper money | |
CN106296975B (en) | method and device for identifying face value of dollar paper money | |
CN106886777B (en) | Character boundary determining method and device | |
CN109543554B (en) | Bill detection method, device, terminal and computer readable storage medium | |
CN108510638B (en) | Paper money identification method and device | |
CN117058805A (en) | Banknote image processing method and system | |
CN116052324A (en) | Banknote stain identification and fake detection method |
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 |