CN112307824A - Method, device, system and readable medium for identifying tampering of bill number area - Google Patents

Method, device, system and readable medium for identifying tampering of bill number area Download PDF

Info

Publication number
CN112307824A
CN112307824A CN201910695522.0A CN201910695522A CN112307824A CN 112307824 A CN112307824 A CN 112307824A CN 201910695522 A CN201910695522 A CN 201910695522A CN 112307824 A CN112307824 A CN 112307824A
Authority
CN
China
Prior art keywords
target
serial number
image
area
number area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910695522.0A
Other languages
Chinese (zh)
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 CN201910695522.0A priority Critical patent/CN112307824A/en
Publication of CN112307824A publication Critical patent/CN112307824A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • 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/004Testing 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 using digital security elements, e.g. information coded on a magnetic thread or strip
    • G07D7/0047Testing 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 using digital security elements, e.g. information coded on a magnetic thread or strip using checkcodes, e.g. coded numbers derived from serial number and denomination

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a method, a device, a system and a readable medium for identifying tampering of a bill number area, wherein the method comprises the steps of obtaining a positive RGB image, an infrared reflection image and an infrared transmission image of a bill to be identified; identifying the RGB image, and determining target number areas in the infrared reflection image and the infrared transmission image, wherein the target number areas comprise a target ticket number area and a target serial number area; acquiring connected domain information of a target ticket number area as first identification information and/or acquiring gray distribution information of a target serial number area as second identification information; and determining whether the target number area is tampered or not according to the first identification information and/or the second identification information. The method and the device realize automatic identification of the tampering of the target number area according to the information of the connected domain, the gray distribution and the like of the target number area in the RGB image, the infrared reflection image and the infrared transmission image of the bill to be identified, and improve the efficiency and the accuracy of the tampering identification of the bill number area.

Description

Method, device, system and readable medium for identifying tampering of bill number area
Technical Field
The invention relates to the technical field of computer processing, in particular to a method, a device and a system for identifying tampering of a bill number area and a computer readable medium.
Background
With the rapid development of economic trade in China, financial services are widely popularized and applied in large, medium and small cities and regions, and when financial services related to bills such as checks, deposit slips, service orders and the like are transacted, serial numbers, ticket number information and other numbers are used as the basis for recording and indexing the bills, so that the method is one of important means for searching and positioning corresponding bills and transactions in subsequent management and transactions. However, in the process of using and circulating bills such as checks, the serial number of the bill and/or the number area of the bill such as the bill number are/is often difficult to identify due to the fact that the serial number of the bill and/or the number area of the bill are stained due to artificial tampering or improper storage conditions, so that the recording and management of the bill are disordered, and subsequent property loss is caused.
Meanwhile, due to the special material characteristics and manufacturing principles of checks, deposit slips and other bills, whether the number area is tampered or not cannot be easily and accurately distinguished by human eyes, and meanwhile, in the prior art, the problems of low accuracy and low identification efficiency exist in the identification modes of manually adopting infrared lamp irradiation and the like, so that a method capable of efficiently identifying the tampering of the number area of the bill is required to be provided.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a computer device and a readable medium for identifying tampering of a ticket number region.
A method of identifying tampering of a ticket number region, the method comprising:
acquiring an RGB (red, green and blue) image, an infrared reflection image and an infrared transmission image of the front face of a bill to be identified;
identifying the RGB image, and determining target number areas in the infrared reflection image and the infrared transmission image, wherein the target number areas comprise a target ticket number area and a target serial number area;
acquiring connected domain information in a target ticket number area as first identification information and/or acquiring gray distribution information in the target serial number area as second identification information;
and determining whether the target number area is tampered or not according to the first identification information and/or the second identification information.
A tamper device for identifying a ticket number region, the device comprising:
the acquiring unit is used for acquiring an RGB image, an infrared reflection image and an infrared transmission image of the front face of the bill to be recognized;
the first determining unit is used for determining a target ticket number area in the infrared reflection image and a target serial number area in the infrared transmission image as target number areas according to the RGB image;
a second determining unit, configured to determine connected component information in the target ticket number area as first identification information and/or grayscale distribution information in the target serial number area as second identification information;
and the judging unit is used for judging whether the target number area is tampered or not according to the first identification information and/or the second identification information.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring an RGB (red, green and blue) image, an infrared reflection image and an infrared transmission image of the front face of a bill to be identified;
identifying the RGB image, and determining target number areas in the infrared reflection image and the infrared transmission image, wherein the target number areas comprise a target ticket number area and a target serial number area;
acquiring connected domain information in a target ticket number area as first identification information and/or acquiring gray distribution information in the target serial number area as second identification information;
and determining whether the target number area is tampered or not according to the first identification information and/or the second identification information.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring an RGB (red, green and blue) image, an infrared reflection image and an infrared transmission image of the front face of a bill to be identified;
identifying the RGB image, and determining target number areas in the infrared reflection image and the infrared transmission image, wherein the target number areas comprise a target ticket number area and a target serial number area;
acquiring connected domain information in a target ticket number area as first identification information and/or acquiring gray distribution information in the target serial number area as second identification information;
and determining whether the target number area is tampered or not according to the first identification information and/or the second identification information.
The invention has the beneficial effects that: the method comprises the steps of obtaining an RGB image, an infrared reflection image and an infrared transmission image of a bill to be identified, judging whether tampering exists according to gray distribution and connected domain information corresponding to a serial number area and a bill number area in the image and according to whether the gray distribution and the connected domain information are different from rules under normal conditions, and automatically judging whether tampering exists in the number area of the bill. The bill number area tampering identification scheme can automatically identify and judge whether the number area of the bill such as the check is tampered, and the bill tampering identification accuracy rate is improved.
Drawings
FIG. 1 is a flow diagram of a method of identifying tampering with a ticket number region in one embodiment;
FIG. 2 is a flow diagram of determining a destination number region from the RGB image in one embodiment;
FIG. 3 is a schematic diagram of a target number area of the bill to be recognized in another embodiment;
FIG. 4 is a flow diagram of obtaining the first identification information in one embodiment;
FIG. 5 is a flowchart of obtaining the second identification information in another embodiment;
FIG. 6 is a flowchart illustrating another embodiment of determining the difference of gray level distribution corresponding to each target serial number character region;
FIG. 7 is a flowchart illustrating a process of determining whether the target number region is tampered with according to the first identification information and/or the second identification information in one embodiment;
FIG. 8 is a flowchart illustrating a method for determining whether the target number area is tampered with according to the second identification information in another embodiment;
FIG. 9 is a detailed flow diagram in one embodiment in the context of an application that identifies whether the serial number area of a check and the check number area have been altered;
FIG. 10 is a block diagram showing the structure of a tamper device for identifying a bill number area in one embodiment;
FIG. 11 is a block diagram of a computer device in one embodiment.
Detailed Description
The present invention will be further described with reference to fig. 1 to 11.
In order to solve the problem that the bill tampering identification efficiency and accuracy are low due to the fact that a method for automatically identifying whether a bill number area such as a check is tampered or not is temporarily omitted in the prior art, and the bill management is disordered according to a target number to cause property loss, the embodiment of the invention provides a method for identifying tampering of the bill number area. The method can be executed based on a terminal device, and the terminal device can collect the image of the bill and identify and process the image, so that whether the bill to be identified is tampered or not is judged. In another embodiment, the method for identifying tampering of the bill number area provided by the invention can be further based on a tampering identification system comprising a terminal and a server, the terminal of the identification system can acquire an image corresponding to a bill to be identified and send the image to the server at the background through a communication connection, and the server processes the image acquired by the terminal and judges whether the bill to be identified is tampered.
In addition, considering that the application scenario of the tamper of the identification ticket generally requires timeliness and interactivity, when the method is applied to the terminal device in this embodiment, the terminal device may further include a sensing unit for collecting an image of the ticket to be identified in real time.
As shown in fig. 1, fig. 1 is a flowchart of a method for identifying tampering of a ticket number area in one embodiment.
The implementation flow of the method for identifying tampering of the ticket number area provided by the present invention at least includes steps S1022 to S1028 shown in fig. 1, and the above steps are specifically described below with reference to fig. 1.
In step S1022, the RGB image, the infrared reflection image, and the infrared transmission image of the front face of the bill to be recognized are acquired.
Specifically, the bills to be recognized may be bills including checks, deposit slips, business orders, and the like, and different from currencies such as banknotes, the bills to be recognized have a plurality of layers of different printing ink in preset areas and are formed by pressing preset material layers, so that under different light irradiation conditions, the light transmittance of the preset contents in different areas is affected due to the positions of the printing ink used and the material layers in the different areas in the whole bill, and therefore, the display degrees (visibility) of the contents in the same area are different in the RGB image and the infrared reflection image.
The front-side forward RGB image, the infrared reflection image and the infrared transmission image can be collected through an optical sensing device contained in the terminal. It should be noted that, for the positive direction required by the collection mode of the bill to be recognized, the positions and sizes of the images of various types including the RGB image, the infrared reflection image, the infrared transmission image, and the like can be ensured to be correspondingly the same, so as to ensure that the target number area determined in the RGB image can be directly reflected in the two infrared images. Meanwhile, the positive acquisition mode better conforms to the visual angle habit of the user when using the bill, and various corresponding information on the bill is also designed to be conveniently read and processed by people or machines when the bill is positively arranged.
In step S1024, the RGB image is recognized, and target number areas in the infrared reflection image and the infrared transmission image are determined, where the target number areas include a target ticket number area and a target serial number area.
Specifically, the process of determining the target number region according to the RGB image at least includes steps S1032-S1034 as shown in fig. 2, which will be described in detail below.
FIG. 2 is a flow diagram of determining a destination number region from the RGB image in one embodiment.
In step S1032, image recognition is performed on the RGB image, and the ticket number area and serial number area in the RGB image are determined as an RGB serial number area and an RGB ticket number area, respectively.
Optionally, the image recognition process may be to perform preprocessing such as graying and binarization on the RGB image, process the RGB image of the to-be-verified bill into an image area including a plurality of black or white images by setting a pixel point gray value threshold, and recognize corresponding image areas from the binarized RGB image according to a preset algorithm and a distribution rule as an RGB ticket number area and an RGB serial number area, respectively.
Specifically, as shown in fig. 3, fig. 3 is a schematic diagram of a target number area of the identified ticket to be identified in another embodiment. The area A identified in the RGB image according to a preset algorithm is a ticket number area, and the area B is a serial number area.
In step S1034, an image region corresponding to the RGB ticket number region in the infrared reflection image is determined as a target ticket number region, and an image region corresponding to the RGB serial number region in the infrared transmission image is determined as a target serial number region.
With reference to the foregoing description in S1022, due to the positive manner of the same position and size adopted in the acquisition, a direct mapping acquisition manner may be adopted to determine an image area corresponding to the RGB ticket number area in the infrared reflection image as a target ticket number area, and similarly, an image area corresponding to the RGB serial number area in the infrared transmission image as a target serial number area.
After the target number area is determined, the image features of the target number area related to tampering may be further obtained for identification, and specifically, the image features may include first identification information and second identification information, and the content and the description of the identification information are specifically described below.
In step S1026, connected component information in the target ticket number area is acquired as first identification information, and/or gradation distribution information in the target serial number area is acquired as second identification information.
Specifically, in one embodiment, the process of acquiring the first identification information may include at least steps S1052-S1054 as shown in fig. 4, which is described in detail below.
Fig. 4 is a flowchart of acquiring the first identification information in one embodiment.
In step S1052, a binarized image of the infrared reflection image is acquired as a target binarized image.
In a specific embodiment, in order to obtain the target binary image, the infrared reflection image may be subjected to a graying process, and a threshold of the binarization process is set according to a grayscale level of the whole image, so as to divide the points in the infrared reflection image into two categories, namely black (grayscale value of 0) and white (grayscale value of 255). On one hand, the binaryzation is carried out on the infrared reflection image, so that the characteristic information of pixel points related to tampering identification can be highlighted, and the acquisition of a target character area is facilitated.
In step S1054, connected domain analysis is performed on the target binary image, and the number of connected domains and/or the number of connected domain edge pixels in the target ticket number region in the target binary image are determined as connected domain information in the target ticket number region.
Specifically, the connected component analysis is to mark a connected component existing in the target binary image, and the connected component is an image region composed of foreground pixels having the same pixel value and adjacent positions in the image. Connected component analysis refers to finding and labeling each connected component in an image. The specific marking method may employ, for example, a two-step scanning algorithm, a region growing algorithm, and the like.
Because of the material characteristics and the manufacturing principle of bills such as checks, the bill number area in the target number code area has corresponding gray distribution and complete display in the RGB image, but has no display in the infrared reflection image (i.e. the gray values are all 255, and the image has no foreground and background), so that under the condition that the bill normally has no tampering or contamination, the target bill number area corresponding to the bill has no connected domain, i.e. has no foreground black image, but if the light transmittance and the distribution rule of an irregular color block generated by contamination of the bill material caused by artificially altering the surface layer of the bill by a coloring tool or the external natural environment are greatly different from the original printing ink, the tampered area basically has no light transmittance of the normal bill and the printing ink under preset illumination conditions (such as infrared light, ultraviolet light and the like), therefore, the tampered area is corresponding to a connected area with a large gray value (i.e. close to black visually) in the infrared image, and in contrast, the bill normally has a character area (visible to human eyes) with obvious regularity in the RGB area for representing the bill number, and no gray value is correspondingly distributed in the infrared reflection image.
Meanwhile, the shape, size and distribution area of the connected domain generated by the tampered area corresponding to the character are usually irregular due to the general purpose of artificial tampering and the shape design of the character, and considering that the shape of the connected domain in the target binary image is regular and the area is small due to the fact that printing ink is uneven or ink permeates between different material layers due to the fault of ticket making equipment or the fact that bill raw materials contain opaque impurities and the like accidentally causes, the number of pixel points at the edge of the connected domain can be further counted to determine the perimeter of the connected domain, and whether the connected domain belongs to the condition caused by mechanical fault or is from artificial intentional tampering is judged according to the perimeter of the connected domain.
It should be noted that, in an optional embodiment, in order to improve accuracy of ticket number tampering identification, area identification and cutting of a single ticket number character area may be performed on the target ticket number area, which may specifically include the following steps: obtaining ticket number character area edge coordinates corresponding to a plurality of ticket number characters contained in the target ticket number area; and cutting the target ticket number area according to the edge coordinates of the ticket number character area, and acquiring a plurality of ticket number character areas contained in the target ticket number area as a plurality of target ticket number character areas. And after each target ticket number character area is cut out, analyzing related connected domains of each ticket number character and acquiring first identification information. The method for positioning each ticket number character can further improve the accuracy of ticket tampering identification.
Since the positions and sizes of the front images acquired at the same time correspond to the same front images, the ticket number area corresponding to the RGB image in the infrared transmission image may be the same, and the above-described connected component analysis and the acquisition and determination of the information related to the connected component information with respect to the infrared reflection image may be performed on the ticket number area in the infrared transmission image due to the characteristics of the infrared image.
In addition, in one embodiment of the invention, the target number area may include a target serial number area in addition to the target ticket number area, and it is determined that the ticket to be identified is tampered when the target serial number area is tampered.
The identification of the tampering trace in the serial number area can be specifically described as follows according to the corresponding gray scale information (i.e. the second identification information):
fig. 5 is a flowchart of acquiring second identification information in another embodiment.
In step S1062, a grayed image of the infrared transmission image is acquired as a target grayed image.
In step S1064, the gradation distribution information corresponding to the plurality of target serial number character areas included in the target serial number area of the target grayed image is determined as the gradation distribution information in the target serial number area.
Specifically, the process of determining the difference degree of the gray distribution corresponding to each target serial number character area included in the target grayed image in step S1064 may further include steps S1072-S10710 as shown in fig. 6.
Fig. 6 is a flowchart illustrating determining a difference degree of gray distribution corresponding to each target serial number character region in another embodiment.
In step S1072, the edge coordinates of the serial number character region corresponding to the plurality of serial number characters included in the target serial number region are acquired.
Specifically, the gray level is compared with a preset gray level threshold, and the character region larger than the threshold is determined to belong to the target serial number character region, so that the corresponding edge coordinate is determined.
In step S1074, the target serial number region is cut according to the serial number character region edge coordinates, and a plurality of serial number character regions included in the target serial number region are obtained as a plurality of target serial number character regions.
The target serial number region includes a plurality of serial number characters, and the serial number characters may be, for example, arabic numerals, roman numerals, or image information such as chinese characters or mathematical symbols.
In step S1076, the grayscale distribution information of each target serial number character region is acquired, and the grayscale peak distribution information of each target serial number character region is determined.
Specifically, the gray scale distribution information of each target pipeline number character region includes gray scale value information corresponding to each pixel point constituting the character region, and in an alternative embodiment, the obtained gray scale distribution information may be a gray scale histogram, or a number of pixel points corresponding to each gray scale value is obtained as the gray scale distribution information according to a gray scale information table storing a mapping relationship between pixel point positions and gray scale values thereof.
Taking a gray histogram as an example, the gray peak refers to the gray value with the most corresponding pixels in a gray value region with a certain preset length (for example, the gray value is 0 to 50) (the gray histogram is a function of the gray value, which represents the number of pixels with a certain gray level in an image and reflects the frequency of occurrence of a certain gray level in the image)
In step S1078, the gray scale distribution difference between each target serial number character region and the other target serial number character regions in the target serial number region is determined based on the gray scale peak distribution information of each target serial number character region.
For example, in an alternative embodiment, 4 target serial number character regions are correspondingly cut out from the target serial number region, which are respectively denoted as region a, region B, region C, and region D.
The specific information on the distribution of the peak value of the gray scale may be the number of the peak values and the gray scale interval in which each peak value is located.
For example, in this embodiment, the gray peak information corresponding to the area a may be: there are three peaks, which are distributed in the gray scale interval [150,180], [50,80] and [0,20 ].
Meanwhile, the gray value interval where the number of gray peak values corresponding to the region B and the peak value are located may be: there are two peaks, which are distributed in the gray scale interval [150,180] and [50,80], respectively.
The gray peak information corresponding to the region C and the region D can be the same as that of the region B, and the gray peak information is also two peaks which are respectively distributed in the gray intervals [150,180] and [50,80 ].
Therefore, the difference degree of the gray scale distribution between the target serial number region a and the other serial number regions (region B, region C, and region D) is 80%, and the corresponding weight value is determined in the calculation of the gray scale root difference degree according to the overlap degree between the preset number of gray scale peaks and each gray scale peak distribution interval. In an alternative embodiment, the weight of the number difference degree of the gray peak values (the ratio of the number of the peak values for the current serial number character to the sum of the current serial number character and the serial number character to be compared) may be set to 0.4, and the weight of the degree of coincidence of the gray peak value distribution section may be set to 0.6. Since the distribution of the gray peak values of B, C, D is substantially the same, the degree of difference between them is 0.
It should be noted that, the determining the gray distribution difference degree is to compare each target serial number character region with other target serial number character regions one by one to obtain the difference degrees of a and B and a and C, and meanwhile, in an alternative embodiment, the average distribution condition may be counted first, and then each target serial number region is compared with the average gray distribution condition to obtain the gray distribution difference degree of each region, such as the region a and the region B, and the average gray distribution condition, as the target gray distribution difference degree.
The benefits of this are: human revision is typically done for a few serial numbers to modify the number to one that is desirable to a tamperer. The altered character also has a different gray scale distribution due to the different transparency of the post-alteration coverage and the normal printing ink. Meanwhile, the gray distribution under the abnormal fault condition is the same (for example, when the ink is insufficient or excessive, the distribution trend changes corresponding to the middle-low or high gray range of all normal serial number characters are the same), so that the tampered character area can be well identified by the difference of the gray distribution among the character ranges.
In step S10710, the gradation distribution difference degree corresponding to each target serial number character region is determined as the gradation distribution information in the target serial number region.
In step S1028, it is determined whether the target number region is tampered with according to the first identification information and/or the second identification information.
The specific process of determining according to the first and/or second identification information includes steps S1082-S1086 as shown in fig. 7.
Fig. 7 is a flowchart illustrating a process of determining whether the target number area is tampered according to the first identification information and/or the second identification information in one embodiment.
In step S1082, when the number of connected domains in the target ticket number area is greater than a preset threshold value of the number of connected domains, it is determined that the target number area is tampered with.
In a specific embodiment, considering that factors influencing tampering identification, such as inaccuracy of acquisition angles and light rays, or lens contamination faults, exist in devices which accidentally interfere with light transmission, such as printing, material paper and the like, or acquire images, such as a sensor and the like, with a certain probability, the number of connected domains can be set to be 5, and when the number of connected domains identified in a target ticket number area is 2, the connected domains can be determined to be connected domains caused by external environment and equipment noise instead of a large number of connected domains corresponding to tampering, such as malicious altering and the like.
Or, in step S1084, when the number of connected domain edge pixel points in the target ticket number area is greater than the preset edge pixel point number threshold, it is determined that the target number area is tampered.
In a specific embodiment, considering that the general area and perimeter of the connected domain caused by the outside are both small, the number of the preset edge pixels may be set to 50, so that the connected domain which is possibly present under the normal condition and has the perimeter and the area larger than those under the normal condition is determined to be the connected domain caused by tampering.
Or, in step S1086, it is determined that the target number area has been tampered when the difference degree between the gray level distributions of at least one target serial number character area and other target serial number character areas in the target serial number area is greater than a preset difference degree threshold.
Continuing with the explanation in step S1078, since the difference degree of the gray scale distribution between the target serial number character region a and the other target serial number character regions B, C, D is 80%, which is greater than the preset difference threshold value of 50%, that is, there is at least one trend of the gray scale distribution different from the others, it is determined that there is tampering in the target serial number region.
It should be noted that, in the target serial number region, half of the target serial number characters have the same gray level trend, and the other half of the target serial number characters have the same gray level trend, for example, in another embodiment, the target serial number region includes 4 target serial number character regions: n, M, P, Q, if the gray peak values and the peak distribution areas of the region N and the region M are the same (if there are three peak values, they are respectively distributed in the gray intervals [40,60], [80,100], [150,180]), and the gray peak values and the peak distribution areas of the region P and the region Q are the same (if there are four peak values, they are respectively distributed in the gray intervals [0,20], [40,60], [80,100], [150,180]), the gray difference between the above target serial number character areas will have the same phase situation in pairs, but considering that the tampered region will still have the obvious distribution in the low gray interval, which is not the normal printing foreground area, the tampering of the serial number area in this case can also be identified by the method shown in fig. 8 below.
In another embodiment, the tamper identification according to the second identification information may further include steps S1092 to S1094 shown in fig. 8.
Fig. 8 is a flowchart illustrating a process of determining whether the target number area is tampered with according to the second identification information in another embodiment.
Optionally, in step S1092, determining the number of pixels in a preset gray value interval in the target serial number character region as a target gray point number;
specifically, since the low gray value often appears in a low gray value interval such as [0,30] (the lowest gray value corresponding to black due to its substantial opacity), the preset gray value interval in this step may be set to [0,20] or [0,15], so as to obtain and detect the pixel conditions with low gray value abnormal distribution.
In an alternative embodiment, the division of the preset low gray scale value interval may be adjusted according to the overall gray scale level of the target serial number region. For example, due to the type of printing ink and the variation and limitation of the collected light, it may happen that the gray value corresponding to the character foreground of the whole target serial number region is small (i.e. the color of the character pattern is visually closer to black), so that the low gray range may be set closer to the origin (i.e. the gray value is 0), i.e. adjusted to [0,10] from the preset range [0,20 ]. Similarly, when it is determined that the entire gray scale level of the target serial number region is high (e.g., the printing ink is lightly colored or the image is overexposed when it is acquired), the preset interval [0,20] may be appropriately adjusted to [10,40], or the like. Therefore, the accuracy of tampering identification of the target number area according to the gray scale distribution information can be further improved.
In step S1094, it is determined that the target number region is tampered with when the number of the target gray scale points is greater than the number of the preset pixels.
Continuing with the example in step S1086, it can be seen that two target serial number character areas exist in the target serial number character area included in the target serial number area: the number of pixel points, i.e., target gray-scale points, distributed in the preset gray-scale value interval [0,15] in the region P and the region Q are respectively 50 and 80, and both of the pixel points are greater than the pixel point threshold value 10 set in the previous step, so that the target serial number character region P and the target serial number character region Q can be judged to be tampered, and the target serial number region can be judged to be tampered.
An embodiment of the present invention is described further below in conjunction with FIG. 9 in the context of an "identify serial number region of check and whether the ticket number region has been altered".
FIG. 9 is a detailed flow diagram in one embodiment in the context of an application that identifies whether the serial number area of a check and the check number area have been altered.
In this application scenario, the method may be implemented based on a recognition terminal configured with a sensor of a preset type to acquire a front-facing RGB image, an infrared reflection image, and an infrared transmission image corresponding to the check to be recognized.
As shown in fig. 9, the specific implementation flow in the foregoing application scenario may include steps S1102 to S1108, which are described in detail as follows:
in step S1102, an RGB image, an infrared reflection image, and an infrared transmission image of the front side of the number area of the check to be recognized are acquired by the recognition terminal.
The specific obtaining manner may be obtained through a preset type of sensor (e.g., an infrared sensor) included in the aforementioned identification terminal. The related information can be sent to the terminal user to instruct the user to place the check to be recognized in the scanning area according to the preset position so as to obtain the corresponding RGB image, infrared reflection image and infrared transmission image with the same position and size in the front direction.
Or receiving the pre-shot or stored front-side forward eligible RGB image, infrared reflection image and infrared transmission image corresponding to the check to be recognized uploaded by the user through a communication unit of the terminal.
In an optional application scenario, the recognition terminal may further be configured with an interactive interface, so as to present, to a user, a related message prompting the user to upload or scan an image of a type corresponding to a check to be recognized, and further present, when the quality or specification of the image uploaded or scanned by the user does not meet a preset requirement, the related message for reacquisition.
In step S1104, a target number area of the check is determined based on the RGB image, the infrared reflection image, and the infrared transmission image.
Specifically, the RGB image may be recognized according to a preset algorithm, a serial number area and a ticket number area of the check to be recognized are determined, and the two number areas are mapped to the same area in the infrared reflection image and the infrared transmission image, so that the image area corresponding to the RGB ticket number area in the infrared reflection image is determined as a target ticket number area, and the image area corresponding to the RGB serial number area in the infrared transmission image is determined as a target serial number area.
Specifically, the RGB image may be grayed, binarized, and the like, the serial number region and the ticket number region of the check to be recognized are determined according to the comparison result of the gray distribution characteristics of the foreground and background pixel points in the image and the preset threshold, and then the regions are further mapped to the image region corresponding to the infrared reflection image and the infrared transmission image.
In an alternative application scenario, the target ticket number image region of the check to be recognized may be an image region containing 8-digit roman numerals and/or arabic numeral characters and their backgrounds.
Similarly, the target serial number image area of the check to be recognized may be an image area containing 8-digit roman numerals, chinese characters and/or arabic numeral characters and their backgrounds. The implementation of the method is not limited by the variety and/or number of characters in the serial number or ticket number area.
In step S1106, connected component information in the target ticket number area is acquired as first identification information, and/or gray distribution information in the target serial number area is acquired as second identification information.
Specifically, in this application scenario, the obtaining process for the first identification information may include the following steps:
and acquiring a binary image of the infrared reflection image as a target binary image.
Specifically, pixel regions with a gray value lower than a certain threshold value in the infrared reflection image after the graying processing can be uniformly processed into black (that is, the gray value is 0) according to a preset threshold value, and the remaining pixel points are processed into white (that is, the gray value is 255), so that a target binary image corresponding to the infrared reflection image is obtained.
Then, a connected domain existing in the target binary image can be marked according to algorithms such as a two-step method, and particularly in the application scenario, the target ticket number region can include three connected domains which are respectively marked as: f1, F2 and F3. Further, the edge pixel points of the connected domains F1, F2, and F3 may be respectively 50, 1000, and 300, so as to represent the perimeters of the marked connected domains.
In an alternative embodiment, the obtaining process for the second identification information may include the following:
firstly, graying the infrared transmission image containing the target serial number area to obtain a corresponding target grayed image.
Further, the edge coordinates of the serial number character region corresponding to the serial number characters included in the target serial number region may be obtained. For example, the edge coordinates of the character area of the output stream can be determined by performing image recognition on the target gray-scale image. And cutting the target serial number region according to the edge coordinates of the serial number character region, and acquiring a plurality of serial number character regions contained in the target serial number region as a plurality of target serial number character regions.
In this application scenario, the 6 serial number character image regions contained in the target serial number region can be cut out from the target serial number region: p1, P2, P3, P4, P5 and P6.
Acquiring gray scale distribution information of each target serial number character area, and determining gray scale peak value distribution information of each target serial number character area;
alternatively, a gray histogram of each of the target serial number character regions may be obtained,
specifically, a certain gray scale interval length and a pixel peak value threshold value are set, the distribution with the distribution number larger than the preset peak value threshold value is determined as a gray scale peak value, and the sum is determined, so that the gray scale interval with the peak value number and the peak value is determined as target gray scale peak value distribution information.
In this application scenario, the target gray peak distribution information corresponding to the target serial number character regions P1, P2, P3, P4, P5, and P6 may be:
two peak values respectively located at [50,80], [120,140 ];
two peak values respectively located at [50,80], [120,140 ];
two peak values respectively located at [50,80], [120,140 ];
two peak values respectively located at [50,80], [120,140 ];
three peak values respectively located at [0,30], [50,80], [120,140 ];
two peaks, located [50,80], [120,140], respectively.
And determining the gray distribution difference degree of each target serial number character area and other target serial number character areas of the target serial number area according to the gray peak value distribution information of each target serial number character area.
Specifically, after the corresponding gray level peaks are identified according to the gray level histogram, the gray level distribution difference degrees between the target serial number character region P5 and the other serial number character regions P1, P2, P3, P4 and P6 are all 30% (determined according to the overlap ratio between the preset number of gray level peaks and each gray level peak distribution section and the corresponding weight value in the calculation of the gray level root difference degree), and the gray level distribution difference degrees between the serial number character regions P1, P2, P3, P4 and P6 are all 0, so that the gray level distribution information of the target serial number region is determined.
In another optional application scenario, the process of determining the gray scale distribution may further include: and acquiring a target serial number area, and determining the number of pixels of the target serial number character area in a preset gray value interval as the number of target gray values.
Optionally, when the preset gray scale interval is set to be a low gray scale interval, for example, [0,20], in each target stream number character region, there is a region P5 in which 100 pixels are distributed in the interval [0,20], that is, the target gray scale point number corresponding to P5 is 500, and the other regions (P1, P2, P3, P4, P6) are not distributed, so the target gray scale point numbers corresponding to P1, P2, P3, P4, P6 are all 0.
In step S1108, it is determined whether the target number region is tampered with according to the first identification information and/or the second identification information.
Specifically, the process of determining according to the first identification information may be as follows:
and when the number of the connected domains in the target ticket number area is larger than a preset connected domain number threshold value, judging that the target number area is tampered.
Continuing with the example in step S1106, specifically, the preset threshold of the number of connected domains may be 5, and the target ticket number area determines that the number of connected domains is 3 (F1, F2, F3) which is less than 5, so that it cannot be determined that the target number is tampered, and the determination in the subsequent steps needs to be continued.
For example, when the number of connected domain edge pixel points in the target ticket number region is greater than a preset edge pixel point number threshold, it may be determined that the target number region is tampered.
Optionally, when the preset edge pixel count threshold is set to 200, the edge pixel counts of F1, F2, and F3 are 50, 1000, and 300, respectively, and the edge pixel counts of the connected domains F2 and F3 are all greater than 200, so that it is determined that the target number region has been tampered.
In an alternative embodiment, the process of further or simultaneously determining according to the second identification information may be as follows:
and judging that the target number area is tampered when the gray distribution difference degree between at least one target serial number character area and other target serial number character areas of the target serial number area is larger than a preset difference degree threshold value.
Continuing with the example of the target serial number region in step S1106:
the degrees of difference in the gradation distribution between P5 and the other water character regions P1, P2, P3, P4, and P6 are all 30%, and the degrees of difference in the gradation distribution between the water character regions P1, P2, P3, P4, and P6 are 0. Meanwhile, the preset difference threshold is 15%, so that the difference of the gray peak value distribution of the region P5 and the gray peak value distribution of other regions larger than the preset threshold can be judged, and thus the target serial number region in the target serial number region is judged to be tampered.
In addition, optionally, the process of determining by combining the target gray point number determined in step S1106 includes:
and when the number of the target gray scale points is larger than the number of the preset pixels, judging that the target number area is tampered.
Specifically, the preset pixel number may be 80, the target gray scale number corresponding to P5 is 500 or more than 80, and the target gray scale numbers corresponding to P1, P2, P3, P4 and P6 are all 0 or less than 80, so that it is determined that the target number region is tampered.
Fig. 10 is a block diagram showing the structure of a tamper device for identifying a bill number area in one embodiment.
As shown in fig. 10, a tampering device 1110 for identifying a bill number region according to an embodiment of the present invention may include: a first acquisition unit 1112, a determination unit 1114, a second acquisition unit 1116, and a determination unit 1118.
The first obtaining unit 1112 is configured to obtain an RGB image, an infrared reflection image, and an infrared transmission image of the front of the bill to be recognized;
the determining unit 1114 is configured to identify the RGB image, and determine a target number region in the infrared reflection image and the infrared transmission image, where the target number region includes a target ticket number region and a target serial number region;
the second obtaining unit 1116 is configured to obtain connected component information in the target ticket number area as first identification information, and/or obtain gray distribution information in the target serial number area as second identification information;
the judging unit 1118 is configured to judge whether the target number region is tampered according to the first identification information and/or the second identification information.
FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a terminal, and may also be a server. As shown in fig. 11, the computer apparatus includes a processor, a memory, a communication interface, a sensing device, and a processing module, which are connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may further store a computer program that, when executed by the processor, causes the processor to implement a method of tamper recognition of a ticket number region. The internal memory may also store a computer program that, when executed by the processor, causes the processor to execute a method of tamper identification of the ticket number region. Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is proposed, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
acquiring an RGB (red, green and blue) image, an infrared reflection image and an infrared transmission image of the front face of a bill to be identified;
identifying the RGB image, and determining target number areas in the infrared reflection image and the infrared transmission image, wherein the target number areas comprise a target ticket number area and a target serial number area;
acquiring connected domain information in a target ticket number area as first identification information and/or acquiring gray distribution information in the target serial number area as second identification information;
and determining whether the target number area is tampered or not according to the first identification information and/or the second identification information.
In one embodiment, a computer-readable storage medium is proposed, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the steps of:
acquiring an RGB (red, green and blue) image, an infrared reflection image and an infrared transmission image of the front face of a bill to be identified;
identifying the RGB image, and determining target number areas in the infrared reflection image and the infrared transmission image, wherein the target number areas comprise a target ticket number area and a target serial number area;
acquiring connected domain information in a target ticket number area as first identification information and/or acquiring gray distribution information in the target serial number area as second identification information;
and determining whether the target number area is tampered or not according to the first identification information and/or the second identification information.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM). While the foregoing is directed to embodiments of the present invention, it will be understood by those skilled in the art that various changes may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A method of identifying tampering with a ticket number region, the method comprising:
acquiring an RGB (red, green and blue) image, an infrared reflection image and an infrared transmission image of the front face of a bill to be identified;
identifying the RGB image, and determining target number areas in the infrared reflection image and the infrared transmission image, wherein the target number areas comprise a target ticket number area and a target serial number area;
acquiring connected domain information in the target ticket number area as first identification information,
and/or the presence of a gas in the gas,
acquiring gray distribution information in the target serial number area as second identification information;
and determining whether the target number area is tampered or not according to the first identification information and/or the second identification information.
2. The method of claim 1, wherein the identifying the RGB image and determining the target number region in the infrared-reflected image and the infrared-transmitted image comprises:
performing image recognition on the RGB image, and determining a ticket number area and a serial number area in the RGB image as an RGB serial number area and an RGB ticket number area respectively;
and determining an image area corresponding to the RGB ticket number area in the infrared reflection image as a target ticket number area, and determining an image area corresponding to the RGB serial number area in the infrared transmission image as a target serial number area.
3. The method according to claim 1, wherein the acquiring connected component information in the target ticket number area as first identification information and/or acquiring gray distribution information in the serial number area as second identification information comprises:
acquiring a binary image of the infrared reflection image as a target binary image;
performing connected domain analysis on the target binary image, and determining the number of connected domains and/or the number of connected domain edge pixel points in a target ticket number region in the target binary image as connected domain information in the target ticket number region;
and/or the presence of a gas in the gas,
acquiring a grayed image of the infrared transmission image as a target grayed image;
determining gray distribution information corresponding to a plurality of target serial number character areas contained in a target serial number area of the target gray-scale image as the gray distribution information in the target serial number area.
4. The method according to claim 3, wherein the determining gray scale distribution information corresponding to a plurality of target serial number character regions included in a target serial number region of the target grayed-out image as the gray scale distribution information in the target serial number region further comprises:
acquiring the edge coordinates of a serial number character area corresponding to a plurality of serial number characters contained in the target serial number area;
and cutting the target serial number area according to the edge coordinates of the serial number character area, and acquiring a plurality of serial number character areas contained in the target serial number area as a plurality of target serial number character areas.
5. The method according to claim 3 or 4, wherein the determining gray distribution information corresponding to each target serial number character region included in a serial number region in the target grayed image as the gray distribution information in the target serial number region further comprises:
acquiring gray scale distribution information of each target serial number character area, and determining gray scale peak value distribution information of each target serial number character area;
determining the gray distribution difference degree of each target serial number character area and other target serial number character areas of the target serial number area according to the gray peak value distribution information of each target serial number character area;
and determining the gray distribution difference degree corresponding to each target serial number character area as the gray distribution information in the target serial number area.
6. The method according to claim 5, wherein the determining whether the target number area is tampered with according to the first identification information and/or the second identification information comprises:
when the number of the connected domains in the target ticket number area is larger than a preset connected domain number threshold value, judging that the target number area is tampered;
or when the number of connected domain edge pixel points in the target ticket number area is larger than a preset edge pixel point number threshold value, judging that the target number area is tampered;
or, when the gray distribution difference degree between at least one target serial number character area and other target serial number character areas in the target serial number area is larger than a preset difference degree threshold value, judging that the target serial number area is tampered.
7. The method according to claim 5, wherein the determining gray scale distribution information corresponding to each target serial number character region included in a serial number region in the target grayed image as the gray scale distribution information in the target serial number region further comprises: determining the number of pixel points of the target pipeline number character area in a preset gray value interval as the number of target gray values;
the determining whether the target number area is tampered according to the first identification information and/or the second identification information further includes: and when the number of the target gray scale points is larger than the number of the preset pixels, judging that the target number area is tampered.
8. An apparatus for identifying tampering of a ticket number field, the apparatus comprising:
the first acquisition unit is used for acquiring an RGB (red, green and blue) image, an infrared reflection image and an infrared transmission image of the front face of the bill to be recognized;
the determining unit is used for identifying the RGB image and determining a target number area in the infrared reflection image and the infrared transmission image, wherein the target number area comprises a target ticket number area and a target serial number area;
the second acquisition unit is used for acquiring connected domain information in a target ticket number area as first identification information and/or acquiring gray distribution information in the target serial number area as second identification information;
and the judging unit is used for judging whether the target number area is tampered or not according to the first identification information and/or the second identification information.
9. A computer-readable medium, in which a computer program is stored which, when being executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 7.
10. A computer terminal comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
CN201910695522.0A 2019-07-30 2019-07-30 Method, device, system and readable medium for identifying tampering of bill number area Pending CN112307824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910695522.0A CN112307824A (en) 2019-07-30 2019-07-30 Method, device, system and readable medium for identifying tampering of bill number area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910695522.0A CN112307824A (en) 2019-07-30 2019-07-30 Method, device, system and readable medium for identifying tampering of bill number area

Publications (1)

Publication Number Publication Date
CN112307824A true CN112307824A (en) 2021-02-02

Family

ID=74485104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910695522.0A Pending CN112307824A (en) 2019-07-30 2019-07-30 Method, device, system and readable medium for identifying tampering of bill number area

Country Status (1)

Country Link
CN (1) CN112307824A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950564A (en) * 2021-02-23 2021-06-11 北京三快在线科技有限公司 Image detection method and device, storage medium and electronic equipment
CN114979589A (en) * 2021-02-26 2022-08-30 深圳怡化电脑股份有限公司 Image processing method, image processing apparatus, electronic device, and medium
CN114998887A (en) * 2022-08-08 2022-09-02 山东精惠计量检测有限公司 Intelligent identification method for electric energy meter
CN116403098A (en) * 2023-05-26 2023-07-07 四川金投科技股份有限公司 Bill tampering detection method and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950564A (en) * 2021-02-23 2021-06-11 北京三快在线科技有限公司 Image detection method and device, storage medium and electronic equipment
CN112950564B (en) * 2021-02-23 2022-04-01 北京三快在线科技有限公司 Image detection method and device, storage medium and electronic equipment
CN114979589A (en) * 2021-02-26 2022-08-30 深圳怡化电脑股份有限公司 Image processing method, image processing apparatus, electronic device, and medium
CN114979589B (en) * 2021-02-26 2024-02-06 深圳怡化电脑股份有限公司 Image processing method, device, electronic equipment and medium
CN114998887A (en) * 2022-08-08 2022-09-02 山东精惠计量检测有限公司 Intelligent identification method for electric energy meter
CN114998887B (en) * 2022-08-08 2022-10-11 山东精惠计量检测有限公司 Intelligent identification method for electric energy meter
CN116403098A (en) * 2023-05-26 2023-07-07 四川金投科技股份有限公司 Bill tampering detection method and system
CN116403098B (en) * 2023-05-26 2023-08-08 四川金投科技股份有限公司 Bill tampering detection method and system

Similar Documents

Publication Publication Date Title
CN112307824A (en) Method, device, system and readable medium for identifying tampering of bill number area
CN108596166B (en) Container number identification method based on convolutional neural network classification
CN107180479B (en) Bill identification method, device, equipment and storage medium
EP3021259A1 (en) Banknote recognition and classification method and system
CN103456075B (en) A kind of bill handling method and device
CN106991423A (en) Whether the method and device of watermark is included in identification specification picture
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
US20140193063A1 (en) Duplicate check image resolution
US20180373960A1 (en) Trademark graph element identification method, apparatus and system, and computer storage medium
CN107610316B (en) Method and device for detecting defect of paper money and terminal equipment
CN107195069A (en) A kind of RMB crown word number automatic identifying method
WO2011126411A9 (en) Method for processing bank notes (variants)
CN107273890A (en) Graphical verification code recognition methods and device for character combination
CN111860369A (en) Fraud identification method and device and storage medium
CN111986378A (en) Bill color fiber yarn detection method and system
CN110378351A (en) Seal discrimination method and device
CN113139927A (en) Banknote crack detection method, device, equipment and readable medium
CN105788064A (en) Bill identifying method and bill identifying device
CN110533704B (en) Method, device, equipment and medium for identifying and verifying ink label
CN106600812A (en) Paper currency recognition method and paper currency recognition device
CN108806058A (en) A kind of paper currency detecting method and device
Amirsab et al. An automated recognition of fake or destroyed Indian currency notes
CN106447908A (en) Paper money authentic identification method and device
CN109543554B (en) Bill detection method, device, terminal and computer readable storage medium
JPH11306325A (en) Method and device for object detection

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