Code authentication system and code authentication program
The code authentication system addresses authenticity determination challenges by setting an extraction area within the code image to utilize its surface pattern and irregularities, ensuring accurate feature extraction and judgment.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- DENSO WAVE INC
- Filing Date
- 2022-04-28
- Publication Date
- 2026-06-24
AI Technical Summary
Existing product matching and search systems face challenges in accurately determining authenticity due to variations in shooting direction and size, making it difficult to correctly extract image features from products, especially when logos and product numbers are not suitable for preprocessing.
A code authentication system that sets an extraction area within the visible area of a code image, utilizing the code's surface pattern and minute irregularities as feature points, and compares these features with pre-registered ones to determine authenticity.
Ensures accurate authenticity determination by facilitating easy extraction of image features from code images, even with varying shooting conditions, thereby enhancing judgment accuracy.
Smart Images

Figure 0007879415000001 
Figure 0007879415000002 
Figure 0007879415000003
Abstract
Description
Technical Field
[0001] The disclosure according to this specification relates to a code authentication technology for determining the authenticity of a code.
Background Art
[0002] In the product matching and search system disclosed in Patent Document 1, reference parts that commonly exist in products such as logos and product numbers are detected from an image of a genuine product, and surface patterns and minute irregularities in the matching area based on the reference parts are stored as image features. In such a matching and search system, by extracting the image features of the matching area based on the reference parts from the captured image of the product to be matched and comparing them with the stored image features, it is possible to determine the authenticity of the product to be matched.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In the matching and search system of Patent Document 1, the image of the product to be matched is difficult to have the same shooting direction and shooting size as the image of the genuine product used when storing the image features. Therefore, in the process of extracting image features from the image of the product to be matched, preprocessing such as normalization is applied to the image of the matching area based on the position and orientation of the reference part.
[0005] However, the matching area is set at a position deviated from the reference part. In addition, logos and product numbers serving as reference parts are often not in a shape suitable for use in preprocessing. Therefore, in the product matching system of Patent Document 1, it may become impossible to correctly extract image features from each image of the product to be matched and the genuine product, and as a result, it may be difficult to ensure the determination accuracy.
[0006] This disclosure aims to provide a code authentication system and a code authentication program capable of ensuring judgment accuracy. [Means for solving the problem]
[0007] To achieve the above objective, one aspect disclosed is: An image acquisition unit (71,271) acquires a code image (PiC) of the code (CD) to be authenticated, An extraction area (AE) is set within the area of the code visible in the code image, and image features are extracted from the extraction area. The image features include the surface pattern and minute irregularities of the extracted area as feature points (Pf). A feature extraction unit (73,273) acquires these as extracted image features, A registration feature preparation unit (74,274) prepares pre-registered image features extracted from the extraction area of the genuine code as registered image features, A code determination unit (75,275) determines the authenticity of the code to be authenticated based on a comparison between extracted image features and registered image features, It is considered a code authentication system equipped with [specific features / features].
[0008] Furthermore, one aspect disclosed is, Obtain a code image (PiC) of the code (CD) to be authenticated (S101), An extraction area (AE) is set within the area of the code visible in the code image (S106), Image features extracted from the extraction area The image features include the surface pattern and minute irregularities of the extracted area as feature points (Pf). This is obtained as an extracted image feature (S107), Image features extracted from the extraction area of genuine code and pre-registered are prepared as registered image features (S108), Based on the comparison of extracted image features with registered image features, the authenticity of the code to be authenticated is determined (S109). This is a code authentication program that causes at least one processing unit (30, 60) to perform a process that includes the above.
[0009] In these embodiments, the extraction area from which image features are extracted is set within the area of the code visible in the code image. In addition, the code has a shape suitable for use in preprocessing, for example, by including straight sections and right-angle corners. As a result, image features can be easily extracted correctly from the code images of the product to be authenticated and the genuine product, thereby ensuring the accuracy of authenticity determination.
[0010] The reference numbers in parentheses above are merely examples of correspondences with specific configurations in the embodiments described later, and do not limit the technical scope in any way. [Brief explanation of the drawing]
[0011] [Figure 1] This figure shows an overall view of the code authentication system according to the first embodiment. [Figure 2] This figure shows an example of an extraction area set for a 2D code. [Figure 3] This is a diagram illustrating the details of the extraction area. [Figure 4] This figure shows an example of a reading screen displayed on a registration terminal and a verification terminal. [Figure 5] This diagram conceptually illustrates an example of a process for matching image features. [Figure 6] This flowchart shows the details of the feature registration process. [Figure 7] This flowchart shows the details of the code matching process. [Figure 8] This figure shows an overall view of the code authentication system according to the second embodiment. [Modes for carrying out the invention]
[0012] Hereinafter, a plurality of embodiments of the present disclosure will be described based on the drawings. In each embodiment, corresponding components may be denoted by the same reference numerals, and redundant descriptions may be omitted. When only a part of the configuration is described in each embodiment, for the other parts of the configuration, the configurations of other embodiments described previously can be applied. Also, not only the combinations of configurations explicitly shown in the description of each embodiment, but also the configurations of a plurality of embodiments can be partially combined with each other as long as there is no problem with the combination, even if not explicitly shown. And combinations not explicitly shown between the configurations described in a plurality of embodiments and modification examples are also considered to be disclosed by the following description.
[0013] (First Embodiment) The code authentication system 100 according to the first embodiment of the present disclosure shown in FIG. 1 authenticates a one-dimensional code or a two-dimensional code (hereinafter referred to as code CD) to be authenticated using an individual authentication technique. Specifically, the code authentication system 100 uses the characteristics of the surface pattern of the code CD, such as printing unevenness, fine scratches, and dents generated on the code CD, to determine whether the code CD to be authenticated is the same individual as the legitimate code CD registered in advance.
[0014] The code CD may be attached to an article in the form of a label printed on a paper medium or the like, or may be directly marked on the article by printing, engraving, stamping, or the like. The article associated with the code CD may be various articles such as industrial products, agricultural products, and fishery products, and is not limited to a specific physical object. One type of code CD may be associated with a plurality of articles of the same type, or may be associated with only one article. That is, only one legitimate code CD may be issued, or a predetermined number may exist.
[0015] The code authentication system 100 determines the authenticity of a QR code (registered trademark, see also FIGS. 2 and 3), which is one example of a two-dimensional code. The QR code includes a large number of white cells CeW and a large number of black cells CeB formed in a rectangular (square) shape. The QR code records information by a two-dimensional array of white cells CeW and black cells CeB.
[0016] The white cells CeW do not have to be strictly white and are light-colored cells with a higher brightness compared to the black cells CeB. In the part of the white cells CeW, the base surface of the medium or article on which the QR code is formed is exposed. The black cells CeB do not have to be strictly black and are dark-colored cells with a lower brightness compared to the white cells CeW. The part of the black cells CeB is colored by the ink used for printing the QR code.
[0017] In the QR code, a fixed pattern KP and a data area AD are formed by an array of white cells CeW and black cells CeB (see FIG. 2). Specifically, a finder pattern (cut-out symbol), an alignment pattern, a timing pattern, a margin area, etc. are formed as the fixed pattern KP.
[0018] The data area AD is the area of the QR code excluding the fixed pattern KP. The data area AD includes a recording area for recording the data body and a correction area for recording error correction codes used for data restoration. In the data area AD, in addition to the code CD and identification information for identifying the article, information related to the article, specifically, management information such as the production factory of the article, the producer name, raw materials, lot number, production date, and shipment date, etc. is stored. Note that in the following description, the QR code handled by the code authentication system 100 is simply referred to as "code CD".
[0019] The code authentication system 100 is composed of a registration terminal 10, an authentication server 30, a collation terminal 60, etc. The registration terminal 10, the authentication server 30, and the collation terminal 60 are each connected to a network and can communicate with each other.
[0020] The registration terminal 10 is a device that uploads information from a genuine code CD (hereinafter referred to as the master code CDr) to the authentication server 30. Multiple (many) registration terminals 10 can provide information from the master code CDr to a single authentication server 30 via a network. The registration terminal 10 is operated by a code outputter who outputs the master code CDr as a tangible object. For example, code outputters may include producers involved in the production of goods, distribution managers involved in the distribution of goods, and recycling companies involved in the recycling of goods. The registration terminal 10 may be a general-purpose device such as a smartphone or tablet terminal, or it may be a reader device dedicated to reading code CDs. Furthermore, the registration terminal 10 may be a fixed reader installed on a conveyor line or the like.
[0021] The registration terminal 10 comprises a camera 16, a display 17, a communication unit 18, and a processing circuit 10a electrically connected to these. The camera 16 is an imaging unit that generates an image (hereinafter referred to as a code image PiC, see Figure 4) containing a code CD formed on a medium or article by capturing the image. The display 17 is a display device provided on the registration terminal 10. The display by the display 17 is controlled by the processing circuit 10a. If the registration terminal 10 is a fixed reading device, the configuration corresponding to the display 17 may be omitted.
[0022] The communication unit 18 performs mobile communication in accordance with wide-area wireless communication standards such as LTE and 5G, or communication standards such as Wi-Fi (registered trademark). The communication unit 18 connects the registered terminal 10 to the network and enables the transmission and reception of information between the processing circuit 10a and the authentication server 30 via the network.
[0023] The processing circuit 10a includes a processor 11, RAM (Random Access Memory) 12, a storage unit 13, an input / output interface, and a bus connecting them, and functions as a computer that performs arithmetic processing. The processor 11 is hardware for arithmetic processing coupled with the RAM 12. The storage unit 13 stores an application program (hereinafter referred to as the information registration application) related to the registration of information on the code CD.
[0024] The information registration application is provided, for example, by a system administrator who manages the code authentication system 100 or a system vendor that provides the code authentication system 100, and is installed on the registration terminal 10. The execution of the information registration application by the processor 11 initiates the feature registration process (see Figure 6). The processing circuit 10a includes an image acquisition unit 21, a code reading unit 22, and a feature extraction unit 23, among other functional units, which work in conjunction with the data registration unit 41 (described later) to perform the feature registration process.
[0025] The image acquisition unit 21 acquires image data of the captured image taken by the camera 16. The image acquisition unit 21 acquires a code image PiC that is a copy of the original code CD which is clearly a genuine product (S11). When acquiring the code image PiC, a reading screen RS (see Figure 4) is displayed on the display 17.
[0026] The reading screen RS displays the video captured by the camera 16 in real time. In addition, a rectangular frame image GF is superimposed on the video on the reading screen RS. The frame image GF is an image section that guides the photographer of the code CD so that the code CD is positioned within the frame. When the photographer holding the registration terminal 10 places the code CD within the frame image GF, a code image PiC of the code CD is saved automatically or manually.
[0027] The image acquisition unit 21 searches for each finder pattern from the captured code image PiC and identifies the position of the code CD (master code CDr) shown in the code image PiC (S12). Furthermore, the image acquisition unit 21 identifies the rotation angle (orientation) of the code CD shown in the code image PiC based on the shape and positional relationship of each finder pattern.
[0028] The image acquisition unit 21 applies preprocessing such as normalization or standardization to the area in which the code CD is captured, based on the position and orientation information of the code CD obtained from the finder pattern (S13). By applying preprocessing, the image acquisition unit 21 prepares a processed image (hereinafter referred to as the extraction image) suitable for feature extraction, which will be described later. The extraction image is an image corrected to the shape of the code CD as if it were photographed from the front. In addition, in the extraction image, the gradation values of the entire code CD are adjusted so that the gradation values of the white cell CeW and the black cell CeB are approximately the same.
[0029] The code reading unit 22 reads the information recorded on the code CD from the data area AD of the code CD as seen in the code image PiC (S14). The code reading unit 22 may read the recorded information of the code CD from the code image PiC before preprocessing is applied, or it may read the recorded information of the code CD from the extraction image after preprocessing is applied. By reading the recorded information, the code reading unit 22 obtains at least unique identification information to identify the captured master code CDr. Furthermore, if area information, which will be described later, is written to the data area AD, the code reading unit 22 obtains the area information by reading it.
[0030] The feature extraction unit 23 sets the extraction area AE within the area of the master code CDr that is reflected in the code image PiC (S15). The extraction area AE is the range from which image features are to be extracted, and is set in at least a part of the extraction image. The range set in the extraction area AE may be predetermined based on standards, etc., or may be determined by settings entered into the registration terminal 10. Furthermore, area information defining the extraction area AE may be recorded on the code CD. In this configuration, the feature extraction unit 23 sets the extraction area AE based on the area information read by the code reading unit 22. Alternatively, the feature extraction unit 23 may determine the state of the extraction image and automatically set the range of the extraction area AE. In this case, the feature extraction unit 23 generates the area information.
[0031] As an example, the feature extraction unit 23 sets half of the code CD containing the two finder patterns (the upper half of Figure 2) as the extraction area AE. This extraction area AE includes both the recording area and the correction area of the data area AD. Furthermore, of the white cell CeW and black cell CeB within the extraction area AE, the feature extraction unit 23 uses only the black cell CeB as the target for image feature extraction. If the code CD is formed by printing, the feature extraction unit 23 sets the outer portion BP facing the white cell CeW within the formation range of the black cell CeB as the extraction target. The feature extraction unit 23 captures the ink bleeding that occurred on the contour of the black cell CeB during printing of the code CD as a feature. On the other hand, the feature extraction unit 23 excludes the inner portion AX of the formation range of the black cell CeB, excluding the outer portion BP, from the extraction area AE (see the dot area in Figure 3). For example, if the black cell CeB is square-shaped, approximately half the area of the black cell CeB is excluded from the extraction area AE as the inner portion AX. As a result, the extraction area AE is narrowed down to half the range of code CD and to a band-shaped region along the boundary between the black cell CeB and the white cell CeW.
[0032] The feature extraction unit 23 extracts image features from the set extraction area AE and acquires them as registered image features (S16). Specifically, the feature extraction unit 23 sets numerous feature points Pf (see Figures 2 and 3) in the outer portion BP of the black cell CeB of the extraction area AE. Feature points Pf are set not only at the corners and outer edges of the black cell CeB, but also at the locations where blurring and scratches occur as described above. The feature extraction unit 23 uses the arrangement of feature points Pf in the extraction area AE as the image features of the extraction area AE. The registered image features extracted by the feature extraction unit 23 are transmitted to the authentication server 30 by the communication unit 18 along with a registration request for the features (S17). In the registration request, the identification information read by the code reading unit 22 and area information defining the range of the extraction area AE are transmitted to the authentication server 30 along with the registered image features. Note that if the extraction area AE is predetermined by a standard, etc., or if the area information is recorded on the code CD, the transmission of the area information may be omitted.
[0033] The authentication server 30 stores information about registered image features transmitted from the registration terminal 10 along with the registration request in the feature database (hereinafter referred to as the feature DB) 40. When the authentication server 30 receives a request to provide registered image features from the matching terminal 60, it provides the information about registered image features stored in the feature DB 40 to the matching terminal 60, which is the source of the request. The authentication server 30 is operated by, for example, the aforementioned system administrator, system vendor, or public institution.
[0034] The authentication server 30 may be an on-premises server device physically managed by an administrator, or it may be a virtual configuration located in the cloud. Similarly, the feature database 40 may be a storage area located in an on-premises server device, or it may be a storage area located in a virtual file server located in the cloud. Furthermore, the authentication server 30 and the feature database 40 may be configured as an integrated system.
[0035] The authentication server 30 is an information processing device mainly consisting of a processing circuit 30a. The processing circuit 30a is composed of a processor 31, RAM 32, storage unit 33, input / output interface, and bus connecting these. When a program stored in the storage unit 33 is executed by the processor 31, functional units such as a data registration unit 41 and a data provision unit 42 are constructed in the processing circuit 30a.
[0036] The data registration unit 41 receives registration requests for registration image features transmitted from the registration terminal 10. Upon receiving the registration request, the data registration unit 41 acquires the identification information of the master code CDr, the registration image features, and the area information. The data registration unit 41 registers the identification information and the area information in the feature database 40, linked to the identification information (S17). If only one master code CDr is issued, one registration image feature is linked to one piece of identification information. On the other hand, if multiple master code CDrs are issued, the same number of registration image features as the number of CDrs issued are linked to one piece of identification information and stored.
[0037] The data provision unit 42 receives a request for provision of registered image features transmitted from the matching terminal 60. Upon receiving the request, the data provision unit 42 obtains identification information for the code CDs (hereinafter referred to as "target code CDs") that are the subject of the search and provision. The data provision unit 42 searches for registered image features associated with the acquired identification information from among the many registered image features pre-registered in the feature quantity DB 40, each linked to individual identification information. If area information is associated with the identification information or registered image features, the data provision unit 42 obtains the area information along with the registered image features. The data provision unit 42 transmits the registered image features and area information obtained through the search to the matching terminal 60, which was the source of the request. If multiple registered image features are associated with the identification information, the data provision unit 42 transmits all registered image features to the matching terminal 60.
[0038] The verification terminal 60 is a device that reads target code CDs to be authenticated and verifies them. The verification terminal 60 is connected to the authentication server 30 via a network and sends a request to the authentication server 30 for information to be used in verifying the target code CDs. The verification terminal 60 is a general-purpose device such as a smartphone or tablet. In addition to the producers, distribution managers, and recyclers mentioned above, the verification terminal 60 can also be used by retailers and end users. The verification terminal 60 may be a dedicated reading device for reading code CDs, or a fixed reading device.
[0039] The verification terminal 60 comprises a camera 66, a display 67, a communication unit 68, and a processing circuit 60a electrically connected to these. The camera 66, display 67, communication unit 68, and processing circuit 60a are substantially identical to the configurations of the registration terminal 10. The processing circuit 60a, like the processing circuit 10a of the registration terminal 10, comprises a processor 61, RAM 62, storage unit 63, input / output interface, and a bus connecting these, and functions as a computer that performs arithmetic processing. The storage unit 63 stores an application program related to the authentication of target code CDs (hereinafter referred to as the code authentication app).
[0040] The code authentication application, like the information registration application, is provided by the system administrator or system vendor and installed on the verification terminal 60. The execution of the code authentication application by the processor 61 starts the code verification process (see Figure 7). The processing circuit 60a is configured with functions for performing the code verification process in cooperation with the data provision unit 42, including an image acquisition unit 71, a code reading unit 72, a feature extraction unit 73, a registration feature preparation unit 74, and a code determination unit 75.
[0041] The image acquisition unit 71, the code reading unit 72, and the feature extraction unit 73 have substantially the same functions as the image acquisition unit 21, the code reading unit 22, and the feature extraction unit 23 built on the registration terminal 10. The image acquisition unit 71 acquires a code image PiC (see Figure 4) of the target code CDs to be authenticated from the camera 66 (S101). Based on the start of the code matching process, a reading screen RS (see Figure 4) is also displayed on the display 67 of the matching terminal 60. When the photographer holding the matching terminal 60 places the target code CDs within the frame image GF, the code image PiC of the target code CDs is saved.
[0042] The image acquisition unit 71 searches for each finder pattern from the captured code image PiC and identifies the position and rotation angle of the target code CDs captured in the code image PiC (S102). Furthermore, the image acquisition unit 71 applies preprocessing to the area in which the target code CDs are captured (S103) and generates an extraction image. The content of the preprocessing (normalization or standardization, etc.) applied to the target code CDs is substantially the same as the content of the preprocessing applied to the master code CDr in the registration terminal 10. Therefore, the image acquisition unit 71 prepares an extraction image corrected to the same shooting conditions as the extraction image used to extract registered image features in the registration terminal 10.
[0043] The code reading unit 72 reads the information recorded on the target code CDs from the code image PiC or extraction image showing the target code CDs. The code reading unit 72 obtains at least the identification information of the target code CDs (S104). If area information is written to the data area AD, the code reading unit 72 obtains the area information from the target code CDs.
[0044] The identification information read by the code reading unit 72 is transmitted from the communication unit 68 to the authentication server 30 along with the request for provision (S105). The communication unit 68 may send the request for provision to a pre-configured authentication server 30, or it may select an authentication server 30 to which to send the request for provision based on the information recorded in the target code CDs.
[0045] The feature extraction unit 73 sets an extraction area AE within the area of the target code CDs reflected in the code image PiC based on the area information (S106). The feature extraction unit 73 may use area information read from the target code CDs, or area information received from the authentication server 30. Furthermore, the feature extraction unit 73 may set a predetermined range as the extraction area AE. The range of the extraction area AE set in the target code CDs by the feature extraction unit 73 is substantially the same as the extraction area AE set in the master code CDr. That is, the feature extraction unit 73 sets an extraction area AE that is the range of one half of the target code CDs and is a band-shaped area along the boundary between the black cell CeB and the white cell CeW (see Figures 2 and 3).
[0046] The feature extraction unit 73 extracts image features from the set extraction area AE and acquires them as extracted image features (S107). The content of the image feature extraction process applied to the target code CDs is substantially the same as the content of the image feature extraction process applied to the master code CDr at the registration terminal 10. That is, if the target code CDs are the same individual as the master code CDr, the feature points Pf are set at approximately the same positions as the registered image features (see Figures 2, 3 and 5). The feature extraction unit 73 uses the arrangement of numerous feature points Pf set at the boundaries of black cells CeB and white cells CeW as extracted image features extracted from the target code CDs.
[0047] The registration feature preparation unit 74 acquires the registration image features provided by the data provision unit 42 in response to a request for provision. The registration feature preparation unit 74 prepares the registration image features associated with the identification information of the target code CDs as matching targets to be compared with the extracted image features (S108). As described above, if there are multiple master code CDr and multiple extracted image features are associated with one piece of identification information, the registration feature preparation unit 74 prepares multiple extracted image features as matching targets.
[0048] The code determination unit 75 compares the extracted image features extracted from the extraction area AE of the target code CDs by the feature extraction unit 73 with the registered image features of the master code CDr prepared by the registered feature preparation unit 74. Based on the comparison result, the code determination unit 75 determines whether the target code CDs to be authenticated are genuine or not (S109).
[0049] Specifically, the code determination unit 75 compares the feature points Pf of the extracted image features with the feature points Pf of the registered image features and identifies pairs of feature points Pf that are located at the same position in each image feature (see Figure 5). The code determination unit 75 determines that these image features match if the number of pairs of feature points Pf that generally match is greater than or equal to a predetermined number or proportion. A general match of feature points Pf means that the feature points Pf of the extracted image features are located within a specific threshold centered on the feature points Pf of the registered image features. If the image features match, the code determination unit 75 determines that the target code CDs are genuine code CDs. If multiple registered image features are prepared, the code determination unit 75 selects the registered image feature with the highest degree of feature point Pf match and performs a comparison between the selected registered image feature and the extracted image features.
[0050] The result of the authenticity determination by the code determination unit 75 is presented to the end user, etc., by display on the display 67 (S110). In addition, the result of the authenticity determination may be transmitted from the communication unit 68 to the authentication server 30. If the authenticity determination determines that the target code CDs are copies, the result of the authenticity determination serves as a notification indicating the discovery of a copy.
[0051] [Summary of the First Embodiment] In the first embodiment described above, the extraction area AE from which image features are extracted is set within the region of the code CD that appears in the code image PiC. In addition, the code CD can have a shape suitable for use in preprocessing by including, for example, straight sections and right-angle corners. As a result, the extraction of image features from each code image PiC of the item to be authenticated and the genuine product becomes easier to perform correctly, thereby ensuring the accuracy of authenticity determination.
[0052] More specifically, since the extraction area AE is set within the area of the code CD, the extraction area AE is prominently displayed in the code image PiC. Therefore, a high-resolution image of the extraction area is obtained. In addition, because the shape and color of the pattern contained in the code CD are predetermined, even if the shooting conditions for the images of the authentication target and the genuine product differ, each extraction image to which preprocessing has been applied can be in a generally identical state. Based on the above, if the target code CDs are the same individual as the master code CDr, the same feature points Pf can be extracted from each extraction image. Therefore, accuracy in authenticity determination can be ensured.
[0053] In addition, in the first embodiment, since the extraction area AE is set within the area of the code CD, even if the registration terminal 10 and the verification terminal 60 are held by the operator or user, the extraction area AE can be accurately captured without being cut off from the code image PiC. In other words, the operator or user can identify the extraction area AE used for authentication.
[0054] Furthermore, in the first embodiment, since the frame image GF is displayed on the reading screen RS, it becomes possible to unify the shooting distance to match the size of the code CD, even when the registration terminal 10 and the verification terminal 60 are being held by hand. As a result, a high-resolution image of the extraction area AE can be obtained, making it easier to ensure the accuracy of authenticity determination.
[0055] Furthermore, in the first embodiment, the capture of the code CD not only extracts image features but also reads the identification information of the code CD. In addition, the image features extracted from the master code CDr are pre-registered in the feature database 40, linked to the identification information that identifies the code CD. Therefore, when authenticating target code CDs, the identification information of the target code CDs can be used to quickly identify and prepare the registered image features to be used for matching. As a result, the authentication of target code CDs can be accelerated.
[0056] In the first embodiment, the extraction area AE is set to include at least one fixed pattern KP provided on the code CD. Then, the extracted image features of the fixed pattern KP are acquired. As described above, by including a fixed pattern KP with a fixed shape in the extraction area AE, image processing is made easier to bring the state of the code image PiC from which the extracted image features are extracted closer to the state of the code image PiC used to extract the registered image features. Specifically, it becomes possible to correct the shape of the extraction area AE of the code image PiC that captures the target code CDs to roughly match the shape of the extraction area AE of the code image PiC that captures the master code CDr. As a result, the accuracy of authenticity determination can be further ensured.
[0057] Furthermore, in the first embodiment, the extraction area AE is set to include at least a portion of the data area AD in which data is recorded. Then, the extracted image features of the data area AD are obtained. As described above, by using the data area AD as the extraction area AE, image features can be extracted from a wide range within the area of the code CD. As a result, even if partial loss occurs in the target code CDs, authenticity can be determined by comparing the image features of the area excluding the missing portion.
[0058] In addition, in the first embodiment, the black cell CeB within the extraction area AE is used as the target for image feature extraction. Therefore, even in cases where it is difficult to extract features from the substrate surface on which the code CD is formed, such as when the code CD is printed on coated paper, it becomes possible to set image features targeting the black cell CeB. As a result, a decrease in the accuracy of authenticity determination is avoided.
[0059] In the first embodiment, the outer portion BP of the black cell CeB's formation range that faces the white cell CeW is set as the extraction target. On the other hand, the inner portion AX of the black cell CeB's formation range, excluding the outer portion BP, is excluded from the extraction area AE. As described above, feature points Pf are mainly set at the boundary between the black cell CeB and the white cell CeW. Therefore, by excluding the inner portion AX from the extraction area AE, it is possible to narrow the extraction area AE without reducing the accuracy of the matching. As a result, the judgment process can be sped up while ensuring the accuracy of the authenticity determination.
[0060] In the first embodiment described above, the white cell CeW corresponds to a "light-colored cell," the black cell CeB corresponds to a "dark-colored cell," the matching terminal 60 corresponds to a "processing device," and the code authentication application corresponds to a "code authentication program."
[0061] (Second Embodiment) In the code authentication system 200 according to the second embodiment of this disclosure shown in Figure 8, the functions for extracting image features and matching image features are integrated into the authentication server 30. Therefore, the edge processing functions that were provided in the registration terminal 10 and the matching terminal 60 in the first embodiment are omitted in the second embodiment. As a result, the registration terminal 10 is configured to transmit the code image PiC of the master code CDr, captured using the camera 16, to the authentication server 30 along with the registration request. The matching terminal 60 is configured to transmit the code image PiC of the target code CDs, captured using the camera 66, to the authentication server 30 along with the matching request, and the authentication server 30 presents the matching result to the user via the display 67.
[0062] On the other hand, the processing circuit 30a of the authentication server 30 is equipped with an image acquisition unit 271, a code reading unit 272, a feature extraction unit 273, a registration feature preparation unit 274, and a code determination unit 275, in addition to the data registration unit 41 and the data provision unit 42. These functional units are constructed based on the execution of a code authentication program by the processor 31 and have substantially the same functions as the image acquisition unit 21, 71, the code reading unit 22, 72, the feature extraction unit 23, 73, the registration feature preparation unit 74, and the code determination unit 75 of the first embodiment. These functional units enable the authentication server 30 to perform feature registration processing (see Figure 6) and code matching processing (see Figure 7) similar to those of the first embodiment. The details of the feature registration processing and code matching processing of the second embodiment will be described below based on Figures 6 and 7, with reference to Figure 8.
[0063] The feature registration process shown in Figure 6 is initiated by receiving a registration request from the registration terminal 10. During the feature registration process, the image acquisition unit 271 acquires a code image PiC of the master code CDr from the registration terminal 10 (S11). The image acquisition unit 271 searches for each finder pattern from the code image PiC and identifies the position of the master code CDr (S12). Furthermore, the image acquisition unit 271 prepares an image for extraction by applying preprocessing to the code image PiC (S13).
[0064] The code reading unit 272 reads the information recorded on the master code CDr (S14) and obtains at least the identification information of the master code CDr. Furthermore, the feature extraction unit 273 sets the extraction area AE within the area of the master code CDr (S15). The feature extraction unit 273 sets the entire area of the code CD as the extraction area AE. Similar to the first embodiment, the feature extraction unit 273 uses the black cell CeB as the target for image feature extraction, but does not perform the process of excluding the inner portion AX from the extraction area AE. The feature extraction unit 273 extracts image features from the extraction area AE set over the entire area of the code CD and obtains them as registered image features (S16). The registered image features obtained by the feature extraction unit 273 are registered in the feature quantity DB 40 by the data registration unit 41 together with the identification information read by the code reading unit 272 (S17). In the second embodiment, since the entire area of the code CD is uniformly set as the extraction area AE, the generation and registration of area information are omitted.
[0065] The code matching process shown in Figure 7 is initiated by receiving a matching request from the matching terminal 60. During the code matching process, the image acquisition unit 271 acquires a code image PiC of the target code CDs upon receipt from the matching terminal 60 (S101). The image acquisition unit 271 searches for each finder pattern in the code image PiC to identify the location of the target code CDs (S102). Furthermore, the image acquisition unit 271 applies the preprocessing applied to the code image PiC of the target code CDs as well as the preprocessing applied to the code image PiC of the master code CDr, to prepare an image for extraction (S103).
[0066] The code reading unit 272 reads the information recorded on the target code CDs (S104) and obtains at least the identification information of the target code CDs. In the second embodiment, the process of sending the request for provision along with the identification information (S105) is omitted.
[0067] The feature extraction unit 273 sets the entire area of the target code CDs as the extraction area AE (S106). The feature extraction unit 273 performs the image feature extraction process performed on the master code CDr on the target code CDs as well, and extracts image features from the black cell CeB of the extraction area AE. The feature extraction unit 273 acquires the image features extracted from the target code CDs as extracted image features (S107).
[0068] The registered feature preparation unit 274 uses the identification information obtained by the code reading unit 272 as a trigger to search for registered image features associated with the identification information from among the many registered image features pre-registered in the feature quantity DB 40. The registered feature preparation unit 74 prepares the registered image features identified by the search as matching targets to be compared with the extracted image features (S108). The code determination unit 275 compares the extracted image features extracted from the extraction area AE of the target code CDs with the registered image features of the master code CDr to determine the authenticity of the target code CDs to be authenticated (S109).
[0069] The data provision unit 42 transmits the result of the authenticity determination of the target code CDs to the verification terminal 60, which is the source of the verification request (S110). Based on the determination result received from the authentication server 30, the verification terminal 60 displays a notification on the display 67 indicating the authenticity of the target code CDs.
[0070] In the second embodiment described above, the same effects as in the first embodiment are achieved, ensuring accuracy in authenticity determination and speeding up the process of determining authenticity. In the second embodiment, the authentication server 30 corresponds to the "processing device".
[0071] (Third embodiment) The third embodiment of this disclosure is a modification of the first embodiment. In the feature registration process (see Figure 6) and code matching process (see Figure 7) of the third embodiment, the process of reading information recorded on the code CD (S14, S104) is omitted. In addition, the extraction area AE is set to only the formation range of the fixed pattern KP within the area of the code CD (S15, S106). Specifically, the formation range of the finder pattern that is common to each code CD is set as the extraction area AE by each feature extraction unit 23, 73. Each feature extraction unit 23, 73 targets both the black cell CeB and the white cell CeW that form the finder pattern for image feature extraction.
[0072] Furthermore, during the feature registration process, the registration terminal 10 transmits the image features of the finder pattern extracted from the master code CDr to the authentication server 30 along with the registration request (S17). The data registration unit 41 stores the image features of the finder pattern as registered image features in the feature database 40. As described above, since the reading of identification information is omitted, the registered image features are stored in the feature database 40 without being linked to identification information.
[0073] The numerous registered image features stored in the feature database 40 are provided to each matching terminal 60 by the data provision unit 42 at predetermined intervals. Therefore, the matching terminal 60 maintains a state in which numerous registered image features are stored in the storage unit 63. Accordingly, in the code matching process, the registered feature preparation unit 74 searches for the one that is most similar to the extracted image feature extracted from the finder pattern of the target code CDs from among the numerous registered image features stored in the storage unit 63 (S108). The code determination unit 75 compares the registered image feature retrieved by the registered feature preparation unit 74 with the extracted image feature of the finder pattern of the target code CDs and determines the authenticity of the target code CDs (S109).
[0074] The third embodiment described above also achieves the same effects as the first embodiment, ensuring accuracy in authenticity determination and speeding up the authenticity determination process. More specifically, in the third embodiment, the formation range of the fixed pattern KP that is common to each code CD is set as the extraction area AE. In this way, if the same region within the code CD is always set as the extraction area AE, the step of setting the extraction area AE in the feature registration process and the code matching process becomes unnecessary. Therefore, each process can be sped up.
[0075] In addition, by limiting the extraction area AE to the formation range of the fixed pattern KP, it becomes possible to reduce the area of the extraction area AE compared to a configuration that includes the data area AD within the extraction area AE. As a result, the steps for extracting image features, and consequently each processing step, can be sped up.
[0076] Furthermore, in the third embodiment, the registered image features to be matched can be identified from a large number of pre-stored registered image features without using identification information. Therefore, reading the target code CDs becomes unnecessary, and the code matching process can be accelerated. Moreover, even if the information in the target code CDs is significantly missing and the identification information cannot be read correctly, the matching terminal 60 can still perform a determination of the authenticity of the target code CDs.
[0077] (Other embodiments) Although several embodiments of this disclosure have been described above, this disclosure is not to be construed as being limited to the above embodiments, and can be applied to various embodiments and combinations without departing from the spirit of this disclosure.
[0078] In the modified example 1 of the first embodiment described above, each feature extraction unit 23,73 uses only the white cell CeW among the white cell CeW and black cell CeB within the extraction area AE as the target for image feature extraction. According to this modified example 1, even if the ink used to print the code CD is, for example, an evaporative or penetrating type, and the state of the black cell CeB is prone to change over time, a decrease in the accuracy of authenticity determination can be suppressed.
[0079] In the first embodiment described above, half of the code CD range was set as the extraction area AE, and in the second embodiment described above, the entire code CD range was set as the extraction area AE. Furthermore, in the third embodiment described above, only the formation range of the fixed pattern KP was set as the extraction area AE. As described above, the range of the code CD formation range that is set as the extraction area AE may be changed as appropriate. For example, in the second modification of the above embodiment, the extraction area AE is set only in the data area AD. Furthermore, in the third modification of the third embodiment described above, the extraction area AE is set in the formation range of the fixed pattern KP other than the finder pattern, specifically the alignment pattern, timing pattern, and margin area.
[0080] In the above embodiment, an individual authentication technique was used that matched image features using feature points Pf extracted from the extracted area AE. The method used for matching such image features may be modified as appropriate. For example, a classifier generated using machine learning may be used to match the image features of the target code CDs with the image features of the master code CDr.
[0081] The above embodiment describes a case where the code authentication method according to this disclosure is applied to the determination of the authenticity of a QR code. However, the code authentication method according to this disclosure can also be applied to the authentication of one-dimensional codes or two-dimensional codes other than QR codes. For example, one-dimensional codes (barcodes) such as JAN, CODE39, and CODE128 may be used as the code CD to be authenticated. Furthermore, two-dimensional codes such as DataMatrix, VeriCode, MaxiCode, and PDF417 may be used as the code CD to be authenticated.
[0082] In the first embodiment described above, the feature registration process and the code matching process were performed at the registration terminal 10 and the matching terminal 60, which are edge devices, respectively. On the other hand, in the second embodiment described above, the authentication server 30 performed the feature registration process and the code matching process. As described above, the processing device that performs the feature registration process and the code matching process may be changed as appropriate in the code authentication system.
[0083] For example, the feature registration process may be performed at the registration terminal 10 and the code matching process at the authentication server 30, or the feature registration process may be performed at the authentication server 30 and the code matching process may be performed at the matching terminal 60. Furthermore, some steps of the feature registration process may be performed at the registration terminal 10 and the remaining steps at the authentication server 30. Similarly, some steps of the code matching process may be performed at the matching terminal 60 and the remaining steps at the authentication server 30.
[0084] In the above embodiment, each function provided by the registration terminal 10, authentication server 30, and verification terminal 60 can also be provided by software and the hardware that executes it, software only, hardware only, or a combination thereof. When such functions are provided by electronic circuits as hardware, each function can also be provided by digital circuits including a large number of logic circuits, or by analog circuits.
[0085] The processors 11, 31, and 61 in the above embodiments may include at least one computing core such as a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit). These processors may further include an FPGA (Field-Programmable Gate Array), an NPU (Neural Network Processing Unit), and other IP cores equipped with dedicated functions.
[0086] The form of the storage medium (non-transitory tangible storage medium) used as each of the storage units 13, 33, and 63 in the above embodiment, which stores the program related to the code authentication method of this disclosure, may be changed as appropriate. Such a storage medium is not limited to a configuration provided on a circuit board, but may be provided in the form of a memory card or the like, inserted into a slot, and electrically connected to each processing circuit. Furthermore, the storage medium may be an optical disk or a hard disk drive, etc., which serve as the source for copying the program. [Explanation of symbols]
[0087] AD Data area, AE Extraction area, AX Inner part, BP Outer part, CD Code, CeB Black cell (dark cell), CeW White cell (light cell), KP Fixed pattern, PiC Code image, 30 Authentication server (processing unit), 60 Verification terminal (processing unit), 71,271 Image acquisition unit, 73,273 Feature extraction unit, 74,274 Registered feature preparation unit, 75,275 Code determination unit, 100,200 Code authentication system
Claims
1. An image acquisition unit (71, 271) acquires a code image (PiC) of the code (CD) to be authenticated, A feature extraction unit (73, 273) sets an extraction area (AE) within the region of the code captured in the code image, and acquires image features extracted from the extraction area, which include the surface pattern and minute irregularities of the extraction area as feature points (Pf), as extracted image features. A registration feature preparation unit (74, 274) prepares the image features extracted from the extraction area of the code which is a genuine product and registered in advance as registered image features, A code determination unit (75, 275) determines the authenticity of the code to be authenticated based on a comparison between the extracted image features and the registered image features, A code authentication system equipped with [specific features / features].
2. The code authentication system according to claim 1, wherein the feature extraction unit sets the extraction area to include at least one fixed pattern (KP) provided in the code, and acquires the extracted image features of the fixed pattern.
3. The code authentication system according to claim 1, wherein the feature extraction unit sets the extraction area to include at least a portion of the data area (AD) of the code on which data is recorded, and acquires the extracted image features of the data area.
4. The aforementioned code includes light-colored cells (CeW) and dark-colored cells (CeB), The code authentication system according to any one of claims 1 to 3, wherein the feature extraction unit uses the light-colored cells within the extraction area as the target for extracting the image features.
5. The aforementioned code includes light-colored cells (CeW) and dark-colored cells (CeB), The code authentication system according to any one of claims 1 to 3, wherein the feature extraction unit uses the dark cells within the extraction area as the target for extracting the image features.
6. The feature extraction unit, The outer portion (BP) of the dark-colored cell formation range that faces the light-colored cell is set as the extraction target. The code authentication system according to claim 5, wherein the inner portion (AX) of the dark cell formation range, excluding the outer portion, is excluded from the extraction area.
7. A code image (PiC) of the code (CD) to be authenticated is obtained (S101), An extraction area (AE) is set within the area of the code captured in the code image (S106), Image features extracted from the extraction area, which include the surface pattern and minute irregularities of the extraction area as feature points (Pf), are acquired as extracted image features (S107). The image features extracted from the extraction area of the code which is a genuine product and pre-registered are prepared as registered image features (S108). Based on the comparison between the extracted image features and the registered image features, the authenticity of the code to be authenticated is determined (S109). A code authentication program that causes at least one processing unit (30, 60) to perform a process that includes the following.