CN111563845B - Bill surface scratch detection method, device, equipment and storage medium - Google Patents

Bill surface scratch detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN111563845B
CN111563845B CN201910080302.7A CN201910080302A CN111563845B CN 111563845 B CN111563845 B CN 111563845B CN 201910080302 A CN201910080302 A CN 201910080302A CN 111563845 B CN111563845 B CN 111563845B
Authority
CN
China
Prior art keywords
standard deviation
image
transverse
bill
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910080302.7A
Other languages
Chinese (zh)
Other versions
CN111563845A (en
Inventor
杜杨君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201910080302.7A priority Critical patent/CN111563845B/en
Publication of CN111563845A publication Critical patent/CN111563845A/en
Application granted granted Critical
Publication of CN111563845B publication Critical patent/CN111563845B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • 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

Landscapes

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

Abstract

The invention discloses a bill surface scraping detection method, a bill surface scraping detection device, bill surface scraping detection equipment and a storage medium. The method comprises the following steps: acquiring a gray level image of a bill to be detected, wherein the background texture of the bill to be detected is dense, and the gray level image comprises: an original gray image and/or a sharpened gray image; processing the gray level image by adopting a transverse sliding window and/or a longitudinal sliding window to obtain a processed image, and solving at least one non-highlight connected domain contained in the processed image as a smooth region corresponding to the bill to be detected; judging whether at least one smooth area with the size larger than a set scraping size threshold exists, and if so, marking the at least one smooth area as a scraping area. The method does not depend on color change to distinguish whether the bill surface is coated or not, is irrelevant to whether characters exist in a coating and scraping area, further improves the identification capability of financial equipment on paper money, deposit slips, checks and the like, and reduces the workload of manual secondary check.

Description

Bill surface scratch detection method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to a bill surface scraping detection method, device and equipment and a storage medium.
Background
Detecting whether the surfaces of bills such as deposit slips, checks, paper money and the like have smearing, altering, pasting, scraping and the like is helpful for judging whether the bills are damaged or altered and the like.
In general, whether a scratch phenomenon exists may be determined by determining a color change of a region to be detected, for example, the color of the scratched region after the scratch is changed from bright to dark or from dark to bright, and further, whether the scratch phenomenon exists in the region to be detected may be determined by binarized image processing. In addition, the gray level histogram of the region to be detected can be counted, and whether the scraping phenomenon exists in the region to be detected can be determined by judging whether obvious changes exist in the gray level histogram.
However, judging whether the scratch phenomenon exists in the region to be detected by a binarization image processing or gray histogram statistics method has a large limitation. If the color difference of the area to be detected after being scraped is not large, the area to be detected cannot be detected by using a binarized image processing method. Moreover, there may be interference (character position, size, color uncertainty) between the handwritten character and the printed character in the region to be detected, which may also result in failure of the methods of binarized image processing and gray histogram statistics.
Disclosure of Invention
The embodiment of the invention provides a bill surface scratch detection method, a bill surface scratch detection device, bill surface scratch detection equipment and a storage medium, so that a bill surface scratch detection method in the prior art is optimized, the identification capability of financial equipment on paper money, deposit slips, checks and the like is improved, and manual secondary check is reduced.
In a first aspect, an embodiment of the present invention provides a method for detecting scratch on a bill surface, including:
acquiring a gray level image of a bill to be detected, wherein the background texture of the bill to be detected is dense, and the gray level image comprises an original gray level image and/or a sharpened gray level image;
processing the gray level image by adopting a transverse sliding window and/or a longitudinal sliding window to obtain a processed image, and solving at least one non-highlight connected domain contained in the processed image as a smooth region corresponding to the bill to be detected;
judging whether at least one smooth area with the size larger than a set scraping size threshold exists, and if so, marking the at least one smooth area as a scraping area.
In a second aspect, an embodiment of the present invention further provides a device for scratch detection on a bill surface, including:
the system comprises a gray image acquisition module, a gray image acquisition module and a display module, wherein the gray image acquisition module is used for acquiring a gray image of a bill to be detected, the background texture of the bill to be detected is dense, and the gray image comprises an original gray image and/or a sharpened gray image;
The smooth region acquisition module is used for processing the gray level image by adopting a transverse sliding window and/or a longitudinal sliding window to obtain a processed image, and solving at least one non-highlight connected region included in the processed image as a smooth region corresponding to the bill to be detected;
and the scraping judging module is used for judging whether at least one smooth area with the size larger than the set scraping size threshold exists or not, and if yes, marking the at least one smooth area as a scraping area.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the method for scratch detection of a ticket surface according to any embodiment of the present invention when the processor executes the program.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a ticket surface scratch detection method as provided in any embodiment of the present invention.
In the embodiment of the invention, the gray level image of the bill to be detected with dense background texture is processed by adopting the transverse sliding window and/or the longitudinal sliding window to obtain a processed image, at least one non-highlight connected domain is obtained in the processed image as a smooth region corresponding to the bill to be detected, and if at least one smooth region with the size larger than the set scraping size threshold exists, the existence of a scraping region in the bill to be detected can be confirmed, wherein the scraping region is at least one smooth region larger than the set scraping size threshold. According to the bill surface scratch detection method provided by the embodiment of the invention, whether the bill surface is scratched is distinguished without depending on color change, and meanwhile, whether handwritten characters or printed characters exist in a scratch area is irrelevant, so that the identification capability of financial equipment on paper money, deposit slips, checks and the like is improved, and the workload of manual secondary check is reduced.
Drawings
FIG. 1 is a flow chart of a method for detecting scratch on a bill surface according to a first embodiment of the invention;
FIG. 2 is a flow chart of a method for detecting scratch on a bill surface in a second embodiment of the invention;
FIG. 3 is a flow chart of a method for detecting scratch on a bill surface in a third embodiment of the invention;
FIG. 4 is a flow chart of a method for detecting scratch on a bill surface in a fourth embodiment of the invention;
FIG. 5 is a flow chart of a method for detecting scratch on a bill surface in a fifth embodiment of the invention;
FIG. 6 is an original gray scale pictorial representation of a ticket to be detected in a fifth embodiment of the present invention;
FIG. 7 is a sharp gray scale pictorial representation of a ticket to be inspected in a fifth embodiment of the present invention;
FIG. 8 is a schematic diagram of a transverse standard deviation difference image of a bill to be detected in a fifth embodiment of the present invention;
FIG. 9 is a schematic diagram of a longitudinal standard deviation image of a bill to be detected in a fifth embodiment of the present invention;
FIG. 10 is a diagram of a binarized transverse standard deviation difference image of a bill to be detected in a fifth embodiment of the present invention;
FIG. 11 is a diagram of a binarized longitudinal standard deviation difference image of a bill to be detected in a fifth embodiment of the present invention;
FIG. 12 is a schematic view of an intersection image of a binarized transverse standard deviation difference image and a binarized longitudinal standard deviation difference image in a fifth embodiment of the present invention;
FIG. 13 is a schematic view of a scratch area marking on the surface of a ticket in a fifth embodiment of the invention;
FIG. 14 is a schematic view of a bill surface scraping and detecting device according to a sixth embodiment of the present invention;
fig. 15 is a schematic structural diagram of a computer device according to a seventh embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example 1
Fig. 1 is a flowchart of a method for detecting scratch on a bill surface, which is provided in an embodiment of the present invention, and is applicable to detecting whether a scratch phenomenon exists on a bill (banknote, check, deposit slip, etc.), where the method may be performed by a bill surface scratch detection device provided in an embodiment of the present invention, and the device may be implemented in a software and/or hardware manner, and may be generally integrated in a processor of a financial device (typically, a financial device includes various types of sorter and ATM, etc.). As shown in fig. 1, the method in this embodiment specifically includes:
s110, acquiring gray level images of the bill to be detected, wherein the background textures of the bill to be detected are dense, and the gray level images comprise original gray level images and/or sharpened gray level images.
The bill surface scraping detection method provided by the embodiment of the invention is suitable for the condition that dense textures exist on the bill surface, namely the background textures of the bill to be detected are dense, such as paper money, checks, deposit slips and the like, and the surfaces of the bills are not smooth, but have some dense textures, especially important anti-counterfeiting areas.
Firstly, converting an original color image of a bill to be detected into an original gray image, and sharpening the original gray image to obtain a sharpened gray image in order to improve the definition of textures in the original gray image. In the process of sharpening the original gray-scale image, a specific implementation manner may be that a sliding window of n×n (for example, 3×3 or 5×5) is used to perform gaussian filtering on the original gray-scale image to obtain a filtered image, then the filtered image is subtracted from the original gray-scale image to obtain a contrast image, and the original gray-scale image and the contrast image are overlapped to obtain a sharpened gray-scale image. The background texture in the sharpened grayscale image is clearer than the original grayscale image.
S120, processing the gray level image by adopting a transverse sliding window and/or a longitudinal sliding window to obtain a processed image, and solving at least one non-highlight connected domain contained in the processed image as a smooth region corresponding to the bill to be detected.
The background texture of the bill surface can be changed by smearing, the background texture of the smearing area can disappear, the originally unsmooth area can be smoothened due to smearing, further the gray level image can be processed, and the smooth area in the processed image can be obtained to be used as the smearing area to be determined.
The smooth area can be understood as an area with small image fluctuation, and the fluctuation condition of a group of image data can be measured by using the standard deviation, and the larger the standard deviation is, the larger the fluctuation is, the smaller the standard deviation is, and the smaller the fluctuation is. Specifically, a horizontal sliding window and/or a vertical sliding window may be used to process the gray scale image to obtain a standard deviation gray scale image, and then binarizing the standard deviation gray scale image is performed.
The standard deviation of the smooth area is small, the gray value of the pixel point in the area corresponding to the smooth area in the obtained standard deviation gray image is small, a binarization dividing threshold value is selected to carry out binarization processing on the standard deviation gray image, the gray value of the pixel point with small gray value is set to 0, namely the pixel point is set to be a non-highlight pixel point, and the connected area formed by the pixel points with 0 gray value is the non-highlight connected area, namely the area corresponding to the smooth area. Further, at least one non-highlight connected region included in the processed image is obtained as at least one smooth region corresponding to the bill to be detected, and the at least one smooth region is used as a scratch region to be determined.
S130, judging whether at least one smooth area with the size larger than the set scraping size threshold exists, and if so, marking the at least one smooth area as a scraping area.
The scratch area with too small a size on the bill surface is not easy to distinguish, and may be misidentified or missed, so that a scratch size threshold is preset for determining the size of the minimum scratch area, where the scratch size threshold may be 5mm×5mm, and this embodiment is not limited specifically.
If there are smooth areas with sizes larger than the set scraping size threshold, the surface of the bill to be detected is considered to have a scraping phenomenon, and the smooth areas with sizes larger than the set scraping size threshold are marked as scraping areas. If there is no smooth area with a size greater than the set scratch size threshold, it can be considered that there is no scratch phenomenon on the surface of the ticket to be detected.
In the embodiment of the invention, the gray level image of the bill to be detected with dense background texture is processed by adopting the transverse sliding window and/or the longitudinal sliding window to obtain a processed image, at least one non-highlight connected domain is obtained in the processed image as a smooth region corresponding to the bill to be detected, and if at least one smooth region with the size larger than the set scraping size threshold exists, the existence of a scraping region in the bill to be detected can be confirmed, wherein the scraping region is at least one smooth region larger than the set scraping size threshold. According to the bill surface scratch detection method provided by the embodiment of the invention, whether the bill surface is scratched is distinguished without depending on color change, and meanwhile, whether handwritten characters or printed characters exist in a scratch area is irrelevant, so that the identification capability of financial equipment on paper money, deposit slips, checks and the like is improved, and the workload of manual secondary check is reduced.
Example two
Fig. 2 is a flowchart of a method for detecting scratch on a bill surface, which is provided by a second embodiment of the present invention, and is embodied based on the above technical solution, where a gray scale image is processed by using a horizontal sliding window or a vertical sliding window, so as to obtain a processed image, and at least one non-highlight connected domain included in the processed image is obtained as a smooth region corresponding to the bill to be detected, where the method specifically includes:
calculating a standard deviation matrix of an original gray level image or a sharpened gray level image by adopting a horizontal sliding window or a vertical sliding window;
normalizing the elements in the standard deviation matrix to a set gray scale range to generate a standard deviation image;
performing binarization processing on the standard deviation image to obtain a binarized standard deviation image;
and solving at least one non-highlight connected domain contained in the binarized standard deviation image as a smooth area corresponding to the bill to be detected.
As shown in fig. 2, the method in this embodiment specifically includes:
s210, acquiring an original gray level image or a sharpened gray level image of the bill to be detected, wherein the background texture of the bill to be detected is dense.
S220, calculating a standard deviation matrix of the original gray level image or the sharpened gray level image by adopting a horizontal sliding window or a vertical sliding window.
And performing mean filtering or median filtering-like operation on the original gray image or the sharpened gray image to obtain a corresponding standard deviation image so as to measure the smoothness of the original gray image or the sharpened gray image.
In this embodiment, any one of the original gray-scale image and the sharpened gray-scale image may be selected for bill surface scratch detection.
Specifically, an mxn sliding window may be selected, slid on the original gray-scale image or the sharpened gray-scale image, and a standard deviation of gray-scale values of mxn pixel points in the sliding window is calculated, and the standard deviation is filled in a center position of a corresponding window in the standard deviation matrix, thereby obtaining a standard deviation matrix.
The size of the sliding window mxn may be adjusted according to the actual image, where M and N may be the same natural number, or may be different natural numbers, for example, the size of the sliding window is 3×3, or 2×6, or 6×2, or the like, the longitudinal sliding window is a sliding window of mxn (e.g. 6×2) where M > N, and the transverse sliding window is a sliding window of mxn (e.g. 2×6) where M < N. When a sliding window with a size of 3×3 is selected to slide on the original gray-scale image or the sharpened gray-scale image, a standard deviation of gray-scale values of 9 pixels in the sliding window is calculated every time the sliding window is slid, and the standard deviation is filled in a center position of a corresponding window (i.e., a 3×3 matrix) in the standard deviation matrix, thereby obtaining a standard deviation matrix.
Typically, according to the trend of the background texture of the bill to be detected, a sliding window in a matching direction is selected to calculate a standard deviation matrix, so that the difference between the values of the elements representing the smooth area and the values of the elements representing the non-smooth area in the calculated standard deviation matrix is larger, wherein when the background texture of the bill to be detected is a transverse texture, a longitudinal sliding window can be adopted to calculate the standard deviation matrix of an original gray level image or a sharpened gray level image; when the background texture of the bill to be detected is longitudinal texture, a transverse sliding window can be adopted to calculate the standard deviation matrix of the original gray level image or the sharpened gray level image.
And S230, normalizing the values of the elements in the standard deviation matrix to a set gray scale range, and generating a standard deviation image.
And normalizing the values of the elements in the standard deviation matrix (namely, the calculated values of the standard deviations) to a set gray scale range of 0-255, wherein the element values are small, the normalized gray scale values are small, the element values are large, and the normalized gray scale values are large, so that a standard deviation image is obtained, and a gray scale image is obtained.
S240, performing binarization processing on the standard deviation image to obtain a binarized standard deviation image.
And selecting a binarization segmentation threshold value, performing binarization processing on the standard deviation image, wherein the binarization segmentation threshold value can be determined according to an empirical value or a statistical value, setting the binarization segmentation threshold value to be a numerical value between 45 and 55 according to the empirical value, setting the gray value of a pixel point with a gray value larger than or equal to the binarization segmentation threshold value in the standard deviation image to be 255, setting the gray value of a pixel point with a gray value smaller than the binarization segmentation threshold value in the standard deviation image to be 0, and performing denoising operation on the pixel point after performing the binarization operation to obtain the binarization standard deviation image.
The highlight connected domain in the binarized standard deviation image is a region with unsmooth surface (large standard deviation value) corresponding to the bill to be detected, and the non-highlight connected domain is a region with smooth surface (small standard deviation value) corresponding to the bill to be detected.
S250, at least one non-highlight connected domain included in the binarized standard deviation image is obtained to serve as a sliding region corresponding to the bill to be detected.
Specifically, a common algorithm may be used to find the connected domain in the binary standard deviation image, for example, two-Pass (Two-Pass scanning method) and Seed-filtering (Seed Filling method), where Two-Pass refers to finding and marking all the connected domains existing in the image by scanning the image for Two passes, and Seed-filtering refers to selecting a foreground pixel point as a Seed, then merging foreground pixels adjacent to the Seed into the same pixel set according to Two basic conditions (the same pixel value and adjacent position) of the connected domain, and the finally obtained pixel set is a connected domain.
In the implementation of the invention, according to the Two-Pass or Seed-filtering algorithm, a non-highlight connected region in the binary standard deviation image, namely a connected region with the gray value of the pixel point being 0 is obtained.
And S260, judging whether at least one smooth area with the size larger than the set scraping size threshold exists, and if so, marking the at least one smooth area as a scraping area.
The present embodiment is not explained in detail herein, and reference is made to the foregoing embodiments.
The technical scheme provided by the embodiment is suitable for the bill to be detected with unidirectional background texture, the transverse sliding window or the longitudinal sliding window is adopted to process the original gray level image or the sharpened gray level image, at least one smooth area corresponding to the bill to be detected is determined, the smooth area with the size larger than the set scraping size threshold is marked as a scraping area, the detection rate of the scraping area on the surface of the bill is improved, the identification capability of financial equipment on paper money, deposit bill, check and the like is further improved, and the workload of manual secondary checking is reduced.
Example III
Fig. 3 is a flowchart of a method for detecting scratch on a bill surface, which is provided by a third embodiment of the present invention, and is embodied based on the above technical solution, where a gray scale image is processed by using a horizontal sliding window or a vertical sliding window, so as to obtain a processed image, and at least one non-highlight connected domain included in the processed image is obtained as a smooth region corresponding to the bill to be detected, where the method specifically includes:
Calculating a first standard deviation matrix of the original gray level image and a second standard deviation matrix of the sharpened gray level image by adopting a horizontal sliding window or a longitudinal sliding window;
calculating a standard deviation difference matrix according to the first standard deviation matrix and the second standard deviation matrix;
normalizing the values of elements in the standard deviation difference matrix to a set gray scale range to generate a standard deviation difference image;
performing binarization processing on the standard deviation difference image to obtain a binarized standard deviation difference image;
and solving at least one non-highlight connected domain contained in the binarized standard deviation difference image as a smooth area corresponding to the bill to be detected.
Specifically, when the background texture of the bill to be detected is a transverse texture, a longitudinal sliding window is adopted; and when the background texture of the bill to be detected is longitudinal texture, adopting a transverse sliding window.
As shown in fig. 3, the method in this embodiment specifically includes:
s310, acquiring an original gray level image and a sharpened gray level image of the bill to be detected, wherein the background texture of the bill to be detected is dense.
S320, calculating a first standard deviation matrix of the original gray level image and a second standard deviation matrix of the sharpened gray level image by adopting a horizontal sliding window or a vertical sliding window.
In the step, when the background texture of the bill to be detected is a transverse texture, a longitudinal sliding window is adopted to calculate a first standard deviation matrix of an original gray level image and a second standard deviation matrix of a sharpened gray level image. And when the background texture of the bill to be detected is a longitudinal texture, calculating a first standard deviation matrix of the original gray level image and a second standard deviation matrix of the sharpened gray level image by adopting a transverse sliding window.
S330, calculating a standard deviation difference matrix according to the first standard deviation matrix and the second standard deviation matrix.
Subtracting the second standard deviation matrix from the first standard deviation matrix to obtain a standard deviation difference matrix, and taking the absolute value of the element as the corresponding element value in the standard deviation difference matrix if the result of the element corresponding subtraction is a negative value, and further carrying out subsequent processing according to the obtained standard deviation difference matrix.
And S340, normalizing the values of the elements in the standard deviation difference matrix to a set gray scale range, and generating a standard deviation difference image.
S350, performing binarization processing on the standard deviation difference image to obtain a binarized standard deviation difference image.
S360, at least one non-highlight connected domain included in the binarized standard deviation difference image is obtained to serve as a smooth area corresponding to the bill to be detected.
And S370, judging whether at least one smooth area with the size larger than the set scraping size threshold exists, and if so, marking the at least one smooth area as a scraping area.
The present embodiment is not explained in detail herein, and reference is made to the foregoing embodiments.
The technical scheme provided by the embodiment is suitable for the bill to be detected with unidirectional background texture, the transverse sliding window or the longitudinal sliding window is adopted to process the original gray level image and the sharpened gray level image, at least one smooth area corresponding to the bill to be detected is determined according to the binary standard deviation difference value image determined by combining the original gray level image and the sharpened gray level image, and the smooth area with the size larger than the set scraping size threshold is marked as a scraping area, so that the detection rate of the scraping area on the surface of the bill is further improved.
Example IV
Fig. 4 is a flowchart of a method for detecting scratch on a bill surface, which is provided by a fourth embodiment of the present invention, and is embodied based on the above technical solution, where a gray scale image is processed by using a horizontal sliding window and a vertical sliding window, so as to obtain a processed image, and at least one non-highlight connected domain included in the processed image is obtained as a smooth region corresponding to a bill to be detected, where the method specifically includes:
Calculating a transverse standard deviation matrix and a longitudinal standard deviation matrix of an original gray level image or a sharpened gray level image by adopting a transverse sliding window and a longitudinal sliding window;
normalizing values of elements in the transverse standard deviation matrix and the longitudinal standard deviation matrix to a set gray scale range to generate a transverse standard deviation image and a longitudinal standard deviation image;
binarizing the transverse standard deviation image and the longitudinal standard deviation image to obtain a binarized transverse standard deviation image and a binarized longitudinal standard deviation image;
and solving at least one non-highlight connected domain included in the intersection image of the binarized transverse standard deviation image and the binarized longitudinal standard deviation image as a smooth area corresponding to the bill to be detected.
As shown in fig. 4, the method in this embodiment specifically includes:
s410, acquiring an original gray level image or a sharpened gray level image of the bill to be detected, wherein the background texture of the bill to be detected is dense.
S420, calculating a transverse standard deviation matrix and a longitudinal standard deviation matrix of the original gray level image or the sharpened gray level image by adopting a transverse sliding window and a longitudinal sliding window.
In this embodiment, any one of the original gray-scale image and the sharpened gray-scale image may be selected for bill surface scratch detection.
Specifically, a transverse sliding window is adopted to calculate a transverse standard deviation matrix of an original gray level image or a sharpened gray level image, and a longitudinal sliding window is adopted to calculate a longitudinal standard deviation matrix of the original gray level image or the sharpened gray level image.
And S430, normalizing the values of the elements in the transverse standard deviation matrix and the longitudinal standard deviation matrix to a set gray scale range, and generating a transverse standard deviation image and a longitudinal standard deviation image.
And normalizing the values of the elements in the transverse standard deviation matrix to a set gray scale range, generating a transverse standard deviation image, normalizing the values of the elements in the longitudinal standard deviation matrix to the set gray scale range, and generating a longitudinal standard deviation image.
S440, binarizing the transverse standard deviation image and the longitudinal standard deviation image to obtain a binarized transverse standard deviation image and a binarized longitudinal standard deviation image.
And carrying out binarization processing and denoising processing on the transverse standard deviation image to obtain a binarized transverse standard deviation image, and carrying out binarization processing and denoising processing on the longitudinal standard deviation image to obtain a binarized longitudinal standard deviation image.
S450, at least one non-highlight connected domain included in the intersection image of the binarized transverse standard deviation image and the binarized longitudinal standard deviation image is obtained and used as a smooth area corresponding to the bill to be detected.
And calculating an intersection image of the binarized transverse standard deviation image and the binarized longitudinal standard deviation image, denoising and expanding the intersection image to enable the local images to be communicated to obtain a final image, and solving at least one non-highlight communication domain included in the final image as a smooth region corresponding to the bill to be detected.
S460, judging whether at least one smooth area with the size larger than the set scraping size threshold exists, and if so, marking the at least one smooth area as a scraping area.
The present embodiment is not explained in detail herein, and reference is made to the foregoing embodiments.
According to the technical scheme, the transverse sliding window and the longitudinal sliding window are adopted to process an original gray level image or a sharpened gray level image to obtain a transverse smoothness image and a longitudinal smoothness image (namely a transverse standard deviation image and a longitudinal standard deviation image) of the bill surface, the method is suitable for the bill to be detected with the unidirectional background texture, the problem that the effect of obtaining the smoothness image by adopting a single sliding window is poor is solved, at least one smooth area corresponding to the bill to be detected is obtained in the intersection image of the determined binary transverse standard deviation image and the binary longitudinal standard deviation image, and the smooth area with the size larger than the set scraping size threshold is marked as a scraping area, so that the detection rate of the bill surface scraping area is further improved, and the application range of the bill surface scraping detection method is increased.
Example five
Fig. 5 is a flowchart of a method for detecting scratch on a bill surface, which is provided by a fifth embodiment of the present invention, and the present embodiment is embodied based on the above technical solution, where a gray scale image is processed by using a horizontal sliding window and a vertical sliding window, so as to obtain a processed image, and at least one non-highlight connected domain included in the processed image is obtained as a smooth region corresponding to the bill to be detected, and the method includes:
calculating a horizontal first standard deviation matrix and a vertical first standard deviation matrix of an original gray level image and a horizontal second standard deviation matrix and a vertical second standard deviation matrix of a sharpened gray level image by adopting a horizontal sliding window and a vertical sliding window;
calculating a transverse standard deviation difference matrix according to the transverse first standard deviation matrix and the transverse second standard deviation matrix, and calculating a longitudinal standard deviation difference matrix according to the longitudinal first standard deviation matrix and the longitudinal second standard deviation matrix;
normalizing the values of elements in the transverse standard deviation difference matrix and the longitudinal standard deviation difference matrix to a set gray scale range to generate a transverse standard deviation difference image and a longitudinal standard deviation difference image;
binarizing the transverse standard deviation difference image and the longitudinal standard deviation difference image to obtain a binarized transverse standard deviation difference image and a binarized longitudinal standard deviation difference image;
And (3) solving at least one non-highlight connected domain included in the intersection image of the binarized transverse standard deviation difference image and the binarized longitudinal standard deviation difference image as a smooth region corresponding to the bill to be detected.
As shown in fig. 5, the method in this embodiment specifically includes:
s510, acquiring an original gray level image and a sharpened gray level image of the bill to be detected, wherein the background texture of the bill to be detected is dense.
In this embodiment, a specific example is explained, fig. 6 is an original gray image of a bill to be detected, fig. 7 is a sharpened gray image of a bill to be detected, and the background texture in fig. 7 is clearer than that in fig. 6.
S520, calculating a transverse first standard deviation matrix and a longitudinal first standard deviation matrix of the original gray level image and a transverse second standard deviation matrix and a longitudinal second standard deviation matrix of the sharpened gray level image by adopting the transverse sliding window and the longitudinal sliding window.
In this embodiment, a 2×6 transverse sliding window and a 6×2 longitudinal sliding window are specifically adopted according to the size of the bill to be detected to obtain a transverse smoothness image and a longitudinal smoothness image of the surface of the bill.
For an original gray image, adopting a 2X 6 transverse sliding window to slide in full width, and calculating the standard deviation of 12 pixels in the window once every time, so as to finally obtain a transverse first standard deviation matrix of the original gray image; for an original gray image, adopting a 6 multiplied by 2 longitudinal sliding window to slide in full width, and calculating the standard deviation of 12 pixels in the window once every time to obtain a longitudinal first standard deviation matrix of the original gray image; for the sharpened gray level image, adopting 2X 6 transverse sliding window full-width sliding, calculating the standard deviation of 12 pixels in the window once every sliding, and finally obtaining a transverse second standard deviation matrix of the sharpened gray level image; and (3) for the sharpened gray image, adopting a 6 multiplied by 2 longitudinal sliding window to slide in full width, and calculating the standard deviation of 12 pixels in the window once for each sliding, so as to finally obtain a longitudinal second standard deviation matrix of the sharpened gray image.
S530, calculating a transverse standard deviation matrix according to the transverse first standard deviation matrix and the transverse second standard deviation matrix, and calculating a longitudinal standard deviation matrix according to the longitudinal first standard deviation matrix and the longitudinal second standard deviation matrix.
Subtracting the transverse second standard deviation matrix from the transverse first standard deviation matrix to obtain a transverse standard deviation matrix, and subtracting the longitudinal second standard deviation matrix from the longitudinal first standard deviation matrix to obtain a longitudinal standard deviation matrix. If the result of the element corresponding subtraction is a negative value, the absolute value is taken as the corresponding element value in the transverse standard deviation difference matrix or the longitudinal standard deviation difference matrix.
S540, normalizing values of elements in the transverse standard deviation difference matrix and the longitudinal standard deviation difference matrix to a set gray scale range, and generating a transverse standard deviation difference image and a longitudinal standard deviation difference image.
Normalizing the values of the elements in the transverse standard deviation difference matrix to a set gray scale range of 0-255 to obtain a transverse standard deviation difference image, as shown in fig. 8; and normalizing the values of the elements in the longitudinal standard deviation difference matrix to a set gray scale range of 0-255 to obtain a longitudinal standard deviation difference image, as shown in fig. 9.
S550, binarizing the transverse standard deviation difference image and the longitudinal standard deviation difference image to obtain a binarized transverse standard deviation difference image and a binarized longitudinal standard deviation difference image.
Performing binarization processing on the transverse standard deviation difference image to obtain a binarized initial transverse standard deviation image, and then performing denoising processing on the binarized initial transverse standard deviation image to finally obtain a binarized transverse standard deviation difference image, as shown in fig. 10; the longitudinal standard deviation image is subjected to binarization processing, so that a binarized initial longitudinal standard deviation image is obtained, and then denoising processing is performed on the image, so that a binarized longitudinal standard deviation image is finally obtained, as shown in fig. 11.
In the binarized lateral standard deviation difference image and the binarized longitudinal standard deviation difference image as shown in fig. 10 and 11, a black area (non-highlight area) indicates image smoothing, and a white area (highlight area) indicates image non-smoothing. The smooth area of the image is the scraping area to be determined.
S560, at least one non-highlight connected domain included in the intersection image of the binarized transverse standard deviation difference image and the binarized longitudinal standard deviation difference image is obtained and used as a smooth area corresponding to the bill to be detected.
An initial intersection image of the binarized transverse standard deviation difference image and the binarized longitudinal standard deviation difference image is obtained, and then denoising and local expansion processing are carried out on the initial intersection image to obtain an intersection image, as shown in fig. 12. The intersection image shown in fig. 12 is the final smooth image corresponding to the bill to be detected, the non-highlight connected domains in the intersection image are obtained, and the non-highlight connected domains are used as the smooth areas corresponding to the bill to be detected.
S570, judging whether at least one smooth area with the size larger than the set scraping size threshold exists, and if so, marking the at least one smooth area as a scraping area.
The size of the non-highlight connected domain is judged, whether the requirement of the xiao Tu scraping size is met or not is judged, whether the non-highlight connected domain is larger than the set scraping size threshold, the non-highlight connected domain meeting the requirement of the xiao Tu scraping size (larger than the set scraping size threshold) is marked, and finally the marked non-highlight connected domain is a scraping area, and as shown in fig. 13, the non-highlight connected domain 100 is the scraping area.
The present embodiment is not explained in detail herein, and reference is made to the foregoing embodiments.
According to the technical scheme, the original gray level image and the sharpened gray level image are processed through the transverse sliding window and the longitudinal sliding window, so that the transverse smoothness degree image and the longitudinal smoothness degree image (namely the transverse standard deviation image and the longitudinal standard deviation image) of the bill surface are obtained, the method is applicable to the bill to be detected with the non-unidirectional background texture, the problem that the effect of obtaining the smoothness degree image through the single sliding window is poor is solved, at least one smooth area corresponding to the bill to be detected is obtained in the intersection image of the binarized transverse standard deviation image and the binarized longitudinal standard deviation image determined by combining the original gray level image and the sharpened gray level image, and the smooth area with the size larger than the set scraping size threshold is marked as a scraping area, so that the detection rate of the bill surface scraping area is further improved, and the application range of the bill surface scraping detection method is increased.
Example six
Fig. 14 is a schematic structural diagram of a bill surface scratch detection device provided in the sixth embodiment of the present invention, which is suitable for detecting whether a scratch phenomenon exists on the surface of a bill (paper money, check, deposit bill, etc.), and the device may be implemented in a software and/or hardware manner, and may be generally integrated in a processor of a financial device (typically, the financial device includes various types of sorter and ATM, etc.). As shown in fig. 14, the apparatus includes: a grayscale image acquisition module 610, a smooth region acquisition module 620, and a scratch determination module 630, wherein,
a gray image obtaining module 610, configured to obtain a gray image of a ticket to be detected, where the background texture of the ticket to be detected is dense, and the gray image includes an original gray image and/or a sharpened gray image;
the smooth region obtaining module 620 is configured to process the gray-scale image by using a horizontal sliding window and/or a vertical sliding window, obtain a processed image, and obtain at least one non-highlight connected region included in the processed image as a smooth region corresponding to the bill to be detected;
the scraping determination module 630 is configured to determine whether at least one smooth area with a size greater than the set scraping size threshold exists, and if yes, mark the at least one smooth area as a scraping area.
In the embodiment of the invention, the gray level image of the bill to be detected with dense background texture is processed by adopting the transverse sliding window and/or the longitudinal sliding window to obtain a processed image, at least one non-highlight connected domain is obtained in the processed image as a smooth region corresponding to the bill to be detected, and if at least one smooth region with the size larger than the set scraping size threshold exists, the existence of a scraping region in the bill to be detected can be confirmed, wherein the scraping region is at least one smooth region larger than the set scraping size threshold. According to the bill surface scratch detection method provided by the embodiment of the invention, whether the bill surface is scratched is distinguished without depending on color change, and meanwhile, whether handwritten characters or printed characters exist in a scratch area is irrelevant, so that the identification capability of financial equipment on paper money, deposit slips, checks and the like is improved, and the workload of manual secondary check is reduced.
As an alternative embodiment, the smooth region obtaining module 620 specifically includes:
a second standard deviation matrix calculating unit, configured to calculate a standard deviation matrix of the original gray-scale image or the sharpened gray-scale image using a horizontal sliding window or a vertical sliding window;
The second standard deviation image construction unit is used for normalizing the values of the elements in the standard deviation matrix to a set gray scale range and generating a standard deviation image;
the second binarization processing unit is used for carrying out binarization processing on the standard deviation image to obtain a binarized standard deviation image;
and the second smooth area obtaining unit is used for obtaining at least one non-highlight connected area contained in the binarized standard deviation image as a smooth area corresponding to the bill to be detected.
As an alternative embodiment, the smooth region obtaining module 620 specifically includes:
a third standard deviation matrix calculation unit, configured to calculate a first standard deviation matrix of the original gray-scale image and a second standard deviation matrix of the sharpened gray-scale image using a horizontal sliding window or a vertical sliding window;
a third standard deviation difference matrix calculation unit, configured to calculate a standard deviation difference matrix according to the first standard deviation matrix and the second standard deviation matrix;
the third standard deviation difference image construction unit is used for normalizing the values of the elements in the standard deviation difference matrix to a set gray scale range and generating a standard deviation difference image;
the third binarization processing unit is used for performing binarization processing on the standard deviation difference image to obtain a binarized standard deviation difference image;
And a third smoothing region calculating unit, configured to calculate at least one non-highlight connected region included in the binarized standard deviation difference image as a smoothing region corresponding to the bill to be detected.
Specifically, when the background texture of the bill to be detected is a transverse texture, the longitudinal sliding window is adopted; and when the background texture of the bill to be detected is longitudinal texture, the transverse sliding window is adopted.
As an alternative embodiment, the smooth region obtaining module 620 specifically includes:
a fourth standard deviation matrix calculating unit, configured to calculate a horizontal standard deviation matrix and a vertical standard deviation matrix of the original gray scale image or the sharpened gray scale image by using a horizontal sliding window and a vertical sliding window;
a fourth standard deviation image construction unit, configured to normalize values of elements in the transverse standard deviation matrix and the longitudinal standard deviation matrix to a set gray scale range, and generate a transverse standard deviation image and a longitudinal standard deviation image;
the fourth binarization processing unit is used for carrying out binarization processing on the transverse standard deviation image and the longitudinal standard deviation image to obtain a binarized transverse standard deviation image and a binarized longitudinal standard deviation image;
A fourth smoothing region calculating unit, configured to calculate at least one non-highlight connected region included in an intersection image of the binarized lateral standard deviation image and the binarized longitudinal standard deviation image as a smoothing region corresponding to the ticket to be detected.
As an alternative embodiment, the smooth region obtaining module 620 specifically includes:
a first standard deviation matrix calculation unit, configured to calculate a horizontal first standard deviation matrix and a vertical first standard deviation matrix of the original gray-scale image, and a horizontal second standard deviation matrix and a vertical second standard deviation matrix of the sharpened gray-scale image by using a horizontal sliding window and a vertical sliding window;
a first standard deviation matrix calculation unit, configured to calculate a transverse standard deviation matrix according to the transverse first standard deviation matrix and the transverse second standard deviation matrix, and calculate a longitudinal standard deviation matrix according to the longitudinal first standard deviation matrix and the longitudinal second standard deviation matrix;
the first standard deviation difference image construction unit is used for normalizing the values of the elements in the transverse standard deviation difference matrix and the longitudinal standard deviation difference matrix to a set gray scale range to generate a transverse standard deviation difference image and a longitudinal standard deviation difference image;
The first binarization processing unit is used for carrying out binarization processing on the transverse standard deviation difference image and the longitudinal standard deviation difference image to obtain a binarized transverse standard deviation difference image and a binarized longitudinal standard deviation difference image;
a first smoothing region calculating unit, configured to calculate at least one non-highlight connected region included in an intersection image of the binarized transverse standard deviation difference image and the binarized longitudinal standard deviation difference image as a smoothing region corresponding to the ticket to be detected.
The bill surface scraping detection device can execute the bill surface scraping detection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executed bill surface scraping detection method.
Example seven
Fig. 15 is a schematic structural diagram of a computer device according to a seventh embodiment of the present invention, as shown in fig. 15, where the computer device includes a processor 710, a memory 720, an input device 730, and an output device 740; the number of processors 710 in the computer device may be one or more, one processor 710 being taken as an example in fig. 15; the processor 710, memory 720, input means 730, and output means 740 in the computer device may be connected by a bus or other means, for example in fig. 15.
The memory 720 is a computer readable storage medium, and may be used to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the bill surface scraping detection method in any embodiment of the present invention (for example, the gray image acquisition module 610, the smooth area acquisition module 620, and the scraping judgment module 630 in the bill surface scraping detection device). The processor 710 performs various functional applications of the computer device and data processing, i.e., the operations described above for the computer device, by running software programs, instructions, and modules stored in the memory 720.
Memory 720 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the device, etc. In addition, memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 720 may further include memory located remotely from processor 710, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 730 may be used to receive input touch information and to generate key signal inputs related to user settings and function control of the computer device. The output device 740 may include a display device such as a display screen.
Example eight
An eighth embodiment of the present invention further provides a storage medium containing computer executable instructions, where a computer program is stored, where the program when executed by a processor implements the method for detecting surface scratch of a ticket according to any embodiment of the present invention, where the method includes:
acquiring a gray level image of a bill to be detected, wherein the background texture of the bill to be detected is dense, and the gray level image comprises an original gray level image and/or a sharpened gray level image;
processing the gray level image by adopting a transverse sliding window and/or a longitudinal sliding window to obtain a processed image, and solving at least one non-highlight connected domain contained in the processed image as a smooth region corresponding to the bill to be detected;
judging whether at least one smooth area with the size larger than a set scraping size threshold exists, and if so, marking the at least one smooth area as a scraping area.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., comprising several instructions for causing a computer device to perform the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the bill surface scratch detection device, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be realized; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. 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, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (8)

1. The utility model provides a bill surface scratch detection method which is characterized in that the method comprises the following steps:
acquiring a gray level image of a bill to be detected, wherein the background texture of the bill to be detected is dense, and the gray level image comprises an original gray level image and/or a sharpened gray level image;
Processing the gray level image by adopting a transverse sliding window and/or a longitudinal sliding window to obtain a processed image, and solving at least one non-highlight connected domain contained in the processed image as a smooth region corresponding to the bill to be detected;
judging whether at least one smooth area with the size larger than a set scraping size threshold exists or not, and if yes, marking the at least one smooth area as a scraping area;
processing the gray level image by adopting a horizontal sliding window or a vertical sliding window to obtain a processed image, and solving at least one non-highlight connected domain included in the processed image as a smooth region corresponding to the bill to be detected, wherein the method comprises the following steps:
calculating a standard deviation matrix of the original gray level image or the sharpened gray level image by adopting a horizontal sliding window or a vertical sliding window;
normalizing the values of elements in the standard deviation matrix to a set gray scale range to generate a standard deviation image;
performing binarization processing on the standard deviation image to obtain a binarized standard deviation image;
and solving at least one non-highlight connected domain contained in the binarized standard deviation image as a smooth area corresponding to the bill to be detected.
2. The method according to claim 1, wherein processing the gray-scale image using a horizontal sliding window or a vertical sliding window to obtain a processed image, and obtaining at least one non-highlight connected domain included in the processed image as a smooth region corresponding to the bill to be detected includes:
calculating a first standard deviation matrix of the original gray level image and a second standard deviation matrix of the sharpened gray level image by adopting a horizontal sliding window or a vertical sliding window;
calculating a standard deviation difference matrix according to the first standard deviation matrix and the second standard deviation matrix;
normalizing the values of the elements in the standard deviation difference matrix to a set gray scale range to generate a standard deviation difference image;
performing binarization processing on the standard deviation difference image to obtain a binarized standard deviation difference image;
and solving at least one non-highlight connected domain contained in the binarized standard deviation difference image to serve as a smooth area corresponding to the bill to be detected.
3. A method according to claim 1 or 2, characterized in that,
when the background texture of the bill to be detected is a transverse texture, the longitudinal sliding window is adopted;
And when the background texture of the bill to be detected is longitudinal texture, the transverse sliding window is adopted.
4. The method according to claim 1, wherein processing the gray-scale image using a horizontal sliding window and a vertical sliding window to obtain a processed image, and obtaining at least one non-highlight connected domain included in the processed image as a smooth region corresponding to the bill to be detected includes:
calculating a transverse standard deviation matrix and a longitudinal standard deviation matrix of the original gray level image or the sharpened gray level image by adopting a transverse sliding window and a longitudinal sliding window;
normalizing values of elements in the transverse standard deviation matrix and the longitudinal standard deviation matrix to a set gray scale range to generate a transverse standard deviation image and a longitudinal standard deviation image;
performing binarization processing on the transverse standard deviation image and the longitudinal standard deviation image to obtain a binarized transverse standard deviation image and a binarized longitudinal standard deviation image;
and solving at least one non-highlight connected domain included in the intersection image of the binarized transverse standard deviation image and the binarized longitudinal standard deviation image as a smooth region corresponding to the bill to be detected.
5. The method according to claim 1, wherein processing the gray-scale image using a horizontal sliding window and a vertical sliding window to obtain a processed image, and obtaining at least one non-highlight connected domain included in the processed image as a smooth region corresponding to the bill to be detected includes:
calculating a transverse first standard deviation matrix and a longitudinal first standard deviation matrix of the original gray level image and a transverse second standard deviation matrix and a longitudinal second standard deviation matrix of the sharpened gray level image by adopting a transverse sliding window and a longitudinal sliding window;
calculating a transverse standard deviation difference matrix according to the transverse first standard deviation matrix and the transverse second standard deviation matrix, and calculating a longitudinal standard deviation difference matrix according to the longitudinal first standard deviation matrix and the longitudinal second standard deviation matrix;
normalizing values of elements in the transverse standard deviation difference matrix and the longitudinal standard deviation difference matrix to a set gray scale range to generate a transverse standard deviation difference image and a longitudinal standard deviation difference image;
binarizing the transverse standard deviation difference image and the longitudinal standard deviation difference image to obtain a binarized transverse standard deviation difference image and a binarized longitudinal standard deviation difference image;
And solving at least one non-highlight connected domain included in the intersection image of the binarized transverse standard deviation difference image and the binarized longitudinal standard deviation difference image as a smooth region corresponding to the bill to be detected.
6. A bill surface scratch detection device, comprising:
the system comprises a gray image acquisition module, a gray image acquisition module and a display module, wherein the gray image acquisition module is used for acquiring a gray image of a bill to be detected, the background texture of the bill to be detected is dense, and the gray image comprises an original gray image and/or a sharpened gray image;
the smooth region acquisition module is used for processing the gray level image by adopting a transverse sliding window and/or a longitudinal sliding window to obtain a processed image, and solving at least one non-highlight connected region included in the processed image as a smooth region corresponding to the bill to be detected;
the scraping judgment module is used for judging whether at least one smooth area with the size larger than a set scraping size threshold exists or not, and if yes, marking the at least one smooth area as a scraping area;
the smooth region acquisition module includes:
a first standard deviation matrix calculation unit, configured to calculate a horizontal first standard deviation matrix and a vertical first standard deviation matrix of the original gray-scale image, and a horizontal second standard deviation matrix and a vertical second standard deviation matrix of the sharpened gray-scale image by using a horizontal sliding window and a vertical sliding window;
A first standard deviation matrix calculation unit, configured to calculate a transverse standard deviation matrix according to the transverse first standard deviation matrix and the transverse second standard deviation matrix, and calculate a longitudinal standard deviation matrix according to the longitudinal first standard deviation matrix and the longitudinal second standard deviation matrix;
the first standard deviation difference image construction unit is used for normalizing the values of the elements in the transverse standard deviation difference matrix and the longitudinal standard deviation difference matrix to a set gray scale range to generate a transverse standard deviation difference image and a longitudinal standard deviation difference image;
the first binarization processing unit is used for carrying out binarization processing on the transverse standard deviation difference image and the longitudinal standard deviation difference image to obtain a binarized transverse standard deviation difference image and a binarized longitudinal standard deviation difference image;
a first smoothing region calculating unit, configured to calculate at least one non-highlight connected region included in an intersection image of the binarized transverse standard deviation difference image and the binarized longitudinal standard deviation difference image as a smoothing region corresponding to the ticket to be detected.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-5 when the program is executed by the processor.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
CN201910080302.7A 2019-01-28 2019-01-28 Bill surface scratch detection method, device, equipment and storage medium Active CN111563845B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910080302.7A CN111563845B (en) 2019-01-28 2019-01-28 Bill surface scratch detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910080302.7A CN111563845B (en) 2019-01-28 2019-01-28 Bill surface scratch detection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111563845A CN111563845A (en) 2020-08-21
CN111563845B true CN111563845B (en) 2023-10-20

Family

ID=72069564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910080302.7A Active CN111563845B (en) 2019-01-28 2019-01-28 Bill surface scratch detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111563845B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255657B (en) * 2020-12-31 2024-04-05 深圳怡化电脑股份有限公司 Method and device for detecting scratch on bill surface, electronic equipment and machine-readable medium
CN116403098B (en) * 2023-05-26 2023-08-08 四川金投科技股份有限公司 Bill tampering detection method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000222588A (en) * 1999-01-29 2000-08-11 Mitsubishi Electric Corp Image target detecting device
CN103914833A (en) * 2014-03-11 2014-07-09 辰通智能设备(深圳)有限公司 Method and system for automatically detecting whether bill is incomplete or not
CN104952077A (en) * 2015-06-18 2015-09-30 辰通智能设备(深圳)有限公司 Oil stain detection method and oil stain detection system for bill images
CN107622562A (en) * 2017-09-11 2018-01-23 深圳怡化电脑股份有限公司 Extracting method, device, equipment and the storage medium of banknote image
CN108154510A (en) * 2018-01-17 2018-06-12 深圳市亿图视觉自动化技术有限公司 Method for detecting surface defects of products, device and computer readable storage medium
CN108230321A (en) * 2018-01-19 2018-06-29 深圳市亿图视觉自动化技术有限公司 Defect inspection method and device
CN108764225A (en) * 2018-04-11 2018-11-06 深圳怡化电脑股份有限公司 Identify the method, apparatus and electronic equipment of horizontally-spliced bank note

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000222588A (en) * 1999-01-29 2000-08-11 Mitsubishi Electric Corp Image target detecting device
CN103914833A (en) * 2014-03-11 2014-07-09 辰通智能设备(深圳)有限公司 Method and system for automatically detecting whether bill is incomplete or not
CN104952077A (en) * 2015-06-18 2015-09-30 辰通智能设备(深圳)有限公司 Oil stain detection method and oil stain detection system for bill images
CN107622562A (en) * 2017-09-11 2018-01-23 深圳怡化电脑股份有限公司 Extracting method, device, equipment and the storage medium of banknote image
CN108154510A (en) * 2018-01-17 2018-06-12 深圳市亿图视觉自动化技术有限公司 Method for detecting surface defects of products, device and computer readable storage medium
CN108230321A (en) * 2018-01-19 2018-06-29 深圳市亿图视觉自动化技术有限公司 Defect inspection method and device
CN108764225A (en) * 2018-04-11 2018-11-06 深圳怡化电脑股份有限公司 Identify the method, apparatus and electronic equipment of horizontally-spliced bank note

Also Published As

Publication number Publication date
CN111563845A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
CN102682514B (en) Paper identification method and relative device
EP3021259B1 (en) Banknote recognition and classification method and system
CN106952393B (en) Paper money identification method and device, electronic equipment and storage medium
CN107103683B (en) Paper money identification method and device, electronic equipment and storage medium
US20070253040A1 (en) Color scanning to enhance bitonal image
CN110781885A (en) Text detection method, device, medium and electronic equipment based on image processing
CN104992496A (en) Paper money face identification method and apparatus
CN106096610A (en) A kind of file and picture binary coding method based on support vector machine
CN107016363A (en) Bill images managing device, bill images management system and method
CN111563845B (en) Bill surface scratch detection method, device, equipment and storage medium
CN107038794B (en) Method, device and equipment for identifying authenticity of paper money and storage medium
CN115082465A (en) Wool and cashmere classification method based on scanning electron microscope image processing
CN109389116B (en) Character detection method and device
Ali et al. Recognition system for Pakistani paper currency
CN107680246B (en) Method and equipment for positioning curve boundary in paper money pattern
CN115240197A (en) Image quality evaluation method, image quality evaluation device, electronic apparatus, scanning pen, and storage medium
CN113435219B (en) Anti-counterfeiting detection method and device, electronic equipment and storage medium
CN107742357A (en) A kind of recognition methods of paper money number and device
Shi et al. Image enhancement for degraded binary document images
CN106934922A (en) A kind of paper currency detecting method and device
CN114241463A (en) Signature verification method and device, computer equipment and storage medium
Boiangiu et al. Handwritten documents text line segmentation based on information energy
CN102313740A (en) Solar panel crack detection method
CN109543554B (en) Bill detection method, device, terminal and computer readable storage medium
CN106886777B (en) Character boundary determining method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant