Code authentication system and non-transitory computer readable storage medium
A code image is acquired by photographing a code as an authentication target. An extraction area is set within an area of the code shown in the code image. An image feature extracted from the extraction area is acquired as an extraction image feature. The image feature extracted from the extraction area of the code which is a genuine product is prepared and registered in advance as a registration image feature. An authenticity of the code as the authentication target is determined based on a verification between the extraction image feature and the registration image feature.
1 . A code authentication system comprising:
an image acquisition unit that acquires a code image acquired by photographing a QR code as an authentication target;
a feature extraction unit that sets an extraction area within an area of the QR code shown in the code image and acquires an image feature extracted from the extraction area as an extraction image feature, the image feature including a surface pattern and small irregularity of the extraction area as a feature point;
a registration feature preparation unit that prepares the image feature extracted from the extraction area of the QR code which is a genuine product and registered in advance as a registration image feature;
a code determination unit that determines an authenticity of the QR code as the authentication target based on a verification between the extraction image feature and the registration image feature, the code determination unit verifying the extraction image feature of the authentication target product with the registration image feature of the genuine product to determine whether the authentication target product is the genuine product; and
at least one of (i) a circuit and (ii) a processor coupled to a memory storing computer program code, wherein:
the at least one of the circuit and the processor coupled to the memory is configured to cause the code authentication system to provide at least one of: the image acquisition unit; the feature extraction unit; the registration feature preparation unit; and the code determination unit,
wherein the extraction image feature of the authentication target product with the registration image feature of the genuine product is extracted with a predetermined accuracy or more to ensure a predetermined accuracy of authenticity determination of the authentication target product,
wherein the code determination unit compares the feature point of the extraction image feature with the feature point of the registration image feature, specifies a pair of the feature points that are located at a same position in each of the extraction image feature and the registration image feature, and determines that the extraction image feature and the registration image feature match when a numerical number of pairs of the feature points that generally match is equal to or greater than a predetermined number or equal to or greater than a predetermined ratio, and
wherein a state that the feature points generally match indicates that the feature point of the extraction image feature is disposed within a specific threshold range with a center of the feature point of the registration image feature.
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 provided in the QR code, and acquires the extraction image feature 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 part of a data area of the QR code in which data is stored, and acquires the extraction image feature of the data area.
4 . The code authentication system according to claim 1 , wherein:
the code includes a light color cell and a dark color cell; and
the feature extraction unit uses the light color cell in the extraction area as an extraction target of the image feature.
5 . The code authentication system according to claim 1 , wherein:
the QR code includes a light color cell and a dark color cell; and
the feature extraction unit uses the dark color cell in the extraction area as an extraction target of the image feature.
6 . The code authentication system according to claim 5 , wherein:
the feature extraction unit is configured to:
set an outer portion of a formation area of the dark color cell facing the light color cell as the extraction target; and
exclude an inner portion of the formation area of the dark color cell other than the outer portion from the extraction area.
7 . A non-transitory computer readable storage medium comprising instructions being executed by a computer, the instructions including a computer-implemented method, the instructions including:
acquiring a code image acquired by photographing a QR code as an authentication target;
setting an extraction area within an area of the QR code shown in the code image;
acquiring an image feature extracted from the extraction area as an extraction image feature, the image feature including a surface pattern and small irregularity of the extraction area as a feature point;
preparing the image feature extracted from the extraction area of the QR code which is a genuine product and registered in advance as a registration image feature; and
determining an authenticity of the QR code as the authentication target based on a verification between the extraction image feature and the registration image feature, the determining including verifying the extraction image feature of the authentication target product with the registration image feature of the genuine product to determine whether the authentication target product is the genuine product,
wherein the extraction image feature of the authentication target product with the registration image feature of the genuine product is extracted with a predetermined accuracy or more to ensure a predetermined accuracy of authenticity determination of the authentication target product,
wherein the determining includes comparing the feature point of the extraction image feature with the feature point of the registration image feature, specifying a pair of the feature points that are located at a same position in each of the extraction image feature and the registration image feature, and determining that the extraction image feature and the registration image feature match when a numerical number of pairs of the feature points that generally match is equal to or greater than a predetermined number or equal to or greater than a predetermined ratio, and
wherein a state that the feature points generally match indicates that the feature point of the extraction image feature is disposed within a specific threshold range with a center of the feature point of the registration image feature.
8 . A code verification system comprising:
at least one of (i) a circuit and (ii) a processor coupled to a memory storing computer program code, wherein:
the at least one of the circuit and the processor coupled to the memory is configured to cause the code verification system to:
acquire a code image acquired by photographing a QR code as an authentication target;
set an extraction area within an area of the QR code shown in the code image;
acquire an image feature extracted from the extraction area as an extraction image feature, the image feature including a surface pattern and small irregularity of the extraction area as a feature point;
prepare the image feature extracted from the extraction area of the QR code which is a genuine product and registered in advance as a registration image feature; and
determine an authenticity of the QR code as the authentication target based on a verification between the extraction image feature and the registration image feature, the determining including verifying the extraction image feature of the authentication target product with the registration image feature of the genuine product to determine whether the authentication target product is the genuine product,
wherein the extraction image feature of the authentication target product with the registration image feature of the genuine product is extracted with a predetermined accuracy or more to ensure a predetermined accuracy of authenticity determination of the authentication target product,
wherein the determining includes comparing the feature point of the extraction image feature with the feature point of the registration image feature, specifying a pair of the feature points that are located at a same position in each of the extraction image feature and the registration image feature, and determining that the extraction image feature and the registration image feature match when a numerical number of pairs of the feature points that generally match is equal to or greater than a predetermined number or equal to or greater than a predetermined ratio, and
wherein a state that the feature points generally match indicates that the feature point of the extraction image feature is disposed within a specific threshold range with a center of the feature point of the registration image feature.