Detailed Description
For the purposes of making the objects, technical solutions and advantages of one or more embodiments of the present specification more clear, the technical solutions of one or more embodiments of the present specification will be clearly and completely described below in connection with specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without undue burden, are intended to be within the scope of one or more embodiments herein.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
FIG. 1 is a schematic diagram of an interactive interface of a document scanning method according to an embodiment of the present disclosure. As shown in fig. 1, when a document needs to be scanned, a scanning interface is opened to remind a user to place the front side of the document in a scanning line frame 101 for automatic generation scanning, and the scanning frame contains a portrait area positioning mark 102, where it needs to be noted that the area of the portrait area positioning mark 102 can be a head portrait outline area or a circular area or a square area in an actual application scene, and the purpose of the method is to align a portrait in the document. The certificate comprises a front side and a back side, and when the certificate anti-counterfeiting operation is specifically carried out, the authenticity of the scanned certificate can be identified by only verifying the front side of the certificate in general, and the identification of the back side of the certificate is not excluded in other cases. This is not limited in this embodiment. In the following examples, the front side of a document is scanned specifically. The front surface of the certificate 103 is placed in the scanning frame 101, the plane where the camera is located and the plane where the certificate is located are guaranteed to be parallel to each other as much as possible to perform front scanning, after the front scanning is finished, the inclined scanning angle is performed again, the certificate is scanned to obtain a side image of the certificate, and after the certificate passes the scanning, verification passing or other prompt information for prompting the user of the certificate verification passing can be displayed.
Next, a document scanning method provided for the embodiments of the specification will be specifically described with reference to the accompanying drawings:
fig. 2 is a schematic flow chart of a method for scanning credentials according to an embodiment of the present disclosure. From the program perspective, the execution subject of the flow may be a program or an application client that is installed on an application server.
As shown in fig. 2, the process may include the steps of:
step 202: and acquiring a multi-frame first image obtained by scanning the certificate at a first scanning angle to obtain a first image set, wherein the scanning angle is an included angle between a plane where a scanning lens is positioned and a plane where the certificate is positioned.
Credentials may refer to credentials and documents used to prove user identity, experience, etc., such as: resident identification cards, passports and other documents.
During identification of the document, the document scanning mode may be turned on, for example: and opening the camera function through the installed application program, and displaying a certificate scanning interface. The scan angle mentioned here can be understood as
And an included angle between the plane where the camera is positioned and the plane where the certificate is positioned.
When the front image is shot, a first image of the front scanning is obtained by scanning at a first scanning angle. The first scan angle may represent an image of a front-side scanned document, and in practical applications, the first scan angle may represent a smaller angle between a plane in which the scan lens is located and a plane in which the document is located, so as to obtain a first image of the front-side scanned document. The first scan angle may represent an angle value or an angle range. Such as: the first scan angle is 10 °, or the first scan angle is 0 ° -20 °.
It should be noted that, the first image mentioned in the above step does not refer to the front and back sides of the document, and may refer to the document image obtained by front scanning, and may be understood as follows: the first image is an image obtained by scanning the plane of the camera as parallel or nearly parallel to the plane of the scanned certificate as possible.
Step 204: and acquiring a multi-frame second image obtained by scanning the certificate at a second scanning angle to obtain a second image set, wherein the second scanning angle is larger than the first scanning angle.
The side image may refer to an image obtained by scanning the scanning lens at an inclination angle. Thus, the second scan angle may be greater than the first scan angle. Such as: the first scanning angle may be set to 0 ° -20 ° (0 ° or more, less than 20 °), and the second scanning angle may be set to 20 ° -90 °.
Step 206: a similarity between the first image set and the second image set is determined.
Determining the similarity between the first image and the second image set may be understood as determining the similarity between the front image set and the side image set.
In practical applications, the document is typically etched by laser etching, i.e., by laser beams burning different layers of a polycarbonate card. Such as: the intelligent hong Kong identity card also adopts a chip warning technology, and the surface adopts an anti-counterfeiting film and a plurality of printing anti-counterfeiting technologies. Such as: the resident identity card is provided with a directional photochromic great wall pattern at the position of the sex item, and a photo is provided with a photo-optically-stored Chinese CHINA character; if the front side of the document is exposed to ultraviolet light, or when viewed obliquely, a fluorescent printed "great wall" pattern can be found. The document will have different gloss and information in different light rays and the document images scanned from different angles will not be exactly the same.
In addition, in determining the similarity between the front image set and the side image set, CNN may be used to extract feature vectors of the front and side of the document, and then compare the similarities. Other algorithms may be used to perform similarity comparison, and the specific method for calculating the similarity is not limited in this scheme.
Step 208: and judging whether the similarity is smaller than a preset threshold value or not, and obtaining a first judging result.
Because of the particularity of the certificate, the images obtained by scanning the anti-counterfeiting film and the warning chip on the surface of the certificate under different directional light rays or different angles can be different, wherein the anti-counterfeiting film can be a directional photochromic film, so that in practical application, the first image scanned on the front side of the real certificate is different from the second image scanned obliquely.
The preset threshold may be specifically set according to different types of credentials, which is not limited herein.
Step 210: and when the first judgment result shows that the similarity is smaller than a preset threshold, displaying first prompt information, wherein the first prompt information is used for prompting that the certificate passes anti-counterfeiting verification.
If the similarity is higher than the preset threshold, the front scanned image of the scanned certificate is considered to be basically the same as the side image of the oblique scanning (for example, when the identity card is scanned in the front, a fluorescent printed 'great wall' pattern cannot be seen, and when the pattern on the anti-counterfeiting film cannot be seen in different images corresponding to different angles scanned after the oblique angle, the certificate is a fake certificate), and at the moment, the scanned certificate can be considered to be the fake certificate. Otherwise, when the similarity value is smaller than the preset threshold value, the scanned certificate can be considered as a true certificate.
And when the certificate obtained by scanning is a true certificate, displaying information for prompting the user that the certificate is finished through anti-counterfeiting verification or scanning.
It should be understood that, in the application architecture deployment method according to one or more embodiments of the present disclosure, the order of some steps may be interchanged according to actual needs, or some steps may be omitted or deleted.
It should be noted that, after the first image set and the second image set are acquired, the authenticity of the scanned certificate needs to be judged according to the two image sets, at this time, besides the above-mentioned method for determining the authenticity of the certificate by calculating the similarity between the two image sets and comparing the similarity with the preset threshold, other identification methods may be adopted to perform comprehensive processing on the acquired first image set and second image set, so as to judge the authenticity of the certificate, for example: a character recognition method, an icon recognition method, a pixel recognition method and the like are adopted. This is not limited in this scheme.
In the method in fig. 2, when the image of the certificate is scanned, the first image of the front scanned certificate is ensured to be acquired at a first scanning angle, the second image of the inclined scanned certificate is ensured to be acquired at a second scanning angle, the scanning image is acquired without aligning four edges, the defect that the image can be acquired only by aligning four edges of the certificate with the frame of the scanning interface is avoided, the alignment process is complicated, and the efficiency of scanning and identifying the certificate is improved.
The steps of the method can be executed at the terminal, the certificate scanning anti-counterfeiting process is carried out at the terminal, the image is not required to be uploaded to a server, the server identifies the authenticity of the certificate, and the identification result is returned to the terminal; the terminal can directly judge the authenticity of the scanned certificate, and prompt a user to rescan when the certificate is determined to not meet the requirement, so that the defect that the operation pressure of the server is high due to the fact that networking is required to perform anti-counterfeiting work on the server can be avoided, and the operation pressure of the server is reduced.
The examples of the present specification also provide some specific embodiments of the method based on the method of fig. 2, which is described below.
It should be noted that, the acquiring a multi-frame first image obtained by scanning the certificate at the first scanning angle specifically includes:
acquiring a multi-frame scanning image;
identifying a multi-frame first image with a certificate identification mark from the scanned images meeting a first image preset condition, wherein the first image preset condition comprises a first scanning angle, and the certificate identification mark presents different image information under different scanning angles;
the obtaining a multi-frame second image obtained by scanning the certificate at a second scanning angle specifically comprises the following steps:
Identifying a multi-frame second image with a certificate identification mark from scanned images meeting the preset condition of the second image, wherein the certificate identification mark represents different image information under different scanning angles;
the certificate identification mark presents different image information under different scanning angles;
it should be noted that, the scanned image in the acquired multi-frame scanned image may be an image that has undergone preliminary screening, and the preliminary screening may include screening out an image and/or an image with a head portrait that satisfies the image quality. Specifically, a scanned image satisfying an image preset condition may be extracted, and the image preset condition may include a second preset angle and an image quality, which may include one or more of sharpness, brightness, color shift, and noise. Such as: the multi-frame images in the first graphic set are images with a scanning angle of less than 10 degrees, identification marks, head portraits and meeting the image quality condition.
The certificate identification identifier may be all relevant identifiers capable of identifying the certificate, such as: the anti-counterfeiting film on the surface of the certificate, the anti-counterfeiting chip on the surface of the certificate, the anti-counterfeiting fingerprint plate and the like, and the images obtained by shooting the certificate identification under different shooting angles or different shooting light conditions can be different, for example: different image information may be displayed under different light rays or under different photographing angles.
By the method, the first image set and the second image set which are obtained by scanning at the first scanning angle and the second scanning angle are obtained, the images in the two image sets meet one or more of the image quality conditions, the head portraits and the identification marks of the certificates, the image sets for comparison and identification can be ensured to be effective image sets, the authenticity of the certificates can be more effectively identified, and the identification efficiency of the certificates is improved.
Before obtaining the multi-frame first image obtained by scanning the certificate at the first scanning angle, the method may further include:
the second prompt for prompting the user to scan the front image of the document at the first scan angle is displayed.
Still further, the displaying the second prompting information for prompting the user to scan the front image of the document at the first scanning angle displays the second prompting information for prompting the user to scan the front image of the document at the first scanning angle may specifically include:
displaying a first scanning frame and/or animation for representing the front image scanning operation, wherein the first scanning frame is rectangular or rounded rectangle.
The first scanning frame may include a portrait area positioning identifier.
The second prompting message may include one or more of text information for prompting the user to place the document in a corresponding position for scanning, a first scan box, and/or an animation for representing a frontal image scanning operation, as may be explained in connection with fig. 3.
Fig. 3 is an interface schematic diagram of a front-side scanned document image in a document scanning method according to an embodiment of the present disclosure. As shown in fig. 3, when the document scanning mode is started, scanning information for prompting the user to scan the document is displayed on the interface, and a first scanning frame 301 is displayed, so that the document is located in the first scanning frame 301, for example: the first scan frame 301 may further include a portrait area positioning identifier 302, where the first scan frame may be rectangular or circular, and the specific shape may be defined according to the actual situation, and the first scan frame in fig. 3 is rectangular with the same shape as the document.
In a specific scanning process, four points on four corners of the certificate can be automatically positioned, as shown by 303 in fig. 3, the four corners of the certificate can be automatically positioned, the included angle between the plane of the certificate and the plane of the camera can be estimated approximately through the proportion between the four points of the certificate, and when a user sees that the four points of the certificate in the scanning frame deviate from the scanning frame far, the scanning angle at the moment can be considered to not meet the preset condition. The client can also see whether the object positioned by the four points is a certificate to be scanned or not through automatic positioning of the four points, for example: the document is placed on the tetragonal note paper for scanning, at this time, four points in the scanning frame may be positioned at four corners of the note paper, but not on the document to be scanned, at this time, the user can move the note paper away or adjust the distance or angle between the plane of the camera and the plane of the document.
After the document is scanned in the front side, the document image needs to be scanned in the side, and at this time, after the multi-frame first image obtained by scanning the document at the first scanning angle is obtained, the method further comprises:
third prompting information for prompting a user to scan the front image of the document at a second scan angle is displayed.
After the first image set is obtained, the equipment needs to be tilted, the certificate is continuously scanned, a side image is obtained, and the specific process can be as follows:
the displaying third prompting information for prompting the user to scan the front image of the certificate at the second scanning angle may specifically include:
displaying a second scan frame and/or animation representing a side image scanning operation, the second scan frame being a different geometry than the first scan frame.
The second scanning frame may include a portrait area positioning identifier.
After the document is scanned at the front surface at a scanning angle smaller than the first preset angle, the user is prompted to scan the document at an oblique angle on the interface, and a specific interaction process can be described with reference to fig. 4.
Fig. 4 is an interface schematic diagram of a document image scanned from the side in a document scanning method according to an embodiment of the present disclosure. As shown in fig. 4, a second scan frame 401 is displayed, and the second scan frame 401 may also include a face region identification 402, where the second scan frame 401 may be a different geometric frame from the first scan frame. In addition, an animation for representing the side image scanning operation may be displayed at an arbitrary position under the scan frame or in the scan interface to assist the user in completing the side scanning operation with reference to the animation. Prompt information for prompting the user of a specific oblique scanning angle may be displayed in an animation representing the side image scanning operation, such as: "please tilt the device by more than 20 °".
In the above-mentioned oblique scanning process, the prompt information for prompting the user to perform the oblique scanning may have various expression forms, for example: the text prompt "please tilt by 30 ° for scanning", the operation action screen when the moving picture is played, specifically for tilting scanning, etc. are displayed. The above method steps should be understood to be only used for explaining that corresponding prompt information is displayed in the terminal interface when the oblique scan is performed, and not limiting the scope of the present solution.
It should be noted that under different light conditions, whether to turn on the flash lamp to perform auxiliary scanning is selected according to different light conditions, for example, when only the change adopted under the light conditions is aimed at, the flash lamp needs to be turned on, then after the front side or the certificate is scanned, in order to increase the objects of similarity comparison, the flash lamp of the scanning device can be turned on to improve the anti-counterfeiting accuracy, the front side or the side can shoot a front picture of one or more certificates, and the front picture and the first image set obtained by scanning are used for the similarity comparison at the back side together.
By the method, the first scanning frame and/or the animation used for representing the front image scanning operation are displayed, and after the front scanning is finished, geometric figures different from rectangles or rounded rectangles are displayed on the interface. Such as: the scanning frame capable of displaying trapezium, fillet trapezium or other geometric figure and displaying information reminding the user to scan obliquely can prompt the user to scan obliquely in various modes to obtain multi-frame side images, enriches the display modes of interfaces, facilitates the user to understand the specific operation steps of front scanning or side scanning quickly, enables the user to know and master the mode of scanning credentials more intuitively, avoids the defects of unsmooth scanning and low scanning efficiency caused by the fact that the user does not know the credential scanning operation mode, and improves the efficiency of credential scanning identification.
After the multi-frame front image and the multi-frame side image are obtained by scanning, the similarity between the front image and the side image needs to be compared, so that the authenticity of the certificate is judged, and the specific process for specifically determining the similarity between the front image and the side image can comprise the following steps:
the determining the similarity between the first image set and the second image set may specifically include:
determining first image information corresponding to a first certificate identification mark in the first image set;
determining second image information corresponding to a second certificate identification mark in the second image set;
and calculating the similarity of the first image information and the second image information.
The certificate identification mark can obtain different image information corresponding to the certificate identification mark under different light conditions and different scanning angles, so that when the similarity between the front image and the side image is compared, the similarity between the image set corresponding to the certificate identification mark in the front image and the image set corresponding to the certificate identification mark in the side image can be calculated.
After the similarity between the first image set corresponding to the front image and the second image set corresponding to the side image is obtained through calculation, whether the similarity is smaller than a preset threshold value or not can be continuously judged, when the similarity is smaller than the preset threshold value, the scanned certificate can be determined to be a true certificate, and prompt information for prompting that the certificate passes anti-counterfeiting verification can be displayed, for example: the method and the device can display a hooked icon on the terminal to indicate that verification is completed, and can also display text prompt information, such as text information of ' certificate verification passed ', please upload ' or ' verification passed ', and the like.
When the judging result shows that the similarity value is larger than or equal to the preset threshold value, the requirement that the certificate identification mark corresponds to different image information under different scanning angles can be met, the scanned certificate can be determined to be a false certificate, and prompt information for prompting a user that the certificate does not pass anti-counterfeiting verification can be displayed. Specifically, the method comprises the following steps: information prompting the user to rescan the document is displayed.
For a better understanding of the above process, further description will be given with reference to fig. 5 and 6.
Fig. 5 is an interface schematic diagram of certificate anti-counterfeiting passing in a certificate scanning method according to an embodiment of the present disclosure.
As shown in fig. 5, when it is determined that the similarity between the first image set and the second image set is smaller than the preset threshold, the scanned document may be represented as a genuine document, and a mark and/or text passing verification may be displayed under the scan frame. Of course, it should be understood by those skilled in the art that the above-mentioned figures and the interactive interfaces in the figures are only one of the interactive interfaces for clearly explaining the present solution, and in practical applications, the form and interface of the specific display prompt information may be defined according to practical situations, for example: the prompt information of passing the verification can be displayed in the scanning frame or above or below the scanning frame, and the specific display form can be icons, characters or other expression forms which can enable the user to understand that the verification is completed, for example: a "scan complete", "is completed" or "next" click button, a "complete" get click button, etc. may be displayed. The present embodiment is not limited thereto.
Fig. 6 is a schematic diagram of an interface through which a certificate does not pass in anti-counterfeiting in a certificate scanning method according to an embodiment of the present disclosure.
As shown in fig. 6, when it is determined that the similarity between the first image set and the second image set is greater than the preset threshold, the scanned document may be represented as a false document. At this time, a prompt message for prompting the user that the certificate does not pass the anti-counterfeit process and needs to be scanned again may be displayed. As shown in fig. 6, text information of "certificate error, please retry" may be displayed below the scan frame. Of course, other text information or icons that can prompt the user to rescan can be displayed in addition to the above, and in practical application, only prompt information such as "verification failed" or "certificate error" can be displayed, and then
The interface returns to the original interface containing the first scan box to prompt the user for a scan retry.
By the method, the certificate anti-counterfeiting result is displayed, so that a user can quickly know the authenticity of the scanned certificate.
It should be further noted that, when the front side of the document is scanned obliquely, if the inclination angle is insufficient, a side image with a scanning angle greater than the second preset angle cannot be obtained, at this time, information for prompting the user to tilt by a larger angle may be displayed, and the following method may be adopted in the specific process:
After the displaying the third prompting information for prompting the user to scan the front image of the certificate at the second scanning angle, the method may further include:
judging whether the scanning angle of the scanning lens meets the second scanning angle or not to obtain a second judging result;
and displaying fourth prompting information for prompting a user to increase the scanning angle when the second judging result indicates that the scanning angle does not meet the second scanning angle.
When the tilting device scans the side image, it may be detected whether the scanning angle satisfies a second scanning angle (a scanning angle greater than a second preset angle), and when the scanning angle does not satisfy the second scanning angle, the side image satisfying the condition may not be obtained, and at this time, fourth prompt information for prompting the user to increase the scanning angle may be displayed on the display interface. The display interface may be as shown in fig. 7.
FIG. 7 is a schematic diagram of an interface for prompting a user to tilt a larger angle when scanning a side image in a document scanning method according to an embodiment of the present disclosure. As shown in fig. 7, when the side image scanning is performed, it can be estimated from the relative positional relationship between the scanning frame 701 and the document 702 whether the scanning angle satisfies the second scanning angle, in addition, whether the scanning angle satisfies the second scanning angle is automatically detected, and when the scanning angle does not satisfy the second scanning angle, an operation animation 703 may be displayed on the display interface, the user may be prompted to perform operation according to the operation procedure in the animation again, and text information for prompting the user to rescan is displayed on the interface, such as "scanning fails, please increase the scanning angle to perform scanning" as shown in fig. 7.
By the method, when the scanning angle of the user does not meet the requirement, the user is prompted to incline for scanning at a larger angle, so that the effectiveness of the side image obtained by scanning is ensured, the follow-up anti-counterfeiting operation is facilitated, and the efficiency and the accuracy of the anti-counterfeiting operation are improved.
In practical applications, when the anti-counterfeit mark is in a dark environment or some specific certificates need different light to be displayed, such as RMB. At this time, the certificate can be scanned by turning on the flash lamp under the condition of turning on the flash lamp for irradiation, and the image set obtained by scanning under different scanning angles can be obtained. Before the acquiring the multi-frame first image obtained by scanning the certificate at the first scanning angle, the method may further include:
and turning on an illumination mode to obtain a scanned image of the document in the illumination mode.
It should be noted that, the anti-counterfeit mark can appear in the illumination mode, when the shooting environment is in the environment with darker light, or when some specific certificates need different light to appear the anti-counterfeit mark, the illumination mode is turned on in the whole scanning process to obtain the front scanning image set and the inclined scanning image set at different scanning angles, and then the images in the two image sets are identified to judge the authenticity of the certificate.
The illumination mode may include a flashlight or a flash of the device itself, or may include a light source provided by an external device, so as to enable the document to display the anti-counterfeit mark under different light conditions, so that in practical applications, the flashlight may be replaced by any external device capable of providing illumination, without affecting the scope of the present scheme. Such as: the flashlight of the scanning device can be started when the scanning is started, so that the scanning of the front image and the side image is ensured under the condition that the flashlight irradiates the certificate. The flashlight can be turned on by external equipment to irradiate the certificate when the scanning mode is started, so that the front image and the side image of the certificate are obtained.
The steps of the method can be applied to the scanning and identification of hong Kong certificates, and the specific process can be realized by adopting the following method process with the combination of the accompanying figure 8:
fig. 8 is a schematic diagram of a hong kong document in a document scanning method according to an embodiment of the present disclosure.
For example: taking HONG KONG resident identification card as an example, as shown in fig. 8, the identification mark of the certificate in HONG KONG resident identification card may include one or more of triangle 801, clarity of head portrait in the certificate, clarity of number in the certificate, a "HONG KONG" mark, and anti-counterfeiting film on the surface of the certificate. When scanning is performed, different scanning angles can cause the image information corresponding to the identification mark of the certificate in the certificate to change. In a specific application process, the front image obtained by scanning at the first scanning angle and the side image obtained by scanning at the second scanning angle can be subjected to similarity comparison, and specifically, the image set corresponding to the first certificate identification mark in the front image and the image set corresponding to the second certificate identification mark in the side image can be subjected to similarity comparison, so that an anti-counterfeiting result is obtained.
The certificate anti-counterfeiting method in the scheme can be used for carrying out certificate anti-counterfeiting on the terminal, networking is not needed, anti-counterfeiting operation is not needed on the server side, and a result is returned to the terminal, so that the operation pressure of the server side is reduced, the flow consumed by information transmission is saved, and the efficiency of the terminal for acquiring the certificate anti-counterfeiting result is improved.
In addition, the certificate anti-counterfeiting method in the scheme is adopted, if the certificate is determined to be a true certificate, the certificate information can be uploaded to the server, the server further checks whether the certificate information uploaded by the terminal is matched with the pre-stored user information, and the checking result is returned to the terminal.
Based on the same thought, the embodiment of the specification also provides a device corresponding to the method. FIG. 9 is a schematic diagram of a document scanning device corresponding to FIG. 2 according to one embodiment of the present disclosure. As shown in fig. 9, the apparatus may include:
a first image obtaining module 902, configured to obtain a plurality of frames of first images obtained by scanning a certificate at a first scanning angle, so as to obtain a first image set, where the scanning angle is an included angle between a plane where a scanning lens is located and a plane where the certificate is located;
a second image obtaining module 904, configured to obtain a plurality of frames of second images obtained by scanning the document at a second scanning angle, so as to obtain a second image set, where the second scanning angle is greater than the first scanning angle;
A similarity determination module 906 for determining a similarity between the first image set and the second image set;
a first judging module 908, configured to judge whether the similarity is smaller than a preset threshold, to obtain a first judging result;
and the display module 910 is configured to display a first prompt message when the first determination result indicates that the similarity is smaller than a preset threshold, where the first prompt message is used to prompt that the certificate passes anti-counterfeit verification.
Optionally, the apparatus may further include:
the second prompt information display module is used for displaying second prompt information for prompting a user to scan the front image of the certificate at the first scanning angle and displaying second prompt information for prompting the user to scan the front image of the certificate at the first scanning angle.
Optionally, the second prompt information display module may be specifically configured to:
displaying a first scanning frame and/or animation for representing the front image scanning operation, wherein the first scanning frame is rectangular or rounded rectangle.
Optionally, the first scanning frame includes a portrait area positioning identifier.
Optionally, the apparatus may further include:
and the third prompt information display module is used for displaying third prompt information for prompting a user to scan the front image of the certificate at a second scanning angle.
Optionally, the third prompt information display module may be specifically configured to:
displaying a second scan frame and/or animation representing a side image scanning operation, the second scan frame being a different geometry than the first scan frame.
Optionally, the second scanning frame includes a portrait area positioning identifier.
Optionally, the third prompt information display module may be further configured to:
judging whether the scanning angle of the scanning lens meets the second scanning angle or not to obtain a second judging result;
and displaying fourth prompting information for prompting a user to increase the scanning angle when the second judging result indicates that the scanning angle does not meet the second scanning angle.
Optionally, the first image acquisition module 902 may specifically include:
a scanning image acquisition unit for acquiring a plurality of frames of scanning images;
the first image determining unit is used for identifying multi-frame first images with certificate identification marks from the scanned images meeting first image preset conditions, the first image preset conditions comprise a first scanning angle, and the certificate identification marks present different image information under different scanning angles;
The obtaining a multi-frame second image obtained by scanning the certificate at a second scanning angle may specifically include:
the second image determining unit is used for identifying multi-frame second images with certificate identification marks from scanned images meeting the preset conditions of the second images, and the certificate identification marks present different image information under different scanning angles;
optionally, the similarity determining module 906 may specifically include:
a first image information determining unit, configured to determine first image information corresponding to a first certificate identification in the first image set;
a second image information determining unit, configured to determine second image information corresponding to a second certificate identification identifier in the second image set;
and the similarity calculation unit is used for calculating the similarity of the first image information and the second image information.
Optionally, the apparatus may further include:
and the fifth prompt information display module is used for displaying fifth prompt information when the first judgment result indicates that the similarity value is larger than or equal to the preset threshold value, and the fifth prompt information is used for prompting a user that the certificate does not pass anti-counterfeiting verification.
Optionally, the device may further be configured to:
returning to the interface containing the first scan frame.
Optionally, the device may further be configured to:
and turning on an illumination mode to obtain a scanned image of the document in the illumination mode.
The device in fig. 9 ensures that the first image of the certificate scanned in front and the second image of the certificate scanned in inclined are acquired by arranging the first image acquisition module and the second image acquisition module at the first scanning angle, and the scanned images are acquired without aligning four edges, so that the defect that the image can be acquired only by aligning four edges of the certificate with the frame of the scanning interface is avoided, the complicated alignment process is avoided, and the efficiency of scanning and identifying the certificate is improved.
Based on the same thought, the embodiment of the specification also provides equipment corresponding to the method.
FIG. 10 is a schematic diagram of a credential scanning device corresponding to FIG. 2 provided in accordance with an embodiment of the present disclosure. As shown in fig. 10, the apparatus 1000 may include:
at least one processor 1010; the method comprises the steps of,
a memory 1030 communicatively coupled to the at least one processor; wherein,,
the memory 930 stores instructions 1020 executable by the at least one processor 1010 to enable the at least one processor 1010 to:
Acquiring a multi-frame first image obtained by scanning a certificate at a first scanning angle, and obtaining a first image set, wherein the scanning angle is an included angle between a plane where a scanning lens is positioned and a plane where the certificate is positioned;
obtaining a multi-frame second image obtained by scanning the certificate at a second scanning angle, and obtaining a second image set, wherein the second scanning angle is larger than the first scanning angle;
determining a similarity between the first image set and the second image set;
judging whether the similarity is smaller than a preset threshold value or not to obtain a first judging result;
and when the first judgment result shows that the similarity is smaller than a preset threshold, displaying first prompt information, wherein the first prompt information is used for prompting that the certificate passes anti-counterfeiting verification.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
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 functionality of the units may be implemented in one or more software and/or hardware when implementing one or more embodiments of the present description.
One skilled in the art will appreciate that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of 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.
One or more embodiments of the present specification are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to one or more 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 (transshipment) 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.
One or more embodiments of the present specification 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. One or more embodiments of the present description 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 description is illustrative of embodiments of the present disclosure and is not to be construed as limiting one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of one or more embodiments of the present disclosure, are intended to be included within the scope of the claims of one or more embodiments of the present disclosure.