CN110533643B - Certificate authentication method and device - Google Patents

Certificate authentication method and device Download PDF

Info

Publication number
CN110533643B
CN110533643B CN201910774059.9A CN201910774059A CN110533643B CN 110533643 B CN110533643 B CN 110533643B CN 201910774059 A CN201910774059 A CN 201910774059A CN 110533643 B CN110533643 B CN 110533643B
Authority
CN
China
Prior art keywords
image
certificate
light spot
preset
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910774059.9A
Other languages
Chinese (zh)
Other versions
CN110533643A (en
Inventor
黄江波
郭明宇
徐炎
徐崴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201910774059.9A priority Critical patent/CN110533643B/en
Publication of CN110533643A publication Critical patent/CN110533643A/en
Application granted granted Critical
Publication of CN110533643B publication Critical patent/CN110533643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/49Analysis of texture based on structural texture description, e.g. using primitives or placement rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/12Details of acquisition arrangements; Constructional details thereof
    • G06V10/14Optical characteristics of the device performing the acquisition or on the illumination arrangements
    • G06V10/141Control of illumination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/759Region-based matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the specification provides a certificate authentication method and device, wherein the method comprises the following steps: acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated; carrying out light spot detection on the first image; if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot; and identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern.

Description

Certificate authentication method and device
Technical Field
The document relates to the field of anti-counterfeiting technology, in particular to a certificate authentication method, a certificate authentication device, certificate authentication equipment and a storage medium.
Background
In reality, there are a large number of demands for remote verification of credentials, such as applying for new mobile phone cards on the internet, opening security accounts on the internet, applying for academic certificates on the internet, etc., which all need remote verification of credentials of applicant. One common authentication method requires the user to upload an image of the document, and then manually or automatically verify the authenticity to complete the authentication.
This verification process first ensures the validity of the document image uploaded by the user, mainly to prevent an attacker from forging the image by various means, such as the usual forging means including: screen flipping, paper copying, copper plate printing and the like. Currently, there is no effective authentication method for counterfeit means such as screen flipping, paper copying, and copper plate printing, and therefore, a method capable of effectively authenticating a certificate is needed.
Disclosure of Invention
It is an object of one or more embodiments of the present disclosure to provide a certificate authentication method, apparatus, device and storage medium for providing a method for efficiently authenticating a certificate.
To solve the above technical problems, one or more embodiments of the present specification are implemented as follows:
in one aspect, one or more embodiments of the present specification provide a method of authenticating a document, comprising:
acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated;
carrying out light spot detection on the first image;
if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot;
and identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern.
Optionally, the identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern includes:
if the material of the certificate to be authenticated is a first type material and the detection result of the detection pattern does not accord with the preset detection pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; the detection result of the facula of the image shot by the certificate of the first material under the set illumination condition accords with the preset facula existence condition, and the detection result of the detection pattern accords with the preset detection pattern existence condition;
If the material of the certificate to be authenticated is a second type material and the detection result of the detection pattern accords with the preset detection pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; the light spot detection result of the image shot by the certificate of the second type material under the set illumination condition accords with the preset light spot existence condition, and the detection result of the detection pattern does not accord with the preset detection pattern existence condition.
Optionally, the performing spot detection on the first image includes:
converting the first image into a gray scale image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
Optionally, the performing spot detection on the first image includes:
aligning the first image with a preset certificate alignment template;
intercepting an image of the certificate to be authenticated in the aligned first image;
converting the image of the certificate to be authenticated into a gray image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
Judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
Optionally, the determining, according to the determination result, the light spot detection result of the first image includes:
if the number of pixels of the maximum connected domain is larger than the preset number, determining that the light spot detection result of the first image meets the preset light spot existence condition, wherein the maximum connected domain is the detected light spot;
if the number of pixels of the maximum connected domain is not greater than the preset number, determining that the first image does not accord with the preset light spot existence condition.
Optionally, the acquiring the maximum connected domain in the gray scale image based on a gray scale threshold value includes:
adjusting the brightness of the gray level image to enable the brightness of the gray level image to meet the preset brightness requirement;
and acquiring the maximum connected domain in the gray level image after brightness adjustment based on a gray level threshold value.
Optionally, the detecting the detection pattern of the surrounding area of the detected light spot includes:
and detecting the detection pattern of the surrounding area of the detected light spot based on a detection pattern classifier trained by the deep learning network.
In another aspect, one or more embodiments of the present disclosure provide a credential authentication device comprising:
the acquisition module is used for acquiring a first image shot by the certificate to be authenticated under the set illumination condition, wherein the first image comprises the image of the certificate to be authenticated;
the light spot detection module is used for carrying out light spot detection on the first image;
the detection pattern detection module is used for detecting the detection pattern of the surrounding area of the detected light spot if the light spot detection result meets the preset light spot existence condition;
and the identification module is used for identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern.
Optionally, the authentication module includes:
the first determining unit is used for determining that the certificate to be authenticated is a counterfeit certificate if the material of the certificate to be authenticated is a first type material and the detection result of the detection pattern does not accord with the preset detection pattern existence condition; the detection result of the facula of the image shot by the certificate of the first material under the set illumination condition accords with the preset facula existence condition, and the detection result of the detection pattern accords with the preset detection pattern existence condition;
The second determining unit is used for determining that the certificate to be authenticated is a counterfeit certificate if the material of the certificate to be authenticated is a second type material and the detection result of the detection pattern accords with the preset detection pattern existence condition; the light spot detection result of the image shot by the certificate of the second type material under the set illumination condition accords with the preset light spot existence condition, and the detection result of the detection pattern does not accord with the preset detection pattern existence condition.
Optionally, the light spot detection module includes:
a conversion unit configured to convert the first image into a grayscale image;
the acquisition unit is used for acquiring the maximum connected domain in the gray image based on a gray threshold value;
the judging unit is used for judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and the determining unit is used for determining a light spot detection result of the first image according to the judging result.
Optionally, the light spot detection module includes:
an alignment unit, configured to align the first image with a preset certificate alignment template;
the intercepting unit is used for intercepting the image of the certificate to be authenticated in the aligned first image;
The conversion unit is used for converting the image of the certificate to be authenticated into a gray image;
the acquisition unit is used for acquiring the maximum connected domain in the gray image based on a gray threshold value;
the judging unit is used for judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and the determining unit is used for determining a light spot detection result of the first image according to the judging result.
Optionally, the determining unit includes:
a first determining subunit, configured to determine that, if the number of pixels of the maximum connected domain is greater than a preset number, a light spot detection result of the first image meets a preset light spot existence condition, and the maximum connected domain is a detected light spot;
and the second determining subunit is used for determining that the first image does not accord with the preset light spot existence condition if the number of pixels of the maximum connected domain is not greater than the preset number.
Optionally, the acquiring unit includes:
the adjusting subunit is used for adjusting the brightness of the gray level image so as to enable the brightness of the gray level image to meet the preset brightness requirement;
and the acquisition subunit is used for acquiring the maximum connected domain in the gray level image after brightness adjustment based on a gray level threshold value.
Optionally, the detection pattern detection module is specifically configured to detect a detection pattern of a surrounding area of the detected light spot based on a detection pattern classifier obtained by training the deep learning network if the light spot detection result meets a preset light spot existence condition.
In yet another aspect, one or more embodiments of the present specification provide a credential authentication device comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated;
carrying out light spot detection on the first image;
if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot;
and identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern.
In yet another aspect, one or more embodiments of the present description provide a storage medium storing computer-executable instructions that, when executed, implement the following:
Acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated;
carrying out light spot detection on the first image;
if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot;
and identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern.
By adopting the technical scheme of one or more embodiments of the specification, the first image shot by the certificate to be identified under the set illumination condition is subjected to light spot detection, when the light spot detection result accords with the existence bar of the preset light spot, the detection pattern is detected on the surrounding area of the detected light spot, and the certificate to be identified is identified according to the detection result of the detection pattern and the material information of the certificate to be identified. On one hand, a mode for identifying the certificate to be identified is provided, and the steps are simple and easy to execute; on the other hand, in the related art, the paper copy forging means can only be identified by only the spot detection mode, and the forging means such as screen copying and copper plate printing cannot be identified, but in the embodiment, various certificate forging means can be identified by combining the spot detection mode and the detection mode of the detection pattern of the surrounding area of the spot, so that the accuracy of certificate identification is improved, and the certificate can be effectively identified.
Drawings
In order to more clearly illustrate one or more embodiments of the present specification or the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described, it being apparent that the drawings in the following description are only some of the embodiments described in one or more embodiments of the present specification, and that other drawings may be obtained from these drawings without inventive faculty for a person of ordinary skill in the art.
FIG. 1 is a schematic flow chart of a method for authenticating a document according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of spot detection on a first image according to an embodiment of the present disclosure;
fig. 3 is a second schematic flow chart of spot detection on the first image according to the embodiment of the present disclosure;
fig. 4 is a schematic diagram III of a flow chart of performing spot detection on a first image according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a flow chart for performing spot detection on a first image according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of the components of a credential authentication device provided in an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a credential authentication device provided in an embodiment of the present disclosure.
Detailed Description
One or more embodiments of the present disclosure provide a certificate authentication method, apparatus, device, and storage medium, for providing a method for effectively authenticating a certificate.
In order to enable a person skilled in the art to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which may be made by one of ordinary skill in the art based on one or more embodiments of the present disclosure without departing from the scope of the invention as defined by the claims.
The embodiment of the present disclosure provides a certificate authentication method, and the certificate authentication method may be executed by a single server or a server cluster including a plurality of servers, which is not particularly limited in this exemplary embodiment. Fig. 1 is a schematic flow chart of a certificate authentication method according to an embodiment of the present disclosure, as shown in fig. 1, the method may include the following steps:
Step S102, acquiring a first image shot by a certificate to be authenticated under a set illumination condition, wherein the first image comprises an image of the certificate to be authenticated.
In the embodiment of the present specification, setting the lighting condition may mean that under the flash lighting condition, the flash may be a flash carried on the terminal device itself or may be an independent flash, which is not particularly limited in this exemplary embodiment. Specifically, a user can shoot a first image of a certificate to be authenticated through a camera in a terminal device (such as a mobile phone, a tablet personal computer and the like) under the condition of starting a flash lamp; the user may also take a first image or the like of the document to be authenticated through the camera head of the camera and under the condition that the flash is turned on, which is not particularly limited in the embodiment of the present specification. The executing body of the certificate authentication method can acquire a first image shot by a certificate to be authenticated under the condition of shooting by a flash lamp. The first image includes an image of the document to be authenticated.
The certificate to be authenticated may be an identity card, an academic certificate, a academic certificate, or the like, which is not particularly limited in the embodiment of the present specification.
Step S104, carrying out spot detection on the first image.
In the embodiment of the present specification, the spot detection may be performed on the first image in the following four ways, in which:
mode one: fig. 2 is a schematic diagram of a flow chart of spot detection on a first image according to an embodiment of the present disclosure. As shown in fig. 2, the following steps may be included:
step S202, converting the first image into a gray scale image. In particular, an image processing operation may be employed to convert the first image into a grayscale image.
Step S204, based on a gray threshold, the maximum connected domain in the gray image is obtained.
In the embodiment of the present specification, first, a gray value of each pixel in a gray image may be acquired, the gray value of each pixel is compared with a gray threshold value, and a pixel in the gray image whose gray value is greater than the gray threshold value is determined as a target pixel; then, a connected domain process is performed on the target pixel in the grayscale image to obtain at least one connected domain, and the connected domain having the largest area in the at least one connected domain is determined as the largest connected domain. Note that the value of the gradation threshold value may be set empirically or obtained through experiments, and this is not particularly limited in the present exemplary embodiment.
By taking the connected domain with the largest area, the light spot noise can be removed, so that the accuracy of certificate identification is improved.
Step S206, judging whether the pixel number of the maximum connected domain is larger than a preset number. That is, the number of pixels of the maximum connected domain is obtained and compared with a preset number, which may be obtained according to experiments, and the present exemplary embodiment is not particularly limited thereto.
Step S208, determining a light spot detection result of the first image according to the judgment result. Specifically, if the number of pixels of the maximum connected domain is greater than the preset number, determining that the light spot detection result of the first image meets the preset light spot existence condition, wherein the maximum connected domain is the detected light spot; if the number of pixels of the maximum connected domain is not greater than the preset number, determining that the first image does not accord with the preset light spot existence condition. In the present specification, the basis of setting the existence condition of the light spot may be adjusted according to a specific application scenario and specific requirements, for example, for a certain type of document, and when photographing under a first illumination condition, the basis of setting the existence condition of the light spot may be that the number of pixels of the light spot exceeds a first threshold, for another type of document, and when photographing under a second illumination condition, the basis of setting the existence condition of the light spot may be that the number of pixels of the light spot exceeds a second threshold. The light spot existence condition can be adjusted according to the detection environment and the feedback of the detection result, so that the detection result of the detection based on the condition is more accurate.
Mode two: fig. 3 is a second schematic flow chart of spot detection on the first image according to the embodiment of the present disclosure. As shown in fig. 3, the following steps may be included:
step S302, converting the first image into a gray scale image. Since this step has already been described above, it is not described in detail here.
Step S304, the brightness of the gray level image is adjusted to enable the brightness of the gray level image to meet the preset brightness requirement.
In the embodiment of the present specification, the gray value of a pixel ranges from 0 to 255, and the larger the gray value is, the brighter the pixel is, the smaller the gray value is, and the darker the pixel is. Based on this, the process of adjusting the brightness of the gray-scale image may include: and searching the gray value of each pixel in the gray image to obtain the pixel with the maximum gray value. Judging whether the gray value of the pixel with the maximum gray value is 255, if so, not adjusting the brightness of the gray image; if not, the gray value of each pixel in the whole gray image is adjusted in equal proportion so that the gray value of the pixel with the largest gray value is 255. The preset brightness requirement may refer to that the gray value of the pixel with the maximum gray value in the gray image after brightness adjustment is 255.
By adjusting the brightness of the gray level image, the phenomenon that light spots cannot be found due to the fact that the brightness of the gray level image does not meet the preset brightness requirement can be avoided.
Step S306, based on a gray threshold, the maximum connected domain in the gray image with brightness adjusted is obtained. In the embodiment of the present disclosure, since the implementation principle of step S206 is the same as that of step S204, a detailed description is omitted here.
Step S308, judging whether the pixel number of the maximum connected domain is larger than a preset number. This step has already been described above and will therefore not be described in detail here.
Step S310, determining a light spot detection result of the first image according to the judgment result. This step has already been described above and will therefore not be described in detail here.
Mode three: fig. 4 is a schematic diagram of a third flow chart of spot detection on the first image according to the embodiment of the present disclosure. As shown in fig. 4, the following steps may be included:
step S402, aligning the first image with a preset certificate alignment template.
In the embodiment of the present specification, firstly, a document alignment template of each document may be preset, and then, a corresponding document alignment template is selected from the preset document alignment templates of the documents according to the type of the document to be authenticated; and finally, aligning the first image with the selected certificate alignment template through a SIFT feature matching picture alignment algorithm.
And step S404, intercepting an image of the certificate to be authenticated in the aligned first image. In the embodiment of the present disclosure, since the first image includes not only the image of the document to be authenticated but also the background image, noise may affect the accuracy of authentication due to the noise that may exist in the background image, so in order to further improve the accuracy of authentication of the document, the image of the document to be authenticated needs to be captured in the aligned first image, so as to perform subsequent processing according to the image of the document to be authenticated.
Step S406, converting the image of the certificate to be authenticated into a gray level image. An image processing operation may be employed to convert the image of the document to be authenticated into a grayscale image.
Step S408, based on a gray threshold, the maximum connected domain in the gray image is obtained. Since the implementation principle of this step is the same as that of step S204, a detailed description thereof will be omitted herein.
Step S410, determining whether the number of pixels of the maximum connected domain is greater than a preset number. Since the implementation principle of step S410 has been described above, a detailed description thereof will be omitted.
Step S412, determining the light spot detection result of the first image according to the judgment result. Specifically, if the number of pixels of the maximum connected domain is greater than the preset number, determining that the light spot detection result of the first image meets the preset light spot existence condition, wherein the maximum connected domain is the detected light spot; if the number of pixels of the maximum connected domain is not greater than the preset number, determining that the first image does not accord with the preset light spot existence condition.
Mode four: fig. 5 is a schematic diagram of a flow chart for performing spot detection on a first image according to an embodiment of the present disclosure. As shown in fig. 5, the following steps may be included:
step S502, aligning the first image with a preset certificate alignment template. Since the implementation principle of this step has been described above, a detailed description thereof will not be provided here.
Step S504, intercepting an image of the certificate to be authenticated in the aligned first image. Since the implementation principle of this step has been described above, a detailed description thereof is omitted here.
Step S506, converting the image of the certificate to be authenticated into a gray image. Since the implementation principle of this step has been described above, a detailed description thereof is omitted here.
Step S508, adjusting the brightness of the gray level image to make the brightness of the gray level image meet the preset brightness requirement. Since the principle of this step has been described above, a detailed description thereof is omitted here.
Step S510, based on a gray threshold, obtaining the maximum connected domain in the gray image after brightness adjustment. Since the implementation principle of this step has been described above, a detailed description thereof will not be provided here.
Step S512, determining whether the number of pixels of the maximum connected domain is greater than a preset number. Since the implementation principle of this step has been described above, a detailed description thereof is omitted here.
Step S514, determining a light spot detection result of the first image according to the judgment result. Since the implementation principle of this step has been described above, a detailed description thereof is omitted here.
And S106, if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot.
The detection mode of the detection pattern in the embodiment of the present disclosure includes various detection modes of optical textures, such as spiral texture detection, or detection of other optical textures, such as moire detection, and so on. The specific detection mode of the detection pattern can be determined according to the specific application scene and the optical characteristics of the type of the certificate to be identified, and will not be described herein. The following will exemplify the detection pattern as a spiral pattern, and the detection mode of the detection pattern is spiral pattern detection. It is conceivable that based on the technical idea of this solution, it is also applicable to the detection of other optical textures.
In the embodiment of the present disclosure, if the light spot detection result does not meet the preset light spot existence condition, that is, if no light spot exists in the first image according to the above manner, the document to be authenticated is determined to be a counterfeit document, and if the light spot detection result meets the preset light spot existence condition, that is, if light spots exist in the first image according to the above manner, spiral line detection is performed on the surrounding area of the detected light spot, that is, the detected light spot is the maximum connected domain with the number of pixels greater than the preset number. Specifically, the spiral detection can be performed on the surrounding area of the detected light spot based on a spiral classifier trained by the deep learning network. Next, a construction process of the spiral classifier will be described.
Firstly, acquiring a training sample, wherein the training sample is a light spot area intercepted from various certificate images acquired under a set lighting condition, the light spot area comprises light spots and surrounding areas of the light spots, and the light spot area is a maximum connected domain and a surrounding area of the maximum connected domain, the number of pixels of which is larger than a preset number, in the various certificate images, wherein the training sample comprises two types, spiral lines exist in the surrounding areas of the light spots in one type, and the spiral lines do not exist in the surrounding areas of the light spots in one type;
and then, marking each training sample by spiral lines, namely marking spiral lines in the training samples with spiral lines, and marking the training samples without spiral lines in the training samples without spiral lines.
And finally, inputting the marked training samples into a deep learning network for training to obtain the spiral line classifier. The deep learning network may be, for example, a CNN (convolutional neural network) model or the like, which is not particularly limited in the present exemplary embodiment.
The process of spiral detection of the surrounding area of the detected spot may comprise: intercepting the detected light spot and the surrounding area thereof, namely intercepting the maximum connected domain and the surrounding area thereof, inputting the intercepted light spot and the surrounding area thereof into a spiral line classifier, and outputting a result of whether the surrounding area of the light spot has spiral lines or not by the spiral line classifier. Specifically, if the result output by the spiral line classifier is that the area around the light spot has spiral lines, determining that the spiral line detection result meets the preset spiral line existence condition, and if the result output by the spiral line classifier is that the area around the light spot does not have spiral lines, determining that the spiral line detection result does not meet the spiral line existence condition.
And S108, identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern.
In the embodiment of the present disclosure, taking a detection mode of a detection pattern as an example of spiral line detection, whether a spiral line exists in a surrounding area of a light spot is determined by a material of a document, that is, when the spiral line detection is performed on a surrounding area of a light spot detected in an image captured by a document under a set illumination condition for a document with a part of the material, a spiral line detection result accords with a preset spiral line existence condition, that is, the spiral line exists in the surrounding area of the light spot in the captured image of the document; for the certificates made of other parts of materials, when the spiral lines are detected on the light spots detected in the images shot by the certificates under the set illumination conditions, the spiral line detection result does not accord with the preset spiral line existence conditions, namely, the spiral lines do not exist in the surrounding areas of the light spots in the shot images of the certificates. Based on the method, spiral line detection can be performed on the surrounding area of the light spot of the certificate of each material in advance, and the material of the certificate is divided into a first material and a second material according to the spiral line detection result of the certificate of each material, wherein the image shot by the certificate of the first material under the set illumination condition is in accordance with the preset light spot existence condition, and the spiral line detection result is in accordance with the preset spiral line existence condition, namely, the shot image of the certificate has light spots and the surrounding area of the light spots has spiral lines; the method comprises the steps that an image shot by a certificate of a second class of materials under a set illumination condition is provided, a light spot detection result accords with a preset light spot existence condition, and a spiral line detection result does not accord with a preset spiral line existence condition, namely, light spots exist in the shot image of the certificate, but spiral lines do not exist in the surrounding area of the light spots.
Based on this, according to the material information and the spiral detection result of the certificate to be authenticated, the process of authenticating the certificate to be authenticated may include:
firstly, the first type material and the second type material which are divided in advance can be combined, and whether the material of the certificate to be authenticated is the first type material or the second type material is determined according to the material information of the certificate to be authenticated;
then, if the material of the certificate to be authenticated is a first material and the spiral line detection result does not accord with the preset spiral line existence condition, determining the certificate to be authenticated as a counterfeit certificate; if the material of the certificate to be identified is a first type material and the spiral pattern detection result meets the preset spiral pattern existence condition, determining that the certificate to be identified is a real certificate; in order to more accurately identify the credentials to be identified, if the credentials to be identified are made of a first type of material and the spiral line detection result meets the preset spiral line existence condition, other identification means can be combined on the basis to further identify the credentials to be identified.
If the material of the certificate to be authenticated is the second type of material and the spiral pattern detection result meets the preset spiral pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; if the material of the certificate to be authenticated is the second type of material and the spiral pattern detection result does not accord with the preset spiral pattern existence condition, determining that the certificate to be authenticated is a real certificate; in order to more accurately identify the credentials to be identified, if the credentials to be identified are of the second type, and the spiral line detection result does not conform to the preset spiral line existence condition, other identification means can be combined on the basis to further identify the credentials to be identified.
In summary, a way of authenticating a document to be authenticated is provided, and the steps are simple and easy to perform; in addition, in the related art, only the paper copy forging means can be identified by only the light spot detection mode, and the forging means such as screen copying and copper plate printing cannot be identified, but the embodiment can identify the forging means such as paper copy, screen copying and copper plate printing by combining the light spot detection mode and the detection mode of the spiral lines of the surrounding area of the light spot, so that the accuracy of certificate identification is improved, and the certificate identification can be effectively carried out.
In response to the above-mentioned certificate authentication method, based on the same technical concept, the embodiments of the present disclosure further provide a certificate authentication apparatus, and fig. 6 is a schematic diagram of the composition of the certificate authentication apparatus provided in the embodiments of the present disclosure, where the apparatus is used to perform the above-mentioned certificate authentication method, and as shown in fig. 6, the apparatus 600 may include: acquisition module 601, facula detection module 602, detection pattern detection module 603, authentication module 604, wherein:
an obtaining module 601, configured to obtain a first image taken by a document to be authenticated under a set illumination condition, where the first image includes an image of the document to be authenticated;
The spot detection module 602 is configured to perform spot detection on the first image;
the detection pattern detection module 603 is configured to detect a detection pattern of a surrounding area of the detected light spot if the light spot detection result meets a preset light spot existence condition;
and the authentication module 604 is configured to authenticate the certificate to be authenticated according to the material information of the certificate to be authenticated and the detection result of the detection pattern.
Optionally, the authentication module 604 includes:
the first determining unit is used for determining that the certificate to be authenticated is a counterfeit certificate if the material of the certificate to be authenticated is a first type material and the detection result of the detection pattern does not accord with the preset detection pattern existence condition; the detection result of the facula of the image shot by the certificate of the first material under the set illumination condition accords with the preset facula existence condition, and the detection result of the detection pattern accords with the preset detection pattern existence condition;
the second determining unit is used for determining that the certificate to be authenticated is a counterfeit certificate if the material of the certificate to be authenticated is a second type material and the detection result of the detection pattern accords with the preset detection pattern existence condition; the light spot detection result of the image shot by the certificate of the second type material under the set illumination condition accords with the preset light spot existence condition, and the detection result of the detection pattern does not accord with the preset detection pattern existence condition.
Optionally, the spot detection module 602 includes:
a conversion unit configured to convert the first image into a grayscale image;
the acquisition unit is used for acquiring the maximum connected domain in the gray image based on a gray threshold value;
the judging unit is used for judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and the determining unit is used for determining a light spot detection result of the first image according to the judging result.
Optionally, the spot detection module 602 includes:
an alignment unit, configured to align the first image with a preset certificate alignment template;
the intercepting unit is used for intercepting the image of the certificate to be authenticated in the aligned first image;
the conversion unit is used for converting the image of the certificate to be authenticated into a gray image;
the acquisition unit is used for acquiring the maximum connected domain in the gray image based on a gray threshold value;
the judging unit is used for judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and the determining unit is used for determining a light spot detection result of the first image according to the judging result.
Optionally, the determining unit includes:
A first determining subunit, configured to determine that, if the number of pixels of the maximum connected domain is greater than a preset number, a light spot detection result of the first image meets a preset light spot existence condition, and the maximum connected domain is a detected light spot;
and the second determining subunit is used for determining that the first image does not accord with the preset light spot existence condition if the number of pixels of the maximum connected domain is not greater than the preset number.
Optionally, the acquiring unit includes:
the adjusting subunit is used for adjusting the brightness of the gray level image so as to enable the brightness of the gray level image to meet the preset brightness requirement;
and the acquisition subunit is used for acquiring the maximum connected domain in the gray level image after brightness adjustment based on a gray level threshold value.
Optionally, the detection pattern detection module 603 is specifically configured to detect a detection pattern of a surrounding area of the detected light spot based on a detection pattern classifier trained by the deep learning network if the light spot detection result meets a preset light spot existence condition.
The certificate authentication device in the embodiment of the specification provides a mode for authenticating a certificate to be authenticated, and the steps are simple and easy to execute; in addition, in the related art, only the paper copy forging means can be identified by only the spot detection mode, but the forging means such as screen copying and copper plate printing cannot be identified, and in the embodiment, the forging means such as paper copy, screen copying and copper plate printing can be identified by combining the spot detection mode and the detection mode of the detection pattern of the surrounding area of the spot, so that the accuracy of certificate identification is improved, and the certificate identification can be effectively carried out.
In response to the above-mentioned certificate authentication method, based on the same technical concept, the embodiment of the present disclosure further provides a certificate authentication device, and fig. 7 is a schematic structural diagram of the certificate authentication device provided in the embodiment of the present disclosure, where the device is used to perform the above-mentioned certificate authentication method.
As shown in FIG. 7, credential authentication devices can vary widely in configuration or performance, and can include one or more processors 701 and memory 702, where memory 702 can store one or more stored applications or data. Wherein the memory 702 may be transient storage or persistent storage. The application program stored in the memory 702 may include one or more modules (not shown in the figures), each of which may include a series of computer-executable instructions for use in authenticating devices. Still further, the processor 701 can be configured to communicate with the memory 702 and execute a series of computer executable instructions in the memory 702 on the credential authentication device. The credential authentication device can also include one or more power sources 703, one or more wired or wireless network interfaces 704, one or more input/output interfaces 705, one or more keyboards 706, and the like.
In one particular embodiment, a credential authentication device includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions in the credential authentication device, and configured to be executed by one or more processors, the one or more programs comprising computer-executable instructions for:
acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated;
carrying out light spot detection on the first image;
if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot;
and identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern.
Optionally, when the computer executable instructions are executed, the identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern includes:
If the material of the certificate to be authenticated is a first type material and the detection result of the detection pattern does not accord with the preset detection pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; the detection result of the facula of the image shot by the certificate of the first material under the set illumination condition accords with the preset facula existence condition, and the detection result of the detection pattern accords with the preset detection pattern existence condition;
if the material of the certificate to be authenticated is a second type material and the detection result of the detection pattern meets the preset detection pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; the light spot detection result of the image shot by the certificate of the second type material under the set illumination condition accords with the preset light spot existence condition, and the detection result of the detection pattern does not accord with the preset detection pattern existence condition.
Optionally, the computer executable instructions, when executed, perform spot detection on the first image, including:
converting the first image into a gray scale image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
Judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
Optionally, the computer executable instructions, when executed, perform spot detection on the first image, including:
aligning the first image with a preset certificate alignment template;
intercepting an image of the certificate to be authenticated in the aligned first image;
converting the image of the certificate to be authenticated into a gray image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
Optionally, when the computer executable instructions are executed, the determining, according to the determination result, the light spot detection result of the first image includes:
if the number of pixels of the maximum connected domain is larger than the preset number, determining that the light spot detection result of the first image meets the preset light spot existence condition, wherein the maximum connected domain is the detected light spot;
if the number of pixels of the maximum connected domain is not greater than the preset number, determining that the first image does not accord with the preset light spot existence condition.
Optionally, the computer executable instructions, when executed, obtain the maximum connected domain in the grayscale image based on a grayscale threshold, including:
adjusting the brightness of the gray level image to enable the brightness of the gray level image to meet the preset brightness requirement;
and acquiring the maximum connected domain in the gray level image after brightness adjustment based on a gray level threshold value.
Optionally, the computer executable instructions, when executed, perform the detecting of the detection pattern of the surrounding area of the detected light spot comprises:
and detecting the detection pattern of the surrounding area of the detected light spot based on a detection pattern classifier trained by the deep learning network.
The certificate authentication equipment in the embodiment of the specification provides a mode for authenticating the certificate to be authenticated, and the steps are simple and easy to execute; in addition, in the related art, only the paper copy forging means can be identified by only the spot detection mode, but the forging means such as screen copying and copper plate printing cannot be identified, and in the embodiment, the forging means such as paper copy, screen copying and copper plate printing can be identified by combining the spot detection mode and the detection mode of the detection pattern of the surrounding area of the spot, so that the accuracy of certificate identification is improved, and the certificate identification can be effectively carried out.
In response to the certificate authentication method described above, the present embodiments also provide a storage medium for storing computer-executable instructions based on the same technical concept.
In a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, or the like, where the computer executable instructions stored in the storage medium, when executed by the processor, implement the following procedures:
acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated;
carrying out light spot detection on the first image;
if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot;
and identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern.
Optionally, the computer executable instructions stored in the storage medium, when executed by the processor, identify the certificate to be identified according to the texture information of the certificate to be identified and the detection result of the detection pattern, including:
if the material of the certificate to be authenticated is a first type material and the detection result of the detection pattern does not accord with the preset detection pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; the detection result of the facula of the image shot by the certificate of the first material under the set illumination condition accords with the preset facula existence condition, and the detection result of the detection pattern accords with the preset detection pattern existence condition;
If the material of the certificate to be authenticated is a second type material and the detection result of the detection pattern accords with the preset detection pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; the light spot detection result of the image shot by the certificate of the second type material under the set illumination condition accords with the preset light spot existence condition, and the detection result of the detection pattern does not accord with the preset detection pattern existence condition.
Optionally, the computer executable instructions stored on the storage medium, when executed by the processor, perform the spot detection on the first image, including:
converting the first image into a gray scale image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
Optionally, the computer executable instructions stored on the storage medium, when executed by the processor, perform the spot detection on the first image, including:
aligning the first image with a preset certificate alignment template;
Intercepting an image of the certificate to be authenticated in the aligned first image;
converting the image of the certificate to be authenticated into a gray image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
Optionally, the computer executable instructions stored in the storage medium, when executed by the processor, determine the light spot detection result of the first image according to the determination result includes:
if the number of pixels of the maximum connected domain is larger than the preset number, determining that the light spot detection result of the first image meets the preset light spot existence condition, wherein the maximum connected domain is the detected light spot;
if the number of pixels of the maximum connected domain is not greater than the preset number, determining that the first image does not accord with the preset light spot existence condition.
Optionally, the computer executable instructions stored on the storage medium, when executed by the processor, obtain the maximum connected domain in the grayscale image based on a grayscale threshold, includes:
adjusting the brightness of the gray level image to enable the brightness of the gray level image to meet the preset brightness requirement;
And acquiring the maximum connected domain in the gray level image after brightness adjustment based on a gray level threshold value.
Optionally, the storage medium stores computer executable instructions that, when executed by the processor, perform detection of the detection pattern for the surrounding area of the detected light spot, comprising:
and detecting the detection pattern of the surrounding area of the detected light spot based on a detection pattern classifier trained by the deep learning network.
The storage medium in the embodiments of the present description stores computer-executable instructions that, when executed by a processor, provide a way to authenticate a document to be authenticated, and the steps are simple and easy to perform; in addition, in the related art, only the paper copy forging means can be identified by only the spot detection mode, but the forging means such as screen copying and copper plate printing cannot be identified, and in the embodiment, the forging means such as paper copy, screen copying and copper plate printing can be identified by combining the spot detection mode and the detection mode of the detection pattern of the surrounding area of the spot, so that the accuracy of certificate identification is improved, and the certificate identification can be effectively carried out.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (15)

1. A method of authentication of a document, comprising:
acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated;
carrying out light spot detection on the first image;
if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot;
Identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern;
wherein the performing spot detection on the first image includes:
converting the first image into a gray scale image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
2. The method for authenticating a document according to claim 1, wherein the authenticating the document according to the material information of the document to be authenticated and the detection result of the detection pattern comprises:
if the material of the certificate to be authenticated is a first type material and the detection result of the detection pattern does not accord with the preset detection pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; the detection result of the facula of the image shot by the certificate of the first material under the set illumination condition accords with the preset facula existence condition, and the detection result of the detection pattern accords with the preset detection pattern existence condition;
If the material of the certificate to be authenticated is a second type material and the detection result of the detection pattern accords with the preset detection pattern existence condition, determining that the certificate to be authenticated is a counterfeit certificate; the light spot detection result of the image shot by the certificate of the second type material under the set illumination condition accords with the preset light spot existence condition, and the detection result of the detection pattern does not accord with the preset detection pattern existence condition.
3. The credential authentication method of claim 1, the spot detection of the first image comprising:
aligning the first image with a preset certificate alignment template;
intercepting an image of the certificate to be authenticated in the aligned first image;
converting the image of the certificate to be authenticated into a gray image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
4. A document authentication method according to claim 1 or 3, wherein the determining the spot detection result of the first image according to the determination result includes:
If the number of pixels of the maximum connected domain is larger than the preset number, determining that the light spot detection result of the first image meets the preset light spot existence condition, wherein the maximum connected domain is the detected light spot;
if the number of pixels of the maximum connected domain is not greater than the preset number, determining that the first image does not accord with the preset light spot existence condition.
5. A document authentication method according to claim 1 or claim 3, wherein said acquiring the largest connected domain in the grayscale image based on a grayscale threshold comprises:
adjusting the brightness of the gray level image to enable the brightness of the gray level image to meet the preset brightness requirement;
and acquiring the maximum connected domain in the gray level image after brightness adjustment based on a gray level threshold value.
6. The document authentication method of claim 1, the detecting of the detection pattern of the surrounding area of the detected light spot comprising:
and detecting the detection pattern of the surrounding area of the detected light spot based on a detection pattern classifier trained by the deep learning network.
7. The document authentication method of claim 1, the detecting of the detection pattern of the surrounding area of the detected light spot comprising:
And detecting spiral lines of the surrounding area of the detected light spot.
8. A credential authentication device comprising:
the acquisition module is used for acquiring a first image shot by the certificate to be authenticated under the set illumination condition, wherein the first image comprises the image of the certificate to be authenticated;
the light spot detection module is used for carrying out light spot detection on the first image;
the detection pattern detection module is used for detecting the detection pattern of the surrounding area of the detected light spot if the light spot detection result meets the preset light spot existence condition;
the identification module is used for identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern;
wherein, the facula detection module includes:
a conversion unit configured to convert the first image into a grayscale image;
the acquisition unit is used for acquiring the maximum connected domain in the gray image based on a gray threshold value;
the judging unit is used for judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and the determining unit is used for determining a light spot detection result of the first image according to the judging result.
9. The credential authentication device of claim 8, the authentication module comprising:
The first determining unit is used for determining that the certificate to be authenticated is a counterfeit certificate if the material of the certificate to be authenticated is a first type material and the detection result of the detection pattern does not accord with the preset detection pattern existence condition; the detection result of the facula of the image shot by the certificate of the first material under the set illumination condition accords with the preset facula existence condition, and the detection result of the detection pattern accords with the preset detection pattern existence condition;
the second determining unit is used for determining that the certificate to be authenticated is a counterfeit certificate if the material of the certificate to be authenticated is a second type material and the detection result of the detection pattern accords with the preset detection pattern existence condition; the light spot detection result of the image shot by the certificate of the second type material under the set illumination condition accords with the preset light spot existence condition, and the detection result of the detection pattern does not accord with the preset detection pattern existence condition.
10. The credential authentication device of claim 8, the spot detection module comprising:
an alignment unit, configured to align the first image with a preset certificate alignment template;
The intercepting unit is used for intercepting the image of the certificate to be authenticated in the aligned first image;
the conversion unit is used for converting the image of the certificate to be authenticated into a gray image;
the acquisition unit is used for acquiring the maximum connected domain in the gray image based on a gray threshold value;
the judging unit is used for judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and the determining unit is used for determining a light spot detection result of the first image according to the judging result.
11. The document authentication device according to claim 8 or 10, the determination unit comprising:
a first determining subunit, configured to determine that, if the number of pixels of the maximum connected domain is greater than a preset number, a light spot detection result of the first image meets a preset light spot existence condition, and the maximum connected domain is a detected light spot;
and the second determining subunit is used for determining that the first image does not accord with the preset light spot existence condition if the number of pixels of the maximum connected domain is not greater than the preset number.
12. The document authentication device according to claim 8 or 10, the acquisition unit comprising:
the adjusting subunit is used for adjusting the brightness of the gray level image so as to enable the brightness of the gray level image to meet the preset brightness requirement;
And the acquisition subunit is used for acquiring the maximum connected domain in the gray level image after brightness adjustment based on a gray level threshold value.
13. The document authentication device of claim 8, wherein the detection pattern detection module is specifically configured to detect a detection pattern of a surrounding area of the detected light spot based on a detection pattern classifier trained by the deep learning network if the light spot detection result meets a preset light spot existence condition.
14. A credential authentication device comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated;
carrying out light spot detection on the first image;
if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot;
identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern;
wherein the performing spot detection on the first image includes:
Converting the first image into a gray scale image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
judging whether the number of pixels of the maximum connected domain is larger than a preset number;
and determining a light spot detection result of the first image according to the judgment result.
15. A storage medium storing computer-executable instructions that when executed implement the following:
acquiring a first image shot by a certificate to be authenticated under a set lighting condition, wherein the first image comprises an image of the certificate to be authenticated;
carrying out light spot detection on the first image;
if the light spot detection result meets the preset light spot existence condition, detecting a detection pattern of the surrounding area of the detected light spot;
identifying the certificate to be identified according to the material information of the certificate to be identified and the detection result of the detection pattern;
wherein the performing spot detection on the first image includes:
converting the first image into a gray scale image;
acquiring a maximum connected domain in the gray image based on a gray threshold;
judging whether the number of pixels of the maximum connected domain is larger than a preset number;
And determining a light spot detection result of the first image according to the judgment result.
CN201910774059.9A 2019-08-21 2019-08-21 Certificate authentication method and device Active CN110533643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910774059.9A CN110533643B (en) 2019-08-21 2019-08-21 Certificate authentication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910774059.9A CN110533643B (en) 2019-08-21 2019-08-21 Certificate authentication method and device

Publications (2)

Publication Number Publication Date
CN110533643A CN110533643A (en) 2019-12-03
CN110533643B true CN110533643B (en) 2023-06-30

Family

ID=68662502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910774059.9A Active CN110533643B (en) 2019-08-21 2019-08-21 Certificate authentication method and device

Country Status (1)

Country Link
CN (1) CN110533643B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199231B (en) * 2020-01-06 2023-10-10 支付宝实验室(新加坡)有限公司 Image recognition method and device
CN111275042B (en) * 2020-01-21 2023-07-18 支付宝实验室(新加坡)有限公司 Identification method and device for forged certificate and electronic equipment
SG10202005118QA (en) * 2020-06-01 2021-08-30 Alipay Labs Singapore Pte Ltd Authentication method and system
CN112784833A (en) * 2021-03-12 2021-05-11 支付宝(杭州)信息技术有限公司 Certificate identification method and device and server
CN112966680B (en) * 2021-03-19 2022-04-15 支付宝(杭州)信息技术有限公司 Certificate picture acquisition method and device and electronic equipment
CN113837026B (en) * 2021-09-03 2023-11-07 支付宝(杭州)信息技术有限公司 Method and device for detecting authenticity of certificate

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862605A (en) * 2005-05-11 2006-11-15 深圳鼎识科技有限公司 Real-forge discriminating method for credentials, certificate, bill, etc. document of title
CN105632012A (en) * 2016-03-03 2016-06-01 深圳市中钞信达金融科技有限公司 Method, device and system for bill authenticity identification
CN106803086A (en) * 2016-12-30 2017-06-06 北京旷视科技有限公司 Distinguish method, the apparatus and system of certificate authenticity
CN107133627A (en) * 2017-04-01 2017-09-05 深圳市欢创科技有限公司 Infrared light spot center point extracting method and device
CN107944339A (en) * 2017-10-20 2018-04-20 阿里巴巴集团控股有限公司 A kind of certificate verification, auth method and device
CN108229499A (en) * 2017-10-30 2018-06-29 北京市商汤科技开发有限公司 Certificate recognition methods and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862605A (en) * 2005-05-11 2006-11-15 深圳鼎识科技有限公司 Real-forge discriminating method for credentials, certificate, bill, etc. document of title
CN105632012A (en) * 2016-03-03 2016-06-01 深圳市中钞信达金融科技有限公司 Method, device and system for bill authenticity identification
CN106803086A (en) * 2016-12-30 2017-06-06 北京旷视科技有限公司 Distinguish method, the apparatus and system of certificate authenticity
CN107133627A (en) * 2017-04-01 2017-09-05 深圳市欢创科技有限公司 Infrared light spot center point extracting method and device
CN107944339A (en) * 2017-10-20 2018-04-20 阿里巴巴集团控股有限公司 A kind of certificate verification, auth method and device
CN108229499A (en) * 2017-10-30 2018-06-29 北京市商汤科技开发有限公司 Certificate recognition methods and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110533643A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN110533643B (en) Certificate authentication method and device
US10691929B2 (en) Method and apparatus for verifying certificates and identities
WO2021031523A1 (en) Document recognition method and device
CN110688939B (en) Method, system and equipment for verifying certificate image to be identified
US10764563B2 (en) 3D enhanced image correction
CN110263775B (en) Image identification method, device and equipment and authentication method, device and equipment
CN111324874A (en) Certificate authenticity identification method and device
CN107111761B (en) Techniques for providing user image capture feedback for improved machine language translation
CN108648189B (en) Image blur detection method and device, computing equipment and readable storage medium
US11086977B2 (en) Certificate verification
CN111368944B (en) Method and device for recognizing copied image and certificate photo and training model and electronic equipment
CN116824339A (en) Image processing method and device
CN111199231B (en) Image recognition method and device
CN111311550B (en) Identification method and device for forged certificate and electronic equipment
CN110880023A (en) Method and device for detecting certificate picture
CN112188031A (en) Image processing method and device, computer equipment and storage medium
JP5757931B2 (en) Image processing apparatus and image reading apparatus
KR102371391B1 (en) License platae recognition system using ai and operation method thereof
JP2009076020A (en) Iris recognition device
CN111243159A (en) Counterfeit certificate identification method and device and electronic equipment
TWM583989U (en) Serial number detection system
JP2014232373A (en) Collation object extraction system, collation object extraction method, and collation object extraction program
CN111582259B (en) Machine-readable code identification method, device, electronic equipment and storage medium
CN111275042B (en) Identification method and device for forged certificate and electronic equipment
CN116560540A (en) Method, device, equipment and readable medium for identifying certificate image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40018244

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20201012

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201012

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant