WO2019007164A1 - 纸币涂鸦的检测方法及装置 - Google Patents

纸币涂鸦的检测方法及装置 Download PDF

Info

Publication number
WO2019007164A1
WO2019007164A1 PCT/CN2018/088590 CN2018088590W WO2019007164A1 WO 2019007164 A1 WO2019007164 A1 WO 2019007164A1 CN 2018088590 W CN2018088590 W CN 2018088590W WO 2019007164 A1 WO2019007164 A1 WO 2019007164A1
Authority
WO
WIPO (PCT)
Prior art keywords
watermark
image
banknote
gray
histogram
Prior art date
Application number
PCT/CN2018/088590
Other languages
English (en)
French (fr)
Inventor
雷刚
王荣秋
赵政
陈春光
余元超
Original Assignee
广州广电运通金融电子股份有限公司
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 广州广电运通金融电子股份有限公司 filed Critical 广州广电运通金融电子股份有限公司
Publication of WO2019007164A1 publication Critical patent/WO2019007164A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/181Testing mechanical properties or condition, e.g. wear or tear
    • G07D7/187Detecting defacement or contamination, e.g. dirt
    • 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/2016Testing patterns thereon using feature extraction, e.g. segmentation, edge detection or Hough-transformation
    • 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/2033Matching unique patterns, i.e. patterns that are unique to each individual paper

Definitions

  • the invention relates to the field of electronic technology, and in particular to a method and a device for detecting banknote graffiti.
  • the banknote sorting machine needs to collect the graffiti banknotes of serious severity according to the severity of the banknote graffiti.
  • the graffiti here refers to the different degrees of handwriting left by man during the circulation of the banknotes.
  • the commonly used banknote graffiti detection method is an image determination method, but the existing image discriminating method has high complexity and long processing time, and the processing time of the high-speed sorting device is limited, and it is difficult to adapt to the existing image discriminating algorithm. Therefore, it is necessary to develop a simple and fast graffiti detection and discrimination method.
  • the object of the embodiments of the present invention is to provide a method and a device for detecting banknote graffiti, which can effectively solve the problem that the existing banknote image graffiti detecting method is complicated and time-consuming, and can realize simple and rapid graffiti detection and discrimination.
  • an embodiment of the present invention provides a method, including the steps of:
  • the method for detecting banknote graffiti disclosed by the present invention calculates the gray histogram on the reflected image and the transmitted image by using the watermark area of the banknote as a standard, and then obtains the weighted gray histogram after weighted summation.
  • the image is obtained by performing a mean operation on the weighted gray histogram to obtain a gray background threshold, and the gray histogram of the non-watermark blank area and the gray histogram of the watermark area in the reflected image are summed and summed to obtain the reflected image.
  • a grayscale histogram based on the grayscale background threshold and the grayscale histogram of the reflected image, obtains a graffiti index of the banknote to be tested by a proportional operation, and solves the complicated algorithm of the existing banknote image graffiti detecting method.
  • the problem of long time consumption can quantitatively describe the graffiti degree of banknotes, and is applicable to various types of banknotes, which can realize simple and rapid graffiti detection and discrimination.
  • performing tilt correction on the transmission image specifically includes the steps of:
  • Obtaining a boundary point of the transmission image by comparing a gray value of the foreground region and a gray value of the background region in the transmission image, and fitting the boundary point by a least squares method to obtain a linear equation of four boundaries;
  • the transmitted image is corrected.
  • One method commonly used to segment the foreground and background regions is to set a threshold between the foreground and the background to obtain a boundary point between the foreground region and the background region.
  • the tilt correction of the reflected image includes the following steps:
  • calculating a gray histogram of the watermark region in the transmission image is specifically:
  • N1 small square regions are obtained; wherein, N1 ⁇ 10000;
  • a gray histogram of each of the square regions is calculated, and a gray histogram of each of the square regions is accumulated to obtain a gray histogram of the watermark region in the transmission image.
  • the irregular watermark in the transmission image is divided into several small squares by means of limit segmentation.
  • the gray histogram of the watermark region in the transmitted image can be quickly obtained by accumulating the gray histogram of each small square, and the accuracy is obtained. Higher.
  • calculating a gray histogram of the watermark region in the reflected image is specifically:
  • N2 small square regions are obtained; wherein N2 ⁇ 10000;
  • a gray histogram of each of the square regions is calculated, and a gray histogram of each of the square regions is accumulated to obtain a gray histogram of the watermark region in the reflected image.
  • the irregular watermark in the reflected image is divided into several small squares by means of limit segmentation, and the gray histogram of the watermark region in the reflected image can be quickly obtained by accumulating the gray histograms of the small squares. , the accuracy is higher.
  • a weighted gray histogram is obtained by weighting the following formula pairs:
  • Hist(i) new watermark k 1 ⁇ Hist(i) transmission watermark +k 2 ⁇ Hist(i) reflection watermark
  • the Hist(i) transmission watermark is a gray histogram of a watermark region in the transmission image
  • the Hist(i) reflection watermark is a gray histogram of a watermark region in the reflected image
  • the k1 and K2 is a weight histogram of the watermark region in the transmission image and a weight histogram of the watermark region in the reflected image, respectively
  • the Hist(i) new watermark is a weighted gray histogram.
  • the grayscale background threshold is calculated by the following formula:
  • Hist(i) new watermark is the weighted gray histogram of the watermark area
  • t is the gray value corresponding to the r bright point ratio.
  • the gray value t corresponding to the r bright point ratio is between 255 and 0, and the following conditions are met:
  • r is the preset bright point ratio
  • the Hist(i) new watermark is a weighted gray histogram
  • the graffiti index of the banknote to be tested is calculated by the following formula:
  • the Graffiti is a graffiti index of the banknote to be tested
  • Hist reflection (i) is a gray histogram of the reflected image
  • is the gray background threshold
  • n is a preset stretching number, 2 ⁇ n ⁇ 9.
  • the graffiti index of the banknote to be tested is calculated by the above formula, so that the graffiti index is between 0 and 255, corresponding to the description of the gray value. When the graffiti index is smaller, the graffiti level is more serious.
  • the embodiment of the invention further provides a device for detecting the graffiti of the banknote, comprising:
  • a first processing module configured to acquire a transmission image of the banknote to be tested, and perform a tilt correction on the transmission image, and calculate a gray histogram of the watermark region in the transmission image;
  • a second processing module configured to acquire a reflection image of the banknote to be tested, and perform a tilt correction on the reflected image, calculate a gray histogram of the watermark region in the reflected image, and a non-watermark region blank in the reflected image Gray histogram of the region;
  • a weighted summation module configured to perform a weighted gray histogram of the watermark region by weighting and summing the grayscale histogram of the watermark region in the transmission image and the watermark region in the reflected image;
  • a threshold obtaining module configured to obtain a gray background threshold by using an average operation according to the weighted gray histogram
  • a third processing module configured to accumulate a gray histogram of the non-watermark area blank area and the watermark area in the reflected image to obtain a gray histogram of the reflected image
  • a detecting module configured to obtain a graffiti index of the banknote to be tested by a proportional operation based on the grayscale background threshold and the grayscale histogram of the reflected image.
  • the detecting apparatus for the banknote graffiti disclosed by the present invention acquires the gray histograms of the projected image watermarking area and the reflected image watermarking area by the first processing module and the second processing module, respectively, and passes through the weighted summation module.
  • the weighted gray histogram of the watermark region is obtained by weighted summation
  • the background gray threshold is obtained by performing the mean operation on the weighted gray histogram
  • the gray level of the blank region of the non-watermark region of the reflected image is obtained.
  • the graffiti index solves the problem that the existing banknote image graffiti detection method is complicated and time-consuming. It can quantitatively describe the graffiti degree of banknotes, and is suitable for graffiti detection of various types of banknotes, which can realize simple and rapid graffiti detection and discrimination.
  • FIG. 1 is a flow chart showing a method for detecting a banknote graffiti according to a first embodiment of the present invention.
  • FIG. 2 is a flow chart showing the tilt correction of the transmission image in step S1 in the first embodiment of the present invention.
  • step S2 is a flow chart showing the tilt correction of the reflected image in step S2 in the first embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of a method for detecting graffiti of a banknote according to Embodiment 2 of the present invention.
  • Fig. 5 is a schematic diagram showing the limit segmentation of a watermark region in a transmission image in Embodiment 2 of the present invention.
  • FIG. 6 is a schematic flow chart of a method for detecting banknote graffiti provided by Embodiment 3 of the present invention.
  • Figure 7 is a gray histogram of a watermark region in a transmission image in Embodiment 3 of the present invention.
  • Figure 8 is a gray histogram of a watermark region in a reflected image in Embodiment 3 of the present invention.
  • Figure 9 is a weighted gray histogram of a watermark region in Embodiment 3 of the present invention.
  • Figure 10 is a gradation histogram of a reflected image in Embodiment 3 of the present invention.
  • FIG 11 is a block diagram showing the structure of a banknote graffiti detecting device in Embodiment 4 of the present invention.
  • FIG. 1 is a schematic flow chart of a method for detecting banknote graffiti provided by Embodiment 1 of the present invention.
  • the flow diagram of the method for detecting banknote graffiti as shown in FIG. 1 includes the steps:
  • S1 Obtain a transmission image of the banknote to be tested, and perform a tilt correction on the transmission image, and calculate a gray histogram of the watermark region in the transmission image;
  • S5 cumulatively summing a gray histogram of a blank area of the non-watermark area in the reflected image and a gray histogram of the watermark area of the reflected image to obtain a gray histogram of the reflected image;
  • the reflected image and the transmitted image of the banknote to be tested are first acquired, and the gray histogram of the watermarked area on the reflected image and the transmitted image is separately calculated.
  • the watermark technology used for watermark banknote printing the area formed on the banknote image is called the watermark area, and the watermark area is on the reflected image and the transmitted image, and the gray value is larger than other areas, and the area is relatively stable.
  • the relevant threshold condition of the banknote graffiti determination is determined with reference to the histogram feature of the region.
  • the weighted gray histogram of the watermark region is obtained by weighted summation of the grayscale histogram of the watermark region in the reflected image and the transmitted image, and the reflected image can clearly observe the writing condition of the banknote, and the brightness of the transmitted image can be Reflecting the old and new degree of banknotes more clearly, it is further explained that under the same level of graffiti conditions, the graffiti level of old and new banknotes, that is, the graffiti index is different (different old and new banknotes, different dirty benchmarks), so reflection is needed.
  • the image and transmission image weighting techniques calculate the relevant threshold conditions. Then, the weighted gray histogram is subjected to an average operation to obtain a grayscale background threshold, which is an average value of the grayscale distribution.
  • the gray histogram of the blank area of the non-watermark area in the reflected image and the gray histogram of the watermark area of the reflected image are summed and summed to obtain a gray histogram of the reflected image, and the focus of the scheme is Studying the image graffiti in the blank area, because the graffiti in the non-blank area, the background and foreground are less distinguishable on the reflected image, and it is more difficult to distinguish, while the graffiti in the blank area can be distinguished on the reflected image.
  • the graffiti index of the banknote to be tested can be obtained according to the grayscale background threshold obtained above and the grayscale histogram of the reflected image.
  • the graffiti degree of the banknote can be quantitatively analyzed, and the reflected image and the transmitted image are weighted and summed to calculate the threshold value, which can be applied to banknotes of different types, different denominations, different old and new degrees, and can quickly and effectively determine whether the banknote to be tested exists.
  • Graffiti solves the problem that the existing banknote image graffiti detection method is complicated and time-consuming.
  • the banknote image can clearly observe the blank area and the non-blank area on the reflected image due to the material and printing technology.
  • the blank area is a shallow ink area
  • the non-blank area is a deep ink area.
  • a watermark region is formed on the banknote image, and when reflected on the reflected image and the transmitted image, the gray value thereof is larger than the gray value of other regions, so the blank region includes the watermark region, that is,
  • the blank area includes a blank area and a watermark area in the non-watermark area.
  • the watermark area is used as the threshold calculation standard, and the graffiti detection in the blank area is mainly studied.
  • step S1 in the above Embodiment 1 performs tilt correction on the transmission image, and specifically includes the following steps:
  • Steps S11-S13 perform a process of tilt correction of the transmission image.
  • a threshold between the foreground and the background is set to obtain a foreground region and a background region.
  • Boundary point The boundary points are fitted by the least squares method to obtain four linear equations of the boundary; the four linear equations are solved by the simultaneous equations, and the four vertex coordinates are respectively calculated, and the four vertices are the upper left vertex and the lower left vertex respectively. , upper right vertex and lower right vertex. Calculating the tilt offset of the banknote to be tested in the horizontal direction and the vertical direction in the transmission image according to the four vertex coordinates and the four line equations, and correcting the transmission image based on the tilt offset.
  • step S2 in the above embodiment 1 performs tilt correction on the reflected image, and specifically includes the following steps:
  • S21 Perform a proportional operation on the four-vertex of the transmission image and the four-boundary line equation based on a proportional relationship between the reflected image and the transmitted image to obtain a linear equation of four vertices and four boundaries of the reflected image;
  • Steps S21-S22 perform the process of tilt correction of the transmission image, because the transmitted image and the reflected image are only different in wavelength of the light, and there is a certain proportional relationship between the sizes of the images, so the vertex coordinates of the transmitted image can be used.
  • a straight line equation after performing the proportional conversion, determining a vertex coordinate of the reflected image and a straight line equation, thereby obtaining a tilt offset of the banknote to be tested in the horizontal direction and the vertical direction in the reflected image, based on the tilt offset The reflected image is corrected.
  • the gray histogram of the watermark region can be accurately obtained, which is beneficial to the subsequent more accurate analysis.
  • FIG. 4 is a schematic flow chart of a method for detecting graffiti of a banknote according to Embodiment 2 of the present invention.
  • the flow diagram of the method for detecting banknote graffiti as shown in FIG. 4 includes the following steps:
  • N2 small square regions are obtained; wherein, N2 ⁇ 10000; a gray histogram of each of the square regions is calculated, and a gray histogram of each of the square regions is accumulated to obtain the reflected image. a gray histogram of the watermark region;
  • S5 summing a gray histogram of a blank area of the non-watermark area in the reflected image and a gray histogram of the watermark area of the reflected image to obtain a gray histogram of the reflected image;
  • the method for detecting the banknote graffiti of Embodiment 2 is based on Embodiment 1, except that the gray histogram of the watermark region and the reflected image watermark region in the transmission image is calculated as follows: as shown in FIG. 5, the transmission image watermark region is 1 performing limit segmentation, which can be divided into N1 m 1 ⁇ m 1 small square regions 2; statistically transmitting N1 square regions 2 gray histograms on the transmission image to obtain a gray histogram of the watermark region of the transmission image, wherein The larger the value of N1 is, the smaller the value of m 1 is, the more the polygon shape of the watermark region can be described.
  • the watermark region of the reflected image is subjected to limit segmentation, which can be divided into N2 m 2 ⁇ m 2 small square regions; statistical reflection
  • the gray histogram of the watermarked area of the reflected image is obtained by accumulating the N2 square area gray histograms on the image, wherein the larger the value of N2 is, the smaller the value of m 2 is, and the more the polygon shape of the watermark area can be described.
  • limit segmentation the areas of the transmitted image watermarking region and the reflected image watermarking region can be approximated by the following equations:
  • the watermark of the irregular polygon is divided into a plurality of small squares by the method of limit segmentation, and the gray histograms of each of the small squares are respectively obtained, and then the gray histograms of each of the small squares are accumulated and quickly obtained. A gray histogram of the watermark region.
  • FIG. 6 is a schematic flow chart of a method for detecting a graffiti of a banknote according to Embodiment 3 of the present invention.
  • the flow diagram of the method for detecting banknote graffiti as shown in FIG. 5 includes the steps of:
  • S1 Obtain a transmission image of the banknote to be tested, and perform a tilt correction on the transmission image, and calculate a gray histogram of the watermark region in the transmission image;
  • the grayscale histogram of the watermark region in the transmission image and the gray histogram of the watermark region in the reflected image are weighted and summed by the following formula to obtain a weighted gray histogram of the watermark region:
  • Hist(i) new watermark k 1 ⁇ Hist(i) transmission watermark +k 2 ⁇ Hist(i) reflection watermark
  • the Hist(i) transmissive watermark is a gray histogram of a watermark region in the transmission image
  • the Hist(i) reflected watermark is a gray histogram of a watermark region in the reflected image
  • the k 1 And k 2 are respectively a weight histogram of the watermark region in the transmission image and a weight histogram of the watermark region in the reflected image
  • the Hist (i) new watermark is a weighted gray histogram of the watermark region ;
  • is the grayscale background threshold
  • r is a preset bright spot ratio
  • Hist(i) new watermark is a weighted gray histogram of the watermark region
  • t is a gray value corresponding to a r bright point ratio
  • S5 summing a gray histogram of a blank area of the non-watermark area in the reflected image and a gray histogram of the watermark area of the reflected image to obtain a gray histogram of the reflected image;
  • the Graffiti is a graffiti index of the banknote to be tested
  • Hist reflection (i) is a gray histogram of the reflected image
  • is the gray background threshold
  • n is a preset stretching number, 2 ⁇ n ⁇ 9.
  • the reflected image and the transmitted image of the banknote to be tested are first obtained, and the gray histogram of the watermarked area on the reflected image and the transmitted image is respectively calculated, and then the gray histogram of the watermarked area in the reflected image and the transmitted image is weighted.
  • the weighted gray histogram of the watermark area is obtained, and the reflected image can clearly observe the writing condition of the banknote, and the brightness of the transmitted image can clearly reflect the old and new degree of the banknote, further explaining that under the same degree of graffiti conditions
  • the graffiti degree of the old banknotes and the new banknotes, that is, the graffiti index is different (different old and new banknotes, and the dirty datum is different), so it is necessary to calculate the relevant threshold conditions by using the reflected image and the transmitted image weighting processing technique.
  • the weighted histogram of the grayscale is compared with the gray histogram of the reflected image of FIG.
  • K1 and k2 are the weight histogram of the watermark region in the transmission image and the gray histogram of the watermark region in the reflected image, respectively, which are determined by banknotes of different kinds and different denominations, as an empirical value.
  • the mean value operation is performed to obtain the gray background threshold ⁇ .
  • the mean value of the bright point ratio r is introduced as a reference, and the influence of the graffiti may be eliminated in the watermarking area, because the graffiti of the banknote is a dark point, so selecting a certain proportion of bright spots can avoid the interference of the graffiti, and the stability is better.
  • the gray value point closer to 255 is a bright point
  • the gray value point closer to 0 is a dark point
  • t is a gray value corresponding to the proportion of the r bright point, which is between 255 and 0, and the following conditions are satisfied:
  • r is a preset bright point ratio
  • the Hist (i) new watermark is a weighted gray histogram of the watermark area.
  • the corresponding i value is t. Calculate the average value of the gray distribution of the top 30% bright point ratio.
  • the average value of the gray distribution of the first 30% bright point ratio is obtained at 30% of the total pixel points, thereby obtaining the grayscale background threshold ⁇ .
  • the gray histogram Hist reflection non-watermark of the non- watermark area blank area in the reflected image and the gray histogram Hist reflection watermark of the watermark area in the reflected image are summed to obtain the gray level histogram of the reflected image.
  • Figure Hist reflects (i) as shown in Figure 10.
  • the graffiti index Graffiti of the banknote to be tested is obtained by a proportional operation.
  • the graffiti index Graffiti ranges from 0 to 255, corresponding to the characteristics of the gray value.
  • the embodiment of the present invention further provides a detecting device 100 for banknote graffiti, comprising:
  • a first processing module 101 configured to acquire a transmission image of the banknote to be tested, and perform a tilt correction on the transmission image, and calculate a gray histogram of the watermark region in the transmission image;
  • a second processing module 102 configured to acquire a reflection image of the banknote to be tested, and perform a tilt correction on the reflected image, calculate a gray histogram of the watermark region in the reflected image, and a non-watermark region in the reflected image Gray histogram of the blank area;
  • a weighted summation module 103 configured to perform weighted gray histograms of the watermark regions by weighting and summing the watermark regions in the watermark region and the watermark region in the reflected image;
  • the threshold obtaining module 104 is configured to obtain a gray background threshold by using an average operation according to the weighted gray histogram
  • a third processing module 105 configured to accumulate a gray histogram of a blank area of the non-watermark area in the reflected image and a gray histogram of the watermark area to obtain a gray histogram of the reflected image;
  • the detecting module 106 is configured to obtain a graffiti index of the banknote to be tested by a proportional operation based on the grayscale background threshold and the grayscale histogram of the reflected image.
  • the present invention discloses a method and a device for detecting the graffiti of a banknote.
  • the gray histograms on the reflected image and the transmitted image are respectively calculated, and the weighted gradation is obtained after weighted summation.
  • a histogram obtaining a grayscale background threshold of the watermark region according to the weighted gray histogram, and obtaining a grayscale histogram of the non-watermark region blank region and a grayscale histogram of the watermark region in the reflected image to obtain the reflected image a grayscale histogram, based on the grayscale background threshold and the grayscale histogram of the reflected image, obtains a graffiti index of the banknote to be tested by a proportional operation, and solves the complexity and consumption of the existing banknote image graffiti detection method algorithm
  • the problem of duration can quantitatively describe the graffiti degree of banknotes, and is applicable to various types of banknotes, which is fast and effective.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

本发明公开了一种纸币涂鸦的检测方法,通过以纸币水印区作为标准,分别计算其在反射图像和透射图像上的灰度直方图后进行加权求和后获得加权灰度直方图,根据加权灰度直方图进行均值运算后获得灰度背景阈值,将反射图像中非水印区空白区域的灰度直方图和水印区的灰度直方图进行累加求和获得所述反射图像的灰度直方图,基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数,解决了现有纸币图像涂鸦检测方法算法复杂、耗时长的问题,能定量描述纸币的涂鸦程度,适用于各种不同类型的纸币,快速有效。

Description

纸币涂鸦的检测方法及装置 技术领域
本发明涉及电子技术领域,尤其涉及一种纸币涂鸦的检测方法及装置。
背景技术
随着纸币流通速度的加快,银行业对纸币清分自动化的需求越来越迫切。纸币清分机在清分判别系统中,需要根据纸币涂鸦的严重程度,对严重程度的涂鸦纸币进行回收。此处的涂鸦是指在纸币流通过程中,人为留下的不同程度的字迹。常用的纸币涂鸦检测方法为图像判定方法,但是现有的图像判别方法算法复杂度高,处理时间较长,而高速清分机设备的处理时间有限,难以适应现有的图像判别算法。因此,有必要研发一种简便、快速的涂鸦检测和判别方法。
发明内容
本发明实施例的目的是提供一种纸币涂鸦的检测方法及装置,能有效解决现有纸币图像涂鸦检测方法算法复杂、耗时长的问题,可以实现简便、快速的涂鸦检测和判别。
为实现上述目的,本发明实施例提供了一种,包括步骤:
获取待测纸币的透射图像,对所述透射图像进行倾斜矫正后,计算所述透射图像中水印区的灰度直方图;
获取所述待测纸币的反射图像,对所述反射图像进行倾斜矫正后,计算所述反射图像中水印区的灰度直方图以及所述反射图像中非水印区空白区域的灰度直方图;
将所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图进行加权求和后获得加权灰度直方图;
根据所述加权灰度直方图,通过均值运算获得灰度背景阈值;
将所述反射图像中非水印区空白区域的灰度直方图与所述反射图像中水印区的灰度直方图进行累加求和后获得所述反射图像的灰度直方图;
基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数。
与现有技术相比,本发明公开的纸币涂鸦的检测方法通过以纸币水印区作为标准,分别计 算其在反射图像和透射图像上的灰度直方图后进行加权求和后获得加权灰度直方图,根据加权灰度直方图进行均值运算后获得灰度背景阈值,将反射图像中非水印区空白区域的灰度直方图和水印区的灰度直方图进行累加求和后获得所述反射图像的灰度直方图,基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数,解决了现有纸币图像涂鸦检测方法算法复杂、耗时长的问题,能定量描述纸币的涂鸦程度,适用于各种不同类型的纸币,可以实现简便、快速的涂鸦检测和判别。
作为上述方案的改进,对所述透射图像进行倾斜矫正具体包括步骤:
通过比较所述透射图像中前景区域的灰度值和背景区域的灰度值获得所述透射图像的边界点,将所述边界点通过最小二乘法进行拟合获得四条边界的直线方程;
通过所述四条边界的直线方程进行联立方程求解后获得所述透射图像的四个顶点,所述四个顶点分别为左上顶点、左下顶点、右上顶点和右下顶点;
根据所述透射图像的四个顶点和四条边界的直线方程,计算所述待测纸币在所述透射图像中沿水平方向和垂直方向的倾斜偏移量,基于所述倾斜偏移量对所述透射图像进行矫正。作为分割前景区域和背景区域常用的一种方法为设定一个灰度处于前景与背景之间的阈值,可以获得前景区域和背景区域的边界点。
作为上述方案的改进,对所述反射图像进行倾斜矫正包括步骤:
基于所述反射图像和透射图像的比例关系,将所述透射图像的四个顶点和四条边界的直线方程进行比例运算后获得所述反射图像的四个顶点和四条边界的直线方程;
根据所述反射图像的四个顶点和四条边界的直线方程,计算所述待测纸币在所述反射图像中沿水平方向和垂直方向的倾斜偏移量,基于所述倾斜偏移量对所述反射图像进行矫正。经过倾斜矫正后的图像才能准确获取水印区的灰度直方图,有利于后续更准确的分析。
作为上述方案的改进,计算所述透射图像中水印区的灰度直方图具体为:
将所述透射图像中水印区进行极限分割后,获得N1个小正方形区域;其中,N1≤10000;
计算每一所述正方形区域的灰度直方图,将每一所述正方形区域的灰度直方图进行累加后获得所述透射图像中水印区的灰度直方图。通过极限分割的方式将透射图像中不规则的水印区分成若干个小正方形,可通过求得各个小正方形的灰度直方图进行累加后快速得到透射图像中水印区的灰度直方图,准确度较高。
作为上述方案的改进,计算所述反射图像中水印区的灰度直方图具体为:
将所述反射图像中水印区进行极限分割后,获得N2个小正方形区域;其中,N2≤10000;
计算每一所述正方形区域的灰度直方图,将每一所述正方形区域的灰度直方图进行累加后获得所述反射图像中水印区的灰度直方图。同理,通过极限分割的方式将反射图像中不规则的水印区分成若干个小正方形,可通过求得各个小正方形的灰度直方图进行累加后快速得到反射图像中水印区的灰度直方图,准确度较高。
作为上述方案的改进,通过以下公式对进行加权求和后获得加权灰度直方图:
Hist(i) 新水印=k 1×Hist(i) 透射水印+k 2×Hist(i) 反射水印
其中,所述Hist(i) 透射水印为所述透射图像中水印区的灰度直方图,所述Hist(i) 反射水印为所述反射图像中水印区的灰度直方图,所述k1和k2分别为所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图的权重,所述Hist(i) 新水印为加权灰度直方图。通过加权的方式将反射图像和透射图像相加,可引入新旧纸币的信息,且不同的纸币类型、纸币面额可设不同的加权权重,适用范围更广,更准确地描述纸币的涂鸦情况。
作为上述方案的改进,通过以下公式计算所述灰度背景阈值:
Figure PCTCN2018088590-appb-000001
其中r为预设的亮点比例,Hist(i) 新水印为所述水印区的加权灰度直方图,t为r亮点比例对应的灰度值。以一定的亮点比例灰度分布的平均值作为参考,可剔除水印区存在涂鸦的影响,稳定性更优。
作为上述方案的改进,所述r亮点比例对应的灰度值t介于255~0之间,且满足以下条件:
Figure PCTCN2018088590-appb-000002
其中,其中r为预设的亮点比例,Hist(i) 新水印为加权灰度直方图。
作为上述方案的改进,通过以下公式计算所述待测纸币的涂鸦指数:
Figure PCTCN2018088590-appb-000003
其中,所述Graffiti为所述待测纸币的涂鸦指数,Hist 反射(i)为所述反射图像的灰度直方图,θ为所述灰度背景阈值,n为预设的拉伸次数,2≤n≤9。通过上述式子计算待测纸币的涂鸦指数,使得涂鸦指数在0~255之间,与灰度值的描述相对应,当涂鸦指数越小,则涂鸦程度越严重。
本发明实施例还提供了一种纸币涂鸦的检测装置,包括:
第一处理模块,用于获取待测纸币的透射图像,对所述透射图像进行倾斜矫正后,计算所述透射图像中水印区的灰度直方图;
第二处理模块,用于获取所述待测纸币的反射图像,对所述反射图像进行倾斜矫正后,计算所述反射图像中水印区的灰度直方图及所述反射图像中非水印区空白区域的灰度直方图;
加权求和模块,用于将所述透射图像中水印区和反射图像中水印区的灰度直方图进行加权求和后获得水印区的加权灰度直方图;
阈值获取模块,用于根据所述加权灰度直方图,通过均值运算获得灰度背景阈值;
第三处理模块,用于将所述反射图像中非水印区空白区域与水印区域的灰度直方图进行累加求和后获得所述反射图像的灰度直方图;
检测模块,用于基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数。
与现有技术相比,本发明公开的纸币涂鸦的检测装置通过第一处理模块和第二处理模块分别获取投射图像水印区和反射图像水印区的灰度直方图,并通过加权求和模块将两者进行加权求和后获得水印区的加权灰度直方图,将所述加权灰度直方图进行均值运算后可获得背景灰度阈值,将所述反射图像非水印区空白区域的灰度直方图和水印区的灰度直方图累加求和后获得所述反射图像的灰度直方图,基于所述背景灰度阈值和反射图像的灰度直方图进行比例运算后获得所述待测纸币的涂鸦指数,解决了现有纸币图像涂鸦检测方法算法复杂、耗时长的问题,能定量描述纸币的涂鸦程度,适用于各种不同类型的纸币涂鸦检测,可以实现简便、快速的涂鸦检测和判别。
附图说明
图1是本发明实施例1中一种纸币涂鸦的检测方法的流程示意图。
图2是本发明实施例1中步骤S1对所述透射图像进行倾斜矫正的流程示意图。
图3是本发明实施例1中步骤S2对所述反射图像进行倾斜矫正的流程示意图。
图4是本发明实施例2提供的一种纸币涂鸦的检测方法的流程示意图。
图5是本发明实施例2中对透射图像中水印区进行极限分割的示意图。
图6是本发明实施例3提供的一种纸币涂鸦的检测方法的流程示意图。
图7是本发明实施例3中透射图像中水印区的灰度直方图。
图8是本发明实施例3中反射图像中水印区的灰度直方图。
图9是本发明实施例3中水印区的加权灰度直方图。
图10是本发明实施例3中反射图像的灰度直方图。
图11是本发明实施例4中一种纸币涂鸦的检测装置的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参见图1,是本发明实施例1提供的一种纸币涂鸦的检测方法的流程示意图。如图1所示的纸币涂鸦的检测方法的流程示意图包括步骤:
S1、获取待测纸币的透射图像,对所述透射图像进行倾斜矫正后,计算所述透射图像中水印区的灰度直方图;
S2、获取所述待测纸币的反射图像,对所述反射图像进行倾斜矫正后,计算所述反射图像中水印区的灰度直方图以及所述反射图像中非水印区空白区域的灰度直方图;
S3、将所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图进行加权求和后获得水印区的加权灰度直方图;
S4、根据所述加权灰度直方图,通过均值运算获得灰度背景阈值;
S5、将所述反射图像中非水印区空白区域的灰度直方图与所述反射图像中水印区的灰度直 方图进行累加求和后获得所述反射图像的灰度直方图;
S6、基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数。
具体实施时,先获取待测纸币的反射图像和透射图像,再分别计算反射图像和透射图像上水印区的灰度直方图。水印纸币印刷采用的水印技术,在纸币图像上形成的区域称为水印区,水印区在反射图像和透射图像上,其灰度值相比其它区域灰度值更大,区域相对更稳定,可参考该区域的直方图特征确定纸币涂鸦判定的相关阈值条件。然后将反射图像和透射图像中水印区的灰度直方图进行加权求和获得水印区的加权灰度直方图,反射图像可较清晰的观察到纸币的涂写情况,而透射图像的亮暗程度可较清晰地反映纸币的新旧程度,进一步解释,相同程度涂鸦条件下,旧纸币和新纸币的涂鸦程度,即涂鸦指数存在差异(不同新旧的纸币,脏污基准也不一样),因此需要采用反射图像和透射图像加权处理技术计算相关阈值条件。然后,将所述加权灰度直方图过均值运算获得灰度背景阈值,所述灰度背景阈值是灰度分布的平均值。接着,将所述反射图像中非水印区空白区域的灰度直方图与所述反射图像中水印区的灰度直方图进行累加求和后获得所述反射图像的灰度直方图,本方案重点研究空白区域的图像涂鸦,因为非空白区域的涂鸦,在反射图像上,背景和前景区分度较小,较难进行区分处理,而空白区域的涂鸦,在反射图像上,可区分度大。最后,根据上述得到的灰度背景阈值和所述反射图像的灰度直方图进行比例运算可获得所述待测纸币的涂鸦指数。通过上述方案,可定量分析纸币的涂鸦程度,将反射图像和透射图像进行加权求和后计算阈值,可适用于不同类型、不同面额、不同新旧程度的纸币,能快速有效判别待测纸币是否存在涂鸦,解决了现有纸币图像涂鸦检测方法算法复杂、耗时长的问题。
可以理解的,纸币图像由于材质和印刷技术,可清晰地在反射图像上观察到空白区域和非空白区域。其中,空白区域为浅油墨区域,非空白区域为深油墨区域。此外,由于纸币印刷采用水印技术,会在纸币图像上形成水印区,反映在反射图像和透射图像上时,其灰度值相比其他区域灰度值更大,因此空白区域包括水印区,即空白区域包括非水印区中的空白区域和水印区。本方案以水印区作为阈值计算的标准,重点研究空白区域的涂鸦检测。
优选地,如图2所示,上述实施例1中步骤S1对所述透射图像进行倾斜矫正具体包括步骤:
S11、通过比较所述透射图像中前景区域的灰度值和背景区域的灰度值获得所述透射图像的边界点,将所述边界点通过最小二乘法进行拟合获得四条边界的直线方程;
S12、通过所述四条边界的直线方程进行联立方程求解后获得所述透射图像的四个顶点,所述四个顶点分别为左上顶点、左下顶点、右上顶点和右下顶点;
S13、根据所述透射图像的四个顶点和四条边界的直线方程,计算所述待测纸币在所述透射图像中沿水平方向和垂直方向的倾斜偏移量,基于所述倾斜偏移量对所述透射图像进行矫正。
步骤S11-S13为所述透射图像进行倾斜矫正的过程,作为分割前景区域和背景区域常用的一种方法为设定一个灰度处于前景与背景之间的阈值,可以获得前景区域和背景区域的边界点。将所述边界点通过最小二乘法进行拟合后可获得边界的四条直线方程;将上述四条直线方程联立方程求解,分别计算四个顶点坐标,所述四个顶点分别为左上顶点、左下顶点、右上顶点和右下顶点。根据四个顶点坐标和四条直线方程,计算所述待测纸币在所述透射图像中沿水平方向和垂直方向的倾斜偏移量,基于所述倾斜偏移量对所述透射图像进行矫正。
优选地,如图3所示,上述实施例1中步骤S2对所述反射图像进行倾斜矫正具体包括步骤:
S21、基于所述反射图像和透射图像的比例关系,将所述透射图像的四个顶点和四条边界的直线方程进行比例运算后获得所述反射图像的四个顶点和四条边界的直线方程;
S22、根据所述反射图像的四个顶点和四条边界的直线方程,计算所述待测纸币在所述反射图像中沿水平方向和垂直方向的倾斜偏移量,基于所述倾斜偏移量对所述反射图像进行矫正。
步骤S21-S22为所述透射图像进行倾斜矫正的过程,因为透射图像和反射图像仅仅是打光的波长不一样,图像的大小之间存在一定的比例关系,因此可以借助透射图像的顶点坐标和直线方程,进行比例转换后确定反射图像的顶点坐标和直线方程,由此获得所述待测纸币在所述反射图像中沿水平方向和垂直方向的倾斜偏移量,基于所述倾斜偏移量对所述反射图像进行矫正。
经过倾斜矫正后的图像才能准确获取水印区的灰度直方图,有利于后续更准确的分析。
参见图4,是本发明实施例2提供的一种纸币涂鸦的检测方法的流程示意图。如图4所示的纸币涂鸦的检测方法的流程示意图包括步骤:
S1’、获取待测纸币的透射图像,对所述透射图像进行倾斜矫正后,将所述透射图像中水印区进行极限分割后,获得N1个小正方形区域;其中,N1≤10000;计算每一所述正方形区域的灰度直方图,将每一所述正方形区域的灰度直方图进行累加后获得所述透射图像中水印区 的灰度直方图;
S2’、获取所述待测纸币的反射图像,对所述反射图像进行倾斜矫正后,计算所述反射图像中非水印区空白区域的灰度直方图;将所述反射图像中水印区进行极限分割后,获得N2个小正方形区域;其中,N2≤10000;计算每一所述正方形区域的灰度直方图,将每一所述正方形区域的灰度直方图进行累加后获得所述反射图像中水印区的灰度直方图;
S3、将所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图进行加权求和后获得水印区的加权灰度直方图;
S4、根据所述加权灰度直方图,通过均值运算获得灰度背景阈值;
S5、将所述反射图像中非水印区空白区域的灰度直方图与所述反射图像中水印区的灰度直方图进行求和后获得所述反射图像的灰度直方图;
S6、基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数。
实施例2的纸币涂鸦的检测方法基于实施例1,其区别在于,计算所述透射图像中水印区和反射图像水印区的灰度直方图具体为:如图5所示,将透射图像水印区1进行极限分割,可分为N1个m 1×m 1小正方形区域2;统计透射图像上N1个正方形区域2灰度直方图进行累加可获得所述透射图像水印区的灰度直方图,其中N1的值越大,m 1的值越小,越能描述水印区的多边形形状;同理,将反射图像水印区进行极限分割,可分为N2个m 2×m 2小正方形区域;统计反射图像上N2个正方形区域灰度直方图进行累加可获得所述反射图像水印区的灰度直方图,其中N2的值越大,m 2的值越小,越能描述水印区的多边形形状。根据极限分割的思想,透射图像水印区和反射图像水印区的面积可分别用下面的式子近似:
Figure PCTCN2018088590-appb-000004
通过极限分割的方法将不规则多边形的水印区分成若干个小正方形,分别获得每一所述小正方形的灰度直方图,再将每一所述小正方形的灰度直方图进行累加可快速获得所述水印区的灰度直方图。
参见图6,是本发明实施例3提供的一种纸币涂鸦的检测方法的流程示意图。如图5所示的纸币涂鸦的检测方法的流程示意图包括步骤:
S1、获取待测纸币的透射图像,对所述透射图像进行倾斜矫正后,计算所述透射图像中水印区的灰度直方图;
S2、获取所述待测纸币的反射图像,对所述反射图像进行倾斜矫正后,计算所述反射图像中水印区的灰度直方图以及所述反射图像中非水印区空白区域的灰度直方图;
S3’、将所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图通过以下公式进行加权求和后获得水印区的加权灰度直方图:
Hist(i) 新水印=k 1×Hist(i) 透射水印+k 2×Hist(i) 反射水印
其中,所述Hist(i) 透射水印为所述透射图像中水印区的灰度直方图,所述Hist(i) 反射水印为所述反射图像中水印区的灰度直方图,所述k 1和k 2分别为所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图的权重,所述Hist(i) 新水印为水印区的加权灰度直方图;
S4’、根据所述加权灰度直方图,通过以下公式进行均值运算获得灰度背景阈值:
Figure PCTCN2018088590-appb-000005
其中,θ为所述灰度背景阈值,r为预设的亮点比例,Hist(i) 新水印为所述水印区的加权灰度直方图,t为r亮点比例对应的灰度值;
S5、将所述反射图像中非水印区空白区域的灰度直方图与所述反射图像中水印区的灰度直方图进行求和后获得所述反射图像的灰度直方图;
S6’、基于所述灰度背景阈值和所述反射图像的灰度直方图,通过以下公式进行比例运算后获得所述待测纸币的涂鸦指数:
Figure PCTCN2018088590-appb-000006
其中,所述Graffiti为所述待测纸币的涂鸦指数,Hist 反射(i)为所述反射图像的灰度直方图,θ为所述灰度背景阈值,n为预设的拉伸次数,2≤n≤9。
结合图7-10,将对本实施例的工作工程和原理进行具体描述。具体实施时,先获取待测纸币的反射图像和透射图像,再分别计算反射图像和透射图像上水印区的灰度直方图,然后将反射图像和透射图像中水印区的灰度直方图进行加权求和获得水印区的加权灰度直方图,反射图像可较清晰的观察到纸币的涂写情况,而透射图像的亮暗程度可较清晰地反映纸币的新旧程度,进一步解释,相同程度涂鸦条件下,旧纸币和新纸币的涂鸦程度,即涂鸦指数存在差异(不同新旧的纸币,脏污基准也不一样),因此需要采用反射图像和透射图像加权处理技术计算相关阈值条件。如图9所示,经过加权处理后的灰度直方图相对图8的反射图像的灰度直方图,引入了透射水印区信息,其图像更加正态化,更加符合标准非涂鸦纸币水印区直方图特征,同时,引入透射水印区信息,可更好地描述旧纸币的的透射信息,进一步增强了旧纸币和新纸币相同程度涂鸦的差异性,使得本方案可适用于不同新旧程度的纸币涂鸦检测。k1和k2分别为所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图的权重,它们由不同种类、不同面额的纸币来决定,作为一种经验值,可很好地描述某一种类或某一面额的纸币的状态。接着,根据水印区的加权灰度直方图,进行均值运算可求得灰度背景阈值θ。在本实施例中,引入亮点比例r的均值作为参考,可剔除水印区可能存在涂鸦的影响,因为纸币的涂鸦是暗点,所以选取一定比例的亮点可避免涂鸦的干扰,稳定性更优一般情况下,越靠近255的灰度值点为亮点,越靠近0的灰度值点为暗点,t为r亮点比例对应的灰度值,介于255~0之间,且满足以下条件:
Figure PCTCN2018088590-appb-000007
其中,其中r为预设的亮点比例,Hist(i) 新水印为所述水印区的加权灰度直方图。为了方便进行说明,仅以亮点比例r=0.3对本发明实施例进行描述,本发明提供的纸币涂鸦的检测方法并不限于亮点比例r=0.3。当亮点比例r=0.3,t为前30%亮点比例对应的灰度值,也就是Hist(i) 新水印从i=255到i=0遍历累加直到总数到达30%的总的像素点时所对应的i值即为t。计算前30%亮点比例灰度分布的平均值具体为,将iHist(i) 新水印从i=255到i=t进行累加可得到30%总像素点的亮点分布总和,再将上述累加值除以30%总像素点可得到前30%亮点比例灰度分布的平均值,从而获得灰度背景阈值θ。然后将所述反射图像中非水印区空白区域的灰度直方图Hist 反射非水印与所述反射图像中水印区的灰度直方图Hist 反射水印进行求和后获得所述反射图像的灰度直方图Hist 反射(i),如图10所示。因为本发明的研究重点为空白区域的涂鸦,因此必须排除非水印区非空白区域,以免对结果造成干扰。最后,基于所述灰度背景阈值θ和所述反射图像的灰 度直方图,通过比例运算后获得所述待测纸币的涂鸦指数Graffiti。由上述计算涂鸦指数Graffiti的式子可知,涂鸦指数Graffiti的范围在0~255之间,与灰度值的特征相对应,当涂鸦指数Graffiti越小时,涂鸦越严重,当涂鸦指数Graffiti越大时,涂鸦越轻微。将上述计算涂鸦指数Graffiti的式子进行简化可得:
Figure PCTCN2018088590-appb-000008
当纸币涂鸦较为严重时,则占据前灰度背景阈值θ的像素点的比例较高,则
Figure PCTCN2018088590-appb-000009
较大,涂鸦指数Graffiti越小,越接近0;反之,当纸币涂鸦较为轻微时,则占据前灰度背景阈值θ的像素点的比例较低,即
Figure PCTCN2018088590-appb-000010
较小,涂鸦指数Graffiti越大,越接近255;式子中的n为拉伸指数,当n=1时属于线性拉伸,会使得纸币涂鸦程度刻画效果不佳;当n过大时,会使得纸币涂鸦程度刻画过于敏感,极易产生误判的情况,所以2≤n≤9。
本发明实施例还对应提供了一种纸币涂鸦的检测装置100,包括:
第一处理模块101,用于获取待测纸币的透射图像,对所述透射图像进行倾斜矫正后,计算所述透射图像中水印区的灰度直方图;
第二处理模块102,用于获取所述待测纸币的反射图像,对所述反射图像进行倾斜矫正后,计算所述反射图像中水印区的灰度直方图及所述反射图像中非水印区空白区域的灰度直方图;
加权求和模块103,用于将所述透射图像中水印区和反射图像中水印区的灰度直方图进行加权求和后获得水印区的加权灰度直方图;
阈值获取模块104,用于根据所述加权灰度直方图,通过均值运算获得灰度背景阈值;
第三处理模块105,用于将所述反射图像中非水印区空白区域的灰度直方图与水印区的灰度直方图进行累加求和后获得所述反射图像的灰度直方图;
检测模块106,用于基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数。
如图11所示的纸币涂鸦的检测装置100的工作过程可参考上述实施例对纸币涂鸦的检测装置的具体描述,在此不再赘述。
综上,本发明公开了一种纸币涂鸦的检测方法及装置,通过以纸币水印区作为标准,分别计算其在反射图像和透射图像上的灰度直方图后进行加权求和后获得加权灰度直方图,根据加权灰度直方图进行均值运算后获得水印区的灰度背景阈值,将反射图像中非水印区空白区域的灰度直方图和水印区的灰度直方图获得所述反射图像的灰度直方图,基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数,解决了现有纸币图像涂鸦检测方法算法复杂、耗时长的问题,能定量描述纸币的涂鸦程度,适用于各种不同类型的纸币,快速有效。
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。

Claims (10)

  1. 一种纸币涂鸦的检测方法,其特征在于,包括步骤:
    获取待测纸币的透射图像,对所述透射图像进行倾斜矫正后,计算所述透射图像中水印区的灰度直方图;
    获取所述待测纸币的反射图像,对所述反射图像进行倾斜矫正后,计算所述反射图像中水印区的灰度直方图以及所述反射图像中非水印区空白区域的灰度直方图;
    将所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图进行加权求和后获得水印区的加权灰度直方图;
    根据所述加权灰度直方图,通过均值运算获得灰度背景阈值;
    将所述反射图像中非水印区空白区域的灰度直方图与所述反射图像中水印区的灰度直方图进行累加求和后获得所述反射图像的灰度直方图;
    基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数。
  2. 如权利要求1所述的纸币涂鸦的检测方法,其特征在于,对所述透射图像进行倾斜矫正具体包括步骤:
    通过比较所述透射图像中前景区域的灰度值和背景区域的灰度值获得所述透射图像的边界点,将所述边界点通过最小二乘法进行拟合获得四条边界的直线方程;
    通过所述四条边界的直线方程进行联立方程求解后获得所述透射图像的四个顶点,所述四个顶点分别为左上顶点、左下顶点、右上顶点和右下顶点;
    根据所述透射图像的四个顶点和四条边界的直线方程,计算所述待测纸币在所述透射图像中沿水平方向和垂直方向的倾斜偏移量,基于所述倾斜偏移量对所述透射图像进行矫正。
  3. 如权利要求2所述的纸币涂鸦的检测方法,其特征在于,对所述反射图像进行倾斜矫正包括步骤:
    基于所述反射图像和透射图像的比例关系,将所述透射图像的四个顶点和四条边界的直线方程进行比例运算后获得所述反射图像的四个顶点和四条边界的直线方程;
    根据所述反射图像的四个顶点和四条边界的直线方程,计算所述待测纸币在所述反射图像中沿水平方向和垂直方向的倾斜偏移量,基于所述倾斜偏移量对所述反射图像进行矫正。
  4. 如权利要求1所述的纸币涂鸦的检测方法,其特征在于,计算所述透射图像中水印区的灰度直方图具体为:
    将所述透射图像中水印区进行极限分割后,获得N1个小正方形区域;其中,N1≤10000;
    计算每一所述正方形区域的灰度直方图,将每一所述正方形区域的灰度直方图进行累加后获得所述透射图像中水印区的灰度直方图。
  5. 如权利要求1所述的纸币涂鸦的检测方法,其特征在于,计算所述反射图像中水印区的灰度直方图具体为:
    将所述反射图像中水印区进行极限分割后,获得N2个小正方形区域;其中,N2≤10000;
    计算每一所述正方形区域的灰度直方图,将每一所述正方形区域的灰度直方图进行累加后获得所述反射图像中水印区的灰度直方图。
  6. 如权利要求1或4或5所述的纸币涂鸦的检测方法,其特征在于,通过以下公式对进行加权求和后获得加权灰度直方图:
    Hist(i) 新水印=k 1×Hist(i) 透射水印+k 2×Hist(i) 反射水印
    其中,所述Hist(i) 透射水印为所述透射图像中水印区的灰度直方图,所述Hist(i) 反射水印为所述反射图像中水印区的灰度直方图,所述k 1和k 2分别为所述透射图像中水印区的灰度直方图和所述反射图像中水印区的灰度直方图的权重,所述Hist(i) 新水印为水印区的加权灰度直方图。
  7. 如权利要求6所述的纸币涂鸦的检测方法,其特征在于,通过以下公式计算所述水印区的灰度背景阈值:
    Figure PCTCN2018088590-appb-100001
    其中r为预设的亮点比例,Hist(i) 新水印为所述水印区的加权灰度直方图,t为r亮点比例对应的灰度值。
  8. 如权利要求7所述的纸币涂鸦的检测方法,其特征在于,所述r亮点比例对应的灰度值t介于255~0之间,且满足以下条件:
    Figure PCTCN2018088590-appb-100002
    其中,其中r为预设的亮点比例,Hist(i) 新水印为所述水印区的加权灰度直方图。
  9. 如权利要求7所述的纸币涂鸦的检测方法,其特征在于,通过以下公式计算所述待测纸币的涂鸦指数:
    Figure PCTCN2018088590-appb-100003
    其中,所述Graffiti为所述待测纸币的涂鸦指数,Hist 反射(i)为所述反射图像的灰度直方图,θ为所述灰度背景阈值,n为预设的拉伸次数,2≤n≤9。
  10. 一种纸币涂鸦的检测装置,其特征在于,包括:
    第一处理模块,用于获取待测纸币的透射图像,对所述透射图像进行倾斜矫正后,计算所述透射图像中水印区的灰度直方图;
    第二处理模块,用于获取所述待测纸币的反射图像,对所述反射图像进行倾斜矫正后,计算所述反射图像中水印区的灰度直方图以及所述反射图像中非水印区空白区域的灰度直方图;
    加权求和模块,用于将所述透射图像中水印区和反射图像中水印区的灰度直方图进行加权 求和后获得水印区的加权灰度直方图;
    阈值获取模块,用于根据所述加权灰度直方图,通过均值运算获得灰度背景阈值;
    第三处理模块,用于将所述反射图像中非水印区空白区域的灰度直方图与水印区的灰度直方图进行累加求和后获得所述反射图像的灰度直方图;
    检测模块,用于基于所述灰度背景阈值和所述反射图像的灰度直方图,通过比例运算后获得所述待测纸币的涂鸦指数。
PCT/CN2018/088590 2017-07-03 2018-05-27 纸币涂鸦的检测方法及装置 WO2019007164A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710530067.XA CN107481391B (zh) 2017-07-03 2017-07-03 纸币涂鸦的检测方法及装置
CN201710530067.X 2017-07-03

Publications (1)

Publication Number Publication Date
WO2019007164A1 true WO2019007164A1 (zh) 2019-01-10

Family

ID=60595536

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/088590 WO2019007164A1 (zh) 2017-07-03 2018-05-27 纸币涂鸦的检测方法及装置

Country Status (2)

Country Link
CN (1) CN107481391B (zh)
WO (1) WO2019007164A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107481391B (zh) * 2017-07-03 2019-11-19 广州广电运通金融电子股份有限公司 纸币涂鸦的检测方法及装置
CN111415450B (zh) * 2019-01-08 2022-03-08 深圳怡化电脑股份有限公司 票据涂改的检测方法及其检测装置、计算机存储介质
CN113686897B (zh) * 2021-08-05 2023-11-03 江苏维普光电科技有限公司 一种掩模表面颗粒缺陷检测方法

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008250530A (ja) * 2007-03-29 2008-10-16 Toshiba Corp 銀行券鑑査装置及び鑑査方法
CN101981594A (zh) * 2009-04-27 2011-02-23 株式会社东芝 片材处理系统
JP2013008321A (ja) * 2011-06-27 2013-01-10 Toshiba Corp 紙葉類処理装置
CN103456074A (zh) * 2012-05-29 2013-12-18 日立欧姆龙金融系统有限公司 纸张类处理装置、纸张类处理方法、自动交易系统
CN103778711A (zh) * 2012-10-24 2014-05-07 日立欧姆龙金融系统有限公司 纸张类处理装置、纸张类分类装置及纸张类分类系统
CN104200561A (zh) * 2014-06-16 2014-12-10 华中科技大学 一种基于纹理特征识别具有字迹污损人民币的方法
CN106898082A (zh) * 2017-03-15 2017-06-27 深圳怡化电脑股份有限公司 一种图像污损判定的方法及装置
CN107481391A (zh) * 2017-07-03 2017-12-15 广州广电运通金融电子股份有限公司 纸币涂鸦的检测方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5314419B2 (ja) * 2006-03-16 2013-10-16 株式会社ユニバーサルエンターテインメント 紙幣の真贋判定方法、及び紙幣の真贋判定装置
CN102682514B (zh) * 2012-05-17 2014-07-02 广州广电运通金融电子股份有限公司 一种纸类识别方法及相关装置
CN104091388B (zh) * 2014-07-22 2016-06-22 新达通科技股份有限公司 一种基于磁图像的纸币鉴伪方法及装置
DE102014015746A1 (de) * 2014-10-24 2016-04-28 Giesecke & Devrient Gmbh Vorrichtung und Verfahren zur Prüfung von Wertdokumenten, insbesondere Banknoten, sowie Wertdokumentbearbeitungssystem
CN106683264B (zh) * 2017-02-20 2020-07-21 深圳怡化电脑股份有限公司 一种污损冠字号的识别方法及装置
CN106875545B (zh) * 2017-03-01 2019-12-10 深圳怡化电脑股份有限公司 一种纸币的鉴别方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008250530A (ja) * 2007-03-29 2008-10-16 Toshiba Corp 銀行券鑑査装置及び鑑査方法
CN101981594A (zh) * 2009-04-27 2011-02-23 株式会社东芝 片材处理系统
JP2013008321A (ja) * 2011-06-27 2013-01-10 Toshiba Corp 紙葉類処理装置
CN103456074A (zh) * 2012-05-29 2013-12-18 日立欧姆龙金融系统有限公司 纸张类处理装置、纸张类处理方法、自动交易系统
CN103778711A (zh) * 2012-10-24 2014-05-07 日立欧姆龙金融系统有限公司 纸张类处理装置、纸张类分类装置及纸张类分类系统
CN104200561A (zh) * 2014-06-16 2014-12-10 华中科技大学 一种基于纹理特征识别具有字迹污损人民币的方法
CN106898082A (zh) * 2017-03-15 2017-06-27 深圳怡化电脑股份有限公司 一种图像污损判定的方法及装置
CN107481391A (zh) * 2017-07-03 2017-12-15 广州广电运通金融电子股份有限公司 纸币涂鸦的检测方法及装置

Also Published As

Publication number Publication date
CN107481391B (zh) 2019-11-19
CN107481391A (zh) 2017-12-15

Similar Documents

Publication Publication Date Title
CN108629775B (zh) 一种热态高速线材表面图像处理方法
WO2022110804A1 (zh) 一种基于局部统计信息的图像噪声检测方法、装置
CN113570605B (zh) 一种基于液晶显示面板的缺陷检测方法和系统
US20010055415A1 (en) Pattern inspection method and pattern inspection device
WO2019007164A1 (zh) 纸币涂鸦的检测方法及装置
CN106952393B (zh) 纸币识别方法和装置、电子设备和存储介质
CN116559183B (zh) 一种提高缺陷判定效率的方法及系统
CN104697476A (zh) 粗糙度光切轮廓曲线的自动检测方法及装置
CN117115153B (zh) 基于视觉辅助的印制线路板质量智能检测方法
CN110443278B (zh) 一种太阳能电池片栅线粗细异常的检测方法、装置及设备
KR20090101356A (ko) 결함 검출 장치 및 결함 검출 방법
CN114494210A (zh) 基于图像处理的塑料膜生产缺陷检测方法及系统
WO2019001191A1 (zh) 一种拼接票据的检测方法及拼接票据的检测装置
CN102034108A (zh) 基于多分辨网格特征配准的清分机纸币面值面向分类方法
CN117764986B (zh) 基于图像处理的钛板表面缺陷检测方法
CN116523923B (zh) 一种电池外壳缺陷识别方法
CN115359053A (zh) 一种金属板材缺陷智能检测方法及系统
CN115861307B (zh) 基于人工智能的筋膜枪供电驱动板焊接故障检测方法
CN114820612A (zh) 基于机器视觉的轧辊表面缺陷检测方法及系统
CN113252103A (zh) 一种基于matlab图像识别技术计算物料堆体积及质量的方法
CN106934922A (zh) 一种纸币检测方法及装置
CN108711213B (zh) 一种纸币斑马线黑白块的识别方法及装置
CN108805854B (zh) 一种复杂环境下药片快速计数与完整性检测方法
CN116385440B (zh) 一种弧形刀片视觉检测方法
CN106447910A (zh) 一种纸币识别的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18827352

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18827352

Country of ref document: EP

Kind code of ref document: A1