CN112966680A - Certificate picture acquisition method and device and electronic equipment - Google Patents

Certificate picture acquisition method and device and electronic equipment Download PDF

Info

Publication number
CN112966680A
CN112966680A CN202110297638.6A CN202110297638A CN112966680A CN 112966680 A CN112966680 A CN 112966680A CN 202110297638 A CN202110297638 A CN 202110297638A CN 112966680 A CN112966680 A CN 112966680A
Authority
CN
China
Prior art keywords
certificate
picture
electronic equipment
light spot
image
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.)
Granted
Application number
CN202110297638.6A
Other languages
Chinese (zh)
Other versions
CN112966680B (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.)
Shanghai Ant Chuangjiang Information Technology Co ltd
Original Assignee
Alipay Hangzhou Information Technology 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110297638.6A priority Critical patent/CN112966680B/en
Publication of CN112966680A publication Critical patent/CN112966680A/en
Application granted granted Critical
Publication of CN112966680B publication Critical patent/CN112966680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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
    • 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
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection

Abstract

The embodiment of the specification provides a certificate picture acquisition method, a certificate picture acquisition device and electronic equipment, wherein in the certificate picture acquisition method, the electronic equipment detects an acquired picture, when the picture comprises a certificate image, the position of the certificate image in the picture is acquired, a positioning frame surrounding the certificate image is generated according to the position, and then the angle range and the distance range of a certificate corresponding to the certificate image are determined according to the position of the positioning frame in a screen of the electronic equipment and the position of a flash lamp of the electronic equipment; determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; and determining the distance between the certificate and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment. And finally, when the current angle of the certificate is within the angle range and the distance between the certificate and the electronic equipment is within the distance range, the electronic equipment respectively collects pictures of the certificate under the states that the flash lamp is turned off and turned on.

Description

Certificate picture acquisition method and device and electronic equipment
[ technical field ] A method for producing a semiconductor device
The embodiment of the specification relates to the technical field of internet, in particular to a certificate picture acquisition method and device and electronic equipment.
[ background of the invention ]
In the prior art, the real person authentication of 'i am me' is mainly realized through face verification, but some users do not leave face records, so the real person authentication of 'i am me' cannot be completed in a face verification mode. In this case, the authenticity of the user may be determined based on the authenticity of the certificate, that is, the certificate used by the user may be subjected to anti-counterfeit recognition, and when the certificate is determined to be a legitimate certificate, the user is determined to be authentic.
In the above scheme, the accuracy of the certificate anti-counterfeiting identification is a key problem to be paid attention to, and therefore, a scheme is required to be provided, so that the accuracy of the certificate anti-counterfeiting identification can be improved.
[ summary of the invention ]
The embodiment of the specification provides a certificate picture acquisition method, a certificate picture acquisition device and electronic equipment, so that when the electronic equipment acquires a certificate picture, the electronic equipment is ensured to acquire the certificate picture in a flash lamp open state, and the accuracy of certificate anti-counterfeiting identification is improved.
In a first aspect, an embodiment of the present specification provides a method for acquiring a certificate picture, including: detecting a picture acquired by electronic equipment; when the picture comprises a certificate image, acquiring the position of the certificate image in the picture, and generating a positioning frame surrounding the certificate image according to the position; determining an angle range and a distance range of the certificate corresponding to the certificate image according to the position of the positioning frame in the screen of the electronic equipment and the position of a flash lamp of the electronic equipment, wherein the angle range and the distance range comprise angle ranges and distance ranges of the certificate which can be irradiated by the flash lamp of the electronic equipment; determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; determining the distance between the certificate corresponding to the certificate image and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment; and if the current angle of the certificate corresponding to the certificate image is within the angle range and the distance between the certificate corresponding to the certificate image and the electronic equipment is within the distance range, the electronic equipment respectively collects the certificate in the states that the flash lamp is turned off and turned on.
In the method for acquiring the certificate image, an electronic device detects the image acquired by the electronic device, when the image comprises the certificate image, the position of the certificate image in the image is acquired, a positioning frame surrounding the certificate image is generated according to the position, and then the angle range and the distance range of the certificate corresponding to the certificate image are determined according to the position of the positioning frame in a screen of the electronic device and the position of a flash lamp of the electronic device; determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; and determining the distance between the certificate corresponding to the certificate image and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment. And finally, when the current angle of the certificate corresponding to the certificate image is within the angle range and the distance between the certificate corresponding to the certificate image and the electronic equipment is within the distance range, the electronic equipment respectively collects the certificate in the states that the flash lamp is turned off and turned on, so that the certificate picture in the state that the flash lamp is turned on can be collected by the electronic equipment, and the accuracy of certificate anti-counterfeiting identification is improved.
In one possible implementation manner, the method further includes: if the current angle of the certificate corresponding to the certificate image is not in the angle range and/or the distance between the certificate corresponding to the certificate image and the electronic equipment is not in the distance range, prompting a user to correspondingly adjust the angle of the certificate and the distance between the certificate and the electronic equipment.
In one possible implementation manner, the determining, according to the image in the positioning frame, a current angle of the certificate corresponding to the certificate image includes: determining the position of the corner point of the certificate image according to the image in the positioning frame; and determining the angle of the certificate corresponding to the certificate image according to the position of the angular point.
In one possible implementation manner, after the electronic device performs picture capturing on the certificate in the states of turning off and turning on the flash lamp, the method further includes: acquiring a first picture acquired by the electronic equipment in a flash lamp opening state; detecting the first picture; if no light spot exists on the first picture, or the first picture has the light spot, but the area of the light spot is larger than a preset light spot area threshold value, or the first picture has the light spot, but the shape of the light spot is different from the preset light spot shape, the first picture is determined not to meet the requirement of a preset flash lamp picture, and a user is prompted to irradiate the flash lamp of the electronic equipment onto the certificate.
In one possible implementation manner, after detecting the first picture, the method further includes: if the light spot exists on the first picture, the area of the light spot is smaller than or equal to a preset light spot area threshold value, and the shape of the light spot is the same as the preset light spot shape, uploading the first picture and a second picture acquired by the electronic equipment in a flash lamp off state to a server, so that the server can perform anti-counterfeiting identification on the certificate according to the first picture and the second picture.
In a second aspect, an embodiment of the present specification provides a device for capturing a document picture, which is disposed in an electronic device, and includes: the detection module is used for detecting the pictures acquired by the electronic equipment; the acquisition module is used for acquiring the position of the certificate image in the picture when the picture comprises the certificate image; the generating module is used for generating a positioning frame surrounding the certificate image according to the position acquired by the acquiring module; the determining module is used for determining an angle range and a distance range of the certificate corresponding to the certificate image according to the position of the positioning frame in the screen of the electronic equipment and the position of a flash lamp of the electronic equipment, wherein the angle range and the distance range comprise the angle range and the distance range which can be irradiated by the flash lamp of the electronic equipment; determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; determining the distance between the certificate corresponding to the certificate image and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment; and the acquisition module is used for acquiring the picture of the certificate under the states that the flash lamp is closed and opened respectively when the current angle of the certificate corresponding to the certificate image is within the angle range and the distance between the certificate corresponding to the certificate image and the electronic equipment is within the distance range.
In one possible implementation manner, the apparatus further includes: and the prompting module is used for prompting a user to correspondingly adjust the angle of the certificate and the distance between the certificate and the electronic equipment when the current angle of the certificate corresponding to the certificate image is not within the angle range and/or the distance between the certificate corresponding to the certificate image and the electronic equipment is not within the distance range.
In one possible implementation manner, the determining module is specifically configured to determine, according to the image in the positioning frame, a position of an angular point of the certificate image; and determining the angle of the certificate corresponding to the certificate image according to the position of the angular point.
In one possible implementation manner, the apparatus further includes: a prompt module; the acquisition module is further used for acquiring a first picture acquired by the electronic equipment in a flash lamp open state after the acquisition module acquires the picture of the certificate in the flash lamp closed and open states respectively; the detection module is further used for detecting the first picture; the determining module is further configured to determine that the first picture does not meet the requirement of a predetermined flash lamp picture when no light spot exists on the first picture, or a light spot exists on the first picture but the area of the light spot is larger than a predetermined light spot area threshold, or a light spot exists on the first picture but the shape of the light spot is different from a preset light spot shape; and the prompting module is used for prompting a user to irradiate the flash lamp of the electronic equipment on the certificate after the determining module determines that the first picture does not accord with the requirement of the preset flash lamp picture.
In one possible implementation manner, the apparatus further includes: and the sending module is used for uploading the first picture and a second picture acquired by the electronic equipment in a flash lamp closed state to a server when a light spot exists on the first picture, the area of the light spot is smaller than or equal to a preset light spot area threshold value and the shape of the light spot is the same as a preset light spot shape after the detection module detects the first picture, so that the server performs anti-counterfeiting identification on the certificate according to the first picture and the second picture.
In a third aspect, an embodiment of the present specification provides an electronic device, including: at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, the processor calling the program instructions to be able to perform the method provided by the first aspect.
In a fourth aspect, embodiments of the present specification provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method provided in the first aspect.
It should be understood that the second to fourth aspects of the embodiments of the present description are consistent with the technical solution of the first aspect of the embodiments of the present description, and similar beneficial effects are obtained in all aspects and corresponding possible implementation manners, and are not described again.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flow chart of a method for capturing a document picture provided in one embodiment of the present disclosure;
fig. 2 is a schematic diagram of an electronic device for capturing pictures according to an embodiment of the present disclosure;
FIG. 3 is a schematic view of a capture frame for a document image provided in one embodiment of the present description;
FIG. 4 is a flow chart of a method for capturing a document picture according to another embodiment of the present disclosure;
FIG. 5 is a schematic illustration of a first picture and a second picture in one embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of a device for collecting a document picture provided in one embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of a device for collecting a document picture provided in another embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
[ detailed description ] embodiments
For better understanding of the technical solutions in the present specification, the following detailed description of the embodiments of the present specification is provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only a few embodiments of the present specification, and not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step are within the scope of the present specification.
The terminology used in the embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the specification. As used in the specification examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In the related art, the credibility of the user can be determined based on the credibility of the certificate, that is, the certificate used by the user can be subjected to anti-counterfeiting identification, and when the certificate is determined to be a legal certificate, the user is determined to be credible.
In the process of certificate anti-counterfeiting identification, in order to distinguish color printed pictures of certificates, electronic equipment is required to print a flash lamp on a certificate, and different conditions of the flash lamp on the certificate and a copy (including color printed pictures) are observed to distinguish whether the current certificate is a true certificate or a false certificate or a copy. If the flash lamp does not hit the certificate, the flash lamp anti-counterfeiting algorithm judges the true certificate as a false certificate, and the identification passing rate of the user is influenced.
Based on the above problems, embodiments of the present specification provide a method for acquiring a certificate picture, where an electronic device interacts with a user to provide a whole set of solution for detecting a flash lamp, so as to ensure that the electronic device acquires the certificate picture in an open state of the flash lamp, and meanwhile, detect whether the certificate is over-exploded.
Fig. 1 is a flowchart of a method for capturing a certificate picture according to an embodiment of the present disclosure, and as shown in fig. 1, the method for capturing a certificate picture may include:
and 102, detecting the picture acquired by the electronic equipment.
In specific implementation, a user may open a certificate capture client installed in an electronic device, and then place a certificate in a rectangular frame 21 in a display interface of the client, as shown in fig. 2, where fig. 2 is a schematic diagram of capturing a picture by the electronic device provided in an embodiment of this specification.
After the user places the certificate in the rectangular frame 21, the electronic device captures the picture, and then detects the captured picture.
And 104, when the certificate image is included in the picture, acquiring the position of the certificate image in the picture, and generating a positioning frame surrounding the certificate image according to the position.
Specifically, a picture acquired by an electronic device may be detected through a Convolutional Neural Network (CNN) positioning model, the picture acquired by the electronic device is input into the CNN positioning model, the CNN positioning model outputs whether a current picture includes a certificate image, if the current picture includes the certificate image, the CNN positioning model may generate a positioning frame surrounding the certificate image according to a position of the certificate image in the current picture, as shown in fig. 3, fig. 3 is a schematic diagram of a positioning frame of the certificate image provided in an embodiment of this specification, and in fig. 3, a dashed frame 31 is the positioning frame surrounding the certificate image.
And step 106, determining the angle range and the distance range of the certificate corresponding to the certificate image according to the position of the positioning frame in the screen of the electronic equipment and the position of a flash lamp of the electronic equipment.
The angle range and the distance range comprise angle ranges and distance ranges which can be irradiated by a flash lamp of the electronic equipment.
Step 108, determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; and determining the distance between the certificate corresponding to the certificate image and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment. Then step 110 or step 112 is performed.
Specifically, according to the image in the positioning frame, determining the current angle of the certificate corresponding to the certificate image may be: and determining the position of the corner point of the certificate image according to the image in the positioning frame, still referring to fig. 3, wherein 32 in fig. 3 is the focus of the certificate image.
After the position of the corner point of the certificate image is determined, the electronic equipment can determine the angle of the certificate corresponding to the certificate image according to the position of the corner point. The angles of the certificate corresponding to the certificate image comprise 3 angles of a pitch angle (pitch), a yaw angle (yaw) and a roll angle (roll) of the certificate.
And 110, if the current angle of the certificate corresponding to the certificate image is within the angle range and the distance between the certificate corresponding to the certificate image and the electronic equipment is within the distance range, the electronic equipment respectively performs picture acquisition on the certificate under the states that the flash lamp is turned off and turned on.
Specifically, if the angle of the certificate is within the angle range and the distance between the certificate and the electronic device is also within the distance range, the electronic device can prompt the user to keep the relative position between the electronic device and the certificate unchanged, and perform picture collection on the certificate in the states of turning off and turning on the flash lamp respectively. Certainly, in the specific implementation, the electronic device may collect the certificate picture in the state that the flash lamp is turned off, and then collect the certificate picture in the state that the flash lamp is turned on; or the electronic equipment can collect the certificate picture in the state that the flash lamp is opened firstly, and then collect the certificate picture in the state that the flash lamp is closed; this embodiment is not limited to this.
And 112, if the current angle of the certificate corresponding to the certificate image is not in the angle range and/or the distance between the certificate corresponding to the certificate image and the electronic equipment is not in the distance range, prompting a user to correspondingly adjust the angle of the certificate and the distance between the certificate and the electronic equipment.
In the method for acquiring the certificate image, an electronic device detects the image acquired by the electronic device, when the image comprises the certificate image, the position of the certificate image in the image is acquired, a positioning frame surrounding the certificate image is generated according to the position, and then the angle range and the distance range of the certificate corresponding to the certificate image are determined according to the position of the positioning frame in a screen of the electronic device and the position of a flash lamp of the electronic device; determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; and determining the distance between the certificate corresponding to the certificate image and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment. And finally, when the current angle of the certificate corresponding to the certificate image is within the angle range and the distance between the certificate corresponding to the certificate image and the electronic equipment is within the distance range, the electronic equipment respectively collects the certificate in the states that the flash lamp is turned off and turned on, so that the certificate picture in the state that the flash lamp is turned on can be collected by the electronic equipment, and the accuracy of certificate anti-counterfeiting identification is improved.
Fig. 4 is a flowchart of a method for capturing a certificate picture according to another embodiment of the present disclosure, as shown in fig. 4, in the embodiment shown in fig. 1 of the present disclosure, after step 110, the method may further include:
in step 402, an electronic device acquires a first picture acquired by the electronic device in a flash on state.
In step 404, the electronic device detects the first picture. Step 406 or step 408 is then performed.
Step 406, if no light spot exists on the first picture, or a light spot exists on the first picture but the area of the light spot is larger than a predetermined light spot area threshold, or a light spot exists on the first picture but the shape of the light spot is different from a preset light spot shape, determining that the first picture does not meet the requirement of a predetermined flash lamp picture, and prompting a user to irradiate the flash lamp of the electronic device onto the certificate.
The electronic device then re-executes step 104 and its subsequent steps. It should be noted that, if the number of times that the electronic device repeatedly executes step 104 and subsequent steps reaches the preset number of times, and the first picture meeting the requirement of the predetermined flash lamp picture is not acquired, the user is not prompted, and the finally acquired first picture and second picture are uploaded to the server. The preset number of times may be set by itself according to system performance and/or implementation requirements during specific implementation, and the size of the preset number of times is not limited in this embodiment, for example, the preset number of times may be 5.
The predetermined light spot area threshold may be set according to system performance and/or implementation requirements, and the size of the predetermined light spot area threshold is not limited in this embodiment; similarly, the preset spot shape may also be set by itself when the specific implementation is performed, and the preset spot shape is not limited in this embodiment, for example, the preset spot shape may be a circle.
And 408, if the first picture has a light spot, the area of the light spot is smaller than or equal to a preset light spot area threshold value, and the shape of the light spot is the same as the preset light spot shape, uploading the first picture and a second picture acquired by the electronic equipment in a flash lamp closed state to a server, so that the server performs anti-counterfeiting identification on the certificate according to the first picture and the second picture.
Specifically, a light spot exists on a first picture, the area of the light spot is smaller than or equal to a predetermined light spot area threshold, and the shape of the light spot is the same as a preset light spot shape, which indicates that the first picture acquired by the electronic device meets the requirements of a predetermined flash lamp picture, at this time, the electronic device may upload the first picture and a second picture to a server together, as shown in fig. 5, fig. 5 is a schematic diagram of the first picture and the second picture in an embodiment of this specification, in fig. 5, a first picture 51 is a certificate picture acquired by the electronic device in a flash lamp on state, a second picture 52 is a certificate picture acquired by the electronic device in a flash lamp off state, and as can be seen from fig. 5, a light spot 53 exists in the first picture 51.
Further, after the server receives the first picture and the second picture, the anti-counterfeiting identification can be carried out on the certificate according to the first picture and the second picture.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may 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 may also be possible or may be advantageous.
Fig. 6 is a schematic structural diagram of a device for capturing a document picture according to an embodiment of the present disclosure, where the device for capturing a document picture is disposed in an electronic device, as shown in fig. 6, the device for capturing a document picture includes: the device comprises a detection module 61, an acquisition module 62, a generation module 63, a determination module 64 and an acquisition module 65;
the detection module 61 is configured to detect a picture acquired by the electronic device;
an obtaining module 62, configured to obtain, when the picture includes a certificate image, a position of the certificate image in the picture;
a generating module 63, configured to generate a positioning frame surrounding the certificate image according to the position acquired by the acquiring module 62;
the determining module 64 is configured to determine an angle range and a distance range of the certificate corresponding to the certificate image according to a position of the positioning frame in a screen of the electronic device and a position of a flash of the electronic device, where the angle range and the distance range include angle ranges and distance ranges of the certificate that can be irradiated by the flash of the electronic device; determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; determining the distance between the certificate corresponding to the certificate image and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment;
and the collecting module 65 is configured to collect the picture of the certificate in the states of turning off and turning on the flash lamp when the current angle of the certificate corresponding to the certificate image is within the angle range and the distance between the certificate corresponding to the certificate image and the electronic device is within the distance range.
The certificate picture collecting device provided in the embodiment shown in fig. 6 can be used to implement the technical solution of the method embodiment shown in fig. 1 in this specification, and the implementation principle and technical effects thereof can be further referred to the related description in the method embodiment.
Fig. 7 is a schematic structural diagram of a capturing device for a document picture according to another embodiment of the present disclosure, and compared with the capturing device for a document picture shown in fig. 6, the capturing device for a document picture shown in fig. 7 may further include: a prompt module 66;
and the prompting module 66 is configured to prompt a user to correspondingly adjust the angle of the certificate and the distance between the certificate and the electronic device when the current angle of the certificate corresponding to the certificate image is not within the angle range and/or the distance between the certificate corresponding to the certificate image and the electronic device is not within the distance range.
In this embodiment, the determining module 64 is specifically configured to determine the position of the corner point of the certificate image according to the image in the positioning frame; and determining the angle of the certificate corresponding to the certificate image according to the position of the angular point.
Further, the device for collecting the certificate picture can further comprise: a prompt module 66;
the acquisition module 62 is further configured to acquire a first picture acquired by the electronic device in the flash-on state after the acquisition module 65 acquires the pictures of the certificate in the flash-off and flash-on states, respectively;
the detection module 61 is further configured to detect the first picture;
the determining module 64 is further configured to determine that the first picture does not meet the requirement of the predetermined flash lamp picture when no light spot exists on the first picture, or a light spot exists on the first picture but the area of the light spot is larger than a predetermined light spot area threshold, or a light spot exists on the first picture but the shape of the light spot is different from a preset light spot shape;
and the prompting module 66 is used for prompting the user to irradiate the flash lamp of the electronic equipment on the certificate after the determining module 64 determines that the first picture does not meet the requirement of the preset flash lamp picture.
Further, the device for collecting the certificate picture can further comprise: a sending module 67;
the sending module 67 is configured to, after the detection module 61 detects the first picture, upload the first picture and a second picture acquired by the electronic device in a flash off state to the server when a light spot exists on the first picture, an area of the light spot is smaller than or equal to a predetermined light spot area threshold, and a shape of the light spot is the same as a preset light spot shape, so that the server performs anti-counterfeit recognition on the certificate according to the first picture and the second picture.
The certificate picture collecting device provided in the embodiment shown in fig. 7 can be used to implement the technical solutions of the method embodiments shown in fig. 1 to 5 of the present application, and the implementation principles and technical effects thereof can be further referred to the related descriptions in the method embodiments.
Fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification, where as shown in fig. 8, the electronic device may include at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the certificate picture acquisition method provided by the embodiments shown in fig. 1 to 5 in the present specification.
The electronic device may be an intelligent terminal device such as a smart phone, a tablet computer, or a smart watch, and the form of the electronic device is not limited in this embodiment.
FIG. 8 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present specification. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present specification.
As shown in fig. 8, the electronic device is in the form of a general purpose computing device. Components of the electronic device may include, but are not limited to: one or more processors 410, a communication interface 420, a memory 430, and a communication bus 440 that connects the various components (including the memory 430, the communication interface 420, and the processing unit 410).
Communication bus 440 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, or a local bus using any of a variety of bus architectures. For example, communication bus 440 may include, but is not limited to, an Industry Standard Architecture (ISA) bus, a micro channel architecture (MAC) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic devices typically include a variety of computer system readable media. Such media may be any available media that is accessible by the electronic device and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 430 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) and/or cache memory. Memory 430 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of the embodiments described herein with respect to fig. 1-5.
A program/utility having a set (at least one) of program modules, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored in memory 430, each of which examples or some combination may include an implementation of a network environment. The program modules generally perform the functions and/or methods of the embodiments described in fig. 1-5 herein.
The processor 410 executes various functional applications and data processing by running programs stored in the memory 430, for example, implementing the certificate picture capturing method provided by the embodiments shown in fig. 1 to 5 in the present specification.
The embodiment of the present specification provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions cause the computer to execute the method for capturing the certificate pictures provided by the embodiment shown in fig. 1 to 5 of the present specification.
The non-transitory computer readable storage medium described above may take any combination of one or more computer readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM) or flash memory, an optical fiber, a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present description may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may 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 may also be possible or may be advantageous.
In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present specification, "a plurality" means at least two, e.g., two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present description in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present description.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It should be noted that the terminal referred to in the embodiments of the present specification may include, but is not limited to, a Personal Computer (PC), a Personal Digital Assistant (PDA), a wireless handheld device, a tablet computer (tablet computer), a mobile phone, an MP3 player, an MP4 player, and the like.
In the several embodiments provided in this specification, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present description may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (12)

1. A method for collecting certificate pictures comprises the following steps:
detecting a picture acquired by electronic equipment;
when the picture comprises a certificate image, acquiring the position of the certificate image in the picture, and generating a positioning frame surrounding the certificate image according to the position;
determining an angle range and a distance range of the certificate corresponding to the certificate image according to the position of the positioning frame in the screen of the electronic equipment and the position of a flash lamp of the electronic equipment, wherein the angle range and the distance range comprise angle ranges and distance ranges of the certificate which can be irradiated by the flash lamp of the electronic equipment;
determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; determining the distance between the certificate corresponding to the certificate image and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment;
and if the current angle of the certificate corresponding to the certificate image is within the angle range and the distance between the certificate corresponding to the certificate image and the electronic equipment is within the distance range, the electronic equipment respectively collects the certificate in the states that the flash lamp is turned off and turned on.
2. The method of claim 1, further comprising:
if the current angle of the certificate corresponding to the certificate image is not in the angle range and/or the distance between the certificate corresponding to the certificate image and the electronic equipment is not in the distance range, prompting a user to correspondingly adjust the angle of the certificate and the distance between the certificate and the electronic equipment.
3. The method of claim 1, wherein the determining, according to the image in the positioning frame, the current angle of the certificate corresponding to the certificate image comprises:
determining the position of the corner point of the certificate image according to the image in the positioning frame;
and determining the angle of the certificate corresponding to the certificate image according to the position of the angular point.
4. The method of claim 1, wherein the electronic device further comprises, after taking a picture of the document in the states of the flash being off and on, respectively:
acquiring a first picture acquired by the electronic equipment in a flash lamp opening state;
detecting the first picture;
if no light spot exists on the first picture, or the first picture has the light spot, but the area of the light spot is larger than a preset light spot area threshold value, or the first picture has the light spot, but the shape of the light spot is different from the preset light spot shape, the first picture is determined not to meet the requirement of a preset flash lamp picture, and a user is prompted to irradiate the flash lamp of the electronic equipment onto the certificate.
5. The method of claim 4, wherein after the detecting the first picture, further comprising:
if the light spot exists on the first picture, the area of the light spot is smaller than or equal to a preset light spot area threshold value, and the shape of the light spot is the same as the preset light spot shape, uploading the first picture and a second picture acquired by the electronic equipment in a flash lamp off state to a server, so that the server can perform anti-counterfeiting identification on the certificate according to the first picture and the second picture.
6. The utility model provides a collection system of certificate picture, sets up in electronic equipment, collection system of certificate picture includes:
the detection module is used for detecting the pictures acquired by the electronic equipment;
the acquisition module is used for acquiring the position of the certificate image in the picture when the picture comprises the certificate image;
the generating module is used for generating a positioning frame surrounding the certificate image according to the position acquired by the acquiring module;
the determining module is used for determining an angle range and a distance range of the certificate corresponding to the certificate image according to the position of the positioning frame in the screen of the electronic equipment and the position of a flash lamp of the electronic equipment, wherein the angle range and the distance range comprise the angle range and the distance range which can be irradiated by the flash lamp of the electronic equipment; determining the current angle of the certificate corresponding to the certificate image according to the image in the positioning frame; determining the distance between the certificate corresponding to the certificate image and the electronic equipment according to the area of the certificate image and the screen area of the electronic equipment;
and the acquisition module is used for acquiring the picture of the certificate under the states that the flash lamp is closed and opened respectively when the current angle of the certificate corresponding to the certificate image is within the angle range and the distance between the certificate corresponding to the certificate image and the electronic equipment is within the distance range.
7. The apparatus of claim 6, further comprising:
and the prompting module is used for prompting a user to correspondingly adjust the angle of the certificate and the distance between the certificate and the electronic equipment when the current angle of the certificate corresponding to the certificate image is not within the angle range and/or the distance between the certificate corresponding to the certificate image and the electronic equipment is not within the distance range.
8. The apparatus of claim 6, wherein,
the determining module is specifically configured to determine, according to the image in the positioning frame, a position of an angular point of the certificate image; and determining the angle of the certificate corresponding to the certificate image according to the position of the angular point.
9. The apparatus of claim 6, further comprising: a prompt module;
the acquisition module is further used for acquiring a first picture acquired by the electronic equipment in a flash lamp open state after the acquisition module acquires the picture of the certificate in the flash lamp closed and open states respectively;
the detection module is further used for detecting the first picture;
the determining module is further configured to determine that the first picture does not meet the requirement of a predetermined flash lamp picture when no light spot exists on the first picture, or a light spot exists on the first picture but the area of the light spot is larger than a predetermined light spot area threshold, or a light spot exists on the first picture but the shape of the light spot is different from a preset light spot shape;
and the prompting module is used for prompting a user to irradiate the flash lamp of the electronic equipment on the certificate after the determining module determines that the first picture does not accord with the requirement of the preset flash lamp picture.
10. The apparatus of claim 9, further comprising:
and the sending module is used for uploading the first picture and a second picture acquired by the electronic equipment in a flash lamp closed state to a server when a light spot exists on the first picture, the area of the light spot is smaller than or equal to a preset light spot area threshold value and the shape of the light spot is the same as a preset light spot shape after the detection module detects the first picture, so that the server performs anti-counterfeiting identification on the certificate according to the first picture and the second picture.
11. An electronic device, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 5.
12. A non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the method of any of claims 1 to 5.
CN202110297638.6A 2021-03-19 2021-03-19 Certificate picture acquisition method and device and electronic equipment Active CN112966680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110297638.6A CN112966680B (en) 2021-03-19 2021-03-19 Certificate picture acquisition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110297638.6A CN112966680B (en) 2021-03-19 2021-03-19 Certificate picture acquisition method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112966680A true CN112966680A (en) 2021-06-15
CN112966680B CN112966680B (en) 2022-04-15

Family

ID=76277781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110297638.6A Active CN112966680B (en) 2021-03-19 2021-03-19 Certificate picture acquisition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112966680B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015019566A1 (en) * 2013-08-06 2015-02-12 パナソニックIpマネジメント株式会社 Strobe device and imaging device equipped with strobe device
CN105959581A (en) * 2015-03-08 2016-09-21 联发科技股份有限公司 Electronic device having dynamically controlled flashlight for image capturing and related control method
EP3096184A1 (en) * 2015-05-19 2016-11-23 Xiaomi Inc. Method and device for controlling flash light and terminal
US20190102608A1 (en) * 2017-09-29 2019-04-04 Alibaba Group Holding Limited System and method for entity recognition
CN110533643A (en) * 2019-08-21 2019-12-03 阿里巴巴集团控股有限公司 Certificate identification method and device
CN112165571A (en) * 2020-09-09 2021-01-01 支付宝实验室(新加坡)有限公司 Certificate image acquisition method, device and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015019566A1 (en) * 2013-08-06 2015-02-12 パナソニックIpマネジメント株式会社 Strobe device and imaging device equipped with strobe device
CN105959581A (en) * 2015-03-08 2016-09-21 联发科技股份有限公司 Electronic device having dynamically controlled flashlight for image capturing and related control method
EP3096184A1 (en) * 2015-05-19 2016-11-23 Xiaomi Inc. Method and device for controlling flash light and terminal
US20190102608A1 (en) * 2017-09-29 2019-04-04 Alibaba Group Holding Limited System and method for entity recognition
CN110533643A (en) * 2019-08-21 2019-12-03 阿里巴巴集团控股有限公司 Certificate identification method and device
CN112165571A (en) * 2020-09-09 2021-01-01 支付宝实验室(新加坡)有限公司 Certificate image acquisition method, device and equipment

Also Published As

Publication number Publication date
CN112966680B (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN108804884B (en) Identity authentication method, identity authentication device and computer storage medium
US11210541B2 (en) Liveness detection method, apparatus and computer-readable storage medium
KR20190072563A (en) Method and apparatus for detecting facial live varnish, and electronic device
CN108875333B (en) Terminal unlocking method, terminal and computer readable storage medium
US11694474B2 (en) Interactive user authentication
BR102014027735A2 (en) methods for handwriting verification and user authentication
CN105678242B (en) Focusing method and device under hand-held certificate mode
CN109670444B (en) Attitude detection model generation method, attitude detection device, attitude detection equipment and attitude detection medium
US10824891B2 (en) Recognizing biological feature
CN107995500B (en) Video watermark recognition methods, device and terminal
CN110210196B (en) Identity authentication method and device
CN110263805B (en) Certificate verification and identity verification method, device and equipment
WO2022127480A1 (en) Facial recognition method and related device
CN110795714A (en) Identity authentication method and device, computer equipment and storage medium
US20220270352A1 (en) Methods, apparatuses, devices, storage media and program products for determining performance parameters
CN109656800B (en) Method and device for testing image recognition application, terminal and storage medium
US20160255329A1 (en) Image processing method and electronic device supporting the same
WO2021049234A1 (en) Image analysis device, control method, and program
CN112966680B (en) Certificate picture acquisition method and device and electronic equipment
TWI770531B (en) Face recognition method, electronic device and storage medium thereof
CN112989299A (en) Interactive identity recognition method, system, device and medium
CN112200804A (en) Image detection method and device, computer readable storage medium and electronic equipment
CN111898529B (en) Face detection method and device, electronic equipment and computer readable medium
CN108875352B (en) User identity verification method and device and mobile terminal
CN112633218A (en) Face detection method and device, terminal equipment and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240228

Address after: Room 1408, No. 447 Nanquan North Road, Pudong New Area Free Trade Pilot Zone, Shanghai, 200120

Patentee after: Shanghai Ant Chuangjiang Information Technology Co.,Ltd.

Country or region after: China

Address before: 801-11, Section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province 310007

Patentee before: Alipay (Hangzhou) Information Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right