Banknote inspection method and device
By combining grayscale images and point cloud data to determine the usage of banknotes, the misjudgment problem caused by folding and embossed textures in the existing technology is solved, and the accuracy of identifying new and old banknotes is improved.
Patent Information
- Application Number
- CN202211478506.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-11-23
AI Technical Summary
Existing banknote recognition methods are prone to misjudgment when identifying the degree of newness and oldness due to signs of use such as folding and embossed textures, resulting in errors in sorting new and old banknotes.
By obtaining the grayscale image and point cloud data of the banknote to be tested, the first usage degree and the second usage degree of the banknote are determined by combining the grayscale image and the point cloud data, and the usage degree is integrated to improve the recognition accuracy.
It effectively reduces misjudgments caused by textures such as folding and embossed textures, and improves the accuracy and correctness of identifying new and old banknotes.
Smart Images

Figure CN115938036B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a banknote inspection method and device. Background Art
[0002] Identifying and sorting old and new banknotes is a crucial yet tedious task for banks and other financial institutions. Existing grayscale recognition methods use the grayscale values of a banknote image to determine the characteristic values of a specific portion of the image, thereby identifying the banknote's condition. This method is effective for identifying damaged and stained banknotes. However, other signs of use, such as folds and embossed textures, are often misidentified as stains during the grayscale image recognition process, resulting in poor recognition results and errors in sorting new and old banknotes. Summary of the Invention
[0003] The main purpose of the embodiments of the present invention is to provide a banknote inspection method and device to improve the accuracy of banknote inspection.
[0004] To achieve the above objectives, an embodiment of the present invention provides a banknote inspection method, comprising:
[0005] Obtaining a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote;
[0006] determining a first usage degree of the banknote according to the grayscale image of the banknote to be tested and the grayscale image of the standard banknote;
[0007] determining a second usage degree of the banknote according to the point cloud data of the banknote to be tested;
[0008] The banknote inspection result is determined based on the first usage degree of the banknote and the second usage degree of the banknote.
[0009] In one embodiment, determining the first usage level of the banknote based on the grayscale image of the banknote to be tested and the grayscale image of the standard banknote includes:
[0010] Determining the standard grayscale of the banknote to be tested according to the grayscale image of the banknote to be tested;
[0011] determining a standard grayscale of a standard banknote according to a grayscale image of the standard banknote;
[0012] The first usage degree of the banknote is determined according to the standard grayscale of the banknote to be tested and the standard grayscale of the standard banknote.
[0013] In one embodiment, determining the standard grayscale of the banknote to be tested based on the grayscale image of the banknote to be tested includes:
[0014] The feature blocks are located by the head image in the grayscale image of the banknote to be tested to obtain the grayscale value of each feature block;
[0015] The standard grayscale of the banknote to be tested is determined according to the grayscale value of each feature block.
[0016] In one embodiment, determining the second usage degree of the banknote based on the point cloud data of the banknote to be tested includes:
[0017] Determine the distance between the banknote to be tested and the fitting plane according to the point cloud data of the banknote to be tested;
[0018] The second usage degree of the banknote is determined according to the distance between the banknote to be tested and the fitting plane.
[0019] In one embodiment, determining the distance between the banknote to be tested and the fitting plane based on the point cloud data of the banknote to be tested includes:
[0020] Determine the average data of the horizontal dimension, the average data of the vertical dimension, and the average data of the vertical dimension according to the point cloud data of the banknote to be tested;
[0021] The distance between the banknote to be tested and the fitting plane is determined according to the average data of the horizontal dimension, the average data of the longitudinal dimension, the average data of the vertical dimension and the point cloud data of the banknote to be tested.
[0022] In one embodiment, determining the banknote verification result according to the first usage degree and the second usage degree of the banknote includes:
[0023] Determining a comprehensive usage degree of the banknote based on the first usage degree of the banknote and the second usage degree of the banknote;
[0024] The banknote inspection results are determined based on the comprehensive usage of the banknotes.
[0025] An embodiment of the present invention further provides a banknote inspection device, comprising:
[0026] An acquisition module, used to acquire a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote;
[0027] A banknote first usage degree module, configured to determine a first usage degree of the banknote based on a grayscale image of the banknote to be tested and a grayscale image of a standard banknote;
[0028] A banknote second usage degree module, configured to determine the banknote second usage degree based on the point cloud data of the banknote to be tested;
[0029] The banknote inspection result module is used to determine the banknote inspection result according to the first usage degree of the banknote and the second usage degree of the banknote.
[0030] In one embodiment, the first banknote usage module includes:
[0031] A standard grayscale unit for a banknote to be tested, configured to determine a standard grayscale of the banknote to be tested according to a grayscale image of the banknote to be tested;
[0032] A standard banknote standard grayscale unit, configured to determine a standard banknote standard grayscale based on a grayscale image of the standard banknote;
[0033] The first usage degree unit of the banknote is used to determine the first usage degree of the banknote according to the standard grayscale of the banknote to be tested and the standard grayscale of the standard banknote.
[0034] In one embodiment, the standard grayscale unit of the banknote to be tested includes:
[0035] The grayscale value subunit is used to locate the feature blocks by using the head image in the grayscale image of the banknote to be tested to obtain the grayscale value of each feature block;
[0036] The standard grayscale subunit of the banknote to be tested is used to determine the standard grayscale of the banknote to be tested according to the grayscale value of each feature block.
[0037] In one embodiment, the banknote second usage module includes:
[0038] A distance unit, used to determine the distance between the banknote to be tested and the fitting plane based on the point cloud data of the banknote to be tested;
[0039] The second usage degree unit of the banknote is used to determine the second usage degree of the banknote according to the distance between the banknote to be tested and the fitting plane.
[0040] In one embodiment, the distance unit includes:
[0041] A dimension average data subunit, configured to determine horizontal dimension average data, longitudinal dimension average data, and vertical dimension average data based on the point cloud data of the banknote to be tested;
[0042] The distance subunit is used to determine the distance between the banknote to be tested and the fitting plane based on the average data of the horizontal dimension, the average data of the longitudinal dimension, the average data of the vertical dimension and the point cloud data of the banknote to be tested.
[0043] In one embodiment, the banknote verification result module includes:
[0044] A banknote comprehensive usage unit, configured to determine a banknote comprehensive usage based on the first banknote usage and the second banknote usage;
[0045] The banknote inspection result unit is used to determine the banknote inspection result according to the comprehensive usage of the banknote.
[0046] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the banknote inspection method when executing the computer program.
[0047] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the banknote inspection method are implemented.
[0048] An embodiment of the present invention further provides a computer program product, comprising a computer program / instructions, which implement the steps of the banknote inspection method when executed by a processor.
[0049] The banknote inspection method and device of the embodiment of the present invention first determine the first usage degree of the banknote based on the grayscale image of the banknote to be tested and the grayscale image of the standard banknote, then determine the second usage degree of the banknote based on the point cloud data of the banknote to be tested, and finally determine the banknote inspection result based on the first usage degree of the banknote and the second usage degree of the banknote, which can improve the accuracy of banknote inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 is a flow chart of a banknote inspection method according to an embodiment of the present invention;
[0052] Figure 2 is a flow chart of a banknote inspection method according to another embodiment of the present invention;
[0053] Figure 3 This is a flow chart of S102 in an embodiment of the present invention;
[0054] Figure 4 This is a flow chart of S103 in an embodiment of the present invention;
[0055] Figure 5 This is a flow chart of S301 in an embodiment of the present invention;
[0056] Figure 6 is a structural block diagram of a banknote inspection device according to an embodiment of the present invention;
[0057] Figure 7 It is a structural block diagram of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0059] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, apparatus, device, method, or computer program product. Therefore, the present disclosure may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software.
[0060] It should be noted that the banknote inspection method and device of the present invention can be used in banknote inspection scenarios in the financial field, and can also be used in any field other than the financial field. The embodiments of the present invention do not limit the application fields of the banknote inspection method and device.
[0061] The acquisition, storage, use, and processing of data in this application's technical solution comply with relevant national laws and regulations.
[0062] Given that current banknote inspection and identification methods are ineffective, resulting in errors in sorting new and old banknotes, an embodiment of the present invention provides a banknote inspection method and device. A banknote to be inspected is placed into a banknote slot, and high-speed video and grayscale processing are performed on the banknote during its transport process to obtain a grayscale image of the current banknote. The result is compared with the grayscale image of a standard new banknote to obtain the banknote usage degree D1. The banknote then enters a texture recognition module, where a laser array scans the banknote height to obtain texture data to determine the usage degree D2. Next, the banknote enters a comprehensive judgment module, where D1 and D2 are weighted averaged according to different weights to obtain a comprehensive usage result D3. Finally, the banknote is determined to be new or old based on its comprehensive usage degree, and is sorted and sent to the corresponding banknote box. This can reduce errors caused by other signs of use, such as folding and embossed textures, during the banknote sorting process, and improve the accuracy of identifying new and old banknotes. The present invention is described in detail below with reference to the accompanying drawings.
[0063] Figure 1 4 is a flow chart of a banknote inspection method according to an embodiment of the present invention. Figure 2 FIG. 1 is a flow chart of a banknote inspection method according to another embodiment of the present invention. Figure 1-Figure 2 As shown, the banknote inspection method includes:
[0064] S101: Acquire a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote.
[0065] In specific implementation, the image of the banknote to be tested can be obtained by taking a photo and grayscale processing to obtain a grayscale image P1. A 3D laser scanner is used to scan the banknote to be tested to obtain point cloud data W1. The grayscale image P0 of the standard banknote is retrieved from the background image library.
[0066] S102: Determine a first usage degree of the banknote according to the grayscale image of the banknote to be tested and the grayscale image of the standard banknote.
[0067] Figure 3 This is a flow chart of S102 in an embodiment of the present invention. Figure 3 As shown, S102 includes:
[0068] S201: Determine the standard grayscale of the banknote to be tested according to the grayscale image of the banknote to be tested.
[0069] In one embodiment, S201 includes:
[0070] The feature blocks are located by the head image in the grayscale image of the banknote to be tested to obtain the grayscale value of each feature block, and the standard grayscale of the banknote to be tested is determined according to the grayscale value of each feature block.
[0071] In the specific implementation, the feature blocks are located by the banknote head face to obtain the gray value G of each feature block. j ′(x,y),G j ′(x,y) is the grayscale value of the jth feature block of the banknote to be tested. The average grayscale value of the feature block of the banknote to be tested is regarded as the measurement standard grayscale of the currency type. The standard grayscale of the banknote to be tested of this currency type is Wherein, m is the number of feature blocks, and P1 is the standard grayscale of the banknote to be tested.
[0072] S202: Determine the standard grayscale of the standard banknote according to the grayscale image of the standard banknote.
[0073] Similarly, the standard grayscale of standard banknotes can be obtained: Among them, P0 is the standard grayscale of the standard banknote of this currency, G j (x,y) is the grayscale value of the j-th standard banknote feature block.
[0074] S203: Determine a first usage degree of the banknote according to the standard grayscale of the banknote to be tested and the standard grayscale of the standard banknote.
[0075] In specific implementation, the first usage degree of the banknote can be determined by the following formula:
[0076]
[0077] Among them, D1 is the first usage degree of the banknote. The larger D1 is, the higher the grayscale of the banknote to be tested is relative to the standard new banknote, that is, the more damaged areas there are, the older the banknote is; conversely, the smaller D1 is, the fewer damaged areas there are, and the newer the banknote is.
[0078] S103: Determine a second usage degree of the banknote according to the point cloud data of the banknote to be tested.
[0079] In specific implementation, an absolute plane can be fitted through point cloud data first, and then the degree of folding and texture on the banknote to be tested relative to the new banknote can be obtained by calculating the distance from each scanning point to the absolute plane.
[0080] Figure 4 This is a flow chart of S103 in an embodiment of the present invention. Figure 4 As shown, S103 includes:
[0081] S301: Determine the distance between the banknote to be tested and the fitting plane according to the point cloud data of the banknote to be tested.
[0082] Figure 5 This is a flow chart of S301 in an embodiment of the present invention. Figure 5 As shown, S301 includes:
[0083] S401: Determine average data of the horizontal dimension, average data of the vertical dimension, and average data of the vertical dimension based on the point cloud data of the banknote to be tested.
[0084] In specific implementation, the horizontal dimension average data, the vertical dimension average data and the vertical dimension average data can be determined respectively by the following formulas:
[0085]
[0086]
[0087]
[0088] in, is the average data of the horizontal dimension, n is the number of point cloud data of the banknote to be tested, is the average data in the vertical dimension, is the average data of vertical dimension, x i is the horizontal coordinate data of the i-th point cloud data, y i is the vertical coordinate data of the i-th point cloud data, z i is the vertical coordinate data of the i-th point cloud data.
[0089] S402: Determine the distance between the banknote to be tested and the fitting plane according to the average data of the horizontal dimension, the average data of the longitudinal dimension, the average data of the vertical dimension and the point cloud data of the banknote to be tested.
[0090] In specific implementation, the above-mentioned dimensional average data is substituted into the plane space equation, and the plane equation of the average value of the coordinate point distance can be obtained as follows:
[0091]
[0092] The least square method is used to calculate the w′(x i ,y i ,z i ) to the distance p from the fitting plane i , we can get the offset of the point relative to the fitted plane. Among them, A, B, C, and D are all constants and can be calculated by substituting the point cloud data into the above plane equation.
[0093] In specific implementation, the distance between the banknote to be tested and the fitting plane can be determined by the following formula:
[0094]
[0095] Among them, p i is the distance from each point cloud data to the fitting plane, A is the first constant, B is the second constant, and C is the third constant.
[0096] S302: Determine a second usage degree of the banknote according to the distance between the banknote to be tested and the fitting plane.
[0097] The offset p of all scanning points on the target banknote i The sum of the squares of the deviation of the entire banknote relative to the fitting plane can be used to measure the degree of use of the texture and folds on the banknote to be tested, that is, the second usage degree of the banknote is determined by the following formula:
[0098]
[0099] D2 is the second usage degree of the banknote. A larger D2 indicates a greater overall deflection of the banknote, more creases, or a greater degree of folding, indicating an older banknote. Conversely, a smaller D2 indicates fewer creases or a smaller degree of folding, indicating a newer banknote.
[0100] S104: Determine a banknote inspection result according to the first banknote usage degree and the second banknote usage degree.
[0101] In one embodiment, S104 includes:
[0102] The comprehensive usage degree of the banknote is determined based on the first usage degree of the banknote and the second usage degree of the banknote, and the banknote inspection result is determined based on the comprehensive usage degree of the banknote.
[0103] In specific implementation, D1 and D2 can be weighted averaged according to different weights to obtain the final comprehensive banknote usage D3, and the value range of D3 is between 0-1.
[0104] For example, the maximum size of a RMB banknote is a 100-yuan note, which is 156mm long and 76mm wide. Therefore, the upper limit of the offset range represented by D2 is half of the longest edge of the banknote, which is 78mm.
[0105] The comprehensive usage of banknotes D3 = X × D1 + Y × D2. If the value range of D3 is controlled between 0 and 1, then X = 0.5, Y = 0.0064, and D3 = 0.5 × D1 + 0.0064 × D2 can be obtained.
[0106] D3 is compared with a pre-set new banknote usage range. Banknotes outside the range are marked as old and deposited in the old banknote cassette; banknotes within the new banknote usage range are marked as new and deposited in the new banknote cassette. For example, if D3 < 0.7, the banknote is considered old and deposited in the old banknote cassette for subsequent recycling. If 0.7 ≤ D3 ≤ 1, the banknote is considered new and deposited in the new banknote cassette for continued use.
[0107] Figure 1 The execution subject of the banknote inspection method shown can be a computer. Figure 1 As can be seen from the process shown, the banknote inspection method of the embodiment of the present invention first determines the first usage degree of the banknote based on the grayscale image of the banknote to be tested and the grayscale image of the standard banknote, then determines the second usage degree of the banknote based on the point cloud data of the banknote to be tested, and finally determines the banknote inspection result based on the first usage degree of the banknote and the second usage degree of the banknote, which can improve the accuracy of banknote inspection.
[0108] The specific process of the banknote inspection method according to the embodiment of the present invention is as follows:
[0109] 1. Obtain the grayscale image of the banknote to be tested, the point cloud data of the banknote to be tested, and the grayscale image of the standard banknote.
[0110] 2. Locate the feature blocks using the head image in the grayscale image of the banknote to be tested to obtain the grayscale value of each feature block, and determine the standard grayscale of the banknote to be tested based on the grayscale value of each feature block.
[0111] 3. Determine the standard grayscale of the standard banknote based on the grayscale image of the standard banknote.
[0112] 4. Determine the first usage degree of the banknote based on the standard grayscale of the banknote to be tested and the standard grayscale of the standard banknote.
[0113] 5. Determine the average data of the horizontal dimension, the average data of the vertical dimension, and the average data of the vertical dimension based on the point cloud data of the banknote to be tested.
[0114] 6. Determine the distance between the banknote to be tested and the fitting plane based on the average data of the horizontal dimension, the average data of the longitudinal dimension, the average data of the vertical dimension, and the point cloud data of the banknote to be tested.
[0115] 7. Determine the second usage degree of the banknote based on the distance between the banknote to be tested and the fitting plane.
[0116] 8. Determine the comprehensive usage of the banknote based on the first usage and the second usage of the banknote, and determine the banknote inspection result based on the comprehensive usage of the banknote.
[0117] In summary, the banknote inspection method provided by the embodiment of the present invention has the following beneficial effects:
[0118] (1) By adding new banknote texture data, we can further reduce the misjudgment caused by creases, embossing and other textures during the new banknote recognition process, better calibrate the basis for judging new and old banknotes, and effectively improve the success rate and accuracy of banknote recognition;
[0119] (2) By evaluating the degree of use of banknotes in different dimensions, the system for determining the newness of banknotes has been optimized, and the effectiveness of determining the newness of banknotes has been further enhanced.
[0120] Based on the same inventive concept, an embodiment of the present invention further provides a banknote inspection device. Since the principle of solving the problem of the device is similar to that of the banknote inspection method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0121] Figure 6 FIG is a structural block diagram of a banknote inspection device according to an embodiment of the present invention. Figure 6 As shown, the banknote inspection device includes:
[0122] An acquisition module, used to acquire a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote;
[0123] A banknote first usage degree module, configured to determine a first usage degree of the banknote based on a grayscale image of the banknote to be tested and a grayscale image of a standard banknote;
[0124] A banknote second usage degree module, configured to determine the banknote second usage degree based on the point cloud data of the banknote to be tested;
[0125] The banknote inspection result module is used to determine the banknote inspection result according to the first usage degree of the banknote and the second usage degree of the banknote.
[0126] In one embodiment, the first banknote usage module includes:
[0127] A standard grayscale unit for a banknote to be tested, configured to determine a standard grayscale of the banknote to be tested according to a grayscale image of the banknote to be tested;
[0128] A standard banknote standard grayscale unit, configured to determine a standard banknote standard grayscale based on a grayscale image of the standard banknote;
[0129] The first usage degree unit of the banknote is used to determine the first usage degree of the banknote according to the standard grayscale of the banknote to be tested and the standard grayscale of the standard banknote.
[0130] In one embodiment, the standard grayscale unit of the banknote to be tested includes:
[0131] The grayscale value subunit is used to locate the feature blocks by using the head image in the grayscale image of the banknote to be tested to obtain the grayscale value of each feature block;
[0132] The standard grayscale subunit of the banknote to be tested is used to determine the standard grayscale of the banknote to be tested according to the grayscale value of each feature block.
[0133] In one embodiment, the banknote second usage module includes:
[0134] A distance unit, used to determine the distance between the banknote to be tested and the fitting plane based on the point cloud data of the banknote to be tested;
[0135] The second usage degree unit of the banknote is used to determine the second usage degree of the banknote according to the distance between the banknote to be tested and the fitting plane.
[0136] In one embodiment, the distance unit includes:
[0137] A dimension average data subunit, configured to determine horizontal dimension average data, longitudinal dimension average data, and vertical dimension average data based on the point cloud data of the banknote to be tested;
[0138] The distance subunit is used to determine the distance between the banknote to be tested and the fitting plane based on the average data of the horizontal dimension, the average data of the longitudinal dimension, the average data of the vertical dimension and the point cloud data of the banknote to be tested.
[0139] In one embodiment, the banknote verification result module includes:
[0140] A banknote comprehensive usage unit, configured to determine a banknote comprehensive usage based on the first banknote usage and the second banknote usage;
[0141] The banknote inspection result unit is used to determine the banknote inspection result according to the comprehensive usage of the banknote.
[0142] In practical applications, the banknote inspection device includes:
[0143] The transport module is used to transport the banknotes to be inspected and send them into the target banknote box;
[0144] The image acquisition module includes an acquisition module for taking high-speed pictures of the banknotes to be inspected in transmission and performing grayscale processing on the obtained images;
[0145] The texture acquisition module includes an acquisition module for scanning the height of the banknote by emitting a laser beam through a laser array to obtain texture data;
[0146] The calculation and sorting module includes a first banknote usage module, a second banknote usage module and a banknote inspection result module, which is used to calculate the usage of the acquired image and texture data to obtain the newness and oldness of the banknote to be inspected. The sorting module sends the banknote to the corresponding banknote box according to the judgment result.
[0147] In summary, the banknote inspection device of the embodiment of the present invention first determines the first usage degree of the banknote based on the grayscale image of the banknote to be tested and the grayscale image of the standard banknote, then determines the second usage degree of the banknote based on the point cloud data of the banknote to be tested, and finally determines the banknote inspection result based on the first usage degree of the banknote and the second usage degree of the banknote, which can improve the accuracy of banknote inspection.
[0148] The embodiment of the present invention also provides a specific implementation of a computer device that can implement all the steps of the banknote inspection method in the above embodiment. Figure 7 This is a block diagram of the computer device in the embodiment of the present invention, see Figure 7 , the computer equipment specifically includes the following:
[0149] Processor 701 and memory 702 .
[0150] The processor 701 is configured to call the computer program in the memory 702. When the processor executes the computer program, all steps of the banknote inspection method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0151] Obtaining a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote;
[0152] determining a first usage degree of the banknote according to the grayscale image of the banknote to be tested and the grayscale image of the standard banknote;
[0153] determining a second usage degree of the banknote according to the point cloud data of the banknote to be tested;
[0154] The banknote inspection result is determined based on the first usage degree of the banknote and the second usage degree of the banknote.
[0155] In summary, the computer device of the embodiment of the present invention first determines the first usage degree of the banknote based on the grayscale image of the banknote to be tested and the grayscale image of the standard banknote, then determines the second usage degree of the banknote based on the point cloud data of the banknote to be tested, and finally determines the banknote inspection result based on the first usage degree of the banknote and the second usage degree of the banknote, which can improve the accuracy of banknote inspection.
[0156] The embodiment of the present invention also provides a computer-readable storage medium capable of implementing all steps of the banknote inspection method in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the computer program implements all steps of the blockchain contract scheduling method in the above embodiment. For example, when the processor executes the computer program, the following steps are implemented:
[0157] Obtaining a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote;
[0158] determining a first usage degree of the banknote according to the grayscale image of the banknote to be tested and the grayscale image of the standard banknote;
[0159] determining a second usage degree of the banknote according to the point cloud data of the banknote to be tested;
[0160] The banknote inspection result is determined based on the first usage degree of the banknote and the second usage degree of the banknote.
[0161] In summary, the computer-readable storage medium of the embodiment of the present invention first determines the first usage degree of the banknote based on the grayscale image of the banknote to be tested and the grayscale image of the standard banknote, then determines the second usage degree of the banknote based on the point cloud data of the banknote to be tested, and finally determines the banknote inspection result based on the first usage degree of the banknote and the second usage degree of the banknote, which can improve the accuracy of banknote inspection.
[0162] The present invention also provides a computer program product capable of implementing all steps of the banknote inspection method in the above embodiment. The computer program product includes a computer program / instructions. When the computer program / instructions are executed by a processor, all steps of the banknote inspection method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0163] Obtaining a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote;
[0164] determining a first usage degree of the banknote according to the grayscale image of the banknote to be tested and the grayscale image of the standard banknote;
[0165] determining a second usage degree of the banknote according to the point cloud data of the banknote to be tested;
[0166] The banknote inspection result is determined based on the first usage degree of the banknote and the second usage degree of the banknote.
[0167] In summary, the computer program product of the embodiment of the present invention first determines the first usage degree of the banknote based on the grayscale image of the banknote to be tested and the grayscale image of the standard banknote, then determines the second usage degree of the banknote based on the point cloud data of the banknote to be tested, and finally determines the banknote inspection result based on the first usage degree of the banknote and the second usage degree of the banknote, which can improve the accuracy of banknote inspection.
[0168] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0169] Those skilled in the art will also appreciate that the various illustrative logical blocks, units, and steps listed in the embodiments of the present invention can be implemented by electronic hardware, computer software, or a combination of the two. To clearly demonstrate the interchangeability of hardware and software, the various illustrative components, units, and steps described above have generally described their functions. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present invention.
[0170] The various illustrative logic blocks, units, or devices described in the embodiments of the present invention can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.
[0171] The steps of the methods or algorithms described in the embodiments of the present invention may be directly embedded in hardware, a software module executed by a processor, or a combination of the two. The software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, the storage medium may be connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Alternatively, the storage medium may also be integrated into the processor. The processor and storage medium may be provided in an ASIC, which may be provided in a user terminal. Alternatively, the processor and storage medium may also be provided in different components in the user terminal.
[0172] In one or more exemplary designs, the above-mentioned functions described in the embodiments of the present invention can be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, these functions can be stored on a computer-readable medium or transmitted in the form of one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media that facilitate the transfer of computer programs from one location to another. Storage media can be any available medium that can be accessed by a general or special computer. For example, such computer-readable media can include but are not limited to RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store program code in the form of instructions or data structures and other forms that can be read by a general or special computer, or a general or special processor. In addition, any connection can be appropriately defined as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote resource via a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless methods such as infrared, wireless, and microwave, it is also included in the definition of computer-readable media. The disks and discs mentioned above include compact disks, laser disks, optical disks, DVDs, floppy disks, and Blu-ray discs. Disks typically reproduce data magnetically, while discs typically reproduce data optically with lasers. Combinations of the above may also be included in computer-readable media.
Claims
1. A banknote inspection method, characterized in that: include: Obtaining a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote; wherein the point cloud data of the banknote to be tested is obtained by scanning with a three-dimensional laser scanner; and the grayscale image of the standard banknote is retrieved from a background image library; determining a first usage degree of the banknote according to the grayscale image of the banknote to be tested and the grayscale image of the standard banknote; Determining a second usage degree of the banknote based on the point cloud data of the banknote to be tested, comprising: determining average data of a horizontal dimension, average data of a vertical dimension, and average data of a vertical dimension based on the point cloud data of the banknote to be tested; determining a distance from the banknote to be tested to a fitting plane based on the average data of the horizontal dimension, the average data of the vertical dimension, the average data of the vertical dimension, and the point cloud data of the banknote to be tested; and using the sum of the squares of the distances from the banknote to be tested to the fitting plane as the second usage degree of the banknote; Taking a weighted average of the first usage degree of the banknote and the second usage degree of the banknote according to different weights to determine a comprehensive usage degree of the banknote; The banknote inspection result is determined according to the comprehensive usage of the banknote.
2. The banknote inspection method according to claim 1, characterized in that: Determining the first usage degree of the banknote according to the grayscale image of the banknote to be tested and the grayscale image of the standard banknote includes: Determining a standard grayscale of the banknote to be tested according to the grayscale image of the banknote to be tested; determining a standard grayscale of a standard banknote according to the grayscale image of the standard banknote; The first usage degree of the banknote is determined according to the standard grayscale of the banknote to be tested and the standard grayscale of the standard banknote.
3. The banknote inspection method according to claim 2, characterized in that: Determining the standard grayscale of the banknote to be tested according to the grayscale image of the banknote to be tested includes: Positioning feature blocks using the head image in the grayscale image of the banknote to be tested to obtain grayscale values of each feature block; The standard grayscale of the banknote to be tested is determined according to the grayscale value of each feature block.
4. A banknote inspection device, characterized in that: include: An acquisition module is used to acquire a grayscale image of the banknote to be tested, point cloud data of the banknote to be tested, and a grayscale image of a standard banknote; wherein the point cloud data of the banknote to be tested is obtained by scanning with a three-dimensional laser scanner; and the grayscale image of the standard banknote is retrieved from a background image library; a banknote first usage degree module, configured to determine a first banknote usage degree based on the grayscale image of the banknote to be tested and the grayscale image of the standard banknote; a banknote second usage degree module, configured to determine the banknote second usage degree based on the point cloud data of the banknote to be tested; The banknote second usage module includes: a distance unit and a banknote second usage unit; The distance unit includes a dimension average data subunit and a distance subunit; The dimension average data subunit is used to determine the horizontal dimension average data, the longitudinal dimension average data and the vertical dimension average data according to the point cloud data of the banknote to be tested; The distance subunit is configured to determine the distance between the banknote to be tested and the fitting plane based on the average data of the horizontal dimension, the average data of the longitudinal dimension, the average data of the vertical dimension, and the point cloud data of the banknote to be tested; The banknote second usage degree unit is configured to take the sum of squares of distances from the banknote to be tested to the fitting plane as the banknote second usage degree; Banknote inspection result module, including: A banknote comprehensive usage unit, configured to determine a banknote comprehensive usage by taking a weighted average of the first banknote usage and the second banknote usage according to different weights; The banknote inspection result unit is used to determine the banknote inspection result according to the comprehensive usage of the banknote.
5. A computer device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the banknote inspection method according to any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the banknote inspection method according to any one of claims 1 to 3 are implemented.
7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the banknote inspection method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
ATM platform-based method of detecting new bank note and old bank note
CN104966349A