# US 2018/0025571 A1 · Banknote crack detection method and apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0025571 A1
- Document ID: US20180025571A1
- Status: Published application
- Kind: A1
- Application number: 15/543,551
- Filed: 2015-07-13
- Published: 2018-01-25
- Earliest claimed: 2015-01-26
- Assignees: GRG Banking Equipment Co., Ltd.
- Applicants: GRG Banking Equipment Co., Ltd.
- Inventors: Yuanchao Yu; Rongqiu Wang; Zhanfeng Huang
- Web page: https://patentgrep.com/patent/US20180025571A1

## CPC

- G07D 11/237: for detecting transport malfunctions, e.g. jams or misfeeds
- G06T 7/00: Image analysis
- G06T 7/0002: {Inspection of images, e.g. flaw detection}
- G06T 7/0004: {Industrial image inspection}
- G06T 7/11: Region-based segmentation
- G06T 7/187: involving region growing; involving region merging; involving connected component labelling
- G07D 7/181: Testing mechanical properties or condition, e.g. wear or tear (G07D7/16 takes precedence)
- G07D 11/009: {Depositing devices}
- G07D: HANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A banknote crack detection method and a banknote crack detection apparatus are provided. The banknote crack detection apparatus includes an image collection unit, configured to collect an optical transmission image of an inputted banknote, a pre-processing unit, configured to receive a banknote image signal collected by the image collection unit, and perform foreground region positioning and cutting on the banknote image signal; a crack detection unit, configured to detect whether a crack exists; and a determining unit, configured to determine whether the banknote is qualified according to a detection result of the crack detection unit; and a control unit, configured to control operation of each of the above units.

## Claims

### Claim 1

A banknote crack detection apparatus, comprising:
an image collection unit, configured to collect an optical transmission image of an inputted banknote;
a pre-processing unit, configured to receive a banknote image signal collected by the image collection unit, and perform foreground region positioning and cutting on the banknote image signal;
a crack detection unit, configured to receive a banknote foreground region image from the pre-processing unit, determine whether there is a pixel segment with a crack feature at an edge of a foreground region, determine that there is a crack at the edge of the foreground region if there is the pixel segment with the crack feature, detect whether the crack is extended to a deeper row or column than the edge in the same manner of detecting whether there is a crack at the edge, and accumulate a crack edge length and a crack depth;
a determining unit, configured to determine whether the banknote is qualified according to a detection result of the crack detection unit, wherein a determining rule is that if there is no crack at any of four edges of the banknote, the inputted banknote is qualified and received; if the inputted banknote has a crack, and the crack edge length is greater than a preset threshold or the crack depth is greater than the preset threshold, the inputted banknote is unqualified and rejected; and if the inputted banknote has a crack, and the crack edge length is less than the preset threshold and the crack depth is less than the preset threshold, the inputted banknote is qualified and received; and
a control unit, configured to control operation of each of the above units.

### Claim 2 (depends on 1)

The banknote crack detection apparatus according to claim 1, wherein the pixel segment with the crack feature is an adjacent pixel segment with a certain step, a gray level of each pixel in the pixel segment exceeds a preset gray level threshold, and pixel gray gradients at two end points of the pixel segment exceed a preset gradient threshold.

### Claim 3

A banknote crack detection method, comprising:
step 1, inputting a to-be-detected banknote, to start a process;
step 2, collecting an optical transmission image of the inputted banknote;
step 3, detecting a foreground region of the inputted banknote, cutting the foreground region, and placing the foreground region in a pixel coordinate system;
step 4, determining whether there is a crack at an edge of the foreground region, turning to step 5 in a case that there is a crack, and turning to step 8 in a case that there is no crack;
step 5, accumulating a crack edge length CL and a crack depth CH;
step 6, determining whether the crack edge length CL is greater than a preset threshold and whether the crack depth CH is greater than the preset threshold, turning to step 7 in a case that the crack edge length CL is greater than the preset threshold or the crack depth CH is greater than the preset threshold, otherwise, turning to step 8;
step 7, determining that the inputted banknote has an crack, rejecting the inputted banknote, and ending the process; and
step 8, receiving the inputted banknote, and ending the process.

### Claim 4 (depends on 3)

The banknote crack detection method according to claim 3, wherein in step 4, the determining whether there is a crack at an edge of the foreground region comprises:
sequentially determining, for each of adjacent pixel segments of a certain step at upper, lower, left and right edges, whether a gray level of each pixel in the pixel segment exceeds a preset gray level threshold, and whether pixel gray gradients at two end points of the pixel segments both exceed a preset gradient threshold; and
determining that there is a crack at the edges of the foreground region if the gray level of each pixel in the pixel segment exceeds the preset gray level threshold and the pixel gray gradients at two end points of the pixel segments both exceed the preset gradient threshold, otherwise, determining that there is no crack at the edges of the foreground region.

### Claim 5 (depends on 4)

The banknote crack detection method according to claim 4, wherein in step 5, the accumulating a crack edge length CL and a crack depth CH comprises:
detecting whether the crack is extended to a deeper row or column than the edge in the same manner of detecting whether there is a crack at the edge of the foreground region,
continuing to accumulate the crack edge length CL and the crack depth CH in a case that the crack is extended,
continuing to perform the accumulation on a deeper row or column until meeting a row or column to which the crack is not extended, to obtain the accumulated crack edge length CL and the accumulated crack depth CH.

### Claim 6 (depends on 5)

The banknote crack detection method according to claim 5, wherein a method for detecting the crack at the edge of the foreground region comprises:
step 51, performing an initialization setting to set a starting edge point of the crack as PS, an end edge point of the crack as PE, a crack width as Cw=0, a crack edge length as Cl=0, and a crack depth as Ch=0;
step 52, searching for a crack starting edge point and a crack end edge point in pixels in an edge of the foreground region, and updating PS=P(x01, y01), PE=P(x02, y01), CL=Cl+2 and CH=Ch+1 in a case that points P(x01, y01) and P(x02, y01) meet:
{
x
02
-
x
01
-
1
<=
2
GrayP

(
x
01
,
y
01
)
<
gth


max
GrayP

(
x
02
,
y
01
)
<
gth


max
GrayP
M
>
gth


min
,
wherein x02−x01−1<=2 indicates that a width of a crack region on the foreground region image is no more than 2 pixels, gth max denotes a maximum gray value of an optical transmission image when there is no crack in medium, and is generally set to 200, gth min denotes a minimum gray value of a crack region in the optical transmission image, and is generally set to 250, and PM denotes a point between P(x01, y01) and P(x02, y01);
step 53, determining that
{
x
02
=
x
01
+
2
GrayP

(
x
01
-
1
,
y
01
+
1
)
<
gth


max
GrayP

(
x
02
+
1
,
y
01
+
1
)
<
gth


max
,
when Cw=1, that is there is one pixel point between P(x01, y01) and P(x02, y01),
(1) updating, for the crack in the line, the starting point to PS=P(x01−1, y01+1), the end point to PE=P(x01+1, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=1, in a case that
{
GrayP

(
x
01
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
1
,
y
01
+
1
)
<
gth


max
;
(2) updating, for the crack in the line, the starting point to PS=P(x01+1, y01+1), the end point to PE=P(x02+1, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=1, in a case that
{
GrayP

(
x
02
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
1
,
y
01
+
1
)
<
gth


max
;
(3) updating, for the crack in the line, the starting point to PS=P(x01−1, y01+1), the end point to PE=P(x02, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=2, in a case that
{
GrayP

(
x
01
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
1
,
y
01
+
1
)
>
gth


min
GrayP

(
x
02
,
y
01
+
1
)
<
gth


max
;
and
(4) updating, for the crack in the line, the starting point to PS=P(x01, y01+1), the end point to PE=P(x02+1, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=2, in a case that
{
GrayP

(
x
01
,
y
01
+
1
)
<
gth


max
GrayP

(
x
01
+
1
,
y
01
+
1
)
>
gth


min
GrayP

(
x
02
,
y
01
+
1
)
>
gth


min
;
step 54, determining that
{
x
02
=
x
01
+
3
GrayP

(
x
01
-
1
,
y
01
+
1
)
<
gth


max
GrayP

(
x
02
+
1
,
y
01
+
1
)
<
gth


max
,
when Cw=2, that is there are two pixels between PS and PE,
(1) updating, for the crack in the line, the starting point to PS=P(x01−1, y01+1), the end point to PE=P(x01+1, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=1, in a case that
{
GrayP

(
x
01
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
1
,
y
01
+
1
)
<
gth


max
;
(2) updating, for the crack in the line, the starting point to PS=P(x01, y01+1), the end point to PE=P(x01+2, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=1, in a case that
{
GrayP

(
x
01
,
y
01
+
1
)
<
gth


max
GrayP

(
x
01
+
1
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
2
,
y
01
+
1
)
<
gth


max
;
(3) updating, for the crack in the line, the starting point to PS=P(x01+1, y01+1), the end point to PE=P(x01+3, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=1, in a case that
{
GrayP

(
x
01
+
1
,
y
01
+
1
)
<
gth


max
GrayP

(
x
01
+
2
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
3
,
y
01
+
1
)
<
gth


max
;
(4) updating, for the crack in the line, the starting point to PS=P(x01+2, y01+1), the end point to PE=P(x02+1, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=1, in a case that
{
GrayP

(
x
01
+
2
,
y
01
+
1
)
<
gth


max
GrayP

(
x
02
,
y
01
+
1
)
>
gth


min
;
(5) updating, for the crack in the line, the starting point to PS=P(x01−1, y01+1), the end point to PE=P(x01+2, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=2, in a case that
{
GrayP

(
x
01
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
1
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
2
,
y
01
+
1
)
<
gth


max
;
(6) updating, for the crack in the line, the starting point to PS=P(x01, y01+1), the end point to PE=P(x01+3, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=2, in a case that
{
GrayP

(
x
01
,
y
01
+
1
)
<
gth


max
GrayP

(
x
01
+
1
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
2
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
3
,
y
01
+
1
)
<
gth


max
;
(7) updating, for the crack in the line, the starting point to PS=P(x01+1, y01+1), the end point to PE=P(x02+1, y01+1), the crack edge length to CL=Cl+2, the crack depth to CH=Ch+1, and the crack width to Cw=2, in a case that
{
GrayP

(
x
01
+
1
,
y
01
+
1
)
<
gth


max
GrayP

(
x
01
+
2
,
y
01
+
1
)
>
gth


min
GrayP

(
x
01
+
3
,
y
01
+
1
)
>
gth


min
;
and
determining that the crack does not extend to the line in other cases, and ending the crack detection; and
step 55, performing an iterative computation, repeatedly performing step 53 in a case that Cw=1, and repeatedly performing step 54 in a case that Cw=2 until a complete detection for a crack is finished.
