A ticket authentication method and system

Through a method based on similar feature image template comparison, combined with sliding window and feature type comparison algorithms, the problem of traditional methods being sensitive to image distortion and poor scalability is solved, and accurate identification and efficient forgery identification of multiple document types are achieved.

CN116092230BActive Publication Date: 2024-09-27WUHAN ZHUOMU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211653271.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2024-09-27
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

Traditional ticket authentication methods are sensitive to image distortion, cannot accurately identify authenticity, have errors in feature extraction and matching, and have poor scalability, making them unable to adapt to the authentication needs of multiple document types.

Method used

Using a method based on similar feature image template comparison, a sliding window algorithm is used to select candidate areas near the feature area, and comparison algorithms of different feature types (such as edge detection, HOG features, OCR technology) are used to calculate the similarity, and the comparison results are synthesized to determine authenticity.

Benefits of technology

It achieves accurate identification of anti-counterfeiting features of multiple types of images, adapts to various document types, improves counterfeiting accuracy and scalability, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116092230B
    Figure CN116092230B
Patent Text Reader

Abstract

The present invention belongs to the technical field of ticket anti-counterfeiting, and discloses a ticket authentication method and system, which collects the characteristic image of a genuine ticket, delimits the characteristic area and prepares a characteristic file; when authenticating, the characteristic area in each characteristic file is compared with the corresponding area in the characteristic image of the ticket to be authenticated for consistency; before the comparison, a series of candidate areas are selected near the corresponding area of ​​the ticket to be authenticated according to a sliding window algorithm to participate in the comparison of the current area; when comparing, each candidate area is compared with the template characteristic image area and the similarity is calculated; the maximum similarity is selected from all candidate areas as the comparison result of the current characteristic area, and finally the authenticity result is given after the similarity of all characteristic areas is integrated. The method of the present invention can adapt to various types of image anti-counterfeiting features, has good adaptability to position deviation during image acquisition, and can accurately identify most of the tickets with anti-counterfeiting features on the market.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of ticket anti-counterfeiting, and in particular relates to a ticket counterfeiting identification method and system. Background Art

[0002] At present, in the field of machine vision, template matching is a commonly used algorithm, which is usually used to search for the part of the target image that best matches the existing image. Common similarity calculation methods include: square difference matching, standard square difference matching, correlation matching, standard correlation matching, etc. However, in the practical process of counterfeit detection, due to the existence of various forms of image noise and the wear and tear of documents during use, some images will be distorted, and traditional methods are very sensitive to such distortion, which often leads to more recognition errors. Especially in the application of magnetic image detection, due to the relatively low signal-to-noise ratio of the image, traditional methods cannot accurately identify the authenticity.

[0003] In addition, in the field of machine vision, there are some feature extraction and matching methods, such as SIFT feature extraction algorithm, HOG feature extraction algorithm, etc. However, in the application of counterfeit detection, since the anti-counterfeiting images are often not too complicated, it is often difficult to extract enough feature points in the target area. In many cases, the feature points are even matched incorrectly, resulting in large matching errors.

[0004] The existing counterfeit detection products on the market often only include the counterfeit detection function for a certain type of items, such as a sorting machine for a certain type of banknotes, a bill meter for a certain type of bills, etc. Such products often have poor scalability, and provide less comprehensive counterfeit detection functions for any target feature images, so there is a broad space for development.

[0005] Traditional ticket authentication methods are often too targeted, mostly targeting only a single currency or document, and have poor scalability. With the rapid development of the times, there will be more and more tickets and documents with anti-counterfeiting functions on the market. If a new algorithm or equipment needs to be developed for each new document type or version, it will cause a lot of unnecessary waste of resources.

[0006] Through the above analysis, the problems and defects of the prior art are as follows:

[0007] (1) Traditional authentication methods are very sensitive to image distortion, which often leads to a large number of recognition errors. Especially in magnetic image authentication, due to the relatively low image signal-to-noise ratio, traditional methods cannot accurately identify the authenticity and can only make qualitative judgments, which cannot be used as a sole basis for authentication.

[0008] (2) Since the anti-counterfeiting image is not too complex, it is difficult for the feature extraction and matching method to extract enough feature points in the target area, and even the feature points are matched incorrectly, resulting in a large matching error.

[0009] (3) Existing ticket authentication methods are only targeted at the authentication of a certain type of items. They are too targeted and have poor scalability, resulting in a waste of resources. However, they provide little comprehensive authentication function for arbitrary target feature images. Summary of the invention

[0010] In view of the problems existing in the prior art, the present invention provides a ticket authentication method and system, and more particularly, relates to a ticket authentication method, system, medium, device and terminal based on similar feature image template comparison.

[0011] The present invention is implemented as follows: a method for verifying the authenticity of a ticket, the method comprising: collecting a feature image of a genuine ticket, defining a feature area and preparing a feature file; during verification, performing consistency comparison between the feature area in each feature file and the corresponding area in the feature image of the ticket to be verified; before the comparison, selecting a series of candidate areas near the corresponding area of ​​the ticket to be verified according to a sliding window algorithm to participate in the comparison of the current area; during the comparison, comparing each candidate area with the template feature image area and calculating the similarity; selecting the largest similarity among all candidate areas as the comparison result of the current feature area, and finally providing the authenticity result after comprehensively analyzing the similarities of all feature areas.

[0012] Furthermore, the ticket authentication method includes the following steps:

[0013] Step 1: Before verifying the authenticity of a ticket, collect the feature image of a genuine ticket as a template feature image, select the feature area manually, and save the feature image and feature area information into a feature file;

[0014] Step 2: When verifying the authenticity of a ticket, collect the feature image of the ticket to be verified, and load the corresponding feature file using software;

[0015] Step three, compare the cropped template feature images corresponding to all feature areas in the feature file with the feature image to be authenticated, obtain a comparison result, and output the authenticity information of the feature image to be authenticated.

[0016] Furthermore, tickets include various banknotes, bank notes, documents and certificates with optical and / or magnetic anti-counterfeiting features; characteristic image refers to an image that presents anti-counterfeiting features under specific conditions, including infrared images, ultraviolet fluorescence images, visible light images and magnetic images, among which magnetic image refers to the magnetic distribution image on the surface of the ticket; characteristic area refers to the area where the anti-counterfeiting mark is located in the characteristic image; template characteristic image refers to the characteristic image of a genuine ticket saved or described in a characteristic file.

[0017] Furthermore, in step 1, the feature image of the genuine ticket is collected in advance before the counterfeit identification, and any number of feature areas that need to be identified are manually selected, and the position of each area in the original image and the corresponding feature type are saved in a feature file; wherein, one feature file can only correspond to one feature image, but contains one or more feature areas;

[0018] Furthermore, in step two, when performing authentication, the feature image to be authenticated is read from the acquisition device or from a local file or through remote transmission over the network, and the feature file to be used is selected from the feature file library; for each feature area, a corresponding comparison algorithm is selected for the corresponding feature type for comparison, and the similarity of each feature area is output to comprehensively obtain the authenticity authentication result; when comparing, all feature areas described in the feature file are compared independently, and the comparison result of each feature area does not affect the comparison results of other feature areas.

[0019] Among them, the feature types include fixed feature area, character area and security line area; the fixed feature area refers to the area where anti-counterfeiting features of exactly the same shape exist at a fixed position in the feature image of the ticket; the character area refers to the area where a character string of the same length exists at a fixed position on the ticket, and the content of the character string may be the same or different; the security line area refers to the specific area in the ticket where the magnetic metal wire is located.

[0020] Furthermore, in step three, when comparing features, a sliding window algorithm is used to crop a series of candidate regions within a certain range of a window near the location of the feature region for comparison one by one, and the highest similarity is taken as the feature region comparison result.

[0021] The comparison algorithm pre-processes the input image according to different feature types, including channel fusion, Gaussian filtering, histogram equalization and threshold segmentation, to highlight the anti-counterfeiting features of the ticket; among them, for the security line area, the anti-counterfeiting feature is reflected in the magnetic distribution, so the comparison of the security line area is only applicable to magnetic images.

[0022] The comparison algorithm of the fixed feature area uses the edge detection operator to calculate the edge information of the image, and divides the image into a simple feature image and a complex feature image according to the average brightness of the edge image. The point-by-point matching method is used for the simple feature image, and the HOG feature extraction and matching method is used for the complex feature image.

[0023] The comparison of character regions uses OCR technology to locate the string and determine the similarity based on the location and string length differences.

[0024] The security line area is compared using a preprocessing algorithm. After effectively filtering out image interference information, image segmentation is performed to retain only the security line portion. The length and position relationship of each bright block in the security line is recorded to form a feature array. A cyclic comparison is performed based on the feature arrays generated by the two images to determine the similarity of the security line area.

[0025] Cyclic matching means that, since the magnetic blocks of the security thread present a regular periodic distribution, a part of the continuous magnetic blocks in the feature array is used as the matching target, and similar continuous magnetic blocks are found in the feature array of the image to be detected, and the similarity is calculated.

[0026] Another object of the present invention is to provide a ticket authentication system using the ticket authentication method, the ticket authentication system comprising:

[0027] An image acquisition module, used to acquire any one or more of an ultraviolet fluorescence image, an infrared image, a visible light image or a magnetic image of the ticket surface;

[0028] The feature file generation and import module is used to create feature files according to the image area defined by the user and the feature type selected. It includes the import and analysis functions of existing feature files, and also includes a feature file database that is shared between multiple systems.

[0029] A feature comparison module is used to compare the feature areas according to the information in the feature file and obtain the comparison result;

[0030] The result display and export module is used to display the comparison results of each characteristic area after the comparison is completed, and provides the function of exporting the identification report;

[0031] The UI module is used to interact with users, provide previews of feature images, and call functions of other modules.

[0032] Another object of the present invention is to provide a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the ticket authentication method.

[0033] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to execute the steps of the ticket authentication method.

[0034] Another object of the present invention is to provide an information data processing terminal, which is used to implement the above-mentioned ticket authentication system.

[0035] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving the problems, the technical solutions to be protected by the present invention and the results and data during the research and development process are closely combined to analyze in detail and deeply how the technical solutions of the present invention solve the technical problems, and some creative technical effects brought about after solving the problems. The specific description is as follows:

[0036] The present invention provides a ticket authentication method based on feature image template comparison. The ticket authentication method supports multi-modal authentication, supports authentication of all tickets with optical and / or magnetic anti-counterfeiting features, and supports feature image template comparison based on feature files. The authentication function can be easily expanded by managing feature files, and the method has high scalability, accurate authentication, and low maintenance cost.

[0037] Second, considering the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are described in detail as follows:

[0038] The method of the present invention can adapt to various types of image anti-counterfeiting features, has good adaptability to position deviation during image acquisition, and can accurately identify most bills and certificates with anti-counterfeiting features on the market. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. 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 creative work.

[0040] Figure 1 is a flow chart of a ticket authentication method provided by an embodiment of the present invention;

[0041] Figure 2 This is an overall flow chart of a banknote counterfeit identification method based on magnetic image template comparison provided in Example 1 of the present invention;

[0042] Figure 3 It is a flow chart of a comparison algorithm of a banknote counterfeit identification method based on magnetic image template comparison provided in Example 1 of the present invention;

[0043] Figure 4 This is an overall flow chart of the ticket authentication method based on ultraviolet fluorescence image template comparison provided in Example 2 of the present invention;

[0044] Figure 5 is a flow chart of a comparison algorithm of a ticket authentication method based on ultraviolet fluorescence image template comparison provided in Example 2 of the present invention;

[0045] Figure 6This is an organizational chart of a paper currency counterfeit detection system based on magnetic image template comparison provided by Example 3 of the present invention;

[0046] Figure 7 is a flow chart of a method for verifying counterfeit documents based on ultraviolet fluorescence image template comparison provided in Example 2 of the present invention;

[0047] Figure 8 is a flow chart of comparing each characteristic area in a counterfeit identification ticket with a characteristic file provided in Embodiment 2 of the present invention;

[0048] Fig. 9 It is a schematic diagram of the system architecture provided by Example 3 of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0050] In view of the problems existing in the prior art, the present invention provides a ticket authentication method and system, which will be described in detail below in conjunction with the accompanying drawings.

[0051] In order to enable those skilled in the art to fully understand how to implement the present invention in detail, this section is an explanatory embodiment that expands and describes the technical solution of the claims.

[0052] like Figure 1 As shown, the ticket authentication method provided by the embodiment of the present invention includes the following steps:

[0053] S101, before verifying the authenticity of a ticket, pre-collect a feature image of a genuine ticket as a template feature image, manually select a feature area, and save the feature image and feature area information into a feature file;

[0054] S102, when verifying the authenticity of a ticket, a feature image of the ticket to be verified is collected, and a corresponding feature file is loaded using software;

[0055] S103, comparing the cropped template feature images corresponding to all feature regions in the feature file with the feature image to be authenticated, obtaining a comparison result, and outputting authenticity information of the feature image to be authenticated.

[0056] As a preferred embodiment, the ticket authentication method provided by the embodiment of the present invention specifically includes the following steps:

[0057] 1) Collect the feature image of the known real ticket surface, manually select the feature area and determine the parameters such as feature type, make a feature file and save it. One feature file can only correspond to one feature image, but can contain one or more feature areas;

[0058] The types of feature areas include: fixed feature area, character area, and security line area, and each feature area can only correspond to one type. The fixed feature area refers to the area with anti-counterfeiting features of exactly the same shape at a fixed position of the ticket feature image; the character area refers to the area with a string of the same length at a fixed position of the ticket, and the string content can be the same or different; the security line area refers to the specific area in the ticket where the metal line with magnetism or microtext is located.

[0059] 2) Collect and save the characteristic images of the surface of the object to be identified;

[0060] 3) Using the sliding window algorithm according to the feature file, the feature image to be identified is used to intercept a series of corresponding feature areas in a suitable range near the image area position corresponding to each feature area in the feature file to adapt to the slight displacement generated when the acquisition device acquires the image;

[0061] 4) For each feature region in the feature file, each intercepted feature region is compared with the feature region in the corresponding feature file by selecting the corresponding algorithm according to the feature type to obtain the comparison similarity result corresponding to each feature region.

[0062] 5) All feature areas in the feature file are compared with the corresponding feature areas of the image to be authenticated for similarity, and the authenticity result of the ticket to be authenticated is obtained. During the comparison, all feature areas described in the feature file will be compared independently, and the comparison result of each feature area will not affect the comparison results of other feature areas.

[0063] The comparison process provided by the embodiment of the present invention includes the following steps:

[0064] 1) Preprocess the image according to the type of feature area. First, perform Gaussian blur to remove noise and histogram equalization to balance the image contrast. For the security line area and character area, channel fusion is required to process them into single-channel images. For the security line area, further threshold segmentation is required to process them into binary images.

[0065] 2) Select the corresponding comparison algorithm according to the feature area type and execute it;

[0066] For fixed feature areas, it is necessary to first use the edge feature extraction operator to extract the image edge, and then count the number of edges to determine the feature complexity of the fixed image area. For complex feature areas, the feature point extraction operator is used to extract the feature points in the image and count the matching ratio to calculate the similarity result; for simple feature areas, pixel-by-pixel fuzzy comparison is used to count the number of pixels within the error range to obtain the similarity result.

[0067] For the character area, OCR technology is needed to locate and recognize all characters, and the similarity is calculated based on the difference in position and total length of the character string. The characters include Chinese characters and foreign characters.

[0068] For the security line area, it is necessary to record the length and position relationship of each bright block in the security line to form a feature array, and perform a circular comparison based on the feature arrays generated by the two images to determine the similarity of the security line area.

[0069] The feature image provided by the embodiment of the present invention can be collected in a manner determined according to the presentation form of the anti-counterfeiting feature, and can be one of an ultraviolet fluorescence image, an infrared image, a visible light image, and a magnetic image.

[0070] The information in the feature file provided by the embodiment of the present invention includes: each feature region image, each feature region type, each feature region position and size, the entire feature image, and one or more of the producer and production time.

[0071] The algorithm provided in the embodiment of the present invention can be applied to the following counterfeit detection targets: various banknotes and bank notes with optical and / or magnetic anti-counterfeiting features, as well as certificates and documents.

[0072] The ticket authentication system provided by the embodiment of the present invention comprises:

[0073] An image acquisition module, used to acquire any one or more of an ultraviolet fluorescence image, an infrared image, a visible light image or a magnetic image of the ticket surface;

[0074] The feature file generation and import module is used to create feature files according to the image area defined by the user and the feature type selected. It includes the import and analysis functions of existing feature files, and also includes a feature file database that is shared between multiple systems.

[0075] A feature comparison module is used to compare the feature areas according to the information in the feature file and obtain the comparison result;

[0076] The result display and export module is used to display the comparison results of each characteristic area after the comparison is completed, and provides the function of exporting the identification report;

[0077] The UI module is used to interact with users, provide previews of feature images, and call functions of other modules.

[0078] In order to prove the creativity and technical value of the technical solution of the present invention, this section provides application examples of the claimed technical solution on specific products or related technologies.

[0079] Embodiment 1:

[0080] The embodiment of the present invention provides a banknote authentication method based on magnetic image template comparison, which can realize efficient authentication of banknote magnetic images; wherein banknotes include but are not limited to RMB, USD, EUR and their various versions and denominations. Figure 2 As shown, the banknote counterfeit identification method based on magnetic image template comparison provided by the embodiment of the present invention comprises the following steps:

[0081] Step 201, collect the magnetic image of the real banknote. It should be noted that in addition to ensuring the authenticity, the banknote must be consistent with the currency, denomination and version of the banknote to be authenticated.

[0082] Step 202: Create a feature file. The feature file contains a manually selected rectangular feature area, including its position and size, and the feature area type.

[0083] The characteristic region types provided in the embodiment of the present invention include fixed characteristic regions, character regions and security line regions. Fixed characteristic regions refer to regions with exactly the same magnetic distribution at fixed positions on banknotes; character regions refer to regions with strings of the same length at fixed positions on banknotes, and the string contents may be the same or different; security line regions refer to specific regions where magnetic metal lines are located in banknotes. One characteristic file can only correspond to one characteristic image, but can contain one or more characteristic regions.

[0084] Step 203: collecting the magnetic image of the banknote to be detected as counterfeit.

[0085] Step 204: compare the banknote to be verified with the characteristic file. It should be noted that the characteristic file used here must correspond to the currency, denomination and version of the banknote to be verified.

[0086] During the comparison, all feature areas described in the feature file will be compared independently, and the comparison result of each feature area will not affect the comparison results of other feature areas. In order to adapt to the positional offset of the captured image caused by factors such as the jitter of the acquisition device during the acquisition process and the unstable paper feed speed, the three feature areas all use the sliding window algorithm, and a series of candidate areas are cut out within 10% of the length and width near the location of the feature area to participate in the comparison, and the result with the highest similarity is taken as the final result of the comparison of this feature area.

[0087] Step 205, obtain the authenticity result and export the identification report.

[0088] Optionally, the comparison process of each characteristic region in step 204 is as follows: Figure 3 As shown, specifically including:

[0089] Step S211, using a sliding window algorithm to crop a series of candidate regions of the same size near the position of the feature region in the feature image to be detected;

[0090] Step S212, performing Gaussian blur on each feature region and candidate region to remove noise interference in the image.

[0091] Step S213: performing algorithm comparison according to the characteristic region types recorded in the characteristic file.

[0092] Step S214: output the highest similarity among the candidate regions as the comparison result of the current feature region.

[0093] Optionally, the specific steps of the comparison algorithm in step S213 are as follows: Figure 4 , 5 , as shown in Figure 6.

[0094] For the comparison algorithm of fixed feature region type, Figure 4 As shown, specifically including:

[0095] Step S221, use the edge extraction operator to extract the edge of the image, and then calculate the complexity of the image based on the edge image. If it is a complex image, go to step S222, extract HOG feature points and match them to calculate the similarity. For a simple image, go to step 217, perform pixel-by-pixel fuzzy matching to calculate the similarity, and finally output the result.

[0096] For character region type comparison algorithms such as Figure 5 As shown, specifically including:

[0097] Step S231, using OCR technology to identify the position and length of the string, then entering step S232, calculating the similarity based on the difference in the position and length of the string, and finally outputting the result.

[0098] For the comparison algorithm of the security line area type, Figure 6 As shown, specifically including:

[0099] Step S241, recording the length and position relationship of each bright block to form a feature array, then entering step S242, performing a cyclic comparison on the feature array to calculate the similarity, and finally outputting the result.

[0100] Embodiment 2:

[0101] The embodiment of the present invention provides a method for verifying the authenticity of a ticket based on ultraviolet fluorescence image template comparison, which can realize efficient verification of various banknotes, bank notes and certificates with ultraviolet anti-counterfeiting features. It should be noted that since most of the ultraviolet anti-counterfeiting features are presented in the form of an immutable fixed image, the feature area of ​​the embodiment of the present invention has only one type of fixed feature. Figure 7As shown, the ticket authentication method based on ultraviolet fluorescence image template comparison provided by the embodiment of the present invention includes the following steps:

[0102] Step 301, collect the ultraviolet fluorescence image of the real ticket. It should be noted that in addition to ensuring the authenticity, the ticket must be consistent with the type and version of the ticket to be authenticated.

[0103] Step 302, create a feature file. The feature file contains manually selected rectangular feature regions, including their positions and sizes, and feature region types. A feature file can only correspond to one feature image, but can contain one or more feature regions.

[0104] The characteristic region type provided in the embodiment of the present invention only includes fixed characteristic regions, where the fixed characteristic region refers to a region having completely identical ultraviolet characteristics at a fixed position on a ticket.

[0105] Step 303: collecting the ultraviolet fluorescence image of the bill to be authenticated.

[0106] Step 304: Compare the ticket to be authenticated with the feature file. It should be noted that the feature file used here must correspond to the type and version of the ticket to be authenticated.

[0107] During the comparison, all feature areas described in the feature file will be compared independently, and the comparison result of each feature area will not affect the comparison results of other feature areas. In order to adapt to the positional offset of the captured image caused by factors such as the jitter of the acquisition device during the acquisition process and the unstable paper feed speed, this embodiment uses a sliding window algorithm to crop a series of candidate areas within 10% of the length and width near the location of the feature area to participate in the comparison, and take the result with the highest similarity as the final result of the feature area comparison.

[0108] Step 305, obtain the authenticity result and export the identification report.

[0109] Optionally, the comparison process of each characteristic region in step 304 is as follows: Figure 8 As shown, specifically including:

[0110] Step 311: Use a sliding window algorithm to cut out a series of candidate regions of the same size near the position of the feature region in the feature image to be detected.

[0111] Step 312: Gaussian blur is performed on each feature region and candidate region to remove noise interference in the image.

[0112] Step 313, use the edge extraction operator to extract the edge of the image, and then calculate the complexity of the image based on the edge image. If it is a complex image, go to step 314, extract HOG feature points and match them to calculate the similarity. For a simple image, go to step 315, perform pixel-by-pixel fuzzy matching to calculate the similarity.

[0113] Finally, the process proceeds to step 316 , where after comparing all candidate regions, the highest similarity is output as the comparison result of the feature region.

[0114] Embodiment 3:

[0115] Based on the banknote authentication method based on magnetic image template comparison provided in Example 1 of the present invention, the present invention provides a banknote authentication system based on magnetic image template comparison that can be used to implement the above method. Fig. 9 , which is a schematic diagram of a system architecture provided by an embodiment of the present invention.

[0116] The image acquisition module is responsible for collecting the magnetic image of the banknote, which includes a magnetic sensor array and a roller structure. The magnetic sensor array is used to detect the magnetic distribution of each column of the banknote, and the roller structure is used to transport the banknote under the magnetic sensor array at a stable speed. The image data is processed by the MCU and uploaded to the PC software via USB.

[0117] The feature file generation and import module is used to create feature files on the PC according to the image area defined by the user and the feature type selected. It also includes the import and analysis functions of existing feature files.

[0118] The feature comparison module is used to execute the comparison process in the ticket authentication method based on ultraviolet fluorescence image template comparison provided in the first embodiment to obtain a comparison result;

[0119] The result display and export module is used to display the comparison results of each characteristic area after the comparison is completed, and provides the function of exporting the identification report;

[0120] The UI module is used to interact with users, provide previews of feature images, and call functions of other modules to facilitate user operations.

[0121] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.

[0122] The embodiments of the present invention have achieved some positive effects during the development or use process, and indeed have great advantages over the prior art. The following content is described in conjunction with data, charts, etc. of the test process.

[0123] During the research and development process, the banknote counterfeiting method based on magnetic image template comparison provided by Example 1 of the present invention can well detect the counterfeiting of banknote magnetic images. In order to test the counterfeiting effect, we made a complete data set according to various versions and denominations of RMB, including 1999 version of 1 yuan banknote, 1999 version, 2005 version, 2020 version of 5 yuan banknote, 1980 version, 2005 version, 2019 version of 10 yuan banknote, 1999 version, 2005 version, 2019 version of 20 yuan banknote, 1990 version, 1999 version, 2005 version, 2019 version of 50 yuan banknote, and 1990 version, 1999 version, 2005 version, 2019 version of 100 yuan banknote, plus some artificial counterfeit banknotes, a total of 360 magnetic images. Based on this data set, we designed a test experiment and created the necessary feature files for counterfeit detection for each denomination and version of banknotes. At the same time, considering the differences in the creation of feature files for different banknotes, we created multiple feature files for each denomination and version for testing. In the comparison of banknotes with the same denomination and version as the feature files, and in the comparison of banknotes with different denominations and versions as the feature files, our algorithm achieved good test accuracy, with an accuracy rate of 100% in the comparison of character areas, 99.3% in the comparison of fixed areas, and 99.4% in the comparison of security line areas. A small amount of comparison errors came from some severely worn banknotes, whose magnetic features were weakened, resulting in a small amount of misidentification.

[0124] We have also conducted qualitative tests on the ticket authentication method based on ultraviolet fluorescence image template comparison provided in Example 2 of the present invention, and have achieved good authentication results in a small-scale dataset, which can meet the needs of accurate authentication of some common ultraviolet fluorescence ticket images.

[0125] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. A method for verifying the authenticity of a ticket. It is characterized in that The ticket authentication method includes: collecting the feature image of the genuine ticket, demarcating the feature area and making a feature file; when authenticating, the feature area in each feature file is compared with the corresponding area in the feature image of the ticket to be authenticated for consistency; before the comparison, a series of candidate areas are selected near the corresponding area of ​​the ticket to be authenticated according to the sliding window algorithm to participate in the comparison of the current area; when comparing, each candidate area is compared with the template feature image area and the similarity is calculated; the largest similarity among all the candidate areas is selected as the comparison result of the current feature area, and finally the authenticity result is given after the similarities of all the feature areas are combined; The ticket authentication method comprises the following steps: Step 1: Before verifying the authenticity of a ticket, collect the feature image of a genuine ticket as a template feature image, select the feature area manually, and save the feature image and feature area information into a feature file; Step 2: When verifying the authenticity of a ticket, collect the feature image of the ticket to be verified, and load the corresponding feature file using software; Step 3: Compare the cropped template feature images corresponding to all feature areas in the feature file with the feature image to be authenticated, obtain a comparison result, and output the authenticity information of the feature image to be authenticated; In step 1, the feature image of the genuine ticket is collected in advance before the counterfeit identification, and any number of feature areas that need to be identified are manually selected, and the position of each area in the original image and the corresponding feature type are saved in a feature file; wherein, a feature file can only correspond to one feature image, but contains one or more feature areas; In step 2, when performing authentication, the feature image to be authenticated is read from the acquisition device or from the local file or through the network remote transmission, and the feature file to be used is selected from the feature file library; for each feature area, a corresponding comparison algorithm is selected for the corresponding feature type to perform comparison, and the similarity of each feature area is output to comprehensively obtain the authenticity authentication result; when comparing, all feature areas described in the feature file are compared independently, and the comparison result of each feature area does not affect the comparison results of other feature areas; Among them, the feature types include fixed feature area, character area and security line area; the fixed feature area refers to the area where the anti-counterfeiting features of the same shape exist at a fixed position of the ticket feature image; the character area refers to the area where the same length string exists at a fixed position of the ticket, and the string content may be the same or different; the security line area refers to the specific area where the magnetic metal line is located in the ticket; In step 3, when comparing features, a sliding window algorithm is used to crop a series of candidate regions within a certain range near the location of the feature region for comparison one by one, and the highest similarity is taken as the feature region comparison result; The comparison algorithm pre-processes the input image according to different feature types, including channel fusion, Gaussian filtering, histogram equalization and threshold segmentation, to highlight the anti-counterfeiting features of the ticket; among them, for the security line area, the anti-counterfeiting feature is reflected in the magnetic distribution, so the comparison of the security line area is only applicable to magnetic images; The comparison algorithm of fixed feature area uses edge detection operator to calculate the edge information of the image, and divides the image into simple feature image and complex feature image according to the average brightness of the edge image; the point-by-point matching method is used for simple feature image, and the HOG feature extraction and matching method is used for complex feature image; The comparison of character regions uses OCR technology to locate the string and determine the similarity based on the location and string length differences; The security line area comparison uses a preprocessing algorithm to effectively filter out image interference information and perform image segmentation to retain only the security line part; the length and position relationship of each bright block in the security line is recorded to form a feature array; a cyclic comparison is performed based on the feature arrays generated by the two images to determine the similarity of the security line area; Cyclic matching means that, since the magnetic blocks of the security thread present a regular periodic distribution, a part of the continuous magnetic blocks in the feature array is used as the matching target, and similar continuous magnetic blocks are found in the feature array of the image to be detected, and the similarity is calculated.

2. The ticket authentication method as claimed in claim 1, It is characterized in that Tickets include various banknotes, bank notes, documents and certificates with optical and / or magnetic anti-counterfeiting features; characteristic image refers to an image that presents anti-counterfeiting features under specific conditions, including infrared images, ultraviolet fluorescence images, visible light images and magnetic images, among which magnetic image refers to the magnetic distribution image on the surface of the ticket; characteristic area refers to the area where the anti-counterfeiting mark is located in the characteristic image; template characteristic image refers to the characteristic image of a genuine ticket saved or described in a characteristic file.

3. A ticket authentication system using the ticket authentication method according to any one of claims 1 to 2, It is characterized in that The ticket authentication system includes: An image acquisition module, used to acquire any one or more of an ultraviolet fluorescence image, an infrared image, a visible light image or a magnetic image of the ticket surface; The feature file generation and import module is used to create feature files according to the image area defined by the user and the feature type selected. It includes the import and analysis functions of existing feature files, and also includes a feature file database that is shared between multiple systems. A feature comparison module is used to compare the feature areas according to the information in the feature file and obtain the comparison result; The result display and export module is used to display the comparison results of each characteristic area after the comparison is completed, and provides the function of exporting the identification report; The UI module is used to interact with users, provide previews of feature images, and call functions of other modules.

4. A computer device, It is characterized in that The computer device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of the ticket authentication method as described in any one of claims 1 to 2.

5. A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to execute the steps of the ticket authentication method as claimed in any one of claims 1 to 2.

6. An information data processing terminal, It is characterized in that The information data processing terminal is used to implement the ticket authentication system as claimed in claim 3.