Certificate determination apparatus, certificate determination method, and recording medium
A certificate determination apparatus ( 3 ) includes: a generation unit ( 311 ) configured to generate, based on an image ( 21 ) in which an identity certificate ( 5 ) appears, shadow information related a shadow ( 51 ) of the identity certificate appearing in the image; and a determination unit ( 312 ) configured to determine, based on the shadow information, whether or not the identity certificate appearing in the image is authentic.
1 . A certificate determination apparatus comprising:
a light source configured to illuminate an identity certificate with light;
a camera configured to capture an image of the identity certificate illuminated by the light from the light source;
a database configured to store data relating a positional relationship between the identity certificate and each of the light source and the camera to a length of a shadow presumed to appear in the image in a case where it is assumed that the image of the identity certificate is captured in a situation where the positional relationship is established;
at least one memory configured to store instructions; and
at least one processor configured to execute the instructions to:
detect a shadow of the identity certificate appearing in the image and generate, based on the image in which the identity certificate appears, shadow information related to the shadow of the identity certificate appearing in the image, the shadow information including information related to a length of the shadow;
determine, based on the shadow information, whether or not the identity certificate appearing in the image is authentic, wherein the at least one processor is further configured to execute the instructions to:
calculate, based on the image, a positional relationship between the identity certificate and each of the light source and the camera at a time when the image of the identity certificate is captured,
extract, from the database, the length of the shadow presumed to appear in the image when it is assumed that the image of the identity certificate is captured in a situation where the positional relationship calculated is established
determine whether or not the identity certificate is authentic, by comparing the length of the shadow extracted and the length of the shadow indicated by the shadow information, and
a controller configured to control at least one of the light source and the camera based on whether the shadow of the identity certificate is detected, so that the shadow of the identity certificate appropriately appears in the image.
2 . The certificate determination apparatus according to claim 1 , wherein
the shadow information includes information related to presence or absence of the shadow, and
the at least one processor is configured to execute the instructions to (i) determine that the identity certificate is not authentic when the shadow does not appear in the image, and (ii) determine that the identity certificate is authentic when the shadow appears in the image.
3 . The certificate determination apparatus according to claim 1 , wherein the at least one processor is configured to execute the instructions to (i) determine that the identity certificate is not authentic when a first difference is more than a first allowance, the first difference being a difference between the estimated length of the shadow and the length of the shadow indicated by the shadow information, and (ii) determine that the identity certificate is authentic when the first difference is less than a second allowance that is equal to or less than the first allowance.
4 . The certificate determination apparatus according to claim 1 , wherein
the at least one processor is further configured to execute the instructions to calculate, based on the image, a positional relationship between the identity certificate and the light source at a time when the image of the identity certificate is captured,
wherein the at least one processor is configured to execute the instructions to
(i) estimate, based on estimated length data, the positional relationship established when it is assumed that the shadow having the length indicated by the shadow information appears in the image, the estimated length data indicating a length of the shadow presumed to appear in the image when it is assumed that the image of the identity certificate is captured in a situation where the positional relationship is a predetermined relationship, and
(ii) determine whether or not the identity certificate is authentic, by comparing the estimated positional relationship and the calculated positional relationship.
5 . The certificate determination apparatus according to claim 4 , wherein the at least one processor is configured to execute the instructions to (i) determine that the identity certificate is not authentic when a second difference is more than a third allowance, the second difference being a difference between the estimated positional relationship and the calculated positional relationship, and (ii) determine that the identity certificate is authentic when the second difference is less than a fourth allowance that is equal to or less than the third allowance.
6 . The certificate determination apparatus according to claim 1 , wherein
the at least one processor is configured to execute the instructions to generate, as the shadow information, information related to a change in the shadow appearing in the image, based on a plurality of images generated by repetition of an operation, by the camera, of capturing the image of the identity certificate, and an operation of changing a positional relationship between the identity certificate and at least one of the light source and the camera.
7 . The certificate determination apparatus according to claim 6 , wherein
the at least one processor is further configured to execute the instructions to calculate, based on the image, a positional relationship between the identity certificate and each of the light source and the camera at a time when the image of the identity certificate is captured,
wherein the at least one processor is configured to execute the instructions to
(i) estimate a change in the shadow between the plurality of images, based on estimated length data and the calculated positional relationship, the estimated length data indicating a length of the shadow presumed to appear in the image when it is assumed that the image of the identity certificate is captured in a situation where the positional relationship is a predetermined relationship, and
(ii) determine whether or not the identity certificate is authentic, by comparing the estimated change in the shadow and the change in the shadow indicated by the shadow information.
8 . The certificate determination apparatus according to claim 6 , wherein aspects of the change in the shadow include at least one of a change in length of the shadow and a change in direction in which the shadow extends.
9 . The certificate determination apparatus according to claim 1 , wherein
the at least one processor is further configured to execute the instructions to control at least one of intensity of the light source and imaging sensitivity of the camera.
10 . The certificate determination apparatus according to claim 1 , wherein
the database includes data for each type of identity certificate,
the at least one processor is further configured to execute the instructions to:
identify the type of identity certificate based on the image in which the identity certificate appears; and
extract from the database, based on the type of identity certificate identified, the length of the shadow presumed to appear in the image when it is assumed that the image of the identity certificate is captured in the situation where the positional relationship calculated is established.
11 . A certificate determination method comprising:
illuminating an identity certificate with light from a light source;
capturing, by a camera, an image of the identity certificate illuminated with the light from the light source;
storing in a database, data relating a positional relationship between the identity certificate and each of the light source and the camera to a length of a shadow presumed to appear in the image in a case where it is assumed that the image of the identity certificate is captured in a situation where the positional relationship is established;
detecting a shadow of the identity certificate appearing in the image and generating, by at least one processor, based on the image in which the identity certificate appears, shadow information related to the shadow of the identity certificate appearing in the image, the shadow information including information related to a length of the shadow; and
determining, by the at least one processor, based on the shadow information, whether or not the identity certificate appearing in the image is authentic, wherein the determining by the at least one processor, based on the shadow information, whether or not the identity certificate appearing in the image is authentic comprises:
calculating, based on the image, a positional relationship between the identity certificate and each of the light source and the camera at a time when the image of the identity certificate is captured;
extracting from the database, the length of the shadow presumed to appear in the image when it is assumed that the image of the identity certificate is captured in a situation where the positional relationship calculated is established
determining whether or not the identity certificate is authentic, by comparing the estimated length of the shadow extracted and the length of the shadow indicated by the shadow information; and
controlling, by a controller, at least one of the light source and the camera based on whether the shadow of the identity certificate is detected, so that the shadow of the identity certificate appropriately appears in the image.
12 . A non-transitory computer-readable recording medium storing a computer program that causes a computer to execute a certificate determination method, the certificate determination method comprising:
illuminating an identity certificate with light from a light source;
capturing, by a camera, an image of the identity certificate illuminated with the light from the light source;
storing in a database, data relating a positional relationship between the identity certificate and each of the light source and the camera to a length of a shadow presumed to appear in the image in a case where it is assumed that the image of the identity certificate is captured in a situation where the positional relationship is established;
generating, by at least one processor, based on the image in which the identity certificate appears, shadow information related to a shadow of the identity certificate appearing in the image, the shadow information including information related to a length of the shadow; and
determining, by the at least one processor, based on the shadow information, whether or not the identity certificate appearing in the image is authentic, wherein the determining, by the at least one processor, based on the shadow information, whether or not the identity certificate appearing in the image is authentic comprises:
calculating, based on the image, a positional relationship between the identity certificate and each of the light source and the camera at a time when the image of the identity certificate is captured;
extracting from the database, the length of the shadow presumed to appear in the image when it is assumed that the image of the identity certificate is captured in a situation where the positional relationship calculated is established
determining whether or not the identity certificate is authentic, by comparing the estimated length of the shadow extracted and the length of the shadow indicated by the shadow information; and
controlling, by a controller, at least one of the light source and the camera based on whether the shadow of the identity certificate is detected, so that the shadow of the identity certificate appropriately appears in the image.